2009-02-28 Dimitri Glazkov <dglazkov@chromium.org>
[WebKit-https.git] / WebCore / ChangeLog
1 2009-02-28  Dimitri Glazkov  <dglazkov@chromium.org>
2
3         Reviewed by Darin Fisher.
4
5         https://bugs.webkit.org/show_bug.cgi?id=24261
6         Fix V8 custom binding scrubbing error.
7
8         Test: fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html
9
10         * WebCore.xcodeproj/project.pbxproj:
11         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
12         (WebCore::cssPropertyName):  Remove dubious checks, left over from
13             incomplete conversion of parameter from pointer to pass-by-ref.
14         (WebCore::NAMED_PROPERTY_GETTER): Initialize parameter.
15         (WebCore::NAMED_PROPERTY_SETTER): Ditto.
16
17 2009-02-28  Xan Lopez  <xan@gnome.org>
18
19         Reviewed by Holger Freyther.
20
21         https://bugs.webkit.org/show_bug.cgi?id=24263
22         [GTK] ref ResourceHandle until we are finished with it
23
24         Add a ref to the ResourceHandle in startHttp so we can keep it
25         alive untill all callbacks have been executed, and unref it when
26         soup tells us it's done with the SoupMessage (in
27         finishedCallback). Fixes a number of crashes when calling
28         didReceiveData whould crash because of the handle dying.
29
30         * platform/network/soup/ResourceHandleSoup.cpp:
31         (WebCore::finishedCallback):
32         (WebCore::ResourceHandle::startHttp):
33
34 2009-02-28  Adam Bergkvist <adam.bergkvist@ericsson.com>
35
36         Reviewed by Alexey Proskuryakov.
37
38         https://bugs.webkit.org/show_bug.cgi?id=24226
39         [SOUP] HTTP status text is never set
40
41         Set HTTP status text to SoupMessage reason_phrase.
42
43         * platform/network/soup/ResourceHandleSoup.cpp:
44         (WebCore::fillResponseFromMessage):
45
46 2009-02-28  Dan Bernstein  <mitz@apple.com>
47
48         - fix malformed project file
49
50         * WebCore.xcodeproj/project.pbxproj:
51
52 2009-02-28  Dan Bernstein  <mitz@apple.com>
53
54         Reviewed by Oliver Hunt.
55
56         - fix https://bugs.webkit.org/show_bug.cgi?id=23848
57           <rdar://problem/6573250> REGRESSION: Crash when mouse cursor moves over a link on www.opportuno.de
58
59         Test: fast/layers/inline-dirty-z-order-lists.html
60
61         * rendering/RenderBox.cpp:
62         (WebCore::RenderBox::styleWillChange): Moved the code that dirties a
63         layer's and its stacking context's z-order lists when the layer's
64         z-index or visibility change from here...
65         * rendering/RenderBoxModelObject.cpp:
66         (WebCore::RenderBoxModelObject::styleWillChange): ...to here, so that
67         it will apply to RenderInline too.
68
69 2009-02-27  Alexey Proskuryakov  <ap@webkit.org>
70
71         Reviewed by David Hyatt.
72
73         Don't include TextResourceDecoder.h in Document.h
74
75         This undoes inlining of Document::displayStringModifiedByEncoding() to avoid world rebuilds
76         when TextResourceDecoder.h is modified. Performance impact is expected to be negligible.
77
78         * dom/Document.cpp:
79         (WebCore::Document::displayStringModifiedByEncoding):
80         (WebCore::Document::displayBufferModifiedByEncoding):
81         * dom/Document.h:
82         * WebCore.base.exp:
83
84 2009-02-27  Matt Pennig  <pennig@apple.com>
85
86         Reviewed by David Hyatt.
87
88         Resolves: https://bugs.webkit.org/show_bug.cgi?id=24107
89         "Fixed elements have 0 as an offsetLeft property"
90         
91         Code also brings offsetLeft/Top in full conformance with the spec.
92         Added two tests, one for fixed-position elements, and one for <html>.
93         
94         Tests: fast/dom/Element/fixed-position-offset-parent.html
95                fast/dom/Element/offsetLeft-offsetTop-html.html
96
97         * rendering/RenderBoxModelObject.cpp:
98         (WebCore::RenderBoxModelObject::offsetLeft):
99         (WebCore::RenderBoxModelObject::offsetTop):
100
101 2009-02-27  Dean Jackson  <dino@apple.com>
102
103         Reviewed by Simon Fraser.
104
105         renderer()->hasTransform() returns true for elements
106         with perspective, but no transform, so test for transform
107         when hit testing. This fixes ASSERT from
108         https://bugs.webkit.org/show_bug.cgi?id=24252
109
110         Test: transforms/no_transform_hit_testing.html
111
112         * rendering/RenderLayer.cpp:
113         (WebCore::RenderLayer::hitTestLayer):
114
115 2009-02-27  Dimitri Glazkov  <dglazkov@chromium.org>
116
117         Reviewed by Darin Fisher.
118
119         Fix scrubbing error -- a reversed condition.
120
121         * bindings/v8/ScriptValue.h:
122         (WebCore::ScriptValue::clear): Change early exit for empty value, not the opposite.
123
124 2009-02-27  Jian Li  <jianli@chromium.org>
125
126         Reviewed by Alexey Proskuryakov.
127
128         Add confirmMessageFromWorkerObject to WorkerObjectProxy.
129         https://bugs.webkit.org/show_bug.cgi?id=24152
130
131         * workers/WorkerMessagingProxy.cpp:
132         (WebCore::MessageWorkerContextTask::performTask):
133         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
134         * workers/WorkerMessagingProxy.h:
135         * workers/WorkerObjectProxy.h:
136
137 2009-02-27  Anders Carlsson  <andersca@apple.com>
138
139         Reviewed by David Hyatt.
140
141         Revert r41295, the fix for https://bugs.webkit.org/show_bug.cgi?id=24227 
142         because it leads to assertion failures in the Mac port.
143         
144         * platform/graphics/BitmapImage.cpp:
145         (WebCore::BitmapImage::BitmapImage):
146         * platform/graphics/BitmapImage.h:
147         (WebCore::BitmapImage::mayFillWithSolidColor):
148         * platform/graphics/Image.h:
149         (WebCore::Image::mayFillWithSolidColor):
150         * platform/graphics/cairo/ImageCairo.cpp:
151         (WebCore::BitmapImage::BitmapImage):
152         * platform/graphics/cg/ImageCG.cpp:
153         (WebCore::BitmapImage::BitmapImage):
154         (WebCore::BitmapImage::checkForSolidColor):
155         * platform/graphics/qt/ImageQt.cpp:
156         (WebCore::BitmapImage::checkForSolidColor):
157         * platform/graphics/skia/ImageSkia.cpp:
158         (WebCore::BitmapImage::checkForSolidColor):
159         * platform/graphics/wx/ImageWx.cpp:
160         (WebCore::BitmapImage::checkForSolidColor):
161
162 2009-02-27  Adam Barth  <abarth@webkit.org>
163
164         Reviewed by Eric Seidel.
165
166         https://bugs.webkit.org/show_bug.cgi?id=20249
167
168         Add a preference to allow universal access from local URLs to mitigate
169         some attacks.  Some clients still want to allow this access, so we
170         expose this as a preference.
171
172         * WebCore.base.exp:
173         * dom/Document.cpp:
174         (WebCore::Document::initSecurityContext):
175         * page/SecurityOrigin.cpp:
176         (WebCore::SecurityOrigin::SecurityOrigin):
177         * page/Settings.cpp:
178         (WebCore::Settings::Settings):
179         (WebCore::Settings::setAllowUniversalAccessFromFileUrls):
180         * page/Settings.h:
181         (WebCore::Settings::allowUniversalAccessFromFileUrls):
182
183 2009-02-27  Adam Treat  <adam.treat@torchmobile.com>
184
185         Reviewed by Eric Seidel.
186
187         https://bugs.webkit.org/show_bug.cgi?id=24229
188         If an image has no alpha channel there is no reason to use SourceOver.
189
190         * platform/graphics/qt/ImageQt.cpp:
191         (WebCore::Image::drawPattern):
192         (WebCore::BitmapImage::draw):
193
194 2009-02-27  Adam Treat  <adam.treat@torchmobile.com>
195
196         Reviewed by Eric Seidel and Simon Fraser.
197
198         https://bugs.webkit.org/show_bug.cgi?id=24227
199         Ensure that the checkForSolidColor() optimization is correctly triggered
200         for all cases of drawPattern.  Currently, the optimization was not triggered
201         when the check had not been previously performed via a request for the
202         image's NativeImagePtr.
203
204         Implement the Qt version of the checkForSolidColor() method.  Combined with
205         the bug fix this reduces the time it takes to draw a repeating background
206         of a 1x1 image from ~50msecs to ~0msecs on my machine.
207
208         * platform/graphics/BitmapImage.cpp:
209         (WebCore::BitmapImage::BitmapImage):
210         * platform/graphics/BitmapImage.h:
211         (WebCore::BitmapImage::mayFillWithSolidColor):
212         * platform/graphics/Image.h:
213         (WebCore::Image::mayFillWithSolidColor):
214         * platform/graphics/cairo/ImageCairo.cpp:
215         (WebCore::BitmapImage::BitmapImage):
216         * platform/graphics/cg/ImageCG.cpp:
217         (WebCore::BitmapImage::BitmapImage):
218         (WebCore::BitmapImage::checkForSolidColor):
219         * platform/graphics/qt/ImageQt.cpp:
220         (WebCore::BitmapImage::checkForSolidColor):
221         * platform/graphics/skia/ImageSkia.cpp:
222         (WebCore::BitmapImage::checkForSolidColor):
223         * platform/graphics/wx/ImageWx.cpp:
224         (WebCore::BitmapImage::checkForSolidColor):
225
226 2009-02-27  Dirk Schulze  <krit@webkit.org>
227
228         Reviewed by Zack Rusin.
229
230         Added support for gradients and pattern on Fonts for Qt.
231
232         [Qt] gradients and patterns for FontQt
233         https://bugs.webkit.org/show_bug.cgi?id=24243
234
235         * platform/graphics/qt/FontQt.cpp:
236         (WebCore::Font::drawComplexText):
237
238 2009-02-27  Jian Li  <jianli@chromium.org>
239
240         Reviewed by Alexey Proskuryakov.
241
242         WorkerContextProxy::create in WorkerMessagingProxy.cpp should only be provided for non-Chromium platform.
243         https://bugs.webkit.org/show_bug.cgi?id=24113
244
245         * workers/WorkerMessagingProxy.cpp:
246
247 2009-02-27  Yael Aharon  <yael.aharon@nokia.com>
248
249         Added a refresh button to storage views.
250
251         https://bugs.webkit.org/show_bug.cgi?id=24040
252
253         Reviewed by Timothy Hatcher.
254
255         * inspector/front-end/DOMStorageItemsView.js:
256         (WebInspector.DOMStorageItemsView):
257         (WebInspector.DOMStorageItemsView.prototype.get statusBarItems):
258         (WebInspector.DOMStorageItemsView.prototype.update):
259         (WebInspector.DOMStorageItemsView.prototype._refreshButtonClicked):
260         * inspector/front-end/DatabaseTableView.js:
261         (WebInspector.DatabaseTableView):
262         (WebInspector.DatabaseTableView.prototype.get statusBarItems):
263         (WebInspector.DatabaseTableView.prototype._refreshButtonClicked):
264         * inspector/front-end/DatabasesPanel.js:
265         (WebInspector.DatabasesPanel):
266         (WebInspector.DatabasesPanel.prototype.get statusBarItems):
267         (WebInspector.DatabasesPanel.prototype.reset):
268         (WebInspector.DatabasesPanel.prototype.showDatabase):
269         (WebInspector.DatabasesPanel.prototype.showDOMStorage):
270         (WebInspector.DatabasesPanel.prototype._updateSidebarWidth):
271         * inspector/front-end/inspector.css:
272
273 2009-02-27  Yael Aharon  <yael.aharon@nokia.com>
274
275         Added support for editing/deleting localStorage and sessionStorage items
276         directly from Web Inspector.
277
278         https://bugs.webkit.org/show_bug.cgi?id=23866.
279
280         Reviewed by Timothy Hatcher.
281
282         * WebCore.vcproj/WebCore.vcproj:
283         * inspector/front-end/DOMStorageDataGrid.js: Added.
284         (WebInspector.DOMStorageDataGrid):
285         (WebInspector.DOMStorageDataGrid.prototype._ondblclick):
286         (WebInspector.DOMStorageDataGrid.prototype._startEditing):
287         (WebInspector.DOMStorageDataGrid.prototype._editingCommitted):
288         (WebInspector.DOMStorageDataGrid.prototype._editingCancelled):
289         (WebInspector.DOMStorageDataGrid.prototype.deleteSelectedRow):
290         * inspector/front-end/DOMStorageItemsView.js:
291         (WebInspector.DOMStorageItemsView):
292         (WebInspector.DOMStorageItemsView.prototype.get statusBarItems):
293         (WebInspector.DOMStorageItemsView.prototype.hide):
294         (WebInspector.DOMStorageItemsView.prototype.update):
295         (WebInspector.DOMStorageItemsView.prototype._deleteButtonClicked):
296         * inspector/front-end/DatabasesPanel.js:
297         (WebInspector.DatabasesPanel):
298         (WebInspector.DatabasesPanel.prototype.get statusBarItems):
299         (WebInspector.DatabasesPanel.prototype.reset):
300         (WebInspector.DatabasesPanel.prototype.showDOMStorage):
301         (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage):
302         (WebInspector.DatabasesPanel.prototype._updateSidebarWidth):
303         * inspector/front-end/WebKit.qrc:
304         * inspector/front-end/inspector.css:
305         * inspector/front-end/inspector.html:
306
307 2009-02-26  Brett Wilson  <brettw@chromium.org>
308
309         Fix Windows transparency for the Chromium port. Implement a helper
310         class for handling transparency on Windows. It allows semitransparent
311         ClearType and semitransparent form controls by making new layers in the
312         background.
313
314         It also replaces the "ThemeHelper" which allows better
315         scaling and transforms on Windows form controls. In addition to the
316         functionality that the ThemeHelper did, but additionally handles the
317         antialiasing properly so that the form controls aren't composited on a
318         white square.
319
320         https://bugs.webkit.org/show_bug.cgi?id=24101
321
322         Reviewed by Eric Seidel.
323
324         * platform/graphics/chromium/FontChromiumWin.cpp:
325         (WebCore::):
326         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter):
327         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
328         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
329         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::drawGlyphs):
330         (WebCore::Font::drawGlyphs):
331         * platform/graphics/chromium/ThemeHelperChromiumWin.cpp:
332         * platform/graphics/chromium/ThemeHelperChromiumWin.h:
333         * platform/graphics/chromium/TransparencyWin.cpp: Added.
334         (WebCore::):
335         (WebCore::TransparencyWin::OwnedBuffers::OwnedBuffers):
336         (WebCore::TransparencyWin::OwnedBuffers::destBitmap):
337         (WebCore::TransparencyWin::OwnedBuffers::referenceBitmap):
338         (WebCore::TransparencyWin::OwnedBuffers::canHandleSize):
339         (WebCore::TransparencyWin::TransparencyWin):
340         (WebCore::TransparencyWin::~TransparencyWin):
341         (WebCore::TransparencyWin::init):
342         (WebCore::TransparencyWin::computeLayerSize):
343         (WebCore::TransparencyWin::setupLayer):
344         (WebCore::TransparencyWin::setupLayerForNoLayer):
345         (WebCore::TransparencyWin::setupLayerForOpaqueCompositeLayer):
346         (WebCore::TransparencyWin::setupLayerForTextComposite):
347         (WebCore::TransparencyWin::setupLayerForWhiteLayer):
348         (WebCore::TransparencyWin::setupTransform):
349         (WebCore::TransparencyWin::setupTransformForKeepTransform):
350         (WebCore::TransparencyWin::setupTransformForUntransform):
351         (WebCore::TransparencyWin::setupTransformForScaleTransform):
352         (WebCore::TransparencyWin::setTextCompositeColor):
353         (WebCore::TransparencyWin::initializeNewContext):
354         (WebCore::TransparencyWin::compositeOpaqueComposite):
355         (WebCore::TransparencyWin::compositeTextComposite):
356         (WebCore::TransparencyWin::makeLayerOpaque):
357         * platform/graphics/chromium/TransparencyWin.h: Added.
358         (WebCore::TransparencyWin::):
359         (WebCore::TransparencyWin::context):
360         (WebCore::TransparencyWin::platformContext):
361         (WebCore::TransparencyWin::drawRect):
362         * platform/graphics/skia/GraphicsContextSkia.cpp:
363         (WebCore::GraphicsContext::endTransparencyLayer):
364         * platform/graphics/skia/ImageSkia.cpp:
365         (WebCore::paintSkBitmap):
366         * rendering/RenderThemeChromiumWin.cpp:
367         (WebCore::):
368         (WebCore::RenderThemeChromiumWin::paintButton):
369         (WebCore::RenderThemeChromiumWin::paintMenuList):
370         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
371
372 2009-02-27  Dimitri Glazkov  <dglazkov@chromium.org>
373
374         Reviewed by Eric Seidel.
375
376         https://bugs.webkit.org/show_bug.cgi?id=24211
377         Add ScheduledAction for V8.
378
379         * bindings/v8/ScheduledAction.cpp: Added.
380         (WebCore::ScheduledAction::ScheduledAction):
381         (WebCore::ScheduledAction::~ScheduledAction):
382         (WebCore::ScheduledAction::execute):
383         * bindings/v8/ScheduledAction.h: Added.
384         (WebCore::ScheduledAction::ScheduledAction):
385
386 2009-02-27  Zack Rusin  <zack@kde.org>
387
388         Reviewed by Nikolas Zimmermann.
389
390         Qt: be more reasonable about scrolled lines
391
392         cMouseWheelPixelsPerLineStep is currently a constant set to 13.3. it doesn't
393         match our metrics meaning that Qt scrolls by ~2 lines by default which is quite
394         irritating. so lets scroll vertically by the Qt set number of lines * Qt default
395         single step scroll
396
397         * platform/qt/WheelEventQt.cpp:
398
399 2009-02-27  Xan Lopez  <xan@gnome.org>
400
401         Rubber-stamped by Alexey Proskuryakov.
402
403         https://bugs.webkit.org/show_bug.cgi?id=24222
404         [GTK] Remove checks for old glib versions
405
406         libsoup, which is a hard dependency, needs at least glib 2.15.3,
407         so remove all glib checks for versions older than that.
408
409         * platform/gtk/ContextMenuGtk.cpp:
410         (WebCore::ContextMenu::ContextMenu):
411         * platform/gtk/ContextMenuItemGtk.cpp:
412         (WebCore::ContextMenuItem::setSubMenu):
413         * platform/gtk/PopupMenuGtk.cpp:
414         (WebCore::PopupMenu::show):
415         * platform/gtk/WidgetGtk.cpp:
416         (WebCore::Widget::retainPlatformWidget):
417         * platform/network/soup/ResourceHandleSoup.cpp:
418
419 2009-02-26  Dirk Schulze  <krit@webkit.org>
420
421         Reviewed by Oliver Hunt.
422
423         Added support for Gradients and Patterns on filled or stroked Fonts
424         in Cairo. I also added support for globalAlpha on FontCairo.
425
426         [CAIRO] SVG/Canvas fonts miss gradients/pattern support
427         https://bugs.webkit.org/show_bug.cgi?id=18617
428
429         * html/CanvasRenderingContext2D.cpp:
430         (WebCore::CanvasRenderingContext2D::drawTextInternal):
431         * platform/graphics/cairo/FontCairo.cpp:
432         (WebCore::Font::drawGlyphs):
433
434 2009-02-26  Stephen White  <senorblanco@chromium.org>
435
436         Reviewed by Eric Seidel.
437
438         https://bugs.webkit.org/show_bug.cgi?id=23957
439
440         Fix for SVG gradient and pattern text for Chromium/skia. 
441         Added accessors for the fill and stroke gradients to
442         GraphicsContext.  Changed the paintSkiaText function to take a
443         GraphicsContext, so we can check for gradients/patterns. 
444         Changed the skiaDrawText function to set the SkPaint shader
445         correctly, and to scale up the gradient shader matrix to
446         encompass the entire text string.  Also offset each glyph
447         separately, rather than transforming the canvas, so that the
448         gradient/pattern stays fixed relative to the text origin.
449
450         * platform/graphics/GraphicsContext.cpp:
451         (WebCore::GraphicsContext::getFillGradient):
452         (WebCore::GraphicsContext::getStrokeGradient):
453         (WebCore::GraphicsContext::getFillPattern):
454         (WebCore::GraphicsContext::getStrokePattern):
455         * platform/graphics/GraphicsContext.h:
456         * platform/graphics/chromium/FontChromiumWin.cpp:
457         (WebCore::Font::drawGlyphs):
458         * platform/graphics/chromium/UniscribeHelper.cpp:
459         (WebCore::UniscribeHelper::draw):
460         * platform/graphics/skia/SkiaFontWin.cpp:
461         (WebCore::windowsCanHandleTextDrawing):
462         (WebCore::skiaDrawText):
463         (WebCore::paintSkiaText):
464         * platform/graphics/skia/SkiaFontWin.h:
465
466 2009-02-26  Dimitri Glazkov  <dglazkov@chromium.org>
467
468         Reviewed by Eric Seidel.
469
470         https://bugs.webkit.org/show_bug.cgi?id=24208
471         Add custom V8 bindings for Navigator, Clipboard, Document, and Node.
472
473         * bindings/v8/custom/V8ClipboardCustom.cpp: Added.
474         (WebCore::ACCESSOR_GETTER):
475         (WebCore::CALLBACK_FUNC_DECL):
476         * bindings/v8/custom/V8DocumentCustom.cpp: Added.
477         (WebCore::CALLBACK_FUNC_DECL):
478         * bindings/v8/custom/V8NavigatorCustom.cpp: Added.
479         (WebCore::ACCESSOR_GETTER):
480         * bindings/v8/custom/V8NodeCustom.cpp: Added.
481         (WebCore::CALLBACK_FUNC_DECL):
482
483 2009-02-26  Gustavo Noronha Silva  <gns@gnome.org>
484
485         Unreviewed build fix for building with GNOME Keyring enabled.
486
487         * platform/network/soup/webkit-soup-auth-dialog.c:
488         (show_auth_dialog):
489
490 2009-02-26  Xan Lopez  <xan@gnome.org>
491
492         Reviewed by Holger Freyther.
493
494         https://bugs.webkit.org/show_bug.cgi?id=16947
495         [GTK] Missing HTTP Auth challenge
496
497         Add HTTP authentication dialog with optional GNOME Keyring
498         storage.
499
500         * GNUmakefile.am:
501         * platform/network/ResourceHandleInternal.h:
502         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
503         * platform/network/soup/ResourceHandleSoup.cpp:
504         (WebCore::currentToplevelCallback):
505         (WebCore::ResourceHandle::startHttp):
506         (WebCore::ResourceHandle::start):
507         * platform/network/soup/webkit-soup-auth-dialog.c: Added.
508         (webkit_soup_auth_dialog_class_init):
509         (webkit_soup_auth_dialog_init):
510         (webkit_soup_auth_dialog_session_feature_init):
511         (free_authData):
512         (set_password_callback):
513         (response_callback):
514         (show_auth_dialog):
515         (find_password_callback):
516         (session_authenticate):
517         (attach):
518         * platform/network/soup/webkit-soup-auth-dialog.h: Added.
519
520 2009-02-25  Ojan Vafai  <ojan@chromium.org> and Eric Seidel <eric@webkit.org>
521
522         Reviewed by Dave Hyatt.
523
524         After Ojan's positionForCoordinates fix http://trac.webkit.org/changeset/41191
525         svg/custom/pointer-events-image.svg and svg/custom/pointer-events-text.svg
526         started failing because Ojan's new code was now *correctly* calling through to
527         SVG asking for the closest text offset in the last line box, instead of
528         just returning the offset at the end of the last line box when clicking below a box.
529
530         But!  The SVG code was wrong, in that it returned the character offset of the last
531         character when you asked for a character offset after the end of the box, instead
532         it should return the offset *after* the last character.  This patch fixes
533         that behavior by reordering the last two clauses in svgCharacterHitsPosition.
534
535         The SVG positionForCoordinates function is still wrong, and I've added some FIXMEs
536         to document what's wrong.  I've also cleaned up the code a bit so it's clearer
537         what it is doing (which also makes more obvious what's wrong with it).
538
539         * rendering/RenderSVGInlineText.cpp:
540         (WebCore::RenderSVGInlineText::positionForCoordinates):
541         * rendering/SVGInlineTextBox.cpp:
542         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::SVGInlineTextBoxClosestCharacterToPositionWalker):
543         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
544         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::offsetOfHitCharacter):
545         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
546         (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
547
548 2009-02-26  Darin Fisher  <darin@chromium.org>
549
550         Reviewed by Eric Seidel.
551
552         Minor cleanup of ChromiumBridge:
553         Removing unused matchesMIMEType method and s/Javascript/JavaScript/
554
555         * platform/chromium/ChromiumBridge.h:
556         * platform/chromium/MimeTypeRegistryChromium.cpp:
557         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
558         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
559         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
560
561 2009-02-26  David Hyatt  <hyatt@apple.com>
562
563         Reviewed by Sam Weinig
564
565         Fix text-bottom vertical alignment.  It was incorrectly aligning the bottom of the descent instead of including
566         the line-height below the descent.
567
568         Added fast/inline/vertical-align-text-bottom.html
569
570         * rendering/RenderBoxModelObject.cpp:
571         (WebCore::RenderBoxModelObject::verticalPosition):
572
573 2009-02-26  Dirk Schulze  <krit@webkit.org>
574
575         Reviewed by Eric Seidel.
576
577         Make SVG Masking platform independet with the use of ImageBuffer::getImageData(),
578         ImageBuffer::putImageData() and GraphicsContext::clipToImageBuffer(). Every platform has
579         just to implement this three methods to support SVG Masking now.
580  
581         Make SVG Masking platform aware
582         https://bugs.webkit.org/show_bug.cgi?id=19243
583
584         * GNUmakefile.am:
585         * WebCore.pro:
586         * WebCore.vcproj/WebCore.vcproj:
587         * WebCore.xcodeproj/project.pbxproj:
588         * svg/graphics/SVGResourceMasker.cpp:
589         (WebCore::SVGResourceMasker::applyMask):
590         * svg/graphics/cairo/SVGResourceMaskerCairo.cpp: Removed.
591         * svg/graphics/cg/SVGResourceMaskerCg.cpp: Removed.
592         * svg/graphics/cg/SVGResourceMaskerCg.mm: Removed.
593         * svg/graphics/qt/SVGResourceMaskerQt.cpp: Removed.
594         * svg/graphics/skia/SVGResourceMaskerSkia.cpp: Removed.
595
596 2009-02-26  Yong Li  <yong.li@torchmobile.com>
597
598         Reviewed by Darin Adler, Antti Koivisto and Alexey Proskuryakov.
599
600         Test: http/tests/misc/slow-preload-cancel.html
601
602         https://bugs.webkit.org/show_bug.cgi?id=24133
603         Clear all pending preloads in the DocLoader object when we decide to
604         cancel its all requests.
605
606         * loader/DocLoader.cpp:
607         (WebCore::DocLoader::clearPendingPreloads):
608         * loader/DocLoader.h:
609         * loader/loader.cpp:
610         (WebCore::Loader::cancelRequests):
611
612 2009-02-26  Dimitri Glazkov  <dglazkov@chromium.org>
613
614         Reviewed by Eric Seidel.
615
616         https://bugs.webkit.org/show_bug.cgi?id=24182
617         Add NodeFilter, NodeIterator, and TreeWalker custom V8 bindings.
618
619         * bindings/v8/custom/V8NodeFilterCustom.cpp: Added.
620         (WebCore::CALLBACK_FUNC_DECL):
621         * bindings/v8/custom/V8NodeIteratorCustom.cpp: Added.
622         (WebCore::toV8):
623         (WebCore::CALLBACK_FUNC_DECL):
624         * bindings/v8/custom/V8TreeWalkerCustom.cpp: Added.
625         (WebCore::toV8):
626         (WebCore::CALLBACK_FUNC_DECL):
627
628 2009-02-26  Alexey Proskuryakov  <ap@webkit.org>
629
630         Reviewed by Darin Adler.
631
632         https://bugs.webkit.org/show_bug.cgi?id=23500
633         KURL::parse() incorrectly compares its result to original string
634
635         * platform/KURL.cpp: (WebCore::KURL::parse): Take string length into account.
636
637 2009-02-26  Ojan Vafai  <ojan@chromium.org>
638
639         Reviewed by Kevin McCullough.
640
641         Manual test for inspector node highlighting.
642
643         * manual-tests/inspector/highlight-nodes.html: Added.
644
645 2009-02-16  Anantanarayanan Iyengar  <ananta@chromium.org>
646
647         Reviewed by Darin Fisher.
648
649         https://bugs.webkit.org/show_bug.cgi?id=23973
650         ScrollView::scrollContents can be invoked during view shutdown.  In
651         this scenario the FrameView::hostWindow method can return NULL, which
652         indicates that the frame/page is being destroyed. This causes a crash
653         when we try to dereference a NULL hostWindow pointer.  Fix is to add a
654         NULL check for this.  
655
656         * platform/ScrollView.cpp:
657         (WebCore::ScrollView::scrollContents):
658
659 2009-02-26  Rahul Kuchhal  <kuchhal@chromium.org>
660
661         Reviewed by Dave Hyatt.
662
663         https://bugs.webkit.org/show_bug.cgi?id=24003
664         Fix a crash caused by unsafe type conversion.
665
666         Test: fast/block/positioning/absolute-in-inline-rtl-4.html
667
668         * rendering/RenderBox.cpp:
669         (WebCore::RenderBox::calcAbsoluteHorizontalValues):
670
671 2009-02-26  Ojan Vafai  <ojan@chromium.org>
672
673         Reviewed by Adam Roben.
674
675         https://bugs.webkit.org/show_bug.cgi?id=24202
676         Have drawNodeHighlight clip instead of clearing. This makes it work for
677         both Safari and Chromium since Chromium draws the inspector highlighting
678         in the same buffer as the page.
679
680         * inspector/InspectorController.cpp:
681         (WebCore::quadToPath):
682         (WebCore::drawOutlinedQuad):
683         (WebCore::drawOutlinedQuadWithClip):
684         (WebCore::drawHighlightForBox):
685
686 2009-02-26  David Hyatt  <hyatt@apple.com>
687
688         Reviewed by Dan Bernstein & Darin Adler
689
690         Make sure the border/padding are properly omitted at the start of an inline that is a continuation.
691         
692         Added fast/inline/inline-continuation-borders.html
693
694         * rendering/InlineFlowBox.cpp:
695         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
696
697 2009-02-26  Simon Fraser  <simon.fraser@apple.com>
698
699         Build fix, no review.
700         
701         Try to fix the wx build after r41218.
702
703         * WebCoreSources.bkl:
704
705 2009-02-26  Alexey Proskuryakov  <ap@webkit.org>
706
707         Reviewed by Darin Adler.
708
709         https://bugs.webkit.org/show_bug.cgi?id=19527
710         ASSERTION FAILED: containerA && containerB
711
712         Test: fast/dom/Range/bug-19527.html
713
714         * dom/Range.cpp:
715         (WebCore::Range::isPointInRange):
716         (WebCore::Range::comparePoint):
717         Bring the behavior in line with current Firefox, making it impossible for these methods
718         to pass a null container to compareBoundaryPoints().
719
720 2009-02-26  Jonathon Jongsma  <jonathon@quotidian.org>
721
722         Reviewed by Holger Freyther.
723
724         https://bugs.webkit.org/show_bug.cgi?id=20358
725
726         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
727         (WebCore::SimpleFontData::smallCapsFontData): the small-caps font data
728         should set the computed size rather than the specified size, otherwise
729         the caps just get rendered normal size.
730
731 2009-02-26  Benjamin Meyer  <benjamin.meyer@torchmobile.com>
732
733         Reviewed by George Staikos.
734
735         https://bugs.webkit.org/show_bug.cgi?id=24062
736         QNetworkCookieJar expects the url and not the policy url.  Sending the
737         policy url will cause QNetworkCookieJar to behave incorrectly.  One
738         example would be a cookie that does not have a path or domain.
739         QNetworkCookieJar will use the url it is given to fill in default values.
740         This allows setting cookies on the url of the main frame from an iFrame
741         when the cookie should be set on the url of the iFrame.
742
743         Originally noticed on http://writer.zoho.com/jsp/home.jsp?serviceurl=/index.do
744
745         * platform/qt/CookieJarQt.cpp:
746         (WebCore::setCookies):
747
748 2009-02-26  Charles Wei  <charles.wei@torchmobile.com.cn>
749
750         Reviewed by George Staikos.
751
752         make WebKit/Qt compile with SVG disabled
753
754         * WebCore.pro:
755         * platform/graphics/qt/FontPlatformDataQt.cpp:
756
757 2009-02-25  Gustavo Noronha Silva  <gns@gnome.org>
758
759         Unreviewed build fix. Add WebCore/workers to the list of paths
760         searched by the bindings generator perl script.
761
762         * GNUmakefile.am:
763
764 2009-02-25  Sam Weinig  <sam@webkit.org>
765
766         Reviewed by Geoffrey Garen.
767
768         Add canvas to the list of RenderObjects that can mark a page as
769         visually not empty.
770
771         * rendering/RenderHTMLCanvas.cpp:
772         (WebCore::RenderHTMLCanvas::RenderHTMLCanvas):
773
774 2009-02-25  Eric Carlson  <eric.carlson@apple.com>
775
776         Reviewed by Dave Hyatt.
777
778         * rendering/RenderBox.cpp:
779         (WebCore::RenderBox::nodeAtPoint): Remove assertion fired when child has layer
780         as RenderMedia with controls always has a layer.
781
782 2009-02-25  Dan Bernstein  <mitz@apple.com>
783
784         Reviewed by Simon Fraser.
785
786         - fix https://bugs.webkit.org/show_bug.cgi?id=24130
787           <rdar://problem/6618196> Paint very slow when horizontally resizing
788
789         Test: fast/gradients/background-clipped.html
790
791         * rendering/RenderBoxModelObject.cpp:
792         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Intersect the
793         destination rectangle passed to drawTiledImage() with the dirty
794         rectangle. This makes it more likely for the destination rect to be
795         contained in a single tile rect, which results in a faster code path
796         being taken down the road (just drawing a single tile instead of
797         tiling).
798
799 2009-02-25  Ojan Vafai  <ojan@chromium.org>
800
801         Reviewed by Eric Seidel.
802
803         Fix test regressions from positionForCoordinates patch.
804         https://bugs.webkit.org/show_bug.cgi?id=24148
805
806         * rendering/RenderBlock.cpp:
807         (WebCore::positionForPointWithInlineChildren):
808         Remove ASSERT that placeholder text codepath is hitting.
809
810 2009-02-25  Chris Fleizach  <cfleizach@apple.com>
811
812         Reviewed by Beth Dakin.
813
814         Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail
815         https://bugs.webkit.org/show_bug.cgi?id=24143
816
817         When an AX object is marked dirty, do not create AX elements while going up the parent chain.
818         Do not allow AXRenderObjects to remove their own IDs from the cache, all the cache to do that work
819         Make sure the AXObjectWrapper's have an object before calling them
820         In AXObjectCache, change get -> getOrCreate. Use get() to only retrieve an element if it exists
821
822         Test: platform/mac-snowleopard/accessibility/table-updating.html
823
824         * WebCore.base.exp:
825         * page/AXObjectCache.cpp:
826         (WebCore::AXObjectCache::~AXObjectCache):
827         (WebCore::AXObjectCache::get):
828         (WebCore::AXObjectCache::getOrCreate):
829         (WebCore::AXObjectCache::removeAXID):
830         (WebCore::AXObjectCache::handleActiveDescendantChanged):
831         (WebCore::AXObjectCache::handleAriaRoleChanged):
832         * page/AXObjectCache.h:
833         * page/AccessibilityImageMapLink.cpp:
834         (WebCore::AccessibilityImageMapLink::parentObject):
835         * page/AccessibilityListBox.cpp:
836         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
837         (WebCore::AccessibilityListBox::doAccessibilityHitTest):
838         * page/AccessibilityListBoxOption.cpp:
839         (WebCore::AccessibilityListBoxOption::elementRect):
840         (WebCore::AccessibilityListBoxOption::parentObject):
841         * page/AccessibilityObject.cpp:
842         (WebCore::AccessibilityObject::detach):
843         (WebCore::AccessibilityObject::parentObjectIfExists):
844         (WebCore::replacedNodeNeedsCharacter):
845         (WebCore::AccessibilityObject::accessibilityObjectForPosition):
846         * page/AccessibilityObject.h:
847         * page/AccessibilityRenderObject.cpp:
848         (WebCore::AccessibilityRenderObject::firstChild):
849         (WebCore::AccessibilityRenderObject::lastChild):
850         (WebCore::AccessibilityRenderObject::previousSibling):
851         (WebCore::AccessibilityRenderObject::nextSibling):
852         (WebCore::AccessibilityRenderObject::parentObjectIfExists):
853         (WebCore::AccessibilityRenderObject::parentObject):
854         (WebCore::AccessibilityRenderObject::isAttachment):
855         (WebCore::AccessibilityRenderObject::headingLevel):
856         (WebCore::AccessibilityRenderObject::anchorElement):
857         (WebCore::AccessibilityRenderObject::menuForMenuButton):
858         (WebCore::AccessibilityRenderObject::menuButtonForMenu):
859         (WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
860         (WebCore::AccessibilityRenderObject::internalLinkElement):
861         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
862         (WebCore::AccessibilityRenderObject::titleUIElement):
863         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
864         (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
865         (WebCore::AccessibilityRenderObject::getDocumentLinks):
866         (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
867         (WebCore::AccessibilityRenderObject::focusedUIElement):
868         (WebCore::AccessibilityRenderObject::activeDescendant):
869         (WebCore::AccessibilityRenderObject::observableObject):
870         (WebCore::AccessibilityRenderObject::childrenChanged):
871         (WebCore::AccessibilityRenderObject::addChildren):
872         * page/AccessibilityRenderObject.h:
873         (WebCore::AccessibilityRenderObject::setRenderObject):
874         * page/AccessibilityTable.cpp:
875         (WebCore::AccessibilityTable::addChildren):
876         (WebCore::AccessibilityTable::headerContainer):
877         (WebCore::AccessibilityTable::cellForColumnAndRow):
878         * page/AccessibilityTableCell.cpp:
879         (WebCore::AccessibilityTableCell::isTableCell):
880         (WebCore::AccessibilityTableCell::titleUIElement):
881         * page/AccessibilityTableColumn.cpp:
882         (WebCore::AccessibilityTableColumn::headerObjectForSection):
883         * page/AccessibilityTableRow.cpp:
884         (WebCore::AccessibilityTableRow::isTableRow):
885         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
886         * page/mac/AXObjectCacheMac.mm:
887         (WebCore::AXObjectCache::postNotification):
888         (WebCore::AXObjectCache::postNotificationToElement):
889         * page/mac/AccessibilityObjectWrapper.mm:
890         (textMarkerForVisiblePosition):
891         (AXLinkElementForNode):
892         (nsStringForReplacedNode):
893         (-[AccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
894         (-[AccessibilityObjectWrapper accessibilityActionNames]):
895         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
896         (-[AccessibilityObjectWrapper accessibilityFocusedUIElement]):
897         (-[AccessibilityObjectWrapper accessibilityHitTest:]):
898         (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
899         (-[AccessibilityObjectWrapper accessibilityIsIgnored]):
900         (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
901         (-[AccessibilityObjectWrapper accessibilityPerformPressAction]):
902         (-[AccessibilityObjectWrapper accessibilityPerformAction:]):
903         (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
904         (-[AccessibilityObjectWrapper _accessibilityParentForSubview:]):
905         (-[AccessibilityObjectWrapper accessibilityIndexOfChild:]):
906         (-[AccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
907         (-[AccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
908
909 2009-02-25  Beth Dakin  <bdakin@apple.com>
910
911         Reviewed by Geoff Garen.
912
913         Re-working of <rdar://problem/6487249> repro crash in 
914         WebCore::CSSParser::parseFillImage copying entire contents of this 
915         page
916         -and corresponding: https://bugs.webkit.org/show_bug.cgi?id=24172
917
918         Fixes a bunch of layout test failures I caused!
919
920         * css/CSSParser.cpp:
921         (WebCore::CSSParser::parseValue):
922         (WebCore::CSSParser::parseContent):
923         (WebCore::CSSParser::parseFillImage):
924         (WebCore::CSSParser::parseFontFaceSrc):
925         (WebCore::CSSParser::parseBorderImage):
926
927 2009-02-25  Dimitri Glazkov  <dglazkov@chromium.org>
928
929         Reviewed by Eric Seidel.
930
931         https://bugs.webkit.org/show_bug.cgi?id=24174
932         Add more V8 custom bindings.
933
934         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: Added.
935         (WebCore::hasCSSPropertyNamePrefix):
936         (WebCore::cssPropertyName):
937         (WebCore::NAMED_PROPERTY_GETTER):
938         (WebCore::NAMED_PROPERTY_SETTER):
939         * bindings/v8/custom/V8DOMStringListCustom.cpp: Added.
940         (WebCore::INDEXED_PROPERTY_GETTER):
941         (WebCore::CALLBACK_FUNC_DECL):
942         * bindings/v8/custom/V8EventCustom.cpp: Added.
943         (WebCore::ACCESSOR_SETTER):
944         (WebCore::ACCESSOR_GETTER):
945         * bindings/v8/custom/V8HTMLDocumentCustom.cpp: Added.
946         (WebCore::NAMED_PROPERTY_DELETER):
947         (WebCore::NAMED_PROPERTY_SETTER):
948         (WebCore::NAMED_PROPERTY_GETTER):
949         * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp: Added.
950         (WebCore::NAMED_PROPERTY_GETTER):
951         * bindings/v8/custom/V8NamedNodeMapCustom.cpp: Added.
952         (WebCore::INDEXED_PROPERTY_GETTER):
953         (WebCore::NAMED_PROPERTY_GETTER):
954         * bindings/v8/custom/V8NodeListCustom.cpp: Added.
955         (WebCore::NAMED_PROPERTY_GETTER):
956         * bindings/v8/custom/V8StyleSheetListCustom.cpp: Added.
957         (WebCore::NAMED_PROPERTY_GETTER):
958
959 2009-02-25  Scott Violet  <sky@google.com>
960
961         Reviewed by Dave Hyatt.
962
963         https://bugs.webkit.org/show_bug.cgi?id=24171
964         Provides a RenderTheme method for getting the scroll bar size and
965         changes RenderListBox to use it. RenderTheme returns a size of regular,
966         and Mac's override to return small. Changes ScrollbarThemeChromium to
967         use the scrollbarsize of the scrollbar when getting the size
968         instead of passing in no-args.
969
970         * platform/chromium/ScrollbarThemeChromium.cpp:
971         (WebCore::ScrollbarThemeChromium::trackRect):
972         (WebCore::ScrollbarThemeChromium::buttonSize):
973         * rendering/RenderListBox.cpp:
974         (WebCore::RenderListBox::createScrollbar):
975         * rendering/RenderTheme.h:
976         (WebCore::RenderTheme::scrollbarControlSizeForPart):
977         * rendering/RenderThemeChromiumMac.h:
978         (WebCore::RenderThemeChromiumMac::scrollbarControlSizeForPart):
979         * rendering/RenderThemeMac.h:
980         (WebCore::RenderThemeMac::scrollbarControlSizeForPart):
981
982 2009-02-25  Beth Dakin  <bdakin@apple.com>
983
984         Reviewed by Darin Adler.
985
986         Fix for <rdar://problem/6487249> repro crash in 
987         WebCore::CSSParser::parseFillImage copying entire contents of this 
988         page
989         -and corresponding: https://bugs.webkit.org/show_bug.cgi?id=24172
990
991         * css/CSSParser.cpp:
992         (WebCore::CSSParser::parseValue): Null-check m_styleSheet
993
994 2009-02-25  Adam Treat  <adam.treat@torchmobile.com>
995
996         Fix the Qt build.
997
998         * WebCore.pro:
999
1000 2009-02-25  Jan Michael Alonzo  <jmalonzo@webkit.org>
1001
1002         Gtk build fix. Not reviewed.
1003
1004         Add files to the build per r41218.
1005         Rename WebkitPoint.h to WebKitPoint.h in DOMWindow.cpp
1006
1007         * GNUmakefile.am:
1008         * page/DOMWindow.cpp:
1009
1010 2009-02-25  Zan Dobersek  <zandobersek@gmail.com>
1011
1012         Reviewed by Alexey Proskuryakov.
1013
1014         https://bugs.webkit.org/show_bug.cgi?id=24043
1015         When faced with URLs with unsupported protocol on Gtk port,
1016         report the error through an idle function and return true, so
1017         a proper resource handle is created.
1018
1019         * platform/network/soup/ResourceHandleSoup.cpp:
1020         (WebCore::reportUnknownProtocolError):
1021         (WebCore::ResourceHandle::start):
1022
1023 2009-02-25  Steve Falkenburg  <sfalken@apple.com>
1024
1025         Windows build fix.
1026         Use struct to forward declare ResourceRequest.
1027
1028         * history/HistoryItem.h:
1029         * inspector/InspectorController.h:
1030         * loader/DocumentThreadableLoader.h:
1031         * loader/FrameLoaderClient.h:
1032         * loader/MainResourceLoader.h:
1033         * loader/SubresourceLoader.h:
1034         * loader/SubresourceLoaderClient.h:
1035         * loader/ThreadableLoader.h:
1036         * loader/WorkerThreadableLoader.h:
1037         * platform/CrossThreadCopier.h:
1038         * platform/network/ResourceHandle.h:
1039         * platform/network/ResourceHandleClient.h:
1040         * platform/network/ResourceRequestBase.h:
1041         * platform/network/cf/ResourceRequestCFNet.h:
1042         * xml/XMLHttpRequest.h:
1043
1044 2009-02-25  Steve Falkenburg  <sfalken@apple.com>
1045
1046         Partial Windows build fix.
1047         
1048         * DerivedSources.cpp:
1049         * WebCore.vcproj/WebCore.vcproj:
1050
1051 2009-02-25  Dirk Schulze  <krit@webkit.org>
1052
1053         Reviewed by Oliver Hunt.
1054
1055         Ported arcTo to Qt. Qt has no native support for arcTo. This changes
1056         calculate the behavior of arcTo and draws it with lineTo and arc.
1057
1058         [QT] implement Canvas arcTo
1059         https://bugs.webkit.org/show_bug.cgi?id=23873
1060
1061         * platform/graphics/qt/PathQt.cpp:
1062         (WebCore::Path::addArcTo):
1063
1064 2009-02-25  Simon Fraser  <simon.fraser@apple.com>
1065
1066         Reviewed by Dan Bernstein
1067
1068         Remove idl files from Resources, and sort.
1069         
1070         * WebCore.xcodeproj/project.pbxproj:
1071
1072 2009-02-25  Chris Marrin  <cmarrin@apple.com>
1073
1074         Reviewed by Simon Fraser.
1075
1076         https://bugs.webkit.org/show_bug.cgi?id=23943
1077
1078         Added webkitConvertPointFromNodeToPage and webkitConvertPointFromPageToNode on
1079         the window object. Also added WebKitPoint object, which is passed in and out
1080         of these functions.
1081
1082         Test: fast/dom/Window/webkitConvertPoint.html
1083
1084         * DerivedSources.make:
1085         * WebCore.pro:
1086         * WebCore.vcproj/WebCore.vcproj:
1087         * WebCore.xcodeproj/project.pbxproj:
1088         * WebCoreSources.bkl:
1089         * bindings/js/JSDOMWindowBase.cpp:
1090         (jsDOMWindowBaseWebKitPoint):
1091         (setJSDOMWindowBaseWebKitPoint):
1092         * bindings/js/JSWebKitPointConstructor.cpp: Added.
1093         (WebCore::):
1094         (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor):
1095         (WebCore::constructWebKitPoint):
1096         (WebCore::JSWebKitPointConstructor::getConstructData):
1097         * bindings/js/JSWebKitPointConstructor.h: Added.
1098         (WebCore::JSWebKitPointConstructor::classInfo):
1099         * dom/Node.cpp:
1100         (WebCore::Node::convertToPage):
1101         (WebCore::Node::convertFromPage):
1102         * dom/Node.h:
1103         * page/DOMWindow.cpp:
1104         (WebCore::DOMWindow::webkitConvertPointFromNodeToPage):
1105         (WebCore::DOMWindow::webkitConvertPointFromPageToNode):
1106         * page/DOMWindow.h:
1107         * page/DOMWindow.idl:
1108         * page/WebKitPoint.h: Added.
1109         (WebCore::WebKitPoint::create):
1110         (WebCore::WebKitPoint::x):
1111         (WebCore::WebKitPoint::y):
1112         (WebCore::WebKitPoint::setX):
1113         (WebCore::WebKitPoint::setY):
1114         (WebCore::WebKitPoint::WebKitPoint):
1115         * page/WebKitPoint.idl: Added.
1116
1117 2009-02-25  Jian Li  <jianli@chromium.org>
1118
1119         Reviewed by Alexey Proskuryakov.
1120
1121         Remove "#if ENABLE(WORKERS)" wrap from CrossThreadCopier files.
1122         https://bugs.webkit.org/show_bug.cgi?id=24145
1123
1124         * platform/CrossThreadCopier.cpp:
1125         * platform/CrossThreadCopier.h:
1126
1127 2009-02-25  David Levin  <levin@chromium.org>
1128
1129         Reviewed by Alexey Proskuryakov.
1130
1131         Bug 23688: ThreadableLoader needs a sync implementation for Workers.
1132         <https://bugs.webkit.org/show_bug.cgi?id=23688>
1133
1134         No observable change in behavior, so no test.
1135
1136         * loader/ThreadableLoader.cpp:
1137         (WebCore::ThreadableLoader::loadResourceSynchronously):
1138         * loader/ThreadableLoaderClientWrapper.h:
1139         (WebCore::ThreadableLoaderClientWrapper::clearClient):
1140         (WebCore::ThreadableLoaderClientWrapper::done):
1141         (WebCore::ThreadableLoaderClientWrapper::didFinishLoading):
1142         (WebCore::ThreadableLoaderClientWrapper::didFail):
1143         (WebCore::ThreadableLoaderClientWrapper::didFailRedirectCheck):
1144         (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
1145         Expose whether the loader is done (based on what callbacks were done).
1146
1147         * loader/WorkerThreadableLoader.cpp:
1148         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
1149         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
1150         Each loader is given its own mode so that only its callbacks get through the run loop.
1151
1152         The xhr spec says that the readystatechange events are synchronous, so in the case of a
1153         nested sync xhr no readystatechange events should be fired for the outer xhr.
1154
1155         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
1156
1157         * loader/WorkerThreadableLoader.h:
1158         (WebCore::WorkerThreadableLoader::create):
1159         (WebCore::WorkerThreadableLoader::done):
1160
1161         * workers/WorkerRunLoop.cpp:
1162         (WebCore::WorkerRunLoop::WorkerRunLoop):
1163         * workers/WorkerRunLoop.h:
1164         (WebCore::WorkerRunLoop::createUniqueId):
1165         Simple method to create a uniqueId on demand with respect to the run loop.
1166
1167         * workers/WorkerThread.h:
1168
1169 2009-02-25  David Levin  <levin@chromium.org>
1170
1171         Reviewed by Alexey Proskuryakov.
1172
1173         Bug 24089: ThreadableLoader::loadResourceSynchronously should do callbacks like the async code.
1174         <https://bugs.webkit.org/show_bug.cgi?id=24089>
1175
1176         Make threadable loader callbacks to happen during the sync load call.
1177
1178         Changes the behavior of sync xhr for insecure redirects in two ways:
1179         + Sends an error event instead of an abort event (which is the same as async xhr's behavior).
1180         + Throws a network exception which is what other browsers do and what the spec
1181         says to do (http://www.w3.org/TR/XMLHttpRequest/).
1182
1183         * loader/DocumentThreadableLoader.cpp:
1184         (WebCore::DocumentThreadableLoader::loadResourceSynchronously):
1185         * loader/DocumentThreadableLoader.h:
1186         * loader/ThreadableLoader.cpp:
1187         (WebCore::ThreadableLoader::loadResourceSynchronously):
1188         * loader/ThreadableLoader.h:
1189         * xml/XMLHttpRequest.cpp:
1190         (WebCore::XMLHttpRequest::XMLHttpRequest):
1191         (WebCore::XMLHttpRequest::loadRequestSynchronously):
1192         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
1193         (WebCore::XMLHttpRequest::didFail):
1194         (WebCore::XMLHttpRequest::didFailRedirectCheck):
1195         * xml/XMLHttpRequest.h:
1196
1197 2009-02-24  Chris Marrin  <cmarrin@apple.com>
1198
1199         Reviewed by David Hyatt.
1200
1201         https://bugs.webkit.org/show_bug.cgi?id=23368
1202
1203         Added logic to correctly hit test accelerated layers.
1204
1205         Tests: animations/animation-hit-test-transform.html
1206                animations/animation-hit-test.html
1207                transitions/transition-hit-test-transform.html
1208                transitions/transition-hit-test.html
1209
1210         * page/animation/KeyframeAnimation.cpp:
1211         (WebCore::KeyframeAnimation::animate):
1212         * rendering/RenderLayer.cpp:
1213         (WebCore::RenderLayer::hitTestLayer):
1214         (WebCore::RenderLayer::updateClipRects):
1215         * rendering/RenderLayerBacking.cpp:
1216         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1217
1218 2009-02-25  Alexey Proskuryakov  <ap@webkit.org>
1219
1220         Reviewed by Darin Adler.
1221
1222         https://bugs.webkit.org/show_bug.cgi?id=24067
1223         REGRESSION: Crash in WebCore::Document::initSecurityContext
1224
1225         The crash started to happen when we removed a check for frame->document() being null.
1226         However, the original document shouldn't be null here, because it is needed to alias
1227         security origins. So, this patch fixes the crash by correcting security origin behavior.
1228
1229         Test: http/tests/security/aboutBlank/window-open-self-about-blank.html
1230         This tests for not crashing, and for inheriting the domain from the document being replaced.
1231         Preserving the aliasing cannot be tested for automatically, because we'd need a non-trivial
1232         domain to remove a prefix from.
1233
1234         * loader/FrameLoader.cpp: (WebCore::FrameLoader::begin): Create a new document before
1235         clearing the frame, so that Document::initSecurityContext() could access the old one.
1236
1237 2009-02-25  Jay Campan  <jcampan@google.com>
1238
1239         Reviewed by Darin Fisher.
1240
1241         https://bugs.webkit.org/show_bug.cgi?id=24066
1242
1243         Items in drop-downs were not painted correctly.  Makes sure the
1244         PopupListBox invalidates in the coordinates of the window as this is
1245         FramelessScrollView::invalidateRect paints to.
1246
1247         * platform/chromium/PopupMenuChromium.cpp:
1248         (WebCore::PopupListBox::invalidateRow):
1249
1250 2009-02-24  Simon Fraser  <simon.fraser@apple.com>
1251
1252         Reviewed by Anders Carlsson
1253
1254         https://bugs.webkit.org/show_bug.cgi?id=15081
1255         
1256         Make display:none work for applet, emebed and object elements
1257         by calling rendererIsNeeded() on superclasses.
1258
1259         Tests: fast/replaced/applet-display-none.html
1260                fast/replaced/embed-display-none.html
1261                fast/replaced/object-display-none.html
1262
1263         * html/HTMLAppletElement.cpp:
1264         (WebCore::HTMLAppletElement::rendererIsNeeded):
1265         * html/HTMLElement.cpp:
1266         (WebCore::HTMLElement::rendererIsNeeded):
1267         * html/HTMLEmbedElement.cpp:
1268         (WebCore::HTMLEmbedElement::rendererIsNeeded):
1269         * html/HTMLObjectElement.cpp:
1270         (WebCore::HTMLObjectElement::rendererIsNeeded):
1271
1272 2009-02-24  Simon Fraser  <simon.fraser@apple.com>
1273
1274         Reviewed by Dave Hyatt
1275
1276         https://bugs.webkit.org/show_bug.cgi?id=24137
1277         
1278         Fix localToAbsolute() and absoluteToLocal() to map points through 3d transforms,
1279         taking perspective and transform-style: preserve-3d into account.
1280         
1281         In order to support transform-style: preserve-3d, which keeps elements in a
1282         3d space, we have to carry along an accumulated matrix in TransformState.
1283         We also need to apply the perspective from the parent, if any, with the
1284         appropriate origin.
1285
1286         * GNUmakefile.am:
1287         * WebCore.base.exp:
1288         * WebCore.pro:
1289         * WebCore.scons:
1290         * WebCore.vcproj/WebCore.vcproj:
1291         * WebCore.xcodeproj/project.pbxproj:
1292         * WebCoreSources.bkl:
1293         * css/CSSComputedStyleDeclaration.cpp:
1294         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1295         * platform/graphics/transforms/TransformationMatrix.cpp:
1296         (WebCore::TransformationMatrix::translate):
1297         (WebCore::TransformationMatrix::translate3d):
1298         (WebCore::TransformationMatrix::translateRight3d):
1299         * platform/graphics/transforms/TransformationMatrix.h:
1300         * rendering/RenderBox.cpp:
1301         (WebCore::RenderBox::mapLocalToAbsolutePoint):
1302         (WebCore::RenderBox::mapAbsoluteToLocalPoint):
1303         * rendering/RenderBox.h:
1304         * rendering/RenderLayer.cpp:
1305         (WebCore::RenderLayer::updateTransform):
1306         (WebCore::RenderLayer::perspectiveTransform):
1307         (WebCore::RenderLayer::perspectiveOrigin):
1308         * rendering/RenderLayer.h:
1309         * rendering/RenderLayerBacking.cpp:
1310         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1311         * rendering/RenderLayerCompositor.cpp:
1312         (WebCore::requiresCompositingLayerForTransform):
1313         (WebCore::RenderLayerCompositor::layerHas3DContent):
1314         * rendering/RenderObject.cpp:
1315         (WebCore::RenderObject::localToAbsolute):
1316         (WebCore::RenderObject::absoluteToLocal):
1317         (WebCore::RenderObject::mapLocalToAbsolutePoint):
1318         (WebCore::RenderObject::mapAbsoluteToLocalPoint):
1319         * rendering/RenderObject.h:
1320         * rendering/RenderTableCell.cpp:
1321         (WebCore::RenderTableCell::mapLocalToAbsolutePoint):
1322         (WebCore::RenderTableCell::mapAbsoluteToLocalPoint):
1323         * rendering/RenderTableCell.h:
1324         * rendering/RenderView.cpp:
1325         (WebCore::RenderView::mapLocalToAbsolutePoint):
1326         (WebCore::RenderView::mapAbsoluteToLocalPoint):
1327         * rendering/RenderView.h:
1328         * rendering/TransformState.cpp: Added.
1329         (WebCore::TransformState::move):
1330         (WebCore::TransformState::applyTransform):
1331         (WebCore::TransformState::flatten):
1332         * rendering/TransformState.h: Added.
1333         (WebCore::TransformState::):
1334         (WebCore::TransformState::TransformState):
1335         (WebCore::TransformState::move):
1336         * rendering/style/RenderStyle.h:
1337         (WebCore::InheritedFlags::hasPerspective):
1338
1339 2009-02-24  Sam Weinig  <sam@webkit.org>
1340
1341         Reviewed by David Hyatt.
1342
1343         Fix for https://bugs.webkit.org/show_bug.cgi?id=23990
1344         Regression (r40837): JavaScript image popup doesn't work
1345
1346         Make the getClientRects and getBoundingClientRect methods return rects
1347         relative to the viewport.
1348
1349         Test: fast/dom/getBoundingClientRect-getClientRects-relative-to-viewport.html
1350
1351         * dom/Element.cpp:
1352         (WebCore::Element::getClientRects):
1353         (WebCore::Element::getBoundingClientRect):
1354
1355 2009-02-24  Ojan Vafai  <ojan@chromium.org>
1356
1357         Reviewed by Eric Seidel.
1358
1359         SVG pages don't have a body or an html element! 
1360         Don't return early if there is no body.
1361
1362         * editing/VisiblePosition.cpp:
1363         (WebCore::VisiblePosition::canonicalPosition):
1364
1365 2009-02-23  David Hyatt  <hyatt@apple.com>
1366
1367         Reviewed by Eric Seidel
1368
1369         https://bugs.webkit.org/show_bug.cgi?id=23740, painting order wrong for normal flow elements with overflow: hidden
1370         
1371         This patch reworks the painting of overflow.  There is now the concept of a "self-painting layer."  All
1372         layers are considered to be self-painting except for overflow layers that are normal flow (and that don't have
1373         reflections or masks).
1374         
1375         If an overflow layer is not self-painting, then it ends up painted by its parent just like any other normal flow object.
1376         The only difference is that the clip has to be pushed and popped when painting the object's children.
1377         
1378         The lightweight clipping scheme used for controls has been extended to cover overflow now in this simplified case.  With
1379         the code consolidated into reusable push/pop functions, all of the renderers that use overflow have been patched to
1380         use the new functions.
1381         
1382         Hit testing has also been patched to check the overflow clip rect first before recurring into children.
1383         
1384         Scrollbar paint has been moved into RenderBlock for now, since none of the table objects support scrollbars
1385         yet, and scrollbar hit testing was already there anyway.  Now the two code paths are more symmetrical.
1386         
1387         Masks are now treated like normal flow layers (just like reflections).
1388
1389         A couple of test cases have been added to fast/overflow to test the stacking order. 
1390
1391         * rendering/InlineFlowBox.cpp:
1392         (WebCore::InlineFlowBox::nodeAtPoint):
1393         (WebCore::InlineFlowBox::paint):
1394         * rendering/RenderBlock.cpp:
1395         (WebCore::RenderBlock::repaintOverhangingFloats):
1396         (WebCore::RenderBlock::paint):
1397         (WebCore::RenderBlock::paintChildren):
1398         (WebCore::RenderBlock::paintObject):
1399         (WebCore::RenderBlock::paintFloats):
1400         (WebCore::RenderBlock::insertFloatingObject):
1401         (WebCore::RenderBlock::floatRect):
1402         (WebCore::RenderBlock::lowestPosition):
1403         (WebCore::RenderBlock::rightmostPosition):
1404         (WebCore::RenderBlock::leftmostPosition):
1405         (WebCore::RenderBlock::addOverhangingFloats):
1406         (WebCore::RenderBlock::nodeAtPoint):
1407         (WebCore::RenderBlock::hitTestContents):
1408         * rendering/RenderBox.cpp:
1409         (WebCore::RenderBox::nodeAtPoint):
1410         (WebCore::RenderBox::pushContentsClip):
1411         (WebCore::RenderBox::popContentsClip):
1412         * rendering/RenderBox.h:
1413         (WebCore::RenderBox::paintObject):
1414         * rendering/RenderBoxModelObject.cpp:
1415         (WebCore::RenderBoxModelObject::hasSelfPaintingLayer):
1416         * rendering/RenderBoxModelObject.h:
1417         * rendering/RenderLayer.cpp:
1418         (WebCore::RenderLayer::paintLayer):
1419         (WebCore::RenderLayer::hitTestLayer):
1420         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
1421         (WebCore::RenderLayer::isSelfPaintingLayer):
1422         * rendering/RenderLayer.h:
1423         * rendering/RenderTable.cpp:
1424         (WebCore::RenderTable::paint):
1425         (WebCore::RenderTable::paintObject):
1426         (WebCore::RenderTable::nodeAtPoint):
1427         * rendering/RenderTable.h:
1428         * rendering/RenderTableCell.cpp:
1429         (WebCore::RenderTableCell::paint):
1430         * rendering/RenderTableRow.cpp:
1431         (WebCore::RenderTableRow::nodeAtPoint):
1432         (WebCore::RenderTableRow::paint):
1433         * rendering/RenderTableRow.h:
1434         * rendering/RenderTableSection.cpp:
1435         (WebCore::RenderTableSection::paint):
1436         (WebCore::RenderTableSection::paintObject):
1437         (WebCore::RenderTableSection::nodeAtPoint):
1438         * rendering/RenderTableSection.h:
1439         * rendering/RenderTreeAsText.cpp:
1440         (WebCore::write):
1441         (WebCore::writeLayers):
1442
1443 2009-02-24  David Levin  <levin@chromium.org>
1444
1445         Reviewed by NOBODY (build fix).
1446
1447         Attempted build fix for wx-mac.
1448
1449         * WebCoreSources.bkl:
1450
1451 2009-02-24  David Levin  <levin@chromium.org>
1452
1453         Reviewed by NOBODY (build fix).
1454
1455         Attempted build fixes for qt-linux and wx-mac.
1456
1457         * WebCore.pro:
1458         * webcore-base.bkl:
1459
1460 2009-02-24  Ojan Vafai  <ojan@dhcp-172-31-134-214.sfo.corp.google.com>
1461
1462         Reviewed by Sam Weinig.
1463
1464         Fix null pointer error. If the node is the Document, then ownerDocument() 
1465         returns null, document() does not.
1466
1467         * editing/VisiblePosition.cpp:
1468         (WebCore::VisiblePosition::canonicalPosition):
1469
1470 2009-02-24  Jian Li  <jianli@chromium.org>
1471
1472         Reviewed by NOBODY (attempted build fixes).
1473
1474         Fix build break for Windows and Linux.
1475
1476         * GNUmakefile.am:
1477         * WebCore.vcproj/WebCore.vcproj:
1478
1479 2009-02-24  Dimitri Glazkov  <dglazkov@chromium.org>
1480
1481         Reviewed by Eric Seidel.
1482
1483         https://bugs.webkit.org/show_bug.cgi?id=24131
1484         Fix-up COM/RefCounted dichotomy in Chromium port.
1485
1486         * page/chromium/AccessibilityObjectWrapper.h:
1487         (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper): Added
1488         explicit setting of recount.
1489
1490 2009-02-24  Dimitri Glazkov  <dglazkov@chromium.org>
1491
1492         Reviewed by Eric Seidel.
1493
1494         https://bugs.webkit.org/show_bug.cgi?id=24141
1495         Add clarity to V8 interceptor helper function.
1496
1497         * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
1498         (WebCore::NAMED_PROPERTY_GETTER): Renamed to notHandledByInterceptor.
1499         (WebCore::NAMED_PROPERTY_SETTER): Ditto.
1500         (WebCore::INDEXED_PROPERTY_GETTER): Ditto.
1501         (WebCore::INDEXED_PROPERTY_SETTER): Ditto.
1502
1503 2009-02-24  Simon Fraser  <simon.fraser@apple.com>
1504
1505         Reviewed by Eric Seidel
1506
1507         Minor numeric cleanup: convert float literals to doubles.
1508         
1509         * platform/graphics/transforms/RotateTransformOperation.cpp:
1510         (WebCore::RotateTransformOperation::blend):
1511
1512 2009-02-24  Mark Mentovai  <mark@chromium.org>
1513
1514         Reviewed by Eric Seidel.
1515
1516         https://bugs.webkit.org/show_bug.cgi?id=24139
1517         Add missing include.
1518
1519         * bindings/v8/ScriptInstance.h:
1520
1521 2009-02-24  Jian Li  <jianli@chromium.org>
1522
1523         Reviewed by Alexey Proskuryakov.
1524
1525         Move worker related files from dom directory to worker directory under WebCore.
1526         https://bugs.webkit.org/show_bug.cgi?id=24123
1527
1528         * DerivedSources.make:
1529         * GNUmakefile.am:
1530         * WebCore.pro:
1531         * WebCore.scons:
1532         * WebCore.vcproj/MigrateIDLAndScripts:
1533         * WebCore.vcproj/WebCore.vcproj:
1534         * WebCore.xcodeproj/project.pbxproj:
1535         * platform/CrossThreadCopier.cpp: Renamed from WebCore/dom/CrossThreadCopier.cpp.
1536         * platform/CrossThreadCopier.h: Renamed from WebCore/dom/CrossThreadCopier.h.
1537         * workers/GenericWorkerTask.h: Renamed from WebCore/dom/GenericWorkerTask.h.
1538         * workers/Worker.cpp: Renamed from WebCore/dom/Worker.cpp.
1539         * workers/Worker.h: Renamed from WebCore/dom/Worker.h.
1540         * workers/Worker.idl: Renamed from WebCore/dom/Worker.idl.
1541         * workers/WorkerContext.cpp: Renamed from WebCore/dom/WorkerContext.cpp.
1542         * workers/WorkerContext.h: Renamed from WebCore/dom/WorkerContext.h.
1543         * workers/WorkerContext.idl: Renamed from WebCore/dom/WorkerContext.idl.
1544         * workers/WorkerContextProxy.h: Renamed from WebCore/dom/WorkerContextProxy.h.
1545         * workers/WorkerLocation.cpp: Renamed from WebCore/dom/WorkerLocation.cpp.
1546         * workers/WorkerLocation.h: Renamed from WebCore/dom/WorkerLocation.h.
1547         * workers/WorkerLocation.idl: Renamed from WebCore/dom/WorkerLocation.idl.
1548         * workers/WorkerMessagingProxy.cpp: Renamed from WebCore/dom/WorkerMessagingProxy.cpp.
1549         * workers/WorkerMessagingProxy.h: Renamed from WebCore/dom/WorkerMessagingProxy.h.
1550         * workers/WorkerObjectProxy.h: Renamed from WebCore/dom/WorkerObjectProxy.h.
1551         * workers/WorkerRunLoop.cpp: Renamed from WebCore/dom/WorkerRunLoop.cpp.
1552         * workers/WorkerRunLoop.h: Renamed from WebCore/dom/WorkerRunLoop.h.
1553         * workers/WorkerThread.cpp: Renamed from WebCore/dom/WorkerThread.cpp.
1554         * workers/WorkerThread.h: Renamed from WebCore/dom/WorkerThread.h.
1555
1556 2009-02-05  Ojan Vafai  <ojan@chromium.org> and Eric Seidel <eric@webkit.org>
1557
1558         Reviewed by Dave Hyatt.
1559
1560         Make cursor positions match IE6/IE7/FF3 when clicking in margins/padding
1561         around divs inside editable regions.
1562         https://bugs.webkit.org/show_bug.cgi?id=23605
1563
1564         Fix clicks outside editable regions from focusing the editable region.
1565         https://bugs.webkit.org/show_bug.cgi?id=23607
1566
1567         Removed editing/selection/contenteditable-click-outside.html as it's
1568         not as useful as our new tests.
1569
1570         Clean up RenderBlock::positionForCoordinates to remove dead code,
1571         duplicate code, and generally make it more readable.
1572
1573         Tests: editing/selection/click-in-margins-inside-editable-div.html
1574                editing/selection/click-in-padding-with-multiple-line-boxes.html
1575                editing/selection/click-outside-editable-div.html
1576
1577         * editing/VisiblePosition.cpp:
1578         (WebCore::VisiblePosition::canonicalPosition):
1579         * rendering/RenderBlock.cpp:
1580         (WebCore::positionForPointRespectingEditingBoundaries):
1581         (WebCore::positionForPointWithInlineChildren):
1582         (WebCore::RenderBlock::positionForCoordinates):
1583         (WebCore::RenderBlock::updateFirstLetter):
1584
1585 2009-02-24  Sam Weinig  <sam@webkit.org>
1586
1587         Reviewed by Geoffrey Garen.
1588
1589         Related to <rdar://problem/6590295>
1590         Allow disabling javascript: urls.
1591
1592         * WebCore.base.exp:
1593         * html/HTMLAnchorElement.cpp:
1594         (WebCore::HTMLAnchorElement::parseMappedAttribute):
1595         * loader/FrameLoader.cpp:
1596         (WebCore::FrameLoader::executeIfJavaScriptURL):
1597         * page/Page.cpp:
1598         (WebCore::Page::Page):
1599         (WebCore::Page::setJavaScriptURLsAreAllowed):
1600         (WebCore::Page::javaScriptURLsAreAllowed):
1601         * page/Page.h:
1602
1603 2009-02-24  Simon Fraser  <simon.fraser@apple.com>
1604
1605         Fix build when ACCELERATED_COMPOSITING is turned on
1606         (overflowList() -> normalFlowList()).
1607     
1608         * rendering/RenderLayerBacking.cpp:
1609         (WebCore::RenderLayerBacking::hasNonCompositingContent):
1610         (WebCore::RenderLayerBacking::paintIntoLayer):
1611         * rendering/RenderLayerCompositor.cpp:
1612         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
1613         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1614         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1615         (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect):
1616         (WebCore::RenderLayerCompositor::layerHas3DContent):
1617
1618 2009-02-24  Simon Fraser  <simon.fraser@apple.com>
1619
1620         Reviewed by Darin Adler
1621         
1622         https://bugs.webkit.org/show_bug.cgi?id=24135
1623         
1624         Round the FloatPoint returned by absoluteToLocal(), rather than
1625         truncating it.
1626
1627         * dom/MouseRelatedEvent.cpp:
1628         (WebCore::MouseRelatedEvent::receivedTarget):
1629
1630 2009-02-24  Beth Dakin  <bdakin@apple.com>
1631
1632         Reviewed by Sam Weinig.
1633
1634         Fix for https://bugs.webkit.org/show_bug.cgi?id=24004 REGRESSION: 
1635         Ordered list item marker misaligned when line height is not 1.2 
1636         -and corresponding <rdar://problem/6602506>
1637
1638         This is a regression from http://trac.webkit.org/changeset/40880 
1639         where createInlineBox was taken off of RenderObject and moved to 
1640         RenderBox. The problem was that the RenderBox version still needs 
1641         to be virtual because there is still an existing implementation in 
1642         RenderListMarker. 
1643
1644         * rendering/RenderBox.h:
1645         * rendering/RenderListMarker.cpp:
1646         (WebCore::RenderListMarker::createInlineBox):
1647         * rendering/RenderListMarker.h:
1648
1649 2009-02-24  Dimitri Glazkov  <dglazkov@chromium.org>
1650
1651         Reviewed by Eric Seidel.
1652
1653         https://bugs.webkit.org/show_bug.cgi?id=24128
1654         Upstream more V8 custom bindings: constructors, XSLTProcessor.
1655
1656         * bindings/v8/custom/V8DOMParserConstructor.cpp: Added.
1657         (WebCore::CALLBACK_FUNC_DECL):
1658         * bindings/v8/custom/V8MessageChannelConstructor.cpp: Added.
1659         (WebCore::CALLBACK_FUNC_DECL):
1660         * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp: Added.
1661         (WebCore::CALLBACK_FUNC_DECL):
1662         * bindings/v8/custom/V8XMLSerializerConstructor.cpp: Added.
1663         (WebCore::CALLBACK_FUNC_DECL):
1664         * bindings/v8/custom/V8XPathEvaluatorConstructor.cpp: Added.
1665         (WebCore::CALLBACK_FUNC_DECL):
1666         * bindings/v8/custom/V8XSLTProcessorCustom.cpp: Added.
1667         (WebCore::CALLBACK_FUNC_DECL):
1668
1669 2009-02-24  David Levin  <levin@chromium.org>
1670
1671         Reviewed by Alexey Proskuryakov.
1672
1673         Bug 24090: WorkerThreadableLoader needs to be able to post tasks for a mode.
1674         <https://bugs.webkit.org/show_bug.cgi?id=24090>
1675
1676         No observable change in behavior, so no test.
1677
1678         * dom/WorkerMessagingProxy.cpp:
1679         (WebCore::WorkerMessagingProxy::postMessageToWorkerContext):
1680         (WebCore::WorkerMessagingProxy::postTaskToWorkerContext):
1681         Fixed the bug that m_unconfirmedMessageCount was getting incremented for non-message tasks.
1682
1683         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerContext):
1684
1685         * dom/WorkerMessagingProxy.h:
1686         * loader/ThreadableLoader.cpp:
1687         (WebCore::ThreadableLoader::create):
1688         * loader/WorkerThreadableLoader.cpp:
1689         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
1690         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
1691         (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
1692         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
1693         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
1694         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
1695         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
1696         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
1697         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation):
1698         Changed these methods to post task using a mode.
1699
1700         * loader/WorkerThreadableLoader.h:
1701         (WebCore::WorkerThreadableLoader::create):
1702
1703 2009-02-24  Alexey Proskuryakov  <ap@webkit.org>
1704
1705         Reviewed by Darin Adler.
1706
1707         https://bugs.webkit.org/show_bug.cgi?id=24091
1708         <rdar://problem/6468660> Start of redirect chain ends up as master entry in Application Cache
1709
1710         Test: http/tests/appcache/access-via-redirect.php
1711
1712         * loader/appcache/ApplicationCacheGroup.cpp:
1713         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Use the URL we ended up with,
1714         not the original one.
1715
1716 2009-02-24  Jian Li  <jianli@chromium.org>
1717
1718         Reviewed by Alexey Proskuryakov.
1719
1720         Change to include WorkerObjectProxy.h instead of WorkerMessagingProxy.h in WorkerContext.cpp and WorkerScriptController.cpp.
1721         https://bugs.webkit.org/show_bug.cgi?id=24112
1722
1723         * bindings/js/WorkerScriptController.cpp:
1724         * dom/WorkerContext.cpp:
1725
1726 2009-02-23  Antti Koivisto  <antti@apple.com>
1727
1728         Reviewed by Oliver Hunt.
1729
1730         <rdar://problem/6613796> Extended text codecs registered on webview creation
1731
1732         Comparing a text encoding with string "GBK" ended up constructing
1733         TextEncoding("GBK") which in turn initialized all extended
1734         text codecs.
1735
1736         * platform/text/TextCodecICU.cpp:
1737         (WebCore::TextCodecICU::decode):
1738
1739 2009-02-23  Sam Weinig  <sam@webkit.org>
1740
1741         Fix Qt build.
1742
1743         * bridge/qt/qt_runtime.cpp:
1744         (JSC::Bindings::valueRealType):
1745
1746 2009-02-23  Julien Chaffraix  <jchaffraix@webkit.org>
1747
1748         Reviewed by Darin Adler.
1749
1750         Bug 23956: Safari crashes when cloneNode fails (cloning a XML element with an invalid nodeName)
1751
1752         The crash occurred because Document::cloneNode would call Document::createElementNS. Unfortunately
1753         element created with createElement could have a wrong nodeName (createElement sets the string as the
1754         localName without checking for a prefix).
1755
1756         The fix is to call Document::createElement(const QualifiedName&, bool) that will not do any checks on the QualifiedName
1757         and will always succeed.
1758         Also rolled-out the HTMLElement specialisation of clonedNode as it was equivalent to what is done now (added an ASSERT
1759         to ensure that).
1760
1761         Test: fast/dom/cloneNode.html
1762
1763         * dom/Element.cpp:
1764         (WebCore::Element::cloneNode): Call createElement(const QualifiedName&, bool) instead of createElementNS as it will
1765         always return an element.
1766
1767         * html/HTMLElement.cpp:
1768         * html/HTMLElement.h: Removed HTMLElement::clonedNode as it is equivalent to what is now done.
1769
1770 2009-02-23  Dimitri Glazkov  <dglazkov@chromium.org>
1771
1772         Reviewed by Eric Seidel.
1773
1774         https://bugs.webkit.org/show_bug.cgi?id=24109
1775         Upstream V8 Script abstractions, all except ScriptController.
1776
1777         * bindings/v8/ScriptCachedFrameData.h: Added.
1778         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
1779         (WebCore::ScriptCachedFrameData::~ScriptCachedFrameData):
1780         (WebCore::ScriptCachedFrameData::restore):
1781         (WebCore::ScriptCachedFrameData::clear):
1782         (WebCore::ScriptCachedFrameData::domWindow):
1783         * bindings/v8/ScriptCallFrame.cpp: Added.
1784         (WebCore::ScriptCallFrame::ScriptCallFrame):
1785         (WebCore::ScriptCallFrame::~ScriptCallFrame):
1786         (WebCore::ScriptCallFrame::argumentAt):
1787         * bindings/v8/ScriptCallFrame.h: Added.
1788         (WebCore::ScriptCallFrame::functionName):
1789         (WebCore::ScriptCallFrame::sourceURL):
1790         (WebCore::ScriptCallFrame::lineNumber):
1791         (WebCore::ScriptCallFrame::argumentCount):
1792         * bindings/v8/ScriptCallStack.cpp: Added.
1793         (WebCore::ScriptCallStack::ScriptCallStack):
1794         (WebCore::ScriptCallStack::~ScriptCallStack):
1795         (WebCore::ScriptCallStack::at):
1796         * bindings/v8/ScriptCallStack.h: Added.
1797         (WebCore::ScriptCallStack::size):
1798         * bindings/v8/ScriptInstance.cpp: Added.
1799         (WebCore::V8ScriptInstance::V8ScriptInstance):
1800         (WebCore::V8ScriptInstance::~V8ScriptInstance):
1801         (WebCore::V8ScriptInstance::instance):
1802         (WebCore::V8ScriptInstance::clear):
1803         (WebCore::V8ScriptInstance::set):
1804         * bindings/v8/ScriptInstance.h: Added.
1805         (WebCore::V8ScriptInstance::create):
1806         * bindings/v8/ScriptSourceCode.h: Added.
1807         (WebCore::ScriptSourceCode::ScriptSourceCode):
1808         (WebCore::ScriptSourceCode::isEmpty):
1809         (WebCore::ScriptSourceCode::source):
1810         (WebCore::ScriptSourceCode::url):
1811         (WebCore::ScriptSourceCode::startLine):
1812         * bindings/v8/ScriptState.h: Added.
1813         (WebCore::ScriptState::hadException):
1814         (WebCore::ScriptState::setException):
1815         (WebCore::ScriptState::exception):
1816         * bindings/v8/ScriptString.h: Added.
1817         (WebCore::ScriptString::ScriptString):
1818         (WebCore::ScriptString::operator String):
1819         (WebCore::ScriptString::isNull):
1820         (WebCore::ScriptString::size):
1821         (WebCore::ScriptString::operator=):
1822         (WebCore::ScriptString::operator+=):
1823         * bindings/v8/ScriptValue.cpp: Added.
1824         (WebCore::ScriptValue::getString):
1825         * bindings/v8/ScriptValue.h: Added.
1826         (WebCore::ScriptValue::ScriptValue):
1827         (WebCore::ScriptValue::operator=):
1828         (WebCore::ScriptValue::operator==):
1829         (WebCore::ScriptValue::operator!=):
1830         (WebCore::ScriptValue::isNull):
1831         (WebCore::ScriptValue::isUndefined):
1832         (WebCore::ScriptValue::clear):
1833         (WebCore::ScriptValue::~ScriptValue):
1834         (WebCore::ScriptValue::v8Value):
1835
1836 2009-02-23  Adam Treat  <adam.treat@torchmobile.com>
1837
1838         Reviewed by Timothy Hatcher.
1839
1840         https://bugs.webkit.org/show_bug.cgi?id=24106
1841         The Qt port is crashing on exit because the tear down procedure involves
1842         the WebCore::InspectorController trying to access the JS execution context
1843         for a page that is being deleted.  This patch amends the inspector so
1844         that it does not try and access the execution context of the WebCore::Page
1845         in the midst of deletion.
1846
1847         * inspector/InspectorController.cpp:
1848         (WebCore::InspectorController::inspectedPageDestroyed):
1849         (WebCore::InspectorController::stopUserInitiatedProfiling):
1850
1851 2009-02-23  David Levin  <levin@chromium.org>
1852
1853         Reviewed by Alexey Proskuryakov.
1854
1855         Bug 24088: ThreadableLoaderClient::didFailWillSendRequestCheck isn't wired up completely for workers and could use a better name.
1856         <https://bugs.webkit.org/show_bug.cgi?id=24088>
1857
1858         No observable change in behavior, so no test.
1859
1860         * loader/DocumentThreadableLoader.cpp:
1861         (WebCore::DocumentThreadableLoader::create):
1862         * loader/ThreadableLoaderClient.h:
1863         (WebCore::ThreadableLoaderClient::didFailRedirectCheck):
1864         * loader/ThreadableLoaderClientWrapper.h:
1865         (WebCore::ThreadableLoaderClientWrapper::didFailRedirectCheck):
1866         * loader/WorkerThreadableLoader.cpp:
1867         (WebCore::workerContextDidFailRedirectCheck):
1868         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
1869         * loader/WorkerThreadableLoader.h:
1870         * xml/XMLHttpRequest.cpp:
1871         (WebCore::XMLHttpRequest::didFinishLoading):
1872         * xml/XMLHttpRequest.h:
1873
1874 2009-02-23  David Levin  <levin@chromium.org>
1875
1876         Reviewed by Alexey Proskuryakov.
1877
1878         Bug 24047: Need to simplify nested if's in WorkerRunLoop::runInMode
1879         <https://bugs.webkit.org/show_bug.cgi?id=24047>
1880
1881         Made a nested if inside of WorkerRunLoop::runInMode a lot simpler by
1882         using only MessageQueue::waitForMessageFilteredWithTimeout instead
1883         of three different MessageQueue methods.
1884
1885         No observable change in behavior, so no test.
1886
1887         * dom/WorkerRunLoop.cpp:
1888         (WebCore::ModePredicate::operator()):
1889         Minor clean-up to able to pass a const ref point for ModePredicate into runInMode.
1890         (WebCore::WorkerRunLoop::runInMode):
1891         * dom/WorkerRunLoop.h:
1892
1893 2009-02-23  David Hyatt  <hyatt@apple.com>
1894
1895         In preparation for making layers for multicol objects (so that they can properly split child layers
1896         into multiple columns), rename all of the "overflowOnly" and "overflowList" members and functions
1897         of RenderLayer to use the term "normal flow" instead.
1898
1899         Reviewed by Cameron Zwarich
1900
1901         * rendering/RenderLayer.cpp:
1902         (WebCore::RenderLayer::RenderLayer):
1903         (WebCore::RenderLayer::~RenderLayer):
1904         (WebCore::RenderLayer::setHasVisibleContent):
1905         (WebCore::RenderLayer::enclosingCompositingLayer):
1906         (WebCore::RenderLayer::addChild):
1907         (WebCore::RenderLayer::removeChild):
1908         (WebCore::RenderLayer::paintLayer):
1909         (WebCore::RenderLayer::hitTestLayer):
1910         (WebCore::RenderLayer::dirtyNormalFlowList):
1911         (WebCore::RenderLayer::updateNormalFlowList):
1912         (WebCore::RenderLayer::collectLayers):
1913         (WebCore::RenderLayer::updateLayerListsIfNeeded):
1914         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
1915         (WebCore::RenderLayer::styleChanged):
1916         * rendering/RenderLayer.h:
1917         (WebCore::RenderLayer::isNormalFlowOnly):
1918         (WebCore::RenderLayer::normalFlowList):
1919         * rendering/RenderTreeAsText.cpp:
1920         (WebCore::writeLayers):
1921
1922 2009-02-23  David Hyatt  <hyatt@apple.com>
1923
1924         Fix the stacking order for column rules in multi-column layout.  Column rules should paint as part of the background of an element, just
1925         after all other components of the background have been painted.  This allows negative z-index children to still paint on top of the
1926         column rules (rather than ending up above the background of the box but behind the column rules).
1927
1928         Reviewed by Eric Seidel
1929
1930         Added fast/multicol/column-rules-stacking.html
1931
1932         * rendering/RenderBlock.cpp:
1933         (WebCore::RenderBlock::paintColumnRules):
1934         (WebCore::RenderBlock::paintColumnContents):
1935         (WebCore::RenderBlock::paintObject):
1936         * rendering/RenderBlock.h:
1937
1938 2009-02-23  Adam Treat  <adam.treat@torchmobile.com>
1939
1940         Reviewed by David Hyatt.
1941
1942         No testcases have been added or modified since this patch should not result in
1943         a behavior change for ports that have layout tests enabled.
1944
1945         Currently, the implementation of GraphicsContext::drawLineForText amongst
1946         the various ports differ in that some of them are honoring the context's
1947         strokeStyle when drawing a text-decoration and some of them are not.
1948         For instance, Apple's Mac port *does not* honor the context's strokeStyle(),
1949         but the Cairo implementation does and has an explicit workaround that
1950         sets the strokeStyle() temporarily.
1951
1952         This patch fixes so that all ports are consistent by explicitly making sure
1953         to set the GraphicsContext strokeStyle to SolidStroke whenever
1954         painting the text-decoration of an InlineFlowBox or InlineTextBox as these
1955         should always use a solid stroke.
1956
1957         This patch addresses these bugs:
1958         https://bugs.webkit.org/show_bug.cgi?id=19364
1959         https://bugs.webkit.org/show_bug.cgi?id=15659
1960
1961         * rendering/InlineFlowBox.cpp:
1962         (WebCore::InlineFlowBox::paintTextDecorations):
1963         * rendering/InlineTextBox.cpp:
1964         (WebCore::InlineTextBox::paintDecoration):
1965
1966 2009-02-23  Scott Violet  <sky@google.com>
1967
1968         Reviewed by Eric Seidel.
1969
1970         https://bugs.webkit.org/show_bug.cgi?id=24098
1971         Bugs in ClipboardChromium
1972
1973         Fixes the following bugs in ClipboardChromium:
1974         * It's possible for the extension to be empty, resulting in a bad file
1975           name, for example, 'foo.' or just '.'.
1976         * We weren't restricting the size of the file to MAX_PATH.
1977         * We weren't removing characters that are invalid for file system names.
1978
1979         * platform/chromium/ClipboardChromium.cpp:
1980         (WebCore::writeImageToDataObject):
1981         * platform/chromium/ClipboardChromium.h:
1982         * platform/chromium/ClipboardChromiumLinux.cpp: Added.
1983         (WebCore::ClipboardChromium::validateFileName):
1984         * platform/chromium/ClipboardChromiumMac.cpp: Added.
1985         (WebCore::ClipboardChromium::validateFileName):
1986         * platform/chromium/ClipboardChromiumWin.cpp: Added.
1987         (WebCore::isInvalidFileCharacter):
1988         (WebCore::ClipboardChromium::validateFileName):
1989
1990 2009-02-23  Thiago Macieira  <thiago.macieira@nokia.com>
1991
1992         Reviewed by Simon Hausmann.
1993
1994         Fix the Copyright notices in a few files
1995
1996         * platform/qt/RenderThemeQt.h:
1997
1998 2009-02-23  Xan Lopez  <xan@gnome.org>
1999
2000         Reviewed by Alexey Proskuryakov.
2001
2002         https://bugs.webkit.org/show_bug.cgi?id=22624
2003         [SOUP][GTK] Need API to get SoupSession from WebKit.
2004
2005         Allow to retrieve the Soup session and modify the code to take
2006         into account users changing features on it.
2007
2008         * platform/network/ResourceHandle.h:
2009         * platform/network/soup/CookieJarSoup.cpp:
2010         (WebCore::defaultCookieJar):
2011         (WebCore::setDefaultCookieJar):
2012         * platform/network/soup/CookieJarSoup.h:
2013         * platform/network/soup/ResourceHandleSoup.cpp:
2014         (WebCore::createSoupSession):
2015         (WebCore::ensureSessionIsInitialized):
2016         (WebCore::ResourceHandle::startHttp):
2017         (WebCore::ResourceHandle::cancel):
2018         (WebCore::ResourceHandle::defaultSession):
2019
2020 2009-02-23  Xan Lopez  <xan@gnome.org>
2021
2022         Reviewed by Alexey Proskuryakov.
2023
2024         https://bugs.webkit.org/show_bug.cgi?id=22624
2025         [SOUP][GTK] Need API to get SoupSession from WebKit.
2026
2027         Remove CURL support.
2028
2029         * GNUmakefile.am:
2030
2031 2009-02-23  Alexey Proskuryakov  <ap@webkit.org>
2032
2033         Reviewed by Mark Rowe.
2034
2035         Test: fast/dom/empty-hash-and-search.html
2036
2037         https://bugs.webkit.org/show_bug.cgi?id=21147
2038         hash property returns incorrect value for links w/o hash
2039
2040         Make hash() and search() behavior for empty and missing parts match IE and Firefox.
2041
2042         * platform/KURL.cpp:
2043         (WebCore::KURL::query): Changed to return query without '?', as it is already done for ref().
2044         (WebCore::KURL::prettyURL): Append the query with the question mark.
2045
2046         * page/Location.cpp:
2047         (WebCore::Location::search): Return an empty string if query is empty or missing.
2048         (WebCore::Location::hash): Return an empty string for empty hashes, not only missing ones.
2049
2050         * dom/WorkerLocation.cpp:
2051         (WebCore::WorkerLocation::search):
2052         (WebCore::WorkerLocation::hash):
2053         Match document.location fixes above.
2054
2055         * html/HTMLAnchorElement.cpp:
2056         (WebCore::HTMLAnchorElement::hash):
2057         (WebCore::HTMLAnchorElement::search):
2058         Return an empty string for empty and missing parts.
2059
2060 2009-02-23  Alexey Proskuryakov  <ap@webkit.org>
2061
2062         Reviewed by Darin Adler.
2063
2064         https://bugs.webkit.org/show_bug.cgi?id=20184
2065         SELECT with no name generates invalid query string
2066
2067         Test: fast/forms/select-no-name.html
2068
2069         * html/HTMLSelectElement.cpp:
2070         (WebCore::HTMLSelectElement::appendFormData): Added a check for empty name.
2071
2072 2009-02-23  Alexey Proskuryakov  <ap@webkit.org>
2073
2074         Apply review comments for the previous check-in (forgot to save the file, oops).
2075
2076         * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChildren):
2077
2078 2009-02-23  Alexey Proskuryakov  <ap@webkit.org>
2079
2080         Reviewed by Darin Adler.
2081
2082         https://bugs.webkit.org/show_bug.cgi?id=15707
2083         Crash when manipulating document from within an iframe onload function
2084
2085         Test: fast/dom/onload-open.html
2086
2087         * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChildren): Protect the container and
2088         the current node, because anything can happen when dispatching events.
2089
2090 2009-02-23  Alexey Proskuryakov  <ap@webkit.org>
2091
2092         Reviewed by Darin Adler.
2093
2094         https://bugs.webkit.org/show_bug.cgi?id=18970
2095         Numerically named input fields cause document.forms loop problems
2096
2097         Test: fast/forms/numeric-input-name.html
2098
2099         * bindings/scripts/CodeGeneratorJS.pm: Try index getter before name getter, even if the
2100         latter overrides properties.
2101
2102 2009-02-23  Alexey Proskuryakov  <ap@webkit.org>
2103
2104         Reviewed by Sam Weinig.
2105
2106         https://bugs.webkit.org/show_bug.cgi?id=24059
2107         Tokenizer::write() return value is never used
2108
2109         * dom/Tokenizer.h:
2110         * dom/XMLTokenizer.cpp:
2111         (WebCore::XMLTokenizer::write):
2112         * dom/XMLTokenizer.h:
2113         * html/HTMLTokenizer.cpp:
2114         (WebCore::HTMLTokenizer::write):
2115         * html/HTMLTokenizer.h:
2116         * loader/FTPDirectoryDocument.cpp:
2117         (WebCore::FTPDirectoryTokenizer::write):
2118         * loader/ImageDocument.cpp:
2119         (WebCore::ImageTokenizer::write):
2120         * loader/MediaDocument.cpp:
2121         (WebCore::MediaTokenizer::write):
2122         * loader/PluginDocument.cpp:
2123         (WebCore::PluginTokenizer::write):
2124         * loader/TextDocument.cpp:
2125         (WebCore::TextTokenizer::write):
2126         Made write() return void, not bool.
2127
2128 2009-02-20  Geoffrey Garen  <ggaren@apple.com>
2129
2130         Reviewed by Sam Weinig.
2131
2132         Updated for JavaScriptCore changes to timeout checking.
2133
2134         * bindings/js/JSCustomPositionCallback.cpp:
2135         (WebCore::JSCustomPositionCallback::handleEvent):
2136         * bindings/js/JSCustomPositionErrorCallback.cpp:
2137         (WebCore::JSCustomPositionErrorCallback::handleEvent):
2138         * bindings/js/JSCustomSQLStatementCallback.cpp:
2139         (WebCore::JSCustomSQLStatementCallback::handleEvent):
2140         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2141         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
2142         * bindings/js/JSCustomSQLTransactionCallback.cpp:
2143         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
2144         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
2145         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
2146         * bindings/js/JSCustomVoidCallback.cpp:
2147         (WebCore::JSCustomVoidCallback::handleEvent):
2148         * bindings/js/JSCustomXPathNSResolver.cpp:
2149         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2150         * bindings/js/JSDOMWindowBase.cpp:
2151         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2152         (WebCore::JSDOMWindowBase::commonJSGlobalData):
2153         * bindings/js/JSEventListener.cpp:
2154         (WebCore::JSAbstractEventListener::handleEvent):
2155         * bindings/js/ScheduledAction.cpp:
2156         (WebCore::ScheduledAction::executeFunctionInContext):
2157         * bindings/js/ScriptController.cpp:
2158         (WebCore::ScriptController::evaluate):
2159         * bindings/js/WorkerScriptController.cpp:
2160         (WebCore::WorkerScriptController::evaluate):
2161         (WebCore::WorkerScriptController::forbidExecution):
2162         * bindings/objc/WebScriptObject.mm:
2163         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2164         (-[WebScriptObject evaluateWebScript:]):
2165         * bridge/NP_jsobject.cpp:
2166         (_NPN_InvokeDefault):
2167         (_NPN_Invoke):
2168         (_NPN_Evaluate):
2169         (_NPN_Construct):
2170         * bridge/jni/jni_jsobject.mm:
2171         (JavaJSObject::call):
2172         (JavaJSObject::eval):
2173
2174 2009-02-21  Hironori Bono  <hbono@chromium.org>
2175
2176         Reviewed by Alexey Proskuryakov.
2177
2178         https://bugs.webkit.org/show_bug.cgi?id=23786
2179         [Chromium] line-break characters in a complex text are treated as zero-width spaces
2180
2181         This change prevents the UniscribeHelper class from treating the line-break characters
2182         as whitespaces.
2183
2184         Tests: fast/text/international/bidi-linebreak-001.html
2185                fast/text/international/bidi-linebreak-002.html
2186                fast/text/international/bidi-linebreak-003.html
2187
2188         * platform/graphics/chromium/UniscribeHelper.cpp:
2189         (WebCore::UniscribeHelper::adjustSpaceAdvances):
2190         Make the UniscribeHelper::adjustSpaceAdvances() function treat all characters in
2191         the treatAsSpace() function (e.g. U+0020, U+000A, U+000D, U+00A0) as whitespaces,
2192         so does when Chromium renders a simple text.
2193
2194 2009-02-20  Julien Chaffraix  <jchaffraix@webkit.org>
2195
2196         Reviewed by Alexey Proskuryakov.
2197
2198         Bug 23940: Use Document::createElement(const QualifiedName&, bool) when creating a known element inside WebCore
2199
2200         Document::createElement(const QualifiedName&, bool) does not check for the prefix as opposed the the one taking an AtomicString
2201         or Document::createElementNS. This is perfectly fine internally because we know the type of element created and the check is
2202         unneeded.
2203
2204         It also removes the use of an ExceptionCode argument which was here only to check that the prefix check was fine. Finally it
2205         enables us to use some generated QualifiedName.
2206
2207         * bindings/js/JSOptionConstructor.cpp:
2208         (WebCore::constructHTMLOptionElement):
2209         * dom/Document.cpp:
2210         (WebCore::Document::setTitle):
2211         * dom/XMLTokenizer.cpp:
2212         (WebCore::createXHTMLParserErrorHeader):
2213         (WebCore::XMLTokenizer::insertErrorMessageBlock):
2214         * editing/CompositeEditCommand.cpp:
2215         (WebCore::createBlockPlaceholderElement):
2216         * editing/htmlediting.cpp:
2217         (WebCore::createTabSpanElement):
2218         * html/HTMLSelectElement.cpp:
2219         (WebCore::HTMLSelectElement::setLength):
2220         * loader/FTPDirectoryDocument.cpp:
2221         (WebCore::FTPDirectoryTokenizer::appendEntry):
2222         (WebCore::FTPDirectoryTokenizer::createTDForFilename):
2223         (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate):
2224         (WebCore::FTPDirectoryTokenizer::createBasicDocument):
2225         * loader/ImageDocument.cpp:
2226         (WebCore::ImageDocument::createDocumentStructure):
2227         * loader/MediaDocument.cpp:
2228         (WebCore::MediaTokenizer::createDocumentStructure):
2229         * loader/PluginDocument.cpp:
2230         (WebCore::PluginTokenizer::createDocumentStructure):
2231         * loader/TextDocument.cpp:
2232         (WebCore::TextTokenizer::write):
2233         * page/Frame.cpp:
2234         (WebCore::Frame::selectionComputedStyle):
2235         (WebCore::Frame::styleForSelectionStart):
2236         Document::createElement(const AtomicString&, ...) to Document::createElement(const QualifiedName&, ...) switch.
2237
2238         * xml/XPathFunctions.cpp:
2239         (WebCore::XPath::FunLang::evaluate): Re-use langAttr instead of creating a new attribute.
2240         * page/DragController.cpp:
2241         (WebCore::documentFragmentFromDragData): Use the HTMLAnchorElement directly to get rid of the static cast.
2242
2243 2009-02-19  Dimitri Glazkov  <dglazkov@chromium.org>
2244
2245         Reviewed by Eric Seidel.
2246
2247         https://bugs.webkit.org/show_bug.cgi?id=24060
2248         Fix up to accommodate for CanvasPixelArray return.
2249
2250         * platform/graphics/skia/ImageBufferSkia.cpp:
2251         (WebCore::ImageBuffer::getImageData): Added an extra data() to call.
2252         (WebCore::ImageBuffer::putImageData): Ditto.
2253
2254 2009-02-20  Eric Carlson  <eric.carlson@apple.com>
2255
2256         Simon Fraser
2257
2258         https://bugs.webkit.org/show_bug.cgi?id=24042
2259         Bug 24042: MediaPlayer should cache plug-in proxy
2260
2261         The changes in https://bugs.webkit.org/show_bug.cgi?id=23917 assume that
2262         MediaPlayer will always have created the private media player object before
2263         the plug-in is instantiated and calls back with the proxy object. This is not
2264         true on all platforms because of threading latency, so MediaPlayer should
2265         cache the plug-in proxy so it can pass it to the media engine at a later time.
2266
2267         * platform/graphics/MediaPlayer.cpp:
2268         (WebCore::NullMediaPlayerPrivate::setPoster): Null media engine implementation of proxy methods.
2269         (WebCore::NullMediaPlayerPrivate::deliverNotification): Ditto.
2270         (WebCore::NullMediaPlayerPrivate::setMediaPlayerProxy): Ditto.
2271         (WebCore::MediaPlayer::MediaPlayer): Initialize m_playerProxy.
2272         (WebCore::MediaPlayer::load): Pass m_playerProxy to newly created engine.
2273         (WebCore::MediaPlayer::setMediaPlayerProxy): Cache m_playerProxy.
2274         * platform/graphics/MediaPlayer.h: Declare m_playerProxy.
2275
2276 2009-02-20  Eric Carlson  <eric.carlson@apple.com>
2277
2278         Simon Fraser.
2279
2280         https://bugs.webkit.org/show_bug.cgi?id=24063
2281         Make it possible for a port to require a user gesture to play/pause an <audio> or <video> element
2282
2283         * html/HTMLMediaElement.cpp:
2284         (WebCore::HTMLMediaElement::HTMLMediaElement):  Rename m_loadRestrictions to m_Restrictions.
2285         Initialize m_internalCall.
2286         (WebCore::HTMLMediaElement::loadTimerFired): Increment m_internalCall around call to load().
2287         (WebCore::HTMLMediaElement::load): Call loadInternal if restrictions check out.
2288         (WebCore::HTMLMediaElement::loadInternal): New, guts of old load()
2289         (WebCore::HTMLMediaElement::setNetworkState): Fix bug introduced in r40943
2290         (WebCore::HTMLMediaElement::play): Call playInternal if restrictions check out.
2291         (WebCore::HTMLMediaElement::playInternal): New, guts of old play()
2292         (WebCore::HTMLMediaElement::pause): Call pauseInternal if restrictions check out.
2293         (WebCore::HTMLMediaElement::pauseInternal): New, guts of old pause()
2294         (WebCore::HTMLMediaElement::togglePlayState): Call playInternal/pauseInternal
2295         (WebCore::HTMLMediaElement::deliverNotification): Remove unnecessary white space.
2296         * html/HTMLMediaElement.h: Rename m_loadRestrictions to m_Restrictions, add m_internalCall,
2297         add RequireUserGestureRateChangeRestriction.
2298
2299 2009-02-20  Darin Fisher  <darin@chromium.org>
2300
2301         Fix build bustage in FileSystemWin.cpp.
2302
2303         Need to return CString() instead of 0 since there are now two CString
2304         constructors that take a pointer type.
2305
2306         * platform/win/FileSystemWin.cpp:
2307         (WebCore::openTemporaryFile):
2308
2309 2009-02-20  Dimitri Glazkov  <dglazkov@chromium.org>
2310
2311         Reviewed by Sam Weinig.
2312
2313         https://bugs.webkit.org/show_bug.cgi?id=23999
2314         Change license headers to accurately reflect code history.
2315
2316         * platform/ContentType.cpp:
2317         * platform/ContentType.h:
2318
2319 2009-02-18  Dimitri Glazkov  <dglazkov@chromium.org>
2320
2321         Reviewed by Antti Koivisto.
2322
2323         https://bugs.webkit.org/show_bug.cgi?id=23999
2324         Split off MIME type parsing into its own class.
2325
2326         * GNUmakefile.am: Added ContentType sources.
2327         * WebCore.pro: Ditto.
2328         * WebCore.scons: Ditto.
2329         * WebCore.vcproj/WebCore.vcproj: Ditto.
2330         * WebCore.xcodeproj/project.pbxproj: Ditto.
2331         * WebCoreSources.bkl: Ditto.
2332         * html/HTMLMediaElement.cpp: Changed to use ContentType.
2333         (WebCore::HTMLMediaElement::selectMediaURL):
2334         * platform/ContentType.cpp: Added.
2335         (WebCore::ContentType::ContentType):
2336         (WebCore::ContentType::parameter):
2337         (WebCore::ContentType::type):
2338         * platform/ContentType.h: Added.
2339         (WebCore::ContentType::raw):
2340         * platform/MIMETypeRegistry.cpp:
2341         * platform/MIMETypeRegistry.h:
2342         * platform/graphics/MediaPlayer.cpp:
2343         (WebCore::MediaPlayer::load):
2344         * rendering/style/ContentData.h: Renamed ContentType to StyleContentType.
2345         * rendering/style/RenderStyleConstants.h: Ditto.
2346         (WebCore::):
2347
2348 2009-02-20  Holger Hans Peter Freyther  <zecke@selfish.org>
2349
2350         Unreviewed build fix.
2351
2352         Use CString() instead of 0.
2353
2354         * platform/gtk/FileSystemGtk.cpp:
2355         (WebCore::openTemporaryFile):
2356         * platform/qt/FileSystemQt.cpp:
2357         (WebCore::openTemporaryFile):
2358
2359 2009-02-20  Gustavo Noronha Silva  <gns@gnome.org>
2360
2361         Reviewed by Holger Freyther.
2362
2363         When dealing with local files, use a path instead of an URI. GFile
2364         has problems decoding URIs with percent signs on them.
2365
2366         * platform/network/soup/ResourceHandleSoup.cpp:
2367         (WebCore::ResourceHandle::startGio):
2368
2369 2009-02-20  Gustavo Noronha Silva  <gns@gnome.org>
2370
2371         Reviewed by Holger Freyther.
2372
2373         Protect the ResourceHandle instance from being destroyed by
2374         didReceiveData inside the GIO readCallback call, so that
2375         cancelling caused by scripts is handled correctly.
2376
2377         * platform/network/soup/ResourceHandleSoup.cpp:
2378         (WebCore::readCallback):
2379
2380 2009-02-20  David Kilzer  <ddkilzer@apple.com>
2381
2382         Make IconDatabaseNone.cpp compile with -Wunused and pass check-for-exit-time-destructors
2383
2384         Reviewed by Sam Weinig.
2385
2386         * loader/icon/IconDatabaseNone.cpp:
2387         (WebCore::IconDatabase::defaultDatabaseFilename): Use DEFINE_STATIC_LOCAL().
2388         (WebCore::IconDatabase::open): Commented out unused parameter.
2389         (WebCore::IconDatabase::setPrivateBrowsingEnabled): Ditto.
2390         (WebCore::IconDatabase::iconForPageURL): Ditto.
2391         (WebCore::IconDatabase::iconURLForPageURL): Ditto.
2392         (WebCore::IconDatabase::defaultIcon): Ditto.
2393         (WebCore::IconDatabase::retainIconForPageURL): Ditto.
2394         (WebCore::IconDatabase::releaseIconForPageURL): Ditto.
2395         (WebCore::IconDatabase::setIconDataForIconURL): Ditto.
2396         (WebCore::IconDatabase::setIconURLForPageURL): Ditto.
2397         (WebCore::IconDatabase::setEnabled): Ditto.
2398         (WebCore::IconDatabase::pageURLMappingCount): Added stub.
2399         (WebCore::IconDatabase::retainedPageURLCount): Ditto.
2400         (WebCore::IconDatabase::iconRecordCount): Ditto.
2401         (WebCore::IconDatabase::iconRecordCountWithData): Ditto.
2402
2403 2009-02-20  David Kilzer  <ddkilzer@apple.com>
2404
2405         Add comment to generated code when shadowing a built-in object
2406
2407         Reviewed by Sam Weinig.
2408
2409         * bindings/scripts/CodeGeneratorJS.pm: Added comment to
2410         generated code output.
2411
2412 2009-02-20  Avi Drissman  <avi@chromium.org>
2413
2414         Reviewed by Eric Seidel.
2415
2416         https://bugs.webkit.org/show_bug.cgi?id=24036
2417         Keyboard events need disambiguation on the Linux platform too.
2418
2419         * platform/chromium/PlatformKeyboardEventChromium.cpp:
2420         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2421
2422 2009-02-19  Darin Fisher  <darin@chromium.org>
2423
2424         Reviewed by Eric Seidel.
2425
2426         https://bugs.webkit.org/show_bug.cgi?id=24046
2427
2428         Several improvements to CString:
2429         1- Make it possible to initialize a CString from a CStringBuffer
2430         2- Make it possible to get a CStringBuffer from a CString
2431         3- Change CStringBuffer::data() to return a const pointer to ward off mutation
2432         4- Remove unused releaseBuffer() methods.
2433         5- Make CStringBuffer::create() private to force consumers to get a CStringBuffer from a CString.
2434
2435         * platform/text/CString.cpp:
2436         (WebCore::CString::init):
2437         (WebCore::CString::mutableData):
2438         (WebCore::CString::newUninitialized):
2439         (WebCore::CString::copyBufferIfNeeded):
2440         * platform/text/CString.h:
2441         (WebCore::CStringBuffer::data):
2442         (WebCore::CStringBuffer::length):
2443         (WebCore::CStringBuffer::create):
2444         (WebCore::CStringBuffer::mutableData):
2445         (WebCore::CString::CString):
2446         (WebCore::CString::buffer):
2447
2448 2009-02-19  Dmitry Titov  <dimich@chromium.org>
2449
2450         Reviewed by Alexey Proskuryakov.
2451
2452         https://bugs.webkit.org/show_bug.cgi?id=24017
2453         Remove some usage of Document in Worker.
2454
2455         * dom/WorkerContext.h:
2456         (WebCore::WorkerContext::userAgent):
2457         * dom/Document.cpp:
2458         (WebCore::Document::userAgent):
2459         * dom/Document.h:
2460         * dom/ScriptExecutionContext.h:
2461         Added virtual ScriptExecutionContext::userAgent(const KURL&).
2462         Document implementation uses FrameLoader::userAgent and
2463         WorkerContext receives the string on creation and stores it in a member.
2464
2465         * dom/Worker.cpp:
2466         (WebCore::Worker::Worker):
2467         (WebCore::Worker::notifyFinished):
2468         * dom/Worker.h:
2469         (WebCore::Worker::create):
2470         Instead of Document the Worker constructor now gets a ScriptExecutionContext.
2471         Start using some methods on SEC (like completeURL() and userAgent()).
2472         For others, explicitly case to Document and add a FIXME.
2473         Remove Worker::document() too.
2474
2475 2009-02-20  Gustavo Noronha Silva  <gns@gnome.org>
2476
2477         Rubber-stamped by Holger Freyther.
2478
2479         Do not set httpStatus to SOUP_STATUS_OK when serving local files
2480         to match other ports' behavior, fixing xmlhttprequest test
2481         regressions.
2482
2483         * platform/network/soup/ResourceHandleSoup.cpp:
2484         (WebCore::queryInfoCallback):
2485
2486 2009-02-19  Dan Bernstein  <mitz@apple.com>
2487
2488         Reviewed by Sam Weinig.
2489
2490         - WebCore part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027
2491           Do not send loader callbacks during CSS styling
2492
2493         Undo the iChat-specific quirk added in
2494         <http://trac.webkit.org/changeset/41071>. Instead, always suspend memory
2495         cache client callbacks during attach() and recalcStyle().
2496
2497         * WebCore.base.exp: Removed
2498         Settings::setNeedsIChatMemoryCacheCallsQuirk().
2499         * dom/ContainerNode.cpp:
2500         (WebCore::ContainerNode::suspendPostAttachCallbacks): Disable memory
2501         cache client callbacks and remember to enable them afterwards if needed.
2502         (WebCore::ContainerNode::resumePostAttachCallbacks): Re-enable memory
2503         cache client callbacks if they were disabled in
2504         suspendPostAttachCallbacks().
2505         (WebCore::ContainerNode::attach): Use suspendPostAttachCallbacks() and
2506         resumePostAttachCallbacks().
2507         * dom/ContainerNode.h: Made suspendPostAttachCallbacks()
2508         and resumePostAttachCallbacks() non-static.
2509         * dom/Document.cpp:
2510         (WebCore::Document::dispatchImageLoadEventsNow): Reverted iChat-specific
2511         workaround.
2512         * page/Settings.cpp: Removed m_needsIChatMemoryCacheCallsQuirk and
2513         related code.
2514         (WebCore::Settings::Settings):
2515         * page/Settings.h:
2516
2517 2009-02-19  Holger Hans Peter Freyther  <zecke@selfish.org>
2518
2519         Unreviewed build fix.
2520
2521         Build fix after r41092. Make the memoryUsage method
2522         public. It will be shadowed by cf/mac and for curl/soup/qt
2523         the implementation from ResourceResponseBase will be used.
2524
2525         * platform/network/ResourceResponseBase.h:
2526         (WebCore::ResourceResponseBase::memoryUsage):
2527
2528 2009-02-19  Beth Dakin  <bdakin@apple.com>
2529
2530         Reviewed by Dave Hyatt.
2531
2532         Fix for <rdar://problem/6077775> Should be able to specify
2533         inactive ::selection color
2534
2535         This patch makes the ::selction pseudo-element work with
2536         the :window-inactive pseudo type. This was, a user can specify a
2537         different ::selection style when a window is inactive.
2538
2539         * css/CSSStyleSelector.cpp:
2540         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
2541         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
2542         * rendering/RenderObject.cpp:
2543         (WebCore::RenderObject::selectionBackgroundColor):
2544         (WebCore::RenderObject::selectionForegroundColor):
2545
2546 2009-02-19  Sam Weinig  <sam@webkit.org>
2547
2548         Reviewed by Beth Dakin.
2549
2550         Patch for https://bugs.webkit.org/show_bug.cgi?id=24044
2551         Update querySelector/querySelectorAll to match the latest spec
2552
2553         Update querySelector and querySelectorAll to match the latest version
2554         of the Selectors API spec.  We now stringify null and undefined to "null"
2555         and "undefined" respectively instead of to "".
2556
2557         Test: fast/dom/SelectorAPI/undefined-null-stringify.html
2558
2559         * dom/Document.idl:
2560         * dom/DocumentFragment.idl:
2561         * dom/Element.idl:
2562
2563 2009-02-19  Dimitri Glazkov  <dglazkov@chromium.org>
2564
2565         Reviewed by Geoffrey Garen.
2566
2567         https://bugs.webkit.org/show_bug.cgi?id=23732
2568         Rework CachedResource overhead accounting to allow platforms to diverge
2569         in numbers.
2570
2571         * loader/CachedResource.cpp:
2572         (WebCore::CachedResource::overheadSize): Changed to ask ResourceResponse
2573         for its size and to use actual URL size.
2574         * platform/network/ResourceResponseBase.h:
2575         (WebCore::ResourceResponseBase::size): Added default size method.
2576         * platform/network/cf/ResourceResponse.h:
2577         (WebCore::ResourceResponse::size): Added Win/CF size method
2578         * platform/network/mac/ResourceResponse.h:
2579         (WebCore::ResourceResponse::size): Added Mac size method.
2580
2581 2009-02-19  Anders Carlsson  <andersca@apple.com>
2582
2583         Reviewed by Kevin Decker.
2584
2585         - Fix for <rdar://problem/6604968>
2586
2587         On Tiger, create an autorelease pool before creating the NSGraphicsContext and drain it immediately
2588         after the call to -[NSView displayRectIgnoringOpacity:inContext:].
2589
2590         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2591         (WebCore::MediaPlayerPrivate::paint):
2592
2593 2009-02-19  David Hyatt  <hyatt@apple.com>
2594
2595         Fix a bug where reflections didn't work properly if opacity was < 1.  Make sure that replaced elements
2596         also consider reflections to be part of their visual overflow.  This had already been done for blocks
2597         and lines, but it wasn't being done yet for replaced elements.
2598
2599         Also make sure that when the object being reflected has opacity < 1 that we don't end up popping the outer
2600         transparency layer early.  Since the reflected object paints twice, we don't want to end the transparency
2601         layer it pushed until we're done painting the real object (rather than the reflection).
2602
2603         Reviewed by Dan Bernstein
2604
2605         Added fast/reflections/reflection-masks-opacity.html
2606
2607         * rendering/RenderLayer.cpp:
2608         (WebCore::RenderLayer::paintLayer):
2609         * rendering/RenderPartObject.cpp:
2610         (WebCore::RenderPartObject::layout):
2611         * rendering/RenderReplaced.cpp:
2612         (WebCore::RenderReplaced::layout):
2613         (WebCore::RenderReplaced::adjustOverflowForBoxShadowAndReflect):
2614         * rendering/RenderReplaced.h:
2615
2616 2009-02-19  David Levin  <levin@chromium.org>
2617
2618         Reviewed by Alexey Proskuryakov.
2619
2620         Bug 23980: WorkerRunLoop needs a way to run in a given mode similar to CFRunLoopInMode.
2621         <https://bugs.webkit.org/show_bug.cgi?id=23980>
2622
2623         WorkerRunLoop has the ability to run in a mode which filters the tasks to be run.
2624         * When WorkerRunLoop::runInMode is called, only task for that mode will run.
2625         * When WorkerRunLoop::run is called (or the default mode is used), then all tasks
2626           will run regardless of their posted mode.
2627
2628         Here's a demonstration of the api:
2629
2630             RefPtr<NameResolution> nameResolution = NameResolution::create(workerRunLoop);
2631
2632             //  Internally nameResolution will do workerRunLoop.postTaskForMode(task, "MyCoolMode")
2633             //  for any tasks that need to be run during this loop.
2634             nameResolution->setTaskMode("MyCoolMode");
2635
2636             nameResolution->start();
2637             while (!nameResolution->done()) {
2638                 // Only tasks which are posted for "MyCoolMode" will run.
2639                 workerRunLoop.runInMode(context, "MyCoolMode");
2640             }
2641
2642         No observable change in behavior, so no test.
2643
2644         * dom/WorkerRunLoop.cpp:
2645         (WebCore::ModePredicate::ModePredicate):
2646         (WebCore::ModePredicate::operator()):
2647         (WebCore::WorkerRunLoop::WorkerRunLoop):
2648         (WebCore::WorkerRunLoop::~WorkerRunLoop):
2649         (WebCore::WorkerRunLoop::setSharedTimer):
2650         (WebCore::WorkerRunLoop::resetSharedTimer):
2651         (WebCore::WorkerRunLoop::run):
2652         (WebCore::WorkerRunLoop::runInMode):
2653         (WebCore::WorkerRunLoop::postTask):
2654         (WebCore::WorkerRunLoop::postTaskForMode):
2655         * dom/WorkerRunLoop.h:
2656         (WebCore::WorkerRunLoop::Task::create):
2657         (WebCore::WorkerRunLoop::Task::mode):
2658         (WebCore::WorkerRunLoop::Task::performTask):
2659         (WebCore::WorkerRunLoop::Task::Task):
2660
2661 2009-02-19  Dimitri Glazkov  <dglazkov@chromium.org>
2662
2663         Reviewed by Eric Seidel.
2664
2665         https://bugs.webkit.org/show_bug.cgi?id=24034
2666         Fix up Selection->VisibleSelection change.
2667
2668         * page/chromium/EventHandlerChromium.cpp:
2669         (WebCore::EventHandler::passMousePressEventToSubframe): Renamed Selection
2670         to VisibleSelection.
2671
2672 2009-02-19  Dimitri Glazkov  <dglazkov@chromium.org>
2673
2674         Reviewed by Eric Seidel.
2675
2676         https://bugs.webkit.org/show_bug.cgi?id=24041
2677         Correct Skia type conversion issues, fix Chromium Linux build.
2678
2679         * platform/graphics/chromium/FontLinux.cpp:
2680         (WebCore::Font::drawGlyphs): changed parameters to RGBA32, not WebCore::Color.
2681
2682 2009-02-19  Jungshik Shin <jshin@chromium.org>
2683
2684         Reviewed by Eric Seidel.
2685
2686         https://bugs.webkit.org/show_bug.cgi?id=20531
2687         Chromium-part follow-up to the patch landed in r40636
2688         for bug 20531.
2689         Remove a static member function alternateFamilyName
2690         from Chromium's Win/Linux ports of FontCache. In r40636,
2691         alternateFamilyName was customized using #ifdef PLATFORM(WIN_OS).
2692         So, there's no more need for the static member function per
2693         platform.
2694
2695         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2696         * platform/graphics/chromium/FontCacheLinux.cpp:
2697
2698 2009-02-19  Simon Fraser  <simon.fraser@apple.com>
2699
2700         Reviewed by Adele Peterson.
2701
2702         Call documentWillBecomeInactive() from Document::detach to ensure that
2703         media elements are shut down, because they may be kept alive by references
2704         from JS past document teardown.
2705
2706         documentWillBecomeInactive() calls  renderView()->willMoveOffscreen(), so no
2707         need to do that in detach() as well.
2708
2709         We no longer need to call documentWillBecomeInactive() from ~Page() (which
2710         was added for <https://bugs.webkit.org/show_bug.cgi?id=21116>), since this
2711         supersedes that change.
2712
2713         * dom/Document.cpp:
2714         (WebCore::Document::detach):
2715         * page/Page.cpp:
2716         (WebCore::Page::~Page):
2717
2718 2009-02-19  Dimitri Glazkov  <dglazkov@chromium.org>
2719
2720         Reviewed by Eric Seidel.
2721
2722         https://bugs.webkit.org/show_bug.cgi?id=24028
2723         Fix up Skia path changes.
2724
2725         * platform/graphics/skia/GraphicsContextSkia.cpp:
2726         (WebCore::GraphicsContext::strokePath): Removed illegal indirection.
2727         * platform/graphics/skia/PathSkia.cpp:
2728         (WebCore::boundingBoxForCurrentStroke): Changed call name.
2729
2730 2009-02-19  Gustavo Noronha Silva  <gns@gnome.org>
2731
2732         Reviewed by Alexey Proskuryakov.
2733
2734         Ignore ports on local URLs. This fixes a regression in
2735         fast/loader/file-URL-with-port-number.html
2736
2737         * platform/network/soup/ResourceHandleSoup.cpp:
2738         (WebCore::ResourceHandle::startGio):
2739
2740 2009-02-19  Gustavo Noronha Silva  <gns@gnome.org>
2741
2742         Reviewed by Alexey Proskuryakov.
2743
2744         https://bugs.webkit.org/show_bug.cgi?id=24011
2745         KURL's setPort doesn't unset port if 0 is given
2746
2747         Make setPort remove port if 0 is given to it, as promised by the
2748         comment in KURL's header.
2749
2750         * platform/KURL.cpp:
2751         (WebCore::KURL::setPort):
2752
2753 2009-02-18  Dan Bernstein  <mitz@apple.com>
2754
2755         Reviewed by Brady Eidson.
2756
2757         - WebCore part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle
2758
2759         The crash results from re-entry into
2760         CSSMutableStyleDeclaration::setCssText, which in turn is caused by
2761         the first style change causing a cached image to load from the memory
2762         cache, causing load delegate dispatch, and iChat's delegate method
2763         calling back into WebKit.
2764
2765         The workaround is to use defer delegate callbacks for memory cache. In
2766         this case, deferring callbacks during image load event dispatch was
2767         found to be sufficient.
2768
2769         The crash is a regression. See also the discussion in
2770         <https://bugs.webkit.org/show_bug.cgi?id=22521>.
2771
2772         * WebCore.base.exp: Added
2773         Settings::setNeedsIChatMemoryCacheCallsQuirk().
2774         * dom/Document.cpp:
2775         (WebCore::Document::dispatchImageLoadEventsNow): If the quirk is
2776         enabled, defer memory cache callbacks during image load event dispatch.
2777         * page/Settings.cpp:
2778         (WebCore::Settings::Settings): Initialize
2779         m_needsIChatMemoryCacheCallsQuirk.
2780         (WebCore::Settings::setNeedsIChatMemoryCacheCallsQuirk): Added this
2781         setter.
2782         * page/Settings.h:
2783         (WebCore::Settings::needsIChatMemoryCacheCallsQuirk): Added this getter.
2784
2785 2009-02-18  Adam Roben  <aroben@apple.com>
2786
2787         Export WebCore::handCursor and Cursor.h
2788
2789         Reviewed by John Sullivan.
2790
2791         * WebCore.base.exp: Added WebCore::handCursor.
2792         * WebCore.xcodeproj/project.pbxproj: Made Cursor.h private.
2793
2794 2009-02-18  Ojan Vafai  <ojan@chromium.org>
2795
2796         Reviewed by Alexey Proskuryakov.
2797
2798         https://bugs.webkit.org/show_bug.cgi?id=23992
2799         REGRESSION: crash on windows loading http://www.stickam.com/liveStreams.do
2800
2801         Unable to reduce to a layout test.
2802
2803         * page/Frame.cpp:
2804         (WebCore::Frame::contentRenderer):
2805
2806 2009-02-18  Evan Stade  <estade@chromium.org>
2807
2808         Reviewed by Eric Seidel.
2809
2810         https://bugs.webkit.org/show_bug.cgi?id=23861
2811         Stroke font outlines on chromium linux
2812
2813         TEST=LayoutTests/svg/custom/pointer-events-text.svg
2814
2815         * platform/graphics/chromium/FontLinux.cpp:
2816         (WebCore::Font::drawGlyphs):
2817
2818 2009-02-18  Evan Stade  <estade@chromium.org>
2819
2820         Reviewed by Eric Seidel.
2821
2822         https://bugs.webkit.org/show_bug.cgi?id=23860
2823         Resync some graphics/skia files with their chromium counterparts
2824
2825         This comes from chromium patches <http://codereview.chromium.org/17633>
2826         and <http://codereview.chromium.org/17454>
2827
2828         * platform/graphics/skia/GraphicsContextSkia.cpp:
2829         (WebCore::GraphicsContext::clipPath):
2830         (WebCore::GraphicsContext::fillPath):
2831         * platform/graphics/skia/PlatformContextSkia.cpp:
2832         (PlatformContextSkia::addPath):
2833         (PlatformContextSkia::currentPath):
2834         * platform/graphics/skia/PlatformContextSkia.h:
2835
2836 2009-02-18  Gustavo Noronha Silva  <gns@gnome.org>
2837
2838         Unreviewed.
2839
2840         Build fix after r41060.
2841
2842         * GNUmakefile.am:
2843
2844 2009-02-18  Dimitri Glazkov  <dglazkov@chromium.org>
2845
2846         Reviewed by Eric Seidel.
2847
2848         https://bugs.webkit.org/show_bug.cgi?id=24005
2849         Add an include to fix Chromium build.
2850
2851         * page/animation/AnimationController.cpp: Add UnusedParam.h include.
2852
2853 2009-02-18  Gustavo Noronha Silva  <gns@gnome.org>
2854
2855         Reviewed by Holger Freyther.
2856
2857         Fix symbols.filter location, and add other missing files to the
2858         autotools build, so that make dist works.
2859
2860         * GNUmakefile.am:
2861
2862 2009-02-18  Zan Dobersek  <zandobersek@gmail.com>
2863
2864         Rubber-stamped by Holger Hans Peter Freyther.
2865
2866         Allow POST method for local requests.
2867
2868         * platform/network/soup/ResourceHandleSoup.cpp:
2869         (WebCore::ResourceHandle::startGio):
2870
2871 2009-02-18  Gustavo Noronha Silva  <gns@gnome.org>
2872
2873         Reviewed by Holger Hans Peter Freyther.
2874
2875         Use KURL in startGio instead of passing a string with the URL, so
2876         that we can handle removing refs and queries more elegantly. This
2877         is fixing more regressions that came from the curl->soup switch.
2878
2879         Original work by Zan Dobersek.
2880
2881         * platform/network/ResourceHandle.h:
2882         * platform/network/soup/ResourceHandleSoup.cpp:
2883         (WebCore::ResourceHandle::start):
2884         (WebCore::ResourceHandle::startGio):
2885
2886 2009-02-18  Holger Hans Peter Freyther  <zecke@selfish.org>
2887
2888         Reviewed by Alexey Proskuryakov.
2889
2890         Implement ResourceHandle::loadResourceSynchronously in ResourceHandleSoup.cpp
2891
2892         The implementation is needed to have synchronous loading, e.g. for
2893         JavaScript interaction. This is fixing various regressions that
2894         came from the curl->soup switch.
2895
2896         * platform/network/soup/ResourceHandleSoup.cpp:
2897         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
2898         (WebCore::WebCoreSynchronousLoader::~WebCoreSynchronousLoader):
2899         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
2900         (WebCore::WebCoreSynchronousLoader::didReceiveData):
2901         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
2902         (WebCore::WebCoreSynchronousLoader::didFail):
2903         (WebCore::WebCoreSynchronousLoader::run):
2904         (WebCore::ResourceHandle::loadResourceSynchronously):
2905
2906 2009-02-18  Xan Lopez  <xan@gnome.org>
2907
2908         Reviewed by Mark Rowe.
2909
2910         https://bugs.webkit.org/show_bug.cgi?id=23989
2911
2912         Based on a patch by Bo Yang  <techrazy.yang@gmail.com>
2913
2914         Make the cursor cache global, that's all we really need and
2915         otherwise we can miss cursor transitions in some situations (see
2916         the bug for one testcase). Also remove some now useless code.
2917
2918         * platform/Widget.h:
2919         * platform/gtk/WidgetGtk.cpp:
2920         (WebCore::Widget::Widget):
2921         (WebCore::Widget::~Widget):
2922         (WebCore::Widget::setCursor):
2923
2924 2009-02-17  Adam Roben  <aroben@apple.com>
2925
2926         Windows build fix
2927
2928         * loader/FrameLoader.cpp:
2929         (WebCore::toPlugInElement): Don't rely on #if being processed before
2930         ASSERT.
2931
2932 2009-02-17  David Levin  <levin@chromium.org>
2933
2934         Reviewed by Alexey Proskuryakov.
2935
2936         Bug 23977: Unnecessary timer related headers in files.
2937         <https://bugs.webkit.org/show_bug.cgi?id=23977>
2938
2939         No observable change in behavior, so no test.
2940
2941         * dom/Document.cpp:
2942         * dom/WorkerRunLoop.cpp:
2943         * dom/WorkerRunLoop.h:
2944
2945 2009-02-17  Peter Abrahamsen  <rainhead@gmail.com>
2946
2947         Reviewed by Sam Weinig.
2948
2949         https://bugs.webkit.org/show_bug.cgi?id=23958
2950         <rdar://problem/6587815>
2951
2952         Updated XMLHttpRequest with new header names from the latest Access
2953         Control draft: http://www.w3.org/TR/access-control/
2954         - Access-Control-Origin becomes Access-Control-Allow-Origin
2955         - Access-Control-Credentials becomes Access-Control-Allow-Credentials
2956
2957         * xml/XMLHttpRequest.cpp:
2958         (WebCore::XMLHttpRequest::accessControlCheck):
2959
2960 2009-02-17  Kevin Ollivier  <kevino@theolliviers.com>
2961
2962         wx build fix. Add missing constructor used for empty values.
2963
2964         * platform/graphics/wx/FontPlatformData.h:
2965         (WebCore::FontPlatformData::FontPlatformData):
2966
2967 2009-02-17  Antti Koivisto  <antti@apple.com>
2968
2969         Reviewed by Dave Kilzer.
2970
2971         <rdar://problem/6592446> dynamically updating page doesn't seem to draw when updated
2972
2973         Need update after callback.
2974
2975         * bindings/js/JSCustomPositionCallback.cpp:
2976         (WebCore::JSCustomPositionCallback::handleEvent):
2977         * bindings/js/JSCustomPositionErrorCallback.cpp:
2978         (WebCore::JSCustomPositionErrorCallback::handleEvent):
2979
2980 2009-02-17  Eric Carlson  <eric.carlson@apple.com>
2981
2982         Reviewed by Antti Koivisto.
2983
2984         https://bugs.webkit.org/show_bug.cgi?id=23917
2985         Allow a WebKit plug-in to act as a proxy for the <audio> and <video>
2986         element.
2987
2988         * DerivedSources.make: add media element proxy exports to .exp file when feature is defined.
2989
2990         * WebCore.VideoProxy.exp: New, define the informal protocol exported by a media element proxy.
2991
2992         * WebCore.xcodeproj/project.pbxproj: Add MediaPlayerProxy.h.
2993
2994         * html/HTMLMediaElement.cpp:
2995         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_needWidgetUpdate.
2996         (WebCore::HTMLMediaElement::attributeChanged): Don't detach+attach when PLUGIN_PROXY_FOR_VIDEO, the
2997         proxy plug-in handles the poster frame.
2998         (WebCore::HTMLMediaElement::rendererIsNeeded): New logic for PLUGIN_PROXY_FOR_VIDEO.
2999         (WebCore::HTMLMediaElement::createRenderer): Create RenderPartObject when PLUGIN_PROXY_FOR_VIDEO.
3000         (WebCore::HTMLMediaElement::attach): Set m_needWidgetUpdate when PLUGIN_PROXY_FOR_VIDEO
3001         (WebCore::HTMLMediaElement::load): Don't reallocate MediaPlayer when PLUGIN_PROXY_FOR_VIDEO, we keep the
3002         same plug-in for the life of the element.
3003         (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged): update m_networkState when media player
3004         network state changes to EMPTY, otherwise we can get out of sync with engine.
3005         (WebCore::HTMLMediaElement::defaultEventHandler): pass event to widget when PLUGIN_PROXY_FOR_VIDEO
3006         (WebCore::HTMLMediaElement::deliverNotification): New, deliver notification from proxy plug-in to
3007         media player.
3008         (WebCore::HTMLMediaElement::setMediaPlayerProxy): New, pass proxy object to media player.
3009         (WebCore::HTMLMediaElement::initialURL): New, return the url from the "src" attr or the appropriate
3010         <source> element to be used as the initial url for the proxy.
3011         (WebCore::HTMLMediaElement::finishParsingChildren): New, allocate MediaPlayer and update widget.
3012         * html/HTMLMediaElement.h: Declare new methods for proxy, add m_needWidgetUpdate.
3013         (WebCore::HTMLMediaElement::setNeedWidgetUpdate):
3014
3015         * html/HTMLVideoElement.cpp:
3016         (WebCore::HTMLVideoElement::attach): Poster image is handled by proxy when PLUGIN_PROXY_FOR_VIDEO.
3017         (WebCore::HTMLVideoElement::parseMappedAttribute): Ditto.
3018         * html/HTMLVideoElement.h:
3019
3020         * loader/FrameLoader.cpp:
3021         (WebCore::toPlugInElement): Allow cast if element is <video> or <audio>
3022
3023         * platform/graphics/MediaPlayer.cpp:
3024         (WebCore::MediaPlayer::MediaPlayer): Remove white space.
3025         (WebCore::MediaPlayer::setPoster): New, forward call to private player.
3026         (WebCore::MediaPlayer::deliverNotification): Ditto.
3027         (WebCore::MediaPlayer::setMediaPlayerProxy): Ditto.
3028         * platform/graphics/MediaPlayer.h:
3029         (WebCore::MediaPlayer::mediaPlayerClient):
3030
3031         * platform/graphics/mac/MediaPlayerProxy.h: New, defines media player proxy interface.
3032
3033         * rendering/RenderPart.cpp:
3034         (WebCore::RenderPart::RenderPart): Change constructor to take Element* instead of Node* as a
3035         non-element node doesn't need a renderer
3036         * rendering/RenderPart.h: Ditto.
3037
3038         * rendering/RenderPartObject.cpp:
3039         (WebCore::RenderPartObject::RenderPartObject): Ditto.
3040         (WebCore::RenderPartObject::updateWidget): Package params for proxy plug-in when element is
3041         <video> or <audio>.
3042         * rendering/RenderPartObject.h:
3043
3044 2009-02-17  David Hyatt  <hyatt@apple.com>
3045
3046         Reviewed by Eric Seidel
3047
3048         Fix for https://bugs.webkit.org/show_bug.cgi?id=23985
3049
3050         Don't allow legends to be anything but display:block.
3051
3052         Added fast/forms/inline-ignored-on-legend.html
3053
3054         * GNUmakefile.am:
3055         * WebCore.pro:
3056         * WebCore.vcproj/WebCore.vcproj:
3057         * WebCore.xcodeproj/project.pbxproj:
3058         * WebCoreSources.bkl:
3059         * css/html4.css:
3060         * html/HTMLLegendElement.cpp:
3061         * html/HTMLLegendElement.h:
3062         * rendering/RenderLegend.cpp: Removed.
3063         * rendering/RenderLegend.h: Removed.
3064         * wml/WMLInsertedLegendElement.cpp:
3065         * wml/WMLInsertedLegendElement.h:
3066
3067 2009-02-13  Brett Wilson  <brettw@dhcp-172-22-71-167.mtv.corp.google.com>
3068
3069         Reviewed by Simon Fraser.
3070
3071         https://bugs.webkit.org/attachment.cgi?id=27666
3072         Fix Chromium build build: forgotten include in RenderObject, sync
3073         RenderTheme to the recent changes in RenderObject.
3074
3075         * rendering/RenderObject.cpp:
3076         * rendering/RenderThemeChromiumMac.mm:
3077         (WebCore::RenderThemeChromiumMac::updatePressedState):
3078
3079 2009-02-17  Gustavo Noronha Silva  <gns@gnome.org>
3080
3081         Reviewed by Darin Adler.
3082
3083         https://bugs.webkit.org/show_bug.cgi?id=22966
3084         crash when destroying a webview that opened a page containing <script>
3085         tags
3086
3087         Fix m_group being set to 0 instead of to m_singlePageGroup when
3088         GroupName is set to empty
3089
3090         * page/Page.cpp:
3091         (WebCore::Page::setGroupName):
3092
3093 2009-02-16  Beth Dakin  <bdakin@apple.com>
3094
3095         Reviewed by Sam Weinig.
3096
3097         Fix for <rdar://problem/6386623>
3098
3099         I made m_numParsedProperties and m_maxParsedProperties unsigned
3100         instead of int, and then added an early return from addPropery() if
3101         m_maxParsedProperties exceeds the max value.
3102
3103         * css/CSSParser.cpp:
3104         (WebCore::CSSParser::addProperty):
3105         (WebCore::CSSParser::rollbackLastProperties):
3106         (WebCore::CSSParser::clearProperties):
3107         (WebCore::CSSParser::createFontFaceRule):
3108         (WebCore::CSSParser::deleteFontFaceOnlyValues):
3109         * css/CSSParser.h:
3110
3111 2009-02-16  Justin Garcia  <justin.garcia@apple.com>
3112
3113         Reviewed by Mark Rowe.
3114
3115         https://bugs.webkit.org/show_bug.cgi?id=16309
3116         HTML5: The third execCommand argument for insert{un}orderedlist should be ignored
3117
3118         When we originally implemented this command, MSDN documentation said that IE set the
3119         id attribute of inserted lists to the third argument to execCommand, but IE doesn't
3120         do this nor do any other browsers.
3121
3122         * editing/EditorCommand.cpp:
3123         (WebCore::executeInsertOrderedList):
3124         (WebCore::executeInsertUnorderedList):
3125         * editing/IndentOutdentCommand.cpp:
3126         (WebCore::IndentOutdentCommand::outdentParagraph):
3127         * editing/InsertListCommand.cpp:
3128         (WebCore::InsertListCommand::insertList):
3129         (WebCore::InsertListCommand::InsertListCommand):
3130         (WebCore::InsertListCommand::doApply):
3131         * editing/InsertListCommand.h:
3132         (WebCore::InsertListCommand::create):
3133
3134 2009-02-16  Dan Bernstein  <mitz@apple.com>
3135
3136         Reviewed by Geoffrey Garen.
3137
3138         - fix <rdar://problem/6561077> REGRESSION (r39634): Unable to select an item in stocks widget with the mouse
3139
3140         Test: platform/mac/fast/events/pointer-events-dashboard.html
3141
3142         * css/CSSStyleSelector.cpp:
3143         (WebCore::CSSStyleSelector::applyProperty): Do not apply the
3144         pointer-events property in Dashboard backwards compatibility mode,
3145         in order to work around misuse of that property by the Stocks widget.
3146
3147 2009-02-16  Justin Garcia  <justin.garcia@apple.com>
3148
3149         Reviewed by Eric Seidel.
3150
3151         https://bugs.webkit.org/show_bug.cgi?id=15381
3152         execCommand justify modifies the contentEditable node
3153
3154         * editing/CompositeEditCommand.cpp:
3155         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Avoid modifying not just
3156         the body element, but any root editable element.
3157
3158 2009-02-16  Chris Fleizach  <cfleizach@apple.com>
3159
3160         Reviewed by Adele Peterson.
3161
3162         Bug 23979: AX: alt tag not returned for <input type="image">
3163         https://bugs.webkit.org/show_bug.cgi?id=23979
3164
3165         Test: accessibility/input-image-alt.html
3166
3167         * page/AccessibilityRenderObject.cpp:
3168         (WebCore::AccessibilityRenderObject::accessibilityDescription):
3169
3170 2009-02-16  Kevin Watters  <kevinwatters@gmail.com>
3171
3172         Reviewed by Kevin Ollivier.
3173
3174         The ref data is not properly set unless we use the CreateMatrix function.
3175
3176         https://bugs.webkit.org/show_bug.cgi?id=23978
3177
3178         * platform/graphics/wx/TransformationMatrixWx.cpp:
3179         (WebCore::TransformationMatrix::operator wxGraphicsMatrix):
3180
3181 2009-02-16  Dan Bernstein  <mitz@apple.com>
3182
3183         Reviewed by John Sullivan.
3184
3185         - fix <rdar://problem/6516829> FontPlatformData constructor passes NULL to CTFontCopyGraphicsFont and CTFontGetPlatformFont
3186
3187         * platform/graphics/FontCache.cpp:
3188         (WebCore::FontDataCacheKeyTraits::emptyValue): Changed to use the
3189         FontPlatformData(float, bool, bool) constructor.
3190         * platform/graphics/mac/FontCacheMac.mm:
3191         (WebCore::FontCache::createFontPlatformData): Changed to pass a valid
3192         NSFont to the FontPlatformData constructor, instead of implicitly
3193         passing 0 and then calling setFont().
3194         * platform/graphics/mac/FontPlatformData.h: Made the NSFont parameter
3195         of the constructor mandatory.
3196
3197 2009-02-15  David Kilzer  <ddkilzer@apple.com>
3198
3199         Move duplicate caretWidth constants to RenderObject.h
3200
3201         Reviewed by Dan Bernstein.
3202
3203         No test since no change in behavior.
3204
3205         * rendering/RenderBlock.cpp:
3206         (WebCore::RenderBlock::localCaretRect): Removed caretWidth.
3207         * rendering/RenderBox.cpp:
3208         (WebCore::RenderBox::localCaretRect): Ditto.
3209         * rendering/RenderObject.h: Added caretWidth definition.
3210         * rendering/RenderText.cpp:
3211         (WebCore::RenderText::localCaretRect): Removed caretWidth.
3212
3213 2009-02-13  Dimitri Glazkov  <dglazkov@chromium.org>
3214
3215         Reviewed by Eric Seidel.
3216
3217         https://bugs.webkit.org/show_bug.cgi?id=23955
3218         V8HTMLPlugInCustom returns undefined, which fools interceptors.
3219
3220         * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
3221         (WebCore::NAMED_PROPERTY_GETTER): Use deferToInterceptor() return value.
3222         (WebCore::NAMED_PROPERTY_SETTER): Ditto.
3223         (WebCore::INDEXED_PROPERTY_GETTER): Ditto.
3224         (WebCore::INDEXED_PROPERTY_SETTER): Ditto.
3225
3226 2009-02-13  Dimitri Glazkov  <dglazkov@chromium.org>
3227
3228         Reviewed by Eric Seidel.
3229
3230         https://bugs.webkit.org/show_bug.cgi?id=23954
3231         Add V8 custom bindings for CanvasRenderingContext2D.
3232
3233         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: Added.
3234         (WebCore::toV8):
3235         (WebCore::toCanvasStyle):
3236         (WebCore::ACCESSOR_GETTER):
3237         (WebCore::ACCESSOR_SETTER):
3238
3239 2009-02-13  Anders Carlsson  <andersca@apple.com>
3240
3241         Reviewed by Darin Adler and Dan Bernstein.
3242
3243         <rdar://problem/6583187>
3244
3245         * page/NavigatorBase.cpp:
3246         Handle PPC64 and X86_64 as well.
3247
3248 2009-02-13  Darin Adler  <darin@apple.com>
3249
3250         Reviewed by Mark Rowe.
3251
3252         Fix broken tokenizer regression test that reflected a lifetime bug
3253         in the document.write optimization. The test failure was trivial to
3254         reproduce in COLLECT_ON_EVERY_ALLOCATION mode.
3255
3256         * bindings/js/JSHTMLDocumentCustom.cpp:
3257         (WebCore::documentWrite): Convert strings to String rather than passing
3258         the pointer and length to SegmentedString. The optimization is thus
3259         mostly gone. However, there are two ways to bring it back: 1) Apply
3260         the patch that makes UString and String share the same buffers.
3261         2) Add a UString feature to SegmentedString; simple to do but might
3262         risk slowing down normal document parsing.
3263
3264 2009-02-13  Adam Treat  <adam.treat@torchmobile.com>
3265
3266         Caught by Darin Adler.
3267
3268         No reason to check m_tokenizer twice for 0 in a row.
3269
3270         * dom/Document.cpp:
3271         (WebCore::Document::write):
3272
3273 2009-02-13  Lyon Chen  <lyon.chen@torchmobile.com>
3274
3275         Reviewed by Dave Hyatt.
3276
3277         Take into account y() + height() when calculating getLowerRightCorner.
3278
3279         * dom/ContainerNode.cpp:
3280         (WebCore::ContainerNode::getLowerRightCorner):
3281
3282 2009-02-13  Antti Koivisto  <antti@apple.com>
3283
3284         Reviewed by Dave Hyatt.
3285
3286         Most of this code was in RenderBox, restore the copyright lines.
3287
3288         * rendering/RenderBoxModelObject.cpp:
3289         * rendering/RenderBoxModelObject.h:
3290
3291 2009-02-13  David Hyatt  <hyatt@apple.com>
3292
3293         Get rid of printBoxDecorations, since it is dead code.
3294
3295         Reviewed by Dan Bernstein
3296
3297         * rendering/RenderObject.h:
3298
3299 2009-02-13  Adam Treat  <adam.treat@torchmobile.com>
3300
3301         Reviewed by Darin Adler.
3302
3303         https://bugs.webkit.org/show_bug.cgi?id=23952
3304         Add Document::write overload which takes a SegmentedString since this
3305         is what the tokenizer expects anyway.  Modified JSHTMLDocument so it once
3306         again calls Document::write instead of injecting the string directly into
3307         the tokenizer.  This ensures that all document.write's are funneled through
3308         one method again, but should still be just as fast for JSHTMLDocumentCustom.
3309
3310         * bindings/js/JSHTMLDocumentCustom.cpp:
3311         (WebCore::documentWrite):
3312         * dom/Document.cpp:
3313         (WebCore::Document::write):
3314         * dom/Document.h:
3315
3316 2009-02-13  David Hyatt  <hyatt@apple.com>
3317
3318         Reviewed by Simon Fraser
3319
3320         Remove updateWidgetPosition on RenderObject.  Change RenderView's set of widgets
3321         to have a tighter type: RenderWidget instead of RenderObject.  Devirtualize
3322         updateWidgetPosition, since all RenderWidgets (except for applets) are now
3323         RenderParts also.
3324
3325         * rendering/RenderObject.cpp:
3326         * rendering/RenderObject.h:
3327         * rendering/RenderPart.cpp:
3328         * rendering/RenderPart.h:
3329         * rendering/RenderView.cpp:
3330         (WebCore::RenderView::updateWidgetPositions):
3331         (WebCore::RenderView::addWidget):
3332         (WebCore::RenderView::removeWidget):
3333         * rendering/RenderView.h:
3334         * rendering/RenderWidget.cpp:
3335         (WebCore::RenderWidget::updateWidgetPosition):
3336         * rendering/RenderWidget.h:
3337
3338 2009-02-13  David Hyatt  <hyatt@apple.com>
3339
3340         Reviewed by Eric Seidel
3341
3342         Remove isEditable() on RenderObject.  It is dead code.
3343
3344         * rendering/RenderObject.cpp:
3345         * rendering/RenderObject.h:
3346
3347 2009-02-13  David Hyatt  <hyatt@apple.com>
3348
3349         Reviewed by Eric Seidel
3350
3351         Add isTextControl() to RenderObject.  Patch call sites thats asked isTextField() || isTextArea() to just use
3352         isTextControl() instead.
3353
3354         Add a toRenderTextControl converter for doing checked casting to RenderTextControls.
3355
3356         * dom/Document.cpp:
3357         (WebCore::Document::setFocusedNode):
3358         * dom/InputElement.cpp:
3359         (WebCore::InputElement::updateSelectionRange):
3360         * editing/ReplaceSelectionCommand.cpp:
3361         (WebCore::ReplacementFragment::ReplacementFragment):
3362         * editing/TextIterator.cpp:
3363         (WebCore::TextIterator::handleReplacedElement):
3364         * html/HTMLInputElement.cpp:
3365         (WebCore::HTMLInputElement::selectionStart):
3366         (WebCore::HTMLInputElement::selectionEnd):
3367         (WebCore::HTMLInputElement::setSelectionStart):
3368         (WebCore::HTMLInputElement::setSelectionEnd):
3369         (WebCore::HTMLInputElement::select):
3370         (WebCore::HTMLInputElement::defaultEventHandler):
3371         (WebCore::HTMLInputElement::selection):
3372         * html/HTMLTextAreaElement.cpp:
3373         (WebCore::HTMLTextAreaElement::selectionStart):
3374         (WebCore::HTMLTextAreaElement::selectionEnd):
3375         (WebCore::HTMLTextAreaElement::setSelectionStart):
3376         (WebCore::HTMLTextAreaElement::setSelectionEnd):
3377         (WebCore::HTMLTextAreaElement::select):
3378         (WebCore::HTMLTextAreaElement::setSelectionRange):
3379         (WebCore::HTMLTextAreaElement::appendFormData):
3380         (WebCore::HTMLTextAreaElement::updateValue):
3381         (WebCore::HTMLTextAreaElement::selection):
3382         * page/AccessibilityRenderObject.cpp:
3383         (WebCore::AccessibilityRenderObject::isNativeTextControl):
3384         (WebCore::AccessibilityRenderObject::text):
3385         (WebCore::AccessibilityRenderObject::selectedText):
3386         (WebCore::AccessibilityRenderObject::selectedTextRange):
3387         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
3388         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
3389         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
3390         (WebCore::AccessibilityRenderObject::observableObject):
3391         * page/Frame.cpp:
3392         (WebCore::Frame::notifyRendererOfSelectionChange):
3393         * rendering/RenderObject.h:
3394         (WebCore::RenderObject::isTextControl):
3395         (WebCore::objectIsRelayoutBoundary):
3396         * rendering/RenderTextControl.h:
3397         (WebCore::RenderTextControl::isTextControl):
3398         (WebCore::toRenderTextControl):
3399         * rendering/TextControlInnerElements.cpp:
3400         (WebCore::TextControlInnerTextElement::defaultEventHandler):
3401         * wml/WMLInputElement.cpp:
3402         (WebCore::WMLInputElement::select):
3403         (WebCore::WMLInputElement::defaultEventHandler):
3404         (WebCore::WMLInputElement::isConformedToInputMask):
3405
3406 2009-02-13  David Hyatt  <hyatt@apple.com>
3407
3408         Get rid of isEdited/setEdited on RenderObject.  Devirtualize isEdited/setEdited on RenderTextControl.
3409         Callers were already asking if the renderer was a text field (or a text area), so it was especially
3410         pointless to waste a second virtual function call after making one just to determine the object type.
3411
3412         Reviewed by Simon Fraser
3413
3414         * dom/Document.cpp:
3415         (WebCore::Document::setFocusedNode):
3416         * html/HTMLInputElement.cpp:
3417         (WebCore::HTMLInputElement::defaultEventHandler):
3418         * rendering/RenderObject.h:
3419         * rendering/RenderTextControl.h:
3420         (WebCore::RenderTextControl::isEdited):
3421         (WebCore::RenderTextControl::setEdited):
3422
3423 2009-02-13  Scott Violet  <sky@google.com>
3424
3425         Reviewed by Eric Seidel.
3426
3427         https://bugs.webkit.org/show_bug.cgi?id=23934
3428         Skia platform doesn't render text decoration shadows.
3429
3430         Makes Skia render text decoration shadows correctly. We weren't
3431         preparing the SkPaint correctly and didn't have a couple of checks
3432         CG has. Additionally makes the fillColor/strokeColor methods
3433         consistent.
3434
3435         This behavior is covered by existing layout tests (see bug for list).
3436
3437         * platform/graphics/chromium/FontChromiumWin.cpp:
3438         (WebCore::Font::drawGlyphs):
3439         (WebCore::Font::drawComplexText):
3440         * platform/graphics/skia/GraphicsContextSkia.cpp:
3441         (WebCore::GraphicsContext::drawLineForText):
3442         * platform/graphics/skia/PlatformContextSkia.cpp:
3443         (PlatformContextSkia::effectiveFillColor):
3444         (PlatformContextSkia::effectiveStrokeColor):
3445         * platform/graphics/skia/PlatformContextSkia.h:
3446
3447 2009-02-12  Darin Fisher  <darin@chromium.org>
3448
3449         Reviewed by Eric Seidel.
3450
3451         https://bugs.webkit.org/show_bug.cgi?id=23944
3452         KURLGoogle's pre-parsed canonicalSpec constructor should take a CString
3453
3454         * platform/KURL.h:
3455         * platform/KURLGoogle.cpp:
3456         (WebCore::KURLGooglePrivate::setUtf8):
3457         (WebCore::KURLGooglePrivate::setAscii):
3458         (WebCore::KURLGooglePrivate::init):
3459         (WebCore::KURLGooglePrivate::replaceComponents):
3460         (WebCore::KURL::KURL):
3461         * platform/KURLGooglePrivate.h:
3462
3463 2009-02-13  David Hyatt  <hyatt@apple.com>
3464
3465         Remove leftmost/rightmost/lowestPosition from RenderObject.  They only need to be called on boxes.
3466
3467         Reviewed by Dan Bernstein
3468
3469         * rendering/RenderBlock.cpp:
3470         (WebCore::RenderBlock::lowestPosition):
3471         (WebCore::RenderBlock::rightmostPosition):
3472         (WebCore::RenderBlock::leftmostPosition):
3473         * rendering/RenderLayer.cpp:
3474         (WebCore::RenderLayer::computeScrollDimensions):
3475         * rendering/RenderMedia.cpp:
3476         (WebCore::RenderMedia::lowestPosition):
3477         (WebCore::RenderMedia::rightmostPosition):
3478         (WebCore::RenderMedia::leftmostPosition):
3479         * rendering/RenderObject.h:
3480         * rendering/RenderTableSection.cpp:
3481         (WebCore::RenderTableSection::lowestPosition):
3482         (WebCore::RenderTableSection::rightmostPosition):
3483         (WebCore::RenderTableSection::leftmostPosition):
3484
3485 2009-02-12  Simon Fraser  <simon.fraser@apple.com>
3486
3487         Fix build with ACCELERATED_COMPOSITING turned on.
3488
3489         toRenderBox()->x() asserts for a layer on an inline; use
3490         m_owningLayer->renderBoxX() instead.
3491
3492         * rendering/RenderLayerBacking.cpp:
3493         (WebCore::RenderLayerBacking::paintIntoLayer):
3494
3495 2009-02-12  Darin Adler  <darin@apple.com>
3496
3497         Reviewed by Oliver Hunt.
3498
3499         Speed up document.write a bit.
3500
3501         * bindings/js/JSHTMLDocumentCustom.cpp:
3502         (WebCore::documentWrite): Added. Uses SegmentedString to avoid conversion from
3503         UString to String and to avoid appending strings. Also added code to handle
3504         newlines efficiently.
3505         (WebCore::JSHTMLDocument::write): Changed to use documentWrite.
3506         (WebCore::JSHTMLDocument::writeln): Ditto.
3507
3508         * dom/Document.cpp:
3509         (WebCore::Document::prepareToWrite): Added. Refactored the initialization part
3510         of write into a separate function for use in the JavaScript binding.
3511         (WebCore::Document::write): Changed to call prepareToWrite.
3512
3513         * dom/Document.h: Added declaration for prepareToWrite.
3514
3515 2009-02-13  Prasanth Ullattil  <pullatti@trolltech.com>
3516
3517         Reviewed by Simon Hausmann.
3518
3519         Fixes crash in the Qt port on Windows with comboboxes
3520
3521         The focusWidget in the input context is not reset properly.
3522         The QApplication::setFocusWidget() wont reset the IC if the reason is
3523         PopupFocusReason, this is not ideal. For the time being we are going
3524         to do this from webkit itself.
3525
3526         * platform/qt/QWebPopup.cpp:
3527         (WebCore::QWebPopup::hidePopup):
3528
3529 2009-02-12  Kevin Ollivier  <kevino@theolliviers.com>
3530
3531         wx build fix, typo while tweaking last patch for commit.
3532
3533         * platform/wx/wxcode/gtk/fontprops.cpp:
3534         (GetTextExtent):
3535
3536 2009-02-12  miggilin  <mr.diggilin@gmail.com>
3537
3538         Reviewed by Kevin Ollivier.
3539
3540         Use Cairo/PANGO to fix text measurements and implement proper
3541         non-kerned text drawing on wxGTK.
3542
3543         https://bugs.webkit.org/show_bug.cgi?id=17727
3544
3545         * platform/graphics/GlyphBuffer.h:
3546         * platform/graphics/wx/FontPlatformDataWx.cpp:
3547         (WebCore::fontWeightToWxFontWeight):
3548         * platform/graphics/wx/SimpleFontDataWx.cpp:
3549         (WebCore::SimpleFontData::platformWidthForGlyph):
3550         * platform/wx/wxcode/fontprops.h:
3551         * platform/wx/wxcode/gtk/fontprops.cpp:
3552         (wxFontProperties::wxFontProperties):
3553         (GetTextExtent):
3554         * platform/wx/wxcode/gtk/non-kerned-drawing.cpp:
3555         (WebCore::pangoFontMap):
3556         (WebCore::createPangoFontForFont):
3557         (WebCore::createScaledFontForFont):
3558         (WebCore::pango_font_get_glyph):
3559         (WebCore::drawTextWithSpacing):
3560         * platform/wx/wxcode/non-kerned-drawing.h:
3561
3562 2009-02-12  Chris Marrin  <cmarrin@apple.com>
3563
3564         Reviewed by Simon Fraser
3565
3566         https://bugs.webkit.org/show_bug.cgi?id=23942
3567
3568         Hook up 3D CSS transforms to the accelerated compositor backend.
3569         Not enabled by default.
3570
3571         * page/animation/AnimationBase.cpp:
3572         (WebCore::blendFunc):
3573         (WebCore::ensurePropertyMap):
3574         * page/animation/CompositeAnimation.cpp:
3575         (WebCore::CompositeAnimationPrivate::updateTransitions):
3576         * page/animation/ImplicitAnimation.cpp:
3577         (WebCore::ImplicitAnimation::willNeedService):
3578         * page/animation/KeyframeAnimation.cpp:
3579         (WebCore::KeyframeAnimation::willNeedService):
3580         * platform/graphics/GraphicsLayer.cpp:
3581         (WebCore::GraphicsLayer::TransformValueList::makeFunctionList):
3582         (WebCore::GraphicsLayer::dumpProperties):
3583         * platform/graphics/mac/GraphicsLayerCA.mm:
3584         (WebCore::copyTransform):
3585         (WebCore::getValueFunctionNameForTransformOperation):
3586         (WebCore::GraphicsLayerCA::animateTransform):
3587         * rendering/RenderBox.cpp:
3588         (WebCore::RenderBox::updateBoxModelInfoFromStyle):
3589         * rendering/RenderLayer.cpp:
3590         (WebCore::RenderLayer::updateTransform):
3591         (WebCore::RenderLayer::hasTransformStyle3D):
3592         (WebCore::RenderLayer::hasPerspective):
3593         (WebCore::RenderLayer::perspectiveTransform):
3594         * rendering/RenderLayer.h:
3595         * rendering/RenderLayerBacking.cpp:
3596         (WebCore::RenderLayerBacking::updateGraphicsLayers):
3597         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3598         (WebCore::RenderLayerBacking::computeTransformOrigin):
3599         (WebCore::RenderLayerBacking::computePerspectiveOrigin):
3600         * rendering/RenderLayerBacking.h:
3601         * rendering/RenderLayerCompositor.cpp:
3602         (WebCore::RenderLayerCompositor::has3DContent):
3603         (WebCore::requiresCompositingLayerForTransform):
3604         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
3605         (WebCore::RenderLayerCompositor::layerHas3DContent):
3606         * rendering/RenderLayerCompositor.h:
3607
3608 2009-02-12  David Hyatt  <hyatt@apple.com>
3609
3610         Reviewed by Eric Seidel
3611
3612         Get rid of containingBlockHeight(), since it had only one implementation (despite being virtual) and just returned
3613         containingBlock()->availableHeight().  The latter reads better anyway.  Rename containingBlockWidth() to
3614         containingBlockWidthForContent() and move it to RenderBoxModelObject.
3615
3616         * rendering/RenderBlock.cpp:
3617         (WebCore::RenderBlock::localCaretRect):
3618         * rendering/RenderBox.cpp:
3619         (WebCore::RenderBox::containingBlockWidthForContent):
3620         (WebCore::RenderBox::calcWidth):
3621         (WebCore::RenderBox::calcReplacedWidthUsing):
3622         * rendering/RenderBox.h:
3623         * rendering/RenderBoxModelObject.cpp:
3624         (WebCore::RenderBoxModelObject::relativePositionOffsetX):
3625         (WebCore::RenderBoxModelObject::relativePositionOffsetY):
3626         (WebCore::RenderBoxModelObject::containingBlockWidthForContent):
3627     &n