2009-03-17 Darin Adler <darin@apple.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2009-03-17  Darin Adler  <darin@apple.com>
2
3         Earlier version reviewed by Adele Peterson.
4
5         Bug 24304: REGRESSION (r39864): Hitting the space bar to select an <input type=radio>
6         or push an <input type=button> or <button> causes the page to scroll down.
7
8         Would be best to add a regression test for Windows eventually; tested that this has
9         no effect on the Mac OS X platform.
10
11         * html/HTMLInputElement.cpp:
12         (WebCore::HTMLInputElement::defaultEventHandler): Added FIXMEs and tweaked formatting.
13         Use the code that calls the base class's defaultEventHandler early only in the cases
14         where it's needed: keydown and keypress events in text fields. In other cases, do the
15         more typical thing and call the default handler only at the end of the function.
16         This function already had code to make sure the keypress event for space never gets
17         through, but it was running too late since the scrolling code was moved into the
18         base class default event handler.
19
20 2009-03-17  Simon Fraser  <simon.fraser@apple.com>
21
22         Reviewed by Darin Adler
23
24         https://bugs.webkit.org/show_bug.cgi?id=24396
25
26         * config.h:
27         Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now, and add some
28         comments to make the #ifdefs more readable.
29
30         * css/CSSComputedStyleDeclaration.cpp:
31         (WebCore::computedTransform):
32         Add a comment to mention that we don't flatten the matrix.
33         
34         * css/MediaQueryEvaluator.cpp:
35         (WebCore::transform_3dMediaFeatureEval):
36         Have the 'transform-3d' media query evaluate to 'true' if 3d-rendering
37         is supported.
38         
39         * platform/graphics/mac/GraphicsLayerCA.mm:
40         (WebCore::GraphicsLayerCA::animateTransform):
41         No need for the #ifdef here. If we don't support 3d, we will have already flattened
42         the matrix.
43         
44         * platform/graphics/transforms/TransformationMatrix.cpp:
45         (WebCore::TransformationMatrix::makeAffine):
46         * platform/graphics/transforms/TransformationMatrix.h:
47         New method to convert the matrix to an affine matrix by throwing a way the non-affine
48         parts.
49         
50         * rendering/RenderLayer.cpp:
51         (WebCore::RenderLayer::updateTransform):
52         (WebCore::RenderLayer::currentTransform):
53         * rendering/RenderLayerBacking.cpp:
54         (WebCore::RenderLayerBacking::updateLayerTransform):
55         If 3d rendering is not supported, convert the matrix to an affine matrix
56         which can be rendered, and used for hit testing.
57         
58         * rendering/RenderLayerCompositor.cpp:
59         Change the name of the exported symbol that webkitdirs.pm uses to know if
60         3d rendering is supported. There is no other 3d-rendering-specific symbol we can sniff.
61         
62         * rendering/RenderObject.cpp:
63         (WebCore::RenderObject::transformFromContainer):
64         Only take perspective into account if 3d rendering is supported.
65
66         * rendering/RenderObject.h:
67         (WebCore::makeMatrixRenderable):
68         Utility method that flattens a matrix if 3d rendering is not supported.
69
70 2009-03-17  Kevin Ollivier  <kevino@theolliviers.com>
71
72         wx build fix. Fix typo after mouse wheel changes.
73
74         * platform/wx/MouseWheelEventWx.cpp:
75         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
76
77 2009-03-17  Darin Adler  <darin@apple.com>
78
79         * inspector/ConsoleMessage.cpp:
80         (WebCore::ConsoleMessage::isEqual): Fix build, remove stray parenthesis.
81
82 2009-03-17  Darin Adler  <darin@apple.com>
83
84         Fix crash seen right away when running run-webkit-tests.
85
86         * inspector/ConsoleMessage.cpp:
87         (WebCore::ConsoleMessage::isEqual): Restore assertion to its behavior pre-refactoring.
88         Also tweaked formatting a bit.
89
90 2009-03-17  Alexey Proskuryakov  <ap@webkit.org>
91
92         Reviewed by Darin Adler.
93
94         HTMLSelectElement::add() doesn't look at exception code returned from insertBefore(), so 
95         it doesn't need to zero it out before calling.
96
97         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::add): Removed "ec = 0" line.
98
99 2009-03-17  Dan Bernstein  <mitz@apple.com>
100
101         Reviewed by Adam Roben.
102
103         - WebCore part of adding a mechanism for controlling the caching of
104           responses through WebFrameLoaderClient
105
106         Mac already has such a mechanism, and this adds one for CFNetwork ports.
107
108         * WebCore.vcproj/WebCore.vcproj: Added EmptyClients.h
109         and ResourceLoaderCFNet.cpp.
110
111         * loader/EmptyClients.h:
112         (WebCore::EmptyFrameLoaderClient::shouldCacheResponse): Added an
113         implementation that always returns true.
114
115         * loader/FrameLoaderClient.h: Declared shouldCacheResponse().
116
117         * loader/ResourceLoader.h: Ditto.
118
119         * loader/cf/ResourceLoaderCFNet.cpp: Added.
120         (WebCore::ResourceLoader::shouldCacheResponse): Added. Calls through to
121         FrameLoaderClient::shouldCacheResponse().
122
123         * platform/network/ResourceHandleClient.h:
124         (WebCore::ResourceHandleClient::shouldCacheResponse): Added an
125         implementation that always returns true.
126
127         * platform/network/cf/ResourceHandleCFNet.cpp:
128         (WebCore::willCacheResponse): Added a call to
129         ResourceHandleClient::shouldCacheResponse(). If the client returns
130         false, return 0, which will prevent CFNetwork from caching the response.
131
132 2009-03-17  Alexey Proskuryakov  <ap@webkit.org>
133
134         Reviewed by Darin Adler.
135
136         https://bugs.webkit.org/show_bug.cgi?id=13287
137         Cannot change SELECT to a dynamically created option
138
139         Tests: fast/forms/add-and-remove-option.html
140                fast/forms/add-remove-option-modification-event.html
141                fast/forms/add-selected-option.html
142                fast/forms/select-cache-desynchronization.html
143
144         * dom/ContainerNode.cpp:
145         (WebCore::dispatchChildInsertionEvents): Increment DOM tree version. This will happen when
146         dispatching DOMSubtreeModified again, but the version should be incremented for event
147         listeners to have an up to date view of the DOM.
148         (WebCore::dispatchChildRemovalEvents): Ditto.
149
150         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::insertedIntoTree):
151         Make sure that the select element knows about its new selected option.
152
153         * html/HTMLOptionElement.h: Use insertedIntoTree() instead of insertedIntoDocument(),
154         because DOM also needs to be updated for forms that are not in document yet. Similar
155         problems exist for node removing, but removedFromTree() is called at a wrong time, so
156         those problems cannot be fixed without deeper refactoring.
157
158         * html/HTMLSelectElement.cpp:
159         (WebCore::HTMLSelectElement::setRecalcListItems): Reset m_activeSelectionAnchorIndex - it
160         doesn't make sense to keep the anchor after programmatically changing the selection, and
161         keeping it was causing a failure in fast/forms/listbox-selection.html.
162
163         * html/HTMLSelectElement.h: Removed overrides for ContainerNode methods that only called
164         base class versions.
165
166 2009-03-17  Steve Falkenburg  <sfalken@apple.com>
167
168         <rdar://problem/6690324> Accessing FTP sites reads unallocated memory, can result in garbled entries or crashes
169         
170         Reviewed by Darin Adler.
171
172         * loader/FTPDirectoryDocument.cpp:
173         (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine): Assign CString to a local while we hold pointers into it.
174
175 2009-03-16  David Hyatt  <hyatt@apple.com>
176
177         <rdar://problem/6648411> REGRESSION: Layout of page is wrong at http://www.popcap.com/
178
179         Make sure that the initial shouldPaint check that looks at enclosingLayers properly skips over
180         layers that don't paint themselves.  This is done by adding a new enclosingSelfPaintingLayer method
181         so that RenderObjects can walk up the enclosing layer chain and skip any layers that don't paint
182         themselves.
183
184         Reviewed by Darin Adler.
185
186         Added fast/block/float/overlapping-floats-with-overflow-hidden.html
187
188         * WebCore.base.exp:
189         * rendering/RenderBlock.cpp:
190         (WebCore::RenderBlock::addOverhangingFloats):
191         * rendering/RenderObject.cpp:
192         (WebCore::RenderObject::enclosingSelfPaintingLayer):
193         * rendering/RenderObject.h:
194
195 2009-03-17  Xan Lopez  <xlopez@igalia.com>
196
197         Reviewed by Holger Freyther.
198
199         https://bugs.webkit.org/show_bug.cgi?id=24592
200         [GTK] Crash in FcPatternHash
201
202         Style fixes.
203
204         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
205         (WebCore::FontPlatformData::operator=):
206         * platform/graphics/gtk/FontPlatformDataPango.cpp:
207
208 2009-03-17  Xan Lopez  <xlopez@igalia.com>
209
210         Reviewed by Holger Freyther.
211
212         https://bugs.webkit.org/show_bug.cgi?id=24592
213         [GTK] Crash in FcPatternHash
214
215         Sanitize memory management in pango fonts.
216
217         Release memory allocated by FontPlatformDataPango in its own
218         destructor instead of doing it from other classes, and add copy
219         constructor and '=' operator to be able to track referenced
220         objects properly.
221
222         * platform/graphics/gtk/FontPlatformDataPango.cpp:
223         (WebCore::FontPlatformData::~FontPlatformData):
224         (WebCore::FontPlatformData::operator=):
225         (WebCore::FontPlatformData::FontPlatformData):
226         * platform/graphics/gtk/SimpleFontDataPango.cpp:
227
228 2009-03-17  Darin Adler  <darin@apple.com>
229
230         Reviewed by Alexey Proskuryakov.
231
232         Bug 24624: Crash in imageLoadEventTimerFired after adoptNode used on <img>,
233         seen with inspector, which uses adoptNode
234         https://bugs.webkit.org/show_bug.cgi?id=24624
235         rdar://problem/6422850
236
237         Test: fast/dom/HTMLImageElement/image-load-cross-document.html
238
239         * dom/Document.cpp:
240         (WebCore::Document::Document): Removed m_imageLoadEventTimer.
241         (WebCore::Document::detach): Removed m_imageLoadEventDispatchSoonList and
242         m_imageLoadEventDispatchingList.
243         (WebCore::Document::implicitClose): Called ImageLoader::dispatchPendingLoadEvents
244         instead of dispatchImageLoadEventsNow.
245
246         * dom/Document.h: Removed ImageLoader, dispatchImageLoadEventSoon,
247         dispatchImageLoadEventsNow, removeImage, m_imageLoadEventDispatchSoonList,
248         m_imageLoadEventDispatchingList, m_imageLoadEventTimer, and imageLoadEventTimerFired.
249
250         * loader/ImageLoader.cpp:
251         (WebCore::loadEventSender): Added. Returns the single global ImageLoadEventSender
252         object used privately as the target of the load event timer.
253         (WebCore::ImageLoader::~ImageLoader): Call ImageLoadEventSender::cancelLoadEvent
254         rather than Document::removeImage.
255         (WebCore::ImageLoader::setImage): Use m_element directly, not element().
256         (WebCore::ImageLoader::updateFromElement): Ditto. Also name the local variable
257         document instead of doc.
258         (WebCore::ImageLoader::notifyFinished): Call ImageLoadEventSender::dispatchLoadEventSoon
259         rather than Document::dispatchImageLoadEventSoon.
260         (WebCore::ImageLoader::dispatchPendingLoadEvent): Added. Handles the common logic
261         about when load events can be dispatched so that dispatchLoadEvent only has to
262         have the specific part for each derived class. This includes a check that the
263         document is attached, which used to be handled by having documents empty out the
264         image load event vectors in the detach function.
265         (WebCore::ImageLoader::dispatchPendingLoadEvents): Added. Calls the appropriate
266         function on the ImageLoadEventSender, which avoids the need to have that class be
267         public in the ImageLoader header.
268         (WebCore::ImageLoadEventSender::ImageLoadEventSender): Added. Has the code that
269         was previously in the Document constructor.
270         (WebCore::ImageLoadEventSender::dispatchLoadEventSoon): Added. Has the code that
271         was previously in Document::dispatchImageLoadEventSoon.
272         (WebCore::ImageLoadEventSender::cancelLoadEvent): Added. Has the code that was
273         previously in Document::removeImage.
274         (WebCore::ImageLoadEventSender::dispatchPendingLoadEvents): Added. Has the code
275         that was previously in Document::dispatchImageLoadEventsNow.
276         (WebCore::ImageLoadEventSender::timerFired): Added. Calls dispatchPendingLoadEvents.
277
278         * loader/ImageLoader.h: Improved comments. Made the virtual functions private
279         or protected rather than public. Added static dispatchPendingLoadEvents function
280         for use by Document and private dispatchPendingLoadEvent function for use by
281         ImageLoadEventSender. Made setLoadingImage private and eliminated
282         setHaveFiredLoadEvent since that can all be done inside the class without any
283         member functions.
284
285         * html/HTMLImageLoader.cpp:
286         (WebCore::HTMLImageLoader::dispatchLoadEvent): Removed logic to check whether a
287         load event already fired and whether image() is 0. These are now both base class
288         responsibilities.
289         * svg/SVGImageLoader.cpp:
290         (WebCore::SVGImageLoader::dispatchLoadEvent): Ditto.
291         * wml/WMLImageLoader.cpp:
292         (WebCore::WMLImageLoader::dispatchLoadEvent): Ditto.
293
294 2009-03-17  Dimitri Glazkov  <dglazkov@chromium.org>
295
296         Reviewed by Timothy Hatcher.
297
298         https://bugs.webkit.org/show_bug.cgi?id=24623
299         Refactor ConsoleMessage to use ScriptFuncitonCall and eliminate JSC
300         dependencies.
301
302         * bindings/js/ScriptFunctionCall.cpp:
303         (WebCore::ScriptFunctionCall::appendArgument): Added uint and ScriptString-taking methods.
304         * bindings/js/ScriptFunctionCall.h:
305         * bindings/js/ScriptObjectQuarantine.cpp:
306         (WebCore::quarantineValue): Added generic ScriptValue quarantine helper.
307         * bindings/js/ScriptObjectQuarantine.h:
308         * bindings/js/ScriptValue.cpp:
309         (WebCore::ScriptValue::isEqual): Added.
310         * bindings/js/ScriptValue.h:
311         * inspector/ConsoleMessage.cpp:
312         (WebCore::ConsoleMessage::ConsoleMessage):
313         (WebCore::ConsoleMessage::addToConsole): Added.
314         (WebCore::ConsoleMessage::isEqual): Changed to use ScriptValue::isEqual.
315         * inspector/ConsoleMessage.h:
316         (WebCore::ConsoleMessage::incrementCount): Added.
317         * inspector/InspectorController.cpp:
318         (WebCore::InspectorController::addConsoleMessage): Changed to use ConsoleMessage::addToConsole.
319         (WebCore::InspectorController::populateScriptObjects): Ditto.
320         * inspector/InspectorController.h:
321
322 2009-03-17  Kevin Ollivier  <kevino@theolliviers.com>
323
324         Reviewed by Mark Rowe.
325
326         Get BUILDING_ON_* defines from Platform.h.
327         
328         https://bugs.webkit.org/show_bug.cgi?id=24630
329
330         * WebCorePrefix.h:
331
332 2009-03-16  Xan Lopez  <xlopez@igalia.com>
333
334         Reviewed by Holger Freyther.
335
336         https://bugs.webkit.org/show_bug.cgi?id=24592
337         [GTK] Crash in FcPatternHash
338
339         Sanitize memory management in gtk fonts.
340
341         Release memory allocated by FontPlatformDataGtk in its own
342         destructor instead of doing it from other classes, and add copy
343         constructor and '=' operator to be able to track referenced
344         objects properly.
345
346         * platform/graphics/gtk/FontPlatformData.h:
347         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
348         (WebCore::FontPlatformData::operator=):
349         (WebCore::FontPlatformData::FontPlatformData):
350         (WebCore::FontPlatformData::~FontPlatformData):
351         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
352         (WebCore::SimpleFontData::platformDestroy):
353
354 2009-03-17  Ariya Hidayat  <ariya.hidayat@nokia.com>
355
356         Build fix for Qt < 4.5.
357
358         As reported by Yael Aharon  <yael.aharon@nokia.com>
359
360         * platform/graphics/qt/GraphicsContextQt.cpp:
361         (WebCore::GraphicsContext::drawLine):
362
363 2009-03-17  Alexey Proskuryakov  <ap@webkit.org>
364
365         Reviewed by Sam Weinig.
366
367         https://bugs.webkit.org/show_bug.cgi?id=24614
368         Access control checks are different in cached and uncached cases
369
370         Test: http/tests/xmlhttprequest/access-control-basic-non-simple-deny-cached.html
371
372         * loader/CrossOriginAccessControl.cpp:
373         (WebCore::isOnAccessControlSimpleRequestMethodWhitelist): Factored out simple method
374         check for use in both cached and uncached cases. In cached case, an old definition that
375         omitted HEAD was still used.
376         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Check that content type has an
377         allowed value. This is needed in all call sites. Also changed to compare MIME type, not
378         content type.
379         (WebCore::isSimpleCrossOriginAccessRequest): Use the above methods.
380
381         * loader/CrossOriginAccessControl.h: Expose isOnAccessControlSimpleRequestMethodWhitelist.
382
383         * loader/CrossOriginPreflightResultCache.cpp:
384         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod):
385         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
386         Use the new checks for simple method and header.
387
388 2009-03-16  Gustavo Noronha Silva  <gns@gnome.org> and Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
389
390         Reviewed by Mark Rowe.
391
392         https://bugs.webkit.org/show_bug.cgi?id=24638
393         [GTK] HTML5 media tags do not work
394
395         Add a repaint-requested signal to the video sink, and use it to
396         call MediaPlayerPrivate::repaint, so that the video actually
397         plays.
398
399         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
400         (WebCore::mediaPlayerPrivateRepaintCallback):
401         (WebCore::MediaPlayerPrivate::createGSTPlayBin):
402         * platform/graphics/gtk/VideoSinkGStreamer.cpp:
403         (webkit_video_sink_idle_func):
404         (webkit_video_sink_render):
405         (webkit_video_sink_class_init):
406
407 2009-03-16  Gustavo Noronha Silva  <gns@gnome.org> and Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
408
409         Reviewed by Holger Freyther.
410
411         https://bugs.webkit.org/show_bug.cgi?id=24638
412         [GTK] HTML5 media tags do not work
413
414         Work-around the fact that gst_element_query_duration returns true even
415         though it is unable to figure out the duration when in stream (push)
416         mode.
417
418         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
419         (WebCore::MediaPlayerPrivate::duration):
420
421 2009-03-16  Darin Adler  <darin@apple.com>
422
423         Reviewed by Kevin Decker.
424
425         <rdar://problem/6642742> Top Sites malfunction when switching text zoom mode
426
427         * page/Frame.cpp:
428         (WebCore::Frame::setNeedsReapplyStyles): Don’t do anything if the frame is
429         currently showing a non-HTML view.
430
431 2009-03-16  Darin Adler  <darin@apple.com>
432
433         Reviewed by Adele Peterson.
434
435         Bug 24629: moving forward or backward a paragraph fails at edge of document
436         https://bugs.webkit.org/show_bug.cgi?id=24629
437         rdar://problem/6544413
438
439         Test: editing/selection/move-paragraph-document-edges.html
440
441         * editing/visible_units.cpp:
442         (WebCore::previousParagraphPosition): Use the last result from
443         previousLinePosition rather than going all the way back to what was originally
444         passed in when we hit exception cases like null or not moving. This correctly
445         inherits the behavior of previousLinePosition when we are in a paragraph at the
446         edge of a document.
447         (WebCore::nextParagraphPosition): Ditto.
448
449 2009-03-16  Darin Adler  <darin@apple.com>
450
451         Reviewed by Adele Peterson.
452
453         Bug 24619: RenderObject::selectionStartEnd does not need to be a virtual function
454         https://bugs.webkit.org/show_bug.cgi?id=24619
455
456         * rendering/RenderObject.h: Remove virtual keyword from selectionStartEnd declaration.
457         * rendering/RenderView.h: Ditto.
458
459 2009-03-16  Peter Kasting  <pkasting@google.com>
460
461         Reviewed by David Hyatt.
462
463         https://bugs.webkit.org/show_bug.cgi?id=24368
464         DOM scroll events should be based off the actual number of wheel
465         ticks, not off the number of lines scrolled.  This matches IE.
466
467         * dom/Node.cpp:
468         (WebCore::Node::dispatchWheelEvent):
469         * dom/WheelEvent.cpp:
470         (WebCore::WheelEvent::WheelEvent):
471         * dom/WheelEvent.h:
472         (WebCore::WheelEvent::create):
473         * platform/PlatformWheelEvent.h:
474         (WebCore::PlatformWheelEvent::wheelTicksX):
475         (WebCore::PlatformWheelEvent::wheelTicksY):
476         * platform/gtk/WheelEventGtk.cpp:
477         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
478         * platform/mac/WheelEventMac.mm:
479         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
480         * platform/qt/WheelEventQt.cpp:
481         * platform/win/WheelEventWin.cpp:
482         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
483         * platform/wx/MouseWheelEventWx.cpp:
484         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
485
486 2009-03-16  Simon Fraser  <simon.fraser@apple.com>
487
488         Reviewed by Eric Seidel
489         
490         Clean up a few issues in the Animation code:
491
492         * page/animation/AnimationBase.cpp:
493         (WebCore::AnimationBase::updateStateMachine):
494         Whitespace
495         
496         (WebCore::AnimationBase::willNeedService):
497         Don't round to float, use std::max
498
499         * page/animation/AnimationController.cpp:
500         (WebCore::AnimationControllerPrivate::startTimeResponse):
501         Fix erroneously copied line to null out m_lastResponseWaiter.
502
503 2009-03-12  David Hyatt  <hyatt@apple.com>
504
505         Reviewed by Eric Seidel
506
507         https://bugs.webkit.org/show_bug.cgi?id=13632
508
509         Overflow scrolling needs to account for the bottom/right padding on the object itself as well
510         as for bottom/right margins on children.
511
512         Existing tests cover this.
513
514         * rendering/RenderBlock.cpp:
515         (WebCore::RenderBlock::lowestPosition):
516         (WebCore::RenderBlock::rightmostPosition):
517
518 2009-03-16  Sam Weinig  <sam@webkit.org>
519
520         Reviewed by Anders Carlsson.
521
522         Fix for <rdar://problem/6320555>
523         Add an upper limit for setting HTMLSelectElement.length.
524
525         Test: fast/forms/select-max-length.html
526
527         * html/HTMLSelectElement.cpp:
528         (WebCore::HTMLSelectElement::setOption):
529         (WebCore::HTMLSelectElement::setLength):
530
531 2009-03-16  Eric Carlson  <eric.carlson@apple.com>
532
533         Reviewed by Simon Fraser.
534
535         <rdar://problem/6686721> Media document crash in 64-bit WebKit
536
537         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
538         (WebCore::MediaPlayerPrivate::createQTMovieView): QTMovieContentViewClass is only used when
539         rendering inline with old versions of QuickTime, so don't look for it when we are in a 
540         media document.
541
542 2009-03-16  Dimitri Glazkov  <dglazkov@chromium.org>
543
544         Reviewed by Timothy Hatcher.
545
546         https://bugs.webkit.org/show_bug.cgi?id=24590
547         Refactor InspectorDOMStorageResource to use ScriptFunctionCall.
548
549         * bindings/js/ScriptFunctionCall.cpp:
550         (WebCore::ScriptFunctionCall::appendArgument): Added method for bool argument.
551         * bindings/js/ScriptFunctionCall.h: Ditto, also cleaned up.
552         * bindings/js/ScriptObjectQuarantine.cpp:
553         (WebCore::getQuarantinedScriptObject): Added Storage helper.
554         * bindings/js/ScriptObjectQuarantine.h: Ditto.
555         * inspector/InspectorController.cpp:
556         (WebCore::InspectorController::populateScriptObjects): Changed to use bind method.
557         (WebCore::InspectorController::resetScriptObjects): Changed to use unbind method.
558         (WebCore::InspectorController::didUseDOMStorage): Changed to use isSameHostAndType and bind methods.
559         * inspector/InspectorController.h: Removed add/remove methods for DOM storage.
560         * inspector/InspectorDOMStorageResource.cpp:
561         (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
562         (WebCore::InspectorDOMStorageResource::isSameHostAndType): Added.
563         (WebCore::InspectorDOMStorageResource::bind): Added.
564         (WebCore::InspectorDOMStorageResource::unbind): Added.
565         * inspector/InspectorDOMStorageResource.h:
566
567 2009-03-16   Mike Belshe  <mike@belse.com>
568
569         Reviewed by Dimitri Glazkov.
570
571         https://bugs.webkit.org/show_bug.cgi?id=24580
572         Fix query() to match KURL behavior, this time with the code that
573         compiles.
574
575         * platform/KURLGoogle.cpp:
576         (WebCore::KURL::query): Fix copy/paste mistake.
577
578 2009-03-16  Alexey Proskuryakov  <ap@webkit.org>
579
580         Reviewed by Darin Adler.
581
582         https://bugs.webkit.org/show_bug.cgi?id=21752
583         REGRESSION: referencing XHR constructor for a not yet loaded frame permanently breaks it
584
585         Test: fast/dom/Window/window-early-properties-xhr.html
586
587         For some transitions, the Window object is not replaced, but Document is. When this happened,
588         window.document property was updated, but references to Document kept in cached constructors
589         were not.
590
591         * bindings/js/JSAudioConstructor.cpp:
592         (WebCore::JSAudioConstructor::JSAudioConstructor):
593         (WebCore::JSAudioConstructor::document):
594         (WebCore::JSAudioConstructor::mark):
595         * bindings/js/JSAudioConstructor.h:
596         * bindings/js/JSImageConstructor.cpp:
597         (WebCore::JSImageConstructor::JSImageConstructor):
598         (WebCore::JSImageConstructor::document):
599         (WebCore::JSImageConstructor::mark):
600         * bindings/js/JSImageConstructor.h:
601         * bindings/js/JSMessageChannelConstructor.cpp:
602         (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
603         (WebCore::JSMessageChannelConstructor::scriptExecutionContext):
604         (WebCore::JSMessageChannelConstructor::mark):
605         * bindings/js/JSMessageChannelConstructor.h:
606         * bindings/js/JSOptionConstructor.cpp:
607         (WebCore::JSOptionConstructor::JSOptionConstructor):
608         (WebCore::JSOptionConstructor::document):
609         (WebCore::JSOptionConstructor::mark):
610         * bindings/js/JSOptionConstructor.h:
611         * bindings/js/JSXMLHttpRequestConstructor.cpp:
612         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
613         (WebCore::JSXMLHttpRequestConstructor::scriptExecutionContext):
614         (WebCore::JSXMLHttpRequestConstructor::mark):
615         * bindings/js/JSXMLHttpRequestConstructor.h:
616         Changed cached constructors to keep a reference to Window, not Document.
617
618 2009-03-15  Alexey Proskuryakov  <ap@webkit.org>
619
620         Reviewed by Darin Adler.
621
622         https://bugs.webkit.org/show_bug.cgi?id=24549
623         Impose a limit on Access-Control-Max-Age value
624
625         * loader/CrossOriginPreflightResultCache.cpp:
626         (WebCore::CrossOriginPreflightResultCacheItem::parse):
627
628 2009-03-15  Greg Bolsinga  <bolsinga@apple.com>
629
630         Reviewed by David Kilzer.
631
632         <rdar://problem/6668875> Normalize Geolocation results
633
634         * platform/mac/GeolocationServiceMac.mm:
635         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
636
637 2009-03-15  Greg Bolsinga  <bolsinga@apple.com>
638
639         Reviewed by David Kilzer.
640
641         Update ::toString format as suggested by Darin Adler.
642
643         * page/Geoposition.cpp:
644         (WebCore::Geoposition::toString):
645
646 2009-03-15  David Kilzer  <ddkilzer@apple.com>
647
648         <rdar://problem/6668238> WebCore is registering text encodings needlessly from KURL constructor.
649
650         Reviewed by Darin Adler.
651
652         Yet another case where we would trigger extended encoding loading needlessly.
653
654         * platform/text/TextEncoding.cpp:
655         (WebCore::TextEncoding::encodingForFormSubmission):
656
657 2009-03-15  Simon Fraser  <simon.fraser@apple.com>
658
659         Build fix: no review.
660
661         * rendering/style/ContentData.h:
662
663 2009-03-15  David Kilzer  <ddkilzer@apple.com>
664
665         Bug 24542: Improve ContentData encapsulation
666
667         <https://bugs.webkit.org/show_bug.cgi?id=24542>
668
669         Reviewed by Simon Fraser.
670
671         No tests since there is no change in behavior.
672
673         * rendering/RenderObject.cpp:
674         (WebCore::RenderObject::createObject): Used getter methods
675         instead of data members on ContentData class.  Used isImage()
676         convenience method.
677         * rendering/RenderObjectChildList.cpp:
678         (WebCore::RenderObjectChildList::updateBeforeAfterContent): Ditto.
679
680         * rendering/style/ContentData.cpp:
681         (WebCore::ContentData::clear): Extracted code into
682         deleteContent() method.
683         (WebCore::ContentData::dataEquivalent): Added.  Extracted code
684         from StyleRareNonInheritedData::contentDataEquivalent().
685         (WebCore::ContentData::deleteContent): Added.  Used by setter
686         methods.
687         * rendering/style/ContentData.h: Made m_type, m_content and
688         m_next private.
689         (WebCore::ContentData::isCounter): Added.
690         (WebCore::ContentData::isImage): Added.
691         (WebCore::ContentData::isNone): Added.
692         (WebCore::ContentData::isText): Added.
693         (WebCore::ContentData::type): Added.
694         (WebCore::ContentData::dataEquivalent): Added.
695         (WebCore::ContentData::image): Added.
696         (WebCore::ContentData::setImage): Added.
697         (WebCore::ContentData::text): Added.
698         (WebCore::ContentData::setText): Added.
699         (WebCore::ContentData::counter): Added.
700         (WebCore::ContentData::setCounter): Added.
701         (WebCore::ContentData::next): Added.
702         (WebCore::ContentData::setNext): Added.
703
704         * rendering/style/CounterContent.h:
705         (WebCore::operator!=): Removed.
706         (WebCore::operator==): Renamed operator!=() and reversed its
707         logic after extracting code from
708         StyleRareNonInheritedData::contentDataEquivalent() to create
709         ContentData::dataEquivalent().
710
711         * rendering/style/RenderStyle.cpp:
712         (WebCore::RenderStyle::setContent): Used new getters and setters
713         on ContentData class.  Changed first argument from a StringImpl*
714         to a PassRefPtr<StrimgImpl>.  Used isText() convenience method.
715         * rendering/style/RenderStyle.h:
716         (WebCore::RenderStyle::setContent): Updated declaration.
717         * rendering/style/StyleRareNonInheritedData.cpp:
718         (WebCore::StyleRareNonInheritedData::contentDataEquivalent):
719         Extracted most logic in while() loop into
720         ContentData::dataEquivalent().
721
722 2009-03-15  Gustavo Noronha Silva  <gns@gnome.org>
723
724         Reviewed by Anders Carlsson.
725
726         https://bugs.webkit.org/show_bug.cgi?id=24602
727         [Gtk] Searching in thepiratebay.org doesn't work with more than 1 word
728
729         Reintroduce the URI into the soup message after having set it in
730         the KURL, on redirects, to make sure it is properly encoded. This
731         fixes bad request problems when servers give bad URIs on their
732         response's Location header.
733
734         * platform/network/soup/ResourceHandleSoup.cpp:
735         (WebCore::restartedCallback):
736
737 2009-03-15  Alexey Proskuryakov  <ap@webkit.org>
738
739         Reviewed by Darin Adler.
740
741         https://bugs.webkit.org/show_bug.cgi?id=19737
742         No cursor and paste not enabled right clicking text field/area
743
744         Test: fast/events/right-click-focus.html
745
746         * page/EventHandler.cpp:
747         (WebCore::EventHandler::handleMousePressEventSingleClick):
748         (WebCore::EventHandler::handleMousePressEvent):
749         Take normal code path for right clicks (we were taking it for Ctrl-clicks anyway).
750
751 2009-03-15  Alexey Proskuryakov  <ap@webkit.org>
752
753         Reviewed by Adele Peterson.
754
755         https://bugs.webkit.org/show_bug.cgi?id=23949
756         HTMLSelectElement is in inconsistent state when handling mutation events
757
758         Test: fast/forms/mutation-event-recalc.html
759
760         * dom/ContainerNode.cpp:
761         (WebCore::ContainerNode::insertBefore):
762         (WebCore::ContainerNode::appendChild):
763         Call childrenChanged() before dispatching modification events, not after.
764
765         * html/HTMLOptGroupElement.cpp:
766         (WebCore::HTMLOptGroupElement::insertBefore):
767         (WebCore::HTMLOptGroupElement::replaceChild):
768         (WebCore::HTMLOptGroupElement::removeChild):
769         (WebCore::HTMLOptGroupElement::appendChild):
770         (WebCore::HTMLOptGroupElement::removeChildren):
771         * html/HTMLSelectElement.cpp:
772         (WebCore::HTMLSelectElement::add):
773         (WebCore::HTMLSelectElement::remove):
774         (WebCore::HTMLSelectElement::insertBefore):
775         (WebCore::HTMLSelectElement::replaceChild):
776         (WebCore::HTMLSelectElement::removeChild):
777         (WebCore::HTMLSelectElement::appendChild):
778         (WebCore::HTMLSelectElement::removeChildren):
779         Remove calls to recalcSelectOptions(). It is too late to recalc now, after mutation events
780         were already dispatched.
781
782 2009-03-14  Greg Bolsinga  <bolsinga@apple.com>
783
784         <rdar://problem/6683465>
785
786         Geolocation has to be able to handle NULL Frames.
787
788         Reviewed by Mark Rowe
789     
790 2009-03-14  Greg Bolsinga  <bolsinga@apple.com>
791
792         Reviewed by David Kilzer.
793
794         Geoposition::toString was missing the Coordinates after the update.
795
796         * page/Geoposition.cpp:
797         (WebCore::Geoposition::toString):
798
799 2009-03-14  Jan Michael Alonzo  <jmalonzo@webkit.org>
800
801         Reviewed by Mark Rowe.
802
803         [Gtk] Build fix - pass a Coordinate to Geoposition::create
804         https://bugs.webkit.org/show_bug.cgi?id=24603
805
806         Gtk build fix per r41650
807         https://bugs.webkit.org/show_bug.cgi?id=24506
808         Geolocation in Safari differs from the spec, no Coordinates attribute on Position
809
810         Pass a Coordinate to Geoposition::create.
811
812         * platform/gtk/GeolocationServiceGtk.cpp:
813         (WebCore::GeolocationServiceGtk::updatePosition):
814
815 2009-03-14  Alexey Proskuryakov  <ap@webkit.org>
816
817         Reviewed by Darin Adler.
818
819         https://bugs.webkit.org/show_bug.cgi?id=24545
820         Make cross-site XHR simple request definition match current spec draft
821
822         Tests: http/tests/xmlhttprequest/access-control-basic-post-fail-non-simple-content-type.html
823                http/tests/xmlhttprequest/access-control-basic-whitelist-request-headers.html
824
825         * loader/CrossOriginAccessControl.cpp:
826         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Added Content-Language.
827         (WebCore::isSimpleCrossOriginAccessRequest): Added HEAD. Restricted content types to those
828         that could be sent via form submission.
829
830 2009-03-14  Alexey Proskuryakov  <ap@webkit.org>
831
832         Reviewed by Darin Adler.
833
834         https://bugs.webkit.org/show_bug.cgi?id=15172
835         object fallback - empty string for first argument of setAttributeNS does not work like null
836
837         https://bugs.webkit.org/show_bug.cgi?id=24548
838         createElementNS("", name) should create an element in null namespace
839
840         Tests: fast/dom/createElementNS-empty-namespace.html
841                fast/dom/setAttributeNS-empty-namespace.html
842
843         * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
844         Convert empty namespaces to null.
845
846 2009-03-13  Mark Rowe  <mrowe@apple.com>
847
848         Rubber-stamped by Dan Bernstein.
849
850         Take advantage of the ability of recent versions of Xcode to easily switch the active
851         architecture.
852
853         * Configurations/DebugRelease.xcconfig:
854
855 2009-03-13  John Abd-El-Malek  <jam@google.com>
856
857         Reviewed by Darin Fisher.
858
859         https://bugs.webkit.org/show_bug.cgi?id=24593
860         Added requestorID so we can track the request to its WebView without using frame (which was removed).
861
862         * platform/network/chromium/ResourceRequest.h:
863         (WebCore::ResourceRequest::ResourceRequest):
864         (WebCore::ResourceRequest::requestorID):
865         (WebCore::ResourceRequest::setRequestorID):
866         (WebCore::ResourceRequest::setTargetType):
867         (WebCore::ResourceRequest::policyURL):
868         (WebCore::ResourceRequest::setPolicyURL):
869         (WebCore::ResourceRequest::requestorPid):
870         (WebCore::ResourceRequest::setRequestorPid):
871
872 2009-03-13  Mike Belshe  <mike@belshe.com>
873
874         Reviewed by Dimitri Glazkov.
875
876         https://bugs.webkit.org/show_bug.cgi?id=24561
877         Add custom V8 bindings for HTMLElementCanvas, Location.
878
879         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: Added.
880         * bindings/v8/custom/V8LocationCustom.cpp: Added.
881
882 2009-03-13  Stephen White  <senorblanco@chromium.org>
883
884         Reviewed by Eric Seidel.
885
886         https://bugs.webkit.org/show_bug.cgi?id=24584
887
888         Fix transparent text rendering on Chromium.  FontChromiumWin
889         was calling beginTransparencyLayer()/endTransparencyLayer(), with
890         a TransparencyWin inside to do GDI ClearType rendering over an
891         opaque background.  TransparencyWin does its special sauce
892         in the destructor, but it was being called too late to be used
893         correctly in the layer.  Put the special sauce into a new function,
894         composite(), and call that explicitly instead.
895
896         * platform/graphics/chromium/FontChromiumWin.cpp:
897         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
898         * platform/graphics/chromium/TransparencyWin.cpp:
899         (WebCore::TransparencyWin::~TransparencyWin):
900         (WebCore::TransparencyWin::composite):
901         (WebCore::TransparencyWin::init):
902         * platform/graphics/chromium/TransparencyWin.h:
903         * rendering/RenderThemeChromiumWin.cpp:
904         (WebCore::):
905
906 2009-03-13  Mike Belshe  <mike@belshe.com>
907
908         Reviewed by Dimitri Glazkov.
909
910         https://bugs.webkit.org/show_bug.cgi?id=24562
911         Add custom implementation for getCSSCanvasContext to V8 bindings.
912
913         * bindings/v8/custom/V8DocumentCustom.cpp: Added new method.
914
915 2009-03-13  Mike Belshe  <mike@belse.com>
916
917         Reviewed by Dimitri Glazkov.
918
919         https://bugs.webkit.org/show_bug.cgi?id=24580
920         Fix query() to match KURL behavior.
921
922         * platform/KURLGoogle.cpp:
923         (WebCore::KURL::query): remove extra logic around question mark.
924
925 2009-03-13  Chris Fleizach  <cfleizach@apple.com>
926
927         Reviewed by Beth Dakin.
928
929         Bug 24474: AX: in multi-body tables, asking for a cell at a specific coordinate can return nil
930         https://bugs.webkit.org/show_bug.cgi?id=24474
931
932         Test: platform/mac-snowleopard/accessibility/table-multi-bodies.html
933
934         * page/AccessibilityTable.cpp:
935         (WebCore::AccessibilityTable::cellForColumnAndRow):
936
937 2009-03-13  Jian Li  <jianli@chromium.org>
938
939         Reviewed by Dimitri Glazkov.
940
941         https://bugs.webkit.org/show_bug.cgi?id=24589
942         Upstream changes to V8 event listeners (Chromium r11133) in order to
943         fix worker functionality break in Chromium.
944
945         * bindings/v8/V8AbstractEventListener.cpp:
946         (WebCore::V8AbstractEventListener::invokeEventHandler):
947         (WebCore::V8AbstractEventListener::handleEvent):
948         * bindings/v8/V8AbstractEventListener.h:
949         * bindings/v8/V8WorkerContextEventListener.cpp:
950         (WebCore::V8WorkerContextEventListener::handleEvent):
951
952 2009-03-13  Dimitri Glazkov  <dglazkov@chromium.org>
953
954         Reviewed by Timothy Hatcher.
955
956         https://bugs.webkit.org/show_bug.cgi?id=24524
957         Introduce ScriptObject and ScriptFunctionCall abstractions.
958
959         * GNUmakefile.am: Added ScriptObject and ScriptFunctionCall to project.
960         * WebCore.pro: Ditto.
961         * WebCore.vcproj/WebCore.vcproj: Ditto.
962         * WebCore.xcodeproj/project.pbxproj: Ditto.
963         * WebCoreSources.bkl: Ditto.
964         * bindings/js/ScriptFunctionCall.cpp: Added.
965         * bindings/js/ScriptFunctionCall.h: Added.
966         * bindings/js/ScriptObject.cpp: Added.
967         * bindings/js/ScriptObject.h: Added.
968         * bindings/js/ScriptObjectQuarantine.cpp: Added.
969         * bindings/js/ScriptObjectQuarantine.h: Added.
970         * inspector/InspectorController.cpp:
971         (WebCore::InspectorController::populateScriptObjects): Changed to use InspectorDatabaseResource::bind.
972         (WebCore::InspectorController::resetScriptObjects): Changed to use InspectorDatabaseResource::unbind.
973         (WebCore::InspectorController::didOpenDatabase): Changed to use InspectorDatabaseResource::unbind.
974         * inspector/InspectorController.h: Removed addScriptDatabaseResource and
975         removeScriptDatabaseResource declarations.
976         * inspector/InspectorDatabaseResource.cpp:
977         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
978         (WebCore::InspectorDatabaseResource::bind): Added.
979         (WebCore::InspectorDatabaseResource::unbind): Added.
980         * inspector/InspectorDatabaseResource.h: Added bind and unbind declarations.
981
982 2009-03-13  Peter Kasting  <pkasting@google.com>
983
984         Reviewed by Eric Seidel.
985
986         https://bugs.webkit.org/show_bug.cgi?id=24467
987         Make Skia drawRect() and stroke behavior match CG.
988
989         This makes drawRect() ignore the stroke width (like CG does), and
990         adds a warning comment about that to the appropriate header.
991
992         It also eliminates some hacky code in Skia's stroke preparation,
993         which tried to adjust odd-width strokes to fall on pixel boundaries.
994         Not only did this not match CG, it wouldn't necessarily work right,
995         because there could be other transforms (e.g. full-page zoom) that
996         would affect the stroke before it reached the device pixel level.
997
998         * platform/graphics/GraphicsContext.h:
999         * platform/graphics/skia/GraphicsContextSkia.cpp:
1000         (WebCore::GraphicsContext::drawRect):
1001         (WebCore::GraphicsContext::fillRect):
1002         * platform/graphics/skia/PlatformContextSkia.cpp:
1003         (PlatformContextSkia::drawRect):
1004         (PlatformContextSkia::setupPaintForStroking):
1005
1006 2009-03-13  Jian Li  <jianli@chromium.org>
1007
1008         Reviewed by Dimitri Glazkov.
1009
1010         https://bugs.webkit.org/show_bug.cgi?id=24583
1011         Need to change scope of constructor and destructor of V8ObjectEventListener from private
1012         to protected so that they could be used in its derived class V8WorkerContextEventListener.
1013
1014         * bindings/v8/V8ObjectEventListener.h:
1015
1016 2009-03-13  David Levin  <levin@chromium.org>
1017
1018         Reviewed by Dimitri Glazkov.
1019
1020         https://bugs.webkit.org/show_bug.cgi?id=24579
1021         Many V8*Event* files are misplaced.
1022
1023         This code is infrastructure for supporting the bindings and thus should
1024         be in the bindings/v8 directory.
1025
1026         * bindings/v8/V8AbstractEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8AbstractEventListener.cpp.
1027         * bindings/v8/V8AbstractEventListener.h: Renamed from WebCore/bindings/v8/custom/V8AbstractEventListener.h.
1028         * bindings/v8/V8LazyEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8LazyEventListener.cpp.
1029         * bindings/v8/V8LazyEventListener.h: Renamed from WebCore/bindings/v8/custom/V8LazyEventListener.h.
1030         * bindings/v8/V8ObjectEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8ObjectEventListener.cpp.
1031         * bindings/v8/V8ObjectEventListener.h: Renamed from WebCore/bindings/v8/custom/V8ObjectEventListener.h.
1032         * bindings/v8/V8WorkerContextEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8WorkerContextEventListener.cpp.
1033         * bindings/v8/V8WorkerContextEventListener.h: Renamed from WebCore/bindings/v8/custom/V8WorkerContextEventListener.h.
1034
1035 2009-03-13  Adele Peterson  <adele@apple.com>
1036
1037         Reviewed by Justin Garcia.
1038
1039         Fix for <rdar://problem/5089327> Color of quoted content is wrong when pasted inside other quoted content
1040
1041         Test: editing/pasteboard/5089327.html
1042
1043         Handle spans being pasted within a quoted region in the same way we handle "paste as quotation" content.
1044
1045         * editing/ReplaceSelectionCommand.cpp:
1046         (WebCore::handleStyleSpansBeforeInsertion):
1047         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
1048
1049 2009-03-13  Greg Bolsinga  <bolsinga@apple.com>
1050
1051         Reviewed by Simon Fraser.
1052
1053         Update Geolocation perimission dialogs to be asynchronous.
1054         https://bugs.webkit.org/show_bug.cgi?id=24505
1055
1056         Geolocation now requests permission from the Chrome asynchronously.
1057         The Chrome is passed the Geolocation object, and the Chrome sets the permission
1058         on the Geolocation. Geolocation also tracks if the Chrome should clear its cache
1059         of SecurityOrigins with geolocation permission. This is so that the GeolocationService
1060         can inform the Chrome of its request, and the Chrome is also free to implement its
1061         own policy.
1062         
1063         * WebCore.base.exp:
1064         * WebCore.xcodeproj/project.pbxproj:
1065         * page/Chrome.cpp:
1066         (WebCore::Chrome::requestGeolocationPermissionForFrame):
1067         * page/Chrome.h:
1068         * page/ChromeClient.h:
1069         (WebCore::ChromeClient::requestGeolocationPermissionForFrame):
1070         * page/Geolocation.cpp:
1071         (WebCore::Geolocation::Geolocation):
1072         (WebCore::Geolocation::getCurrentPosition):
1073         (WebCore::Geolocation::watchPosition):
1074         (WebCore::Geolocation::setIsAllowed):
1075         (WebCore::Geolocation::displayChallengeIfNecessary):
1076         (WebCore::Geolocation::geolocationServicePositionChanged):
1077         * page/Geolocation.h:
1078         (WebCore::Geolocation::isAllowed):
1079         (WebCore::Geolocation::setShouldClearCache):
1080         (WebCore::Geolocation::shouldClearCache):
1081         (WebCore::Geolocation::):
1082
1083 2009-03-13  Anders Carlsson  <andersca@apple.com>
1084
1085         Reviewed by Dan Bernstein.
1086
1087         <rdar://problem/6610666> Revise the Cocoa event model text API
1088         
1089         Add a NPCocoaEventTextInput event type. Remove the text input variables.
1090         
1091         * bridge/npapi.h:
1092         (_NPCocoaEvent::):
1093
1094 2009-03-13  Kevin Decker  <kdecker@apple.com>
1095
1096         Reviewed by Anders.
1097
1098         <rdar://problem/6630340> REGRESSION (39114-39115): Unity Web Player no longer works if Flip4Mac is also installed
1099         
1100         The code assumed if we have a plug-in that supports "application/x-oleobject" we should always prefer the object tag
1101         over of an embed tag. That assumption can cause the Mac platform to load the wrong plug-in, as Flip4Mac claims supports
1102         for x-oleobject.
1103         
1104         * rendering/RenderPartObject.cpp:
1105         (WebCore::shouldUseEmbedDescendant): Made the Mac platform always return true here. 
1106
1107 2009-03-13  Jian Li  <jianli@chromium.org>
1108
1109         Reviewed by Dimitri Glazkov.
1110
1111         https://bugs.webkit.org/show_bug.cgi?id=24559
1112         Need to port JSC fix (r41565) to V8 in order to fix layout test onload-single-line-comment.html.
1113
1114         * bindings/v8/custom/V8LazyEventListener.cpp:
1115         (WebCore::V8LazyEventListener::getListenerFunction):
1116         (WebCore::V8LazyEventListener::getWrappedListenerFunction):
1117
1118 2009-03-13  Jian Li  <jianli@chromium.org>
1119
1120         Reviewed by Dimitri Glazkov.
1121
1122         https://bugs.webkit.org/show_bug.cgi?id=24557
1123         This is to support running multiple workers in a single worker process in chromium.
1124
1125         * bindings/v8/custom/V8WorkerContextEventListener.cpp:
1126         (WebCore::V8WorkerContextEventListener::handleEvent):
1127         Add locker to v8 event listener of worker context.
1128
1129 2009-03-13  Alexey Proskuryakov  <ap@webkit.org>
1130
1131         Reviewed by Sam Weinig.
1132
1133         https://bugs.webkit.org/show_bug.cgi?id=24575
1134         XHR response is incorrect after a network error.
1135
1136         Tests: http/tests/xmlhttprequest/cross-site-denied-response-sync-2.html
1137                http/tests/xmlhttprequest/cross-site-denied-response-sync.html
1138                http/tests/xmlhttprequest/cross-site-denied-response.html
1139
1140         * xml/XMLHttpRequest.cpp:
1141         (WebCore::XMLHttpRequest::networkError): Call internalAbort() to fully reset the request.
1142         (WebCore::XMLHttpRequest::didFailRedirectCheck): No need to call internalAbort() here. Note
1143         that since internalAbort() can drop GC protection, it is not safe to use the object after
1144         this call.
1145         (WebCore::XMLHttpRequest::didReceiveData): Check that the request wasn't aborted, and
1146         return early if it was. This can happen during sync requests, as the loader does not know
1147         that it was aborted, and just synthesizes all callbacks.
1148
1149 2009-03-13  Adam Bergkvist <adam.bergkvist@ericsson.com>
1150
1151         Reviewed by Alexey Proskuryakov.
1152
1153         https://bugs.webkit.org/show_bug.cgi?id=3547
1154         XMLHttpRequest.statusText returns always "OK"
1155
1156         Covered by existing tests (which now pass on all platforms but Mac).
1157
1158         * xml/XMLHttpRequest.cpp:
1159         (WebCore::XMLHttpRequest::statusText): Return ResourceResponse status text. It is now up
1160         to each platform to correctly set the status text or set it to "OK" to retain current
1161         behavior.
1162
1163 2009-03-13  Adam Bergkvist <adam.bergkvist@ericsson.com>
1164
1165         Reviewed by Alexey Proskuryakov.
1166
1167         https://bugs.webkit.org/show_bug.cgi?id=24349
1168         [QT] HTTP status text is never set
1169
1170         Set HTTP status text to the reason phrase attribute of QNetworkReply.
1171
1172         * platform/network/qt/QNetworkReplyHandler.cpp:
1173         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1174
1175 2009-03-12  Simon Fraser  <simon.fraser@apple.com>
1176
1177         Reviewed by Mark Rowe
1178
1179         <rdar://problem/6622300>: Reproducible crash on
1180         <http://www.editgrid.com/explore/tnc/dave/FusionChart%3A_Candlestick>
1181         
1182         Prevent CSSStyleSheet::checkLoaded() writing to freed memory when it gets
1183         deleted from under itself. The sheetLoaded() notification can allow scripts
1184         to run via HTMLTokenizer::executeScriptsWaitingForStylesheets(),
1185         which can cause the last ref to the CSSStyleSheet to be released.
1186
1187         * css/CSSStyleSheet.cpp:
1188         (WebCore::CSSStyleSheet::checkLoaded):
1189
1190 2009-03-12  Kevin Ollivier  <kevino@theolliviers.com>
1191
1192         wx build fix. Allow make-generated-sources.sh to pass args down to DerivedSources.make
1193
1194         * make-generated-sources.sh:
1195
1196 2009-03-12  Adam Treat  <adam.treat@torchmobile.com>
1197
1198         Reviewed by Oliver Hunt.
1199
1200         https://bugs.webkit.org/show_bug.cgi?id=24498
1201         Fix the Qt port to use the same algorithm for drawing dashed and dotted
1202         borders as the other ports.  This makes the Qt port pixel-for-pixel perfect
1203         compared to border drawing with Apple's canonical mac port and much closer
1204         to konqueror and firefox behavior.
1205
1206         * platform/graphics/qt/GraphicsContextQt.cpp:
1207         (WebCore::GraphicsContext::drawLine):
1208
1209 2009-02-26  Eric Seidel  <eric@webkit.org>
1210
1211         Reviewed by Justin Garcia.
1212
1213         Clean up DOMSelection to use some helper functions
1214         making the code smaller, and less error-prone.
1215         https://bugs.webkit.org/show_bug.cgi?id=19221
1216
1217         I tried moving DOMSelection off of rangeCompliantEquivalent
1218         but failed.  VisibleSelection holds positions like (table, 1) to mean
1219         "after the table".
1220
1221         * page/DOMSelection.cpp:
1222         (WebCore::DOMSelection::visibleSelection):
1223         (WebCore::anchorPosition):
1224         (WebCore::focusPosition):
1225         (WebCore::basePosition):
1226         (WebCore::extentPosition):
1227         (WebCore::DOMSelection::anchorNode):
1228         (WebCore::DOMSelection::anchorOffset):
1229         (WebCore::DOMSelection::focusNode):
1230         (WebCore::DOMSelection::focusOffset):
1231         (WebCore::DOMSelection::baseNode):
1232         (WebCore::DOMSelection::baseOffset):
1233         (WebCore::DOMSelection::extentNode):
1234         (WebCore::DOMSelection::extentOffset):
1235         * page/DOMSelection.h:
1236
1237 2009-03-12  Dmitry Titov  <dimich@chromium.org>
1238
1239         Reviewed by Dimitri Glazkov.
1240
1241         https://bugs.webkit.org/show_bug.cgi?id=24563
1242         Change ResourceRequest to be a struct rather then a class to match other declarations.
1243
1244         * platform/network/chromium/ResourceRequest.h:
1245
1246 2009-03-12  David Levin  <levin@chromium.org>
1247
1248         Reviewed by  Darin Fisher.
1249
1250         Bug 24530: width100percent-searchfield.html should be fixed for chromium.
1251         <https://bugs.webkit.org/show_bug.cgi?id=24530>
1252
1253         Compensate for r39924 in chromium, which broke LayoutTests/fast/replaced/width100percent-searchfield.html
1254
1255         * css/themeChromiumWin.css: Added.
1256         Overrides the changes to start supporting input[type="search"] on Windows (since
1257         Chromium doesn't do anything special for this).
1258
1259         * rendering/RenderThemeChromiumWin.cpp:
1260         (WebCore::supportsFocus):
1261         (WebCore::RenderThemeChromiumWin::extraDefaultStyleSheet):
1262         (WebCore::RenderThemeChromiumWin::determineState):
1263         (WebCore::RenderThemeChromiumWin::getThemeData):
1264
1265 2009-03-12  Greg Bolsinga  <bolsinga@apple.com>
1266
1267         Reviewed by Antti Koivisto.
1268
1269         https://bugs.webkit.org/show_bug.cgi?id=24506
1270         Geolocation in Safari differs from the spec, no Coordinates attribute on Position
1271         
1272         Get up to date.
1273
1274         * DerivedSources.make:
1275         * GNUmakefile.am:
1276         * WebCore.pro:
1277         * WebCore.scons:
1278         * WebCore.vcproj/WebCore.vcproj:
1279         * WebCore.xcodeproj/project.pbxproj:
1280         * WebCoreSources.bkl:
1281         * bindings/js/JSGeolocationCustom.cpp:
1282         (WebCore::createPositionOptions):
1283         * page/Coordinates.cpp: Added.
1284         (WebCore::Coordinates::toString):
1285         * page/Coordinates.h: Added.
1286         (WebCore::Coordinates::create):
1287         (WebCore::Coordinates::latitude):
1288         (WebCore::Coordinates::longitude):
1289         (WebCore::Coordinates::altitude):
1290         (WebCore::Coordinates::accuracy):
1291         (WebCore::Coordinates::altitudeAccuracy):
1292         (WebCore::Coordinates::heading):
1293         (WebCore::Coordinates::speed):
1294         (WebCore::Coordinates::Coordinates):
1295         * page/Coordinates.idl: Added.
1296         * page/Geoposition.cpp:
1297         (WebCore::Geoposition::toString):
1298         * page/Geoposition.h:
1299         (WebCore::Geoposition::create):
1300         (WebCore::Geoposition::coords):
1301         (WebCore::Geoposition::Geoposition):
1302         * page/Geoposition.idl:
1303         * page/PositionOptions.h:
1304         (WebCore::PositionOptions::create):
1305         (WebCore::PositionOptions::maximumAge):
1306         (WebCore::PositionOptions::setMaximumAge):
1307         (WebCore::PositionOptions::PositionOptions):
1308         * platform/mac/GeolocationServiceMac.mm:
1309         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
1310
1311 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
1312
1313         Reviewed by Darin Fisher.
1314
1315         https://bugs.webkit.org/show_bug.cgi?id=24496
1316         Fix console logging of non-string values by coercing the argument to
1317         a string, for V8 bindings.
1318
1319         Test: fast/js/console-non-string-values.html
1320
1321         * bindings/v8/ScriptValue.cpp: Added toString method.
1322         (WebCore::ScriptValue::toString):
1323         * bindings/v8/ScriptValue.h: Added PlatformString, ScriptState includes
1324             and toString declaration.
1325
1326 2009-03-12  Darin Fisher  <darin@chromium.org>
1327
1328         Reviewed by Dimitri Glazkov.
1329
1330         Eliminate ChromiumBridge::uiResourceProtocol
1331         https://bugs.webkit.org/show_bug.cgi?id=24558
1332
1333         * platform/chromium/ChromiumBridge.h:
1334
1335 2009-03-12  Greg Bolsinga  <bolsinga@apple.com>
1336
1337         Reviewed by Simon Fraser.
1338
1339         Missing breaks in switch statement
1340         https://bugs.webkit.org/show_bug.cgi?id=24556
1341
1342         * platform/mac/GeolocationServiceMac.mm:
1343         (-[WebCoreCoreLocationObserver locationManager:didFailWithError:]):
1344
1345 2009-03-12  Darin Fisher  <darin@chromium.org>
1346
1347         Reviewed by Dimitri Glazkov.
1348
1349         https://bugs.webkit.org/show_bug.cgi?id=24554
1350         Remove some unused functions from ChromiumBridge.
1351
1352         * platform/chromium/ChromiumBridge.h:
1353
1354 2009-03-02  Eric Seidel  <eric@webkit.org>
1355
1356         Reviewed by Darin Fisher and Justin Garcia.
1357
1358         Safari crashes during drag and drop in Google presentations
1359         due to mutation event handlers removing DOM content during insertNode
1360         https://bugs.webkit.org/show_bug.cgi?id=22634
1361
1362         Added a bunch of "null" checks to make sure nodes are still
1363         in the document before we operate on them.  This is an
1364         inelegant solution, but it's the best we have for now.
1365         
1366         Test: editing/selection/crash-on-drag-with-mutation-events.html
1367
1368         * editing/CompositeEditCommand.cpp:
1369         (WebCore::CompositeEditCommand::insertNodeAt):
1370         * editing/ReplaceSelectionCommand.cpp:
1371         (WebCore::ReplaceSelectionCommand::doApply):
1372
1373 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
1374
1375         Reviewed by Adam Treat.
1376
1377         https://bugs.webkit.org/show_bug.cgi?id=24525
1378         REGRESSION: Inspector window doesn't close when inspected page is
1379         destroyed. This is a revert of r41158, which became unnecessary when
1380         InspectorController became ref-counted in r41462.
1381
1382         * inspector/InspectorController.cpp:
1383         (WebCore::InspectorController::inspectedPageDestroyed): Reset m_inspectedPage
1384             after calling close().
1385         (WebCore::InspectorController::stopUserInitiatedProfiling): Remove
1386             m_inspectedPage check guard around profile logic.
1387
1388 2009-03-12  Peter Kasting  <pkasting@google.com>
1389
1390         Reviewed by Darin Fisher.
1391
1392         https://bugs.webkit.org/show_bug.cgi?id=24502
1393         Make horizontal scrolling on Windows always go the correct direction.
1394
1395         * platform/PlatformWheelEvent.h:
1396         * platform/win/WheelEventWin.cpp:
1397         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1398
1399 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
1400
1401         Reviewed by Simon Fraser.
1402
1403         https://bugs.webkit.org/show_bug.cgi?id=24496
1404         Fix console logging of non-string values by coercing the argument to
1405         a string.
1406
1407         Test: fast/js/console-non-string-values.html
1408
1409         * bindings/js/ScriptValue.cpp: Removed PlatformString include.
1410         * bindings/js/ScriptValue.h: Added toString method.
1411         (WebCore::ScriptValue::toString):
1412         * page/Console.cpp:
1413         (WebCore::getFirstArgumentAsString): Changed firstArgumentAsString method to use
1414             ScriptValue::toString.
1415         (WebCore::Console::addMessage): added extra ScriptState argument to callsite.
1416         (WebCore::Console::count): Ditto.
1417
1418 2009-03-12  Simon Fraser  <simon.fraser@apple.com>
1419
1420         Reviewed by Adele Peterson.
1421         
1422         https://bugs.webkit.org/show_bug.cgi?id=24508
1423         
1424         Fix updating of text field with placeholder text when value is set
1425         by ensuring that updatePlaceholderVisibility() is called after
1426         the value has been updated, not before.
1427
1428         Test: fast/forms/placeholder-set-value.html
1429
1430         * html/HTMLInputElement.cpp:
1431         (WebCore::HTMLInputElement::setValue):
1432
1433 2009-03-12  Simon Fraser  <simon.fraser@apple.com>
1434
1435         Reviewed by Dave Hyatt
1436         
1437         https://bugs.webkit.org/show_bug.cgi?id=24552
1438         
1439         Hit testing involving normal flow, self-painting layers (e.g. reflections)
1440         was broken because it was not null-testing the result of hitTestLayer(),
1441         so bailing early with a nil hit layer.
1442
1443         Test: fast/layers/normal-flow-hit-test.html
1444
1445         * rendering/RenderLayer.cpp:
1446         (WebCore::RenderLayer::hitTestLayer):
1447
1448 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
1449
1450         Reviewed by Cameron Zwarich.
1451
1452         Removed zero-sized files, left over from improperly applied patch.
1453
1454         * platform/graphics/chromium/ThemeHelperChromiumWin.cpp: Removed.
1455         * platform/graphics/chromium/ThemeHelperChromiumWin.h: Removed.
1456
1457 2009-03-12  Adam Treat  <adam.treat@torchmobile.com>
1458
1459         Reviewed by George Staikos.
1460
1461         Do not ignore alpha color in optimization.  Hard to believe, but there
1462         are websites that fill the entire page with a tiled image consisting of
1463         nothing but a 100% transparent 1x1 image. <cough>orbitz.com</cough>
1464
1465         * platform/graphics/qt/ImageQt.cpp:
1466         (WebCore::BitmapImage::checkForSolidColor):
1467
1468 2009-03-12  Julien Chaffraix  <jchaffraix@webkit.org>
1469
1470         Reviewed by Darin Adler.
1471
1472         Bug 24110: cloneNode should call cloneElement and not the reverse
1473
1474         - Splitted the code from cloneNode into cloneElementWithChildren and cloneElementWithChildren.
1475           Now cloneNode calls one of the 2 previous methods.
1476
1477         - Renamed cloneElement to cloneElementWithoutChildren as it was the previous behaviour.
1478
1479         - Moved cloneNode to the Element private section so that WebCore callers cannot use it.
1480
1481         - Removed Element::cloneNode usage through WebCore.
1482
1483         * dom/Element.cpp:
1484         (WebCore::Element::cloneNode): Moved to Element's private section and it
1485         now calls the two next methods.
1486         (WebCore::Element::cloneElementWithChildren): Added.
1487         (WebCore::Element::cloneElementWithoutChildren): Renamed from cloneElement
1488         to avoid ambiguity.
1489         * dom/Element.h:
1490
1491         * editing/ApplyStyleCommand.cpp:
1492         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Changed call to cloneElement
1493         to call to cloneElementWithoutChildren.
1494         * editing/BreakBlockquoteCommand.cpp:
1495         (WebCore::BreakBlockquoteCommand::doApply): Ditto.
1496         * editing/IndentOutdentCommand.cpp:
1497         (WebCore::IndentOutdentCommand::indentRegion): Ditto.
1498         * editing/InsertParagraphSeparatorCommand.cpp:
1499         (WebCore::InsertParagraphSeparatorCommand::doApply): Ditto.
1500         * editing/ModifySelectionListLevel.cpp:
1501         (WebCore::IncreaseSelectionListLevelCommand::doApply): Ditto.
1502         * editing/SplitElementCommand.cpp:
1503         (WebCore::SplitElementCommand::doApply): Ditto.
1504         * editing/markup.cpp:
1505         (WebCore::createFragmentFromText): Ditto.
1506         * svg/SVGUseElement.cpp:
1507         (WebCore::SVGUseElement::buildShadowTree): Ditto.
1508         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Ditto.
1509
1510 2009-03-12  Dirk Schulze  <krit@webkit.org>
1511
1512         Reviewed by Oliver Hunt.
1513
1514         Fixed a crash on the 1x1 pixel check for background image in gtk.
1515         We need to load the image first and need to be sure that the image
1516         is not null before checking the type. 
1517
1518         * platform/graphics/cairo/ImageCairo.cpp:
1519         (WebCore::BitmapImage::checkForSolidColor):
1520
1521 2009-03-12  Xan Lopez  <xlopez@igalia.com>
1522
1523         Reviewed by Alexey Proskuryakov.
1524
1525         https://bugs.webkit.org/show_bug.cgi?id=24544
1526         Rename setUrl to setURL
1527
1528         Use proper case for setUrl method, rename it to setURL.
1529
1530         * platform/network/ResourceResponseBase.cpp:
1531         (WebCore::ResourceResponseBase::adopt):
1532         * platform/network/ResourceResponseBase.h:
1533         * platform/network/curl/ResourceHandleManager.cpp:
1534         (WebCore::writeCallback):
1535         (WebCore::headerCallback):
1536         * platform/network/soup/ResourceHandleSoup.cpp:
1537         (WebCore::fillResponseFromMessage):
1538         (WebCore::queryInfoCallback):
1539
1540 2009-03-12  Xan Lopez  <xlopez@igalia.com>
1541
1542         Reviewed by Alexey Proskuryakov.
1543
1544         https://bugs.webkit.org/show_bug.cgi?id=24519
1545         [GTK] Use two argument KURL ctor in ResourceHandleSoup
1546
1547         Use two argument KURL ctor, the single argument ctor expects its
1548         input to be the output of a previous KURL::parse call, which is
1549         not the case here.
1550
1551         * platform/network/soup/ResourceHandleSoup.cpp:
1552         (WebCore::fillResponseFromMessage):
1553         (WebCore::queryInfoCallback):
1554
1555 2009-03-11  Jon Honeycutt  <jhoneycutt@apple.com>
1556
1557         Fix for <rdar://6418681>
1558         https://bugs.webkit.org/show_bug.cgi?id=22644
1559
1560         Reviewed by Steve Falkenburg.
1561
1562         * plugins/win/PluginPackageWin.cpp:
1563         (WebCore::PluginPackage::isPluginBlacklisted): Add the Citrix ICA
1564         Client plug-in to the blacklist; it requires a Mozilla-based browser.
1565
1566 2009-03-12  Oliver Hunt  <oliver@apple.com>
1567
1568         Reviewed by NOBODY (build fix).
1569
1570         build fix.
1571
1572         * html/CanvasRenderingContext2D.h:
1573
1574 2009-03-11  Oliver Hunt  <oliver@apple.com>
1575
1576         Reviewed by Adele Peterson.
1577
1578         <rdar://problem/6673852> Widget "Simple World Clock" does not display with Safari 4
1579
1580         A number of dashboard widgets rely on canvas failing silently when given invalid
1581         colors for gradient stops, but both the spec and firefox throw exceptions here.
1582         So we work around this by creating a dashboard quirk that will only suppress the
1583         exception in dashboard compatibility mode.
1584
1585         Test: fast/canvas/canvas-gradient-addStop-error.html
1586
1587         * html/CanvasGradient.cpp:
1588         (WebCore::CanvasGradient::CanvasGradient):
1589         (WebCore::CanvasGradient::addColorStop):
1590         * html/CanvasGradient.h:
1591         (WebCore::CanvasGradient::setDashboardCompatibilityMode):
1592         * html/CanvasRenderingContext2D.cpp:
1593         (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard):
1594         (WebCore::CanvasRenderingContext2D::createLinearGradient):
1595         (WebCore::CanvasRenderingContext2D::createRadialGradient):
1596         * html/CanvasRenderingContext2D.h:
1597
1598 2009-03-11  David Kilzer  <ddkilzer@apple.com>
1599
1600         Clarify comments regarding order of FEATURE_DEFINES
1601
1602         Rubber-stamped by Mark Rowe.
1603
1604         * Configurations/WebCore.xcconfig: Added warning about the
1605         consequences when FEATURE_DEFINES are not kept in sync.
1606
1607 2009-03-11  Gustavo Noronha Silva  <gns@gnome.org>
1608
1609         Reviewed by Holger Freyther.
1610
1611         https://bugs.webkit.org/show_bug.cgi?id=24515
1612         [GTK] soup backend should use GMappedFile instead of mmap directly
1613
1614         Rewrite mmap code used to upload files to use GMappedFile, so that
1615         it is platform-independent.
1616
1617         * platform/network/soup/ResourceHandleSoup.cpp:
1618         (WebCore::ResourceHandle::startHttp):
1619
1620 2009-03-11  Dan Bernstein  <mitz@apple.com>
1621
1622         Reviewed by Darin Adler.
1623
1624         - WebCore part of fixing <rdar://problem/3919124> Thai text selection
1625           in Safari is incorrect
1626
1627         Test: platform/mac/editing/selection/word-thai.html
1628
1629         Tested on Mac, but should work on all ICU platforms (or more precisely
1630         on all platforms that implement
1631         WTF::Unicode::hasLineBreakingPropertyComplexContext() correctly).
1632
1633         * editing/TextIterator.cpp:
1634         (WebCore::BackwardsCharacterIterator::BackwardsCharacterIterator):
1635         Added.
1636         (WebCore::BackwardsCharacterIterator::range): Added.
1637         (WebCore::BackwardsCharacterIterator::advance): Added.
1638
1639         * editing/TextIterator.h: Added BackwardsCharacterIterator with the
1640         minimal functionality required for this patch.
1641         (WebCore::BackwardsCharacterIterator::atEnd): Added.
1642
1643         * editing/visible_units.cpp:
1644         (WebCore::firstNonComplexContextLineBreak): Added this helper function
1645         that returns the index of the first character in the string whose
1646         Unicode line breaking property value is not SA ("Complex Context"), or
1647         the length of the string if there is no such character.
1648         (WebCore::lastNonComplexContextLineBreak): Added this helper function
1649         that returns the index of the last character in the string whose
1650         Unicode line breaking property value is not SA ("Complex Context"), or
1651         -1 if there is no such character.
1652         (WebCore::previousBoundary): Changed the signature of the search
1653         function to include an offset parameter. Renamed the 'exception' local
1654         variable to 'ec' and changed its type to ExceptionCode. Extend the
1655         string forwards until the first character with Unicode line breaking
1656         property value other than SA. This gives the boundary search function
1657         enough context in the forward direction. Changed to use a
1658         BackwardsCharacterIterator for translating the backwards offset into
1659         a position.
1660         (WebCore::nextBoundary): Changed the signature of the search
1661         function to include an offset parameter. Extend the string backwards
1662         until the first character with Unicode line breaking property value
1663         other than SA. This gives the boundary search function enough context in
1664         the backwards direction. Restricted the workaround for <rdar://5192593>
1665         only to the line break case, because it was causing an extra character
1666         to be selected following a word that ended with a combining mark.
1667         (WebCore::startWordBoundary): Added an offset parameter. Check that
1668         going backwards from the given offset, there is a character with Unicode
1669         line breaking property value other than SA, and otherwise return 0 to
1670         request more context.
1671         (WebCore::endWordBoundary): Similar, but in reverse.
1672         (WebCore::previousWordPositionBoundary): Similar.
1673         (WebCore::nextWordPositionBoundary): Similar.
1674         (WebCore::startSentenceBoundary): Updated for the new search function
1675         signature.
1676         (WebCore::endSentenceBoundary): Ditto.
1677         (WebCore::previousSentencePositionBoundary): Ditto.
1678         (WebCore::nextSentencePositionBoundary): Ditto.
1679
1680 2009-03-11  Darin Adler  <darin@apple.com>
1681
1682         Reviewed by Mark Rowe.
1683
1684         Don't use "::" in thread names because it is ugly!
1685
1686         * loader/icon/IconDatabase.cpp:
1687         (WebCore::IconDatabase::open): Use "WebCore: " instead of "WebCore::".
1688         * platform/network/cf/ResourceHandleCFNet.cpp:
1689         (WebCore::ResourceHandle::loaderRunLoop): Call this "WebCore: CFNetwork Loader" to make
1690         it clear this is a WebCore-created thread.
1691         * storage/DatabaseThread.cpp:
1692         (WebCore::DatabaseThread::start): Use "WebCore: " instead of "WebCore::".
1693         * storage/LocalStorageThread.cpp:
1694         (WebCore::LocalStorageThread::start): Use "WebCore: " instead of "WebCore::".
1695         * workers/WorkerThread.cpp:
1696         (WebCore::WorkerThread::start): Use "WebCore: " instead of "WebCore::".
1697
1698 2009-03-11  Mark Rowe  <mrowe@apple.com>
1699
1700         Rubber-stamped by Darin Adler.
1701
1702         <rdar://problem/6653286> WebCore's implementation of screenIsMonochrome is needlessly complex
1703
1704         * platform/mac/PlatformScreenMac.mm:
1705         (WebCore::screenIsMonochrome): Return false.
1706
1707 2009-03-11  Beth Dakin  <bdakin@apple.com>
1708
1709         Reviewed by Dan Bernstein.
1710
1711         Fix for https://bugs.webkit.org/show_bug.cgi?id=14749 percentage 
1712         top value on position:relative child not calculated correctly if 
1713         parent has percentage height
1714         - and corresponding -
1715         <rdar://problem/6172925>
1716
1717         * rendering/RenderBoxModelObject.cpp:
1718         (WebCore::RenderBoxModelObject::relativePositionOffsetY):
1719
1720 2009-03-11  Jian Li  <jianli@chromium.org>
1721
1722         Reviewed by Dimitri Glazkov.
1723
1724         Implement ScriptValue::hasNoValue for V8.
1725         https://bugs.webkit.org/show_bug.cgi?id=24507
1726
1727         * bindings/v8/ScriptValue.h:
1728         (WebCore::ScriptValue::hasNoValue):
1729
1730 2009-03-11  David Levin  <levin@chromium.org>
1731
1732         Reviewed by Dimitri Glazkov.
1733
1734         Bug 24459: Add v8 bindings for event.
1735         <https://bugs.webkit.org/show_bug.cgi?id=24459>
1736
1737         Adding custom event bindings.
1738
1739         * bindings/v8/custom/V8AbstractEventListener.cpp: Added.
1740         * bindings/v8/custom/V8AbstractEventListener.h: Added.
1741         * bindings/v8/custom/V8AttrCustom.cpp:
1742         Fixed messed up copyright header.
1743         * bindings/v8/custom/V8CustomEventListener.cpp: Added.
1744         * bindings/v8/custom/V8CustomEventListener.h:
1745         Replaced forwarding header with the real implementation.
1746         * bindings/v8/custom/V8ElementCustom.cpp:
1747         * bindings/v8/custom/V8LazyEventListener.cpp: Added.
1748         * bindings/v8/custom/V8LazyEventListener.h: Added.
1749         * bindings/v8/custom/V8ObjectEventListener.cpp: Added.
1750         * bindings/v8/custom/V8ObjectEventListener.h: Added.
1751         * bindings/v8/custom/V8WorkerContextEventListener.cpp: Added.
1752         * bindings/v8/custom/V8WorkerContextEventListener.h: Added.
1753
1754 2009-03-11  Darin Fisher  <darin@chromium.org>
1755
1756         Reviewed by Dimitri Glazkov.
1757
1758         https://bugs.webkit.org/show_bug.cgi?id=24521
1759         Add some missing includes for the non-JSC build.
1760
1761         * platform/text/PlatformString.h: added OwnPtr.h
1762         * xml/XMLHttpRequest.cpp: added SecurityOrigin.h
1763
1764 2009-03-11  Simon Fraser  <simon.fraser@apple.com>
1765
1766         Reviewed by Darin Adler
1767
1768         https://bugs.webkit.org/show_bug.cgi?id=24531
1769         
1770         Make sure that AnimationControllerPrivate::getAnimatedStyleForRenderer() never
1771         returns a null style if it has a valid renderer, which could happen if a
1772         CompositeAnimation existed, but wasn't running any animations or transitions.
1773
1774         * page/animation/AnimationController.cpp:
1775         (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
1776
1777 2009-03-11  Simon Fraser  <simon.fraser@apple.com>
1778
1779         Fix Scons build. Patch from Alexander Guy.
1780
1781         * WebCore.scons:
1782
1783 2009-03-11  Simon Fraser  <simon.fraser@apple.com>
1784
1785         Reviewed by Dan Bernstein
1786        
1787         https://bugs.webkit.org/show_bug.cgi?id=23093
1788         
1789         When the cancel button in the search field is shown or hidden,
1790         we need to explicitly setStyle() on the cancel button's renderer,
1791         to ensure that repaint happens. Changing the style without telling
1792         the renderer won't work.
1793
1794         Test: fast/repaint/search-field-cancel.html
1795
1796         * rendering/RenderTextControlSingleLine.cpp:
1797         (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
1798         (WebCore::RenderTextControlSingleLine::updateFromElement):
1799         (WebCore::RenderTextControlSingleLine::createCancelButtonStyle):
1800         (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility):
1801         (WebCore::RenderTextControlSingleLine::visibilityForCancelButton):
1802         * rendering/RenderTextControlSingleLine.h:
1803
1804 2009-03-11  Hironori Bono  <hbono@chromium.org>
1805
1806         Reviewed by Alexey Proskuryakov.
1807
1808         https://bugs.webkit.org/show_bug.cgi?id=15790
1809         Ligatures aren't accounted for when manipulating VisiblePositions
1810
1811         Changed cursorMovementIterator rules to prevent a cursor from moving in the middle of an
1812         Indic ligature which uses a virama sign.
1813         
1814         Test: editing/deleting/skip-virama-001.html
1815
1816         * platform/text/TextBreakIteratorICU.cpp:
1817         (WebCore::cursorMovementIterator):
1818
1819 2009-03-11  Alexey Proskuryakov  <ap@webkit.org>
1820
1821         Reviewed by George Staikos.
1822
1823         https://bugs.webkit.org/show_bug.cgi?id=24513
1824         REGRESSION: Cursor movement doesn't work on Tiger (ICU 3.2)
1825
1826         Fixes existing tests on Tiger.
1827
1828         * platform/text/TextBreakIteratorICU.cpp: (WebCore::cursorMovementIterator):
1829         Use characterBreakIterator on Tiger (like we used to do).
1830
1831 2009-03-11  Alexey Proskuryakov  <ap@webkit.org>
1832
1833         Reviewed by Oliver Hunt.
1834
1835         <rdar://problem/4072827> Downloaded non-ASCII file name becomes garbled
1836
1837         * platform/network/mac/ResourceRequestMac.mm:
1838         (WebCore::ResourceRequest::doUpdatePlatformRequest): Correct selector name
1839         in instancesRespondToSelector.
1840
1841 2009-03-11  Jan Michael Alonzo  <jmalonzo@webkit.org>
1842
1843         Reviewed by Holger Freyther.
1844
1845         [GTK]DumpRenderTree doesn't compile for non-X11 GTK ports anymore
1846         https://bugs.webkit.org/show_bug.cgi?id=2260
1847
1848         Add missing stdio.h include to get the build going
1849
1850         * plugins/gtk/PluginPackageGtk.cpp:
1851
1852 2009-03-10  Justin Garcia  <justin.garcia@apple.com>
1853
1854         Reviewed by Ken Kocienda.
1855
1856         * dom/Range.cpp:
1857         (WebCore::Range::addLineBoxRects): If the range ended at [div, 0], addLineBoxRects
1858         would include rects for the divs contents.  Set the correct RenderObject to stop at.
1859
1860 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
1861
1862         Reviewed by Sam Weinig.
1863
1864         <rdar://problem/6123770> Restrict access to document.cookie when making a cross-site XHR
1865
1866         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseXML): Removed an incorrect
1867         comment about cookie support. Firefox doesn't expose cookies on responseXML at all, and
1868         there are security concerns with exposing them for cross-origin requests, so it's not clear
1869         if we want to change anything here.
1870
1871 2009-03-10  Simon Fraser  <simon.fraser@apple.com>
1872
1873         Reviewed by Darin Adler
1874
1875         https://bugs.webkit.org/show_bug.cgi?id=24503
1876         
1877         Fix hit testing of absolutely positioned single line text controls by
1878         ensuring that we set result.innerNode() correctly. If the hit node is
1879         a descendant of the inner text element or if it is the <input> itself,
1880         then we say we hit the innerTextElement.
1881         
1882         Rename hitInnerTextBlock() to hitInnerTextElement() to match the
1883         'innerTextElement' terminology used elsewhere.
1884         
1885         Assert that if renderer()->hitTest() returns false, no-one set
1886         result.innerNode().
1887
1888         Test: fast/forms/search-abs-pos-cancel-button.html
1889
1890         * rendering/RenderLayer.cpp:
1891         (WebCore::RenderLayer::hitTestContents):
1892         * rendering/RenderTextControl.cpp:
1893         (WebCore::RenderTextControl::hitInnerTextElement):
1894         * rendering/RenderTextControl.h:
1895         * rendering/RenderTextControlMultiLine.cpp:
1896         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
1897         * rendering/RenderTextControlSingleLine.cpp:
1898         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
1899
1900 2009-03-10  Antti Koivisto  <antti@apple.com>
1901
1902         Reviewed by Mark Rowe.
1903
1904         <rdar://problem/6668238> WebCore is registering text encodings needlessly from KURL constructor.
1905         
1906         Another case where we would trigger extended encoding loading needlessly.
1907
1908         * platform/text/TextEncoding.cpp:
1909         (WebCore::TextEncoding::isNonByteBasedEncoding):
1910
1911 2009-03-10  Beth Dakin  <bdakin@apple.com>
1912
1913         Reviewed by Darin Adler.
1914
1915         Fix for <rdar://problem/6624769> REGRESSION (Safari 4 PB): No 
1916         scroll bar appears for long line of text with NOWRAP set
1917
1918         This is a regression from http://trac.webkit.org/changeset/32226
1919         I talked with Dan about the original change, and we decided that 
1920         the best fix was to remove his small potential-optimization that 
1921         only created a separate line box for whitespace under certain 
1922         circumstances. This new code will always create a separate line 
1923         box.
1924
1925         * rendering/bidi.cpp:
1926         (WebCore::RenderBlock::layoutInlineChildren):
1927
1928 2009-03-10  Sam Weinig  <sam@webkit.org>
1929
1930         Reviewed by Geoffrey Garen.
1931
1932         Fix for <rdar://problem/6166844>
1933         https://bugs.webkit.org/show_bug.cgi?id=24495
1934
1935         Use same rule for loading java applets as we do for images.
1936
1937         * html/HTMLAppletElement.cpp:
1938         (WebCore::HTMLAppletElement::createRenderer):
1939         * loader/FrameLoader.cpp:
1940         (WebCore::FrameLoader::loadItem):
1941
1942 2009-03-10  Justin Garcia  <justin.garcia@apple.com>
1943
1944         Reviewed by David Kilzer.
1945
1946         Get rid of revealCaret and use revealSelection instead.
1947
1948         * WebCore.base.exp:
1949         * editing/SelectionController.cpp:
1950         (WebCore::SelectionController::setSelection):
1951         * page/Frame.cpp:
1952         (WebCore::Frame::revealSelection):
1953         * page/Frame.h:
1954
1955 2009-03-10  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
1956
1957         Reviewed by Geoff Garen.
1958
1959         Bug 23736: WebKit Crashes on http://g-conquest.fr/~server2
1960         <https://bugs.webkit.org/show_bug.cgi?id=23736>
1961         <rdar://problem/6560278>
1962
1963         Before replacing the document, FrameLoader::executeIfJavaScriptURL()
1964         should call stopAllLoaders(), just like continueLoadAfterNavigationPolicy().
1965
1966         * loader/FrameLoader.cpp:
1967         (WebCore::FrameLoader::executeIfJavaScriptURL):
1968
1969 2009-03-10  Darin Adler  <darin@apple.com>
1970
1971         Reviewed by Alexey Proskuryakov.
1972
1973         Bug 24494: crash when deleting at end of document and merging paragraphs
1974         https://bugs.webkit.org/show_bug.cgi?id=24494
1975         rdar://problem/6571537
1976
1977         Test: editing/deleting/merge-at-end-of-document.html
1978
1979         * dom/Range.cpp:
1980         (WebCore::Range::compareBoundaryPoints): Split out assertion. It's better not to
1981         use && in assertions since we'd like to know which condition is failing.
1982
1983         * editing/ApplyStyleCommand.cpp:
1984         (WebCore::ApplyStyleCommand::applyInlineStyleToRange): Added a null check before
1985         calling compareBoundaryPoints, since a 0 for the node is ambiguous and so the
1986         function doesn't know which value to return.
1987
1988 2009-03-10  Dirk Schulze  <krit@webkit.org>
1989
1990         Reviewed by Eric Seidel. Math checked by Oliver Hunt.
1991
1992         Implement the Cairo version of the checkForSolidColor() method. This halfes the
1993         time to draw on 1x1 px background images.
1994         I added two new calls to Color for the pixel manipulation on cairo_surface's.
1995         They are neede to premultiply/unpremultiply the colors of the surface.
1996
1997         [CAIRO] Introduce single-pixel image optimizations
1998         https://bugs.webkit.org/show_bug.cgi?id=17284
1999
2000         * platform/graphics/Color.cpp:
2001         (WebCore::colorFromPremultipliedARGB):
2002         (WebCore::premultipliedARGBFromColor):
2003         * platform/graphics/Color.h:
2004         * platform/graphics/cairo/ImageBufferCairo.cpp:
2005         (WebCore::ImageBuffer::getImageData):
2006         (WebCore::ImageBuffer::putImageData):
2007         * platform/graphics/cairo/ImageCairo.cpp:
2008         (WebCore::BitmapImage::checkForSolidColor):
2009
2010 2009-03-06  Darin Fisher  <darin@chromium.org>
2011
2012         Reviewed by Sam Weinig.
2013
2014         https://bugs.webkit.org/show_bug.cgi?id=24437
2015
2016         Add support for registering noAccess URL schemes:
2017         1-  Add FrameLoader::registerURLSchemeAsNoAccess, and have SecurityOrigin check
2018         that list upon construction (similar to how isLocal is implemented).
2019         2-  Make InspectorController call grantUniversalAccess on its Document's
2020         SecurityOrigin at the time when windowScriptObjectAvailable is called.
2021
2022         This enables content such as the inspector to be loaded from a custom (non-file)
2023         URL, which is how Chromium loads the inspector.  It also allows other URL schemes
2024         to be treated like data: URLs, which Chromium utilizes for its various HTML-based
2025         UI panels.
2026
2027         * inspector/InspectorController.cpp:
2028         (WebCore::InspectorController::windowScriptObjectAvailable):
2029         * loader/FrameLoader.cpp:
2030         (WebCore::localSchemes):
2031         (WebCore::noAccessSchemes):
2032         (WebCore::FrameLoader::loadItem):
2033         * loader/FrameLoader.h:
2034         * page/SecurityOrigin.cpp:
2035         (WebCore::SecurityOrigin::SecurityOrigin):
2036         (WebCore::SecurityOrigin::isLocal):
2037
2038 2009-03-10  Xan Lopez  <xlopez@igalia.com>
2039
2040         Build fix, no review
2041
2042         * page/mac/AccessibilityObjectWrapper.mm:
2043         (textMarkerForVisiblePosition):
2044         (visiblePositionForTextMarker):
2045
2046 2009-03-10  Xan Lopez  <xlopez@igalia.com>
2047
2048         Reviewed by Darin Adler.
2049
2050         https://bugs.webkit.org/show_bug.cgi?id=24491
2051         Rename posOffset to m_offset, get rid of accessor
2052
2053         As suggested in dom/Position.h, this patch gets rid of the
2054         'offset()' accessor and renames posOffset to m_offset. I've used
2055         m_offset instead of offset to follow the style guide lines, since
2056         Position is still a class and not a structure. If the long term
2057         plan is still to make it a structure it would be pretty easy to
2058         just s/m_offset/offset/ globally when that is achieved.
2059
2060         * dom/Position.cpp:
2061         (WebCore::Position::previous):
2062         (WebCore::Position::next):
2063         (WebCore::Position::atStart):
2064         (WebCore::Position::atEnd):
2065         (WebCore::Position::renderedOffset):
2066         (WebCore::Position::isCandidate):
2067         (WebCore::Position::inRenderedText):
2068         (WebCore::Position::isRenderedCharacter):
2069         (WebCore::Position::rendersInDifferentPosition):
2070         (WebCore::Position::leadingWhitespacePosition):
2071         (WebCore::Position::debugPosition):
2072         (WebCore::Position::formatForDebugger):
2073         * dom/Position.h:
2074         (WebCore::Position::Position):
2075         * dom/PositionIterator.h:
2076         (WebCore::PositionIterator::PositionIterator):
2077         * dom/Range.cpp:
2078         * dom/RangeBoundaryPoint.h:
2079         (WebCore::RangeBoundaryPoint::position):
2080         (WebCore::RangeBoundaryPoint::set):
2081         (WebCore::RangeBoundaryPoint::setOffset):
2082         (WebCore::RangeBoundaryPoint::setToChild):
2083         (WebCore::RangeBoundaryPoint::setToStart):
2084         (WebCore::RangeBoundaryPoint::setToEnd):
2085         (WebCore::RangeBoundaryPoint::childBeforeWillBeRemoved):
2086         * editing/ApplyStyleCommand.cpp:
2087         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
2088         (WebCore::ApplyStyleCommand::applyInlineStyleToRange):
2089         (WebCore::ApplyStyleCommand::removeInlineStyle):
2090         (WebCore::ApplyStyleCommand::nodeFullySelected):
2091         (WebCore::ApplyStyleCommand::nodeFullyUnselected):
2092         (WebCore::ApplyStyleCommand::splitTextAtStartIfNeeded):
2093         (WebCore::ApplyStyleCommand::splitTextAtEndIfNeeded):
2094         (WebCore::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
2095         (WebCore::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
2096         (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
2097         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
2098         (WebCore::ApplyStyleCommand::joinChildTextNodes):
2099         * editing/BreakBlockquoteCommand.cpp:
2100         (WebCore::BreakBlockquoteCommand::doApply):
2101         * editing/CompositeEditCommand.cpp:
2102         (WebCore::CompositeEditCommand::insertNodeAt):
2103         (WebCore::CompositeEditCommand::positionOutsideTabSpan):
2104         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
2105         (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
2106         (WebCore::CompositeEditCommand::deleteInsignificantText):
2107         (WebCore::CompositeEditCommand::removePlaceholderAt):
2108         (WebCore::CompositeEditCommand::moveParagraphs):
2109         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
2110         * editing/DeleteSelectionCommand.cpp:
2111         (WebCore::updatePositionForNodeRemoval):
2112         (WebCore::updatePositionForTextRemoval):
2113         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2114         (WebCore::DeleteSelectionCommand::fixupWhitespace):
2115         * editing/Editor.cpp:
2116         (WebCore::Editor::setComposition):
2117         (WebCore::Editor::advanceToNextMisspelling):
2118         (WebCore::Editor::getCompositionSelection):
2119         * editing/InsertLineBreakCommand.cpp:
2120         (WebCore::InsertLineBreakCommand::doApply):
2121         * editing/InsertParagraphSeparatorCommand.cpp:
2122         (WebCore::InsertParagraphSeparatorCommand::doApply):
2123         * editing/InsertTextCommand.cpp:
2124         (WebCore::InsertTextCommand::performTrivialReplace):
2125         (WebCore::InsertTextCommand::input):
2126         (WebCore::InsertTextCommand::insertTab):
2127         * editing/MoveSelectionCommand.cpp:
2128         (WebCore::MoveSelectionCommand::doApply):
2129         * editing/ReplaceSelectionCommand.cpp:
2130         (WebCore::ReplaceSelectionCommand::doApply):
2131         * editing/SelectionController.cpp:
2132         (WebCore::SelectionController::debugRenderer):
2133         * editing/TextIterator.cpp:
2134         (WebCore::TextIterator::rangeFromLocationAndLength):
2135         * editing/TypingCommand.cpp:
2136         (WebCore::TypingCommand::deleteKeyPressed):
2137         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2138         * editing/VisiblePosition.cpp:
2139         (WebCore::VisiblePosition::characterAfter):
2140         (WebCore::VisiblePosition::debugPosition):
2141         (WebCore::makeRange):
2142         (WebCore::setStart):
2143         (WebCore::setEnd):
2144         * editing/VisibleSelection.cpp:
2145         (WebCore::VisibleSelection::toNormalizedRange):
2146         (WebCore::makeSearchRange):
2147         (WebCore::VisibleSelection::debugPosition):
2148         (WebCore::VisibleSelection::showTreeForThis):
2149         * editing/htmlediting.cpp:
2150         (WebCore::comparePositions):
2151         (WebCore::rangeCompliantEquivalent):
2152         (WebCore::isFirstPositionAfterTable):
2153         (WebCore::isLastPositionBeforeTable):
2154         * editing/visible_units.cpp:
2155         (WebCore::previousBoundary):
2156         (WebCore::nextBoundary):
2157         (WebCore::startPositionForLine):
2158         (WebCore::startOfLine):
2159         (WebCore::endPositionForLine):
2160         (WebCore::nextLinePosition):
2161         (WebCore::startOfParagraph):
2162         (WebCore::endOfParagraph):
2163         * page/AccessibilityObject.cpp:
2164         (WebCore::updateAXLineStartForVisiblePosition):
2165         * page/AccessibilityRenderObject.cpp:
2166         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
2167         * page/DOMSelection.cpp:
2168         (WebCore::DOMSelection::anchorOffset):
2169         (WebCore::DOMSelection::baseOffset):
2170         (WebCore::DOMSelection::focusOffset):
2171         (WebCore::DOMSelection::extentOffset):
2172         * page/EventHandler.cpp:
2173         (WebCore::EventHandler::handleMousePressEventSingleClick):
2174         * page/Frame.cpp:
2175         (WebCore::Frame::selectionLayoutChanged):
2176         * rendering/RenderTextControl.cpp:
2177         (WebCore::RenderTextControl::indexForVisiblePosition):
2178         * rendering/RenderTreeAsText.cpp:
2179         (WebCore::writeSelection):
2180
2181 2009-03-10  Darin Adler  <darin@apple.com>
2182
2183         Reviewed by Dan Bernstein.
2184
2185         Bug 23564: REGRESSION (r39230-39286): crash loading page that changes <input> display type and then calls innerHTML
2186         https://bugs.webkit.org/show_bug.cgi?id=23564
2187         rdar://problem/6537238
2188
2189         Test: fast/dom/HTMLElement/innerHTML-selection-crash.html
2190
2191         * editing/markup.cpp: (WebCore::createMarkup): Added updateLayoutIgnorePendingStylesheets
2192         call to the one of the two overloads of this function that wasn't calling it. This fixes
2193         this crash and other possible crashes inside innerHTML.
2194
2195 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
2196
2197         Reviewed by Darin Adler.
2198
2199         https://bugs.webkit.org/show_bug.cgi?id=24285
2200         Text resource loading checks for BOM twice
2201
2202         This removes TextDecoder class, since its only purpose was to check for BOM, which is
2203         already done in TextResourceDecoder. Callers that use TextEncoding::decode() won't get
2204         BOM checked, but I didn't find any cases where it would significantly change behavior.
2205
2206         * GNUmakefile.am:
2207         * WebCore.pro:
2208         * WebCore.scons:
2209         * WebCore.vcproj/WebCore.vcproj:
2210         * WebCore.xcodeproj/project.pbxproj:
2211         * WebCoreSources.bkl:
2212         Remove TextDecoder.{h,cpp}.
2213
2214         * platform/text/TextDecoder.cpp: Removed.
2215         * platform/text/TextDecoder.h: Removed.
2216
2217         * loader/TextResourceDecoder.h: Instead of a TextDecoder object, keep TextEncoding and
2218         TextCodec separately.
2219
2220         * loader/TextResourceDecoder.cpp:
2221         (WebCore::TextResourceDecoder::TextResourceDecoder): Updated for m_encoding being a member.
2222         (WebCore::TextResourceDecoder::setEncoding): Ditto.
2223         (WebCore::TextResourceDecoder::checkForBOM): Removed a FIXME saying that a BOM could override
2224         even a user-chosen encoding - this is how it already worked due to TextDecoder checking for
2225         BOM again. Made this function return the detected BOM length.
2226         (WebCore::TextResourceDecoder::decode): Skip the BOM if it was found at the beginning of
2227         a text resource.
2228         (WebCore::TextResourceDecoder::flush): Reset m_checkedForBOM, so that re-decoding the same
2229         resource again (as frequently done by CachedResource subclasses) will skip the BOM correctly.
2230
2231         * platform/text/TextEncoding.cpp: (WebCore::TextEncoding::decode):
2232         Use TextCodec directly without a TextDecoder wrapper. This means that this method no longer
2233         checks for BOM, which was a counter-intuitive feature.
2234
2235         * loader/CachedScript.cpp:
2236         (WebCore::CachedScript::CachedScript):
2237         (WebCore::CachedScript::setEncoding):
2238         (WebCore::CachedScript::encoding):
2239         (WebCore::CachedScript::script):
2240         * loader/CachedScript.h:
2241         * loader/appcache/ManifestParser.cpp:
2242         (WebCore::parseManifest):
2243         Use TextResourceDecoder, as TextEncoding::decode() no longer checks for BOM.
2244         A side effect of this is that these resources will now be subject to encoding auto-detection.
2245
2246         * loader/CachedFont.cpp: (WebCore::CachedFont::ensureSVGFontData):
2247         * page/Page.cpp: (WebCore::Page::userStyleSheet):
2248         Be sure to flush TextResourceDecoder, pushing any remaining bytes out, and making the decoder
2249         re-usable (for repeated decoding of the same resource).
2250
2251         * platform/text/TextEncodingRegistry.h: Updated comments for newTextCodec().
2252
2253 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
2254
2255         Reviewed by Darin Adler.
2256
2257         https://bugs.webkit.org/show_bug.cgi?id=24488
2258         An assertion failure when updating an offline application cache after emptying caches
2259
2260         Emptying appcache cannot be performed automatically, so no test.
2261
2262         * loader/appcache/ApplicationCacheGroup.cpp:
2263         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Ensure that the cache is in disk
2264         storage, even if the application wasn't updated server side.
2265
2266 2009-03-10  Oliver Hunt  <oliver@apple.com>
2267
2268         Reviewed by Alexey Proskuryakov.
2269
2270         <rdar://problem/6425807> Implement WorkerUtils.importScripts()
2271         <https://bugs.webkit.org/show_bug.cgi?id=22721>
2272
2273         Implement importScripts, currently uses a series of synchronous loads
2274         to fetch the scripts, but this is simpler than a synchronous load of
2275         multiple loads in parallel.  In future we'll want to switch to parallel
2276         loading, but this will do for now.
2277         
2278         Test: http/tests/workers/worker-importScripts.html
2279
2280         * GNUmakefile.am:
2281         * WebCore.vcproj/WebCore.vcproj:
2282         * WebCore.xcodeproj/project.pbxproj:
2283         * bindings/js/JSWorkerContextCustom.cpp:
2284         (WebCore::JSWorkerContext::importScripts):
2285         * bindings/js/ScriptValue.h:
2286         (WebCore::ScriptValue::hasNoValue):
2287         * bindings/js/WorkerScriptController.cpp:
2288         (WebCore::WorkerScriptController::evaluate):
2289         (WebCore::WorkerScriptController::setException):
2290         * bindings/js/WorkerScriptController.h:
2291         * dom/Document.cpp:
2292         (WebCore::Document::scriptImported):
2293         * dom/Document.h:
2294         * dom/ScriptExecutionContext.h:
2295         * inspector/InspectorController.cpp:
2296         (WebCore::InspectorController::scriptImported):
2297         * inspector/InspectorController.h:
2298         * inspector/InspectorResource.cpp:
2299         (WebCore::InspectorResource::setScriptProperties):
2300         * inspector/InspectorResource.h:
2301         * workers/WorkerContext.cpp:
2302         (WebCore::WorkerContext::scriptImported):
2303         (WebCore::WorkerContext::importScripts):
2304         * workers/WorkerContext.h:
2305         * workers/WorkerContext.idl:
2306         * workers/WorkerImportScriptsClient.cpp: Added.
2307         (WebCore::WorkerImportScriptsClient::didReceiveResponse):
2308         (WebCore::WorkerImportScriptsClient::didReceiveData):
2309         (WebCore::WorkerImportScriptsClient::didFinishLoading):
2310         (WebCore::WorkerImportScriptsClient::didFail):
2311         (WebCore::WorkerImportScriptsClient::didFailRedirectCheck):
2312         (WebCore::WorkerImportScriptsClient::didReceiveAuthenticationCancellation):
2313         * workers/WorkerImportScriptsClient.h: Added.
2314         (WebCore::WorkerImportScriptsClient::WorkerImportScriptsClient):
2315         (WebCore::WorkerImportScriptsClient::script):
2316         (WebCore::WorkerImportScriptsClient::failed):
2317
2318 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
2319
2320         Reviewed by Darin Adler.
2321
2322         https://bugs.webkit.org/show_bug.cgi?id=24462
2323         Move cross-origin access control code out of XMLHttpRequest
2324
2325         Step 1: move preflight result cache and access control helper functions.
2326
2327         No change in behavior, so no test.
2328
2329         * GNUmakefile.am:
2330         * WebCore.pro:
2331         * WebCore.scons:
2332         * WebCore.vcproj/WebCore.vcproj:
2333         * WebCore.xcodeproj/project.pbxproj:
2334         * WebCoreSources.bkl:
2335         * loader/CrossOriginAccessControl.cpp: Added.
2336         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
2337         (WebCore::isSimpleCrossOriginAccessRequest):
2338         (WebCore::createAllowedCrossOriginResponseHeadersSet):
2339         (WebCore::isOnAccessControlResponseHeaderWhitelist):
2340         (WebCore::passesAccessControlCheck):
2341         * loader/CrossOriginAccessControl.h: Added.
2342         * loader/CrossOriginPreflightResultCache.cpp: Added.
2343         (WebCore::parseAccessControlMaxAge):
2344         (WebCore::addToAccessControlAllowList):
2345         (WebCore::parseAccessControlAllowList):
2346         (WebCore::CrossOriginPreflightResultCacheItem::parse):
2347         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod):
2348         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
2349         (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest):
2350         (WebCore::CrossOriginPreflightResultCache::shared):
2351         (WebCore::CrossOriginPreflightResultCache::appendEntry):
2352         (WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
2353         * loader/CrossOriginPreflightResultCache.h: Added.
2354         (WebCore::CrossOriginPreflightResultCacheItem::CrossOriginPreflightResultCacheItem):
2355         (WebCore::CrossOriginPreflightResultCache::CrossOriginPreflightResultCache):
2356         * xml/XMLHttpRequest.cpp:
2357         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData):
2358         (WebCore::XMLHttpRequest::createRequest):
2359         (WebCore::XMLHttpRequest::makeCrossOriginAccessRequest):
2360         (WebCore::XMLHttpRequest::makeSimpleCrossOriginAccessRequest):
2361         (WebCore::XMLHttpRequest::makeCrossOriginAccessRequestWithPreflight):
2362         (WebCore::XMLHttpRequest::didReceiveResponse):
2363         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
2364         * xml/XMLHttpRequest.h:
2365
2366 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
2367
2368         Reviewed by Darin Adler.
2369
2370         https://bugs.webkit.org/show_bug.cgi?id=19797
2371         Bring the list of forbidden headers in sync with XMLHttpRequest spec draft
2372
2373         Added new checks to http/tests/xmlhttprequest/set-dangerous-headers.html.
2374
2375         * xml/XMLHttpRequest.cpp:
2376         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData): Added all headers from
2377         XMLHttpRequest 2 draft.
2378
2379 2009-03-10  Dan Bernstein  <mitz@apple.com>
2380
2381         Reviewed by Adele Peterson.
2382
2383         - fix https://bugs.webkit.org/show_bug.cgi?id=23975
2384           <rdar://problem/6593610> REGRESSION: Scrollbar arrow not repainted
2385
2386         * rendering/RenderLayer.cpp:
2387         (WebCore::RenderLayer::invalidateScrollbarRect): Corrected the vertical
2388         scrollbar rect calculation.
2389
2390 2009-03-09  Simon Fraser  <simon.fraser@apple.com>
2391
2392         Reviewed by Dan Bernstein, Oliver Hunt
2393
2394         https://bugs.webkit.org/show_bug.cgi?id=24475
2395         
2396         When repainting replaced elements, need to union the selection
2397         and overflow rects because either may extend outside the other.
2398         
2399         Test: fast/repaint/transform-replaced-shadows.html
2400
2401         * rendering/RenderReplaced.cpp:
2402         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
2403
2404 2009-03-09  Stephanie Lewis  <slewis@apple.com>
2405
2406         Fix build.
2407
2408         * editing/Editor.cpp:
2409         (WebCore::Editor::advanceToNextMisspelling):
2410         (WebCore::markAllMisspellingsAndBadGrammarInRanges):
2411
2412 2009-03-09  Kim Christensen  <kimworking@gmail.com>
2413
2414         Reviewed by Darin Fisher.
2415
2416         https://bugs.webkit.org/show_bug.cgi?id=24276
2417         Dropdown / select boxes do not consider the windows task bar in Chromium.
2418
2419         * platform/chromium/PopupMenuChromium.cpp:
2420         (WebCore::PopupContainer::showPopup):
2421
2422 2009-03-09  Dan Bernstein  <mitz@apple.com>
2423
2424         Reviewed by Adele Peterson and Dave Hyatt.
2425
2426         - fix <rdar://problem/6654344> REGRESSION (r41041): Zillow.com has
2427           misaligned edit fields
2428
2429         Test: fast/forms/legend-display-none.html
2430
2431         * css/CSSStyleSelector.cpp:
2432         (WebCore::CSSStyleSelector::adjustRenderStyle): Change the display
2433         property of legend elements to 'block' unless it is 'none'.
2434         * css/html4.css: Do not force the display property of legend elements to
2435         'block' using CSS, because that prevents style rules from setting it to
2436         'none'.
2437
2438 2009-03-09  Alpha Lam  <hclam@chromium.org>
2439
2440         Reviewed by Dave Hyatt.
2441
2442         https://bugs.webkit.org/show_bug.cgi?id=23024
2443
2444         Fix an incorrect criteria in the if statement that leaves references to
2445         deleted floating objects in RenderBlock.
2446
2447         Test: fast/block/float/crash-on-absolute-positioning.html
2448
2449         * rendering/RenderBlock.cpp:
2450         (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
2451
2452 2009-03-09  Mike Belshe  <mike@belshe.com>
2453
2454         Reviewed by Eric Seidel.
2455
2456         Unify JSC/V8 idl file.
2457         https://bugs.webkit.org/show_bug.cgi?id=24424
2458
2459         * page/Location.idl:
2460
2461 2009-03-09  Mike Belshe  <mike@belshe.com>
2462
2463         Reviewed by Eric Seidel.
2464
2465         Unify JSC/V8 for History.idl.
2466
2467         * page/History.idl:
2468
2469 2009-03-09  Mike Belshe  <mike@belshe.com>
2470
2471         Reviewed by Eric Seidel.
2472
2473         Unify JSC/V8 implementations of DOMWindow.idl.
2474
2475         * page/DOMWindow.idl:
2476
2477 2009-03-09  Simon Fraser  <simon.fraser@apple.com>
2478
2479         Reviewed by Dave Hyatt
2480
2481         https://bugs.webkit.org/show_bug.cgi?id=24163
2482         
2483         Implement mapping of FloatQuads through 3D transforms.
2484         
2485         Removed the redundant localToContainerQuad() methods, which can now 
2486         shared code with the old mapLocalToAbsolutePoint(), which was
2487         renamed to mapLocalToContainer(). This can now convert a point,
2488         and optionally a FloatQuad, which are carried along in the TransformState.
2489         
2490         Optimized TransformState to reduce to simple FloatPoint.move()
2491         if there are no transforms, and to heap-allocate a transform only if
2492         necessary to accumulate transforms (when using preserve-3d).
2493         
2494         Tested by 3d point mapping tests, and the inspector highlight (which now shows
2495         the correct quads for 3d-transformed elements).
2496
2497         * platform/graphics/transforms/TransformationMatrix.cpp:
2498         (WebCore::TransformationMatrix::projectQuad):
2499         (WebCore::TransformationMatrix::translateRight):
2500         (WebCore::TransformationMatrix::translateRight3d):
2501         * platform/graphics/transforms/TransformationMatrix.h:
2502         * rendering/RenderBox.cpp:
2503         (WebCore::RenderBox::mapLocalToContainer):
2504         (WebCore::RenderBox::mapAbsoluteToLocalPoint):
2505         * rendering/RenderBox.h:
2506         * rendering/RenderObject.cpp:
2507         (WebCore::RenderObject::localToAbsolute):
2508         (WebCore::RenderObject::absoluteToLocal):
2509         (WebCore::RenderObject::mapLocalToContainer):
2510         (WebCore::RenderObject::localToContainerQuad):
2511         * rendering/RenderObject.h:
2512         * rendering/RenderTableCell.cpp:
2513         (WebCore::RenderTableCell::mapLocalToContainer):
2514         * rendering/RenderTableCell.h:
2515         * rendering/RenderView.cpp:
2516         (WebCore::RenderView::mapLocalToContainer):
2517         * rendering/RenderView.h:
2518         * rendering/TransformState.cpp:
2519         (WebCore::TransformState::move):
2520         (WebCore::TransformState::applyTransform):
2521         (WebCore::TransformState::flatten):
2522         (WebCore::TransformState::mappedPoint):
2523         (WebCore::TransformState::mappedQuad):
2524         (WebCore::TransformState::flattenWithTransform):
2525         (WebCore::HitTestingTransformState::mappedQuad):
2526         * rendering/TransformState.h:
2527         (WebCore::TransformState::TransformState):
2528         (WebCore::TransformState::move):
2529         (WebCore::TransformState::lastPlanarPoint):
2530         (WebCore::TransformState::lastPlanarQuad):
2531         * rendering/style/RenderStyle.h:
2532         (WebCore::InheritedFlags::preserves3D):
2533
2534 2009-03-09  Simon Fraser  <simon.fraser@apple.com>
2535
2536         Reviewed by Dave Hyatt
2537
2538         https://bugs.webkit.org/show_bug.cgi?id=24433
2539         
2540         During hit testing with transforms, if a layer has backface-visibility: hidden,
2541         we need to check for it whether or not the layer has a transform, because it
2542         might be an ancestor that is transformed.
2543
2544         Test: transforms/3d/hit-testing/backface-no-transform-hit-test.html
2545
2546         * rendering/RenderLayer.cpp:
2547         (WebCore::RenderLayer::hitTestLayer):
2548
2549 2009-03-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2550
2551         Reviewed by George Staikos.
2552
2553         https://bugs.webkit.org/show_bug.cgi?id=24353
2554         Allow to overrule default build options for Qt build.
2555
2556         * WebCore.pro: Allow to overrule ENABLE_VIDEO and ENABLE_NETSCAPE_PLUGIN_API
2557
2558 2009-03-09  Adam Treat  <adam.treat@torchmobile.com>
2559
2560         Reviewed by George Staikos.
2561
2562         https://bugs.webkit.org/show_bug.cgi?id=24463
2563         WebCore::qstring is detaching and copying twice for every single
2564         WebCore::TextRun that is processed and drawn.  This elevates this method
2565         to one of the top-ten most expensive methods in all of QtWebKit according
2566         to profiling.  This changes the method so that QString only detaches
2567         when absolutely necessary.
2568
2569         * platform/graphics/qt/FontQt.cpp:
2570         (WebCore::qstring):
2571         (WebCore::fixSpacing):
2572         (WebCore::Font::drawComplexText):
2573         (WebCore::Font::floatWidthForComplexText):
2574         (WebCore::Font::offsetForPositionForComplexText):
2575         (WebCore::Font::selectionRectForComplexText):
2576
2577 2009-03-08  Mark Rowe  <mrowe@apple.com>
2578
2579         Reviewed by Oliver Hunt.
2580
2581         Split ScrollAlignment and ScrollBehavior out of RenderLayer.h so that
2582         Frame.h no longer needs to include it.  This cuts the size of the symbols
2583         for a debug build by around 3%.
2584
2585         * dom/Element.cpp:
2586         (WebCore::Element::scrollIntoView):
2587         (WebCore::Element::scrollIntoViewIfNeeded):
2588         * editing/Editor.cpp:
2589         (WebCore::Editor::insertTextWithoutSendingTextEvent):
2590         (WebCore::Editor::revealSelectionAfterEditingOperation):
2591         * editing/SelectionController.cpp:
2592         (WebCore::SelectionController::setSelection):
2593         * loader/FrameLoader.cpp:
2594         (WebCore::FrameLoader::gotoAnchor):
2595         * page/ContextMenuController.cpp:
2596         (WebCore::ContextMenuController::contextMenuItemSelected):
2597         * page/Frame.cpp:
2598         (WebCore::Frame::revealSelection):
2599         (WebCore::Frame::revealCaret):
2600         * page/Frame.h:
2601         * rendering/RenderLayer.cpp:
2602         (WebCore::RenderLayer::getRectToExpose):
2603         (WebCore::RenderLayer::autoscroll):
2604         * rendering/RenderLayer.h:
2605         * rendering/ScrollBehavior.cpp: Added.
2606         (WebCore::):
2607         * rendering/ScrollBehavior.h: Added.
2608         (WebCore::):
2609         (WebCore::ScrollAlignment::getVisibleBehavior):
2610         (WebCore::ScrollAlignment::getPartialBehavior):
2611         (WebCore::ScrollAlignment::getHiddenBehavior):
2612
2613         Add the new files to the build systems:
2614         * GNUmakefile.am:
2615         * WebCore.base.exp:
2616         * WebCore.pro:
2617         * WebCore.scons:
2618         * WebCore.vcproj/WebCore.vcproj:
2619         * WebCore.xcodeproj/project.pbxproj:
2620         * WebCoreSources.bkl:
2621
2622         Add includes that were previously pulled in by way of RenderLayer.h from Frame.h:
2623         * dom/Clipboard.cpp:
2624         * editing/EditorCommand.cpp:
2625         * editing/InsertLineBreakCommand.cpp:
2626         * editing/TypingCommand.cpp:
2627         * html/HTMLFormControlElement.cpp:
2628         * loader/archive/cf/LegacyWebArchive.cpp:
2629         * loader/icon/IconLoader.cpp:
2630         * page/animation/AnimationController.cpp:
2631         * rendering/RenderSlider.cpp:
2632         * rendering/RenderTextControl.cpp:
2633
2634
2635 2009-03-08  Mark Rowe  <mrowe@apple.com>
2636
2637         Reviewed Dan Bernstein.
2638
2639         Push the include of Frame.h out of RenderView.h and down to those files
2640         that need it.  This cuts the size of symbols for RenderFoo object files
2641         by around 15% in a debug build.
2642
2643         * bindings/objc/DOM.mm:
2644         * rendering/RenderFileUploadControl.cpp:
2645         * rendering/RenderInline.cpp:
2646         * rendering/RenderObject.cpp:
2647         * rendering/RenderReplaced.cpp:
2648         * rendering/RenderText.cpp:
2649         * rendering/RenderView.cpp:
2650         (WebCore::RenderView::zoomFactor):
2651         * rendering/RenderView.h:
2652
2653 2009-03-08  Mark Rowe  <mrowe@apple.com>
2654
2655         Rubber-stamped by Dan Bernstein.
2656
2657         Remove some unnecessary or redundant includes from files related to the JS bindings.
2658         This cuts the size of the symbols for a debug build by around 3%.
2659
2660         * bindings/js/JSCustomPositionCallback.cpp:
2661         * bindings/js/JSCustomPositionErrorCallback.cpp:
2662         * bindings/js/JSCustomSQLStatementCallback.cpp:
2663         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2664         * bindings/js/JSCustomSQLTransactionCallback.cpp:
2665         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
2666         * bindings/js/JSCustomVoidCallback.cpp:
2667         * bindings/js/JSCustomXPathNSResolver.cpp:
2668         * bindings/js/JSDocumentCustom.cpp:
2669         * bindings/js/JSPluginElementFunctions.cpp:
2670         * bindings/js/JSSVGPODTypeWrapper.h:
2671
2672 2009-03-08  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
2673
2674         Reviewed by Oliver Hunt.
2675
2676         Remove the unused methods previousHistoryItem(), setPreviousHistoryItem()
2677         and provisionalHistoryItem() from FrameLoader.
2678
2679         * WebCore.base.exp:
2680         * WebCore.order:
2681         * loader/FrameLoader.cpp:
2682         (WebCore::FrameLoader::frameLoadCompleted):
2683         (WebCore::FrameLoader::loadItem):
2684         * loader/FrameLoader.h:
2685
2686 2009-03-08  Gustavo Noronha Silva  <gns@gnome.org>
2687
2688         Reviewed by Holger Freyther.
2689
2690         Implement proper logging for the GTK+ port, inspired by the one in
2691         Qt. We use the WEBKIT_DEBUG environment variable which was already
2692         being used to decide whether to setup a logger for soup or not.
2693
2694         * platform/gtk/LoggingGtk.cpp:
2695         (WebCore::getChannelFromName):
2696         (WebCore::InitializeLoggingChannelsIfNecessary):
2697         * platform/network/soup/ResourceHandleSoup.cpp:
2698         (WebCore::ensureSessionIsInitialized):
2699
2700 2009-03-07  Dan Bernstein  <mitz@apple.com>
2701
2702         Reviewed by Mark Rowe.
2703
2704         - WebCore part of removing build-time and run-time support for legacy
2705           versions of CFNetwork and Core Graphics
2706
2707         * platform/graphics/win/FontCGWin.cpp:
2708         (WebCore::Font::drawGlyphs):
2709         * platform/graphics/win/FontCustomPlatformData.cpp:
2710         (WebCore::FontCustomPlatformData::fontPlatformData):
2711         * platform/graphics/win/FontPlatformDataCGWin.cpp:
2712         (WebCore::FontPlatformData::platformDataInit):
2713         * platform/network/cf/FormDataStreamCFNet.cpp:
2714         (WebCore::setHTTPBody):
2715         (WebCore::httpBodyFromRequest):
2716         * platform/network/cf/ResourceHandleCFNet.cpp:
2717         (WebCore::didSendBodyData):
2718         (WebCore::shouldUseCredentialStorageCallback):
2719         (WebCore::ResourceHandle::start):
2720         * platform/network/win/CookieJarCFNetWin.cpp:
2721         (WebCore::filterCookies):
2722
2723 2009-03-07  Adele Peterson  <adele@apple.com>
2724
2725         Reviewed by Dan Bernstein.
2726
2727         Fix for https://bugs.webkit.org/show_bug.cgi?id=24444
2728         No multiple JS property for <input type="file" multiple />
2729
2730         * html/HTMLInputElement.cpp:
2731         (WebCore::HTMLInputElement::multiple):
2732         (WebCore::HTMLInputElement::setMultiple):
2733         * html/HTMLInputElement.h:
2734         * html/HTMLInputElement.idl:
2735
2736 2009-03-07  Xan Lopez  <xan@gnome.org>
2737
2738         Reviewed by Holger Freyther.
2739
2740         https://bugs.webkit.org/show_bug.cgi?id=24358
2741         [GTK] Scrollbars not clipped correctly
2742
2743         ScrollView scrollbars in subframes are *not* native, so take that
2744         into account again.
2745
2746         * platform/gtk/ScrollbarGtk.cpp:
2747         (ScrollbarGtk::getLocationInParentWindow):
2748         (ScrollbarGtk::frameRectsChanged):
2749         (ScrollbarGtk::paint):
2750         * platform/gtk/ScrollbarGtk.h:
2751
2752 2009-03-06  Peter Kasting  <pkasting@google.com>
2753
2754         Reviewed by Darin Fisher.
2755
2756         https://bugs.webkit.org/show_bug.cgi?id=24405
2757         Horizontal scrolling on Windows was reversed from Mac (and intuition).
2758
2759         * platform/gtk/WheelEventGtk.cpp:
2760         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2761         * platform/win/WheelEventWin.cpp:
2762         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2763
2764 2009-03-06  Peter Kasting  <pkasting@google.com>
2765
2766         Reviewed by Sam Weinig.
2767
2768         Convert some C-style casts to static_cast<>()s.
2769
2770         * platform/gtk/WheelEventGtk.cpp:
2771         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2772         * platform/mac/WheelEventMac.mm:
2773         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2774         * platform/win/WheelEventWin.cpp:
2775         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2776         * platform/wx/MouseWheelEventWx.cpp:
2777         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2778
2779 2009-03-06  Adele Peterson  <adele@apple.com>
2780
2781         Reviewed by Oliver Hunt.
2782
2783         Fix for <rdar://problem/6607524> REGRESSION (Safari 3-4): I can't tab back to the URL field in an empty window (key loop is broken)
2784
2785         I haven't been able to make a test for this since the problem is not reproducible within an empty iframe.
2786
2787         * page/EventHandler.cpp: (WebCore::eventTargetNodeForDocument): We used to ensure that every html document had a body element.
2788           That is no longer true, so we should return the document element for a truly empty document.
2789
2790 2009-03-06  Jay Campan  <jcampan@google.com>
2791
2792         Reviewed by Darin Fisher.
2793
2794         https://bugs.webkit.org/show_bug.cgi?id=24306
2795
2796         Adding a flag to ResourceRequestBase to indicate whether or not upload
2797         progress notifications are needed for a resource. This is useful to
2798         avoid sending these notifications when there are no consumers
2799         (especially in the Chromium case where IPC is involved). 
2800
2801         * platform/network/ResourceRequestBase.h:
2802         (WebCore::ResourceRequestBase::reportUploadProgress):
2803         (WebCore::ResourceRequestBase::setReportUploadProgress):
2804         (WebCore::ResourceRequestBase::ResourceRequestBase):
2805         * xml/XMLHttpRequest.cpp:
2806         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
2807
2808 2009-03-06  Dmitry Titov  <dimich@chromium.org>
2809
2810         Reviewed by Alexey Proskuryakov.
2811
2812         https://bugs.webkit.org/show_bug.cgi?id=24150
2813         Add virtual ScriptExecutionContext::encoding()
2814
2815         Test: http/tests/workers/text-encoding.html
2816
2817         * dom/Document.cpp:
2818         (WebCore::Document::encoding):
2819         * dom/Document.h:
2820         (WebCore::Document::inputEncoding):
2821         (WebCore::Document::charset):
2822         (WebCore::Document::characterSet):
2823         Add new virtual method and route DOM synonym functions on Document through it.
2824
2825         * dom/ScriptExecutionContext.h:
2826         * workers/Worker.cpp:
2827         (WebCore::Worker::Worker):
2828         (WebCore::Worker::notifyFinished):
2829         * workers/WorkerContext.cpp:
2830         (WebCore::WorkerContext::WorkerContext):
2831         (WebCore::WorkerContext::encoding):
2832         (WebCore::WorkerContext::completeURL): Added comment on why this is different from Document::completeURL
2833         * workers/WorkerContext.h:
2834         (WebCore::WorkerContext::create):
2835         * workers/WorkerContextProxy.h:
2836         * workers/WorkerMessagingProxy.cpp:
2837         (WebCore::WorkerMessagingProxy::startWorkerContext):
2838         * workers/WorkerMessagingProxy.h:
2839         * workers/WorkerThread.cpp:
2840         (WebCore::WorkerThreadStartupData::create):
2841         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
2842         (WebCore::WorkerThread::create):
2843         (WebCore::WorkerThread::WorkerThread):
2844         (WebCore::WorkerThread::workerThread):
2845         * workers/WorkerThread.h:
2846         All of the above route the 'encoding' parameter of parent context to the new
2847         instance of WorkerContext - from Worker::notifyFinished() via WorkerMessagingProxy
2848         through WorkerThread through WorkerThreadStartupData and into constructor of WorkerContext.
2849
2850 2009-03-06  Peter Kasting  <pkasting@google.com>
2851
2852         Build bustage fix.
2853
2854         * dom/Node.cpp:
2855         (WebCore::Node::dispatchWheelEvent):
2856
2857 2009-03-06  Eric Carlson  <eric.carlson@apple.com>
2858
2859         Reviewed by Antti Koivisto.
2860
2861         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2862         (WebCore::MediaPlayerPrivate::createQTMovieView):  Delay callback while setting up movieview.
2863
2864 2009-03-06  Douglas R. Davidson  <ddavidso@apple.com>
2865
2866         Reviewed by Justin Garcia.
2867         
2868         https://bugs.webkit.org/show_bug.cgi?id=24108
2869
2870         Update spelling and grammar checking to use the new combined text 
2871         checking (with automatic language identification) on Snow Leopard. 
2872         Tested manually in Mail and Safari; automated tests to come later. 
2873         
2874         * editing/Editor.cpp:
2875         (WebCore::findFirstMisspellingOrBadGrammarInRange):
2876         (WebCore::Editor::advanceToNextMisspelling):
2877         (WebCore::guessesForMisspelledOrUngrammaticalRange):
2878         (WebCore::Editor::guessesForMisspelledOrUngrammaticalSelection):
2879         (WebCore::Editor::markMisspellingsAfterTypingToPosition):
2880         (WebCore::markAllMisspellingsAndBadGrammarInRanges):
2881         (WebCore::Editor::markMisspellingsAndBadGrammar):
2882         * editing/Editor.h:
2883         * loader/EmptyClients.h:
2884         (WebCore::EmptyEditorClient::checkSpellingAndGrammarOfParagraph):
2885         * page/EditorClient.h:
2886         * page/Frame.cpp:
2887         (WebCore::Frame::respondToChangedSelection):
2888         * platform/ContextMenu.cpp:
2889         (WebCore::ContextMenu::populate):
2890
2891 2009-03-06  Peter Kasting  <pkasting@google.com>
2892
2893         Reviewed by Darin Fisher.
2894
2895         https://bugs.webkit.org/show_bug.cgi?id=24407
2896         Windows scroll amount was too small, and wheel scroll distance
2897         conversion code was overly complex.
2898
2899         * page/EventHandler.cpp:
2900         (WebCore::scrollAndAcceptEvent):
2901         * platform/PlatformWheelEvent.h:
2902         (WebCore::):
2903         * platform/ScrollView.cpp:
2904         (WebCore::ScrollView::wheelEvent):
2905         * platform/Scrollbar.h:
2906         * platform/gtk/WheelEventGtk.cpp:
2907         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2908         * platform/mac/WheelEventMac.mm:
2909         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2910         * platform/qt/WheelEventQt.cpp:
2911         * platform/win/WheelEventWin.cpp:
2912         (WebCore::horizontalScrollChars):
2913         (WebCore::verticalScrollLines):
2914         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2915         * platform/wx/MouseWheelEventWx.cpp:
2916         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2917
2918 2009-03-06  Dimitri Glazkov  <dglazkov@chromium.org>
2919
2920         Reviewed by Adam Roben.
2921
2922         Generate valid bindings with HTML5 database support disabled. 
2923
2924         * inspector/InspectorController.idl: Added feature guard around 
2925         databaseTableNames definition.
2926
2927 2009-03-04  Xan Lopez  <xan@gnome.org>
2928
2929         Reviewed by Holger Freyther.
2930
2931         https://bugs.webkit.org/show_bug.cgi?id=24358
2932         [GTK] Scrollbars not clipped correctly
2933
2934         Do not take into account the case of being a ScrollView scrollbar,
2935         since those are native in our case.
2936
2937         * platform/gtk/ScrollbarGtk.cpp:
2938         (ScrollbarGtk::frameRectsChanged):
2939
2940 2009-03-04  Xan Lopez  <xan@gnome.org>
2941
2942         Reviewed by Holger Freyther.
2943
2944         https://bugs.webkit.org/show_bug.cgi?id=24358
2945         [GTK] Scrollbars not clipped correctly
2946
2947         Move Widget::paint to ScrollbarGtk::paint, since it's scrollbar
2948         specific and it's our only Widget anyway.
2949
2950         * platform/gtk/ScrollbarGtk.cpp:
2951         (ScrollbarGtk::paint):
2952         * platform/gtk/ScrollbarGtk.h:
2953         * platform/gtk/WidgetGtk.cpp:
2954
2955 2009-03-04  Xan Lopez  <xan@gnome.org>
2956
2957         Reviewed by Holger Freyther.
2958
2959         https://bugs.webkit.org/show_bug.cgi?id=24358
2960         [GTK] Scrollbars not clipped correctly
2961
2962         Use correct clip rectangle and apply coordinate translation needed
2963         for non-ScrollView scrollbars.
2964
2965         We were ignoring the clip rectangle passed as parameter, which is
2966         wrong in the case of non coalesced expose events. This, in turn,
2967         uncovers the fact that we were not applying coordinate translation
2968         to our position.
2969
2970         * platform/gtk/WidgetGtk.cpp:
2971         (WebCore::Widget::paint):
2972
2973 2009-03-06  Eric Carlson  <eric.carlson@apple.com>
2974
2975         Build fix, no review
2976
2977         * platform/graphics/chromium/MediaPlayerPrivateChromium.h: fix setSize declaration
2978
2979 2009-03-06  Eric Carlson  <eric.carlson@apple.com>
2980
2981         Reviewed by Simon Fraser.
2982
2983         https://bugs.webkit.org/show_bug.cgi?id=22790
2984         Bug 22790: [Transforms] MediaPlayer::setRect() makes no sense with transforms
2985         Replace media engine setRect with setSize since they don't use about the 
2986         position anyway.
2987
2988         * platform/graphics/MediaPlayer.cpp:
2989         (WebCore::NullMediaPlayerPrivate::setSize): Changed from setRect.
2990         (WebCore::MediaPlayer::setSize): Ditto.
2991         * platform/graphics/MediaPlayer.h:
2992         (WebCore::MediaPlayer::size): Changed from rect().
2993
2994         * platform/graphics/MediaPlayerPrivate.h: Changed setRect to setSize.
2995
2996         * platform/graphics/chromium/MediaPlayerPrivateChromium.h: Ditto.
2997
2998         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: 
2999         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Initialize m_size instead of m_rect
3000         (WebCore::MediaPlayerPrivate::setSize): Changed from setRect
3001         (WebCore::MediaPlayerPrivate::paint): update comment
3002         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h: m_rect -> m_size.
3003
3004         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:  m_rect
3005         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3006         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Initialize m_rect.
3007         (WebCore::MediaPlayerPrivate::createQTMovieView): setRect-> setSize.
3008         (WebCore::MediaPlayerPrivate::setSize): Changed from setRect
3009         (WebCore::MediaPlayerPrivate::paint): Call view:setFrame: when in a media document so 
3010         the movie is drawn in the correct location.
3011
3012         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
3013         (WebCore::MediaPlayerPrivate::setSize):  Changed from setRect
3014         * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
3015
3016         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
3017         (WebCore::MediaPlayerPrivate::setSize):  Changed from setRect
3018         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
3019
3020         * rendering/RenderVideo.cpp:
3021         (WebCore::RenderVideo::updatePlayer): Call setSize instead of setRect.
3022
3023 2009-03-06  Darin Adler  <darin@apple.com>
3024
3025         Reviewed by Darin Fisher.
3026
3027         Bug 24422: REGRESSION: null-URL crash in FrameLoader setting location.hash on new window
3028         https://bugs.webkit.org/show_bug.cgi?id=24422
3029         rdar://problem/6402208
3030
3031         Test: fast/dom/location-new-window-no-crash.html
3032
3033         The issue here is empty (or null) URLs. I picked the "schedule navigation" bottleneck
3034         to add some checks for empty URLs. We could also put the empty URL checks at some
3035         other bottleneck level and add more assertions over time. I tried adding a few more
3036         assertions to functions like loadURL and hit them while running the regression tests,
3037         so it's probably going to be a bit tricky to clean this up throughout the loader.
3038
3039         * loader/FrameLoader.cpp:
3040         (WebCore::ScheduledRedirection::ScheduledRedirection): Explicitly marked this struct
3041         immutable by making all its members const. Added assertions about the arguments,
3042         including that the URL is not empty. Initialized one uninitialized member in one of
3043         the constructors.
3044         (WebCore::FrameLoader::scheduleHTTPRedirection): Added an early exit to make this
3045         a no-op if passed an empty URL.
3046         (WebCore::FrameLoader::scheduleLocationChange): Ditto.
3047         (WebCore::FrameLoader::scheduleRefresh): Ditto.
3048
3049 2009-03-06  Gustavo Noronha Silva  <gns@gnome.org>
3050
3051         Reviewed by Holger Freyther.
3052
3053         https://bugs.webkit.org/show_bug.cgi?id=24423
3054         Use new soup_message_body_set_accumulate API in soup backend
3055
3056         Disable accumulating chunks for request_body on file uploads,
3057         using the new soup API.
3058
3059         * platform/network/soup/ResourceHandleSoup.cpp:
3060         (WebCore::ResourceHandle::startHttp):
3061
3062 2009-03-06  Gustavo Noronha Silva  <gns@gnome.org>
3063
3064         Reviewed by Holger Freyther.
3065
3066         Replace use of deprecated SOUP_MESSAGE_OVERWRITE_CHUNKS flag with
3067         the new soup_message_body_set_accumulate API in soup.
3068
3069         * platform/network/soup/ResourceHandleSoup.cpp:
3070         (WebCore::gotHeadersCallback):
3071         (WebCore::ResourceHandle::startHttp):
3072
3073 2009-03-06  Gustavo Noronha Silva  <gns@gnome.org>
3074
3075         Reviewed by Holger Freyther.
3076
3077         https://bugs.webkit.org/show_bug.cgi?id=24051
3078         Soup backend needs content sniffing capabilities
3079
3080         Perform content sniffing when using soup, so that we have a chance
3081         of figuring out the Content-Type of the file if it's not sent by
3082         the server.
3083
3084         * platform/network/ResourceHandleInternal.h:
3085         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
3086         * platform/network/soup/ResourceHandleSoup.cpp:
3087         (WebCore::gotHeadersCallback):
3088         (WebCore::gotChunkCallback):
3089
3090 2009-03-06  Hironori Bono  <hbono@chromium.org>
3091
3092         Reviewed by Alexey Proskuryakov.
3093
3094         https://bugs.webkit.org/show_bug.cgi?id=24342
3095         Cannot insert a Thai character after a Thai prepend character when using ICU 4.0
3096
3097         This change creates a new break iterator "cursorMovementIterator" for
3098         moving cursors and use it when moving an input cursor.
3099         In "TextBreakIteratorICU.cpp", this break iterator uses custom ruleset
3100         based on the one of ICU 3.8.
3101         On the other hand, in "TextBreakIteratorQt.cpp", this break iterator
3102         just calls the characterBreakIterator() function.
3103
3104         Test: editing/inserting/insert-thai-characters-001.html
3105
3106         * platform/text/TextBreakIterator.h: Added a new function cursorMovementIterator().
3107         * platform/text/TextBreakIteratorICU.cpp: Implemented the cursorMovementIterator() function for ICU.
3108         (WebCore::setUpIteratorWithRules): Ditto.
3109         (WebCore::cursorMovementIterator): Ditto.
3110         * platform/text/qt/TextBreakIteratorQt.cpp: Implemented the cursorMovementIterator() function for Qt.
3111         (WebCore::cursorMovementIterator): Ditto.
3112         * rendering/RenderText.cpp: Call the cursorMovementIterator() function when moving an input cursor.
3113         (WebCore::RenderText::previousOffset): Ditto.
3114         (WebCore::RenderText::nextOffset): Ditto.
3115
3116 2009-03-05  Alexey Proskuryakov  <ap@webkit.org>
3117
3118         Reviewed by Oliver Hunt.
3119
3120         <rdar://problem/6621701> Safari 4 Beta Breaks XMLHttpRequest Response Text With Special
3121         Characters (a compatibility issue with widgets).
3122
3123         Test: http/tests/xmlhttprequest/broken-xml-encoding.html
3124
3125         Revert part of an Acid 3 fix - now we are no longer strict when decoding XMLHttpRequest XML
3126         responses.
3127
3128         * loader/TextResourceDecoder.cpp:
3129         (WebCore::TextResourceDecoder::TextResourceDecoder):
3130         (WebCore::TextResourceDecoder::decode):
3131         (WebCore::TextResourceDecoder::flush):
3132         * loader/TextResourceDecoder.h:
3133         (WebCore::TextResourceDecoder::useLenientXMLDecoding):
3134         Don't stop on XML decoding errors if useLenientXMLDecoding() was called.
3135
3136         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData): Don't stop on XML
3137         decoding errors. This behavior is now limited to other kinds of XML content.
3138
3139 2009-03-05  Simone Fiorentino  <simone.fiorentino@consulenti.fastweb.it>
3140
3141         Bug 24382: request to add SH4 platform
3142
3143         <https://bugs.webkit.org/show_bug.cgi?id=24382>
3144
3145         Reviewed by David Kilzer.
3146
3147         * platform/text/AtomicString.cpp:
3148         (WebCore::equal): Aligned memory access on SH4 platform.
3149
3150 2009-03-05  Jeremy Moskovich  <jeremy@chromium.org>
3151
3152         Reviewed by Simon Fraser.
3153
3154         Fix for https://bugs.webkit.org/show_bug.cgi?id=24215
3155
3156         Gears expects an object tag with display:none to instantiate the plugin,
3157         so we add a workaround to make this work and fix Gears on WebKit trunk.
3158
3159         * html/HTMLObjectElement.cpp:
3160         (WebCore::HTMLObjectElement::rendererIsNeeded):
3161
3162 2009-03-05  Avi Drissman  <avi@chromium.org>
3163
3164         Reviewed by Darin Fisher.
3165
3166         Need to have Chromium Mac match Safari Mac's accesskey handling
3167         https://bugs.webkit.org/show_bug.cgi?id=24404
3168
3169         * page/chromium/EventHandlerChromium.cpp:
3170         (WebCore::EventHandler::accessKeyModifiers): Share access key modifiers with Mac Safari when building for the Mac.
3171
3172 2009-03-05  Simon Fraser  <simon.fraser@apple.com>
3173
3174         Reviewed by Dave Hyatt
3175
3176         https://bugs.webkit.org/show_bug.cgi?id=24412
3177         
3178         Fix crash when hit-testing elements with -webkit-transform-style: preserve-3d
3179         but no transform. We need to make localTransformState if we see preserve-3d.
3180         Also need to call update3DTransformedDescendantStatus() before we test
3181         m_has3DTransformedDescendant.
3182
3183         Test: transforms/3d/hit-testing/hit-preserves-3d.html
3184
3185         * rendering/RenderLayer.cpp:
3186         (WebCore::RenderLayer::hitTestLayer):
3187
3188 2009-03-05  Eric Seidel  <eric@webkit.org>
3189
3190         Reviewed by David Hyatt.
3191
3192         Changes to RenderLayer destruction to hopefully help catch an elusive crasher
3193         https://bugs.webkit.org/show_bug.cgi?id=24409
3194         
3195         Added a new RenderBoxModelObject::destroyLayer() call which is
3196         now the only way which RenderLayers should ever be destroyed.
3197         This ensures that the pointer to the layer is cleared in the
3198         RenderObject after destruction, allowing us to ASSERT in the
3199         RenderBoxModelObject destructor.
3200
3201         * rendering/RenderBox.cpp:
3202         (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
3203         * rendering/RenderBoxModelObject.cpp:
3204         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
3205         (WebCore::RenderBoxModelObject::destroyLayer):
3206         (WebCore::RenderBoxModelObject::destroy):
3207         (WebCore::RenderBoxModelObject::styleDidChange):
3208         * rendering/RenderBoxModelObject.h:
3209         * rendering/RenderLayer.cpp:
3210         (WebCore::RenderLayer::stackingContext):
3211         (WebCore::RenderLayer::destroy):
3212         (WebCore::RenderLayer::removeOnlyThisLayer):
3213         * rendering/RenderLayer.h:
3214         * rendering/RenderObject.cpp:
3215         (WebCore::RenderObject::destroy):
3216         * rendering/RenderWidget.cpp:
3217         (WebCore::RenderWidget::destroy):
3218
3219 2009-03-05  Eric Seidel  <eric@webkit.org>
3220
3221         Reviewed by David Hyatt.
3222
3223         Remove old, unused IE 5.5 scrollbar-* CSS properties.
3224         Sort the unimplemented getComputedStyle properties so it's
3225         easier to see which ones actually need implementation.
3226
3227         * css/CSSComputedStyleDeclaration.cpp:
3228         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3229         * css/CSSParser.cpp:
3230         (WebCore::CSSParser::parseValue):
3231         * css/CSSPropertyNames.in:
3232         * css/CSSStyleSelector.cpp:
3233         (WebCore::CSSStyleSelector::applyProperty):
3234
3235 2009-03-05  Justin Garcia  <justin.garcia@apple.com>
3236
3237         Reviewed by Darin Adler.
3238         
3239         WebViewDidChangeSelectionNotifications weren't being sent for commands that change the selection's position
3240         within the document without changing its position in the DOM.  For example, pressing return in (caret marked by ^):
3241         <div contentEditable="true"><div>^Hello</div></div>
3242         Undo was being enabled, shouldDeleteDOMRange called, etc. when doing no-op deletes (a delete in an empty document 
3243         for example). 
3244
3245         Changes to layout tests demonstrate fix.
3246         
3247         * editing/EditCommand.cpp:
3248         (WebCore::EditCommand::apply): Don't call applyEditing for a TypingCommand.  The TypingCommand knows whether or
3249         not it did work that needs to be applied.
3250         * editing/Editor.cpp:
3251         (WebCore::Editor::appliedEditing): Moved code (but did not alter) to changeSelectionAfterCommand.
3252         (WebCore::Editor::unappliedEditing): Ditto.
3253         (WebCore::Editor::reappliedEditing): Ditto.
3254         (WebCore::Editor::changeSelectionAfterCommand): Moved code from *appliedEditing into here.  Also call out to
3255         EditorClient::respondToChangedSelection() for commands that changed the selection's position in the document
3256         even if they did not change it's position in the DOM.  Any TypingCommand that gets this far changed it's position
3257         in the document.
3258         * editing/Editor.h:
3259         * editing/TypingCommand.cpp:
3260         (WebCore::TypingCommand::TypingCommand): Removed unused m_appliedEditing.
3261         (WebCore::TypingCommand::typingAddedToOpenCommand): Always apply editing.  We won't get this far if we don't need to.
3262         (WebCore::TypingCommand::deleteKeyPressed): Don't do any of the things that only make sense for Range selections, like
3263         adding to the killring and responding to a change in selections if the delete was a no-op.
3264         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
3265         * editing/TypingCommand.h:
3266
3267 2009-03-05  Dimitri Glazkov  <dglazkov@chromium.org>
3268
3269         Reviewed by Adam Roben.
3270
3271         Eliminate a ref-counting leak in InspectorController.
3272
3273         * inspector/InspectorController.h: Made constructor private, added static create method.
3274         * page/Page.cpp:
3275         (WebCore::Page::Page): Change initializer to use static create method.
3276
3277 2009-03-05  Dimitri Glazkov  <dglazkov@chromium.org>
3278
3279         Reviewed by Timothy Hatcher.
3280
3281         https://bugs.webkit.org/show_bug.cgi?id=24355
3282         Add InspectorController.idl and convert InspectorController.cpp to use
3283         JSC bindings.
3284
3285         * DerivedSources.make: Added InspectorController.idl
3286         * WebCore.xcodeproj/project.pbxproj: Added idl, bindings files.
3287         * bindings/js/JSInspectorControllerCustom.cpp: Added.
3288         * bindings/scripts/CodeGeneratorJS.pm: Added Array to no-header types.
3289         * inspector/InspectorController.cpp: Removed hand-rolled bindings.
3290         * inspector/InspectorController.h: Added platform and addSourceToFrame methods.
3291         * inspector/InspectorController.idl: Added.
3292         * page/Page.h: Changed member to RefPtr since InspectorController is now ref-counted.
3293
3294 2009-03-05  Eric Carlson  <eric.carlson@apple.com>
3295
3296         Reviewed by Simon Fraser.
3297
3298         https://bugs.webkit.org/show_bug.cgi?id=24400
3299         Bug 24400: Remove "start", "end", "loopStart", "loopEnd", "currentLoop", and "playCount" 
3300         media element attributes
3301
3302         Test: media/video-loop.html
3303
3304         * html/HTMLMediaElement.cpp:
3305         (WebCore::HTMLMediaElement::HTMLMediaElement):
3306         (WebCore::HTMLMediaElement::loadInternal):
3307         (WebCore::HTMLMediaElement::setNetworkState):
3308         (WebCore::HTMLMediaElement::seek):
3309         (WebCore::HTMLMediaElement::playInternal):
3310         (WebCore::HTMLMediaElement::loop):
3311         (WebCore::HTMLMediaElement::setLoop):
3312         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
3313         (WebCore::HTMLMediaElement::endedPlayback):
3314         (WebCore::HTMLMediaElement::updatePlayState):
3315         * html/HTMLMediaElement.h:
3316         * html/HTMLMediaElement.idl:
3317
3318 2009-03-05  Steve Falkenburg  <sfalken@apple.com>
3319
3320         <rdar://problem/6651112> Safari asks about re-posting a form even when page is cached
3321         
3322         Reviewed by Ada Chan.
3323
3324         * platform/network/cf/ResourceHandleCFNet.cpp:
3325         (WebCore::ResourceHandle::willLoadFromCache): Ported from Mac version.
3326
3327 2009-03-05  David Hyatt  <hyatt@apple.com>
3328
3329         Reviewed by Eric Seidel
3330
3331         https://bugs.webkit.org/show_bug.cgi?id=24248
3332
3333         Make sure painting of overflow controls checks that visibility:visible is set on the block before
3334         painting.  Pixel tests caught this regression.
3335
3336         Make sure resizer painting pushes a clip of the corner rect.  It was relying on the clip layers happened
3337         to do to their bounds (which had nothing to do with overflow).
3338
3339         * rendering/RenderBlock.cpp:
3340         (WebCore::RenderBlock::paint):
3341         * rendering/RenderLayer.cpp:
3342         (WebCore::RenderLayer::paintResizer):
3343
3344 2009-03-05  Yong Li  <yong.li@torchmobile.com>
3345
3346         Reviewed by Simon Fraser.
3347
3348         https://bugs.webkit.org/show_bug.cgi?id=24386
3349         A faster implementation of extractMIMETypeFromMediaType.
3350
3351         * platform/network/HTTPParsers.cpp:
3352         (WebCore::extractMIMETypeFromMediaType):
3353
3354 2009-03-05  Yong Li  <yong.li@torchmobile.com>
3355
3356         Reviewed by Antti Koivisto.
3357
3358         https://bugs.webkit.org/show_bug.cgi?id=24392
3359         Do not get the current time for unless we're doing PRELOAD_DEBUG as this
3360         can be unnecessarily expensive.
3361
3362         * html/PreloadScanner.cpp:
3363         (WebCore::PreloadScanner::write):
3364
3365 2009-03-04  Simon Fraser  <simon.fraser@apple.com>
3366
3367         Reviewed by Dave Hyatt
3368
3369         https://bugs.webkit.org/show_bug.cgi?id=24327
3370         
3371         When mapping points and hit testing through transforms, work
3372         correctly when acclerated animations of transforms are running.
3373         
3374         Tested by LayoutTests/animations/animation-hit-test-transform.html,
3375         which only failed when ACCELERATED_COMPOSITING was turned on.
3376
3377         * rendering/RenderLayer.cpp:
3378         (WebCore::RenderLayer::currentTransform):
3379         * rendering/RenderLayer.h:
3380         * rendering/RenderObject.cpp:
3381         (WebCore::RenderObject::transformFromContainer):
3382
3383 2009-03-05  Mike Belshe  <mike@belshe.com>
3384
3385         Reviewed by Darin Fisher.
3386
3387         https://bugs.webkit.org/show_bug.cgi?id=24391
3388         Frame.cpp uses JSC specific includes
3389
3390         * page/Frame.cpp:
3391
3392 2009-03-05  Gustavo Noronha Silva  <gns@gnome.org>
3393
3394         Reviewed by Alexey Proskuryakov.
3395
3396         https://bugs.webkit.org/show_bug.cgi?id=24389
3397         WebKitGTK+ crashes when cancelling plugin loads
3398
3399         Remove bogus calls to the client's didFinishLoading method from
3400         our ResourceHandle::cancel implementation. Calling
3401         didFinishLoading here is mostly inoffensive for most loads, but
3402         causes crashes when plugin loads are cancelled.
3403
3404         * platform/network/soup/ResourceHandleSoup.cpp:
3405         (WebCore::ResourceHandle::cancel):
3406
3407 2009-03-05  Steve Falkenburg  <sfalken@apple.com>
3408
3409         Windows build fix.
3410         
3411         * WebCore.vcproj/QTMovieWin.vcproj:
3412
3413 2009-03-05  Adam Treat  <adam.treat@torchmobile.com>
3414
3415         Build fix for when ENABLE_NETSCAPE_PLUGIN_API = 0.  The method
3416         ScriptController::jsObjectForPluginElement(HTMLPlugInElement*); is not
3417         protected by an #if and uses HTMLPlugInElement so it must be included.
3418
3419         * bindings/js/ScriptController.cpp:
3420
3421 2009-03-05  Dimitri Glazkov  <dglazkov@chromium.org>
3422
3423         GTK Build fix.
3424
3425         * inspector/ConsoleMessage.h: Use proper header.
3426
3427 2009-03-05  Dimitri Glazkov  <dglazkov@chromium.org>
3428
3429         Reviewed by Timothy Hatcher.
3430
3431         https://bugs.webkit.org/show_bug.cgi?id=24376
3432         Split InspectorController.cpp file into separate classes.
3433
3434         * GNUmakefile.am: Modified to include new files.
3435         * WebCore.pro: Ditto.
3436         * WebCore.scons: Ditto.
3437         * WebCore.vcproj/WebCore.vcproj: Ditto.
3438         * WebCore.xcodeproj/project.pbxproj: Ditto.
3439         * WebCoreSources.bkl: Ditto.
3440         * inspector/ConsoleMessage.cpp: Added.
3441         * inspector/ConsoleMessage.h: Added.
3442         * inspector/InspectorController.cpp:
3443         * inspector/InspectorDOMStorageResource.cpp: Added.
3444         * inspector/InspectorDOMStorageResource.h: Added.
3445         * inspector/InspectorDatabaseResource.cpp: Added.
3446         * inspector/InspectorDatabaseResource.h: Added.
3447         * inspector/InspectorResource.cpp: Added.
3448         * inspector/InspectorResource.h: Added.
3449
3450 2009-03-05  Eric Carlson  <eric.carlson@apple.com>
3451
3452         Reviewed by Darin Adler
3453
3454         https://bugs.webkit.org/show_bug.cgi?id=24387
3455         Remove media element bufferingRate attribute. No test necessary as there
3456         were none for this attribute.
3457
3458         * html/HTMLMediaElement.cpp:
3459         (WebCore::HTMLMediaElement::HTMLMediaElement): Don't initialize m_bufferingRate.
3460         (WebCore::HTMLMediaElement::loadInternal): Ditto.
3461         (WebCore::HTMLMediaElement::setNetworkState): Ditto.
3462         (WebCore::HTMLMediaElement::progressEventTimerFired): Don't calculate m_bufferingRate.
3463         * html/HTMLMediaElement.h: Remove m_bufferingRate.
3464         * html/HTMLMediaElement.idl: Ditto.
3465
3466 2009-03-05  Xan Lopez  <xan@gnome.org>
3467
3468         Reviewed by Mark Rowe.
3469
3470         https://bugs.webkit.org/show_bug.cgi?id=24377
3471         [GTK] Comply better with coding style guidelines in ResourceHandleSoup
3472
3473         Use C++ booleans, 0 instead of NULL, prefix boolean variables with
3474         'is', do not use 'else if' if the previous if had a return, delete
3475         trailing whitespace, etc.
3476
3477         * platform/network/ResourceHandleInternal.h:
3478         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
3479         * platform/network/soup/ResourceHandleSoup.cpp:
3480         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
3481         (WebCore::fillResponseFromMessage):
3482         (WebCore::restartedCallback):
3483         (WebCore::finishedCallback):
3484         (WebCore::parseDataUrl):
3485         (WebCore::ensureSessionIsInitialized):
3486         (WebCore::ResourceHandle::startHttp):
3487         (WebCore::reportUnknownProtocolError):
3488         (WebCore::ResourceHandle::start):
3489         (WebCore::cleanupGioOperation):
3490         (WebCore::closeCallback):
3491         (WebCore::readCallback):
3492         (WebCore::openCallback):
3493         (WebCore::queryInfoCallback):
3494         (WebCore::ResourceHandle::startGio):
3495
3496 2009-03-04  Simon Fraser  <simon.fraser@apple.com>
3497
3498         Reviewed by Eric Seidel
3499
3500         https://bugs.webkit.org/show_bug.cgi?id=24328
3501         
3502         If an element has backface-visibility: hidden, hit testing should not
3503         hit the back sides of elements. Test for that by inverting the accumulated
3504         transform and looking at the z vector.
3505
3506         Tested by transforms/3d/hit-testing/backface-hit-test.html
3507         
3508         * rendering/RenderLayer.cpp:
3509         (WebCore::RenderLayer::hitTestLayer):
3510
3511 2009-03-04  Adam Langley  <agl@google.com>
3512
3513         Reviewed by Darin Fisher.
3514
3515         r41362 mistakenly added functions "RenderThemeWin::" into
3516         RenderThemeChromiumGtk.cpp. When correcting this, I somehow changed
3517         them to void return types. This patch switches them back to ints.
3518
3519         https://bugs.webkit.org/show_bug.cgi?id=24360
3520
3521         * rendering/RenderThemeChromiumLinux.cpp:
3522         (WebCore::RenderThemeChromiumLinux::buttonInternalPaddingLeft):
3523         (WebCore::RenderThemeChromiumLinux::buttonInternalPaddingRight):
3524         (WebCore::RenderThemeChromiumLinux::buttonInternalPaddingTop):
3525         (WebCore::RenderThemeChromiumLinux::buttonInternalPaddingBottom):
3526
3527 2009-03-04  Adam Langley  <agl@google.com>
3528
3529         Reviewed by Darin Fisher.
3530
3531         Chromium Linux: change some metrics to better match Windows after
3532         r41416. Aesthetically this may be worse, but web-compat is king.
3533
3534         Also, the previous code had an off by one error when drawing
3535         scrollbars which caused the scrollbar to overflow it's bounds by 1px
3536         at the right and bottom edges.
3537
3538         https://bugs.webkit.org/show_bug.cgi?id=24369
3539
3540         * rendering/RenderThemeChromiumLinux.cpp:
3541         (WebCore::):
3542         (WebCore::RenderThemeChromiumLinux::systemFont):
3543         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
3544         (WebCore::ScrollbarThemeChromium::paintTrackPiece):
3545
3546 2009-03-04  Eric Seidel  <eric@webkit.org>
3547
3548         Reviewed by Adam Roben.
3549
3550         Add an ASSERT to better demonstrate the cause of the crash in
3551         https://bugs.webkit.org/show_bug.cgi?id=23736
3552
3553         * loader/DocLoader.cpp:
3554         (WebCore::DocLoader::~DocLoader):
3555
3556 2009-03-04  David Levin  <levin@chromium.org>
3557
3558         Reviewed by Alexey Proskuryakov.
3559
3560         Bug 24337: Assert when doing sync XHR in a worker for a cacheable response.
3561         <https://bugs.webkit.org/show_bug.cgi?id=24337>
3562
3563         Tests: http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache.html
3564                http/tests/xmlhttprequest/workers/xmlhttprequest-file-not-found.html
3565
3566         * loader/mac/ResourceLoaderMac.mm:
3567         (WebCore::ResourceLoader::willCacheResponse):
3568         An identifier is only asssigned if resource load callbacks are done.  So don't send
3569         willCacheResponse which uses identifier if resource load callbacks aren't being sent.
3570
3571 2009-03-04  David Levin  <levin@chromium.org>
3572
3573         Reviewed by Alexey Proskuryakov.
3574
3575         Bug 24330: Sync xhr in workers should send an abort exception when the worker is terminated.
3576         <https://bugs.webkit.org/show_bug.cgi?id=24330>
3577
3578         Test: http/tests/xmlhttprequest/workers/abort-exception-assert.html
3579
3580         * dom/ExceptionCode.cpp:
3581         (WebCore::xmlHttpRequestExceptionNames):
3582         Added missing ABORT_ERR whose absence caused an assert.
3583
3584         * loader/WorkerThreadableLoader.cpp:
3585         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
3586         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
3587         Add more logic to handle the termination case for sync xhr.
3588
3589 2009-03-04  Eric Carlson  <eric.carlson@apple.com>
3590
3591         Reviewed by Antti Koivisto.
3592
3593         https://bugs.webkit.org/show_bug.cgi?id=24364
3594         Add support for HTMLMediaElement canPlayType method. Make
3595         MediaPlayer::supportsType take a ContentType instead of a
3596         separate mime type and codecs parameter.
3597
3598         Test: media/video-can-play-type.html
3599
3600         * dom/DOMImplementation.cpp:
3601         (WebCore::DOMImplementation::createDocument):
3602         * html/HTMLMediaElement.cpp:
3603         (WebCore::HTMLMediaElement::canPlayType): Add canPlayType method.
3604         (WebCore::HTMLMediaElement::loadInternal): selectMediaURL returns a ContentType.
3605         (WebCore::HTMLMediaElement::selectMediaURL): Return a ContentType instead of raw MIME type.
3606         (WebCore::HTMLMediaElement::initialURL): selectMediaURL returns a ContentType.
3607         * html/HTMLMediaElement.h: Add prototype.
3608         * html/HTMLMediaElement.idl: Ditto.
3609         * platform/graphics/MediaPlayer.cpp:
3610         (WebCore::MediaPlayer::load):&nb