2009-04-03 Jian Li <jianli@chromium.org>
[WebKit-https.git] / WebCore / ChangeLog
1 2009-04-03  Jian Li  <jianli@chromium.org>
2
3         Reviewed by Darin Fisher.
4
5         https://bugs.webkit.org/show_bug.cgi?id=25009
6         Upstream changes to WorkerContextExecutionProxy for V8 bindings in order to use V8EventListenerList as container.
7
8         * bindings/v8/WorkerContextExecutionProxy.cpp:
9         (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
10         (WebCore::WorkerContextExecutionProxy::dispose):
11         (WebCore::WorkerContextExecutionProxy::FindOrCreateEventListener):
12         (WebCore::WorkerContextExecutionProxy::RemoveEventListener):
13         * bindings/v8/WorkerContextExecutionProxy.h:
14
15 2009-04-03  Geoffrey Garen  <ggaren@apple.com>
16
17         Reviewed by Sam Weinig.
18
19         Removed irrelevant ExecState* parameter from event handler registration code.
20         
21         No change in behavior.
22
23         * bindings/js/JSDOMApplicationCacheCustom.cpp:
24         (WebCore::JSDOMApplicationCache::addEventListener):
25         (WebCore::JSDOMApplicationCache::removeEventListener):
26         * bindings/js/JSDOMGlobalObject.cpp:
27         (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener):
28         (WebCore::JSDOMGlobalObject::findJSEventListener):
29         (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
30         * bindings/js/JSDOMGlobalObject.h:
31         * bindings/js/JSDOMWindowCustom.cpp:
32         (WebCore::JSDOMWindow::addEventListener):
33         * bindings/js/JSMessagePortCustom.cpp:
34         (WebCore::JSMessagePort::addEventListener):
35         (WebCore::JSMessagePort::removeEventListener):
36         * bindings/js/JSNodeCustom.cpp:
37         (WebCore::JSNode::addEventListener):
38         (WebCore::JSNode::removeEventListener):
39         * bindings/js/JSSVGElementInstanceCustom.cpp:
40         (WebCore::JSSVGElementInstance::addEventListener):
41         * bindings/js/JSWorkerContextCustom.cpp:
42         (WebCore::JSWorkerContext::addEventListener):
43         (WebCore::JSWorkerContext::removeEventListener):
44         * bindings/js/JSWorkerCustom.cpp:
45         (WebCore::JSWorker::addEventListener):
46         (WebCore::JSWorker::removeEventListener):
47         * bindings/js/JSXMLHttpRequestCustom.cpp:
48         (WebCore::JSXMLHttpRequest::addEventListener):
49         (WebCore::JSXMLHttpRequest::removeEventListener):
50         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
51         (WebCore::JSXMLHttpRequestUpload::addEventListener):
52         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
53         * bindings/scripts/CodeGeneratorJS.pm:
54
55 2009-04-03  Dan Bernstein  <mitz@apple.com>
56
57         Reviewed by Simon Fraser.
58
59         - fix <rdar://problem/6634771> Under full-page zoom, cannot scroll
60           MobileMe contact list
61
62         Test: fast/css/zoom-in-length-round-trip.html
63
64         * dom/Element.cpp:
65         (WebCore::adjustForLocalZoom): For zoom factors greater than 1, ensure
66         that the returned value is equal to the original unscaled value.
67         (WebCore::adjustForAbsoluteZoom): Ditto.
68
69 2009-04-03  Chris Marrin  <cmarrin@apple.com>
70
71         Reviewed by David Hyatt.
72
73         Fixed https://bugs.webkit.org/show_bug.cgi?id=24941
74
75         This fix essentially does a -viewWillDraw call for layout. It adds 
76         a CFRunLoopObserver which performs layout just before drawing on the 
77         Mac platform. This makes sure layout is complete before rendering and 
78         avoids a flash.
79
80         * page/ChromeClient.h:
81         (WebCore::ChromeClient::scheduleViewUpdate):
82         * rendering/RenderLayerCompositor.cpp:
83         (WebCore::RenderLayerCompositor::setCompositingLayersNeedUpdate):
84         (WebCore::RenderLayerCompositor::scheduleViewUpdate):
85         * rendering/RenderLayerCompositor.h:
86
87 2009-04-02  Simon Fraser  <simon.fraser@apple.com>
88
89         Reviewed by Dan Bernstein
90
91         https://bugs.webkit.org/show_bug.cgi?id=24648
92
93         Optimize mapPoint(), mapRect() and mapQuad() for identity matrix and translations.
94         
95         * platform/graphics/transforms/TransformationMatrix.cpp:
96         (WebCore::TransformationMatrix::mapPoint):
97         (WebCore::TransformationMatrix::mapRect):
98         (WebCore::TransformationMatrix::mapQuad):
99         * platform/graphics/transforms/TransformationMatrix.h:
100         (WebCore::TransformationMatrix::mapPoint):
101
102 2009-04-02  Simon Fraser  <simon.fraser@apple.com>
103
104         Reviewed by Dan Bernstein
105
106         https://bugs.webkit.org/show_bug.cgi?id=25018
107         
108         Add containsPoint() and containsQuad() methods to FloatQuad.
109
110         * platform/graphics/FloatQuad.cpp:
111         (WebCore::dot):
112         (WebCore::isPointInTriangle):
113         (WebCore::FloatQuad::containsPoint):
114         (WebCore::FloatQuad::containsQuad):
115         * platform/graphics/FloatQuad.h:
116
117 2009-04-03  Kevin Decker  <kdecker@apple.com>
118
119         Reviewed by Darin.
120
121         *  loader/ProgressTracker.cpp: Included DocumentLoader.h
122         (WebCore::ProgressTracker::incrementProgress): Limit the 50%-clamp rule to 
123         documents that use WebCore's layout system.
124
125 2009-04-03  Eric Carlson  <eric.carlson@apple.com>
126
127         Reviewed by Simon Fraser.
128
129         <rdar://problem/6336092> REGRESSION: movie does not resize correctly
130
131         Test: media/video-size-intrinsic-scale.html
132
133         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
134         (WebCore::MediaPlayerPrivate::naturalSize): Use QTMovieCurrentSizeAttribute instead 
135         of QTMovieNaturalSizeAttribute so we return the correct size for movies saved
136         with a non-default matrix.
137         (WebCore::MediaPlayerPrivate::setSize): Don't resize the QTMovieView
138         because [QTMovieView setFrame] also resizes the movie itself, and as
139         the renderer calls setSize immediately when a movie reports a size change
140         (QTMovieSizeDidChangeNotification) we can get into a feedback loop
141         observing the size change and resetting the size, and this can cause
142         QuickTime to miss correctly setting a movie's size when the media size
143         changes after opening (as happens with an rtsp movie once the server sends
144         the track sizes). Instead, remember the size passed to paint() and 
145         resize the view when it changes.
146         (WebCore::MediaPlayerPrivate::paint): Resize the view when passed a new size.
147
148         * platform/graphics/win/QTMovieWin.cpp:
149         (QTMovieWin::getNaturalSize): Use GetMovieBox instead of GetMovieNaturalBoundsRect
150         so we return the correct size for movies saved with non-default matrix.
151
152 2009-04-03  Darin Fisher  <darin@chromium.org>
153
154         Reviewed by Darin Adler.
155
156         Restore FrameLoader::policyDocumentLoader to fix the Chromium build.
157         https://bugs.webkit.org/show_bug.cgi?id=25028
158
159         * loader/FrameLoader.h:
160         (WebCore::FrameLoader::policyDocumentLoader):
161
162 2009-04-02  Michael Nordman  <michaeln@google.com>
163
164         Reviewed by Alexey Proskuryakov.
165
166         Use long long, not int64, when working in webcore (sorry).
167         https://bugs.webkit.org/show_bug.cgi?id=25011
168
169         No change in functionality, so no tests.
170
171         * platform/network/chromium/ResourceResponse.h:
172         (WebCore::ResourceResponse::getAppCacheID):
173         (WebCore::ResourceResponse::setAppCacheID):
174
175 2009-04-03  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
176
177         Reviewed by Holger Freyther.
178
179         Remove pre-processor checks for GTK+ >= 2.10, since we now require
180         at least that version.
181
182         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
183         (WebCore::FontPlatformData::FontPlatformData):
184         * platform/gtk/ContextMenuItemGtk.cpp:
185         (WebCore::gtkStockIDFromContextMenuAction):
186         * platform/gtk/KeyEventGtk.cpp:
187         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
188         * platform/gtk/LocalizedStringsGtk.cpp:
189         (WebCore::contextMenuItemTagSelectAll):
190         * platform/gtk/MouseEventGtk.cpp:
191         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
192         * platform/gtk/PasteboardGtk.cpp:
193         (WebCore::Pasteboard::writeSelection):
194         (WebCore::Pasteboard::documentFragment):
195         * platform/gtk/WheelEventGtk.cpp:
196         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
197
198 2009-04-02  Simon Fraser  <simon.fraser@apple.com>
199
200         Reviewed by Dan Bernstein
201         
202         https://bugs.webkit.org/show_bug.cgi?id=25021
203         
204         Fix repainting an element with a reflection and transform after layout.
205         Telling the reflection to repaint directly is wrong, because, with
206         LayoutState enabled, it only takes the reflection's transform into account,
207         not that of the element. We can fix this, and keep the benefits of LayoutState,
208         by computing the reflected repaint rect, and repainting that using the original
209         renderer.
210
211         Test: fast/repaint/reflection-repaint-test.html
212
213         * rendering/RenderBlock.cpp:
214         (WebCore::RenderBlock::layoutBlock):
215
216 2009-04-02  Simon Fraser  <simon.fraser@apple.com>
217
218         Reviewed by Dan Bernstein
219         
220         https://bugs.webkit.org/show_bug.cgi?id=23307
221         
222         When repainting during layout (when LayoutState is enabled), we need
223         to apply the transform to the dirty rect, before applying x(), y() and
224         the offset storted in the LayoutState.
225         
226         Also bypass LayoutState in mapLocalToContainer() if we have a repaintContainer,
227         since LayoutState is always root-relative.
228
229         Test: fast/repaint/transform-layout-repaint.html
230
231         * rendering/RenderBox.cpp:
232         (WebCore::RenderBox::mapLocalToContainer):
233         (WebCore::RenderBox::computeRectForRepaint):
234
235 2009-04-02  Mark Rowe  <mrowe@apple.com>
236
237         Fix the Mac build after r42191.
238
239         * WebCore.base.exp:
240
241 2009-04-02  Mark Rowe  <mrowe@apple.com>
242
243         Fix Windows build after r42190.
244
245         * page/EventHandler.cpp:
246         (WebCore::EventHandler::keyEvent):  Update to use the new name of the constant.
247
248 2009-04-02  Darin Adler  <darin@apple.com>
249
250         Reviewed by Brady Eidson.
251
252         <rdar://problem/6625840> Previous Page isn't loaded after hitting back button at http://www.breakingnews.ie/
253
254         Test: http/tests/navigation/onload-navigation-iframe-2.html
255
256         * html/HTMLFrameElement.cpp:
257         (WebCore::HTMLFrameElement::HTMLFrameElement): Removed unneeded createdByParser flag.
258         * html/HTMLFrameElement.h: Ditto.
259         * html/HTMLFrameElementBase.cpp:
260         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Ditto.
261         * html/HTMLFrameElementBase.h: Ditto.
262         * html/HTMLFrameOwnerElement.cpp:
263         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement): Ditto.
264         * html/HTMLFrameOwnerElement.h: Ditto.
265         * html/HTMLIFrameElement.cpp:
266         (WebCore::HTMLIFrameElement::HTMLIFrameElement): Ditto.
267         * html/HTMLIFrameElement.h: Ditto.
268         * html/HTMLPlugInElement.cpp:
269         (WebCore::HTMLPlugInElement::HTMLPlugInElement): Ditto.
270
271         * loader/FrameLoader.cpp:
272         (WebCore::FrameLoader::submitForm): Removed unneeded check of the createdByParser flag.
273         The original change that introduced this, http://trac.webkit.org/changeset/25410, does
274         not make it clear why this check was needed. And it seems it is not needed.
275
276 2009-04-02  Adele Peterson  <adele@apple.com>
277
278         Reviewed by Darin Adler.
279
280         Add a way to get a list of focusable nodes.
281
282         * dom/Document.cpp:
283         (WebCore::Document::setFocusedNode):
284         (WebCore::Document::getFocusableNodes):
285         * dom/Document.h:
286
287 2009-04-02  Darin Adler  <darin@apple.com>
288
289         Reviewed by Sam Weinig.
290
291         <rdar://problem/6654255> crash due to null FrameView in EventHandler
292
293         Lots of code was added to EventHandler that used view() and page() without
294         null checking, but both of those can become null due to the frame lifetime.
295
296         * page/EventHandler.cpp:
297         (WebCore::EventHandler::handleMousePressEventSingleClick):
298         (WebCore::EventHandler::eventMayStartDrag):
299         (WebCore::EventHandler::handleAutoscroll):
300         (WebCore::EventHandler::autoscrollTimerFired):
301         (WebCore::EventHandler::setPanScrollCursor):
302         (WebCore::EventHandler::allowDHTMLDrag):
303         (WebCore::EventHandler::hitTestResultAtPoint):
304         (WebCore::EventHandler::stopAutoscrollTimer):
305         (WebCore::EventHandler::selectCursor):
306         (WebCore::EventHandler::handleMousePressEvent):
307         (WebCore::EventHandler::handleMouseMoveEvent):
308         (WebCore::EventHandler::dispatchDragEvent):
309         (WebCore::EventHandler::prepareMouseEvent):
310         (WebCore::EventHandler::dispatchMouseEvent):
311         (WebCore::EventHandler::handleWheelEvent):
312         (WebCore::EventHandler::hoverTimerFired):
313         (WebCore::EventHandler::keyEvent):
314         (WebCore::EventHandler::dragHysteresisExceeded):
315         (WebCore::EventHandler::shouldDragAutoNode):
316         (WebCore::EventHandler::handleDrag):
317         (WebCore::EventHandler::handleTextInputEvent):
318         (WebCore::EventHandler::addPendingFrameUnloadEventCount):
319         (WebCore::EventHandler::removePendingFrameUnloadEventCount):
320         (WebCore::EventHandler::clearPendingFrameUnloadEventCount):
321         (WebCore::EventHandler::addPendingFrameBeforeUnloadEventCount):
322         (WebCore::EventHandler::removePendingFrameBeforeUnloadEventCount):
323         (WebCore::EventHandler::clearPendingFrameBeforeUnloadEventCount):
324         Added null checks for view() and page(). Made minor code cleanups.
325
326 2009-04-02  David Hyatt  <hyatt@apple.com>
327
328         Reviewed by Oliver Hunt.
329
330         Fix regression in <object> layout test.  Make sure that even though a 404 image loads, that <object>
331         still considers it an error for the purposes of firing onerror.
332
333         * html/HTMLImageLoader.cpp:
334         (WebCore::HTMLImageLoader::dispatchLoadEvent):
335
336 2009-04-02  Dimitri Glazkov  <dglazkov@chromium.org>
337
338         Reviewed by Timothy Hatcher.
339
340         https://bugs.webkit.org/show_bug.cgi?id=25010
341         Refactor InspectorController to replace all JS function invocations with
342         ScriptFunctionCall.
343
344         * bindings/js/ScriptFunctionCall.cpp:
345         (WebCore::ScriptFunctionCall::appendArgument): Added int, UString,
346             and JSValuePtr methods.
347         (WebCore::ScriptFunctionCall::call): Added simplified, exception-eating
348             method.
349         * bindings/js/ScriptFunctionCall.h: Decls for above.
350         * bindings/js/ScriptObjectQuarantine.cpp: Added helper for Node and DOMWindow.
351         (WebCore::getQuarantinedScriptObject):
352         * bindings/js/ScriptObjectQuarantine.h: Decls for above.
353         * inspector/InspectorController.cpp:
354         (WebCore::callSimpleFunction): Made into a static.
355         (WebCore::InspectorController::focusNode): Refactored to use ScriptFunctionCall.
356         (WebCore::InspectorController::toggleRecordButton): Ditto.
357         (WebCore::InspectorController::startGroup): Ditto.
358         (WebCore::InspectorController::setAttachedWindow): Ditto.
359         (WebCore::InspectorController::inspectedWindowScriptObjectCleared): Ditto.
360         (WebCore::InspectorController::addScriptProfile): Ditto.
361         (WebCore::InspectorController::didParseSource): Ditto.
362         (WebCore::InspectorController::failedToParseSource): Ditto.
363         (WebCore::InspectorController::didPause): Ditto.
364         * inspector/InspectorController.h: Removed callFunction and callSimpleFunction
365             decls.
366
367 2009-04-02  Jian Li  <jianli@chromium.org>
368
369         Reviewed by Darin Fisher.
370
371         Upstream changes to V8WorkerContextEventListener for V8 bindings.
372         https://bugs.webkit.org/show_bug.cgi?id=25007
373
374         * bindings/v8/V8ObjectEventListener.h:
375         * bindings/v8/V8WorkerContextEventListener.cpp:
376
377 2009-04-02  Jian Li  <jianli@chromium.org>
378
379         Reviewed by Darin Fisher.
380
381         Upstream V8WorkerContextObjectEventListener for V8 bindings.
382         https://bugs.webkit.org/show_bug.cgi?id=25005
383
384         * bindings/v8/V8WorkerContextObjectEventListener.cpp: Added.
385         * bindings/v8/V8WorkerContextObjectEventListener.h: Added.
386
387 2009-04-02  Jian Li  <jianli@chromium.org>
388
389         Reviewed by Darin Fisher.
390
391         Upstream V8EventListenerList for V8 bindings.
392         https://bugs.webkit.org/show_bug.cgi?id=25004
393
394         * bindings/v8/V8EventListenerList.cpp: Added.
395         * bindings/v8/V8EventListenerList.h: Added.
396
397 2009-04-02  Michael Nordman  <michaeln@google.com>
398
399         Reviewed by Darin Fisher.
400
401         Chromium's ResourceRequest and ResourceResponse structs need some new data members.
402         https://bugs.webkit.org/show_bug.cgi?id=24897
403
404         These fields are needed to facilitate Chromium's implementation of the HTML5
405         ApplicationCache feature. We need to know what frame (or context) is doing the
406         requesting, and from what cache the resulting resource was retrieved.
407
408         No change in functionality, so no tests.
409
410         * platform/network/chromium/ResourceRequest.h:
411         (WebCore::ResourceRequest::ResourceRequest):
412         (WebCore::ResourceRequest::appCacheContextID):
413         (WebCore::ResourceRequest::setAppCacheContextID):
414         * platform/network/chromium/ResourceResponse.h:
415         (WebCore::ResourceResponse::ResourceResponse):
416         (WebCore::ResourceResponse::getAppCacheID):
417         (WebCore::ResourceResponse::setAppCacheID):
418
419 2009-04-02  David Hyatt  <hyatt@apple.com>
420
421         Reviewed by Darin Adler
422
423         Fix for https://bugs.webkit.org/show_bug.cgi?id=24643.
424         
425         Make sure images just ignore HTTP error codes and keep loading anyway.  Only <object> checks http error codes and falls back.  Everyone
426         else just ignores it and displays the image anyway.
427
428         Added http/tests/misc/image-error.html
429
430         * html/HTMLImageLoader.cpp:
431         (WebCore::HTMLImageLoader::notifyFinished):
432         * loader/CachedImage.cpp:
433         (WebCore::CachedImage::CachedImage):
434         * loader/CachedImage.h:
435         (WebCore::CachedImage::httpStatusCodeError):
436         (WebCore::CachedImage::httpStatusCodeErrorOccurred):
437         * loader/CachedResource.h:
438         (WebCore::CachedResource::httpStatusCodeError):
439         * loader/loader.cpp:
440         (WebCore::Loader::Host::didReceiveData):
441
442 2009-04-02  Jian Li  <jianli@chromium.org>
443
444         Reviewed by Dimitri Glazkov.
445
446         Add XHR constructor in WorkerContext.idl for V8 bindings.
447         https://bugs.webkit.org/show_bug.cgi?id=24962
448
449         * workers/WorkerContext.idl:
450
451 2009-04-02  Ben Murdoch  <benm@google.com>
452
453         Fix Bug 19743: Release build fails on 32-bit Windows
454
455         <https://bugs.webkit.org/show_bug.cgi?id=19743>
456
457         Combines all the HTML element cpp files into one to help reduce the
458         size of WebCore.lib so we can build in release mode on 32bit Windows.
459
460         Reviewed by Adam Roben.
461
462         * WebCore.vcproj/WebCore.vcproj: Excluded all the separate
463         HTML*Element.cpp files from the build. Added HTMLElementsAllInOne.cpp
464         to the build.
465         * html/HTMLElementsAllInOne.cpp: Added.
466
467 2009-04-02  Simon Fraser  <simon.fraser@apple.com>
468
469         Reviewed by Darin Adler
470
471         https://bugs.webkit.org/show_bug.cgi?id=24999
472         
473         Optimize hit testing with transforms.
474
475         * rendering/RenderBox.cpp:
476         (WebCore::RenderBox::mapLocalToContainer):
477         (WebCore::RenderBox::mapAbsoluteToLocalPoint):
478         getTransformFromContainer() change to return the matrix by reference.
479
480         * rendering/RenderLayer.cpp:
481         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
482         The method failed to set m_3DTransformedDescendantStatusDirty to false,
483         so did the work every time.
484
485         (WebCore::RenderLayer::createLocalTransformState):
486         Only call the expensive getTransformFromContainer() if there is a transform,
487         otherwise we just have a translation.
488
489         * rendering/RenderObject.cpp:
490         (WebCore::RenderObject::getTransformFromContainer):
491         * rendering/RenderObject.h:
492         Change transformFromContainer() to getTransformFromContainer(), and return
493         the matrix by reference to reduce copying.
494         New enum values for arguments for readability.
495
496         * rendering/TransformState.cpp:
497         (WebCore::TransformState::move):
498         (WebCore::TransformState::applyTransform):
499         (WebCore::HitTestingTransformState::translate):
500         New method that adds a translation to the accumulated matrix, optionally
501         without flattening. Cheaper than applyTransform().
502
503         (WebCore::HitTestingTransformState::applyTransform):
504         (WebCore::HitTestingTransformState::flatten):
505         (WebCore::HitTestingTransformState::flattenWithTransform):
506         Add flattenWithTransform(), which is a helper that allows us to
507         avoid doing the inverse() twice.
508
509         * rendering/TransformState.h:
510         (WebCore::TransformState::):
511         (WebCore::TransformState::move):
512         (WebCore::HitTestingTransformState::):
513         New method on HitTestingTransformState that adds a translation to the
514         accumulated matrix, optionally without flattening. Cheaper than applyTransform().
515         New enum values for arguments for readability.
516
517 2009-04-02  Simon Fraser  <simon.fraser@apple.com>
518
519         Reviewed by Dan Bernstein
520         
521         https://bugs.webkit.org/show_bug.cgi?id=24648
522         
523         Optimize common code paths in TransformationMatrix.
524
525         * platform/graphics/transforms/TransformationMatrix.cpp:
526         (WebCore::TransformationMatrix::translate):
527         (WebCore::TransformationMatrix::translate3d):
528         Optimize to avoid matrix copy.
529         
530         (WebCore::TransformationMatrix::isInvertible):
531         Test for identity and translation matrices before computing
532         the determinant.
533         
534         (WebCore::TransformationMatrix::inverse):
535         Optimize for identity matrix and translations.
536         
537         * platform/graphics/transforms/TransformationMatrix.h:
538         (WebCore::TransformationMatrix::isIdentityOrTranslation):
539         Utility method.
540
541 2009-04-02  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
542
543         Reviewed by Alexey Proskuryakov.
544
545         https://bugs.webkit.org/show_bug.cgi?id=24930
546         [Gtk] ISO files content is displayed inside the webview instead of being downloaded
547
548         Also sniff content of types declared as text/plain. This is
549         justified by the fact that it is common to have Apache HTTP
550         servers configured to send text/plain as Content-Type by default.
551
552         * platform/network/soup/ResourceHandleSoup.cpp:
553         (WebCore::gotHeadersCallback):
554
555 2009-04-02  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
556
557         Reviewed by Alexey Proskuryakov.
558
559         Protect the handle when notifying the client that the response was
560         received also in gotChunkCallback, or we crash in didReceiveData
561         when the load is cancelled in didReceiveResponse.
562
563         * platform/network/soup/ResourceHandleSoup.cpp:
564         (WebCore::gotChunkCallback):
565
566 2009-04-02  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
567
568         Reviewed by Alexey Proskuryakov.
569
570         https://bugs.webkit.org/show_bug.cgi?id=25001
571         Crash when content type parameters have no value
572
573         Handle the case where a Content-Type header parameter has no
574         value (i.e. no = character), to work-around a bug in libsoup.
575
576         * platform/network/soup/ResourceHandleSoup.cpp:
577         (WebCore::fillResponseFromMessage):
578
579 2009-04-02  Yael Aharon  <yael.aharon@nokia.com>
580
581         Reviewed by Simon Hausmann.
582
583         https://bugs.webkit.org/show_bug.cgi?id=24490
584
585         Enable web workers in Qt.
586
587         * WebCore.pro:
588
589 2009-04-01  Alexey Proskuryakov  <ap@webkit.org>
590
591         Reviewed by Darin Adler. Based on work of Julien Chaffraix.
592
593         https://bugs.webkit.org/show_bug.cgi?id=22475
594         REGRESSION: Async XMLHttpRequest never finishes on nonexistent files anymore
595
596         https://bugs.webkit.org/show_bug.cgi?id=24886
597         XHR requests opened when offline never return
598
599         Tests: fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
600                http/tests/xmlhttprequest/state-after-network-error.html
601
602         * xml/XMLHttpRequest.cpp:
603         (WebCore::XMLHttpRequest::callReadyStateChangeListener): Only dispatch load event if this
604         wasn't an error.
605         (WebCore::XMLHttpRequest::abort): Fixed formatting.
606         (WebCore::XMLHttpRequest::genericError): Change state to DONE and dispatch readystatechange.
607         The comment saying that this doesn't match Firefox was added in r33559 without explanation
608         or tests, and I don't think that it's accurate. Also, Firefox and Safari 3 both change state
609         to HEADERS_RECEIVED before DONE on error - this doesn't match the spec, and I doubt
610         that any code depends on this, so I went with the spec here.
611
612 2009-04-01  Steve Falkenburg  <sfalken@apple.com>
613
614         https://bugs.webkit.org/show_bug.cgi?id=24997
615         Race conditions in icon database threading code
616         
617         m_syncThreadRunning set was mistakenly eliminated in r27717.
618         This reintroduces it.
619
620         Reviewed by Oliver Hunt.
621
622         * loader/icon/IconDatabase.cpp:
623         (WebCore::IconDatabase::open): Set m_syncThreadRunning.
624
625 2009-04-01  Antti Koivisto  <antti@apple.com>
626
627         Reviewed by Darin Adler.
628
629         <rdar://problem/6748609> Use ActiveDOMObject to suspend marquees
630         
631         Make marquees ActiveDOMObjects, get rid of the special suspension code.
632
633         * html/HTMLMarqueeElement.cpp:
634         (WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
635         (WebCore::HTMLMarqueeElement::canSuspend):
636         (WebCore::HTMLMarqueeElement::suspend):
637         (WebCore::HTMLMarqueeElement::resume):
638         * html/HTMLMarqueeElement.h:
639         * page/Frame.cpp:
640         (WebCore::Frame::clearTimers):
641         * rendering/RenderLayer.cpp:
642         * rendering/RenderLayer.h:
643         (WebCore::RenderLayer::marquee):
644
645 2009-04-01  Dean Jackson  <dino@apple.com>
646
647         Reviewed by Darin Adler
648
649         Make constant values static in previous commit, as suggested
650         by Darin.
651
652         * rendering/RenderVideo.cpp:
653
654 2009-04-01  Dean Jackson  <dino@apple.com>
655
656         Reviewed by Simon Fraser
657
658         https://bugs.webkit.org/show_bug.cgi?id=24993
659
660         Standalone media should have a smaller instrinsic
661         height.
662
663         * rendering/RenderVideo.cpp:
664         (WebCore::RenderVideo::RenderVideo):
665
666 2009-04-01  Darin Adler  <darin@apple.com>
667
668         Reviewed by Geoff Garen.
669
670         Bug 22378: Crash submitting a form when parsing an XHTML document
671         https://bugs.webkit.org/show_bug.cgi?id=22378
672         rdar://problem/6388377
673
674         Tests: fast/loader/submit-form-while-parsing-1.xhtml
675                fast/loader/submit-form-while-parsing-2.html
676
677         * WebCore.base.exp: Updated.
678
679         * history/HistoryItem.cpp:
680         (WebCore::HistoryItem::HistoryItem): Renamed m_subItems to m_children.
681         Used uncheckedAppend because we reserveInitialCapacity.
682         (WebCore::HistoryItem::addChildItem): Renamed m_subItems to m_children.
683         Added an assertion that this is only used to add items that don't have
684         duplicate frame names.
685         (WebCore::HistoryItem::setChildItem): Added. Replaces an existing item
686         if any, preserving the isTargetItem flag.
687         (WebCore::HistoryItem::childItemWithTarget): Renamed from childItemWithName
688         for consistency with the other functions here that all call the frame name the
689         "target". Also updated for rename of m_subItems to m_children.
690         (WebCore::HistoryItem::findTargetItem): Renamed from recurseToFindTargetItem.
691         Removed unneeded size check.
692         (WebCore::HistoryItem::targetItem): Changed to always return the top item
693         if no item has the isTargetItem flag set. The old version would instead return
694         0 in some cases, but return the top item if it had no children.
695         (WebCore::HistoryItem::children): Renamed m_subItems to m_children.
696         (WebCore::HistoryItem::hasChildren): Ditto.
697         (WebCore::HistoryItem::showTreeWithIndent): Ditto.
698
699         * history/HistoryItem.h: Name changes.
700
701         * html/HTMLFormElement.cpp:
702         (WebCore::HTMLFormElement::submit): Create and pass a FormState instead of
703         attaching "recorded form values" and "form about to be submitted" to the frame
704         loader. Parameter work fine for this; there's no need to store state on the
705         FrameLoader.
706
707         * loader/FormState.cpp:
708         (WebCore::FormState::FormState): Adopt a vector instead of copying a hash map.
709         (WebCore::FormState::create): Ditto.
710         * loader/FormState.h: Update to use a vector that we adopt instead of hash map
711         that we copy for auto-fill text field values.
712
713         * loader/FrameLoader.cpp:
714         (WebCore::ScheduledRedirection::ScheduledRedirection): Added a new case for
715         form submissions and turned the "wasDuringLoad" state into a separate boolean
716         instead of using a special redirection type to track it.
717         (WebCore::FrameLoader::createWindow): Updated for name and argument change of
718         loadFrameRequest.
719         (WebCore::FrameLoader::urlSelected): Ditto.
720         (WebCore::FrameLoader::submitForm): Removed the "deferred form submission"
721         machinery, replacing it with the "scheduled redirection" mechanism, shared
722         with other kinds of redirection and navigation. Moved frame targeting here
723         so we can schedule the redirection on the right frame. Moved the multiple
724         form submission protection here. Moved the code to implement the rule that
725         m_navigationDuringLoad was used for here too.
726         (WebCore::FrameLoader::didOpenURL): Use the new wasDuringLoad flag instead
727         of the locationChangeDuringLoad type to detect location change during a load.
728         (WebCore::FrameLoader::executeScript): Removed call to now-obsolete function,
729         submitFormAgain.
730         (WebCore::FrameLoader::scheduleLocationChange): Moved the code to stop loading
731         out of this function into scheduleRedirection, so it can be shared with the
732         new scheduleFormSubmission function.
733         (WebCore::FrameLoader::scheduleFormSubmission): Added. Almost the same as
734         scheduleLocationChange, but with the arguments for a form submission.
735         (WebCore::FrameLoader::scheduleRefresh): Updated for the change to the
736         duringLoad flag.
737         (WebCore::FrameLoader::isLocationChange): Added case for formSubmission
738         and removed case for locationChangeDuringLoad.
739         (WebCore::FrameLoader::redirectionTimerFired): Ditto. Also removed unneeded
740         completeURL call and just use KURL constructor to match the other cases.
741         (WebCore::FrameLoader::provisionalLoadStarted): Removed the code to set up
742         the m_navigationDuringLoad, which is no longer needed. The new version of
743         this is in the submitForm function and sets the lockHistory boolean.
744         (WebCore::FrameLoader::scheduleRedirection): Moved the code to stop a load
745         in here that used to be in scheduleLocationChange.
746         (WebCore::FrameLoader::startRedirectionTimer): Added case for formSubmission
747         and removed case for locationChangeDuringLoad.
748         (WebCore::FrameLoader::stopRedirectionTimer): Ditto.
749         (WebCore::FrameLoader::completed): Removed call to now-obsolete function,
750         submitFormAgain.
751         (WebCore::FrameLoader::loadFrameRequest): Renamed from
752         loadFrameRequestWithFormAndValues. Replaced form element and form values
753         argument with a single FormState argument. Changed frame targeting code
754         to use the source frame in the case of a form submission to better match
755         the actual target frame.
756         (WebCore::FrameLoader::loadURL): Don't search for existing frames in the
757         form submission case since we already did that in the submitForm function.
758         (WebCore::FrameLoader::clientRedirected): Changed to work with the
759         m_isExecutingJavaScriptFormAction data member directly instead of taking
760         it as a function parameter.
761         (WebCore::FrameLoader::loadPostRequest): Don't search for existing frames
762         in the form submission case since we already did that in the submitForm
763         function.
764         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Moved comment
765         in here that was misplaced elsewhere in the file.
766         (WebCore::FrameLoader::findFrameForNavigation): Changed to use the early
767         return idiom.
768         (WebCore::FrameLoader::recursiveGoToItem): Updated for HistoryItem changes.
769         (WebCore::FrameLoader::childFramesMatchItem): Ditto.
770         (WebCore::FrameLoader::updateHistoryForStandardLoad): Removed the
771         m_navigationDuringLoad logic; that's now handled by setting lockHistory
772         to true in the submitForm function.
773         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedBackForwardList):
774         Use the new setChildItem function so we don't get multiple items for the
775         same frame name in the history item tree in the back/forward list.
776
777         * loader/FrameLoader.h: Renamed loadFrameRequestWithFormAndValues to
778         loadFrameRequest and made it take a form state object instead of the
779         form element and form values. Removed the unused functions
780         loadEmptyDocumentSynchronously, provisionalDocumentLoader,
781         notifyIconChnaged, and updateBaseURLForEmptyDocument. Changed the
782         submitForm function to take a form state argument. Eliminated the
783         clearRecordedFormValues, setFormAboutToBeSubmitted, and recordFormValue
784         functions, which are replaced by the form state arguments to submitForm
785         and loadFrameRequest. Removed the isJavaScriptFormAction argument from
786         the clientRedirected function; instead it looks at a data member directly.
787         Eliminated the submitFormAgain and overload of the submitForm function;
788         these are now subsumed into the remaining submitForm function and the
789         scheduleFormSubmission function. Removed unused and obsolete data
790         members m_navigationDuringLoad, m_deferredFormSubmission,
791         m_formAboutToBeSubmitted and m_formValuesAboutToBeSubmitted.
792
793         * page/ContextMenuController.cpp:
794         (WebCore::ContextMenuController::contextMenuItemSelected):
795         Updated for name and argument change of loadFrameRequest.
796
797         * page/Frame.cpp:
798         (WebCore::Frame::~Frame): Removed call to the now-unneeded
799         clearRecordedFormValues function.
800
801 2009-04-01  Dimitri Glazkov  <dglazkov@chromium.org>
802
803         Unreviewed, fixing previous commit.
804
805         https://bugs.webkit.org/show_bug.cgi?id=24994
806         Revert V8DOMMap.cpp change which accidentally snuck into the previous
807         commit.
808
809         * bindings/v8/V8DOMMap.cpp: Revert change in previous commit.
810
811 2009-04-01  Dimitri Glazkov  <dglazkov@chromium.org>
812
813         Reviewed by Darin Fisher.
814
815         https://bugs.webkit.org/show_bug.cgi?id=24994
816         Fix miscellaneous merge/upstreaming divergencies in Chromium port.
817
818         * bindings/v8/V8Collection.h: Added an include.
819         * platform/KURLGoogle.cpp:
820         (WebCore::KURL::baseAsString): Added to match KURL.cpp.
821         * platform/chromium/ClipboardChromium.cpp: Added an include.
822
823 2009-04-01  Dimitri Glazkov  <dglazkov@chromium.org>
824
825         Reviewed by Timothy Hatcher.
826
827         https://bugs.webkit.org/show_bug.cgi?id=24989
828         Refactor InspectorResource to use ScriptObject/FunctionCall.
829
830         * bindings/js/JSInspectorControllerCustom.cpp:
831         (WebCore::JSInspectorController::addResourceSourceToFrame): Tweaked to use
832             a more appropriate type conversion.
833         (WebCore::JSInspectorController::getResourceDocumentNode): Tweaked to
834             accommodate for InspectorResource refactoring.
835         * bindings/js/ScriptFunctionCall.cpp:
836         (WebCore::ScriptFunctionCall::appendArgument): Added long long type to match
837             existing jsNumber call signature.
838         * bindings/js/ScriptFunctionCall.h: Declaration for above.
839         * bindings/js/ScriptObject.cpp:
840         (WebCore::createEmptyObject): Added.
841         (WebCore::ScriptObject::ScriptObject):
842         (WebCore::ScriptObject::set): Added a bunch of property setters.
843         * bindings/js/ScriptObject.h: Declarations for above.
844         * inspector/InspectorController.cpp: Moved all InspectorResource-managing code
845             to InspectorResource.cpp
846         (WebCore::InspectorController::populateScriptObjects): Changed to use
847             refactored InspectorResource.
848         (WebCore::InspectorController::resetScriptObjects): Ditto.
849         (WebCore::InspectorController::pruneResources): Ditto.
850         (WebCore::InspectorController::didCommitLoad): Ditto.
851         (WebCore::InspectorController::addResource): Ditto.
852         (WebCore::InspectorController::removeResource): Ditto.
853         (WebCore::InspectorController::didLoadResourceFromMemoryCache): Ditto.
854         (WebCore::InspectorController::identifierForInitialRequest): Ditto.
855         (WebCore::InspectorController::willSendRequest): Ditto.
856         (WebCore::InspectorController::didReceiveResponse): Ditto.
857         (WebCore::InspectorController::didReceiveContentLength): Ditto.
858         (WebCore::InspectorController::didFinishLoading): Ditto.
859         (WebCore::InspectorController::didFailLoading): Ditto,
860         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest): Ditto.
861         (WebCore::InspectorController::scriptImported): Ditto.
862         * inspector/InspectorController.h: Removed InspectorResource-managing code decls
863             and tweaked some signatures to use ScriptString and long long for identifier.
864         * inspector/InspectorController.idl: Changed to use long long for identifier.
865         * inspector/InspectorResource.cpp: Refactored to use ScriptObject/FunctionCall.
866         (WebCore::InspectorResource::InspectorResource): Ditto.
867         (WebCore::InspectorResource::~InspectorResource): Ditto.
868         (WebCore::InspectorResource::createCached): Added.
869         (WebCore::InspectorResource::updateRequest): Added.
870         (WebCore::InspectorResource::updateResponse): Added.
871         (WebCore::createHeadersObject): Added.
872         (WebCore::InspectorResource::createScriptObject): Added.
873         (WebCore::InspectorResource::updateScriptObject): Added.
874         (WebCore::InspectorResource::releaseScriptObject): Added.
875         (WebCore::InspectorResource::type): Tweaked to use ScriptString.
876         (WebCore::InspectorResource::setXMLHttpResponseText): Added.
877         (WebCore::InspectorResource::sourceString): Tweaked to use ScriptString.
878         (WebCore::InspectorResource::startTiming): Added.
879         (WebCore::InspectorResource::markResponseReceivedTime): Added.
880         (WebCore::InspectorResource::endTiming): Added.
881         (WebCore::InspectorResource::markFailed): Added.
882         (WebCore::InspectorResource::addLength): Added.
883         * inspector/InspectorResource.h: Added decls for newly refactored-in methods.
884         (WebCore::InspectorResource::create): Added.
885         (WebCore::InspectorResource::isSameLoader): Added.
886         (WebCore::InspectorResource::markMainResource): Added.
887         (WebCore::InspectorResource::identifier): Added.
888         (WebCore::InspectorResource::requestURL): Added.
889         (WebCore::InspectorResource::frame): Added.
890         (WebCore::InspectorResource::mimeType): Added.
891         (WebCore::InspectorResource::Changes::Changes): Added new class to track
892             resource changes.
893         (WebCore::InspectorResource::Changes::hasChange): Added.
894         (WebCore::InspectorResource::Changes::set): Added.
895         (WebCore::InspectorResource::Changes::clear): Added.
896         (WebCore::InspectorResource::Changes::setAll): Added.
897         (WebCore::InspectorResource::Changes::clearAll): Added.
898
899 2009-04-01  Tony Chang  <tony@chromium.org>
900
901         Reviewed by Darin Fisher.
902
903         Ensure the right click doesn't deselect text under it.  This was
904         happening in the Chromium and GTK+ ports because they don't select
905         the text under the cursor on right click.
906         
907         This was regressed in r41715, https://bugs.webkit.org/show_bug.cgi?id=19737
908         
909         https://bugs.webkit.org/show_bug.cgi?id=24946
910
911         Test: fast/events/context-no-deselect.html
912
913         * page/EventHandler.cpp:
914         (WebCore::EventHandler::handleMouseReleaseEvent):
915
916 2009-04-01  Simon Fraser  <simon.fraser@apple.com>
917
918         Reviewed by Dave Hyatt
919
920         https://bugs.webkit.org/show_bug.cgi?id=24991
921         
922         Need to use toRenderBoxModelObject(), not toRenderBox(), to test for layer()
923         when getting the transform.
924         
925         * rendering/RenderObject.cpp:
926         (WebCore::RenderObject::transformFromContainer):
927
928 2009-03-31  Darin Adler  <darin@apple.com>
929
930         Rolled out that last change until I can investigate the regression test failures it seems
931         to have caused.
932
933         * dom/PositionIterator.cpp:
934         (WebCore::PositionIterator::decrement):
935         * dom/PositionIterator.h:
936         (WebCore::PositionIterator::PositionIterator):
937
938 2009-03-31  Darin Adler  <darin@apple.com>
939
940         Reviewed by Eric Seidel.
941
942         Bug 24621: PositionIterator doesn't iterate "after last child" positions when going backwards
943         https://bugs.webkit.org/show_bug.cgi?id=24621
944
945         * dom/PositionIterator.cpp:
946         (WebCore::PositionIterator::decrement): Make sure that when the parent has no children, we
947         don't ever use Position::uncheckedPreviousOffset. This is consistent with the forward
948         iterator, but also should never arise because of the fix below.
949         * dom/PositionIterator.h:
950         (WebCore::PositionIterator::PositionIterator): Fixed so m_offset will always be 0 when
951         the passed-in node has no children. Like the change above, this is consistent with the rest
952         of the class, although in the long run I think it's a bit strange to treat a <p> element
953         with no children differently than a <p> element with children.
954
955 2009-03-31  Eric Carlson  <eric.carlson@apple.com>
956
957         Reviewed by Simon Fraser.
958
959         https://bugs.webkit.org/show_bug.cgi?id=24965
960         Bug 24965: HTMLMediaElement: network state changes can be missed
961         
962         * html/HTMLMediaElement.cpp:
963         (WebCore::HTMLMediaElement::setNetworkState): Always update m_networkState when the
964         state changes, even when no event needs to be fired.
965
966 2009-03-31  Eric Carlson  <eric.carlson@apple.com>
967
968         Reviewed by Darin Adler.
969         
970         https://bugs.webkit.org/show_bug.cgi?id=24964
971         Bug 24964: HTMLMediaElement: 'waiting' event may fire twice
972
973         * html/HTMLMediaElement.cpp:
974         (WebCore::HTMLMediaElement::setReadyState): Only fire 'waiting' event once when ready state
975         drops below HAVE_FUTURE_DATA.
976
977 2009-03-31  Eric Carlson  <eric.carlson@apple.com>
978
979         Reviewed by Darin Adler.
980
981         https://bugs.webkit.org/show_bug.cgi?id=24846
982         Bug 24846: HTMLMediaElement should implement 'autobuffer' attribute
983
984         Add 'autobuffer' attrubute to media element. 'autobuffer' is a hint that
985         the author recommends downloading the entire resource optimistically, so the
986         attribute is made available to the media engine to use if it is able.
987
988         Test: media/video-dom-autobuffer.html
989
990         * html/HTMLAttributeNames.in: Add autobuffer.
991
992         * html/HTMLMediaElement.cpp:
993         (WebCore::HTMLMediaElement::parseMappedAttribute): New.
994         (WebCore::HTMLMediaElement::autobuffer): Ditto.
995         (WebCore::HTMLMediaElement::setAutobuffer): Ditto.
996
997         * html/HTMLMediaElement.h: Declare autobuffer and setAutobuffer.
998
999         * html/HTMLMediaElement.idl: Add autobuffer.
1000
1001         * platform/graphics/MediaPlayer.cpp:
1002         (WebCore::MediaPlayer::MediaPlayer): Initialize m_autobuffer.
1003         (WebCore::MediaPlayer::autobuffer): New.
1004         (WebCore::MediaPlayer::setAutobuffer): Ditto.
1005         * platform/graphics/MediaPlayer.h: Declare m_autobuffer, autobuffer and setAutobuffer
1006
1007         * platform/graphics/MediaPlayerPrivate.h:
1008         (WebCore::MediaPlayerPrivateInterface::setAutobuffer): Declare setAutobuffer.
1009
1010 2009-03-31  Craig Schlenter  <craig.schlenter@gmail.com>
1011
1012         Reviewed by Dimitri Glazkov.
1013
1014         https://bugs.webkit.org/show_bug.cgi?id=24550
1015         Check return value of vasprintf. This should keep gcc 4.3.3
1016         happy rather than have it complain about attribute warn_unused_result.
1017
1018         * dom/XMLTokenizerLibxml2.cpp:
1019         (WebCore::XMLTokenizer::error):
1020
1021 2009-03-31  Dean Jackson  <dino@apple.com>
1022
1023         Style guide violation!
1024
1025         * loader/MediaDocument.cpp:
1026         (WebCore::MediaDocument::defaultEventHandler):
1027
1028 2009-03-31  Dean Jackson  <dino@apple.com>
1029
1030         Fix Tiger build.
1031
1032         * loader/MediaDocument.cpp:
1033         (WebCore::MediaDocument::defaultEventHandler):
1034
1035 2009-03-31  Jian Li  <jianli@chromium.org>
1036
1037         Reviewed by Darin Fisher.
1038
1039         Upstream V8DOMMap for v8 bindings.
1040         https://bugs.webkit.org/show_bug.cgi?id=24951
1041
1042         * bindings/v8/V8DOMMap.cpp: Added.
1043         * bindings/v8/V8DOMMap.h: Added.
1044
1045 2009-03-31  Dean Jackson  <dino@apple.com>
1046
1047         Reviewed by Simon Fraser.
1048
1049         https://bugs.webkit.org/show_bug.cgi?id=24955
1050
1051         Spacebar didn't play/pause in standalone MediaDocument
1052
1053         * loader/MediaDocument.cpp:
1054         (WebCore::MediaDocument::defaultEventHandler):
1055
1056 2009-03-31  Alpha Lam  <hclam@chromium.org>
1057
1058         Reviewed by Eric Seidel.
1059
1060         https://bugs.webkit.org/show_bug.cgi?id=24901
1061         Added the following methods to MediaPlayerPrivate for Chromium port.
1062         void sizeChanged();
1063         void rateChanged();
1064         void durationChanged();
1065
1066         The above changes are to reflect changes in MediaPlayer.cpp.
1067         More details can be found in the original changeset.
1068         http://trac.webkit.org/changeset/41907
1069
1070         * platform/graphics/chromium/MediaPlayerPrivateChromium.h:
1071
1072 2009-03-31  Rafael Weinstein  <rafaelw@chromium.org>
1073
1074         Reviewed by Eric Seidel.
1075
1076         https://bugs.webkit.org/show_bug.cgi?id=24947
1077
1078         Special-case drawing text-shadow on win32, to let GDI draw in cases
1079         when both fill & shadow color are opaque and the shadow has no blur.
1080
1081         * platform/graphics/chromium/FontChromiumWin.cpp:
1082         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
1083         (WebCore::Font::drawComplexText):
1084         * platform/graphics/skia/SkiaFontWin.cpp:
1085         (WebCore::windowsCanHandleDrawTextShadow):
1086         (WebCore::windowsCanHandleTextDrawing):
1087         * platform/graphics/skia/SkiaFontWin.h:
1088
1089 2009-03-31  Jeremy Moskovich  <jeremy@chromium.org>
1090
1091         Reviewed by Darin Fisher.
1092
1093         r42055 removed some functions in FrameLoader used by Chrome,
1094         this CL backs out some of those changes to unbreak the Chrome build.
1095
1096         https://bugs.webkit.org/show_bug.cgi?id=24949
1097
1098         * WebCore.base.exp:
1099         * loader/FrameLoader.cpp:
1100         * loader/FrameLoader.h:
1101
1102 2009-03-31  Jeremy Moskovich  <jeremy@chromium.org>
1103
1104         Reviewed by Darin Adler.
1105
1106         Build fixes for Chromium.
1107
1108         https://bugs.webkit.org/show_bug.cgi?id=24945
1109
1110         * dom/Document.h:
1111         * platform/chromium/ClipboardChromium.cpp:
1112         (WebCore::imageToMarkup):
1113
1114 2009-03-31  Simon Hausmann  <simon.hausmann@nokia.com>
1115
1116         Fix the Qt build.
1117
1118         * dom/XMLTokenizerQt.cpp:
1119         (WebCore::XMLTokenizer::XMLTokenizer): Use NamedNodeMap instead of NamedAttrMap.
1120
1121 2009-03-30  Steve Falkenburg  <sfalken@apple.com>
1122
1123         Don't create CFDataRef with a fixed size.
1124         Fixes synchronous XMLHTTPRequests on Windows.
1125         
1126         Reviewed by Ada Chan.
1127
1128         * platform/network/cf/ResourceHandleCFNet.cpp:
1129         (WebCore::WebCoreSynchronousLoader::didReceiveData):
1130
1131 2009-03-30  Darin Adler  <darin@apple.com>
1132
1133         Reviewed by Sam Weinig.
1134
1135         Bug 24594: PolicyDelegate NavigationAction is WebNavigationTypeOther instead of WebNavigationTypeReload
1136         https://bugs.webkit.org/show_bug.cgi?id=24594
1137         rdar://problem/6682110
1138
1139         Test: fast/loader/reload-policy-delegate.html
1140
1141         * loader/FrameLoader.cpp:
1142         (WebCore::FrameLoader::loadWithDocumentLoader): Set the triggering action here where we know it's
1143         the policy loader and can use m_policyLoadType rather than letting it get set inside
1144         checkNavigationPolicy.
1145
1146 2009-03-30  Timothy Hatcher  <timothy@apple.com>
1147
1148         <rdar://problem/5838871> CrashTracer: 1483 crashes Quicklooking
1149         in Finder (painting without up to date layout)
1150
1151         Reviewed by Dan Bernstein.
1152
1153         * page/FrameView.cpp:
1154         (WebCore::FrameView::paintContents): Add an early return when
1155         painting is attempted when layout is needed.
1156
1157 2009-03-30  Greg Bolsinga  <bolsinga@apple.com>
1158
1159         Reviewed by Simon Fraser.
1160
1161         https://bugs.webkit.org/show_bug.cgi?id=24938
1162         
1163         Sort alphabetically.
1164
1165         * css/CSSComputedStyleDeclaration.cpp:
1166         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1167
1168 2009-03-30  Greg Bolsinga  <bolsinga@apple.com>
1169
1170         Reviewed by Simon Fraser.
1171
1172         https://bugs.webkit.org/show_bug.cgi?id=24938
1173         
1174         Build fixes for building --3d-rendering and --no-svg
1175
1176         * rendering/RenderLayerBacking.cpp:
1177
1178 2009-03-30  Greg Bolsinga  <bolsinga@apple.com>
1179
1180         Reviewed by Simon Fraser.
1181         
1182         https://bugs.webkit.org/show_bug.cgi?id=24938
1183
1184         Build fixes when building --no-svg
1185         
1186         * css/CSSComputedStyleDeclaration.cpp:
1187         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add missing CSS properties
1188         * css/CSSCursorImageValue.cpp:
1189         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): Handle unused param
1190         * css/CSSParser.cpp:
1191         (WebCore::CSSParser::parseValue): Add missing CSS properties
1192         * css/CSSStyleSelector.cpp:
1193         (WebCore::CSSStyleSelector::applyProperty): Add missing CSS properties
1194         * dom/Node.cpp:
1195         (WebCore::updateSVGElementInstancesAfterEventListenerChange): Handle unused param
1196         * platform/graphics/Font.cpp:
1197         (WebCore::Font::floatWidth): Handle unused param
1198         * platform/graphics/SimpleFontData.cpp:
1199         (WebCore::SimpleFontData::SimpleFontData): Handle unused param
1200
1201 2009-03-30  Darin Adler  <darin@apple.com>
1202
1203         Reviewed by Adam Roben.
1204
1205         Bug 24916: REGRESSION: NavigationAction policy dispatch broken
1206         https://bugs.webkit.org/show_bug.cgi?id=24916
1207
1208         * loader/FrameLoader.cpp:
1209         (WebCore::FrameLoader::loadURL): Rearrange the code so that the "event" PassRefPtr
1210         is not used twice. This also optimizes the case where a frame name is specified,
1211         but it's the name of the frame being loaded. Also called release in all the final
1212         uses of FormState.
1213
1214 2009-03-30  Darin Adler  <darin@apple.com>
1215
1216         Reviewed by Adam Roben.
1217
1218         Bug 24937: NamedNodeMap and NamedAttrMap should not be separate classes
1219         https://bugs.webkit.org/show_bug.cgi?id=24937
1220
1221         Also should fix the Windows COM bindings build.
1222
1223         * bindings/scripts/CodeGeneratorJS.pm: Removed special case for NamedNodeMap.
1224         * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
1225
1226         * dom/NamedAttrMap.h: Renamed class from NamedAttrMap to
1227         NamedNodeMap and removed NamedNodeMap base class. Made the NamedNodeMap
1228         functions all public and non-virtual. Removed virtualLength.
1229
1230         * dom/NamedNodeMap.h: Replaced file with just an include
1231         of NamedAttrMap.h. As a follow up we will rename the NamedAttrMap
1232         files and remove this file.
1233
1234         * bindings/js/JSNamedNodesCollection.cpp: Renamed from NamedAttrMap to NamedNodeMap.
1235         * dom/Attr.h: Ditto.
1236         * dom/Attribute.h: Ditto.
1237         * dom/Document.cpp:
1238         (WebCore::Document::importNode): Ditto.
1239         * dom/Element.cpp:
1240         (WebCore::Element::attributes): Ditto.
1241         (WebCore::Element::setAttributeMap): Ditto.
1242         (WebCore::Element::createAttributeMap): Ditto.
1243         (WebCore::Element::insertedIntoDocument): Ditto.
1244         (WebCore::Element::removedFromDocument): Ditto.
1245         (WebCore::Element::openTagStartToString): Ditto.
1246         (WebCore::Element::removeAttributeNode): Ditto.
1247         (WebCore::Element::getAttributeNode): Ditto.
1248         (WebCore::Element::getAttributeNodeNS): Ditto.
1249         (WebCore::Element::hasAttribute): Ditto.
1250         (WebCore::Element::hasAttributeNS): Ditto.
1251         (WebCore::Element::normalizeAttributes): Ditto.
1252         * dom/Element.h: Ditto.
1253         * dom/NamedAttrMap.cpp:
1254         (WebCore::NamedNodeMap::detachAttributesFromElement): Ditto.
1255         (WebCore::NamedNodeMap::~NamedNodeMap): Ditto.
1256         (WebCore::NamedNodeMap::isMappedAttributeMap): Ditto.
1257         (WebCore::NamedNodeMap::getNamedItem): Ditto.
1258         (WebCore::NamedNodeMap::getNamedItemNS): Ditto.
1259         (WebCore::NamedNodeMap::removeNamedItem): Ditto.
1260         (WebCore::NamedNodeMap::removeNamedItemNS): Ditto.
1261         (WebCore::NamedNodeMap::setNamedItem): Ditto.
1262         (WebCore::NamedNodeMap::item): Ditto.
1263         (WebCore::NamedNodeMap::getAttributeItem): Ditto.
1264         (WebCore::NamedNodeMap::clearAttributes): Ditto.
1265         (WebCore::NamedNodeMap::detachFromElement): Ditto.
1266         (WebCore::NamedNodeMap::setAttributes): Ditto.
1267         (WebCore::NamedNodeMap::addAttribute): Ditto.
1268         (WebCore::NamedNodeMap::removeAttribute): Ditto.
1269         (WebCore::NamedNodeMap::mapsEquivalent): Ditto.
1270         * dom/NamedMappedAttrMap.cpp:
1271         (WebCore::NamedMappedAttrMap::clearAttributes): Ditto.
1272         * dom/NamedMappedAttrMap.h:
1273         (WebCore::NamedMappedAttrMap::NamedMappedAttrMap): Ditto.
1274         * dom/Node.cpp:
1275         (WebCore::Node::dumpStatistics): Ditto.
1276         (WebCore::Node::isEqualNode): Ditto.
1277         (WebCore::Node::isDefaultNamespace): Ditto.
1278         (WebCore::Node::lookupNamespaceURI): Ditto.
1279         (WebCore::Node::lookupNamespacePrefix): Ditto.
1280         (WebCore::Node::compareDocumentPosition): Ditto.
1281         * dom/Node.h: Ditto.
1282         * dom/XMLTokenizerLibxml2.cpp:
1283         (WebCore::XMLTokenizer::XMLTokenizer): Ditto.
1284         * editing/ApplyStyleCommand.cpp:
1285         (WebCore::isSpanWithoutAttributesOrUnstyleStyleSpan): Ditto.
1286         (WebCore::isEmptyFontTag): Ditto.
1287         (WebCore::areIdenticalElements): Ditto.
1288         * editing/markup.cpp:
1289         (WebCore::appendStartMarkup): Ditto.
1290         (WebCore::completeURLs): Ditto.
1291         * html/HTMLParser.cpp:
1292         (WebCore::HTMLParser::handleError): Ditto.
1293         * rendering/RenderPartObject.cpp:
1294         (WebCore::RenderPartObject::updateWidget): Ditto.
1295         * svg/SVGAnimatedProperty.h:
1296         (WebCore::synchronizeProperty): Ditto.
1297         * xml/XPathFunctions.cpp:
1298         (WebCore::XPath::FunLang::evaluate): Ditto.
1299         * xml/XPathStep.cpp:
1300         (WebCore::XPath::Step::nodesInAxis): Ditto.
1301
1302 2009-03-30  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
1303
1304         Reviewed by Holger Freyther.
1305
1306         https://bugs.webkit.org/show_bug.cgi?id=24750
1307         [GTK] requests download instead of displaying page
1308
1309         Use soup facilities to append parameters to the content type, to
1310         make that more robust;
1311
1312         * platform/network/soup/ResourceHandleSoup.cpp:
1313         (WebCore::fillResponseFromMessage):
1314
1315 2009-03-30  David Kilzer  <ddkilzer@apple.com>
1316
1317         <rdar://problem/6735683> Move SECTORDER_FLAGS from Xcode project to WebCore.xcconfig
1318
1319         Reviewed by Timothy Hatcher, Mark Rowe and Darin Adler.
1320
1321         * Configurations/Base.xcconfig: Moved Production definition of
1322         SECTORDER_FLAGS to here from Xcode project file.
1323         * Configurations/DebugRelease.xcconfig: Override SECTORDER_FLAGS
1324         in Base.xcconfig to the empty string since it is not used for
1325         Debug and Release configurations.
1326         * WebCore.xcodeproj/project.pbxproj: Removed SECTORDER_FLAGS.
1327
1328 2009-03-30  Adam Roben  <aroben@apple.com>
1329
1330         Windows build fix after recent Node.idl changes
1331
1332         * bindings/scripts/CodeGeneratorCOM.pm: Touched this to force sources
1333         of classes that derive from Node to rebuild.
1334
1335 2009-03-30  Adam Roben  <aroben@apple.com>
1336
1337         Windows build fix
1338
1339         * svg/graphics/SVGImage.cpp: Added a missing #include.
1340
1341 2009-03-30  Mads Ager  <ager@chromium.org>
1342
1343         Reviewed by Darin Adler.
1344
1345         https://bugs.webkit.org/show_bug.cgi?id=24879
1346         Add frame accessor to Screen, Console, and BarInfo objects. Add type 
1347         accessor to BarInfo objects.
1348
1349         In the V8 JavaScript bindings, we need access to the frame and
1350         type for already created Screen, Console, and BarInfo objects in
1351         order to keep their wrappers alive across GCs.
1352
1353         * page/BarInfo.cpp:
1354         (WebCore::BarInfo::frame): Added.
1355         (WebCore::BarInfo::type): Added.
1356         * page/BarInfo.h:
1357         * page/Console.cpp:
1358         (WebCore::Console::frame): Added.
1359         * page/Console.h:
1360         * page/Screen.cpp:
1361         (WebCore::Screen::frame): Added.
1362         * page/Screen.h:
1363
1364 2009-03-29  Darin Adler  <darin@apple.com>
1365
1366         Requested by Antti Koivisto.
1367
1368         * loader/DocumentLoader.cpp:
1369         (WebCore::DocumentLoader::subresource): Tweaked code to be a little clearer and added
1370         a better comment.
1371
1372 2009-03-29  Darin Adler  <darin@apple.com>
1373
1374         Reviewed by Dan Bernstein.
1375
1376         Bug 23445: Copying certain hidden text causes a crash
1377         https://bugs.webkit.org/show_bug.cgi?id=23445
1378         rdar://problem/6512520
1379
1380         Test: editing/pasteboard/copy-display-none.html
1381
1382         * editing/markup.cpp:
1383         (WebCore::createMarkup): Added a check for the case where adjusting the start node moves
1384         the start of the selection past the end of the range entirely. If we try to iterate we'll
1385         never hit the end of the range and will probably crash iterating the rest of the document.
1386
1387 2009-03-29  Darin Adler  <darin@apple.com>
1388
1389         Reviewed by Dan Bernstein.
1390
1391         Bug 24672: ASSERTION FAILURE: !m_purgeableData in WebCore::CachedResource::data() saving a WebArchive
1392         https://bugs.webkit.org/show_bug.cgi?id=24672
1393         rdar://problem/6574263
1394
1395         I couldn't create a test case for this. In fact, the case in the bug doesn't exist any more,
1396         but there is an Apple-internal website I was able to use to reproduce and fix.
1397
1398         * loader/CachedResource.h: Made makePurgeable public.
1399         * loader/DocumentLoader.cpp:
1400         (WebCore::DocumentLoader::subresource): Call makePurgeable to make the resource non-purgeable
1401         so we can get its data if it hasn't yet been purged.
1402
1403 2009-03-29  Darin Adler  <darin@apple.com>
1404
1405         Fix build again.
1406
1407         * loader/EmptyClients.h: Fix typo in name of FormState.h.
1408
1409 2009-03-29  Darin Adler  <darin@apple.com>
1410
1411         Try to fix the release build.
1412
1413         * history/CachedPage.cpp: Make include unconditional, not debug-only.
1414
1415 2009-03-29  Greg Bolsinga  <bolsinga@apple.com>
1416
1417         Undo that last build fix, since it turned out the file wasn't deleted.
1418
1419         * WebCore.xcodeproj/project.pbxproj:
1420
1421 2009-03-29  Greg Bolsinga  <bolsinga@apple.com>
1422
1423         Fix build break by removing references to deleted header files.
1424
1425         * WebCore.xcodeproj/project.pbxproj:
1426
1427 2009-03-29  Darin Adler  <darin@apple.com>
1428
1429         Try to fix the Windows build.
1430
1431         * loader/EmptyClients.h: Added include of FormState.h.
1432         * loader/MainResourceLoader.cpp: Ditto.
1433
1434 2009-03-29  Dmitry Titov  <dimich@chromium.org>
1435
1436         Reviewed by Darin Adler.
1437
1438         https://bugs.webkit.org/show_bug.cgi?id=24926
1439         Fix Chromium build break.
1440
1441         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1442         (WebCore::CALLBACK_FUNC_DECL(DOMWindowShowModalDialog)): renamed 'features' into 'windowFeatures'.
1443
1444 2009-03-29  Darin Adler  <darin@apple.com>
1445
1446         Another attempt to fix the Qt build.
1447
1448         * WebCore.pro: Added CheckedRadioButtons.cpp.
1449
1450 2009-03-29  Darin Adler  <darin@apple.com>
1451
1452         Reviewed by Cameron Zwarich.
1453
1454         Bug 24921: remove include of HTMLFormElement.h from Document.h
1455         https://bugs.webkit.org/show_bug.cgi?id=24921
1456
1457         * GNUmakefile.am: Added CheckedRadioButtons source files.
1458         * WebCore.scons: Ditto.
1459         * WebCore.vcproj/WebCore.vcproj: Ditto.
1460         * WebCore.xcodeproj/project.pbxproj: Ditto.
1461         * WebCoreSources.bkl: Ditto.
1462
1463         * bindings/objc/PublicDOMInterfaces.h: Changed type of parentElement to Element.
1464
1465         * dom/CheckedRadioButtons.cpp: Copied from WebCore/html/HTMLFormElement.cpp.
1466         Removed all the code except for CheckedRadioButtons, and moved that out to be
1467         a namespace-level class instead of a member of HTMLFormElement.
1468
1469         * dom/CheckedRadioButtons.h: Copied from WebCore/html/HTMLFormElement.h.
1470         Removed all the code except for CheckedRadioButtons, and moved that out to be
1471         a namespace-level class instead of a member of HTMLFormElement.
1472
1473         * dom/Document.h: Removed unneeded includes, including HTMLFormElement.h.
1474         Added include of CheckedRadioButtons.h. Changed uses of CheckedRadioButtons
1475         class to use a namespace-level class instead of a member of HTMLFormElement.
1476
1477         * dom/Node.idl: Changed the type of parentElement from Node to Element for
1478         two reasons. 1) Node was incorrect, since parentElement returns an Element.
1479         2) The bindings won't compile any more unless they know parentElement's
1480         return value is an Element due to include changes.
1481
1482         * html/HTMLFormElement.cpp: Moved definitions of the functions in the
1483         CheckedRadioButtons class to the new CheckedRadioButtons.cpp.
1484
1485         * html/HTMLFormElement.h: Moved definition of the CheckedRadioButtons
1486         class to the new CheckedRadioButtons.h.
1487
1488         * html/HTMLInputElement.cpp:
1489         (WebCore::checkedRadioButtons): Changed use of CheckedRadioButtons
1490         class to use a namespace-level class instead of a member of HTMLFormElement.
1491
1492         * page/Chrome.cpp:
1493         (WebCore::Chrome::createWindow): Tweaked formatting.
1494
1495         * css/CSSGrammar.y: Added newly-needed include.
1496         * dom/Range.cpp: Ditto.
1497         * editing/BreakBlockquoteCommand.cpp: Ditto.
1498         * editing/CompositeEditCommand.cpp: Ditto.
1499         * editing/InsertLineBreakCommand.cpp: Ditto.
1500         * editing/ModifySelectionListLevel.cpp: Ditto.
1501         * editing/RemoveFormatCommand.cpp: Ditto.
1502         * editing/TextIterator.cpp: Ditto.
1503         * editing/VisiblePosition.cpp: Ditto.
1504         * loader/DocLoader.cpp: Ditto.
1505         * page/AccessibilityRenderObject.cpp: Ditto.
1506         * page/Page.cpp: Ditto.
1507         * rendering/RenderBlock.cpp: Ditto.
1508         * rendering/RenderLayer.cpp: Ditto.
1509         * rendering/RenderObject.h: Ditto.
1510         * storage/LocalStorageArea.cpp: Ditto.
1511         * storage/SessionStorageArea.cpp: Ditto.
1512
1513 2009-03-29  Darin Adler  <darin@apple.com>
1514
1515         Reviewed by Dan Bernstein.
1516
1517         <rdar://problem/6015407> attr parsing should allow only identifiers
1518
1519         Test: fast/css/attr-parsing.html
1520
1521         * css/CSSParser.cpp:
1522         (WebCore::CSSParser::parseContent): Allow only CSS_IDENT, and filter out
1523         identifiers that start with "-".
1524         * css/CSSPrimitiveValue.cpp:
1525         (WebCore::CSSPrimitiveValue::cssText): Added a case for CSS_ATTR so the test
1526         case works. This has the pleasant side effect of fixing a bug too.
1527
1528 2009-03-29  Alexey Proskuryakov  <ap@webkit.org>
1529
1530         <rdar://problem/6492712> Cross-origin redirects are not handled correctly.
1531
1532         Forgot to save the file after applying changes for review comments.
1533
1534         * platform/network/cf/ResourceHandleCFNet.cpp:
1535         (WebCore::willSendRequest):
1536         (WebCore::didReceiveResponse):
1537         (WebCore::didReceiveData):
1538         (WebCore::didSendBodyData):
1539         (WebCore::didFinishLoading):
1540         (WebCore::didFail):
1541         (WebCore::willCacheResponse):
1542         (WebCore::didReceiveChallenge):
1543         (WebCore::WebCoreSynchronousLoader::willSendRequest):
1544         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
1545         (WebCore::WebCoreSynchronousLoader::didReceiveData):
1546         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
1547         (WebCore::WebCoreSynchronousLoader::didFail):
1548         (WebCore::WebCoreSynchronousLoader::didReceiveChallenge):
1549
1550 2009-03-28  Alexey Proskuryakov  <ap@webkit.org>
1551
1552         Reviewed by Darin Adler.
1553
1554         <rdar://problem/6492712> Cross-origin redirects are not handled correctly.
1555
1556         Test: http/tests/xmlhttprequest/redirect-cross-origin-tripmine.html
1557
1558         * platform/network/cf/ResourceHandleCFNet.cpp:
1559         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
1560         (WebCore::ResourceHandle::loadResourceSynchronously):
1561         (WebCore::WebCoreSynchronousLoader::willSendRequest):
1562         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
1563         (WebCore::WebCoreSynchronousLoader::didReceiveData):
1564         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
1565         (WebCore::WebCoreSynchronousLoader::didFail):
1566         (WebCore::WebCoreSynchronousLoader::didReceiveChallenge):
1567         (WebCore::WebCoreSynchronousLoader::load):
1568         Match Mac behavior more closely - we shouldn't rely on underlying library handling of
1569         synchronous requests.
1570
1571         * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::willSendRequest):
1572         -[NSURLConnection cancel] doesn't fully cancel the connection if called from willSendRequest
1573         delegate method for a redirect.
1574
1575         * platform/network/mac/ResourceHandleMac.mm:
1576         (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]):
1577         Match async behavior more closely.
1578
1579 2009-03-28  Darin Adler  <darin@apple.com>
1580
1581         Reviewed by Mark Rowe.
1582
1583         Bug 24914: empty-string assertion crash when running storage tests
1584         https://bugs.webkit.org/show_bug.cgi?id=24914
1585
1586         * storage/Database.cpp:
1587         (WebCore::Database::performOpenAndVerify): Don't store empty version strings
1588         in the map, since empty strings are per-thread.
1589
1590 2009-03-28  Dmitry Titov  <dimich@chromium.org>
1591
1592         Reviewed by Dimitri Glazkov.
1593
1594         https://bugs.webkit.org/show_bug.cgi?id=24910
1595         Fixes for Chromium build.
1596
1597         * bindings/v8/V8LazyEventListener.h: renamed IsInline() into virtualIsInline()
1598         * bindings/v8/custom/V8CustomEventListener.h: ditto.
1599         * dom/EventListener.h: used #if USE(JSC) to fix the build on non-JSC platform.
1600
1601 2009-03-28  Dimitri Glazkov  <dglazkov@chromium.org>
1602
1603         Not reviewed, correcting landing error.
1604
1605         https://bugs.webkit.org/show_bug.cgi?id=24812
1606         Custom bindings should be in v8/custom, not v8.
1607
1608         * bindings/v8/V8HTMLDocumentCustom.cpp: Removed.
1609         * bindings/v8/custom/V8HTMLDocumentCustom.cpp: Moved from parent dir.
1610
1611 2009-03-28  Mike Belshe  <mike@belshe.com>
1612
1613         Reviewed by Dimitri Glazkov.
1614
1615         https://bugs.webkit.org/show_bug.cgi?id=24616
1616         Add V8 custom bindings for DOMWindow.
1617
1618         * bindings/v8/custom/V8DOMWindowCustom.cpp: Added.
1619
1620 2009-03-28  Mike Belshe  <mike@belshe.com>
1621
1622         Reviewed by Dimitri Glazkov.
1623
1624         https://bugs.webkit.org/show_bug.cgi?id=24812
1625         Add V8 custom bindings for HTMLDocument.
1626
1627         * bindings/v8/V8HTMLDocumentCustom.cpp: Added.
1628
1629 2009-03-27  Mark Rowe  <mrowe@apple.com>
1630
1631         Reviewed by Sam Weinig.
1632
1633         Fix two SVG test failures in 64-bit.
1634
1635         getSubStringLength's arguments were declared as unsigned in the IDL and as signed long in the implementation.
1636         This led to a value of -1 in JavaScript being converted to MAX_UINT in the bindings.  In 32-bit this was
1637         identical to -1 when interpeted as signed long, but in 64-bit it was still equal to MAX_UINT.
1638
1639         The solution for this is to use the IsIndex attribute on arguments that the SVG spec declares as "unsigned long"
1640         but requires an exception be thrown when a negative value is passed.  This results in the JS bindings handling the
1641         check for a negative value and lets the implementation treat the arguments purely as unsigned values.
1642
1643         * svg/SVGTextContentElement.cpp:
1644         (WebCore::SVGTextContentElement::getNumberOfChars):
1645         (WebCore::SVGTextContentElement::getSubStringLength):
1646         (WebCore::SVGTextContentElement::getStartPositionOfChar):
1647         (WebCore::SVGTextContentElement::getEndPositionOfChar):
1648         (WebCore::SVGTextContentElement::getExtentOfChar):
1649         (WebCore::SVGTextContentElement::getRotationOfChar):
1650         (WebCore::SVGTextContentElement::getCharNumAtPosition):
1651         (WebCore::SVGTextContentElement::selectSubString):
1652         * svg/SVGTextContentElement.h:
1653         * svg/SVGTextContentElement.idl:
1654
1655 2009-03-27  Darin Adler  <darin@apple.com>
1656
1657         Reviewed by Sam Weinig.
1658
1659         Get mailto code out of FrameLoader.
1660
1661         * html/HTMLFormElement.cpp:
1662         (WebCore::transferMailtoPostFormDataToURL): Added. Factored out the mailto
1663         logic so HTMLFormElement::submit isn't full of ugly bits. This includes the
1664         part of the logic that involves transformeing the URL that was previously
1665         inside FrameLoader.
1666         (WebCore::HTMLFormElement::submit): Call transferMailtoPostFormDataToURL and
1667         also release the data for slightly less refcount churn.
1668
1669         * loader/FrameLoader.cpp:
1670         (WebCore::FrameLoader::submitForm): Removed all the special casing for mailto,
1671         since HTMLFormElement now properly prepares both the URL and the form data.
1672
1673 2009-03-27  Dan Bernstein  <mitz@apple.com>
1674
1675         Reviewed by Mark Rowe.
1676
1677         - fix <rdar://problem/6724514> A bit of OpenTypeUtilities cleanup
1678
1679         * platform/graphics/chromium/FontCustomPlatformData.cpp:
1680         (WebCore::EOTStream::EOTStream): Changed to use EOTHeader.
1681         (WebCore::createFontCustomPlatformData): Ditto.
1682         * platform/graphics/opentype/OpenTypeUtilities.cpp:
1683         (WebCore::EOTHeader::EOTHeader): Added. Initializes the buffer size to
1684         the size of an EOTPrefix.
1685         (WebCore::EOTHeader::updateEOTSize): Added. Updates the size field in
1686         the prefix.
1687         (WebCore::EOTHeader::appendBigEndianString): Changed the static
1688         appendBigEndianStringToEOTHeader() into this member function.
1689         (WebCore::EOTHeader::appendPaddingShort): Added.
1690         (WebCore::getEOTHeader): Changed to use EOTHeader.
1691         * platform/graphics/opentype/OpenTypeUtilities.h:
1692         (WebCore::EOTHeader::size):
1693         (WebCore::EOTHeader::data):
1694         (WebCore::EOTHeader::prefix):
1695         * platform/graphics/win/FontCustomPlatformData.cpp:
1696         (WebCore::EOTStream::EOTStream): Changed to use EOTHeader.
1697         (WebCore::createFontCustomPlatformData): Ditto.
1698
1699 2009-03-27  Darin Adler  <darin@apple.com>
1700
1701         Reviewed by Sam Weinig.
1702
1703         To prepare for work on a form loading fix, remove some unused functions,
1704         consolidate some functions, and make many more functions private in
1705         FrameLoader.
1706
1707         * WebCore.base.exp: Remove some unused entry points, update another.
1708
1709         * dom/Document.cpp:
1710         (WebCore::Document::detach): Clear m_frame directly instead of using
1711         clearFramePointer.
1712         * dom/Document.h: Ditto.
1713
1714         * loader/FrameLoader.cpp:
1715         (WebCore::FrameLoader::urlSelected): Consolidate the two functions
1716         of this name into a single function. Also changed the event argument
1717         to be PassRefPtr<Event>.
1718         (WebCore::FrameLoader::submitForm): Changed the event argument to
1719         be PassRefPtr<Event>.
1720         (WebCore::FrameLoader::scheduleLocationChange): Call completeURL
1721         explicitly so we can remove the version of changeLocation that does
1722         completeURL for us.
1723         (WebCore::FrameLoader::redirectionTimerFired): Ditto.
1724         (WebCore::FrameLoader::loadURLIntoChildFrame): Set m_provisionalHistoryItem
1725         directly so we don't need a setProvisionalHistoryItem function.
1726         (WebCore::FrameLoader::canCachePageContainingThisFrame): Get at
1727         m_quickRedirectComing directly so we don't need a isQuickRedirectComing
1728         function.
1729         (WebCore::FrameLoader::logCanCacheFrameDecision): Ditto.
1730         (WebCore::FrameLoader::loadFrameRequestWithFormAndValues): Changed the
1731         event argument to be PassRefPtr<Event>.
1732         (WebCore::FrameLoader::loadURL): Move the logic of the continueLoadWithData
1733         function here because this is the only caller. If we want to make the
1734         resulting function smaller we should refactor some other way. Also
1735         streamlined the user-chosen encoding logic, but did not change what it does.
1736         (WebCore::FrameLoader::finishedLoadingDocument): Changed the event argument
1737         to be PassRefPtr<Event>.
1738         (WebCore::FrameLoader::loadPostRequest): Ditto.
1739         (WebCore::FrameLoader::receivedMainResourceError): Moved the logic from
1740         the didNotOpenURL function here, since this was the only caller.
1741
1742         * loader/FrameLoader.h: Removed include of FormState.h and used a forward
1743         declaration instead. Removed unneeded forward declation of Element.
1744         Moved many functions into the private section, and removed some other
1745         unused or uneeded functions.
1746
1747 2009-03-27  Xiaomei Ji  <xji@chromium.org>
1748
1749         Reviewed by Dan Bernstein.
1750
1751         Fix https://bugs.webkit.org/show_bug.cgi?id=24303
1752         Using keyboard select RTL text, Highlights goes to opposite direction from Firefox and IE.
1753
1754         Test: editing/selection/extend-selection.html
1755
1756         * editing/SelectionController.cpp:
1757         (WebCore::SelectionController::directionOfEnclosingBlock): Added
1758         (WebCore::SelectionController::modifyExtendingRight): Added. Currenctly 
1759         implemented for character and word granularity, all other granularities
1760         are treated as "forward".
1761         (WebCore::SelectionController::modifyExtendingForward): Renamed 
1762         modifyExtendingRightForward() to this.
1763         (WebCore::SelectionController::modifyExtendingLeft): Added. Currenctly
1764         implemented for character and word granularity, all other granularities
1765         are treated as "backward".
1766         (WebCore::SelectionController::modifyExtendingBackward): Renamed
1767         modifyExtendingLeftBackward() to this.
1768         (WebCore::SelectionController::modify): Change to call either the 
1769         left/right or backward/forward methods depending on the 'dir' argument
1770         for extends.
1771         * editing/SelectionController.h:
1772
1773 2009-03-27  John Abd-El-Malek  <jam@google.com>
1774
1775         Reviewed by Eric Seidel.
1776
1777         https://bugs.webkit.org/show_bug.cgi?id=24836
1778         Fix navigator.plugins.refresh(false) in Chromium.
1779
1780         * plugins/chromium/PluginDataChromium.cpp:
1781         (WebCore::PluginData::refresh):
1782
1783 2009-03-27  Timothy Hatcher  <timothy@apple.com>
1784
1785         Make scrollLeft, scrollTop, scrollWidth, and scrollHeight
1786         virtual to fix the broken layout tests from my last commit.
1787
1788         Reviewed by Mark Rowe.
1789
1790         * dom/Element.cpp:
1791         (WebCore::Element::scrollLeft):
1792         (WebCore::Element::scrollTop):
1793         (WebCore::Element::scrollWidth):
1794         (WebCore::Element::scrollHeight):
1795         * dom/Element.h:
1796         * html/HTMLBodyElement.h:
1797
1798 2009-03-27  Mark Rowe  <mrowe@apple.com>
1799
1800         Reviewed by Sam Weinig.
1801
1802         Fix <https://bugs.webkit.org/show_bug.cgi?id=24876>.
1803         Bug 24876: fast/forms/select-max-length.html times out in debug builds due to HTMLSelectElement::setLength being O(N^2)
1804
1805         * html/HTMLSelectElement.cpp:
1806         (WebCore::HTMLSelectElement::setLength): Repeatedly calling remove to remove elements causes us to recalculate the list
1807         items after each node is removed, leading to O(N^2) behaviour.  By inlining the batch removal in to setLength we can avoid
1808         this gratuitous recalcuation.
1809
1810 2009-03-27  Dirk Schulze  <krit@webkit.org>
1811
1812         Reviewed by Eric Seidel.
1813
1814         We don't support images for GtkCursors yet. We need a  placeholder to avoid crashes.
1815         I took crosshair to have a common behavior with firefox.
1816
1817         [GTK] SVG - Crash on setting the cursor icon
1818         https://bugs.webkit.org/show_bug.cgi?id=24565
1819
1820         * platform/gtk/CursorGtk.cpp:
1821         (WebCore::Cursor::Cursor):
1822
1823 2009-03-27  Timothy Hatcher  <timothy@apple.com>
1824
1825         Remove redundant attributes and functions from IDL files that have the
1826         same attributes and functions defined in the super class.
1827
1828         Reviewed by Simon Fraser.
1829
1830         * WebCore.xcodeproj/project.pbxproj: Remove DOMHTMLBodyElementPrivate.h.
1831         * bindings/objc/PublicDOMInterfaces.h: Remove focus and blur from DOMHTMLElement.
1832         * html/HTMLBodyElement.idl: Remove scrollLeft, scrollTop, scrollWidth
1833         and scrollHeight.
1834         * html/HTMLElement.idl: Remove blur and focus.
1835
1836 2009-03-27  Adam Roben  <aroben@apple.com>
1837
1838         Don't include substitute data URLs in global history redirect chains
1839
1840         <rdar://6690169>
1841
1842         Reviewed by Darin Adler.
1843
1844         This might be testable if:
1845           - support were added to DRT for providing substitute data on failed
1846             loads
1847           - support were added to DRT for dumping redirect chains
1848
1849         I tried doing the above and was still unable to make a test.
1850
1851         * loader/FrameLoader.cpp:
1852         (WebCore::FrameLoader::updateHistoryForStandardLoad):
1853         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedBackForwardList):
1854         Call updateGlobalHistoryRedirectLinks only if the load succeeded
1855         (i.e., there is no unreachableURL). Previous the FrameLoaderClient
1856         implementations were unconditionally calling
1857         updateGlobalHistoryRedirectLinks from within updateGlobalHistory.
1858
1859 2009-03-27  Peter Kasting  <pkasting@google.com>
1860
1861         Reviewed by Eric Seidel.
1862
1863         https://bugs.webkit.org/show_bug.cgi?id=24861
1864         Chromium port did not render decorations for <input type="search">.
1865         This copies RenderThemeWin.*.
1866
1867         * css/themeChromiumWin.css: Removed.
1868         * rendering/RenderThemeChromiumLinux.cpp:
1869         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
1870         (WebCore::RenderThemeChromiumLinux::adjustSearchFieldCancelButtonStyle):
1871         (WebCore::RenderThemeChromiumLinux::paintSearchFieldCancelButton):
1872         (WebCore::RenderThemeChromiumLinux::adjustSearchFieldDecorationStyle):
1873         (WebCore::RenderThemeChromiumLinux::adjustSearchFieldResultsDecorationStyle):
1874         (WebCore::RenderThemeChromiumLinux::paintSearchFieldResultsDecoration):
1875         (WebCore::RenderThemeChromiumLinux::adjustSearchFieldResultsButtonStyle):
1876         (WebCore::RenderThemeChromiumLinux::paintSearchFieldResultsButton):
1877         * rendering/RenderThemeChromiumLinux.h:
1878         (WebCore::RenderThemeChromiumLinux::paintSearchField):
1879         * rendering/RenderThemeChromiumWin.cpp:
1880         (WebCore::):
1881         (WebCore::RenderThemeChromiumWin::extraDefaultStyleSheet):
1882         (WebCore::RenderThemeChromiumWin::adjustSearchFieldCancelButtonStyle):
1883         (WebCore::RenderThemeChromiumWin::paintSearchFieldCancelButton):
1884         (WebCore::RenderThemeChromiumWin::adjustSearchFieldDecorationStyle):
1885         (WebCore::RenderThemeChromiumWin::adjustSearchFieldResultsDecorationStyle):
1886         (WebCore::RenderThemeChromiumWin::paintSearchFieldResultsDecoration):
1887         (WebCore::RenderThemeChromiumWin::adjustSearchFieldResultsButtonStyle):
1888         (WebCore::RenderThemeChromiumWin::paintSearchFieldResultsButton):
1889         * rendering/RenderThemeChromiumWin.h:
1890         (WebCore::RenderThemeChromiumWin::paintSearchField):
1891
1892 2009-03-27  David Hyatt  <hyatt@apple.com>
1893
1894         Reviewed by Simon Fraser
1895
1896         If an object has a self-painting layer, don't count it as part of a block's visual overflow.
1897         This fix has only been made for block-level children.   The inline-level case is still broken
1898         (and covered by an existing bug).
1899
1900         Added fast/block/positioning/negative-rel-position.html
1901
1902         * rendering/InlineFlowBox.cpp:
1903         (WebCore::InlineFlowBox::placeBoxesVertically):
1904         * rendering/RenderBlock.cpp:
1905         (WebCore::RenderBlock::layoutBlockChildren):
1906         (WebCore::RenderBlock::lowestPosition):
1907         (WebCore::RenderBlock::rightmostPosition):
1908         (WebCore::RenderBlock::leftmostPosition):
1909
1910 2009-03-27  Anders Carlsson  <andersca@apple.com>
1911
1912         Reviewed by Darin Adler.
1913
1914         <rdar://problem/6642221>
1915         REGRESSION: With the Movie widget, movie trailer fails to load if movie had been previously viewed
1916         
1917         Add a dashboard specific workaround so that we always create renderers for object elements, even if display:none is set.
1918         
1919         I've filed <rdar://problem/6731022> against the Movies widget.
1920         
1921         * html/HTMLObjectElement.cpp:
1922         (WebCore::HTMLObjectElement::rendererIsNeeded):
1923
1924 2009-03-25  Timothy Hatcher  <timothy@apple.com>
1925
1926         Expose new DOM methods as public Objective-C API.
1927
1928         <rdar://problem/5837350> Expose new DOM classes and methods
1929         as public API (match the additions to the JavaScript DOM)
1930
1931         Reviewed by Mark Rowe and Darin Adler.
1932
1933         * WebCore.xcodeproj/project.pbxproj:
1934         * bindings/objc/DOMHTML.h:
1935         * bindings/objc/DOMPrivate.h:
1936         * bindings/objc/PublicDOMInterfaces.h:
1937
1938 2009-03-27  Zack Rusin <zack@kde.org>
1939
1940         Reviewed by Simon Hausmann.
1941
1942         https://bugs.webkit.org/show_bug.cgi?id=24280
1943
1944         Fix propagation of fill rules when rendering paths in the Qt build.
1945
1946         * platform/graphics/qt/GraphicsContextQt.cpp:
1947         (WebCore::toQtFillRule):
1948         (WebCore::GraphicsContext::fillPath):
1949         (WebCore::GraphicsContext::strokePath):
1950
1951 2009-03-27  Zack Rusin <zack@kde.org>
1952
1953         Reviewed by Tor Arne Vestbø.
1954
1955         https://bugs.webkit.org/show_bug.cgi?id=24275
1956
1957         Fix text field theming in the Qt build with the KDE 4 Oxygen
1958         style by adjusting the size vertically and horizontally to
1959         set padding on the element equal to the width of the style painted border.
1960
1961         * platform/qt/RenderThemeQt.cpp:
1962         (WebCore::RenderThemeQt::RenderThemeQt):
1963         (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
1964         (WebCore::RenderThemeQt::adjustTextFieldStyle):
1965         (WebCore::RenderThemeQt::paintTextField):
1966         * platform/qt/RenderThemeQt.h:
1967
1968 2009-03-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1969
1970         Reviewed by Simon Hausmann.
1971
1972         https://bugs.webkit.org/show_bug.cgi?id=24852
1973         Build fix for GNU mode RVCT compilation
1974
1975         * html/PreloadScanner.cpp:
1976
1977 2009-03-27  Erik L. Bunce  <elbunce@xendom.com>
1978
1979         Reviewed by Simon Hausmann.
1980
1981         https://bugs.webkit.org/show_bug.cgi?id=24868
1982
1983         Make text of the writing direction items more user friendly.
1984
1985         * platform/qt/Localizations.cpp:
1986         (WebCore::contextMenuItemTagLeftToRight):
1987         (WebCore::contextMenuItemTagRightToLeft):
1988
1989 2009-03-27  Erik L. Bunce  <elbunce@xendom.com>
1990
1991         Reviewed by Simon Hausmann.
1992
1993         https://bugs.webkit.org/show_bug.cgi?id=24274
1994
1995         Fixed the Qt 4.4 Mac build with netscape plugins enabled.
1996
1997         * plugins/mac/PluginViewMac.cpp:
1998
1999 2009-03-26  Mark Rowe  <mrowe@apple.com>
2000
2001         Try and fix the Qt build.
2002
2003         * platform/text/TextEncodingDetectorNone.cpp:
2004         (WebCore::detectTextEncoding):
2005
2006 2009-03-26  Eric Carlson  <eric.carlson@apple.com>
2007
2008         Reviewed by Simon Fraser.
2009
2010         https://bugs.webkit.org/show_bug.cgi?id=24874
2011         24874: HTMLMediaElement: 'duration' defaults to NaN, deal with it
2012         
2013         The 'duration' attribute is NaN when no media is available, so the
2014         media element should take care when comparing with duration().
2015
2016         * html/HTMLMediaElement.cpp:
2017         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Don't compare with duration when
2018         it is NaN.
2019         (WebCore::HTMLMediaElement::endedPlayback): Ditto.
2020
2021 2009-03-26  Mark Rowe  <mrowe@apple.com>
2022
2023         Fix the build.
2024
2025         * platform/text/TextEncodingDetectorICU.cpp:
2026         * platform/text/TextEncodingDetectorNone.cpp:
2027
2028 2009-03-26  Jungshik Shin  <jshin@chromium.org>
2029
2030         Reviewed by Cameron Zwarich.
2031
2032         1. Fix the crash in setHintEncoding
2033         2. Fix build failures on Tiger and Qt.
2034         UnusedParam.h was not included by TextEncodingDetector{None,ICU}.cpp
2035         in the patch landed in r42023
2036         for http://bugs.webkit.org/show_bug.cgi?id=16482
2037
2038         * loader/TextResourceDecoder.h:
2039         (WebCore::TextResourceDecoder::setHintEncoding):
2040         * platform/text/TextEncodingDetectorICU.cpp:
2041         * platform/text/TextEncodingDetectorNone.cpp:
2042
2043 2009-03-26  Simon Fraser  <simon.fraser@apple.com>
2044
2045         Build fix when ACCELERATED_COMPOSITING is turned on.
2046
2047         * rendering/RenderLayerBacking.cpp:
2048         (WebCore::RenderLayerBacking::canUseDirectCompositing):
2049
2050 2009-03-26  Eric Seidel  <eric@webkit.org>
2051
2052         No additional review, committing previously reviewed files for build fix only.
2053
2054         Add files I missed when commiting Jungshik's patch in r42022.
2055         https://bugs.webkit.org/show_bug.cgi?id=16482
2056
2057         * icu/unicode/ucsdet.h: Added.
2058         * platform/text/TextEncodingDetector.h: Added.
2059         * platform/text/TextEncodingDetectorICU.cpp: Added.
2060         (WebCore::detectTextEncoding):
2061         * platform/text/TextEncodingDetectorNone.cpp: Added.
2062         (WebCore::detectTextEncoding):
2063
2064 2009-03-26  Jungshik Shin  <jshin@chromium.org>
2065
2066         Reviewed by Alexey Proskuryakov.
2067
2068         Add an encoding detector 'hook' to TextResourceDecoder.
2069          - add |usesEncodingDetector| to Settings. It's off by default.
2070          - add a new encoding source type |EncodingFromParent| 
2071            to distinguish cases when the encoding is inherited from
2072            the parent frame from cases when it's actually auto-detected.
2073          - add TextEncodingDetector* to platform/text. Currently,
2074            the only implementation uses ICU. Stub is added for 
2075            ports that do not use ICU and a build on Tiger. Mac OS 
2076            Tiger comes with ICU 3.2 that does not support encoding detector.
2077          - add ucsdet.h to icu/unicode for ports using ICU.
2078
2079         Layout tests will be added once bug 20534 is fixed and a WebPreference
2080         can be controlled in test_shell. With UsesEncodingDetector off, there
2081         is no change to test. 
2082
2083         http://bugs.webkit.org/show_bug.cgi?id=16482
2084
2085         * WebCore.vcproj/WebCore.vcproj:
2086         * WebCore.xcodeproj/project.pbxproj:
2087         * WebCore/GNUmakefile.am
2088         * WebCore/WebCore.pro
2089         * WebCore/WebCore.scons
2090         * WebCore/WebCoreSources.bkl
2091         * WebCore.base.exp
2092         * icu/unicode/ucsdet.h
2093         * loader/FrameLoader.cpp:
2094         (WebCore::FrameLoader::write): turn on/off encoding detector depending on Settings and set hintEncoding of TextResourceDecoder to the parent frame encoding if necessary and the security policy allows refering to the parent frame encoding.
2095         * loader/TextResourceDecoder.cpp:
2096         (WebCore::TextResourceDecoder::TextResourceDecoder):
2097         (WebCore::TextResourceDecoder::checkForCSSCharset): add check for EncodingFromParentFrame
2098         (WebCore::TextResourceDecoder::checkForHeadCharset): ditto
2099         (WebCore::TextResourceDecoder::shouldAutoDetect):
2100         (WebCore::TextResourceDecoder::decode): call encoding detector if shouldAutoDetect returns true.
2101         (WebCore::TextResourceDecoder::flush): if encoding is not determined by now, call encoding detector if shouldAutoDetect returns true.
2102         * loader/TextResourceDecoder.h:
2103         (WebCore::TextResourceDecoder::):
2104         (WebCore::TextResourceDecoder::create):
2105         (WebCore::TextResourceDecoder::setHintEncoding):
2106         (WebCore::TextResourceDecoder::source):
2107         * page/Settings.cpp: add m_usesEncodingDetector
2108         (WebCore::Settings::Settings):
2109         (WebCore::Settings::setUsesEncodingDetector):
2110         * page/Settings.h:
2111         (WebCore::Settings::usesEncodingDetector):
2112         * platform/text/TextEncodingDetector.h: Added.
2113         * platform/text/TextEncodingDetectorICU.cpp: Added.
2114         (WebCore::detectTextEncoding):
2115         * platform/text/TextEncodingDetectorNone.cpp: Added.
2116         (WebCore::detectTextEncoding):
2117
2118 2009-03-26  Darin Adler  <darin@apple.com>
2119
2120         Reviewed by Geoff Garen.
2121
2122         Removed code that casts EventListener down to derived classes
2123         without type checking. A crash could happen if you added event
2124         listeners with Objective-C and then manipulated the class with
2125         JavaScript.
2126
2127         * bindings/js/JSDOMApplicationCacheCustom.cpp:
2128         (WebCore::JSDOMApplicationCache::mark): Removed all the casts
2129         and used the markIfNotNull function and mark functions on
2130         EventListener instead.
2131         * bindings/js/JSMessagePortCustom.cpp:
2132         (WebCore::JSMessagePort::mark): Ditto.
2133         * bindings/js/JSWorkerContextCustom.cpp:
2134         (WebCore::JSWorkerContext::mark): Ditto.
2135         * bindings/js/JSWorkerCustom.cpp:
2136         (WebCore::JSWorker::mark): Ditto.
2137         * bindings/js/JSXMLHttpRequestCustom.cpp:
2138         (WebCore::JSXMLHttpRequest::mark): Ditto.
2139         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
2140         (WebCore::JSXMLHttpRequestUpload::mark): Ditto.
2141
2142         * bindings/js/JSEventListener.cpp:
2143         (WebCore::JSAbstractEventListener::handleEvent): Used function,
2144         the new name for what used to be called listenerObj.
2145         (WebCore::JSAbstractEventListener::virtualIsInline): Renamed since
2146         this doesn't need to be virtual for callers who have a pointer to
2147         this class, not the base class.
2148         (WebCore::JSEventListener::function): Renamed from listenerObj.
2149         (WebCore::JSProtectedEventListener::function): Ditto.
2150
2151         * bindings/js/JSEventListener.h: Removed unneeded forward class
2152         declarations. Made all virtual functions private since there's no
2153         need to call any of them on a particular derived class, only on
2154         EventListener. Explicitly declare JSEventListener::mark as virtual
2155         since it's now overriding a function in the EventListener base class.
2156         Made JSProtectedEventListener::m_globalObject protected so the
2157         JSLazyEventListener derived class can use it directly instead of using
2158         a virtual function to get the pointer.
2159
2160         * bindings/js/JSLazyEventListener.cpp:
2161         (WebCore::JSLazyEventListener::parseCode): Use m_globalObject instead
2162         of globalObject since the latter is a virtual function and there's no
2163         need to pay virtual function overhead.
2164         (WebCore::JSLazyEventListener::function): Renamed from listenerObj.
2165
2166         * bindings/js/JSLazyEventListener.h: Moved forward declaration of the
2167         Node class here from JSEventListener.h.
2168
2169         * bindings/scripts/CodeGeneratorJS.pm: Removed now-unneeded cast to
2170         JSEventListener when getting the script object from a listener.
2171
2172         * dom/EventListener.h: Added virtual function and mark functions
2173         so we can extract the JavaScript function object or mark a JavaScript
2174         event listener in a type safe manner.
2175
2176 2009-03-26  Peter Kasting  <pkasting@google.com>
2177
2178         Reviewed by Adele Peterson.
2179
2180         https://bugs.webkit.org/show_bug.cgi?id=24859
2181         Use CSS file instead of code to adjust search field styling.
2182
2183         * css/themeWin.css:
2184         * rendering/RenderThemeWin.cpp:
2185         * rendering/RenderThemeWin.h:
2186
2187 2009-03-26  Darin Adler  <darin@apple.com>
2188
2189         Reviewed by Geoff Garen.
2190
2191         Split JSLazyEventListener out into its own separate source file.
2192         We'll be removing JSAbstractEventListener and JSProtectedEventListener soon,
2193         so leave those in the same file with JSEventListener.
2194
2195         * GNUmakefile.am: Added JSLazyEventListener.
2196         * WebCore.pro: Ditto.
2197         * WebCore.scons: Ditto.
2198         * WebCore.vcproj/WebCore.vcproj: Ditto.
2199         * WebCore.xcodeproj/project.pbxproj: Ditto.
2200         * WebCoreSources.bkl: Ditto.
2201
2202         * bindings/js/JSEventListener.cpp: Removed the JSLazyEventListener part.
2203         Removed unneeded includes. Removed incorrect ASSERT_CLASS_FITS_IN_CELL, since
2204         JSAbstractEventListener is not derived from JSCell.
2205
2206         * bindings/js/JSEventListener.h: Removed the JSLazyEventListener part
2207         and the now-unneeded include of PlatformString.h.
2208
2209         * bindings/js/JSLazyEventListener.cpp: Copied from bindings/js/JSEventListener.cpp.
2210         Kept only the JSLazyEventListener part.
2211         (WebCore::eventParameterName): Made this have internal linkage by adding "static".
2212         Also moved the default case out of the switch statement so we will get a warning
2213         if we omit any cases in the future.
2214
2215         * bindings/js/JSLazyEventListener.h: Copied from bindings/js/JSEventListener.h.
2216         Kept only the JSLazyEventListener part.
2217
2218         * bindings/js/ScriptController.cpp: Removed unneeded includes and sorted the
2219         remanining ones. Include JSLazyEventListener.h instead of JSEventListener.h.
2220
2221 2009-03-26  Darin Adler  <darin@apple.com>
2222
2223         Reviewed by Geoff Garen.
2224
2225         Renamed JSUnprotectedEventListener to JSEventListener.
2226         And related renames.
2227
2228         Soon Geoff will make all JavaScript event listeners use mark instead
2229         of protect, so there's no need to emphasize "unprotected".
2230
2231         * bindings/js/JSDOMApplicationCacheCustom.cpp:
2232         (WebCore::JSDOMApplicationCache::mark):
2233         (WebCore::JSDOMApplicationCache::addEventListener):
2234         (WebCore::JSDOMApplicationCache::removeEventListener):
2235         * bindings/js/JSDOMGlobalObject.cpp:
2236         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
2237         (WebCore::JSDOMGlobalObject::findJSEventListener):
2238         (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
2239         (WebCore::JSDOMGlobalObject::jsEventListeners):
2240         (WebCore::JSDOMGlobalObject::jsInlineEventListeners):
2241         * bindings/js/JSDOMGlobalObject.h:
2242         * bindings/js/JSDOMWindowBase.h:
2243         * bindings/js/JSEventListener.cpp:
2244         (WebCore::JSEventListener::JSEventListener):
2245         (WebCore::JSEventListener::~JSEventListener):
2246         (WebCore::JSEventListener::listenerObj):
2247         (WebCore::JSEventListener::globalObject):
2248         (WebCore::JSEventListener::clearGlobalObject):
2249         (WebCore::JSEventListener::mark):
2250         * bindings/js/JSEventListener.h:
2251         (WebCore::JSEventListener::create):
2252         * bindings/js/JSMessagePortCustom.cpp:
2253         (WebCore::JSMessagePort::mark):
2254         (WebCore::JSMessagePort::addEventListener):
2255         (WebCore::JSMessagePort::removeEventListener):
2256         * bindings/js/JSWorkerContextCustom.cpp:
2257         (WebCore::JSWorkerContext::mark):
2258         (WebCore::JSWorkerContext::addEventListener):
2259         (WebCore::JSWorkerContext::removeEventListener):
2260         * bindings/js/JSWorkerCustom.cpp:
2261         (WebCore::JSWorker::mark):
2262         (WebCore::JSWorker::addEventListener):
2263         (WebCore::JSWorker::removeEventListener):
2264         * bindings/js/JSXMLHttpRequestCustom.cpp:
2265         (WebCore::JSXMLHttpRequest::mark):
2266         (WebCore::JSXMLHttpRequest::addEventListener):
2267         (WebCore::JSXMLHttpRequest::removeEventListener):
2268         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
2269         (WebCore::JSXMLHttpRequestUpload::mark):
2270         (WebCore::JSXMLHttpRequestUpload::addEventListener):
2271         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
2272         * bindings/scripts/CodeGeneratorJS.pm:
2273         All just renaming.
2274
2275 2009-03-26  Darin Adler  <darin@apple.com>
2276
2277         Reviewed by Geoff Garen.
2278
2279         Renamed JSEventListener to JSProtectedEventListener.
2280         And related renames.
2281
2282         Soon Geoff will make all JavaScript event listeners use mark instead
2283         of protect, and so this class will be be obsolete. We will rename
2284         JSUnrpotectedEventListener to JSEventListener in the next check-in,
2285         since that one will remain.
2286
2287         * bindings/js/JSDOMGlobalObject.cpp:
2288         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
2289         (WebCore::JSDOMGlobalObject::findJSProtectedEventListener):
2290         (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener):
2291         (WebCore::JSDOMGlobalObject::jsProtectedEventListeners):
2292         (WebCore::JSDOMGlobalObject::jsProtectedInlineEventListeners):
2293         * bindings/js/JSDOMGlobalObject.h:
2294         * bindings/js/JSDOMWindowBase.h:
2295         * bindings/js/JSDOMWindowCustom.cpp:
2296         (WebCore::JSDOMWindow::addEventListener):
2297         (WebCore::JSDOMWindow::removeEventListener):
2298         * bindings/js/JSEventListener.cpp:
2299         (WebCore::JSProtectedEventListener::JSProtectedEventListener):
2300         (WebCore::JSProtectedEventListener::~JSProtectedEventListener):
2301         (WebCore::JSProtectedEventListener::listenerObj):
2302         (WebCore::JSProtectedEventListener::globalObject):
2303         (WebCore::JSProtectedEventListener::clearGlobalObject):
2304         (WebCore::JSLazyEventListener::JSLazyEventListener):
2305         (WebCore::JSLazyEventListener::parseCode):
2306         * bindings/js/JSEventListener.h:
2307         (WebCore::JSProtectedEventListener::create):
2308         * bindings/js/JSNodeCustom.cpp:
2309         (WebCore::JSNode::addEventListener):
2310         (WebCore::JSNode::removeEventListener):
2311         * bindings/js/JSSVGElementInstanceCustom.cpp:
2312         (WebCore::JSSVGElementInstance::addEventListener):
2313         (WebCore::JSSVGElementInstance::removeEventListener):
2314         * bindings/scripts/CodeGeneratorJS.pm:
2315         All just renaming.
2316
2317 2009-03-26  Dan Bernstein  <mitz@apple.com>
2318
2319         Reviewed by Anders Carlsson.
2320
2321         - fix <rdar://problem/6725042> BidiResolver::createBidiRunsForLine can
2322           create runs extending beyond the end
2323
2324         No test because Safari does not use this version of
2325         createBidiRunsForLine() with the end iterator not pointing to the end
2326         of the text run.
2327
2328         * platform/text/BidiResolver.h:
2329         (WebCore::BidiResolver::appendRun): Cap the end of the run at the end
2330         of the line and set the reachedEndOfLine flag. This mirrors the logic
2331         in the specialized version of appendRun() in bidi.cpp, which is why the
2332         problem did not show up in HTML. Also avoid creating empty runs.
2333
2334 2009-03-26  Simon Fraser  <simon.fraser@apple.com>
2335
2336         Reviewed by Dave Hyatt
2337         
2338         https://bugs.webkit.org/show_bug.cgi?id=24864
2339
2340         Change the terminology from "inner content layer" to "direct compositing"
2341         for cases where we can push an image directly over to the compositing system,
2342         without having to draw it.
2343         
2344         Clean up much of the code which looks at style to determine if this is possible,
2345         and fix some bugs when backgrounds change dynamically.
2346         
2347         * rendering/RenderLayerBacking.cpp:
2348         (WebCore::hasBorderOutlineOrShadow):
2349         (WebCore::hasBoxDecorations):
2350         (WebCore::hasBoxDecorationsWithBackgroundImage):
2351         (WebCore::RenderLayerBacking::canBeSimpleContainerCompositingLayer):
2352         (WebCore::RenderLayerBacking::canUseDirectCompositing):
2353         (WebCore::RenderLayerBacking::detectDrawingOptimizations):
2354         (WebCore::RenderLayerBacking::rendererContentChanged):
2355         (WebCore::RenderLayerBacking::updateImageContents):
2356         * rendering/RenderLayerBacking.h:
2357
2358 2009-03-26  Simon Fraser  <simon.fraser@apple.com>
2359
2360         Reviewed by Dave Hyatt
2361         
2362         https://bugs.webkit.org/show_bug.cgi?id=23914
2363
2364         Tests: compositing/overflow/ancestor-overflow.html
2365                compositing/overflow/parent-overflow.html
2366
2367         * rendering/RenderLayer.cpp:
2368         (WebCore::RenderLayer::calculateClipRects):
2369         * rendering/RenderLayer.h:
2370         (WebCore::ClipRects::infiniteRect):
2371         New static method that returns a large rect that is used by the clipping
2372         logic.
2373         
2374         * rendering/RenderLayerBacking.cpp:
2375         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2376         Use parentClipRects(), rather than calculateRects(), to compute the overflow
2377         rect that we'll use to create a masking layer for composited clipping.
2378         
2379         * rendering/RenderLayerCompositor.cpp:
2380         (WebCore::RenderLayerCompositor::clippedByAncestor):
2381         Use parentClipRects() to see whether there's a layer between us and our
2382         compositing ancestor which applies clipping.
2383         
2384         (WebCore::RenderLayerCompositor::clipsCompositingDescendants):
2385         A layer which imposes clipping to its children doesn't have to be a stacking
2386         context; it might be a normal flow layer; in either case, we can rely on the
2387         hasCompositingDescendant() bit.
2388
2389 2009-03-26  Steve Falkenburg  <sfalken@apple.com>
2390
2391         https://bugs.webkit.org/show_bug.cgi?id=24837
2392         Escape key should dismiss select menu
2393
2394         Reviewed by Adam Roben.
2395
2396         * platform/win/PopupMenuWin.cpp:
2397         (WebCore::PopupWndProc):
2398
2399 2009-03-26  Kevin Ollivier  <kevino@theolliviers.com>
2400
2401         Reviewed by Alexey Proskuryakov.
2402
2403         Make sure the script uses LF line endings even on Windows.
2404         
2405         https://bugs.webkit.org/show_bug.cgi?id=24805
2406
2407         * WebCore/make-generated-sources.sh: Change svn:eol-style to LF
2408
2409 2009-03-26  Eli Fidler  <eli.fidler@torchmobile.com>
2410
2411         Reviewed by George Staikos.
2412
2413         Remove warnings all over the place by making operator precedence
2414         explicit in cases like x && y || z.  No functional change.
2415
2416         * css/CSSFontSelector.cpp:
2417         (WebCore::CSSFontSelector::addFontFaceRule):
2418         * css/CSSParser.cpp:
2419         (WebCore::CSSParser::parseValue):
2420         (WebCore::CSSParser::parseShadow):
2421         * dom/Document.cpp:
2422         (WebCore::Document::shouldScheduleLayout):
2423         * dom/Node.cpp:
2424         (WebCore::Node::isBlockFlowOrBlockTable):
2425         * dom/Node.h:
2426         (WebCore::Node::document):
2427         * dom/Position.cpp:
2428         (WebCore::Position::next):
2429         (WebCore::Position::upstream):
2430         (WebCore::Position::downstream):
2431         (WebCore::Position::getInlineBoxAndOffset):
2432         * dom/PositionIterator.cpp:
2433         (WebCore::PositionIterator::atStart):
2434         * dom/Range.cpp:
2435         (WebCore::Range::intersectsNode):
2436         * editing/Editor.cpp:
2437         (WebCore::Editor::setBaseWritingDirection):
2438         * editing/InsertParagraphSeparatorCommand.cpp:
2439         (WebCore::InsertParagraphSeparatorCommand::doApply):
2440         * editing/ReplaceSelectionCommand.cpp:
2441         (WebCore::ReplaceSelectionCommand::doApply):
2442         * editing/TextIterator.cpp:
2443         (WebCore::TextIterator::advance):
2444         (WebCore::SimplifiedBackwardsTextIterator::advance):
2445         * editing/VisiblePosition.cpp:
2446         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
2447         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
2448         (WebCore::VisiblePosition::canonicalPosition):
2449         * editing/htmlediting.cpp:
2450         (WebCore::isMailBlockquote):
2451         (WebCore::lineBreakExistsAtPosition):
2452         * html/HTMLSelectElement.cpp:
2453         (WebCore::HTMLSelectElement::parseMappedAttribute):
2454         * loader/FTPDirectoryDocument.cpp:
2455         (WebCore::processFileDateString):
2456         * loader/ImageLoader.cpp:
2457         (WebCore::ImageLoader::updateFromElement):
2458         * loader/TextResourceDecoder.cpp:
2459         (WebCore::TextResourceDecoder::checkForHeadCharset):
2460         * page/AccessibilityObject.cpp:
2461         (WebCore::updateAXLineStartForVisiblePosition):
2462         * page/EventHandler.cpp:
2463         (WebCore::EventHandler::sendContextMenuEvent):
2464         * page/animation/AnimationBase.cpp:
2465         (WebCore::PropertyWrapperGetter::equals):
2466         (WebCore::PropertyWrapperShadow::equals):
2467         * platform/ContextMenu.cpp:
2468         (WebCore::ContextMenu::populate):
2469         * platform/ScrollView.cpp:
2470         (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount):
2471         * platform/text/Base64.cpp:
2472         (WebCore::base64Encode):
2473         * platform/text/BidiResolver.h:
2474         (WebCore::::raiseExplicitEmbeddingLevel):
2475         (WebCore::::createBidiRunsForLine):
2476         * rendering/InlineTextBox.cpp:
2477         (WebCore::InlineTextBox::placeEllipsisBox):
2478         * rendering/RenderBlock.cpp:
2479         (WebCore::RenderBlock::addChild):
2480         (WebCore::RenderBlock::repaintOverhangingFloats):
2481         (WebCore::RenderBlock::fillInlineSelectionGaps):
2482         (WebCore::RenderBlock::positionForPoint):
2483         (WebCore::RenderBlock::calcInlinePrefWidths):
2484         (WebCore::RenderBlock::hasLineIfEmpty):
2485         * rendering/RenderBox.cpp:
2486         (WebCore::RenderBox::imageChanged):
2487         (WebCore::RenderBox::localCaretRect):
2488         (WebCore::RenderBox::positionForPoint):
2489         (WebCore::RenderBox::shrinkToAvoidFloats):
2490         * rendering/RenderObject.h:
2491         (WebCore::objectIsRelayoutBoundary):
2492         * rendering/RenderTableCell.cpp:
2493         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
2494         * rendering/RenderText.cpp:
2495         (WebCore::RenderText::calcPrefWidths):
2496         * rendering/bidi.cpp:
2497         (WebCore::RenderBlock::determineStartPosition):
2498         (WebCore::textWidth):
2499         * rendering/style/RenderStyle.cpp:
2500         (WebCore::RenderStyle::diff):
2501         * rendering/style/StyleInheritedData.cpp:
2502         (WebCore::cursorDataEquivalent):
2503         * rendering/style/StyleRareInheritedData.cpp:
2504         (WebCore::StyleRareInheritedData::shadowDataEquivalent):
2505         * rendering/style/StyleRareNonInheritedData.cpp:
2506         (WebCore::StyleRareNonInheritedData::shadowDataEquivalent):
2507         (WebCore::StyleRareNonInheritedData::animationDataEquivalent):
2508         (WebCore::StyleRareNonInheritedData::transitionDataEquivalent):
2509
2510 2009-03-26  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2511
2512         Reviewed by Holger Freyther.
2513
2514         https://bugs.webkit.org/show_bug.cgi?id=24804
2515         [GTK] 401 responses cause rogue content to be loaded
2516
2517         Our soup code handles 401 responses itself, so we should not feed
2518         the headers and data of those responses to the loader.
2519
2520         * platform/network/soup/ResourceHandleSoup.cpp:
2521         (WebCore::gotHeadersCallback):
2522         (WebCore::gotChunkCallback):
2523
2524 2009-03-25  Geoffrey Garen  <ggaren@apple.com>
2525
2526         Reviewed by Oliver Hunt and Darin Adler.
2527         
2528         Fixed <rdar://problem/6603167> Crash in WebKit!JSC::JSGlobalObject::resetPrototype
2529         during Stress test (#3 & #7 WER crashes for Safari 4 Beta)
2530         
2531         The problem was that allocation of the global object would, for just a
2532         moment, leave the global object's prototype unprotected from GC. This
2533         bug doesn't apply to non-global DOM objects because their prototypes are
2534         cached and marked by the global object.
2535
2536         No test case because the crashing condition is hard to deterministically
2537         produce in a normal build, and in a Windows Release build with
2538         COLLECT_ON_EVERY_ALLOCATION set to 1, existing tests crash/hang.
2539
2540         * bindings/js/JSDOMWindowShell.cpp:
2541         (WebCore::JSDOMWindowShell::setWindow):
2542         * bindings/js/WorkerScriptController.cpp:
2543         (WebCore::WorkerScriptController::initScript): Protect the global object's
2544         prototype from GC during construction, since the global object does not
2545         yet point to it, and therefore won't mark it.
2546
2547 2009-03-25  Dean Jackson  <dino@apple.com>
2548
2549         Reviewed by Simon Fraser
2550
2551         https://bugs.webkit.org/show_bug.cgi?id=23361
2552
2553         When using hardware compositing, some images can be directly
2554         rendered by the hardware - no need to draw them into a separate
2555         context, therefore saving memory.
2556         Only images with certain style properties can be directly
2557         composited - basically anything that is not a simple image requires
2558         the usual rendering path (eg. if the image has borders).
2559
2560         Test: compositing/direct-image-compositing.html
2561
2562         * manual-tests/resources/simple_image.png: Added.
2563         * manual-tests/simple-image-compositing.html: Added.
2564         * platform/graphics/Image.h:
2565         (WebCore::Image::startAnimation):
2566             - move this to public
2567         * rendering/RenderImage.cpp:
2568         (WebCore::RenderImage::imageChanged):
2569             - poke compositing layer if image has changed
2570         (WebCore::RenderImage::notifyFinished):
2571             - let the compositing layer know that it can render the image
2572         * rendering/RenderImage.h:
2573         * rendering/RenderLayer.cpp:
2574         (WebCore::RenderLayer::rendererContentChanged):
2575         * rendering/RenderLayer.h:
2576         * rendering/RenderLayerBacking.cpp:
2577         (WebCore::RenderLayerBacking::canUseInnerContentLayer):
2578         (WebCore::RenderLayerBacking::detectDrawingOptimizations):
2579         (WebCore::RenderLayerBacking::rendererContentChanged):
2580         * rendering/RenderLayerBacking.h:
2581             - code to hook up direct compositing of images where
2582               possible
2583
2584 2009-03-25  David Levin  <levin@chromium.org>
2585
2586         Reviewed by Dimitri Glazkov.
2587
2588         Chromium build fix. Fix #include in V8NodeFilterCondition.cpp due to the
2589         rename of V8NodeFilter to V8NodeFilterCondition.
2590
2591         * bindings/v8/V8NodeFilterCondition.cpp:
2592
2593 2009-03-25  Simon Fraser  <simon.fraser@apple.com>
2594
2595         Reviewed by Darin Adler
2596         
2597         https://bugs.webkit.org/show_bug.cgi?id=24817
2598         
2599         When the slider range is zero, avoid a divide by zero, which caused the
2600         thumb to be positioned off in the weeds, which broke painting.
2601
2602         Test: media/video-empty-source.html
2603
2604         * rendering/RenderSlider.cpp:
2605         (WebCore::SliderRange::proportionFromValue):
2606         (WebCore::SliderRange::valueFromProportion):
2607         (WebCore::sliderPosition):
2608         (WebCore::RenderSlider::setValueForPosition):
2609
2610 2009-03-24  Eric Seidel  <eric@webkit.org>
2611
2612         Reviewed by Darin Adler.
2613
2614         Remove dead code and style cleanup
2615         https://bugs.webkit.org/show_bug.cgi?id=24684
2616
2617         * html/CanvasStyle.cpp:
2618         (WebCore::CanvasStyle::CanvasStyle):
2619           Coverty was annoyed that we didn't initialize all of our members.  I agree, but I didn't
2620           want to paste all 8 members each time, so I just cleaned up the existing constructors and left them.
2621         * page/FocusController.cpp:
2622         (WebCore::FocusController::setFocusedNode):
2623           "node" was checked just above and is already known to be non-null
2624         * rendering/RenderLayer.cpp:
2625         (WebCore::RenderLayer::insertOnlyThisLayer):
2626           We were already using parentLayer w/o a NULL check above, so just add an explicit ASSERT and use it w/o NULL check
2627         (WebCore::RenderLayer::resize):
2628           element is already ASSERTed above, no need to null check it here
2629         * rendering/RenderTableSection.cpp:
2630         (WebCore::RenderTableSection::addCell):
2631           currentCell.cell was just assigned to the value "cell" which is known to be non-null, no need to null check again.
2632
2633 2009-03-24  Eric Seidel  <eric@webkit.org>
2634
2635         Reviewed by Darin Adler.
2636
2637         Move ASSERT(foo) to before where foo-> is used
2638         https://bugs.webkit.org/show_bug.cgi?id=24684
2639
2640         * platform/chromium/PasteboardChromium.cpp:
2641         (WebCore::Pasteboard::writeImage):
2642           Move ASSERTs to the top of the function, code was using "node" before ASSERT(node), once I moved
2643           ASSERT(node) to the top of the function it made sense to move the rest of them there too.
2644         * rendering/SVGRenderSupport.cpp:
2645         (WebCore::prepareToRenderSVGContent):
2646           move ASSERT(object) to *before* we use "object" :)
2647
2648 2009-03-24  Eric Seidel  <eric@webkit.org>
2649
2650         Reviewed by Simon Fraser.
2651
2652         Make TextTokenizer ASSERT that the buffer was freed
2653         https://bugs.webkit.org/show_bug.cgi?id=24684
2654
2655         * loader/TextDocument.cpp:
2656         (WebCore::TextTokenizer::TextTokenizer):
2657         (WebCore::TextTokenizer::~TextTokenizer):
2658         (WebCore::TextTokenizer::finish):
2659           Make it clear by adding a ~TextTokenizer that finish() will always be called and the memory never leaked.
2660
2661 2009-03-24  Eric Seidel  <eric@webkit.org>
2662
2663         Reviewed by Darin Adler.
2664
2665         Fix case where lBreak.obj->isBR() when lBreak.obj was NULL
2666         https://bugs.webkit.org/show_bug.cgi?id=24684
2667
2668         I don't have a test case where we were taking the wrong path here
2669         However, adding an ASSERT(lBreak.obj) before this usage caused
2670         multiple bidi tests to fail, so lBreak.obj can be null here.
2671
2672         * rendering/bidi.cpp:
2673         (WebCore::RenderBlock::findNextLineBreak):
2674           lBreak.obj can be null, so we can't call ->isBR() on it unconditionally.
2675
2676 2009-03-24  Eric Seidel  <eric@webkit.org>
2677
2678         Reviewed by Simon Fraser.
2679
2680         Style cleanup and dead code removal in dom, editing
2681         https://bugs.webkit.org/show_bug.cgi?id=24684
2682
2683         * dom/ContainerNode.cpp:
2684         (WebCore::ContainerNode::getUpperLeftCorner):
2685         (WebCore::ContainerNode::getLowerRightCorner):
2686         (WebCore::ContainerNode::getRect):
2687           Coverty was (rightly) confused as to what the hell "o" was being used for
2688           and whether or not it would ever be NULL.  I added some ASSERTS so that people (and machines)
2689           would be less confused about the logic in getUpperLeftCorner/getLowerRightCorner
2690         * dom/Document.cpp:
2691         (WebCore::Document::recalcStyle):
2692           Remove dead code, this block already checked that change == Force
2693         * editing/ApplyStyleCommand.cpp:
2694         (WebCore::ApplyStyleCommand::removeInlineStyle):
2695           Coverty correctly identified that traversePreviousNodePostOrder can return NULL, thus
2696           prev will be null, and we don't really explicitly handle it (like we probably should)
2697           It's OK though, because we end up creating a null position object, which may not have
2698           been what we intended, but we certainly don't crash.
2699         * editing/InsertParagraphSeparatorCommand.cpp:
2700         (WebCore::InsertParagraphSeparatorCommand::doApply):
2701           Remove dead code, insertionPosition.node() is already checked to be non-null above.
2702         * editing/markup.cpp:
2703         (WebCore::appendStartMarkup):
2704           removed dead code, annotate is already known to be true at this point in the file
2705           !annotate was checked above, and break; was called.
2706
2707 2009-03-24  Eric Seidel  <eric@webkit.org>
2708
2709         Reviewed by Simon Fraser.
2710
2711         CSS dead code removal and cleanup from Coverty errors
2712         https://bugs.webkit.org/show_bug.cgi?id=24684
2713
2714         * css/CSSStyleSelector.cpp:
2715         (WebCore::CSSStyleSelector::applyProperty):
2716           Every other place in the code we check settings() for NULL, so I made these places
2717           check too, even though we should never be resolving style against a document which has
2718           no frame (which I believe is the only time settings() can be null)
2719         * css/CSSStyleSheet.cpp:
2720         (WebCore::CSSStyleSheet::styleSheetChanged):
2721           Removing dead code, "root" can never be null here.
2722         * css/SVGCSSStyleSelector.cpp:
2723         (WebCore::colorFromSVGColorCSSValue):
2724         (WebCore::CSSStyleSelector::applySVGProperty):
2725           Extra returns in the old macros caused dead code.  Removing the old macros and use modern
2726           ones instead. :)
2727           Extra null checks to value were not needed.  Added an ASSERT at the top of the function
2728           to make it clear that value will never be NULL.
2729           Added colorFromSVGColorCSSValue to clean up the code a little.
2730
2731 2009-03-24  Eric Seidel  <eric@webkit.org>
2732
2733         Reviewed by Simon Fraser.
2734
2735         Font fallback cleanup and added ASSERT for GlyphPageTreeNode
2736         https://bugs.webkit.org/show_bug.cgi?id=24684
2737
2738         * css/CSSFontSelector.cpp:
2739         (WebCore::compareFontFaces):
2740           Coverty was concerned that it was possible to index off the end of weightFallbackRuleSets
2741           I can't read the code well enough to tell, so I tried to make the code clearer
2742           and added an ASSERT.        
2743         * platform/graphics/GlyphPageTreeNode.cpp:
2744         (WebCore::GlyphPageTreeNode::initializePage):
2745           Coverty believes we can crash here due to j being larger than GlyphPage::size.  I think to is already
2746           known to be < GlyphPage::size due to the min() statement above, but not being sure I added an ASSERT.
2747
2748 2009-03-24  Eric Seidel  <eric@webkit.org>
2749
2750         Reviewed by Simon Fraser.
2751
2752         Coverty inspired fixes in Animations/Transforms
2753         https://bugs.webkit.org/show_bug.cgi?id=24684
2754
2755         * page/animation/AnimationBase.h:
2756           Fix animate() signatures to match so that the virtual methods actually override one another. :)
2757         * page/animation/AnimationController.cpp:
2758         (WebCore::AnimationControllerPrivate::removeFromStartTimeResponseWaitList):
2759           Attempt to fix this method, prevAnimation was never set to anything but NULL,
2760           as far as I can tell the author originally intended to update it at the end
2761           of the loop, which is what I changed this code to do.
2762         * page/animation/ImplicitAnimation.cpp:
2763         (WebCore::ImplicitAnimation::animate):
2764           Make method signature match AnimationBase::animate
2765         * page/animation/ImplicitAnimation.h:
2766         * page/animation/KeyframeAnimation.cpp:
2767         (WebCore::KeyframeAnimation::animate):
2768           Make method signature match AnimationBase::animate
2769         * page/animation/KeyframeAnimation.h:
2770         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
2771         (WebCore::PerspectiveTransformOperation::blend):
2772           if (blendToIdentity) already returned above.
2773         * platform/graphics/transforms/RotateTransformOperation.cpp:
2774         (WebCore::RotateTransformOperation::blend):
2775           if (blendToIdentity) already returned above.
2776
2777 2009-03-25  Eli Fidler  <eli.fidler@torchmobile.com>
2778
2779         Reviewed by George Staikos.
2780
2781         Fix compiler warnings regarding assignments in if statements.
2782
2783         * html/HTMLFormElement.cpp:
2784         (WebCore::HTMLFormElement::createFormData):
2785         * plugins/PluginPackage.cpp:
2786         (WebCore::PluginPackage::compare):
2787
2788 2009-03-25  Dan Bernstein  <mitz@apple.com>
2789
2790         Reviewed by Dave Hyatt.
2791
2792         - fix <rdar://problem/6472150> repro crash in
2793           RenderBlock::rightmostPosition(bool, bool) const at mercotte.fr using
2794           menus
2795
2796         Test: fast/inline/continuation-positioned-reparenting.html
2797
2798         * rendering/RenderInline.cpp:
2799         (WebCore::RenderInline::splitFlow): When repurposing the existing
2800         container as the "pre" block, clear its positioned objects list, because
2801         positioned descendants may end up in a different block after the split.
2802
2803 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
2804
2805         Reviewed by Dave Hyatt
2806         
2807         https://bugs.webkit.org/show_bug.cgi?id=24784
2808         
2809         Length values in transform operations need to take zoom into account.
2810
2811         Test: fast/transforms/transforms-with-zoom.html
2812
2813         * css/CSSStyleSelector.cpp:
2814         (WebCore::CSSStyleSelector::createTransformOperations):
2815
2816 2009-03-25  David Hyatt  <hyatt@apple.com>
2817
2818         Reviewed by Simon Fraser.
2819
2820         https://bugs.webkit.org/show_bug.cgi?id=24809, background-clip/origin don't use the correct
2821         values.  Add support for the new values (while preserving the old values for backwards
2822         compatibility).
2823
2824         Changed some existing test cases to use the new values.
2825
2826         * css/CSSParser.cpp:
2827         (WebCore::CSSParser::parseFillProperty):
2828         * css/CSSPrimitiveValueMappings.h:
2829         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2830         (WebCore::CSSPrimitiveValue::operator EFillBox):
2831         * css/CSSValueKeywords.in:
2832
2833 2009-03-25  Brett Wilson  <brettw@dhcp-172-22-71-191.mtv.corp.google.com>
2834
2835         Reviewed by Dimitri Glazkov.
2836
2837         Fix complex text opacity on the Chromium Windows port.
2838         https://bugs.webkit.org/show_bug.cgi?id=24757
2839
2840         Test: fast/text/complex-text-opacity.html
2841
2842         * platform/graphics/chromium/FontChromiumWin.cpp:
2843         (WebCore::):
2844         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter):
2845         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::init):
2846         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
2847         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
2848         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter):
2849         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter):
2850         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::estimateTextBounds):
2851         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
2852         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::hdc):
2853         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter):
2854         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::~TransparencyAwareUniscribePainter):
2855         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds):
2856         (WebCore::Font::drawGlyphs):
2857         (WebCore::Font::drawComplexText):
2858
2859 2009-03-25  David Hyatt  <hyatt@apple.com>
2860
2861         Reviewed by Eric Seidel
2862
2863         Fix for bug 23198, border images should not clip to border radii.  The border-image should just ignore
2864         the border-radius, since the assumption is that any desired rounding will be built into the border-image
2865         itself.
2866
2867         Note that I do not agree with this change, but I am matching the spec.
2868
2869         Added fast/borders/border-image-border-radius.html
2870
2871         * rendering/RenderBoxModelObject.cpp:
2872         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2873
2874 2009-03-25  Gustavo Noronha Silva  <gns@gnome.org>
2875
2876         Reviewed by Holger Freyther.
2877
2878         https://bugs.webkit.org/show_bug.cgi?id=24750
2879         [GTK] requests download instead of displaying page
2880
2881         Fix the Content-Type headers we get from soup, so that we set a
2882         proper media type on the ResourceResponse.
2883
2884         * platform/network/soup/ResourceHandleSoup.cpp:
2885         (WebCore::fillResponseFromMessage):
2886
2887 2009-03-25  Gustavo Noronha Silva  <gns@gnome.org>
2888
2889         Reviewed by Holger Freyther.
2890
2891         https://bugs.webkit.org/show_bug.cgi?id=24600
2892         [GTK] responses with status code >= 400 should not be given special treatment
2893
2894         Do not special case requests that have HTTP responses >=
2895         400. Redirects are handled automatically by libsoup, but the rest
2896         of the responses should be treated like any other.
2897
2898         * platform/network/soup/ResourceHandleSoup.cpp:
2899         (WebCore::):
2900         (WebCore::gotHeadersCallback):
2901         (WebCore::gotChunkCallback):
2902         (WebCore::finishedCallback):
2903
2904 2009-03-25  Darin Adler  <darin@apple.com>
2905
2906         Reviewed by John Sullivan.
2907
2908         Tidy up LegacyWebArchive a bit. And don't include favicons in web archives when
2909         they are being used only for selections, not an entire document.
2910
2911         * WebCore.base.exp: Remove exported function that's not used in WebKit.
2912
2913         * loader/archive/cf/LegacyWebArchive.cpp:
2914         (WebCore::LegacyWebArchive::createPropertyListRepresentation): Made a static member
2915         function so it can share private things with other member functions. Added some FIXME
2916         comments to a branch of code I think is dead. Changed boolean argument into a named
2917         one. Renamed to match other similar functions.
2918         (WebCore::LegacyWebArchive::createResourceResponseFromPropertyListData): Ditto.
2919         (WebCore::LegacyWebArchive::createResource): Ditto.
2920         (WebCore::LegacyWebArchive::create): Merged the create and init functions.
2921         (WebCore::LegacyWebArchive::rawDataRepresentation): Added some assertions because
2922         we should never fail to write (we can fail to read).
2923         (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Made a static
2924         member function as above.
2925         (WebCore::LegacyWebArchive::createFromSelection): Ditto.
2926         (WebCore::LegacyWebArchive::create): Iterate the vector with indices rather than
2927         iterators. Only include the favicon if the first node is the document since we don't
2928         want to include the favicon when copying and pasting.
2929
2930         * loader/archive/cf/LegacyWebArchive.h: Made one of the create functions private.
2931         Made the Mac-specific functions be static member functions. Made other helpers be
2932         static member functions. Removed the nit function.
2933
2934         * loader/archive/cf/LegacyWebArchiveMac.mm:
2935         (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Updated
2936         comment and made this a static member function.
2937         (WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto. Also made
2938         it so we only type cast in one place.
2939
2940 2009-03-25  Darin Adler  <darin@apple.com>
2941
2942         Reviewed by David Hyatt.
2943
2944         Bug 24740: crash in RenderSlider::setPositionFromValue when calling pause() after setting <video> to display: none
2945         https://bugs.webkit.org/show_bug.cgi?id=24740
2946         rdar://problem/6679873
2947
2948         Bug 12104: Native Slider: When the thumb's height is specified as a percentage, it is not centered properly
2949         https://bugs.webkit.org/show_bug.cgi?id=12104
2950
2951         Test: media/video-display-none-crash.html
2952
2953         The problem here was that RenderSlider was trying to position its thumb in a way that
2954         requires it to call updateLayout inside rendering code. The right way to position a
2955         child renderer is to do layout, so I had to write a layout function. And then fix a few
2956         other small problems shown by the same test case.
2957
2958         * rendering/RenderSlider.cpp: Made defaultTrackLength have internal linkage.
2959         Renamed HTMLSliderThumbElement to SliderThumbElement because we only use the HTML
2960         prefix for public DOM classes, not elements used as implementation details.
2961         Made SliderThumbElement function members private and got rid of unneeded default
2962         argument value for shadowParent.
2963         (WebCore::SliderRange::SliderRange): Added. Parses precision, max, and min attributes.
2964         (WebCore::SliderRange::clampValue): Added. Does standard clamping based on the above.
2965         (WebCore::SliderRange::valueFromElement): Added. Reads the value from the element in
2966         a way that clamps to the range.
2967         (WebCore::sliderPosition): Added. Computes the slider position: a double.
2968         (WebCore::SliderThumbElement::SliderThumbElement): Removed unneeded explicit
2969         initialization of m_initialClickPoint.
2970         (WebCore::SliderThumbElement::defaultEventHandler): Call setValueForPosition instead
2971         of calling setCurrentPosition and valueChanged.
2972         (WebCore::RenderSlider::RenderSlider): Remove unneeded explicit initialization of m_thumb.
2973         (WebCore::RenderSlider::styleDidChange): Remove unneeded second argument to createThumbStyle.
2974         (WebCore::RenderSlider::createThumbStyle): Remove unneeded second argument. Get rid of code
2975         setting the position to relative and setting the left and top. We now handle positioning
2976         in a custom layout function.
2977         (WebCore::RenderSlider::layout): Rewrote to handle positioning of the thumb as layout.
2978         (WebCore::RenderSlider::updateFromElement): Added code to immediately update the value
2979         in the element if it's out of range. This clamping used to be done as a side effect of
2980         setPositionFromValue. Also, this has nothing to do with the renderer, so at some point
2981         it could be moved into HTMLInputElement. Removed call to setPositionFromValue
2982         and instead just rely on the call to setNeedsLayout. Fix the setNeedsLayout call to be
2983         a normal setNeedsLayout(true), not a setNeedsLayout(true, false), because we do want
2984         this to be propagated to the parent -- it's not called during layout.
2985         (WebCore::RenderSlider::setValueForPosition): Refactor to use the new SliderRange
2986         class. Also don't call setCurrentPosition; instead just call setNeedsLayout.
2987         (WebCore::RenderSlider::currentPosition): Use the actual position of the renderer rather
2988         than the style to find the position; that means this needs to be done after layout is done.
2989         Also removed unneeded runtime checks and replaced them with assertions, after checking
2990         all callers to see they already guarantee this.
2991         (WebCore::RenderSlider::trackSize): Removed unneeded runtime checks and replaced them
2992         with assertions, after checking all callers to see they already guarantee this.
2993         (WebCore::RenderSlider::inDragMode): Added a null check for m_thumb so this won't
2994         crash if called early on a brand new RenderSlider.
2995
2996         * rendering/RenderSlider.h: Made all functions private except for forwardEvent and inDragMode.
2997         Renamed HTMLSliderThumbElement to SliderThumbElement because we only use the HTML
2998         prefix for public DOM classes, not elements used as implementation details. Made the
2999         mouseEventIsInThumb function non-virtual. Removed the return value and argument from
3000         setPositionFromValue. Removed valueChanged and setCurrentPosition. Removed the oldStyle
3001         argument to createThumbStyle (see above). Made SliderThumbElement a friend so it can use some
3002         private member functions.
3003
3004 2009-03-25  Eli Fidler  <eli.fidler@torchmobile.com>
3005
3006         Reviewed by George Staikos.
3007
3008         Fix ambiguous else cases by adding braces to nested if()s with elses.
3009
3010         * loader/MainResourceLoader.cpp:
3011         (WebCore::MainResourceLoader::continueAfterContentPolicy):
3012         * page/EventHandler.cpp:
3013         (WebCore::EventHandler::updateDragAndDrop):
3014         * rendering/RenderListMarker.cpp:
3015         (WebCore::toArmenianUnder10000):
3016         * rendering/TextControlInnerElements.cpp:
3017         (WebCore::TextControlInnerTextElement::defaultEventHandler):
3018
3019 2009-03-24  Eli Fidler  <eli.fidler@torchmobile.com>
3020
3021         Reviewed by George Staikos.
3022
3023         Move variable into proper platform block to quiet warning.
3024
3025         * html/CanvasRenderingContext2D.cpp:
3026         (WebCore::CanvasRenderingContext2D::drawTextInternal):
3027
3028 2009-03-24  Eric Carlson  <eric.carlson@apple.com>
3029
3030         Reviewed by Antti Koivisto.
3031
3032         Fix for <rdar://problem/6719375> Deal with QTKit loadstate changes when playing streaming movies
3033
3034         *  WebCore/html/HTMLMediaElement.cpp:
3035         (WebCore::HTMLMediaElement::setNetworkState): Deal with media engine reviving after having
3036         network state of NETWORK_NO_SOURCE.
3037
3038         *  WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3039         (WebCore::MediaPlayerPrivate::updateStates): Reset m_readyState at each state change since
3040         some types of movies currently cause QTKit's load state to bounce around. QTMovieLoadStatePlaythroughOK
3041         corresponds to HaveFutureData, not HaveEnoughData.
3042
3043 2009-03-24  Adele Peterson  <adele@apple.com>
3044
3045         Reviewed by Darin Adler.
3046
3047         Fix for https://bugs.webkit.org/show_bug.cgi?id=24707
3048         <rdar://problem/6593021> Deleting with a caret in a blank, quoted line decreases the quoting, but does not delete the line
3049
3050         * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteKeyPressed):
3051         After breaking out of an empty mail blockquote, we still want continue with the deletion
3052         so actual content will get deleted, and not just the quote style.
3053
3054 2009-03-24  Darin Adler  <darin@apple.com>
3055
3056         Reviewed by Brady Eidson.
3057
3058         <rdar://problem/6624662> REGRESSION (r39904): can't save certain web pages as web archive (ones without favicons!)
3059
3060         * loader/archive/cf/LegacyWebArchive.cpp:
3061         (WebCore::LegacyWebArchive::create): Added a null check.
3062
3063 2009-03-24  Adam Langley  <agl@google.com>
3064
3065         Reviewed by Darin Fisher.
3066
3067         https://bugs.webkit.org/show_bug.cgi?id=24685
3068
3069         The Skia drawLine function takes subpixel values and attempts to draw
3070         a line with subpixel precision. This is complex and slow for drawing
3071         scrollbars which use only vertical and horizontal lines.
3072
3073         This changes the Chromium Linux scrollbar code to use drawIRect.
3074
3075         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
3076         (WebCore::ScrollbarThemeChromium::invalidateOnMouseEnterExit):
3077         (WebCore::drawVertLine):
3078         (WebCore::drawHorizLine):
3079         (WebCore::drawBox):
3080         (WebCore::ScrollbarThemeChromium::paintTrackPiece):
3081         (WebCore::ScrollbarThemeChromium::paintThumb):
3082
3083 2009-03-24  David Kilzer  <ddkilzer@apple.com>
3084
3085         Bug 23310: Setting an absolute path (/abs) on an <iframe> with no src doesn't resolve the URL properly
3086
3087         <https://bugs.webkit.org/show_bug.cgi?id=23310>
3088
3089         Reviewed by Darin Adler.
3090
3091         Test: fast/frames/iframe-no-src-set-location.html
3092
3093         * dom/Document.cpp:
3094         (WebCore::Document::completeURL): If m_baseURL is empty or is
3095         about:blank and we have a parent document, use the parent
3096         document's URL for the base when completing a new URL.
3097
3098 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
3099
3100         Reviewed by Dave Hyatt
3101         
3102         https://bugs.webkit.org/show_bug.cgi?id=24659
3103         
3104         When hit-testing 3d-transformed layers, it doesn't make sense to project the hitTestRect
3105         into the coordinate space of the layer, and doing so can result in pathalogical quads
3106         that break hit testing. In that case, simply use the same bounds as used for painting,
3107         which are the composited bounds for this layer.
3108
3109         Test: transforms/3d/hit-testing/rotated-hit-test.html
3110
3111         * rendering/RenderLayer.cpp:
3112         (WebCore::RenderLayer::hitTestLayer):
3113
3114 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
3115
3116         Reviewed by Dave Hyatt
3117
3118         https://bugs.webkit.org/show_bug.cgi?id=24436
3119         
3120         When compositing is enabled, painting and hit testing end up using different
3121         clipping roots, because, for painting, every composited layer is a clipping root,
3122         but for hit testing only layers with transforms are. To fix this, we use
3123         temporary clip rects for hit testing, if the page is in compositing mode.
3124
3125         * rendering/RenderLayer.cpp:
3126         (WebCore::RenderLayer::paintLayer):
3127         (WebCore::RenderLayer::hitTestLayer):
3128         (WebCore::RenderLayer::parentClipRects):
3129         (WebCore::RenderLayer::calculateRects):
3130         * rendering/RenderLayer.h:
3131
3132 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
3133
3134         Reviewed by Dan Bernstein
3135         
3136         https://bugs.webkit.org/show_bug.cgi?id=24782
3137
3138         Fix regression with CSS clip rects with non-length values, by reverting to
3139         the original code, but passing the zoom multiplier through convertToLength().
3140         
3141         Also make stylistic change in createTransformOperations(), renaming 'inStyle'
3142         to 'style.
3143         
3144         Tested by existing tests.
3145
3146         * css/CSSStyleSelector.cpp:
3147         (WebCore::convertToLength):
3148         (WebCore::CSSStyleSelector::applyProperty):
3149         (WebCore::CSSStyleSelector::createTransformOperations):
3150
3151 2009-03-24  David Hyatt  <hyatt@apple.com>
3152
3153         Reviewed by Simon Fraser
3154
3155         https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents
3156         to a border-radius.
3157
3158         This patch makes non-self-painting overflow layers and control clips work with border-radius.  RenderLayers
3159         that should be clipped by overflow ancestors with border-radius are still broken.
3160
3161         Added fast/clip/overflow-border-radius-clip.html
3162
3163         * rendering/RenderBox.cpp:
3164         (WebCore::RenderBox::pushContentsClip):
3165
3166 2009-03-24  David Hyatt  <hyatt@apple.com>
3167
3168         Reviewed by Simon Fraser
3169
3170         https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents.
3171         
3172         This first patch makes overflow:hidden properly clip the foreground contents of overflow:hidden replaced elements.  Common
3173         replaced elements now default to overflow:hidden in the UA stylesheet (this is what the spec specifically recommends be
3174         done).
3175     
3176         Added fast/replaced/border-radius-clip.html
3177
3178         * css/html4.css:
3179         * rendering/RenderReplaced.cpp:
3180         (WebCore::RenderReplaced::paint):
3181         * rendering/RenderWidget.cpp:
3182         (WebCore::RenderWidget::paint):
3183
3184 2009-03-24  Adele Peterson  <adele@apple.com>
3185
3186         RS by Mark Rowe.
3187
3188         Only build these Mail quirks checks in on the Mac.
3189
3190         * dom/Document.cpp: (WebCore::disableRangeMutation):
3191         * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
3192
3193 2009-03-24  Brent Fulgham  <bfulgham@webkit.org>
3194
3195         Build fix, no review.
3196
3197         Remove ResourceLoaderCFNet.cpp from build list for Cairo Releas
3198         and Debug targets.
3199
3200         * WebCore.vcproj/WebCore.vcproj:
3201
3202 2009-03-24  Eric Carlson  <eric.carlson@apple.com>
3203
3204         Fix layout tests broken by r41907.
3205
3206         * html/HTMLMediaElement.cpp:
3207         (WebCore::HTMLMediaElement::setReadyState): Don't set "was playing" based on the new ready state
3208
3209 2009-03-24  Dmitry Titov  <dimich@chromium.org>
3210
3211         Reviewed by Dimitri Glazkov.
3212
3213         https://bugs.webkit.org/show_bug.cgi?id=24689
3214         Fix Chromium compilation errors.
3215
3216         * bindings/v8/WorkerContextExecutionProxy.cpp:
3217         (WebCore::WorkerContextExecutionProxy::FindOrCreateEventListener):
3218         (WebCore::WorkerContextExecutionProxy::RemoveEventListener):
3219
3220 2009-03-24  Yury Semikhatsky  <yurys@chromium.org>
3221
3222         Reviewed by Darin Adler.
3223
3224         https://bugs.webkit.org/show_bug.cgi?id=24759
3225         Add missing methods Element.prototype.removeMatchingStyleClasses and
3226         Node.prototype.enclosingNodeOrSelfWithNodeNameInArray to SourceFrame content
3227         iframe. These methods are called by Element.prototype.removeStyleClass and
3228         Node.prototype.enclosingNodeOrSelfWithNodeName.
3229
3230         * inspector/front-end/SourceFrame.js:
3231         (WebInspector.SourceFrame.prototype._loaded):
3232
3233 2009-03-24  Mark Mentovai  <mark@chromium.org>
3234
3235         Reviewed by Mark Rowe.
3236
3237         https://bugs.webkit.org/show_bug.cgi?id=24653
3238         WebKit should be buildable without prefix header injection.
3239         Adds missing #includes and forward declarations as needed.
3240
3241         * editing/SmartReplaceCF.cpp:
3242         * platform/graphics/mac/ColorMac.mm:
3243         * platform/graphics/mac/FontCacheMac.mm:
3244         * platform/graphics/mac/FontCustomPlatformData.h:
3245         * platform/graphics/mac/FontMac.mm:
3246         * platform/graphics/mac/FontMacATSUI.mm:
3247         * platform/graphics/mac/FontPlatformData.h:
3248         * platform/graphics/mac/FontPlatformDataMac.mm:
3249         * platform/graphics/mac/GraphicsContextMac.mm:
3250         * platform/graphics/mac/SimpleFontDataMac.mm:
3251         * platform/mac/FoundationExtras.h:
3252         * platform/mac/LocalCurrentGraphicsContext.h:
3253         * platform/mac/WebCoreSystemInterface.h:
3254         * platform/mac/WebCoreSystemInterface.mm:
3255         * platform/mac/WebCoreTextRenderer.h:
3256         * platform/mac/WebCoreTextRenderer.mm:
3257         * platform/mac/WebFontCache.h:
3258         * platform/mac/WebFontCache.mm:
3259         * platform/text/PlatformString.h:
3260         * platform/text/mac/ShapeArabic.c:
3261         * platform/text/mac/StringMac.mm:
3262         * rendering/RenderThemeChromiumMac.h:
3263
3264 2009-03-24  Dan Bernstein  <mitz@apple.com>
3265
3266         Reviewed by Darin Adler.
3267
3268         - fix <rdar://problem/6107874> by capping the nesting depth of
3269           "block-level" elements generated by the parser
3270
3271         Test: fast/parser/block-nesting-cap.html
3272
3273         * html/HTMLParser.cpp:
3274         (WebCore::HTMLParser::HTMLParser):
3275         (WebCore::HTMLParser::insertNode):
3276         (WebCore::HTMLParser::pushBlock):
3277         (WebCore::HTMLParser::popOneBlockCommon):
3278         (WebCore::HTMLParser::freeBlock):
3279         * html/HTMLParser.h:
3280
3281 2009-03-23  Greg Bolsinga  <bolsinga@apple.com>
3282
3283         Reviewed by David Kilzer.
3284
3285         https://bugs.webkit.org/show_bug.cgi?id=24771
3286         
3287         DOMTimeStamps are based upon 1970.
3288
3289         * platform/mac/GeolocationServiceMac.mm:
3290         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
3291
3292 2009-03-23  Eric Seidel  <eric@webkit.org>
3293
3294         Build fix, no review.
3295
3296         * rendering/RenderObject.cpp:
3297         (WebCore::RenderObject::createVisiblePosition): change .container to .isNotNull()
3298
3299 2009-03-23  Eric Seidel  <eric@webkit.org>
3300
3301         Reviewed by Darin Adler.
3302
3303         Rename Position::container to m_anchorNode and make it private
3304         https://bugs.webkit.org/show_bug.cgi?id=24760
3305
3306         More code cleanup for Position.
3307
3308         Change all uses of m_container to node()
3309         Eventually most uses of node() should change to anchorNode() to designate
3310         that it's the node the Position is anchored to, but not necessarily the
3311         container of the position (it could be the before/after neighbor).
3312
3313         Remove any code which sets m_container, and change it to use a new
3314         Position::moveToPosition function which takes a node and offset.
3315         It never makes sense to change the node and leave the offset.
3316
3317         * dom/Position.h:
3318         (WebCore::Position::Position):
3319         (WebCore::Position::clear):
3320         (WebCore::Position::anchorNode):
3321         (WebCore::Position::node):
3322         (WebCore::Position::moveToPosition):
3323         (WebCore::Position::moveToOffset):
3324         (WebCore::Position::isNull):
3325         (WebCore::Position::isNotNull):
3326         (WebCore::operator==):
3327         * dom/Range.cpp:
3328         (WebCore::Range::create):
3329         (WebCore::Range::compareBoundaryPoints):
3330         * dom/RangeBoundaryPoint.h:
3331         (WebCore::RangeBoundaryPoint::container):
3332         (WebCore::RangeBoundaryPoint::set):
3333         (WebCore::RangeBoundaryPoint::setOffset):
3334         (WebCore::RangeBoundaryPoint::setToChild):
3335         (WebCore::RangeBoundaryPoint::setToStart):
3336         (WebCore::RangeBoundaryPoint::setToEnd):
3337
3338 2009-03-17  Eric Seidel  <eric@webkit.org>
3339
3340         Reviewed by David Hyatt.
3341
3342         document.write() should be able to make a document strict mode
3343         https://bugs.webkit.org/show_bug.cgi?id=24336
3344
3345         Remove an implicit write of "<html>" on the first document.write call
3346         this was added as part of a KDE import http://trac.webkit.org/changeset/798
3347         with no layout test or explanation.  I can't think of any reason why
3348         an implicit <html> write is necessary (or correct), so I'm removing it and
3349         adding a test for the correct behavior.  The parser will add any necessary
3350         HTMLHTMLElements during the write() anyway.
3351
3352         Our behavior is now tested by fast/dom/Document/document-write-doctype
3353         and matches IE, FF fails this new test.  Mozilla bug filed:
3354         https://bugzilla.mozilla.org/show_bug.cgi?id=483908
3355
3356         * dom/Document.cpp:
3357         (WebCore::Document::write):
3358
3359 2009-03-23  Sam Weinig  <sam@webkit.org>
3360
3361         Reviewed by Dan Bernstein.
3362
3363         Fix for <rdar://problem/6140966>
3364         Empty Caches does not clear the Cross-site XMLHttpRequest preflight cache
3365
3366         * WebCore.base.exp:
3367         * WebCore.xcodeproj/project.pbxproj:
3368         * loader/CrossOriginPreflightResultCache.cpp:
3369         (WebCore::CrossOriginPreflightResultCache::empty):
3370         * loader/CrossOriginPreflightResultCache.h:
3371
3372 2009-03-23  Darin Adler  <darin@apple.com>
3373
3374         Reviewed by Adele Peterson.
3375
3376         Bug 24726: hit testing doesn't work right when the click is on anonymous content
3377         https://bugs.webkit.org/show_bug.cgi?id=24726
3378         rdar://problem/6696992
3379
3380         Test: editing/selection/hit-test-anonymous.html
3381
3382         * rendering/RenderBR.cpp:
3383         (WebCore::RenderBR::positionForPoint): Call createVisiblePosition instead of
3384         creating a VisiblePosition directly. It will handle finding non-anonymous
3385         content nearby if node() is 0.
3386         * rendering/RenderBlock.cpp:
3387         (WebCore::positionForPointRespectingEditingBoundaries): Ditto.
3388         (WebCore::positionForPointWithInlineChildren): Ditto.
3389         (WebCore::RenderBlock::positionForPoint): Ditto.
3390         * rendering/RenderBox.cpp:
3391         (WebCore::RenderBox::positionForPoint): Ditto.
3392         * rendering/RenderObject.cpp:
3393         (WebCore::RenderObject::positionForPoint): Ditto.
3394         (WebCore::RenderObject::createVisiblePosition): Added.
3395         * rendering/RenderObject.h: Added createVisiblePosition.
3396         * rendering/RenderReplaced.cpp:
3397         (WebCore::RenderReplaced::positionForPoint): Call createVisiblePosition.
3398         * rendering/RenderSVGInlineText.cpp:
3399         (WebCore::RenderSVGInlineText::positionForPoint): Ditto.
3400         * rendering/RenderText.cpp:
3401         (WebCore::RenderText::positionForPoint): Ditto.
3402
3403 2009-03-23  Adele Peterson  <adele@apple.com>
3404
3405         Reviewed by Darin Adler & Dave Hyatt.
3406
3407         Fix for <rdar://problem/6621310> REGRESSION(35185): Apple Travel HTML emails missing some style after Safari 4 upgrade
3408
3409         Leopard Mail doesn't expect <style> to be in the body.  This change reverts back to the old behavior of
3410         moving <style> to <head> for that version of Mail.
3411
3412         * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
3413
3414 2009-03-23  Adele Peterson  <adele@apple.com>
3415
3416         Reviewed by Mark Rowe & Dave Hyatt.
3417
3418         Merge some of the individual Mail quirks into two settings that we can check for future quirks.
3419
3420         * WebCore.base.exp:
3421         * dom/Document.cpp:
3422         (WebCore::disableRangeMutation):
3423         (WebCore::Document::nodeChildrenChanged):
3424         (WebCore::Document::nodeWillBeRemoved):
3425         (WebCore::Document::textInserted):
3426         (WebCore::Document::textRemoved):
3427         (WebCore::Document::textNodesMerged):
3428         (WebCore::Document::textNodeSplit):
3429         * page/Settings.cpp:
3430         (WebCore::Settings::Settings):
3431         (WebCore::Settings::setNeedsLeopardMailQuirks):
3432         (WebCore::Settings::setNeedsTigerMailQuirks):
3433         * page/Settings.h:
3434         (WebCore::Settings::needsLeopardMailQuirks):
3435         (WebCore::Settings::needsTigerMailQuirks):
3436
3437 2009-03-23  Ada Chan  <adachan@apple.com>
3438
3439         https://bugs.webkit.org/show_bug.cgi?id=24762
3440         Support text-indent in <option> elements on windows platform.
3441
3442         Reviewed by Adele Peterson.
3443
3444         * css/themeWin.css:
3445         * platform/PopupMenuStyle.h: We don't honor font specified on <option> elements right now.  Make this
3446         explicit via windows themed default stylesheet.
3447         (WebCore::PopupMenuStyle::PopupMenuStyle): Also store text-indent and text-direction.
3448         (WebCore::PopupMenuStyle::textIndent):
3449         (WebCore::PopupMenuStyle::textDirection):
3450         * platform/win/PopupMenuWin.cpp:
3451         (WebCore::PopupMenu::paint): Adjust the text's x-coordinate if text-indent is supported for options and 
3452         text-indent is specified with LTR direction.
3453         * rendering/RenderMenuList.cpp:
3454         (WebCore::RenderMenuList::updateOptionsWidth): Take text-indent into account if theme supports text-indent for options.
3455         (WebCore::RenderMenuList::itemStyle): Use new PopupMenuStyle constructor on windows.
3456         (WebCore::RenderMenuList::menuStyle): Ditto.
3457         * rendering/RenderTextControlSingleLine.cpp:
3458         (WebCore::RenderTextControlSingleLine::menuStyle): Ditto.
3459         * rendering/RenderTheme.h:
3460         (WebCore::RenderTheme::popupOptionSupportsTextIndent): Added.  Default is false since we are only supporting it in windows for now.
3461         * rendering/RenderThemeWin.h:
3462         (WebCore::RenderThemeWin::popupOptionSupportsTextIndent): Returns true for windows.
3463
3464 2009-03-23  Sam Weinig  <sam@webkit.org>
3465
3466         Reviewed by Anders Carlsson.
3467
3468         Fix for https://bugs.webkit.org/show_bug.cgi?id=24699
3469         REGRESSION: Java Applets broken
3470         <rdar://problem/6707494>
3471
3472         Fix loading Java applets without a codeBase. Only pass the base (up to the
3473         the last path component) of the baseURL to the plug-in.
3474
3475         * html/HTMLAppletElement.cpp:
3476         (WebCore::HTMLAppletElement::createRenderer):
3477         * platform/KURL.cpp:
3478         (WebCore::KURL::baseAsString):
3479         * platform/KURL.h:
3480
3481 2009-03-23  Darin Adler  <darin@apple.com>
3482
3483         Reviewed by Sam Weinig.
3484
3485         * platform/KURL.h: Removed now-incorrect comments.
3486         None of the parts include the separator characters any more, now that
3487         query doesn't include the "?", so the comments explaining which do and do
3488         not are no-longer helpful.
3489
3490 2009-03-23  David Levin  <levin@chromium.org>
3491
3492         Reviewed by Dimitri Glazkov.
3493
3494         https://bugs.webkit.org/show_bug.cgi?id=24764
3495
3496         Renamed files V8NodeFilter -> V8NodeFilterCondition to reflect
3497         class names.  Also fixed some headers that got mangled in search/replace
3498         operations.
3499
3500         No change in behavior, so no test.
3501
3502         * bindings/v8/V8NodeFilter.h: Removed.
3503         * bindings/v8/V8NodeFilterCondition.cpp: Renamed from WebCore/bindings/v8/V8NodeFilter.cpp.
3504         * bindings/v8/V8NodeFilterCondition.h: Added.
3505         * bindings/v8/custom/V8ClipboardCustom.cpp:
3506         * bindings/v8/custom/V8DocumentCustom.cpp:
3507         * bindings/v8/custom/V8ElementCustom.cpp:
3508         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3509         * bindings/v8/custom/V8NavigatorCustom.cpp:
3510
3511 2009-03-23  Darin Fisher  <darin@chromium.org>
3512
3513         Reviewed by Antti Koivisto.
3514
3515         https://bugs.webkit.org/show_bug.cgi?id=24741
3516
3517         Adds a unique across-browser-sessions identifier to FormData, which may
3518         be used by ResourceHandle as a secondary cache key to enable cached
3519         form submissions.
3520
3521         At issue: two otherwise identical form submissions may result in
3522         completely independent responses, which may each be appropriate to
3523         store and reuse from cache.
3524
3525         * html/HTMLFormElement.cpp: Added call to FormData::setIdentifier so that
3526         we only enable cached form submissions for those generated by HTML.  This
3527         way we do not bother with POSTs generated by XMLHttpRequest.
3528         (WebCore::generateFormDataIdentifier):
3529         (WebCore::HTMLFormElement::createFormData):
3530         * platform/network/FormData.cpp: Initialize m_identifier to 0, which means
3531         the unspecified identifier.  So by default there is no identifier and
3532         nothing changes.
3533         (WebCore::FormData::FormData):
3534         * platform/network/FormData.h: Added m_identifier with setter and getter.
3535         (WebCore::FormData::setIdentifier):
3536         (WebCore::FormData::identifier):
3537
3538 2009-03-23  Simon Fraser  <simon.fraser@apple.com>
3539
3540         Reviewed by Antti Koivisto
3541         
3542         https://bugs.webkit.org/show_bug.cgi?id=24733
3543         
3544         Fix media controller with full-page zoom. Previously, the media controller
3545         shadow nodes never saw style changes on the RenderMedia, so did not respond
3546         to zooming at all. Now, we update the style on the shadow renderers
3547         whenever RenderMedia gets a style change. Also fix the video thumb in
3548         the theme to be scaled properly.
3549
3550         Test: media/video-controls-zoomed.html
3551
3552         * rendering/MediaControlElements.cpp:
3553 &nbs