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