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