2008-04-30 Beth Dakin <bdakin@apple.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2008-04-30  Beth Dakin  <bdakin@apple.com>
2
3         Reviewed by Sam Weinig.
4
5         This patch does three things:
6         1. Adds support for the "img" ARIA role
7         2. Switches over to a HashMap for converting ARIA role attributes 
8         to WebCore's AccessibilityRole type. 
9         3. Fixes a crash in the new ARIA code that I ran into while 
10         browsing with VoiceOver enabled.
11
12         * page/AccessibilityObject.cpp:
13         (WebCore::AccessibilityObject::headingLevel): This is the crash 
14         fix. Make sure the node's renderer is not null before looking up 
15         its corresponding AccessibilityObject in the cache.
16         (WebCore::AccessibilityObject::accessibilityIsIgnored): Account for 
17         ARIA images.
18         (WebCore::createARIARoleMap): Switch to HashMap, and add "img" to 
19         the Map.
20         (WebCore::RoleEntry::): Same.
21         (WebCore::ariaRoleToWebCoreRole): Same.
22         (WebCore::AccessibilityObject::ariaRoleAttribute): Same.
23
24 2008-04-30  Rob Buis  <buis@kde.org>
25
26         Reviewed by Nikolas.
27
28         https://bugs.webkit.org/show_bug.cgi?id=16447
29         onload called too many times for <svg:image>
30         https://bugs.webkit.org/show_bug.cgi?id=12282
31         SVG wastes time in malloc to send loadEvents to non-existent listeners
32
33         Postpone load event dispatching for image when externalResourcesRequired
34         is true, delaying parents but not siblings, and make sure the load event
35         is sent once for image in all cases.
36
37         * svg/SVGElement.cpp:
38         (WebCore::hasLoadListener):
39         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
40         * svg/SVGImageElement.cpp:
41         (WebCore::SVGImageElement::haveLoadedRequiredResources):
42         * svg/SVGImageLoader.cpp:
43         (WebCore::SVGImageLoader::dispatchLoadEvent):
44
45 2008-04-30  David Hyatt  <hyatt@apple.com>
46
47         Fix crashes when dynamically removing <video> elements with layers that establish stacking contexts.  This
48         won't typically crash release builds because of arena recycling.
49
50         Reviewed by Dan Bernstein
51         
52         * rendering/RenderLayer.cpp:
53         (WebCore::RenderLayer::~RenderLayer):
54         Make sure to remove the reflection's child layer from its parent.
55
56         * rendering/RenderMedia.cpp:
57         (WebCore::RenderMedia::~RenderMedia):
58         (WebCore::RenderMedia::destroy):
59         (WebCore::RenderMedia::removeChild):
60         * rendering/RenderMedia.h:
61         Adjust the teardown of RenderMedia so that it does all of its teardown inside destroy() (this makes it more
62         like other renderers and doesn't leave you staring at a trashed layer hierarchy in the RenderMedia
63         destructor).
64
65 2008-04-30  Rémi Zara  <remi_zara@mac.com>
66
67         Reviewed by Dave Hyatt.
68
69         fix https://bugs.webkit.org/show_bug.cgi?id=18618
70         <rdar://problem/5876063> REGRESSION (r31823-r31847): Patterns are upside down
71
72         * svg/graphics/cg/SVGPaintServerPatternCg.cpp:
73         (WebCore::patternCallback): flip the y axis when drawing the tile
74
75 2008-04-30  Timothy Hatcher  <timothy@apple.com>
76
77         Fixes an undefined type exception that fires when adding a resource to the inspector
78         that has a MIME type warning.
79
80         Reviewed by Adam Roben.
81
82         * page/inspector/Resource.js:
83         (WebInspector.Resource.prototype._addTip): Call WebInspector.console instead of
84         WebInspector.consolePanel.
85         (WebInspector.Resource.prototype._checkWarning): Ditto.
86
87 2008-04-30  Timothy Hatcher  <timothy@apple.com>
88
89         Fixes the bug where the selected resource would be deselected after
90         changing the sort order in the Resources panel.
91
92         Reviewed by Dan Bernstein.
93
94         * page/inspector/ResourcesPanel.js:
95         (WebInspector.ResourcesPanel.prototype._sortResourcesIfNeeded):
96         Rememebr if the tree element that we are sorting was selected, so
97         the selection can be restored after it is re-inserted. The onSelect
98         is suppressed since we don't need to show the resource again.
99
100 2008-04-29  Timothy Hatcher  <timothy@apple.com>
101
102         Fixes the regression where error bubbles in source views always show
103         "undefined" for the content because the message property on
104         ConsoleMessage was removed. Adds support for a plain text formated
105         message that is stored in the message proeprty.
106
107         Reviewed by Adam Roben.
108
109         * page/inspector/Console.js:
110         (WebInspector.Console.prototype._format): Add a plainText argument that is passed to
111         the formatters.
112         (WebInspector.Console.prototype._formatvalue): Add a plainText argument, and a comment
113         about needing to honor it if the textContent of the output doesn't make sense.
114         (WebInspector.Console.prototype._formatvalue): Ditto.
115         (WebInspector.Console.prototype._formatstring): Ditto.
116         (WebInspector.Console.prototype._formatregexp): Ditto.
117         (WebInspector.Console.prototype._formatarray): Ditto.
118         (WebInspector.Console.prototype._formatnode): Ditto.
119         (WebInspector.Console.prototype._formatobject): Ditto.
120         (WebInspector.Console.prototype._formaterror): Ditto.
121         (WebInspector.ConsoleMessage): Call _format passing true for plainText. Get the 
122         textContnet of the result and assign to the message proeprty. This property is 
123         referenced from the SourceView.
124         (WebInspector.ConsoleMessage.prototype._format): Add a plainText argument. Build the 
125         result element as a local and return it, instead of using formatedMessage directly.
126
127 2008-04-30  Timothy Hatcher  <timothy@apple.com>
128
129         Adds a helper function to convert a JSValueRef to a String.
130
131         Reviewed by Adam Roben.
132
133         * page/InspectorController.cpp:
134         (WebCore::toString): Converts a JSValueRef to a String.
135         (WebCore::search): Use toString.
136         (WebCore::InspectorController::handleException): Ditto.
137
138 2008-04-30  Ariya Hidayat  <ariya.hidayat@trolltech.com>
139
140         Reviewed by Simon.
141         
142         Build the Qt port with SVG Foreign Object support.
143
144         * WebCore.pro:
145
146 2008-04-30  Simon Hausmann  <hausmann@webkit.org>
147
148         Reviewed by Holger.
149
150         Fix null pointer deference triggered by
151         LayoutTests/fast/loader/cancel-load-during-port-block-timer.html
152
153         * platform/network/qt/ResourceHandleQt.cpp:
154         (WebCore::ResourceHandle::cancel): Check m_job before dereferencing.
155
156 2008-04-29  David Hyatt  <hyatt@apple.com>
157
158         Improve the performance of masks by adding code to set more precise clips on the transparency layers
159         used to paint the content under the mask, and then also avoid creating transparency layers for the masks
160         themselves in common cases.
161
162         Reviewed by Dan Bernstein
163
164         * platform/graphics/GraphicsContext.cpp:
165         (WebCore::GraphicsContext::drawTiledImage):
166         Fix a bug in drawTiledImage where the composite mode got lost in the double stretch case for nine piece
167         images.
168
169         * rendering/InlineFlowBox.cpp:
170         (WebCore::InlineFlowBox::paintFillLayers):
171         (WebCore::InlineFlowBox::paintFillLayer):
172         (WebCore::InlineFlowBox::paintMask):
173         Optimize to only push a transparency layer for the mask if multiple images are combining.  Add a new
174         composite operator argument for use when painting fill layers to do direct destination-in compositing while
175         painting images.
176
177
178         * rendering/InlineFlowBox.h:
179         * rendering/RenderBox.cpp:
180         (WebCore::RenderBox::paintMask):
181         (WebCore::RenderBox::paintMaskImages):
182         Optimize to only push a transparency layer for the mask if multiple images are combining.
183
184         (WebCore::RenderBox::maskClipRect):
185         A new method that attempts to compute a precise clip rect for the mask images.
186
187         (WebCore::RenderBox::paintFillLayers):
188         (WebCore::RenderBox::paintFillLayer):
189         (WebCore::RenderBox::paintFillLayerExtended):
190         * rendering/RenderBox.h:
191         Added the composite operator argument to the paintFillLayer methods.
192
193         * rendering/RenderFieldset.cpp:
194         (WebCore::RenderFieldset::paintMask):
195         Call the new base class paintMaskImages method for optimized mask painting.
196
197         * rendering/RenderLayer.cpp:
198         (WebCore::transparencyClipBox):
199         Fix a coordinate space issue with transparencyClipBox when masks were used.  The border box was in the
200         wrong coordinate space.  Moved the code into the layer's boundingBox() method instead.
201
202         (WebCore::RenderLayer::paintLayer):
203         Removed the code that always pushed a transparency layer before painting masks.
204
205         (WebCore::RenderLayer::boundingBox):
206         Call maskClipRect to shrink the bounding box of the layer to fit the mask clip.
207
208         * rendering/RenderObject.cpp:
209         (WebCore::RenderObject::paintNinePieceImage):
210         Added a composite operator argument for direct destination-in painting of nine piece images.
211
212         * rendering/RenderObject.h:
213         (WebCore::RenderObject::maskClipRect):
214         (WebCore::RenderObject::paintFillLayerExtended):
215         Base class stubs for RenderBox-implemented methods.
216
217         * rendering/RenderTable.cpp:
218         (WebCore::RenderTable::paintMask):
219         * rendering/RenderTableCell.cpp:
220         (WebCore::RenderTableCell::paintMask):
221         Modified to call the new paintMaskImages function.
222
223         * svg/graphics/SVGImage.cpp:
224         (WebCore::SVGImage::draw):
225         SVG images now respect composite modes by pushing a transparency layer when the composite mode
226         is anything other than source-over.
227
228 2008-04-30  Ariya Hidayat  <ariya.hidayat@trolltech.com>
229
230         Rubber-stamped by Rob Buis.
231
232         Fixed crash or assertion if SVG_FOREIGN_OBJECT is not enabled
233
234         * svg/SVGUseElement.cpp:
235         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
236
237 2008-04-30  Ariya Hidayat  <ariya.hidayat@trolltech.com>
238
239         Rubber-stamped by Rob Buis.
240
241         Fixed compile, due to API change in XMLSerializer
242
243         * svg/SVGUseElement.cpp:
244         (WebCore::SVGUseElement::buildPendingResource):
245
246 2008-04-30  Rob Buis  <buis@kde.org>
247
248         Reviewed by Eric.
249
250         https://bugs.webkit.org/show_bug.cgi?id=11939
251         Quirksmode: Ignores media types in stylesheet PIs
252
253         Transfer the xml-stylesheet pseudo attribute media to the css
254         stylesheet created from the ProcessingInstruction.
255
256         Tests: fast/css/xml-stylesheet-media-processing.xhtml
257
258         * css/StyleSheet.cpp:
259         (WebCore::StyleSheet::setMedia):
260         * css/StyleSheet.h:
261         * dom/ProcessingInstruction.cpp:
262         (WebCore::ProcessingInstruction::checkStyleSheet):
263         (WebCore::ProcessingInstruction::setCSSStyleSheet):
264         * dom/ProcessingInstruction.h:
265
266 2008-04-29  David D. Kilzer  <ddkilzer@apple.com>
267
268         BUILD FIX for export of WTF::RefCounted<WebCore::FormData>::deref()
269
270         On the buildbot, this is a fatal error:
271
272         ld: symbols names listed in -exported_symbols_list: WebKitBuild/Release/DerivedSources/WebCore/WebCore.exp not in linked objects
273         __ZN3WTF10RefCountedIN7WebCore8FormDataEE5derefEv
274         /usr/bin/libtool: internal link edit command failed
275
276         Newer dev tools only produce a warning:
277
278         ld warning: cannot export hidden symbol __ZN3WTF10RefCountedIN7WebCore8FormDataEE5derefEv from WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/i386/DocumentLoader.o
279
280         * WebCore.base.exp: Remove hidden symbol from export list.
281
282 2008-04-29  David Kilzer  <ddkilzer@apple.com>
283
284         Another BUILD FIX for ENABLE(DASHBOARD_SUPPORT)
285
286         * dom/make_names.pl: Added #if ENABLE(DASHBOARD_SUPPORT) to Dashboard code.
287
288 2008-04-29  David Kilzer  <ddkilzer@apple.com>
289
290         BUILD FIX for ENABLE(DASHBOARD_SUPPORT)
291
292         * DerivedSources.make: Removed duplication of targets for
293         generating CSSPropertyNames.h and CSSValueKeywords.h.
294         * GNUmakefile.am: Ditto.  Added support for ENABLE_DASHBOARD_SUPPORT.
295         * WebCore.pro: Added support for ENABLE_DASHBOARD_SUPPORT.
296         Made both SVG and non-SVG variables of GENERATOR 6-A use new
297         DASHBOARDSUPPORTCSSPROPERTIES variable.
298
299 2008-04-29  Ada Chan  <adachan@apple.com>
300
301         Added missing return.        
302
303         * platform/win/COMPtr.h:
304         (WTF::):
305
306 2008-04-29  Alp Toker  <alp@nuanti.com>
307
308         GTK+ build fix attempt following breakage in r32700 which
309         conditionalised dashboard support.
310
311         * GNUmakefile.am:
312
313 2008-04-29  Adam Roben  <aroben@apple.com>
314
315         Restore the beloved COMPtr::operator&
316
317         * platform/win/COMPtr.h: Removed the HashTableDeletedValueType
318         constructor and isHashTableDeletedValue and hashTableDeletedValue
319         functions.
320         (WTF::): Changed constructDeletedValue to play nicely with
321         COMPtr::operator&.
322
323 2008-04-29  Adam Roben  <aroben@apple.com>
324
325         Fix assertion on launch on Windows
326
327         * platform/graphics/win/FontPlatformData.h: Pass
328         WTF::HashTableDeletedValue to the m_font constructor instead of a
329         bogus -1 value. This is needed because m_font is a RefPtr.
330
331 2008-04-29  Greg Bolsinga  <bolsinga@apple.com>
332
333         Reviewed by Darin.
334
335         Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)
336
337         * DerivedSources.make:
338         * WebCore.DashboardSupport.exp: Added.
339         * WebCore.base.exp:
340         * WebCore.xcodeproj/project.pbxproj:
341         * bindings/js/JSDOMWindowCustom.cpp:
342         (WebCore::JSDOMWindow::setLocation):
343         * css/CSSComputedStyleDeclaration.cpp:
344         (WebCore::):
345         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
346         * css/CSSParser.cpp:
347         (WebCore::CSSParser::parseValue):
348         * css/CSSPrimitiveValue.cpp:
349         (WebCore::CSSPrimitiveValue::cleanup):
350         (WebCore::CSSPrimitiveValue::cssText):
351         * css/CSSPropertyNames.in:
352         * css/CSSStyleSelector.cpp:
353         (WebCore::CSSStyleSelector::applyProperty):
354         * css/DashboardRegion.h:
355         * css/DashboardSupportCSSPropertyNames.in: Added.
356         * dom/DOMImplementation.cpp:
357         (WebCore::DOMImplementation::createDocument):
358         * dom/Document.cpp:
359         (WebCore::Document::Document):
360         (WebCore::Document::importNode):
361         * dom/Document.h:
362         * html/CanvasRenderingContext2D.cpp:
363         (WebCore::CanvasRenderingContext2D::fill):
364         (WebCore::CanvasRenderingContext2D::stroke):
365         (WebCore::CanvasRenderingContext2D::clip):
366         * html/CanvasRenderingContext2D.h:
367         * html/HTMLCanvasElement.cpp:
368         * html/HTMLCanvasElement.h:
369         * page/Chrome.cpp:
370         * page/ChromeClient.h:
371         * page/Frame.cpp:
372         (WebCore::Frame::paint):
373         * page/Frame.h:
374         * page/FrameView.cpp:
375         (WebCore::FrameView::layout):
376         * page/FrameView.h:
377         * page/Settings.cpp:
378         (WebCore::Settings::Settings):
379         * page/Settings.h:
380         * page/mac/EventHandlerMac.mm:
381         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
382         * page/mac/FrameMac.mm:
383         * page/mac/WebDashboardRegion.h:
384         * page/mac/WebDashboardRegion.m:
385         * rendering/RenderLayer.cpp:
386         (WebCore::RenderLayer::scrollToOffset):
387         (WebCore::RenderLayer::setHasHorizontalScrollbar):
388         (WebCore::RenderLayer::setHasVerticalScrollbar):
389         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
390         * rendering/RenderObject.cpp:
391         (WebCore::RenderObject::setStyle):
392         * rendering/RenderObject.h:
393         * rendering/RenderStyle.cpp:
394         (WebCore::StyleRareNonInheritedData::operator==):
395         (WebCore::RenderStyle::diff):
396         * rendering/RenderStyle.h:
397         * xml/XMLHttpRequest.cpp:
398         (WebCore::XMLHttpRequest::send):
399         (WebCore::XMLHttpRequest::setRequestHeader):
400
401 2008-04-29  Adam Roben  <aroben@apple.com>
402
403         Windows build fix
404
405         This removes COMPtr::operator&, which didn't jive with HashTable. It
406         is replaced by COMPtr::adoptionPointer.
407
408         Discussed with Darin Adler and Anders Carlsson.
409
410         * platform/win/COMPtr.h: Replaced operator& with adoptionPointer.
411
412 2008-04-29  David Hyatt  <hyatt@apple.com>
413
414         Implement the new box-reflect property in CSS.  This property enables real-time reflections on
415         objects (yes you can reflect <video>!).
416
417         Reviewed by Dan Bernstein
418
419         Test cases added in fast/reflections/
420
421         * GNUmakefile.am:
422         * WebCore.pro:
423         * WebCore.xcodeproj/project.pbxproj:
424         * WebCoreSources.bkl:
425         * css/CSSComputedStyleDeclaration.cpp:
426         (WebCore::):
427         (WebCore::valueForReflection):
428         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
429         * css/CSSParser.cpp:
430         (WebCore::CSSParser::parseValue):
431         (WebCore::CSSParser::parseReflect):
432         (WebCore::BorderImageParseContext::commitBorderImage):
433         (WebCore::CSSParser::parseBorderImage):
434         (WebCore::parseGradientColorStop):
435         (WebCore::CSSParser::parseTransform):
436         * css/CSSParser.h:
437         * css/CSSPropertyNames.in:
438         * css/CSSReflectValue.cpp: Added.
439         (WebCore::CSSReflectValue::cssText):
440         * css/CSSReflectValue.h: Added.
441         (WebCore::):
442         (WebCore::CSSReflectValue::CSSReflectValue):
443         (WebCore::CSSReflectValue::direction):
444         (WebCore::CSSReflectValue::offset):
445         (WebCore::CSSReflectValue::mask):
446         (WebCore::CSSReflectValue::setDirection):
447         (WebCore::CSSReflectValue::setOffset):
448         (WebCore::CSSReflectValue::setMask):
449         * css/CSSStyleSelector.cpp:
450         (WebCore::CSSStyleSelector::adjustRenderStyle):
451         (WebCore::CSSStyleSelector::applyProperty):
452         (WebCore::CSSStyleSelector::mapNinePieceImage):
453         * css/CSSStyleSelector.h:
454         * rendering/InlineFlowBox.cpp:
455         (WebCore::InlineFlowBox::placeBoxesVertically):
456         (WebCore::InlineFlowBox::paintMask):
457         * rendering/Length.h:
458         (WebCore::Length::calcFloatValue):
459         * rendering/RenderBlock.cpp:
460         (WebCore::RenderBlock::overflowHeight):
461         (WebCore::RenderBlock::overflowWidth):
462         (WebCore::RenderBlock::overflowLeft):
463         (WebCore::RenderBlock::overflowTop):
464         (WebCore::RenderBlock::overflowRect):
465         (WebCore::RenderBlock::layoutBlock):
466         * rendering/RenderBox.cpp:
467         (WebCore::RenderBox::setStyle):
468         (WebCore::RenderBox::paintMask):
469         (WebCore::RenderBox::imageChanged):
470         (WebCore::RenderBox::computeAbsoluteRepaintRect):
471         * rendering/RenderFlexibleBox.cpp:
472         (WebCore::RenderFlexibleBox::layoutBlock):
473         * rendering/RenderLayer.cpp:
474         (WebCore::RenderLayer::RenderLayer):
475         (WebCore::RenderLayer::~RenderLayer):
476         (WebCore::RenderLayer::updateLayerPositions):
477         (WebCore::RenderLayer::enclosingPositionedAncestor):
478         (WebCore::RenderLayer::enclosingTransformedAncestor):
479         (WebCore::RenderLayer::isTransparent):
480         (WebCore::transparencyClipBox):
481         (WebCore::RenderLayer::operator delete):
482         (WebCore::RenderLayer::destroy):
483         (WebCore::RenderLayer::removeOnlyThisLayer):
484         (WebCore::RenderLayer::insertOnlyThisLayer):
485         (WebCore::RenderLayer::paintLayer):
486         (WebCore::RenderLayer::updateZOrderLists):
487         (WebCore::RenderLayer::updateOverflowList):
488         (WebCore::RenderLayer::collectLayers):
489         (WebCore::RenderLayer::shouldBeOverflowOnly):
490         (WebCore::RenderLayer::styleChanged):
491         (WebCore::RenderLayer::reflectionLayer):
492         (WebCore::RenderLayer::createReflection):
493         (WebCore::RenderLayer::updateReflectionStyle):
494         * rendering/RenderLayer.h:
495         (WebCore::RenderLayer::hasReflection):
496         (WebCore::RenderLayer::reflection):
497         (WebCore::RenderLayer::paintingInsideReflection):
498         * rendering/RenderObject.cpp:
499         (WebCore::RenderObject::RenderObject):
500         (WebCore::RenderObject::requiresLayer):
501         (WebCore::RenderObject::setStyle):
502         (WebCore::RenderObject::updateImage):
503         (WebCore::RenderObject::reflectionBox):
504         (WebCore::RenderObject::reflectionOffset):
505         * rendering/RenderObject.h:
506         (WebCore::RenderObject::hasTransform):
507         (WebCore::RenderObject::setHasReflection):
508         (WebCore::RenderObject::hasReflection):
509         * rendering/RenderReplica.cpp: Added.
510         (WebCore::RenderReplica::RenderReplica):
511         (WebCore::RenderReplica::~RenderReplica):
512         (WebCore::RenderReplica::layout):
513         (WebCore::RenderReplica::calcPrefWidths):
514         (WebCore::RenderReplica::paint):
515         * rendering/RenderReplica.h: Added.
516         (WebCore::RenderReplica::renderName):
517         (WebCore::RenderReplica::requiresLayer):
518         * rendering/RenderStyle.cpp:
519         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
520         (WebCore::StyleRareNonInheritedData::operator==):
521         (WebCore::StyleRareNonInheritedData::reflectionDataEquivalent):
522         (WebCore::RenderStyle::diff):
523         (WebCore::RenderStyle::applyTransform):
524         * rendering/RenderStyle.h:
525         (WebCore::TranslateTransformOperation::apply):
526         (WebCore::StyleReflection::StyleReflection):
527         (WebCore::StyleReflection::operator==):
528         (WebCore::StyleReflection::operator!=):
529         (WebCore::StyleReflection::direction):
530         (WebCore::StyleReflection::offset):
531         (WebCore::StyleReflection::mask):
532         (WebCore::StyleReflection::setDirection):
533         (WebCore::StyleReflection::setOffset):
534         (WebCore::StyleReflection::setMask):
535         (WebCore::RenderStyle::boxReflect):
536         (WebCore::RenderStyle::setBoxReflect):
537         (WebCore::RenderStyle::initialBoxReflect):
538         * rendering/RenderTable.cpp:
539         (WebCore::RenderTable::layout):
540         (WebCore::RenderTable::paintMask):
541         * rendering/RenderTableCell.cpp:
542         (WebCore::RenderTableCell::requiresLayer):
543         (WebCore::RenderTableCell::paintMask):
544
545 2008-04-29  Beth Dakin  <bdakin@apple.com>
546
547         Reviewed by Alice.
548
549         Initial implementation of the following ARIA roles: button, 
550         checkbox, heading, link, radio, textbox.
551
552         * html/HTMLAttributeNames.in: Add 'role' to list of attributes.
553
554         * page/AccessibilityObject.cpp:
555          When an ARIA role is set, the role overrides whatever the actual 
556 element is when the element reports itself to the screen reader. So all of these isBlah functions report based on their roleValue now.
557         (WebCore::AccessibilityObject::isWebArea):
558         (WebCore::AccessibilityObject::isImageButton):
559         (WebCore::AccessibilityObject::isAnchor):
560         (WebCore::AccessibilityObject::isTextControl):
561         (WebCore::AccessibilityObject::isImage):
562         (WebCore::AccessibilityObject::isAttachment):
563         (WebCore::AccessibilityObject::isPasswordField):
564         (WebCore::AccessibilityObject::isCheckboxOrRadio):
565         (WebCore::AccessibilityObject::isHeading):
566         (WebCore::AccessibilityObject::isLink):
567
568         Check for ARIA information:
569         (WebCore::AccessibilityObject::headingLevel):
570         (WebCore::AccessibilityObject::anchorElement):
571         (WebCore::AccessibilityObject::actionElement):
572         (WebCore::AccessibilityObject::hasIntValue):
573         (WebCore::AccessibilityObject::intValue):
574         (WebCore::AccessibilityObject::stringValue):
575         (WebCore::AccessibilityObject::title):
576         (WebCore::AccessibilityObject::accessibilityIsIgnored):
577         (WebCore::AccessibilityObject::roleValue):
578
579         There are a few places in the code where it is important to identify the difference between ARIA and non-ARIA.
580         (WebCore::AccessibilityObject::isNativeImage):
581         (WebCore::AccessibilityObject::isNativeTextControl):
582         (WebCore::isARIAInput):
583         (WebCore::isARIAControl):
584
585         A lot of spots in the code used to cast to RenderTextControl to get information about the text inside the element. Now that non-native text controls can run this code with the ARIA role 'textbox', it needs to be as general as possible. 
586         (WebCore::AccessibilityObject::text): Still calls into 
587         RenderTextControl's text() for native text controls. Uses Element's 
588         innerText() for ARIA textboxes.
589         (WebCore::AccessibilityObject::textLength): Call 
590         AccessibilityObject's text() instead of RenderTextControl's.
591         (WebCore::AccessibilityObject::ariaSelectedTextDOMRange):
592         (WebCore::AccessibilityObject::selectedText):
593         (WebCore::AccessibilityObject::selectedTextRange):
594         (WebCore::AccessibilityObject::selectionStart):
595         (WebCore::AccessibilityObject::selectionEnd):
596         (WebCore::AccessibilityObject::setSelectedTextRange):
597         (WebCore::AccessibilityObject::setValue):
598         (WebCore::AccessibilityObject::visiblePositionForIndex):
599         (WebCore::AccessibilityObject::indexForVisiblePosition):
600         (WebCore::AccessibilityObject::textMarkerRangeForRange):
601         (WebCore::AccessibilityObject::textMarkerForIndex):
602         (WebCore::AccessibilityObject::indexForTextMarker):
603         (WebCore::AccessibilityObject::doAXRangeForLine):
604         (WebCore::AccessibilityObject::doAXRangeForIndex):
605         (WebCore::AccessibilityObject::doAXStringForRange):
606         (WebCore::AccessibilityObject::doAXBoundsForRange):
607         
608         Reports ARIA role. If the role is not valid or simply not set, return UnknownRole.
609         (WebCore::AccessibilityObject::ariaRoleAttribute):
610         
611         Added several new functions. Most of them existed before but were static, or have been added to reduce the dependency on RenderTextControl for a lot of the text functionality.
612         * page/AccessibilityObject.h:
613
614         Eliminated dependency on RenderTextControl cast. The information is generalized now and available directly through the AccessibilityObject.
615         * page/mac/AccessibilityObjectWrapper.mm:
616         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
617         (-[AccessibilityObjectWrapper doAXAttributedStringForRange:]):
618
619 2008-04-29  Timothy Hatcher  <timothy@apple.com>
620
621         Make the exceptions that the InspectorController catches log the
622         original file and line number, if present on the exception object.
623
624         Reviewed by Adam Roben.
625
626         * page/InspectorController.cpp:
627         (WebCore::InspectorController::callFunction): Pass the context to HANDLE_EXCEPTION.
628         (WebCore::InspectorController::~InspectorController): Ditto.
629         (WebCore::InspectorController::scriptObjectReady): Ditto.
630         (WebCore::InspectorController::addScriptResource): Ditto.
631         (WebCore::InspectorController::updateScriptResourceRequest): Ditto.
632         (WebCore::InspectorController::updateScriptResourceResponse): Ditto.
633         (WebCore::InspectorController::updateScriptResource): Ditto.
634         (WebCore::InspectorController::addDatabaseScriptResource): Ditto.
635         (WebCore::InspectorController::addScriptConsoleMessage): Ditto.
636         (WebCore::InspectorController::handleException): Take a context. Pull the line
637         and sourceURL properties off the exception if it is an object.
638         * page/InspectorController.h: Change handleException to take a context.
639
640 2008-04-29  Timothy Hatcher  <timothy@apple.com>
641
642         Fixes a regression where the Page's debugger would not be reattached
643         when a new JSDOMWindow is created.
644
645         Reviewed by Sam Weinig.
646
647         * bindings/js/kjs_proxy.cpp:
648         (WebCore::KJSProxy::clear): Call attachDebugger after creating the JSDOMWindow.
649         * history/CachedPage.cpp:
650         (WebCore::CachedPage::restore): For the case where the CachedPage doesn't
651         contain a window, reattach the debugger to the new JSDOMWindow by calling
652         proxy->attachDebugger. Also restore the setPageGroupIdentifier.
653
654 2008-04-29  Anatoli Papirovski  <apapirovski@mac.com>
655
656         Reviewed by Darin Adler.
657
658         Fix for https://bugs.webkit.org/show_bug.cgi?id=18355
659         Fixed RGB and RGBA parsing to ignore the declaration when the value is not
660         "either three integer values or three percentage values."
661
662         * css/CSSParser.cpp:
663         (WebCore::CSSParser::parseColorParameters):
664
665 2008-04-29  Holger Hans Peter Freyther  <zecke@selfish.org>
666
667         Reviewed by Simon.
668
669         Fix crash when setHtml gets called from slots connected to QWebPage::unsupportedContent
670
671         Ben found this crash in the demo browser.
672
673         In void MainResourceLoader::continueAfterContentPolicy(PolicyAction contentPolicy,
674
675         case PolicyDownload:
676         frameLoader()->client()->download(m_handle.get(), request(), m_handle.get()->request(), r);
677         receivedError(interruptionForPolicyChangeError());
678
679         We are in a policy check, the download() call will call setHtml, which will start loading
680         the data into a frame. The loading will cancel all policy checks and call ResourceLoader::releaseResources
681         which will set m_frame to 0. Then we return and invoke interruptionForPolicyChangeError() which
682         will use the m_frame->loader() but it is gone. Do not call into receivedError and
683         interruptionForPolicyChangeError if we are gone anyway...
684
685         * loader/MainResourceLoader.cpp:
686         (WebCore::MainResourceLoader::continueAfterContentPolicy):
687
688 2008-04-29  Holger Hans Peter Freyther  <zecke@selfish.org>
689
690         Reviewed by Simon.
691
692         Rely on auto-boxing of C++ for the QCursor c'tor
693
694         * platform/qt/CursorQt.cpp:
695
696 2008-04-29  Holger Hans Peter Freyther  <zecke@selfish.org>
697
698         Reviewed by Simon.
699
700         Add the remaining cursors that defaulted to PointerCursor
701
702         * Resources/WebKitResources.qrc:
703         * platform/qt/CursorQt.cpp:
704         (WebCore::verticalTextCursor):
705         (WebCore::cellCursor):
706         (WebCore::contextMenuCursor):
707         (WebCore::copyCursor):
708         (WebCore::progressCursor):
709         (WebCore::aliasCursor):
710
711 2008-04-29  Alice Liu  <alice.liu@apple.com>
712
713         Reviewed by Beth Dakin.
714
715         Comply with HTML5 spec about parsing tabindex property according to
716         integer parsing rules
717
718         Test: fast/parser/tabindex-parsing.html
719
720         * html/HTMLElement.cpp:
721         (WebCore::HTMLElement::parseMappedAttribute):
722
723 2008-04-29  Tor Arne Vestbø  <tavestbo@trolltech.com>
724
725         Reviewed by Simon.
726
727         Fixes: Fix timing problem where scrollbars in subframes were sometimes not property repainted.
728
729         https://bugs.webkit.org/show_bug.cgi?id=18482
730
731         We need to repaint scrollbars after a geometry change, and also make sure
732         the computed clipping rect for the corners between scrollbars is propagated
733         to the chrome client without beeing intersected by the visible content rect
734         of the frame.
735
736         * platform/ScrollView.h:
737         * platform/qt/ScrollViewQt.cpp:
738         (WebCore::ScrollView::geometryChanged):
739         (WebCore::ScrollView::suppressScrollbars):
740         (WebCore::ScrollView::invalidateScrollbars):
741
742 2008-04-29  Holger Hans Peter Freyther  <zecke@selfish.org>
743
744         Reviewed by Simon.
745
746         Calling QWebView::setCursor will override the WebCore Cursor.
747         Calling QWebView::setCursor will override the WebCore Cursor using
748         QWidget::unsetCursor will revert to the WebCore Cursor.
749
750         For detecting the unset we have to compare the shape of the
751         cursor to the default arrow. Qt::WA_SetCursor can not be used
752         as it is set unconditionally but conditionally removed.
753
754         Calling QWidget::setCursor will immediately send the CursorChange
755         event. We listen to this event to decide if we currently use a
756         WebCore cursor, got a cursor from outside, or revert to the default.
757
758         This should be race free and work reliable, the manual test for this
759         is WebCore/manual-tests/cursor.html
760
761         * platform/qt/WidgetQt.cpp:
762         (WebCore::Widget::setCursor):
763
764 2008-04-28  Dan Bernstein  <mitz@apple.com>
765
766         Reviewed by Maciej Stachowiak.
767
768         - fix https://bugs.webkit.org/show_bug.cgi?id=18795
769           REGRESSION (r32660): Text heavier with text-shadow
770
771         * rendering/InlineTextBox.cpp:
772         (WebCore::paintTextWithShadows): The loop was doing one extra pass
773         without shadow even in cases where the last pass with a shadow was
774         painting the text at the right position (rather than outside the clip).
775         Fixed that. The only case where a separate pass without shadow is needed
776         is when there is text-stroke, since in that case all shadow passes
777         paint the text outside the clip.
778
779 2008-04-28  Brady Eidson <beidson@apple.com>
780
781         Reviewed by Sam Weinig
782
783         Add Storage.clear(), per updates to HTML5
784
785         Tests: storage/domstorage/localstorage/clear.html
786                storage/domstorage/sessionstorage/clear.html
787
788         * storage/LocalStorageArea.cpp:
789         (WebCore::LocalStorageArea::areaCleared):
790         * storage/LocalStorageArea.h:
791
792         * storage/SessionStorageArea.cpp:
793         (WebCore::SessionStorageArea::areaCleared):
794         * storage/SessionStorageArea.h:
795
796         * storage/Storage.cpp:
797         (WebCore::Storage::clear):
798         * storage/Storage.h:
799         * storage/Storage.idl:
800
801         * storage/StorageArea.cpp:
802         (WebCore::StorageArea::internalClear):
803         * storage/StorageArea.h:
804         (WebCore::StorageArea::clear):
805
806 2008-04-28  Adele Peterson  <adele@apple.com>
807
808         Reviewed by Dan Bernstein, Tim Hatcher, Anders Carlsson, and Darin Adler.
809
810         WebCore part of fix for <rdar://problem/3709505>
811         Safari should have a way to upload bundles from the file upload control (as zip)
812
813         * WebCore.base.exp: Added symbols.
814
815         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formData): Ask the application if a file will need to be replaced before it's uploaded.
816           It will also give the replacement filename which is used to determine the correct mime-type and to construct the correct header.
817
818         * loader/FrameLoader.cpp:
819         (WebCore::FrameLoader::submitForm): Asks the application to generate any files for the form data before a form submission starts.
820         (WebCore::FrameLoader::loadItem): ditto.
821         * loader/ResourceLoader.cpp:
822         (WebCore::ResourceLoader::didReceiveResponse): Tells the FormData from the request to remove any generated files if it needs to.
823         (WebCore::ResourceLoader::didCancel): ditto.
824         (WebCore::ResourceLoader::didFail): ditto.
825
826         * platform/network/FormData.cpp:
827         (WebCore::FormData::FormData): Initializes m_hasGeneratedFiles, which keeps track of whether there are files that will need to be removed.
828         (WebCore::FormData::~FormData): Added.  Assert that there are no files that need to be removed, but if there are, release builds will still remove them here.
829         (WebCore::FormData::appendFile): Passes along a shouldGenerateFile flag to the FormDataElement.
830         (WebCore::FormData::generateFiles): Added. Iterates through the FormDataElements, and using the ChromeClient pointer, asks the application to
831          create any compressed files so the FormDataElements can store the paths.
832         (WebCore::FormData::removeGeneratedFilesIfNeeded): Added.  Removes generated files and their directories (if empty).
833         * platform/network/FormData.h:
834         (WebCore::FormDataElement::FormDataElement): Added a boolean to track whether the file will need to be generated,
835          and a string to hold the path of the generated file.
836
837         * platform/network/mac/FormDataStreamMac.mm:
838         (WebCore::advanceCurrentStream): Uses the generated file path instead of the original file path when streaming the file.
839         (WebCore::setHTTPBody): Uses the generated file path when determining the size of the file to be uploaded.
840
841         * platform/FileSystem.h: Added directoryName.
842         * platform/posix/FileSystemPOSIX.cpp: (WebCore::directoryName): Added.
843         * platform/gtk/FileSystemGtk.cpp: (WebCore::directoryName): Added empty implementation.
844         * platform/qt/FileSystemQt.cpp: (WebCore::directoryName): ditto.
845         * platform/win/FileSystemWin.cpp: (WebCore::directoryName): ditto.
846         * platform/wx/FileSystemWx.cpp: (WebCore::directoryName): ditto.
847
848         Added new ChromeClient methods to give the application control over the file compression for uploading.
849         * page/Chrome.cpp:
850         (WebCore::ChromeClient::shouldReplaceWithGeneratedFileForUpload): Added a default implementation.
851         (WebCore::ChromeClient::generateReplacementFile): ditto.
852         * page/ChromeClient.h:
853
854 2008-04-28  Anders Carlsson  <andersca@apple.com>
855
856         Reviewed by Sam, Mark, Adele and Darin.
857
858         Add a (currently not called) method for opening the application cache database.
859         
860         * WebCore.base.exp:
861         * loader/appcache/ApplicationCacheStorage.cpp:
862         (WebCore::ApplicationCacheStorage::setCacheDirectory):
863         (WebCore::ApplicationCacheStorage::openDatabase):
864         * loader/appcache/ApplicationCacheStorage.h:
865
866 2008-04-28  Alice Liu  <alice.liu@apple.com>
867
868         Reviewed by Darin.
869
870         Fix <rdar://problem/4911289> Add tabindex property to all children 
871         of HTMLElement (7138)
872         http://bugs.webkit.org/show_bug.cgi?id=7138
873
874         Test: fast/events/tabindex-focus-blur-all.html
875
876         * WebCore.xcodeproj/project.pbxproj:
877         * bindings/objc/DOMPrivate.h:
878         -DOMHTMLLabelElementPrivate.h and DOMHTMLLegendElementPrivate.h are no
879          longer needed
880
881         * bindings/objc/PublicDOMInterfaces.h:
882         -Moving focus, blur, tabindex to HTMLElement from its descendants.
883
884         * dom/Node.cpp:
885         (WebCore::Node::Node):
886         (WebCore::Node::isFocusable):
887         (WebCore::Node::isKeyboardFocusable):
888         -The concept of being focusable now needs to account for tabindex
889         attribute.
890
891         * dom/Node.h:
892         -Need to use a bit to keep track of whether tabindex was explicitly set
893          to 0 or was just initialized to 0.
894         (WebCore::Node::tabIndex):
895         -Make this virtual so that Anchors and GenericFormElements can determine
896          tabindex without accounting for focusability
897         (WebCore::Node::setTabIndexExplicitly):
898         -Renamed setTabIndex() to setTabIndexExplicitly() so as not to hide
899          behind and/or be confused for HTMLElement::setTabIndex
900
901         * html/HTMLAnchorElement.cpp:
902         * html/HTMLAnchorElement.h:
903         (WebCore::HTMLAnchorElement::tabIndex):
904         * html/HTMLGenericFormElement.cpp:
905         * html/HTMLGenericFormElement.h:
906         (WebCore::HTMLGenericFormElement::tabIndex):
907         -Anchors and form elements are normally focusable, and need to avert the
908          check for focusability in HTMLElement::tabIndex
909          because tabIndex could be queried before a first layout happens.
910
911         * html/HTMLElement.cpp:
912         (WebCore::HTMLElement::parseMappedAttribute):
913         -Function Node::setTabIndex changed to Node::setTabIndexExplicitly
914         (WebCore::HTMLElement::isFocusable):
915         -The concept of being focusable now needs to account for tabindex
916          attribute.
917         (WebCore::HTMLElement::tabIndex):
918         -HTML5 specifies that querying tabindex for elements that aren't
919          focusable shall return -1
920         (WebCore::HTMLElement::setTabIndex):
921         -New default implementation
922         * html/HTMLElement.h:
923
924         * html/HTMLLegendElement.cpp:
925         (WebCore::HTMLLegendElement::focus):
926         -Now with HTML5's enhanced specification of tabindex, legend elements
927          themselves shall focus (if they should), and not the first form element 
928          they encapsulate.  This matches Firefox behavior.  HTMLLabelElements
929          still forward focus to the encapsulated element.  This also matches
930          other browsers. 
931
932         * html/HTMLAreaElement.cpp:
933         (WebCore::HTMLAreaElement::isFocusable):
934         * html/HTMLAreaElement.h:
935         -HTMLAreaElement isn't subject to the same focusability requirements as
936          its parent, HTMLAnchorElement. Default HTMLElement implementation is
937          desired.  
938
939         * html/HTMLFieldSetElement.cpp:
940         (WebCore::HTMLFieldSetElement::isFocusable):
941         * html/HTMLLegendElement.cpp:
942         (WebCore::HTMLLegendElement::isFocusable):
943         * html/HTMLOptGroupElement.cpp:
944         (WebCore::HTMLOptGroupElement::isFocusable):
945         * html/HTMLOptionElement.cpp:
946         (WebCore::HTMLOptionElement::isFocusable):
947         -These elements aren't subject to the same focusability requirements as
948          their parent, HTMLGenericFormElement. Default HTMLElement 
949          implementation is desired.  
950
951         * html/HTMLAnchorElement.idl:
952         * html/HTMLAreaElement.idl:
953         * html/HTMLButtonElement.idl:
954         * html/HTMLElement.idl:
955         * html/HTMLInputElement.idl:
956         * html/HTMLLabelElement.idl:
957         * html/HTMLLegendElement.idl:
958         * html/HTMLObjectElement.idl:
959         * html/HTMLSelectElement.idl:
960         * html/HTMLTextAreaElement.idl:
961         -Moving tabindex attribute, focus and blur methods from descendants of
962          HTMLElement to HTMLElement
963
964 2008-04-28  Dan Bernstein  <mitz@apple.com>
965
966         Reviewed by Dave Hyatt.
967
968         - support multiple box- and text-shadows
969
970         Tests: fast/css/shadow-multiple.html
971                fast/repaint/shadow-multiple-horizontal.html
972                fast/repaint/shadow-multiple-strict-horizontal.html
973                fast/repaint/shadow-multiple-strict-vertical.html
974                fast/repaint/shadow-multiple-vertical.html
975
976         * css/CSSComputedStyleDeclaration.cpp:
977         (WebCore::valueForShadow): Changed to account for reversing the order
978         of the shadow values in the ShadowData list.
979
980         * css/CSSValueList.cpp:
981         (WebCore::CSSValueList::prepend): Added.
982         * css/CSSValueList.h:
983
984         * rendering/InlineFlowBox.cpp:
985         (WebCore::InlineFlowBox::placeBoxesHorizontally): Changed to account for
986         all shadows in overflow calculation.
987         (WebCore::InlineFlowBox::placeBoxesVertically): Ditto.
988         (WebCore::InlineFlowBox::paint): Changed to account for all shadows
989         when testing for intersection with the damage rect.
990         (WebCore::InlineFlowBox::paintTextDecorations): Changed to paint all
991         shadows.
992
993         * rendering/InlineTextBox.cpp:
994         (WebCore::paintTextWithShadows): Factored out from paint() and changed
995         to paint all shadows.
996         (WebCore::InlineTextBox::paint): Moved the text painting code out to
997         paintTextWithShadows(). Changed to not paint shadows for markers and
998         composition underlines and in "force black text" mode.
999         (WebCore::InlineTextBox::paintSelection):
1000         (WebCore::InlineTextBox::paintCompositionBackground):
1001         (WebCore::InlineTextBox::paintDecoration): Changed to paint all shadows.
1002         * rendering/InlineTextBox.h: Changed some public methods to private
1003         or protected.
1004
1005         * rendering/RenderBlock.cpp:
1006         (WebCore::RenderBlock::overflowHeight): Changed to account for all
1007         shadows.
1008         (WebCore::RenderBlock::overflowWidth): Ditto.
1009         (WebCore::RenderBlock::overflowLeft): Ditto.
1010         (WebCore::RenderBlock::overflowTop): Ditto.
1011         (WebCore::RenderBlock::overflowRect): Ditto.
1012         (WebCore::RenderBlock::layoutBlock): Ditto.
1013
1014         * rendering/RenderFlexibleBox.cpp:
1015         (WebCore::RenderFlexibleBox::layoutBlock): Ditto.
1016
1017         * rendering/RenderLayer.cpp:
1018         (WebCore::RenderLayer::calculateRects): Ditto.
1019
1020         * rendering/RenderObject.cpp:
1021         (WebCore::RenderObject::paintBoxShadow): Changed to paint all shadows.
1022         Changed to avoid clipping out the box if it has a fully opaque
1023         background.
1024         (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Changed to account
1025         for all shadows.
1026         (WebCore::RenderObject::selectionForegroundColor): Cleaned up.
1027         (WebCore::RenderObject::adjustRectForOutlineAndShadow): Changed to
1028         account for all shadows.
1029
1030         * rendering/RenderReplaced.cpp:
1031         (WebCore::RenderReplaced::adjustOverflowForBoxShadow): Ditto.
1032
1033         * rendering/RenderStyle.cpp:
1034         (WebCore::RenderStyle::setTextShadow): Changed to prepend when adding
1035         so that the stacking order of shadows when painting will be "first o
1036         top".
1037         (WebCore::RenderStyle::setBoxShadow): Ditto.
1038
1039         * rendering/RenderTable.cpp:
1040         (WebCore::RenderTable::layout): Changed to account for all shadows.
1041
1042 2008-04-28  Adam Roben  <aroben@apple.com>
1043
1044         Fix some more Windows build errors in COMPtr
1045
1046         * platform/win/COMPtr.h:
1047         (WTF::): Define DefaultHash<COMPtr<P> > by using PtrHash<COMPtr<P> >,
1048         which is just a copy of PtrHash<RefPtr<P> >.
1049
1050 2008-04-28  Adam Roben  <aroben@apple.com>
1051
1052         Fix some Windows build errors in COMPtr
1053
1054         * platform/win/COMPtr.h: Explicitly name the WTF namespace when using
1055         HashTableDeletedValueType.
1056
1057 2008-04-28  Adam Roben  <aroben@apple.com>
1058
1059         Fix some Windows build errors in FontPlatfomrData
1060
1061         * platform/graphics/win/FontPlatformData.h: Removed the Deleted
1062         constructor and replaced it with a HashTableDeletedValueType
1063         constructor. Also added isHashTableDeletedValue() and
1064         hashTableDeletedFontValue().
1065
1066 2008-04-28  David Hyatt  <hyatt@apple.com>
1067
1068         https://bugs.webkit.org/show_bug.cgi?id=18780
1069
1070         Canvas can't draw itself into its own buffer.  Make sure the dirtying call comes after the image()
1071         has been accessed.  Technically willDraw should be renamed to didDraw and all calls should be moved
1072         to after draws have occurred (since if the draw op itself wants to reference the image it shouldn't get
1073         a dirty copy either), but I'll take that up with olliej when he wakes up. :)
1074
1075         Reviewed by Dan Bernstein
1076
1077         Added fast/canvas/canvasDrawsIntoSelf.html
1078
1079         * html/CanvasRenderingContext2D.cpp:
1080         (WebCore::CanvasRenderingContext2D::drawImage):
1081
1082 2008-04-28  Alexey Proskuryakov  <ap@webkit.org>
1083
1084         Reviewed by Geoff Garen.
1085
1086         <rdar://problem/5825192> Replace use of Gestalt with BSD sysctl
1087
1088         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1089         (WebCore::MediaPlayerPrivate::isAvailable): There is no need to check QuickTime version post-Tiger,
1090         as it will never be below 7.3 again. This change may make library loading happen earlier in
1091         some cases, hopefully, that's not a big deal.
1092
1093 2008-04-25  Alexey Proskuryakov  <ap@webkit.org>
1094
1095         Reviewed by Darin.
1096
1097         Fix run-webkit-tests --threading
1098         and provisionally fix <https://bugs.webkit.org/show_bug.cgi?id=18661>
1099         Proxy server issue in Sunday's Nightly
1100
1101         Adjusted for JavaScriptCore changes: added a new member to ClassInfo objects, turned
1102         ClassInfo::propHashTable into a function, made getPropertyAttributes() take an ExecState pointer.
1103
1104         * bindings/js/JSAudioConstructor.cpp:
1105         (WebCore::):
1106         * bindings/js/JSDOMWindowBase.cpp:
1107         (WebCore::):
1108         * bindings/js/JSDOMWindowCustom.cpp:
1109         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1110         * bindings/js/JSDOMWindowWrapper.cpp:
1111         (WebCore::):
1112         (WebCore::JSDOMWindowWrapper::getPropertyAttributes):
1113         * bindings/js/JSDOMWindowWrapper.h:
1114         * bindings/js/JSEventTargetBase.h:
1115         (WebCore::JSEventTargetPrototype::classInfo):
1116         * bindings/js/JSHTMLInputElementBase.cpp:
1117         (WebCore::):
1118         * bindings/js/JSHTMLOptionElementConstructor.cpp:
1119         (WebCore::):
1120         * bindings/js/JSHistoryCustom.cpp:
1121         (WebCore::JSHistory::customGetOwnPropertySlot):
1122         * bindings/js/JSImageConstructor.cpp:
1123         (WebCore::):
1124         * bindings/js/JSInspectedObjectWrapper.cpp:
1125         (WebCore::):
1126         * bindings/js/JSInspectorCallbackWrapper.cpp:
1127         (WebCore::):
1128         * bindings/js/JSLocationCustom.cpp:
1129         (WebCore::JSLocation::customGetOwnPropertySlot):
1130         (WebCore::JSLocation::customPut):
1131         * bindings/js/JSNamedNodesCollection.cpp:
1132         (WebCore::):
1133         * bindings/js/JSQuarantinedObjectWrapper.cpp:
1134         (WebCore::):
1135         * bindings/js/JSRGBColor.cpp:
1136         (WebCore::):
1137         * bindings/js/JSStorageCustom.cpp:
1138         (WebCore::JSStorage::customPut):
1139         * bindings/js/JSXMLHttpRequestConstructor.cpp:
1140         (WebCore::):
1141         * bindings/js/JSXSLTProcessor.cpp:
1142         (WebCore::):
1143         * bindings/scripts/CodeGeneratorJS.pm:
1144         * bridge/objc/objc_runtime.mm:
1145         * bridge/runtime_array.cpp:
1146         * bridge/runtime_object.cpp:
1147
1148 2008-04-28  David Hyatt  <hyatt@apple.com>
1149
1150         https://bugs.webkit.org/show_bug.cgi?id=18779
1151
1152         The arguments in drawImage were reversed when I switched away from the image buffer method.
1153
1154         Reviewed by Tim Hatcher
1155
1156         Added fast/canvas/drawImage.html
1157
1158         * html/CanvasRenderingContext2D.cpp:
1159         (WebCore::CanvasRenderingContext2D::drawImage):
1160
1161 2008-04-28  Holger Hans Peter Freyther  <zecke@selfish.org>
1162
1163         Reviewed by Simon.
1164
1165         Fix the crash on http://www.orad.pl. We called end too early.
1166
1167         1. we need a ::write that will pause the parser due a pending
1168         script
1169         2. we need a second write to queue data (tricky part)
1170         3. we need to get a finish call (document loaded)
1171         4. we resume the script and parse, schedule loading of a new script
1172         and have called end
1173         5. we resume the new script and we get a crash
1174
1175         This bug is hard to trigger, e.g. if the web server is only allowing
1176         one connection per client/IP. This is why we need to sleep in the scripts. We
1177         want to make sure that the page is first fully received before serving the
1178         scripts.
1179
1180         Test: http/tests/misc/xmltokenizer-do-not-crash.pl
1181
1182         * dom/XMLTokenizer.cpp:
1183
1184 2008-04-28  Ariya Hidayat  <ahidayat@trolltech.com>
1185
1186         Reviewed by Simon.
1187
1188         Fix rounded corner on combo box with CSS border
1189
1190         * platform/qt/RenderThemeQt.cpp:
1191         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
1192
1193 2008-04-28  Ariya Hidayat  <ahidayat@trolltech.com>
1194
1195         Reviewed by Simon.
1196
1197         Fix CSS border does not show up for combo boxes
1198
1199         Do not clear the border when painting the combo box for 'select' form element
1200
1201         * platform/qt/RenderThemeQt.cpp:
1202
1203 2008-04-28  Olivier Goffart  <ogoffart@trolltech.com>
1204
1205         Reviewed by Simon.
1206
1207         Avoid comparing to 0 in qFuzzyCompare for increased
1208         numeric stability.
1209
1210         * platform/graphics/qt/PathQt.cpp:
1211         (WebCore::Path::addArc):
1212
1213 2008-04-28  Benjamin Meyer  <bmeyer@trolltech.com>
1214
1215         Reviewed by Simon.
1216
1217         Fixes: Pages returning 404 with content are not displayed.
1218
1219         A web page that returns 404 can still have content.
1220
1221         * platform/network/qt/QNetworkReplyHandler.cpp:
1222         (WebCore::QNetworkReplyHandler::finish):
1223
1224 2008-04-28  Paul Olav Tvete  <paul@trolltech.com>
1225
1226         Reviewed by Simon.
1227
1228         Fix compiler warning; Avoid the implicity QString(const char *)
1229         constructor
1230
1231         * platform/qt/RenderThemeQt.cpp:
1232         (WebCore::RenderThemeQt::fallbackStyle):
1233
1234 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
1235
1236         Reviewed by Simon.
1237
1238         Prevent middle-click from triggering open URL from clipboard when the event has already been accepted.
1239
1240         * platform/qt/PlatformScrollBarQt.cpp:
1241         (WebCore::PlatformScrollbar::handleMousePressEvent):
1242
1243 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
1244
1245         Reviewed by Simon.
1246
1247         Fix scrollbar behavior in QtWebKit to match QScrollBar.
1248
1249         Right click context menu is now supported, along with
1250         middle click to center slider thumb over mouse cursor.
1251
1252         * platform/qt/PlatformScrollBar.h:
1253         * platform/qt/PlatformScrollBarQt.cpp:
1254         (tr):
1255         (WebCore::PlatformScrollbar::pixelPosToRangeValue):
1256         (WebCore::PlatformScrollbar::handleMousePressEvent):
1257         (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
1258         (WebCore::PlatformScrollbar::handleContextMenuEvent):
1259
1260 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
1261
1262         Reviewed by Simon.
1263
1264         Implemented channel-based logging for QtWebKit.
1265
1266         Comma-separated log channels are read from the QT_WEBKIT_LOG environment variable.
1267         Warnings for notImplemented() is still output by default, but can be disabled
1268         by setting DISABLE_NI_WARNINGS=1.
1269
1270         * WebCore.pro:
1271         * platform/NotImplemented.h:
1272         * platform/qt/LoggingQt.cpp: Added.
1273         (WebCore::getChannelFromName):
1274         (WebCore::InitializeLoggingChannelsIfNecessary):
1275
1276 2008-04-28  Simon Hausmann  <shausman@trolltech.com>
1277
1278         Reviewed by Holger.
1279
1280         Fixes: Popups/Context menu in WebKit appearing at the wrong location when embedded in the graphics view or using multiple screens
1281
1282         Give the popups the right parent widget and the right coordinates relative within the parent.
1283
1284         * platform/qt/PopupMenuQt.cpp:
1285         (WebCore::PopupMenu::show):
1286
1287 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
1288
1289         Reviewed by Simon.
1290
1291         Fixes: Tabbing to a checkbox/button doesn't work on Win/X11
1292
1293         Respect platform settings for tabbing to all controls.
1294
1295         * page/qt/EventHandlerQt.cpp:
1296
1297 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
1298
1299         Reviewed by Simon.
1300
1301         First part of the fix for tabbing to a checkbox/button doesn't work on Win/X11
1302
1303         Draw controls instead of pimitive elements, to get focus rects for free.
1304
1305         * platform/qt/RenderThemeQt.cpp:
1306         (WebCore::RenderThemeQt::paintButton):
1307
1308 2008-04-28  Lincoln Ramsay  <lincoln.ramsay@trolltech.com>
1309
1310         Reviewed by Simon.
1311
1312         Compile when QT_NO_CLIPBOARD is defined.
1313
1314         * platform/qt/ClipboardQt.cpp:
1315         (WebCore::ClipboardQt::ClipboardQt):
1316         (WebCore::ClipboardQt::clearData):
1317         (WebCore::ClipboardQt::clearAllData):
1318         (WebCore::ClipboardQt::setData):
1319         (WebCore::ClipboardQt::declareAndWriteDragImage):
1320         (WebCore::ClipboardQt::writeURL):
1321         (WebCore::ClipboardQt::writeRange):
1322         * platform/qt/PasteboardQt.cpp:
1323         (WebCore::Pasteboard::writeSelection):
1324         (WebCore::Pasteboard::plainText):
1325         (WebCore::Pasteboard::documentFragment):
1326         (WebCore::Pasteboard::writeURL):
1327         (WebCore::Pasteboard::writeImage):
1328
1329 2008-04-28  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1330
1331         Reviewed by Simon.
1332
1333         Draw the arrow button on the styled combo box using the fallback ("Windows") style
1334
1335         * platform/qt/RenderThemeQt.cpp:
1336         (WebCore::RenderThemeQt::RenderThemeQt):
1337         (WebCore::RenderThemeQt::~RenderThemeQt):
1338         (WebCore::RenderThemeQt::fallbackStyle):
1339         (WebCore::RenderThemeQt::paintMenuListButton):
1340         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
1341         * platform/qt/RenderThemeQt.h:
1342
1343 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
1344
1345         Reviewed by Holger.
1346
1347         Fix positioning of native widgets (plugins).
1348
1349         Correctly convert the coordinates of the Widget in Widget::setFrameGeometry()
1350         to be relative to the containing toplevel QWidget using convertToContainingWindow().
1351
1352         Note: convertToContainingWindow() takes child coordinates.
1353
1354         * platform/qt/WidgetQt.cpp:
1355         (WebCore::Widget::frameGeometry):
1356         (WebCore::Widget::setFrameGeometry):
1357
1358 2008-04-28  Holger Hans Peter Freyther  <zecke@selfish.org>
1359
1360         Reviewed by Simon.
1361
1362         plugins: fix scrolling issues
1363
1364         When scrolling you can see artefacts that remain on the screen, they
1365         seem to originate from the backingstore handling. I'm not entirely sure
1366         where they come from, my workarounds involved a
1367         data->m_widget->parentWidget()->update() call in Widget::geometryChanged or
1368         handling widgets with a native QWidget embedded like web pages with a
1369         static background. This needs more investigations, I think the ScrollView
1370         change is cleaner than the brute force in Widget::geometryChanged
1371
1372         Focus handling seems to be broken as well and needs further work, we don't
1373         clip plugin QWidgets and they can draw out of their bounds, e.g. on the ScrollBar,
1374         the z-order is likely not honored as well.
1375
1376         * platform/ScrollView.h:
1377         * platform/qt/ScrollViewQt.cpp:
1378         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
1379         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
1380         (WebCore::ScrollView::addChild):
1381         (WebCore::ScrollView::removeChild):
1382         (WebCore::ScrollView::incrementNativeWidgetCount):
1383         (WebCore::ScrollView::decrementNativeWidgetCount):
1384         (WebCore::ScrollView::hasNativeWidgets):
1385
1386 2008-04-28  Holger Hans Peter Freyther  <zecke@selfish.org>
1387
1388         Reviewed by Simon.
1389
1390         Add manual test to test placement of QWidgets in iframe's
1391
1392         * manual-tests/qt/main.html: Added.
1393         * manual-tests/qt/qtplugin.html: Added.
1394
1395 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
1396
1397         Fix the build with ENABLE_DATABASE=0 (Qt/Windows) by including
1398         SecurityOrigin.h. It's used in the file and also implicitly included
1399         through the database headers.
1400
1401         * page/DOMWindow.cpp:
1402
1403 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
1404
1405         Prospective Wx build fix.
1406
1407         * platform/graphics/wx/FontPlatformData.h:
1408
1409 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
1410
1411         Reviewed by Alp.
1412
1413         Gtk build fix, similar to the changes done in r32609.
1414
1415         * platform/graphics/gtk/FontPlatformData.h:
1416         (WebCore::FontPlatformData::FontPlatformData):
1417         (WebCore::FontPlatformData::isHashTableDeletedValue):
1418         (WebCore::FontPlatformData::hashTableDeletedFontValue):
1419
1420 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
1421
1422         Prospective build fix. After r32609 it seems the workaround here
1423         is not needed anymore. With gcc 4.2/4.3 before 32609 the workaround
1424         is needed for compilation, after 32609 compilation only succeeds
1425         without the workaround.
1426
1427         * plugins/PluginPackage.h: Removed workaround of extra StorageTraits
1428         specification for the custom hash function of PluginPackage used in
1429         PluginSet.
1430
1431 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
1432
1433         Reviewed by Simon.
1434
1435         https://bugs.webkit.org/show_bug.cgi?id=18713
1436
1437         Fix scrollbar painting issues in QtWebKit.
1438
1439         Hovering and click-draging outside of the scrollbar would
1440         produce unexpected and inconcistent results. We also didn't
1441         pass on leave-events to the underlying WebKit code, which
1442         was nessecary to implement the paint fix.
1443
1444         * platform/qt/PlatformScrollBarQt.cpp:
1445         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
1446         (WebCore::PlatformScrollbar::handleMouseOutEvent):
1447         (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
1448
1449 2008-04-27  Oliver Hunt  <oliver@apple.com>
1450
1451         Reviewed by Maciej.
1452
1453         Bug 17173: HTML5 Canvas API requires us to ignore certain operations
1454         <https://bugs.webkit.org/show_bug.cgi?id=17173>
1455
1456         This fixes the semantics of a number of Canvas functions to match
1457         the new HTML5 non-throwing semantics.
1458
1459         Test: fast/canvas/canvas-path-with-inf-nan-dimensions.html
1460
1461         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1462         (WebCore::JSCanvasRenderingContext2D::strokeRect):
1463         * html/CanvasRenderingContext2D.cpp:
1464         (WebCore::CanvasRenderingContext2D::moveTo):
1465         (WebCore::CanvasRenderingContext2D::lineTo):
1466         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
1467         (WebCore::CanvasRenderingContext2D::bezierCurveTo):
1468         (WebCore::CanvasRenderingContext2D::arcTo):
1469         (WebCore::CanvasRenderingContext2D::arc):
1470         (WebCore::validateRectForCanvas):
1471         (WebCore::CanvasRenderingContext2D::rect):
1472         (WebCore::CanvasRenderingContext2D::clearRect):
1473         (WebCore::CanvasRenderingContext2D::fillRect):
1474         (WebCore::CanvasRenderingContext2D::strokeRect):
1475         * html/CanvasRenderingContext2D.h:
1476         * html/CanvasRenderingContext2D.idl:
1477
1478 2008-04-27  Rob Buis  <buis@kde.org>
1479
1480         Reviewed by Adele.
1481
1482         https://bugs.webkit.org/show_bug.cgi?id=18652
1483         onchange events don't seem to fire for input[type=range] controls.
1484
1485         Fire changeEvent when dragging the slider.
1486
1487         Test: fast/forms/slider-onchange-event.html
1488
1489         * rendering/RenderSlider.cpp:
1490         (WebCore::RenderSlider::valueChanged):
1491
1492 2008-04-25  Darin Adler  <darin@apple.com>
1493
1494         Reviewed by Maciej.
1495
1496         - update for compatibility with HashTable that no longer has optimization to share
1497           implementation between hash tables with integers, pointers, RefPtr, and String
1498           objects as keys
1499
1500         * bindings/js/JSSVGPODTypeWrapper.h:
1501         (WebCore::PODTypeReadWriteHashInfo::PODTypeReadWriteHashInfo): Added constructor
1502         for HashTableDeletedValue.
1503         (WebCore::PODTypeReadWriteHashInfo::isHashTableDeletedValue): Added.
1504         (WebCore::PODTypeReadWriteHashInfoTraits::constructDeletedValue): Added.
1505         (WebCore::PODTypeReadWriteHashInfoTraits::isDeletedValue): Added.
1506
1507         * dom/Document.cpp: Made changedDocuments internal to the file rather than a
1508         static data member of Document.
1509         (WebCore::FormElementKey::ref): Removed unneeded check for deleted value -- this
1510         will never be called on a deleted element.
1511         (WebCore::FormElementKey::deref): Ditto.
1512
1513         * dom/Document.h: Added HashTableDeletedValue constructor and isHashTableDeletedValue
1514         to FormElementKey. Changed FormElementKeyHashTraits to use construct/isDeletedValue.
1515         Got rid of the changedDocuments data member. Changed iconURL to be an inline that
1516         returns a const String&.
1517
1518         * dom/StyledElement.cpp: Changed MappedAttributeKeyTraits to use
1519         construct/isDeletedValue.
1520
1521         * page/mac/AXObjectCacheMac.mm:
1522         (WebCore::AXObjectCache::getAXID): Call isDeletedValue instead of deletedValue.
1523
1524         * platform/SecurityOriginHash.h: Added overload so that SecurityOriginHash can work
1525         with raw pointers as well as RefPt (helpful with the new RefPtrHashMap). Eliminated
1526         SecurityOriginTraits, since we can now use the default traits. Changed the value of
1527         safeToCompareToEmptyOrDeleted to false, since it's not safe to compare a deleted
1528         value using this hash function. I don't think it was safe before either; I'm not sure
1529         why it didn't cause a problem before.
1530
1531         * platform/cf/SchedulePair.h: Removed SchedulePairTraits -- custom traits are no
1532         longer needed.
1533
1534         * platform/graphics/FontCache.cpp:
1535         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): Added constructor
1536         for HashTableDeletedValue.
1537         (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue): Added.
1538         (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize): Added.
1539         (WebCore::FontPlatformDataCacheKeyTraits::constructDeletedValue): Added.
1540         (WebCore::FontPlatformDataCacheKeyTraits::isDeletedValue): Added.
1541         (WebCore::FontDataCacheKeyTraits::constructDeletedValue): Added.
1542         (WebCore::FontDataCacheKeyTraits::isDeletedValue): Added.
1543
1544         * platform/graphics/IntSizeHash.h: Changed HashTraits<IntSize> to use
1545         construct/isDeletedValue.
1546
1547         * platform/graphics/mac/FontPlatformData.h:
1548         (WebCore::FontPlatformData::FontPlatformData): Added constructor for
1549         HashTableDeletedValue.
1550         (WebCore::FontPlatformData::isHashTableDeletedValue): Added.
1551         (WebCore::FontPlatformData::hashTableDeletedFontValue): Added.
1552
1553         * platform/text/PlatformString.h:
1554         (WebCore::String::swap): Added. Avoids any refcount churn when swapping two strings.
1555         (WebCore::String::String): Added constructor for HashTableDeletedValue.
1556         (WebCore::String::isHashTableDeletedValue): Added.
1557         (WebCore::swap): Added. Avoids any refcount churn when swapping two strings.
1558
1559         * platform/text/StringHash.h: Changed specialization of HashTraits for
1560         WebCore::String to use the deleted value now defined in that class and removed
1561         the code to do ref/deref. Removed HashKeyStorageTraits specializations.
1562         
1563         * platform/win/COMPtr.h: Changed specialization of HashTraits for
1564         COMPtr to use the deleted value now defined in that class and removed
1565         the code to do ref/deref. Removed HashKeyStorageTraits specializations.
1566         (COMPtr::COMPtr): Added constructor for HashTableDeletedValue.
1567         (COMPtr::isHashTableDeletedValue): Added.
1568         (COMPtr::query): Removed inline keyword not needed since functions defined in the
1569         class definition are automatically marked inline.
1570         (COMPtr::hashTableDeletedValue): Added.
1571
1572         * storage/DatabaseTracker.h: Removed now-unneeded SecurityOriginTraits.
1573         * storage/LocalStorage.h: Ditto.
1574         * storage/OriginQuotaManager.h: Ditto.
1575         * storage/SessionStorage.h: Ditto.
1576
1577         * svg/SVGAnimatedTemplate.h:
1578         (WebCore::SVGAnimatedTypeWrapperKey::SVGAnimatedTypeWrapperKey): Added constructor
1579         for HashTableDeletedValue.
1580         (WebCore::SVGAnimatedTypeWrapperKey::isHashTableDeletedValue): Added.
1581         (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::constructDeletedValue): Added.
1582         (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::isDeletedValue): Added.
1583
1584 2008-04-27  Mark Rowe  <mrowe@apple.com>
1585
1586         Reviewed by Tim Hatcher.
1587
1588         Initialize the extra member of the xmlEntity struct when using libxml2 >= 2.6.27.
1589
1590         * dom/XMLTokenizer.cpp:
1591         (WebCore::):
1592
1593 2008-04-27  Dan Bernstein  <mitz@apple.com>
1594
1595         Reviewed by Darin Adler.
1596
1597         - fix https://bugs.webkit.org/show_bug.cgi?id=3729
1598           <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
1599
1600         Test: editing/selection/move-left-right.html
1601
1602         * editing/SelectionController.cpp:
1603         (WebCore::SelectionController::modifyMovingRight): Added. Currently
1604         implemented for character granularity, all other being treated as
1605         "forward".
1606         (WebCore::SelectionController::modifyMovingForward): Renamed
1607         modifyMovingRightForward() to this.
1608         (WebCore::SelectionController::modifyMovingLeft): Added. Currently
1609         implemented for character granularity, all other being treated as
1610         "backward".
1611         (WebCore::SelectionController::modifyMovingBackward): Renamed
1612         modifyMovingLeftBackward() to this.
1613         (WebCore::SelectionController::modify): Changed to call either the
1614         visual (left/right) or logical (backward/forward) methods depending on
1615         the 'dir' argument for moves.
1616         * editing/SelectionController.h:
1617         * editing/VisiblePosition.cpp:
1618         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate): Added.
1619         (WebCore::VisiblePosition::left): Added.
1620         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate): Added.
1621         (WebCore::VisiblePosition::right): Added.
1622         * editing/VisiblePosition.h:
1623
1624 2008-04-27  Sam Weinig  <sam@webkit.org>
1625
1626         Reviewed by Maciej Stachowiak.
1627
1628         Fix for <rdar://problem/5893385> Need to provide access to the CanvasRenderingContext2D prototype
1629         Add a JS constructor for CanvasRenderingContext2D.
1630
1631         * html/CanvasRenderingContext2D.idl:
1632         * page/DOMWindow.idl:
1633
1634 2008-04-26  Adam Barth  <hk9565@gmail.com>
1635
1636         Reviewed by Adam Roben and Sam Weinig.
1637
1638         Fixes bug http://bugs.webkit.org/show_bug.cgi?id=17331
1639         Fixes bug http://bugs.webkit.org/show_bug.cgi?id=16848
1640         
1641         Updates postMessage implementation to match HTML 5 specification:
1642         1) Adds origin parameter to postMessage.
1643         2) Removes domain and uri attributes of MessageEvent in favor of
1644            origin attribute.
1645
1646         In order to do this correctly, we need to distinguish between hosts and domains
1647         in the SecurityOrigin class. There are now three ways to compare security origins:
1648         1) isSameSchemeHostPort compares scheme, host, and port, and is used for postMessage
1649         2) equal compares all aspects of the security origin, and is used for hash keys
1650         3) canAccess understands the semantics of schemes such as file:// and data:// URLs,
1651            and should be used for scripting access checks.
1652
1653         Changed SecurityOrigin::toString() to generate identifiers that are suitable for 
1654         being used as a MessageEvent's origin property. In the future, they could be used 
1655         as database string identifiers as well. Re-used KURL parser to parse serialized 
1656         SecurityOrigins.
1657
1658         Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
1659         
1660         Tests: http/tests/security/postMessage/invalid-origin-throws-exception.html
1661                http/tests/security/postMessage/javascript-page-still-sends-origin.html
1662                http/tests/security/postMessage/origin-unaffected-by-base-tag.html
1663                http/tests/security/postMessage/origin-unaffected-by-document-domain.html
1664                http/tests/security/postMessage/target-origin.html
1665
1666         * WebCore.base.exp:
1667         * bindings/js/JSDOMWindowCustom.cpp:
1668         (WebCore::JSDOMWindow::postMessage):
1669         * dom/Document.cpp:
1670         (WebCore::Document::domain):
1671         * dom/MessageEvent.cpp:
1672         (WebCore::MessageEvent::MessageEvent):
1673         (WebCore::MessageEvent::initMessageEvent):
1674         * dom/MessageEvent.h:
1675         (WebCore::MessageEvent::origin):
1676         * dom/MessageEvent.idl:
1677         * html/CanvasRenderingContext2D.cpp:
1678         (WebCore::CanvasRenderingContext2D::checkOrigin):
1679         (WebCore::CanvasRenderingContext2D::createPattern):
1680         * page/DOMWindow.cpp:
1681         (WebCore::DOMWindow::postMessage):
1682         * page/DOMWindow.h:
1683         * page/DOMWindow.idl:
1684         * platform/SecurityOrigin.cpp:
1685         (WebCore::SecurityOrigin::SecurityOrigin):
1686         (WebCore::SecurityOrigin::create):
1687         (WebCore::SecurityOrigin::createForFrame):
1688         (WebCore::SecurityOrigin::copy):
1689         (WebCore::SecurityOrigin::setDomainFromDOM):
1690         (WebCore::SecurityOrigin::canAccess):
1691         (WebCore::SecurityOrigin::isSecureTransitionTo):
1692         (WebCore::SecurityOrigin::toString):
1693         (WebCore::SecurityOrigin::createFromString):
1694         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
1695         (WebCore::SecurityOrigin::databaseIdentifier):
1696         (WebCore::SecurityOrigin::equal):
1697         (WebCore::SecurityOrigin::isSameSchemeHostPort):
1698         * platform/SecurityOrigin.h:
1699         (WebCore::SecurityOrigin::host):
1700         (WebCore::SecurityOrigin::domain):
1701         * platform/SecurityOriginHash.h:
1702         (WebCore::SecurityOriginTraits::deletedValue):
1703         * storage/DatabaseTracker.cpp:
1704         (WebCore::DatabaseTracker::hasEntryForDatabase):
1705         (WebCore::DatabaseTracker::originPath):
1706         (WebCore::DatabaseTracker::fullPathForDatabase):
1707         (WebCore::DatabaseTracker::populateOrigins):
1708         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1709         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
1710         (WebCore::DatabaseTracker::setDatabaseDetails):
1711         (WebCore::DatabaseTracker::setQuota):
1712         (WebCore::DatabaseTracker::addDatabase):
1713         (WebCore::DatabaseTracker::deleteOrigin):
1714         (WebCore::DatabaseTracker::deleteDatabase):
1715
1716 2008-04-26  Kevin Ollivier  <kevino@theolliviers.com>
1717
1718         wx build fix. Add the AX*ActionVerb functions to the wx build.
1719         
1720         * platform/wx/LocalizedStringsWx.cpp:
1721         (WebCore::AXButtonActionVerb):
1722         (WebCore::AXRadioButtonActionVerb):
1723         (WebCore::AXTextFieldActionVerb):
1724         (WebCore::AXCheckedCheckBoxActionVerb):
1725         (WebCore::AXUncheckedCheckBoxActionVerb):
1726         (WebCore::AXLinkActionVerb):
1727
1728 2008-04-26  Robin Dunn  <robin@alldunn.com>
1729
1730         Reviewed by Kevin Ollivier.
1731
1732         wx build fix. Add needed wx includes for compilation.
1733
1734         https://bugs.webkit.org/show_bug.cgi?id=18758
1735
1736         * platform/wx/FileSystemWx.cpp:
1737
1738 2008-04-26  Anatoli Papirovski  <apapirovski@mac.com>
1739
1740         Reviewed by Dave Hyatt.
1741
1742         Fix for https://bugs.webkit.org/show_bug.cgi?id=18583
1743         WebKit should ignore declarations with a negative value for
1744         line-height and font-size, including in the shorthand font form.
1745
1746         Tests: fast/css/font-size-negative.html
1747                fast/css/line-height-negative.html
1748
1749         * css/CSSParser.cpp:
1750         (WebCore::CSSParser::parseValue):
1751         (WebCore::CSSParser::parseFont):
1752
1753 2008-04-25  Anders Carlsson  <andersca@apple.com>
1754
1755         Reviewed by Sam.
1756
1757         Add empty ApplicationCacheStorage class.
1758         
1759         * WebCore.vcproj/WebCore.vcproj:
1760         * WebCore.xcodeproj/project.pbxproj:
1761         * loader/appcache/ApplicationCacheStorage.cpp: Added.
1762         (WebCore::cacheStorage):
1763         * loader/appcache/ApplicationCacheStorage.h: Added.
1764
1765 2008-04-24  Sam Weinig  <sam@webkit.org>
1766
1767         Reviewed by Geoffrey Garen.
1768
1769         Replace the JSDOMWindow with a new one instead of clearing it.
1770
1771         * bindings/js/JSDOMWindowBase.cpp:
1772         (WebCore::JSDOMWindowBase::clear):
1773         Don't reset the window.
1774
1775         * bindings/js/kjs_proxy.cpp:
1776         (WebCore::KJSProxy::clear):
1777         Replace the current JSDOMWindow stored in the wrapper window
1778         with a new one.
1779
1780         * history/CachedPage.cpp:
1781         (WebCore::CachedPage::CachedPage):
1782         (WebCore::CachedPage::restore):
1783         (WebCore::CachedPage::clear):
1784         * history/CachedPage.h:
1785         Instead of storing the builtins, properties and localstorage in
1786         special holding structs, store the entire JSDOMWindow.
1787
1788         For the case of a page that has no JSDOMWindow before it's first
1789         navigation, has one created while it is in the cache and is then
1790         navigated back, create a new JSDOMWindow to keep the assumption
1791         in JSDOMWindowWrapper that it always has the correct window.
1792
1793         * loader/FrameLoader.cpp:
1794         (WebCore::FrameLoader::clear):
1795         We must clear the DOMWindow first, so that we create a new JSDOMWindow,
1796         it gets a new one.
1797
1798         * page/Frame.cpp:
1799         (WebCore::Frame::clearDOMWindow):
1800         Null out the domWindow so that on the next access, a new one is
1801         created.
1802
1803 2008-04-25  Sam Weinig  <sam@webkit.org>
1804
1805         Reviewed by Mark Rowe.
1806
1807         The EventListeners need to operate and store JSDOMWindows, not JSDOMWrapperWindows.
1808
1809         * bindings/js/JSDOMWindowBase.cpp:
1810         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
1811         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
1812         (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
1813         * bindings/js/JSSVGLazyEventListener.cpp:
1814         (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener):
1815         * bindings/js/JSSVGLazyEventListener.h:
1816         * bindings/js/kjs_events.cpp:
1817         (WebCore::JSAbstractEventListener::handleEvent):
1818         (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener):
1819         (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener):
1820         (WebCore::JSUnprotectedEventListener::window):
1821         (WebCore::JSUnprotectedEventListener::clearWindow):
1822         (WebCore::JSEventListener::JSEventListener):
1823         (WebCore::JSEventListener::~JSEventListener):
1824         (WebCore::JSEventListener::window):
1825         (WebCore::JSEventListener::clearWindow):
1826         (WebCore::JSLazyEventListener::JSLazyEventListener):
1827         (WebCore::JSLazyEventListener::parseCode):
1828         * bindings/js/kjs_events.h:
1829         * bindings/js/kjs_proxy.cpp:
1830         (WebCore::KJSProxy::createHTMLEventHandler):
1831         (WebCore::KJSProxy::createSVGEventHandler):
1832
1833 2008-04-25  Mark Rowe  <mrowe@apple.com>
1834
1835         Rubber-stamped by Sam Weinig.
1836
1837         Add some content to an empty ICU header file to prevent verification errors.
1838
1839         * icu/unicode/utf_old.h:
1840
1841 2008-04-25  Anders Carlsson  <andersca@apple.com>
1842
1843         Fix tyop.
1844         
1845         * loader/DocumentLoader.cpp:
1846         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
1847
1848 2008-04-25  Anders Carlsson  <andersca@apple.com>
1849
1850         Reviewed by Sam.
1851
1852         Add and honor offlineWebApplicationCacheEnabled setting.
1853         
1854         * WebCore.base.exp:
1855         * loader/DocumentLoader.cpp:
1856         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
1857         * loader/MainResourceLoader.cpp:
1858         (WebCore::MainResourceLoader::load):
1859         * loader/appcache/ApplicationCacheGroup.cpp:
1860         (WebCore::ApplicationCacheGroup::selectCache):
1861         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
1862         * page/Settings.cpp:
1863         (WebCore::Settings::Settings):
1864         (WebCore::Settings::setOfflineWebApplicationCacheEnabled):
1865         * page/Settings.h:
1866         (WebCore::Settings::offlineWebApplicationCacheEnabled):
1867
1868 2008-04-25  Anders Carlsson  <andersca@apple.com>
1869
1870         Reviewed by Adam.
1871
1872         <rdar://problem/5629139>
1873         PluginInfoStoreWin needs to implement pluginNameForMIMEType().
1874         
1875         * plugins/PluginInfoStore.cpp:
1876         (WebCore::PluginInfoStore::pluginNameForMIMEType):
1877
1878 2008-04-25  Tor Arne Vestbø  <tavestbo@trolltech.com>
1879
1880         Reviewed by Simon.
1881
1882         Respect antialiasing hint when drawing focus rects.
1883
1884         * platform/graphics/qt/GraphicsContextQt.cpp:
1885         (WebCore::GraphicsContext::drawFocusRing):
1886
1887 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
1888
1889         Reviewed by Simon.
1890
1891         networking: Use Qt::QueuedConnection in QNetworkReplyHandler
1892
1893         Make sure we leave the networking backend before calling
1894         into WebCore. Otheriwse we might return to the networking
1895         backend when it is already deleted.
1896
1897         * platform/network/qt/QNetworkReplyHandler.cpp:
1898         (WebCore::FormDataIODevice::setParent):
1899         (WebCore::QNetworkReplyHandler::start):
1900
1901 2008-04-25  Tor Arne Vestbø  <tavestbo@trolltech.com>
1902
1903         Reviewed by Simon.
1904
1905         Fix propagation of mouse double click events.
1906
1907         Treat a mouse double click as a regular mouse press with just a different click count.
1908
1909         * platform/qt/PlatformMouseEventQt.cpp:
1910         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1911
1912 2008-04-25  Tor Arne Vestbø  <tavestbo@trolltech.com>
1913
1914         Reviewed by Simon.
1915
1916         Fixes: Fix strange button sizes (push, radio, and check) in QtWebKit.
1917
1918         We now use pixel metrics instead of fixed sizes for the
1919         button margins, or if the style supports layout rects we
1920         use the delta between the content rect and the layout rect.
1921
1922         In adition we compensate for the difference between the size
1923         for content and the actual layout rect (if supported) by
1924         reporting back the layout rect to WebKit for page layout,
1925         and then inflating the rect we actually paint to.
1926
1927         * platform/qt/RenderThemeQt.cpp:
1928         (WebCore::StylePainter::StylePainter):
1929         (WebCore::StylePainter::~StylePainter):
1930         (WebCore::RenderThemeQt::RenderThemeQt):
1931         (WebCore::inflateButtonRect):
1932         (WebCore::RenderThemeQt::adjustRepaintRect):
1933         (WebCore::RenderThemeQt::isControlStyled):
1934         (WebCore::computeSizeBasedOnStyle):
1935         (WebCore::RenderThemeQt::setCheckboxSize):
1936         (WebCore::RenderThemeQt::paintCheckbox):
1937         (WebCore::RenderThemeQt::setRadioSize):
1938         (WebCore::RenderThemeQt::adjustButtonStyle):
1939         (WebCore::RenderThemeQt::setButtonSize):
1940         (WebCore::RenderThemeQt::setButtonPadding):
1941         (WebCore::RenderThemeQt::paintButton):
1942         (WebCore::RenderThemeQt::adjustMenuListStyle):
1943         (WebCore::RenderThemeQt::setPopupPadding):
1944         (WebCore::RenderThemeQt::paintMenuList):
1945         * platform/qt/RenderThemeQt.h:
1946
1947 2008-04-25  Benjamin Meyer  <bmeyer@trolltech.com>
1948
1949         Reviewed by Holger.
1950
1951         Fixes: Valgrind warnings about uninitilized variables used in jumps
1952
1953         * rendering/RenderText.cpp:
1954         (WebCore::RenderText::trimmedPrefWidths):
1955
1956 2008-04-25  Warwick Allison  <warwick@trolltech.com>
1957
1958         Reviewed by Simon.
1959
1960         Added simple getter function to PlatformScrollBar to return the
1961         maximum value. Needed in the WebKit/qt API.
1962
1963         * platform/qt/PlatformScrollBar.h:
1964
1965 2008-04-25  Benjamin Meyer  <bmeyer@trolltech.com>
1966
1967         Reviewed by Holger, Simon.
1968
1969         Implement NoDrop, ZoomIn, and ZoomOut cursors
1970
1971         * Resources/WebKitResources.qrc:
1972         * platform/qt/CursorQt.cpp:
1973         (WebCore::noDropCursor):
1974         (WebCore::notAllowedCursor):
1975         (WebCore::zoomInCursor):
1976         (WebCore::zoomOutCursor):
1977
1978 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
1979
1980         Reviewed by Simon.
1981
1982         Handle the ListboxAppearance as 'TextField' as well. We are mainly interested in the background.
1983
1984         RenderBox will call us to paint the outline/background, it is handled the same as a
1985         TextAreaAppearance in RenderTheme, handle it the same in the RenderThemeQt
1986
1987         * platform/qt/RenderThemeQt.cpp:
1988         (WebCore::RenderThemeQt::paintTextField):
1989
1990 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
1991
1992         Reviewed by Simon.
1993
1994         No reason to exit the application when we can not paint something. Replace the Q_ASSERT
1995         with a runtime check. Return true to indicate that we did not handle the painting
1996         of this element.
1997
1998         * platform/qt/RenderThemeQt.cpp:
1999         (WebCore::RenderThemeQt::paintTextField):
2000
2001 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
2002
2003         Reviewed by Simon.
2004
2005         Correct the comment. We are in painTextField and don't paint a button.
2006
2007         * platform/qt/RenderThemeQt.cpp:
2008         (WebCore::RenderThemeQt::paintTextField):
2009
2010 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
2011
2012         Reviewed by Simon.
2013
2014         Allow ListboxAppearance to take focus as well. Stolen from Tor Arne
2015
2016         * platform/qt/RenderThemeQt.cpp:
2017         (WebCore::RenderThemeQt::supportsFocus):
2018
2019 2008-04-25  Simon Hausmann  <hausmann@webkit.org>
2020
2021         Reviewed by Holger.
2022
2023         Remove debug output.
2024
2025         * platform/network/qt/ResourceHandleQt.cpp:
2026         (WebCore::ResourceHandle::loadResourceSynchronously):
2027
2028 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
2029
2030         Reviewed by Simon.
2031
2032         Change the string for searchableIndexIntroduction() to match the mac
2033         and pass http/tests/misc/isindex-formdata.html
2034
2035         * platform/qt/Localizations.cpp:
2036
2037 2008-04-25  Simon Hausmann  <hausmann@webkit.org>
2038
2039         Reviewed by Holger.
2040
2041         When we encounter a new/unknown HTTP request type report it back to WebCore as loading error.
2042
2043         * platform/network/qt/QNetworkReplyHandler.cpp:
2044         (WebCore::QNetworkReplyHandler::start):
2045
2046 2008-04-25  Benjamin Meyer  <bmeyer@trolltech.com>
2047
2048         Reviewed by Simon.
2049
2050         Fix crash in the networking layer.
2051
2052         Set the m_reply to null right after calling deleteLater().
2053
2054         * platform/network/qt/QNetworkReplyHandler.cpp:
2055         (WebCore::QNetworkReplyHandler::finish):
2056
2057 2008-04-24  Mark Rowe  <mrowe@apple.com>
2058
2059         Rubber-stamped by Oliver Hunt.
2060
2061         * WebCore.base.exp: Remove two symbols from the export list that don't need to be exported.
2062
2063 2008-04-24  Dan Bernstein  <mitz@apple.com>
2064
2065         Reviewed by Dave Hyatt.
2066
2067         - fix https://bugs.webkit.org/show_bug.cgi?id=18722
2068           <rdar://problem/5888360> REGRESSION (3.1 -> TOT): Webkit Nightly Build crashes when visiting i has a hotdog
2069
2070         Test: fast/dynamic/float-remove-above-line.html
2071
2072         * rendering/bidi.cpp:
2073         (WebCore::RenderBlock::layoutInlineChildren): Avoid adding floats that
2074         do not intrude into the line to its floats vector. When such floats go
2075         away, they do not dirty the line (because they do not intersect with it)
2076         and having it keep them in its floats vector is what caused the crash.
2077
2078 2008-04-24  Justin Garcia  <justin.garcia@apple.com>
2079
2080         Reviewed by John Sullivan.
2081         
2082         It is possible, despite our safeguards, for createMarkup to iterate past the end of the Range
2083         that is passed to it.  Added a null check to prevent crashes in this situation (we won't crash but
2084         we will create too much markup), and added an ASSERT to hopefully catch the scenario in a debugger 
2085         and help us understand what's going on.
2086
2087         * editing/markup.cpp:
2088         (WebCore::createMarkup):
2089
2090 2008-04-24  Mark Rowe  <mrowe@apple.com>
2091
2092         Reviewed by Sam Weinig.
2093
2094         Remove code for calculating the glyph cache size.
2095
2096         * WebCore.base.exp: Remove unused symbol.
2097         * platform/graphics/mac/FontCacheMac.mm: Remove code that is unused now that we do not compute the glyph cache size.
2098         * platform/mac/WebCoreSystemInterface.h: Remove unused symbol.
2099         * platform/mac/WebCoreSystemInterface.mm: Ditto.
2100
2101 2008-04-24  Mark Rowe  <mrowe@apple.com>
2102
2103         Reviewed by Sam Weinig.
2104
2105         Add a definition of BUILDING_ON_LEOPARD to complement BUILDING_ON_TIGER.
2106
2107         * WebCorePrefix.h:
2108
2109 2008-04-24  Cameron McCormack  <cam@mcc.id.au>
2110
2111         Reviewed by Maciej Stachowiak.
2112
2113         Ensure that changes to rx="" and ry="" attributes on an SVG <rect>
2114         element cause a relayout.
2115
2116         Test: svg/dom/SVGRectElement/rect-modify-rx.svg
2117
2118         * svg/SVGRectElement.cpp:
2119         (WebCore::SVGRectElement::svgAttributeChanged): Call needsLayout()
2120         when the attribute is rx or ry.
2121         (WebCore::SVGRectElement::hasRelativeValues): Return true when the
2122         attribute is rx or ry, since they also can have relative values.
2123
2124 2008-04-24  Adam Barth  <hk9565@gmail.com>
2125
2126         Reviewed by Sam Weinig.
2127
2128         Update the XMLHttpRequest header black list to match the spec.
2129
2130         * xml/XMLHttpRequest.cpp:
2131         (WebCore::isSafeRequestHeader):
2132
2133 2008-04-22  Feng Qian  <ian.eng.webkit@gmail.com>
2134
2135         Reviewed by Geoff Garen.
2136
2137         Fix https://bugs.webkit.org/show_bug.cgi?id=18677
2138         Bug 18677: Synchronous event dispatch confuses the popup blocker into incorrectly blocking chat popups in gmail.com.
2139
2140         Test: fast/events/nested-window-event.html
2141
2142         * bindings/js/kjs_events.cpp:
2143         (WebCore::JSAbstractEventListener::handleEvent): Save and restore the current event around the event dispatch.
2144
2145 2008-04-24  Brady Eidson  <beidson@apple.com>
2146
2147         Reviewed by Teh Mitzpettel
2148
2149         Make it so PageGroups know what their own name is.
2150
2151         * WebCore.base.exp:
2152
2153         * page/Page.cpp:
2154         (WebCore::Page::setGroupName):
2155         (WebCore::Page::groupName):
2156         * page/Page.h:
2157
2158         * page/PageGroup.cpp: Move the PageGroupMap into the PageGroup class.
2159         (WebCore::PageGroup::PageGroup): Added a c'tor that takes the group name as an argument instead of
2160           the initial Page.
2161         (WebCore::PageGroup::pageGroup): Handles creating and mapping names to groups
2162         * page/PageGroup.h:
2163         (WebCore::PageGroup::name):
2164
2165 2008-04-24  Adele Peterson  <adele@apple.com>
2166
2167         Reviewed by Darin.
2168
2169         Consolidate two versions of pathGetFileName.
2170
2171         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formData): Call FileSystem.h version of pathGetFileName and removed the static helper function.
2172         * platform/posix/FileSystemPOSIX.cpp: (WebCore::pathGetFileName): Moved general case from HTMLFormElement version here.
2173           If other platforms relied on that default they should implement this function for their platform specific version of FileSystem.cpp
2174         * platform/win/FileSystemWin.cpp: (WebCore::pathGetFileName): Moved win implementation from HTMLFormElement here.
2175         * platform/wx/FileSystemWx.cpp: (WebCore::pathGetFileName): Moved wx implementation from HTMLFormElement here.
2176
2177 2008-04-24  Anders Carlsson  <andersca@apple.com>
2178
2179         Windows build fix.
2180         
2181         * html/HTMLFormElement.cpp:
2182         (WebCore::pathGetFilename):
2183
2184 2008-04-24  Anders Carlsson  <andersca@apple.com>
2185
2186         Don't crash when the string is empty.
2187         
2188         * html/HTMLMediaElement.cpp:
2189         (WebCore::parseTimeOffset):
2190
2191 2008-04-24  Dan Bernstein  <mitz@apple.com>
2192
2193         Reviewed by Darin Adler.
2194
2195         - preparation for https://bugs.webkit.org/show_bug.cgi?id=3729
2196           <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
2197
2198         The three main changes in this patch are:
2199
2200         1) Making all inline boxes know their bidi level, instead of just text
2201            boxes knowing whether their bidi level is odd or even. This is
2202            required for the next change.
2203
2204         2) Replacing RenderObject::inlineBox() with
2205            Position::getInlineBoxAndOffset() in recognition of the fact that the
2206            inline box containing the primary caret for a position in a given
2207            node may belong to a different node's renderer.
2208
2209         3) Changing RenderObject::caretRect() to take an InlineBox parameter,
2210            and changing callers to call VisiblePosition::caretRect(), which
2211            locates the inline box, then calls caretRect() on the renderer for
2212            that box. This, combined with the previous change, ensures that the
2213            primary caret is rendered at the right place for positions that
2214            lie on a directionality boundary.
2215
2216         Test: platform/mac/editing/input/caret-primary-bidi.html
2217
2218         * WebCore.base.exp: Added the VisiblePosition(Node*, int, EAffinity)
2219         constructor and VisiblePosition::caretRect(), and sorted.
2220
2221         * dom/Position.cpp:
2222         (WebCore::nextRenderedEditable): Adjusted for the removal of
2223         RenderObject::inlineBox().
2224         (WebCore::previousRenderedEditable): Ditto.
2225         (WebCore::Position::rendersInDifferentPosition): Ditto.
2226         (WebCore::Position::getInlineBoxAndOffset): Added. Gets the inline box
2227         and the offset within that box at which the primary caret for this
2228         position should render.
2229
2230         * dom/Position.h:
2231
2232         * editing/DeleteSelectionCommand.cpp:
2233         (WebCore::DeleteSelectionCommand::mergeParagraphs): Changed to call
2234         VisiblePosition::caretRect() instead of calling the RenderObject method.
2235
2236         * editing/SelectionController.cpp:
2237         (WebCore::caretY): Ditto.
2238         (WebCore::SelectionController::xPosForVerticalArrowNavigation): Ditto.
2239         (WebCore::SelectionController::layout): Ditto.
2240
2241         * editing/VisiblePosition.cpp:
2242         (WebCore::VisiblePosition::caretRect): Changed to call
2243         getInlineBoxAndOffset() to get the correct inline box and call the
2244         renderer for that box.
2245
2246         * editing/VisiblePosition.h:
2247         (WebCore::VisiblePosition::getInlineBoxAndOffset): Added convenience
2248         methods for getting the inline box and caret offset for a visible
2249         position, accounting for its affinity.
2250
2251         * editing/visible_units.cpp:
2252         (WebCore::rootBoxForLine): Changed to use getInlineBoxAndOffset()
2253         instead of RenderObject::inlineBox().
2254         (WebCore::startPositionForLine):
2255         (WebCore::endPositionForLine):
2256         (WebCore::previousLinePosition): Ditto.
2257         (WebCore::nextLinePosition): Ditto.
2258
2259         * page/AccessibilityObject.cpp:
2260         (WebCore::updateAXLineStartForVisiblePosition): Ditto.
2261
2262         * page/Frame.cpp:
2263         (WebCore::Frame::firstRectForRange): Ditto.
2264
2265         * rendering/InlineBox.cpp:
2266         (WebCore::InlineBox::caretMinOffset): Changed to forward to the
2267         renderer.
2268         (WebCore::InlineBox::caretMaxOffset): Ditto.
2269         * rendering/InlineBox.h: Replaced the m_reversed bit, intended for use
2270         in InlineTextBox only, with six bits of the bidi level of the box,
2271         intended for use in all leaf inline boxes.
2272         (WebCore::InlineBox::InlineBox): Added missing initializer for
2273         m_dirOverride and initialized the bidi level.
2274         (WebCore::InlineBox::bidiLevel): Added this accessor.
2275         (WebCore::InlineBox::setBidiLevel): Ditto.
2276         (WebCore::InlineBox::direction): Ditto.
2277         (WebCore::InlineBox::caretLeftmostOffset): Added this convenience
2278         method.
2279         (WebCore::InlineBox::caretRightmostOffset): Ditto.
2280
2281         * rendering/InlineTextBox.cpp: Replaced all references to m_reversed
2282         with checking of direction().
2283         (WebCore::InlineTextBox::selectionRect):
2284         (WebCore::InlineTextBox::placeEllipsisBox):
2285         (WebCore::InlineTextBox::paint):
2286         (WebCore::InlineTextBox::paintSelection):
2287         (WebCore::InlineTextBox::paintCompositionBackground):
2288         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
2289         (WebCore::InlineTextBox::paintTextMatchMarker):
2290         (WebCore::InlineTextBox::textPos):
2291         (WebCore::InlineTextBox::offsetForPosition):
2292         (WebCore::InlineTextBox::positionForOffset):
2293
2294         * rendering/RenderBR.cpp: Removed inlineBox().
2295         * rendering/RenderBR.h: Ditto.
2296
2297         * rendering/RenderBox.cpp:
2298         (WebCore::RenderBox::caretRect): Changed to take an inline box and
2299         account for the direction of the box (or the renderer) in positioning
2300         the caret: in right-to-left boxes, the "before" position is to the right
2301         while "after" is to the left.
2302         * rendering/RenderBox.h:
2303
2304         * rendering/RenderFlow.cpp:
2305         (WebCore::RenderFlow::caretRect): Updated the signature.
2306         * rendering/RenderFlow.h:
2307
2308         * rendering/RenderObject.cpp:
2309         (WebCore::RenderObject::caretRect): Updated the signature.
2310         (WebCore::RenderObject::caretMaxOffset): Changed to return the child
2311         node count (or 1 if there are no children) for replaced elements, such
2312         as <select>s.
2313         * rendering/RenderObject.h:
2314
2315         * rendering/RenderReplaced.cpp: Removed caretMinOffset() and
2316         caretMaxOffset() because the base class implementation does the right
2317         thing for replaced objects now.
2318         * rendering/RenderReplaced.h:
2319
2320         * rendering/RenderSVGInlineText.cpp:
2321         (WebCore::RenderSVGInlineText::caretRect): Updated the signature.
2322         (WebCore::RenderSVGInlineText::positionForCoordinates): Updated for
2323         the change from m_reversed to direction().
2324         * rendering/RenderSVGInlineText.h:
2325
2326         * rendering/RenderText.cpp:
2327         (WebCore::RenderText::caretRect): Changed to take an inline box and
2328         removed the code that used to find the inline for the given position.
2329         Changed use of m_reversed to use direction().
2330         (WebCore::RenderText::position): Changed use of m_reversed to use
2331         direction().
2332         * rendering/RenderText.h:
2333
2334         * rendering/RenderTextControl.cpp:
2335         (WebCore::RenderTextControl::textWithHardLineBreaks): Adjusted for the
2336         removal of RenderObject::inlineBox().
2337
2338         * rendering/RenderTreeAsText.cpp:
2339         (WebCore::writeTextRun): Changed to use direction() instead of
2340         m_reversed.
2341
2342         * rendering/SVGInlineTextBox.cpp: Ditto.
2343         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
2344         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
2345         (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
2346
2347         * rendering/SVGRenderTreeAsText.cpp: Ditto.
2348         (WebCore::writeSVGInlineTextBox):
2349
2350         * rendering/SVGRootInlineBox.cpp: Ditto.
2351         (WebCore::svgTextRunForInlineTextBox):
2352         (WebCore::cummulatedWidthOrHeightOfTextChunk):
2353         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
2354
2355         * rendering/bidi.cpp:
2356         (WebCore::RenderBlock::constructLine): Made this function set the
2357         bidi level on all leaf boxes.
2358
2359         * svg/SVGTextContentElement.cpp: Changed to use direction() instead of
2360         m_reversed.
2361         (WebCore::cumulativeCharacterRangeLength):
2362         (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
2363
2364 2008-04-24  Sam Weinig  <sam@webkit.org>
2365
2366         Fix the world.
2367
2368         * bindings/js/kjs_proxy.cpp:
2369         (WebCore::KJSProxy::clear):
2370
2371 2008-04-24  Darin Adler  <darin@apple.com>
2372
2373         Reviewed by Geoff.
2374
2375         - fix crash in regression test where we'd ask a frame for a user agent string
2376           after the WebView was already closed
2377
2378         * loader/FrameLoader.cpp:
2379         (WebCore::FrameLoader::scheduleHTTPRedirection): Quietly do nothing if this is
2380         called on a frame that's already detached from its page.
2381         (WebCore::FrameLoader::scheduleLocationChange): Ditto.
2382         (WebCore::FrameLoader::scheduleRefresh): Ditto.
2383         (WebCore::FrameLoader::scheduleHistoryNavigation): Ditto.
2384         (WebCore::FrameLoader::redirectionTimerFired): Assert that this is never called
2385         for a frame that's already detached from its page.
2386         (WebCore::FrameLoader::scheduleRedirection): Ditto.
2387         (WebCore::FrameLoader::startRedirectionTimer): Ditto.
2388
2389 2008-04-23  Timothy Hatcher  <timothy@apple.com>
2390
2391         Add a new callFunction helper function to remove duplicate code
2392         for calling JavaScript functions with arguments.
2393
2394         Reviewed by Darin Adler.
2395
2396         * page/InspectorController.cpp:
2397         (WebCore::InspectorController::callSimpleFunction): Call callFunction.
2398         (WebCore::InspectorController::callFunction): Extended version of the original
2399         callSimpleFunction, with script function arguments and an exception argument.
2400         (WebCore::InspectorController::focusNode): Use callFunction.
2401         (WebCore::InspectorController::addScriptResource): Ditto.
2402         (WebCore::InspectorController::removeScriptResource): Ditto.
2403         (WebCore::InspectorController::addDatabaseScriptResource): Ditto.
2404         (WebCore::InspectorController::removeDatabaseScriptResource): Ditto.
2405         (WebCore::InspectorController::addScriptConsoleMessage): Ditto.
2406         * page/InspectorController.h: Add callFunction.
2407
2408 2008-04-24  Anders Carlsson  <andersca@apple.com>
2409
2410         Reviewed by Sam.
2411
2412         Change some String arguments to be const references instead.
2413         
2414         * css/CSSRule.cpp:
2415         (WebCore::CSSRule::setCssText):
2416         * css/CSSRule.h:
2417         * html/HTMLFormElement.cpp:
2418         (WebCore::pathGetFilename):
2419         * html/HTMLMediaElement.cpp:
2420         (WebCore::parseTimeOffset):
2421         * page/EditorClient.h:
2422         * platform/SecurityOrigin.cpp:
2423         (WebCore::isDefaultPortForProtocol):
2424         * platform/graphics/MediaPlayer.cpp:
2425         (WebCore::MediaPlayer::load):
2426         * platform/graphics/MediaPlayer.h:
2427         * rendering/MediaControlElements.cpp:
2428         (WebCore::MediaControlInputElement::MediaControlInputElement):
2429         * rendering/MediaControlElements.h:
2430         * svg/animation/SVGSMILElement.cpp:
2431         (WebCore::SVGSMILElement::Condition::Condition):
2432         * svg/animation/SVGSMILElement.h:
2433         * svg/graphics/SVGImageEmptyClients.h:
2434         (WebCore::SVGEmptyEditorClient::shouldInsertText):
2435         * xml/XSLTProcessor.cpp:
2436         (WebCore::createFragmentFromSource):
2437
2438 2008-04-24  Justin Garcia  <justin.garcia@apple.com>
2439
2440         Reviewed by Darin Adler.
2441
2442         <rdar://problem/5604313> FormatBlock to apply an h1 also inserts a style span around the first letter (16004)
2443         
2444         * editing/TextIterator.cpp:
2445         (WebCore::TextIterator::advance): We emit an extra newline when leaving a
2446         block element that has atypical margin/padding. When we emit the extra newline, 
2447         it needs to be positioned after that block's contents, not after the block. 
2448         This is how we position the first newline, too, since the range for emitted newlines 
2449         should start where the line break begins visually.
2450
2451 2008-04-24  Anders Carlsson  <andersca@apple.com>
2452
2453         Reviewed by Adam.
2454
2455         Only avoid implicit entries when doing the initial caching.
2456         
2457         * loader/appcache/ApplicationCacheGroup.cpp:
2458         (WebCore::ApplicationCacheGroup::didReceiveResponse):
2459         (WebCore::ApplicationCacheGroup::startLoadingEntry):
2460
2461 2008-04-24  Kevin McCullough  <kmccullough@apple.com>
2462
2463         Reviewed by Adam and Sam.
2464
2465         -<rdar://problem/5770054> JavaScript profiler (10928)
2466         -Only profile the page group that starts profiling to avoid profiling
2467         tools that shouldn't be profiled unless explicitly requested to.
2468
2469         * bindings/js/kjs_proxy.cpp: When a new global object is created set its
2470         page group identifier.
2471         (WebCore::KJSProxy::clear):
2472         (WebCore::KJSProxy::initScript):
2473         * page/Console.cpp: When calling console.profile set the identifier of
2474         the page group being profiled.
2475         (WebCore::Console::profile):
2476         * page/PageGroup.cpp: Implement unique identifiers.
2477         (WebCore::getUniqueIdentifier):
2478         (WebCore::PageGroup::PageGroup):
2479         * page/PageGroup.h: Ditto.
2480         (WebCore::PageGroup::identifier):
2481
2482 2008-04-24  John Sullivan  <sullivan@apple.com>
2483
2484         Mac buid fix
2485
2486         * page/mac/WebCoreViewFactory.h:
2487         add declarations of six new AX methods that were added to LocalizedStrings.h
2488         
2489         * platform/mac/LocalizedStringsMac.mm:
2490         (WebCore::AXButtonActionVerb):
2491         implement by calling through to WebCoreViewFactory as we do with the other functions here
2492         (WebCore::AXRadioButtonActionVerb):
2493         ditto
2494         (WebCore::AXTextFieldActionVerb):
2495         ditto
2496         (WebCore::AXCheckedCheckBoxActionVerb):
2497         ditto
2498         (WebCore::AXUncheckedCheckBoxActionVerb):
2499         ditto
2500         (WebCore::AXLinkActionVerb):
2501         ditto
2502
2503 2008-04-24  Simon Hausmann  <hausmann@webkit.org>
2504
2505         Rubber-stamped by Lars
2506
2507         Fix text rendering in -reverse mode on Qt/Mac.
2508
2509         For Font::width() don't use a plain QFontMetrics object but also the properly
2510         setup QTextLayout that has the RTL/LTR force flags set.
2511
2512         * platform/graphics/qt/FontQt.cpp:
2513         (WebCore::Font::width):
2514
2515 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
2516
2517         Reviewed by Simon.
2518
2519         Don't do anti-aliasing for arcs, lines and rects, but continue to anti-alias
2520         all drawing primitives in the HTML Canvas element.
2521
2522         This speeds up drawing of dashed outlines significantly.
2523
2524         Also preserve the anti-aliasing renderhint for transparency layers and
2525         get rid of the mostly unused device pointer.
2526
2527         * platform/graphics/qt/GraphicsContextQt.cpp:
2528         (WebCore::TransparencyLayer::TransparencyLayer):
2529         (WebCore::GraphicsContextPlatformPrivate::p):
2530         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2531         (WebCore::GraphicsContext::beginTransparencyLayer):
2532         (WebCore::GraphicsContext::drawRect):
2533         (WebCore::GraphicsContext::drawLine):
2534         (WebCore::GraphicsContext::strokeArc):
2535
2536 2008-04-24  Paul Olav Tvete <paul@trolltech.com>
2537
2538         Reviewed by Simon.
2539
2540         Fix various compiler warnings related to QString(const char *)
2541         construction by using QLatin1String.
2542
2543         * bridge/qt/qt_instance.cpp:
2544         (KJS::Bindings::QtField::valueFromInstance):
2545         (KJS::Bindings::QtField::setValueToInstance):
2546         * dom/XMLTokenizer.cpp:
2547         (WebCore::):
2548         * platform/graphics/qt/PathQt.cpp:
2549         (WebCore::Path::debugString):
2550
2551 2008-04-24  Morten Johan Sørvig  <msorvig@trolltech.com>
2552
2553         Reviewed by Simon.
2554
2555         Work around QMacStyle bug in repainting the vertical scrollbar.
2556
2557         We draw the scrollbar using HITheme but somehow the translation and the
2558         clipping we previously set using ClipCGContextToRegion is ignored. Drawing
2559         without the translation fixes the clip.
2560
2561         * platform/qt/PlatformScrollBarQt.cpp:
2562         (WebCore::PlatformScrollbar::paint):
2563
2564 2008-04-24  Holger Hans Peter Freyther  <zecke@selfish.org>
2565
2566         Reviewed by Simon.
2567
2568         * Set an expiration date for local files as we do not know what will happen
2569         to these files (in contrast to a http server with max-age and other headers)
2570         * Remember the time when we started the job and use that for the expiration date
2571         * QNetworkManager does not handle expiration at all, we might want to set the
2572         expiration for all downloads but this will be a performance nightmare.
2573
2574         * platform/network/qt/QNetworkReplyHandler.cpp:
2575         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
2576         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2577         (WebCore::QNetworkReplyHandler::start):
2578         * platform/network/qt/QNetworkReplyHandler.h:
2579
2580 2008-04-24  Simon Hausmann  <hausmann@webkit.org>
2581
2582         Fix the Gtk and Qt builds.
2583
2584         Added missing localization stubs for accessibility.
2585
2586         * platform/gtk/LocalizedStringsGtk.cpp:
2587         (WebCore::AXButtonActionVerb):
2588         (WebCore::AXRadioButtonActionVerb):
2589         (WebCore::AXTextFieldActionVerb):
2590         (WebCore::AXCheckedCheckBoxActionVerb):
2591         (WebCore::AXUncheckedCheckBoxActionVerb):
2592         (WebCore::AXLinkActionVerb):
2593         * platform/qt/Localizations.cpp:
2594         (WebCore::AXButtonActionVerb):
2595         (WebCore::AXRadioButtonActionVerb):
2596         (WebCore::AXTextFieldActionVerb):
2597         (WebCore::AXCheckedCheckBoxActionVerb):
2598         (WebCore::AXUncheckedCheckBoxActionVerb):
2599         (WebCore::AXLinkActionVerb):
2600
2601 2008-04-24  Olivier Goffart  <ogoffart@trolltech.com>
2602
2603         Reviewed by Simon
2604
2605         Fix various compiler warnings in the Qt port.
2606
2607         * platform/graphics/qt/ImageQt.cpp:
2608         (loadResourcePixmap):
2609         * platform/qt/CookieJarQt.cpp:
2610         (WebCore::cookies):
2611         * platform/qt/ScrollViewQt.cpp:
2612         (WebCore::ScrollView::wheelEvent):
2613         * plugins/qt/PluginDataQt.cpp:
2614         (WebCore::PluginData::initPlugins):
2615
2616 2008-04-24  Andre Poenitz  <andre.poenitz@trolltech.com>
2617
2618         Reviewed by Simon.
2619
2620         Removed spurious QHideEvent forward declaration.
2621
2622         * platform/qt/QWebPopup.h:
2623
2624 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
2625
2626         Reviewed by Simon.
2627
2628         Render text areas using Qt (ensures proper style).
2629
2630         * platform/qt/RenderThemeQt.cpp:
2631         (WebCore::RenderThemeQt::paintTextField):
2632         (WebCore::RenderThemeQt::adjustTextFieldStyle):
2633         (WebCore::RenderThemeQt::paintTextArea):
2634         (WebCore::RenderThemeQt::supportsFocus):
2635         * platform/qt/RenderThemeQt.h:
2636
2637 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
2638
2639         Reviewed by Simon.
2640
2641         Make mouse wheel events over scrollbars behave the same as in Qt, i.e. both
2642         horizontal and vertical wheel events will scroll the view in the orientation
2643         of the scrollbar underneath the cursor.
2644
2645         * platform/qt/ScrollViewQt.cpp:
2646         (WebCore::ScrollView::paint):
2647         (WebCore::ScrollView::wheelEvent):
2648
2649 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
2650
2651         Reviewed by Brady.
2652
2653         * page/AccessibilityObject.cpp:
2654         (WebCore::AccessibilityObject::press): Return false if this object
2655         doesn't have an action element associated with it.
2656         * page/AccessibilityObject.h: Added a performDefaultAction() method,
2657         which just calls press(). Marked press() const and changed its return
2658         type to bool.
2659
2660 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
2661
2662         Reviewed by Adam.
2663
2664         Don't allow a hit test to return an AccessibilityObject that should be
2665         ignored.
2666
2667         * page/AccessibilityObject.cpp:
2668         (WebCore::AccessibilityObject::doAccessibilityHitTest): If this result
2669         object's accessibility is ignored, return the parent unignored object.
2670
2671 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
2672
2673         Reviewed by Adam.
2674
2675         Fix a crash when performing a hit test on an AccessibilityObject with
2676         no layer (e.g., an AccessibilityObject for a RenderText object).
2677
2678         * page/AccessibilityObject.cpp:
2679         (WebCore::AccessibilityObject::doAccessibilityHitTest): Added a null
2680         check for layer. Removed a null check for m_renderer, which shouldn't
2681         occur.
2682
2683 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
2684
2685         * page/AccessibilityObject.cpp:
2686         (WebCore::AccessibilityObject::boundingBoxRect): Added FIXME about this
2687         method not working correctly for objects with CSS transforms applied.
2688
2689 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
2690
2691         Reviewed by Adam.
2692
2693         Implement contentsToScreen() and screenToContents() on Windows.
2694
2695         * platform/ScrollView.h: Make these declarations conditional on
2696         HAVE(ACCESSIBILITY) instead of PLATFORM(MAC).
2697         * platform/win/ScrollViewWin.cpp:
2698         (WebCore::ScrollView::contentsToScreen): Translate from coordinates
2699         relative to the ScrollView to coordinates relative to the screen. Do
2700         this by getting the offset of the ScrollView in screen coordinates and
2701         moving the rect by this amount.
2702         (WebCore::ScrollView::screenToContents): Translate from coordinates
2703         relative to the screen to coordinates relative to the ScrollView.
2704
2705 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
2706
2707         Reviewed by Oliver.
2708
2709         Add a method to get a localized, human-readable string stating this
2710         object's default action, e.g., a button's default action is "press."
2711
2712         * page/AccessibilityObject.cpp:
2713         (WebCore::AccessibilityObject::actionVerb): Added.
2714         * page/AccessibilityObject.h: Added declaration for actionVerb().
2715         * platform/LocalizedStrings.h: Added declarations for:
2716             AXButtonActionVerb()
2717             AXRadioButtonActionVerb()
2718             AXTextFieldActionVerb()
2719             AXCheckedCheckBoxActionVerb()
2720             AXUncheckedCheckBoxActionVerb()
2721             AXLinkActionVerb()
2722
2723 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
2724
2725         Reviewed by Simon.
2726
2727         Cleaned up copyright headers in the Qt port (removed misplaced class
2728         descriptions and fixed inconsistent whitespace and indentation).
2729
2730         * platform/graphics/qt/FontQt.cpp:
2731         * platform/qt/WheelEventQt.cpp:
2732
2733 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
2734
2735         Reviewed by Simon.
2736
2737         Disable vanlilla focus rings since Qt provides this as part of the style.
2738
2739         * platform/qt/RenderThemeQt.cpp:
2740
2741 2008-04-24  George Staikos  <george@staikos.net>
2742
2743         Reviewed by Simon.
2744
2745         This optimization in BitmapImage::drawPattern for the identity
2746         transform is bogus and causes incorrect results on sites like youtube.
2747
2748         * platform/graphics/qt/ImageQt.cpp:
2749         (WebCore::BitmapImage::drawPattern):
2750
2751 2008-04-23  Brady Eidson  <beidson@apple.com>
2752
2753         Reviewed by Jon Honeycutt
2754
2755         Preparing for making LocalStorageAreas persistent.
2756
2757         Since LocalStorageAreas will need to do a lot of additional work for each of the basic
2758         operations a Storage object supports, this patch makes the API entry points virtual so
2759         LocalStorageArea can override them.  The behavior for both Local and Session StorageAreas
2760         is unchanged with this patch, but LocalStorageArea will override them in the future.
2761
2762         * storage/StorageArea.cpp: Rename the implementations to internalFoo
2763         (WebCore::StorageArea::internalLength):
2764         (WebCore::StorageArea::internalKey):
2765         (WebCore::StorageArea::internalGetItem):
2766         (WebCore::StorageArea::internalSetItem):
2767         (WebCore::StorageArea::internalRemoveItem):
2768         (WebCore::StorageArea::internalContains):
2769
2770         * storage/StorageArea.h: Call internalFoo variants
2771         (WebCore::StorageArea::length):
2772         (WebCore::StorageArea::key):
2773         (WebCore::StorageArea::getItem):
2774         (WebCore::StorageArea::setItem):
2775         (WebCore::StorageArea::removeItem):
2776         (WebCore::StorageArea::contains):
2777
2778 2008-04-23  David Hyatt  <hyatt@apple.com>
2779
2780         Implement getComputedStyle for border-image.
2781
2782         Reviewed by Dan Bernstein
2783
2784         Added fast/css/getComputedStyle-border-image.html
2785
2786         * css/CSSComputedStyleDeclaration.cpp:
2787         (WebCore::):
2788         (WebCore::valueForRepeatRule):
2789         (WebCore::valueForNinePieceImage):
2790         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2791
2792 2008-04-22  Darin Adler  <darin@apple.com>
2793
2794         Reviewed by Anders.
2795
2796         - simplify use of HashTraits to prepare for some upcoming hash table changes
2797
2798         * page/AXObjectCache.h: Removed uneeded AXIDHashTraits, which are no different
2799         from the default hash traits for unsigned.
2800         * page/mac/AXObjectCacheMac.mm:
2801         (WebCore::AXObjectCache::removeAXID): Remove assertion that's already done
2802         by HashTable that the value is not the deleted value.
2803
2804         * platform/graphics/StringTruncator.cpp: Removed unneeded include.
2805         * svg/SVGFontFaceElement.cpp: Removed unneeded include.
2806
2807 2008-04-23  Kevin Ollivier  <kevino@theolliviers.com>
2808
2809         wx build fixes. Changing BackgroundLayer -> FillLayer and adding
2810         Frame::disconnectPlatformScriptObjects().
2811
2812         * platform/wx/RenderThemeWx.cpp:
2813         (WebCore::RenderThemeWx::isControlStyled):
2814         * platform/wx/TemporaryLinkStubs.cpp:
2815         (Frame::disconnectPlatformScriptObjects):
2816
2817 2008-04-23  David Hyatt  <hyatt@apple.com>
2818
2819         Add support for mask-box-image (similar to border-image).  This property enables a single image
2820         to overlay the entire mask area (with nine-piece slicing rules similar to border image).
2821
2822         Reviewed by Dan Bernstein
2823
2824         Added inline-mask-overlay.html, block-mask-overlay.html
2825
2826         * css/CSSComputedStyleDeclaration.cpp:
2827         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2828         * css/CSSParser.cpp:
2829         (WebCore::CSSParser::parseValue):
2830         (WebCore::CSSParser::parseBorderImage):
2831         * css/CSSPropertyNames.in:
2832         * css/CSSStyleSelector.cpp:
2833         (WebCore::CSSStyleSelector::applyProperty):
2834         * rendering/InlineFlowBox.cpp:
2835         (WebCore::InlineFlowBox::paintMask):
2836         * rendering/RenderBox.cpp:
2837         (WebCore::RenderBox::paintMask):
2838         * rendering/RenderFlow.cpp:
2839         (WebCore::RenderFlow::paintLines):
2840         * rendering/RenderObject.cpp:
2841         (WebCore::RenderObject::paintNinePieceImage):
2842         (WebCore::RenderObject::paintBorder):
2843         * rendering/RenderObject.h:
2844         * rendering/RenderStyle.cpp:
2845         (WebCore::NinePieceImage::operator==):
2846         * rendering/RenderStyle.h:
2847         (WebCore::):
2848         (WebCore::NinePieceImage::m_verticalRule):
2849         (WebCore::NinePieceImage::horizontalRule):
2850         (WebCore::NinePieceImage::verticalRule):
2851         (WebCore::RenderStyle::borderImage):
2852         (WebCore::RenderStyle::maskOverlayImage):
2853         (WebCore::RenderStyle::hasMask):
2854         (WebCore::RenderStyle::resetBorderImage):
2855         (WebCore::RenderStyle::setBorderImage):
2856         (WebCore::RenderStyle::setMaskOverlayImage):
2857         (WebCore::RenderStyle::initialNinePieceImage):
2858         * rendering/RenderTable.cpp:
2859         (WebCore::RenderTable::paintMask):
2860         * rendering/RenderTableCell.cpp:
2861         (WebCore::RenderTableCell::paintMask):
2862
2863 2008-04-23  Justin Garcia  <justin.garcia@apple.com>
2864
2865         Reviewed by Darin Adler.
2866
2867         <rdar://problem/5825350> OWA: Caret disappears when navigating with arrows keys in contenteditable div
2868
2869         * editing/htmlediting.cpp:
2870         (WebCore::firstEditablePositionAfterPositionInRoot): Return a null VisiblePosition if
2871         this function moves out of highestRoot.  Re-wrote so as to not duplicate code inside
2872         and outside of the while loop.
2873         (WebCore::lastEditablePositionBeforePositionInRoot): Ditto.
2874
2875 2008-04-23  Daniel Zucker  <zucker@wake3.com>
2876
2877         Reviewed by Adam Roben.
2878
2879         Fix build errors needed to compile Curl in Cairo build.  Add stubs for
2880         didReceiveAuthenticationChallenge, receivedCredential,
2881         receivedRequestToContinueWithoutCredential, and receivedCancellation.
2882         <https://bugs.webkit.org/show_bug.cgi?id=18468>
2883
2884         * platform/network/ResourceHandle.h:  
2885         * platform/network/curl/ResourceHandleCurl.cpp:
2886         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2887         (WebCore::ResourceHandle::receivedCredential):
2888         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
2889         (WebCore::ResourceHandle::receivedCancellation):
2890
2891 2008-04-23  Dan Bernstein  <mitz@apple.com>
2892
2893         Reviewed by Darin Adler.
2894
2895         - fix a bug where moving forward in bidirectional text skips over the
2896           position after the end of the line
2897
2898         Test: editing/selection/move-past-trailing-space.html
2899
2900         * dom/Position.cpp:
2901         (WebCore::Position::upstream): Changed the logic for identifying when a
2902         position is after the last character of a text box of a text node that
2903         continues on the next line, to make it work correctly when boxes are not
2904         laid out in logical order.
2905         (WebCore::Position::downstream): Ditto.
2906
2907 2008-04-23  Brad Hughes  <bhughes@trolltech.com>
2908
2909         Reviewed by Simon.
2910
2911         Fix release build with the intel compiler
2912
2913         Intel compiler can't compile qtwebkit with -O2 or -O1, so we're left with -O0
2914
2915         * WebCore.pro:
2916
2917 2008-04-22  Dan Bernstein  <mitz@apple.com>
2918
2919         Reviewed by Anders Carlsson.
2920
2921         - remove unused calls to Position::upstream()
2922
2923         * editing/InsertLineBreakCommand.cpp:
2924         (WebCore::InsertLineBreakCommand::insertNodeAfterPosition):
2925         (WebCore::InsertLineBreakCommand::insertNodeBeforePosition):
2926
2927 2008-04-22  Jon Honeycutt  <jhoneycutt@apple.com>
2928
2929         Reviewed by Sam.
2930
2931         Add a method to query which modifier keys the platform uses for access
2932         key actions.
2933
2934         * page/EventHandler.cpp:
2935         (WebCore::EventHandler::handleAccessKey): Bitwise and the event's
2936         modifier keys with the platform's access key modifier mask to determine
2937         whether this event can perform an access key action.
2938         * page/EventHandler.h: Added s_accessKeyModifiers, a platform-defined
2939         mask of modifier keys used for access key actions, and a getter.
2940         * page/mac/EventHandlerMac.mm: Use PlatformKeyboardEvent::CtrlKey for
2941         access key actions.
2942         * page/qt/EventHandlerQt.cpp: Same.
2943         * page/gtk/EventHandlerGtk.cpp: Use AltKey.
2944         * page/win/EventHandlerWin.cpp: Same.
2945         * page/wx/EventHandlerWx.cpp: Same.
2946         * platform/PlatformKeyboardEvent.h: Added an enum, ModifierKey.
2947         (WebCore::PlatformKeyboardEvent::):
2948         (WebCore::PlatformKeyboardEvent::modifiers): Return which modifier keys
2949         were active, a combination of ModifierKey values.
2950
2951 2008-04-22  Sam Weinig  <sam@webkit.org>
2952
2953         Reviewed by Maciej Stachowiak.
2954
2955         Make the KJSProxy and FrameLoader member variables instead of pointers
2956         in FramePrivate in a bid to do a little clean up before the last of the
2957         split window patches.  Also, make the KJSProxy not lazily created, as the
2958         real benefit comes from lazily creating the JSDOMWindowWrapper, which we
2959         still do.
2960
2961         * page/Frame.cpp:
2962         (WebCore::Frame::~Frame):
2963         (WebCore::Frame::init):
2964         (WebCore::Frame::loader):
2965         (WebCore::Frame::scriptProxy):
2966         (WebCore::Frame::document):
2967         (WebCore::Frame::setDocument):
2968         (WebCore::Frame::clearScriptProxy):
2969         (WebCore::Frame::pageDestroyed):
2970         (WebCore::FramePrivate::FramePrivate):
2971         (WebCore::FramePrivate::~FramePrivate):
2972         * page/FramePrivate.h:
2973
2974 2008-04-22  Anatoli Papirovski  <apapirovski@mac.com>
2975
2976         Reviewed by Dan Bernstein.
2977
2978         - fix https://bugs.webkit.org/show_bug.cgi?id=18584
2979         border-color, outline-color, column-color, -webkit-text-stroke-color,
2980         and -webkit-text-fill-color inheritance to correctly use parent's color
2981         if the parent's corresponding (border, outline, etc.)-color property
2982         wasn't set.
2983
2984         Test: fast/borders/border-color-inherit.html
2985
2986         * css/CSSStyleSelector.cpp:
2987         (WebCore::CSSStyleSelector::applyProperty):
2988
2989 2008-04-22  Alp Toker  <alp@nuanti.com>
2990
2991         Rubber-stamped by Dave Hyatt.
2992
2993         Move GraphicsContext::clipToImageBuffer() notImplemented() stub to
2994         GraphicsContextCairo.
2995
2996         * platform/graphics/GraphicsContext.cpp:
2997         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2998         (WebCore::GraphicsContext::clipToImageBuffer):
2999
3000 2008-04-22  David Hyatt  <hyatt@apple.com>
3001
3002         Add support for mask-composite to match background-composite.
3003
3004         Reviewed by Sam Weinig
3005
3006         Added fast/backgrounds/mask-composite.html
3007
3008         * css/CSSComputedStyleDeclaration.cpp:
3009         (WebCore::):
3010         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3011         * css/CSSParser.cpp:
3012         (WebCore::CSSParser::parseValue):
3013         (WebCore::CSSParser::parseFillProperty):
3014         * css/CSSPropertyNames.in:
3015         * css/CSSStyleSelector.cpp:
3016         (WebCore::CSSStyleSelector::applyProperty):
3017         * rendering/InlineFlowBox.cpp:
3018         (WebCore::InlineFlowBox::paintMask):
3019
3020 2008-04-22  David Hyatt  <hyatt@apple.com>
3021
3022         Fix for bug 18688, background-color stopped painting on inlines.  Fix a virtual function
3023         misnaming that led to the derived class not getting called properly.
3024
3025         Reviewed by Mark Rowe
3026
3027         * ChangeLog:
3028         * rendering/InlineFlowBox.cpp:
3029         (WebCore::InlineFlowBox::paintFillLayer):
3030         * rendering/RenderObject.h:
3031         (WebCore::RenderObject::paintFillLayerExtended):
3032
3033 2008-04-22  Brady Eidson  <beidson@apple.com>
3034
3035         Reviewed by Sam Weinig
3036
3037         <rdar://problem/5733282> and https://bugs.webkit.org/show_bug.cgi?id=18680
3038         Always loads default shortcut icon URL when an external <script> is referenced before the icon URL is set.
3039
3040         * dom/Document.cpp:
3041         (WebCore::Document::implicitClose): Call FrameLoader->startIconLoader() here, when the document is
3042           finished parsing.
3043
3044         * loader/FrameLoader.cpp:
3045         (WebCore::FrameLoader::endIfNotLoadingMainResource):  Don't start the icon load here, when the
3046           document is finished parsing.  This was often too early, as document parsing may be blocked
3047           on an external script and therefore the correct iconURL is not set yet.
3048           The isLoadingFromCachedPage() check was when we started the icon load based on *loading* instead parsing,
3049           and is now irrelevant.
3050         * loader/FrameLoader.h:  Make startIconLoader() public
3051
3052 2008-04-22  Antti Koivisto  <antti@apple.com>
3053
3054         Reviewed by Oliver.
3055
3056         Support keyPoints attribute of <animateMotion>.
3057         
3058         Tested by SVG test suite test
3059         animate-elem-33-t.svg
3060
3061         * svg/SVGAnimateMotionElement.cpp:
3062         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
3063         * svg/SVGAnimationElement.cpp:
3064         (WebCore::parseKeyTimes):
3065         (WebCore::SVGAnimationElement::parseMappedAttribute):
3066         (WebCore::SVGAnimationElement::calculatePercentForSpline):
3067         (WebCore::SVGAnimationElement::calculatePercentFromKeyPoints):
3068         (WebCore::SVGAnimationElement::currentValuesFromKeyPoints):
3069         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
3070         (WebCore::SVGAnimationElement::startedActiveInterval):
3071         (WebCore::SVGAnimationElement::updateAnimation):
3072         * svg/SVGAnimationElement.h:
3073
3074 2008-04-22  Holger Hans Peter Freyther  <zecke@selfish.org>
3075
3076         Unreviewed build fix.
3077
3078         Update WebKit.qrc to catch up with the addition and removal of images
3079         from page/inspector/Images in recent commits.
3080
3081         * page/inspector/WebKit.qrc:
3082
3083 2008-04-22  David Hyatt  <hyatt@apple.com>
3084
3085         Fix for <rdar://5589634>.
3086
3087         Implement CSS alpha masks.  The syntax is very similar to that used for backgrounds.  Multiple mask images
3088         can be specified, and each one can be tiled, positioned, etc.  The following new properties have been
3089         added (all of which are analogous to their background-* counterparts).
3090
3091         mask, mask-image, mask-clip, mask-origin, mask-repeat, mask-attachment, mask-position
3092
3093         The alpha values in the final composite image are used to determine how the mask applies (alpha of 1 = show,
3094         alpha of 0 = don't show).
3095
3096         SVG images and CSS gradients can also be used as masks.
3097
3098         Reviewed by Dan
3099
3100         Added fast/backgrounds/repeat/mask-negative-offset-repeat.html, fast/backgrounds/svg-as-mask.html
3101
3102         * css/CSSMutableStyleDeclaration.cpp:
3103         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
3104         (WebCore::initShorthandMap):
3105         * css/CSSParser.cpp:
3106         (WebCore::CSSParser::parseFillProperty):
3107         (WebCore::CSSParser::parseTransformOrigin):
3108         * css/CSSStyleSelector.cpp:
3109         (WebCore::CSSStyleSelector::adjustRenderStyle):
3110         (WebCore::CSSStyleSelector::applyProperty):
3111         * rendering/InlineFlowBox.cpp:
3112         (WebCore::InlineFlowBox::paint):
3113         (WebCore::InlineFlowBox::paintFillLayers):
3114         (WebCore::InlineFlowBox::paintFillLayer):
3115         (WebCore::InlineFlowBox::paintBoxDecorations):
3116         (WebCore::InlineFlowBox::paintMask):
3117         * rendering/InlineFlowBox.h:
3118         * rendering/RenderBlock.cpp:
3119         (WebCore::RenderBlock::paint):
3120         (WebCore::RenderBlock::paintObject):
3121         * rendering/RenderBox.cpp:
3122         (WebCore::RenderBox::paintRootBoxDecorations):
3123         (WebCore::RenderBox::paintBoxDecorations):
3124         (WebCore::RenderBox::paintMask):
3125         (WebCore::RenderBox::paintFillLayers):
3126         (WebCore::RenderBox::paintFillLayer):
3127         (WebCore::RenderBox::paintFillLayerExtended):
3128         * rendering/RenderBox.h:
3129         * rendering/RenderFieldset.cpp:
3130         (WebCore::RenderFieldset::paintBoxDecorations):
3131         (WebCore::RenderFieldset::paintMask):
3132         * rendering/RenderFieldset.h:
3133         * rendering/RenderInline.cpp:
3134         (WebCore::RenderInline::requiresLayer):
3135         * rendering/RenderLayer.cpp:
3136         (WebCore::RenderLayer::isTransparent):
3137         (WebCore::RenderLayer::paintLayer):
3138         * rendering/RenderObject.cpp:
3139         (WebCore::RenderObject::requiresLayer):
3140         (WebCore::mustRepaintFillLayers):
3141         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
3142         (WebCore::RenderObject::setStyle):
3143         (WebCore::RenderObject::updateFillImages):
3144         * rendering/RenderObject.h:
3145         (WebCore::):
3146         (WebCore::RenderObject::hasMask):
3147         (WebCore::RenderObject::paintMask):
3148         (WebCore::RenderObject::paintFillExtended):
3149         * rendering/RenderReplaced.cpp:
3150         (WebCore::RenderReplaced::paint):
3151         * rendering/RenderStyle.cpp:
3152         (WebCore::FillLayer::FillLayer):
3153         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3154         * rendering/RenderStyle.h:
3155         (WebCore::FillLayer::initialFillComposite):
3156         (WebCore::FillLayer::initialFillSize):
3157         (WebCore::FillLayer::FillLayer):
3158         (WebCore::RenderStyle::hasMask):
3159         * rendering/RenderTable.cpp:
3160         (WebCore::RenderTable::paint):
3161         (WebCore::RenderTable::paintBoxDecorations):
3162         (WebCore::RenderTable::paintMask):
3163         * rendering/RenderTable.h:
3164         * rendering/RenderTableCell.cpp:
3165         (WebCore::RenderTableCell::requiresLayer):
3166         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
3167         (WebCore::RenderTableCell::paintMask):
3168         * rendering/RenderTableCell.h:
3169         * rendering/RenderWidget.cpp:
3170         (WebCore::RenderWidget::paint):
3171         * svg/graphics/SVGImage.cpp:
3172         (WebCore::SVGImage::draw):
3173         (WebCore::SVGImage::dataChanged):
3174
3175 2008-04-22  Sam Weinig  <sam@webkit.org>
3176
3177         Reviewed by Geoffrey Garen.
3178
3179         Make DOMAbstractView have a weak reference to the Frame instead of ref'ing
3180         the DOMWindow.
3181
3182         To ensure that the WindowScriptObject (which is a DOMAbstractView) stays valid
3183         after a navigation once the split window is completed, the DOMAbstractView must
3184         wrap the Frame instead of a DOMWindow since the DOMWindow will change.
3185
3186         * WebCore.xcodeproj/project.pbxproj:
3187         * bindings/objc/DOMAbstractView.mm: Added.
3188         (-[DOMAbstractView dealloc]):
3189         (-[DOMAbstractView finalize]):
3190         (-[DOMAbstractView document]):
3191         (-[DOMAbstractView _disconnectFrame]):
3192         (-[DOMAbstractView WebCore::]):
3193         (-[DOMAbstractView _initWithFrame:WebCore::]):
3194         (+[DOMAbstractView _wrapAbstractView:WebCore::]):
3195         Add custom implementation to implement weak reference semantics.
3196
3197         * bindings/objc/DOMAbstractViewFrame.h: Added.
3198         Declare the [DOMAbstractView _disconectFrame] selector.
3199         * bindings/objc/DOMInternal.h:
3200         Remove DOMRGBColor Internal category since it is now generated.
3201
3202         * bindings/objc/DOMUtility.mm:
3203         (KJS::createDOMWrapper):
3204         Don't ever create a DOMAbstractView from a JSDOMWindow, only from JSDOMWindowWrapper.
3205
3206         * bindings/scripts/CodeGeneratorObjC.pm:
3207         Generate internal header for IDLs that want custom implementations.
3208
3209         * css/RGBColor.idl:
3210         Make this a PODType as it really is in the implementation.
3211
3212         * page/AbstractView.idl:
3213         This now needs a custom objective-c binding implementation.
3214
3215         * page/Frame.cpp:
3216         (WebCore::Frame::~Frame):
3217         disconnect the weak frame reference in the WindowScriptObject.
3218
3219         * page/Frame.h:
3220         * page/gtk/FrameGtk.cpp:
3221         (WebCore::Frame::disconnectPlatformScriptObjects): Dummy implementation.
3222         * page/mac/FrameMac.mm:
3223         (WebCore::Frame::windowScriptObject): ASSERT that the windowScriptObject is a DOMAbstractView.
3224         (WebCore::Frame::disconnectPlatformScriptObjects): Disconnect the frame pointer from the windowScriptObject.
3225         * page/qt/FrameQt.cpp:
3226         (WebCore::Frame::disconnectPlatformScriptObjects): Dummy implementation.
3227         * page/win/FrameWin.cpp:
3228         (WebCore::Frame::disconnectPlatformScriptObjects): Ditto.
3229
3230 2008-04-22  Dan Bernstein  <mitz@apple.com>
3231
3232         Reviewed by Sam Weinig.
3233
3234         - preparation for https://bugs.webkit.org/show_bug.cgi?id=3729
3235           <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
3236
3237         * rendering/bidi.cpp:
3238         (WebCore::RenderBlock::layoutInlineChildren): Make sure to give the
3239         trailing white space a bidi level consistent with its position.
3240
3241 2008-04-22  Timothy Hatcher  <timothy@apple.com>
3242
3243         Remove many unused Web Inspector images.
3244
3245         Rubber-stamped by Adam Roben and Sam Weinig.
3246
3247         * page/inspector/Images/attachedShadow.png: Removed.
3248         * page/inspector/Images/backNormal.png: Removed.
3249         * page/inspector/Images/bottomShadow.png: Removed.
3250         * page/inspector/Images/breadcrumbBackground.png: Removed.
3251         * page/inspector/Images/console.png: Removed.
3252         * page/inspector/Images/databaseBrowserViewNormal.png: Removed.
3253         * page/inspector/Images/databaseBrowserViewNormalSelected.png: Removed.
3254         * page/inspector/Images/databaseBrowserViewSmall.png: Removed.
3255         * page/inspector/Images/databaseBrowserViewSmallSelected.png: Removed.
3256         * page/inspector/Images/databaseQueryViewNormal.png: Removed.
3257         * page/inspector/Images/databaseQueryViewNormalSelected.png: Removed.
3258         * page/inspector/Images/databaseQueryViewSmall.png: Removed.
3259         * page/inspector/Images/databaseQueryViewSmallSelected.png: Removed.
3260         * page/inspector/Images/disclosureDownPressed.png: Removed.
3261         * page/inspector/Images/disclosureRightDown.png: Removed.
3262         * page/inspector/Images/disclosureRightPressed.png: Removed.
3263         * page/inspector/Images/document.png: Removed.
3264         * page/inspector/Images/domViewNormal.png: Removed.
3265         * page/inspector/Images/domViewNormalSelected.png: Removed.
3266         * page/inspector/Images/domViewSmall.png: Removed.
3267         * page/inspector/Images/domViewSmallSelected.png: Removed.
3268         * page/inspector/Images/downTriangle.png: Removed.
3269         * page/inspector/Images/folder.png: Removed.
3270         * page/inspector/Images/forwardNormal.png: Removed.
3271         * page/inspector/Images/gradient.png: Removed.
3272         * page/inspector/Images/gradientHighlight.png: Removed.
3273         * page/inspector/Images/gradientHighlightBottom.png: Removed.
3274         * page/inspector/Images/hideStatusWidget.png: Removed.
3275         * page/inspector/Images/hideStatusWidgetPressed.png: Removed.
3276         * page/inspector/Images/network.png: Removed.
3277         * page/inspector/Images/plainDocument.png: Removed.
3278         * page/inspector/Images/popupArrows.png: Removed.
3279         * page/inspector/Images/popupArrowsBlack.png: Removed.
3280         * page/inspector/Images/reload.png: Removed.
3281         * page/inspector/Images/rightTriangle.png: Removed.
3282         * page/inspector/Images/showStatusWidget.png: Removed.
3283         * page/inspector/Images/showStatusWidgetPressed.png: Removed.
3284         * page/inspector/Images/sidbarItemBackground.png: Removed.
3285         * page/inspector/Images/sidebarActionWidget.png: Removed.
3286         * page/inspector/Images/sidebarActionWidgetPressed.png: Removed.
3287         * page/inspector/Images/sidebarAttachWidget.png: Removed.
3288         * page/inspector/Images/sidebarAttachWidgetPressed.png: Removed.
3289         * page/inspector/Images/sidebarDetachWidget.png: Removed.
3290         * page/inspector/Images/sidebarDetachWidgetPressed.png: Removed.
3291         * page/inspector/Images/sidebarResizeWidget.png: Removed.
3292         * page/inspector/Images/sidebarStatusAreaBackground.png: Removed.
3293         * page/inspector/Images/sourceViewNormal.png: Removed.
3294         * page/inspector/Images/sourceViewNormalSelected.png: Removed.
3295         * page/inspector/Images/sourceViewSmall.png: Removed.
3296         * page/inspector/Images/sourceViewSmallSelected.png: Removed.
3297         * page/inspector/Images/tab.png: Removed.
3298         * page/inspector/Images/tabSelected.png: Removed.
3299         * page/inspector/Images/toggleDown.png: Removed.
3300         * page/inspector/Images/toggleUp.png: Removed.
3301         * page/inspector/Images/toolbarButtonNormal.png: Removed.
3302         * page/inspector/Images/toolbarButtonNormalInactive.png: Removed.
3303         * page/inspector/Images/toolbarButtonNormalPressed.png: Removed.
3304         * page/inspector/Images/toolbarButtonNormalSelected.png: Removed.
3305         * page/inspector/Images/toolbarButtonNormalSelectedInactive.png: Removed.
3306         * page/inspector/Images/toolbarButtonSmall.png: Removed.
3307         * page/inspector/Images/toolbarButtonSmallInactive.png: Removed.
3308         * page/inspector/Images/toolbarButtonSmallPressed.png: Removed.
3309         * page/inspector/Images/toolbarButtonSmallSelected.png: Removed.
3310         * page/inspector/Images/toolbarButtonSmallSelectedInactive.png: Removed.
3311         * page/inspector/Images/toolbarPopupButtonNormal.png: Removed.
3312         * page/inspector/Images/toolbarPopupButtonNormalInactive.png: Removed.
3313         * page/inspector/Images/toolbarPopupButtonNormalPressed.png: Removed.
3314         * page/inspector/Images/toolbarPopupButtonSmall.png: Removed.
3315         * page/inspector/Images/toolbarPopupButtonSmallInactive.png: Removed.
3316         * page/inspector/Images/toolbarPopupButtonSmallPressed.png: Removed.
3317         * page/inspector/Images/toolbarSplitButtonDividerNormal.png: Removed.
3318         * page/inspector/Images/toolbarSplitButtonDividerNormalInactive.png: Removed.
3319         * page/inspector/Images/toolbarSplitButtonDividerSmall.png: Removed.
3320         * page/inspector/Images/toolbarSplitButtonDividerSmallInactive.png: Removed.
3321         * page/inspector/Images/treeLeftTriangleBlack.png: Removed.
3322
3323 2008-04-22  Anders Carlsson  <andersca@apple.com>
3324
3325         Reviewed by Darin.
3326
3327         Add NPN_Construct and NPN_PluginThreadAsyncCall declarations.
3328
3329         * bridge/npapi.h:
3330         * bridge/npruntime.h:
3331         * plugins/npfunctions.h:
3332
3333 2008-04-22  Alice Liu  <alice.liu@apple.com>
3334
3335         Reviewed by John Sullivan and Adam Roben.
3336
3337         Test: fast/events/tabindex-focus-chain.html
3338
3339         * dom/Document.cpp:
3340         (WebCore::Document::nextFocusableNode):
3341         (WebCore::Document::previousFocusableNode):
3342         If the focused node has been removed from the normal tabbing order,
3343         advancing focus from this node should advance to the next focusable
3344         node in tree order, and not start over at the beginning of the focus
3345         chain. 
3346
3347 2008-04-22  Timothy Hatcher  <timothy@apple.com>
3348
3349         Adds a debugger toggle button to the scripts status bar that will start
3350         and stop debugging of the inspected page.
3351
3352         Reviewed by Adam Roben.
3353
3354         * English.lproj/InspectorLocalizedStrings.js: Adds the two new tooltip strings.
3355         * page/InspectorController.cpp:
3356         (WebCore::debuggerAttached): Call InspectorController::debuggerAttached.
3357         (WebCore::InspectorController::InspectorController): Initialize
3358         m_debuggerAttached to false.
3359         (WebCore::InspectorController::windowScriptObjectAvailable): Add the debuggerAttached
3360         property to the InspectorController class.
3361         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage):
3362         Set m_debuggerAttached to true.
3363         (WebCore::InspectorController::stopDebugging): Set m_debuggerAttached to false.
3364         * page/InspectorController.h:
3365         * page/inspector/Images/debuggingButtons.png: Added.
3366         * page/inspector/ScriptsPanel.js:
3367         (WebInspector.ScriptsPanel): Disable the pause button. Create the debugging
3368         button and setup the id, className and event listener. Call reset.
3369         (WebInspector.ScriptsPanel.prototype.get statusBarItems): Return an array
3370         (WebInspector.ScriptsPanel.prototype.reset): Call _updateDebuggerButtons.
3371         (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): Adjust the title of
3372         the debugging button to match what will happen when clicked. Change the style class,
3373         and toggle the disabled state of the pause button.
3374         (WebInspector.ScriptsPanel.prototype._toggleDebugging): Start or stop debugging
3375         depending on InspectorController.debuggerAttached().
3376         * page/inspector/inspector.css: Added style rules for the debugger button.
3377
3378 2008-04-21  Adam Roben  <aroben@apple.com>
3379
3380         Change PlatformWheelEvent to use GET_WHEEL_DELTA_WPARAM
3381
3382         Reviewed by Dan Bernstein.
3383
3384         * platform/win/WheelEventWin.cpp:
3385         (WebCore::PlatformWheelEvent::PlatformWheelEvent): Use
3386         GET_WHEEL_DELTA_WPARAM, which is documented way of getting the wheel
3387         delta (it is equivalent to what we were previously doing, however).
3388
3389 2008-04-22  Simon Hausmann  <hausmann@webkit.org>
3390
3391         Qt build fix.
3392
3393         Adjust the Qt resource file to removed image files.
3394
3395         * page/inspector/WebKit.qrc:
3396
3397 2008-04-21  Timothy Hatcher  <timothy@apple.com>
3398
3399         Use CSS gradients to replace many image files in the Web Inspector.
3400
3401         Rubber-stamped by Adam Roben.
3402
3403         * page/inspector/Images/alternateTableRows.png: Removed.
3404         * page/inspector/Images/darkShadow.png: Removed.
3405         * page/inspector/Images/paneHeader.png: Removed.
3406         * page/inspector/Images/paneHeaderActive.png: Removed.
3407         * page/inspector/Images/sidebarSelection.png: Removed.
3408         * page/inspector/Images/sidebarSelectionBackground.png: Removed.
3409         * page/inspector/Images/sidebarSelectionBackgroundFocused.png: Removed.
3410         * page/inspector/Images/sidebarSelectionBackgroundInactive.png: Removed.
3411         * page/inspector/Images/sidebarSelectionBlurred.png: Removed.
3412         * page/inspector/Images/sidebarSelectionBlurredTall.png: Removed.
3413         * page/inspector/Images/sidebarSelectionGray.png: Removed.
3414         * page/inspector/Images/sidebarSelectionGrayTall.png: Removed.
3415         * page/inspector/Images/sidebarSelectionTall.png: Removed.
3416         * page/inspector/Images/sidebarSmallSelectionBackground.png: Removed.
3417         * page/inspector/Images/sidebarSmallSelectionBackgroundFocused.png: Removed.
3418         * page/inspector/Images/sidebarSmallSelectionBackgroundInactive.png: Removed.
3419         * page/inspector/Images/toolbarBackground.png: Removed.
3420         * page/inspector/Images/toolbarBackgroundInactive.png: Removed.
3421         * page/inspector/inspector.css:
3422
3423 2008-04-22  Andre Poenitz  <andre.poenitz@trolltech.com>
3424
3425         Reviewed by Simon.
3426
3427         Remove compiler warnings on string literals used to construct QStrings
3428         in webkit.
3429
3430         * bridge/qt/qt_instance.cpp:
3431         (KJS::Bindings::QtField::valueFromInstance):
3432         (KJS::Bindings::QtField::setValueToInstance):
3433         * bridge/qt/qt_runtime.cpp:
3434         (KJS::Bindings::convertValueToQVariant):
3435         (KJS::Bindings::QtRuntimeConnectionMethod::callAsFunction):
3436
3437 2008-04-22  Tor Arne Vestbø  <tavestbo@trolltech.com>
3438
3439         Reviewed by Simon.
3440
3441         Fall back to last path component for suggested filename if the HTTP content disposition is not set.
3442
3443         * platform/network/qt/QNetworkReplyHandler.cpp:
3444         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3445
3446 2008-04-22  Tor Arne Vestbø  <tavestbo@trolltech.com>
3447
3448         Reviewed by Simon.
3449
3450         Implemented the generation of the title string for images.
3451
3452         * platform/qt/Localizations.cpp:
3453
3454 2008-04-22  Simon Hausmann  <hausmann@webkit.org>
3455
3456         Qt build fix.
3457
3458         * platform/qt/RenderThemeQt.cpp: Adjust isControlStyled signature to
3459         the signature in the base class.
3460         * platform/qt/RenderThemeQt.h: Ditto.
3461
3462 2008-04-19  Jon Honeycutt  <jhoneycutt@apple.com>
3463
3464         Reviewed by Darin.
3465
3466         Add a method to get the AccessibilityObject's access key,
3467
3468         * page/AccessibilityObject.cpp:
3469         (WebCore::AccessibilityObject::accessKey): Added; returns the object's
3470         access key attribute.
3471         * page/AccessibilityObject.h: Added declaration for accessKey().
3472
3473 2008-04-21  Sam Weinig  <sam@webkit.org>
3474
3475         Reviewed by Anders Carlsson.
3476
3477         Fix numerous crashing tests.
3478
3479         * html/HTMLHtmlElement.cpp:
3480         (WebCore::HTMLHtmlElement::insertedIntoDocument): Null check document->frame().
3481
3482 2008-04-21  Dan Bernstein  <mitz@apple.com>
3483
3484         Reviewed by Darin Adler.
3485
3486         Tests: fast/media/implicit-media-all.html
3487                fast/media/monochrome.html
3488
3489         - allow implicit "all" media in media queries
3490         - use a value of 0 for the monochrome media feature on color displays
3491
3492         * css/CSSGrammar.y:
3493         * css/CSSParser.cpp:
3494         (WebCore::CSSParser::createFloatingMediaQuery):
3495         * css/CSSParser.h:
3496         * css/MediaQueryEvaluator.cpp:
3497         (WebCore::monochromeMediaFeatureEval):
3498
3499 2008-04-21  Brady Eidson  <beidson@apple.com>
3500
3501         Rockingly reviewed by Adele
3502
3503         Small StorageArea cleanups
3504
3505         * storage/SessionStorageArea.cpp:
3506         (WebCore::SessionStorageArea::copy): Pass "this" instead of the StorageMap belonging to this
3507         (WebCore::SessionStorageArea::SessionStorageArea):
3508         * storage/SessionStorageArea.h:
3509
3510         * storage/StorageArea.cpp:  Changed to not expose the StorageMap at all - it's dangerous to expose
3511           it since we rely explicitly on its ref-count
3512         (WebCore::StorageArea::StorageArea): Take another StorageArea as the c'tor argument and get the 
3513           StorageMap from that.
3514         (WebCore::StorageArea::setItem):  The previous comment/code here was bogus.  All JS objects passed in
3515           to this API are stringified, so there's no such thing as "null" for setItem()
3516         * storage/StorageArea.h:
3517
3518 2008-04-21  Justin Garcia  <justin.garcia@apple.com>
3519
3520         Reviewed by John Sullivan.
3521
3522         <rdar://problem/5803706> Pressing return at the end of a header doesn't break out of header (17460)
3523         
3524         If we're doing InsertParagraphSeparator at the end of a header element, do not clone it.
3525         Renamed m_useDefaultParagraphElement to m_mustUseDefaultParagraphElement, since now,
3526         when it is false, that does not necessarily mean that a default paragraph element
3527         will not be used.  Callers that passed false for this argument are OK with this.
3528
3529         * editing/InsertParagraphSeparatorCommand.cpp:
3530         (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): 
3531         (WebCore::InsertParagraphSeparatorCommand::shouldUseDefaultParagraphElement):
3532         (WebCore::InsertParagraphSeparatorCommand::doApply):
3533         * editing/InsertParagraphSeparatorCommand.h:
3534
3535 2008-04-21  Anders Carlsson  <andersca@apple.com>
3536
3537         Reviewed by Adam.
3538
3539         Perform cache selection. If a main resource has a URL that exists in a cache, load it from there.
3540         
3541         * html/HTMLAttributeNames.in:
3542         Add manifest attribute.
3543         
3544         * html/HTMLHtmlElement.cpp:
3545         (WebCore::HTMLHtmlElement::insertedIntoDocument):
3546         * html/HTMLHtmlElement.h:
3547         Perform cache selection.
3548         
3549         * loader/MainResourceLoader.cpp:
3550         (WebCore::MainResourceLoader::load):
3551         * loader/appcache/ApplicationCacheGroup.cpp:
3552         (WebCore::cacheHostSet):
3553         (WebCore::urlHostHash):
3554         (WebCore::ApplicationCacheGroup::cacheForRequest):
3555         (WebCore::ApplicationCacheGroup::selectCache):
3556         * loader/appcache/ApplicationCacheGroup.h:
3557         * platform/KURL.h:
3558         (WebCore::KURL::hostStart):
3559         (WebCore::KURL::hostEnd):
3560
3561 2008-04-21  Mike Belshe  <mike@belshe.com>
3562
3563         Reviewed by eseidel and darin.  Landed by eseidel.
3564
3565         Fix broken optimization in createStrippingNullCharacters.
3566
3567         * platform/text/StringImpl.cpp:
3568         (WebCore::StringImpl::createStrippingNullCharacters):
3569
3570 2008-04-21  David Hyatt  <hyatt@apple.com>
3571
3572         Make the back end parsing of background properties generic.  Rename all the parsing functions from
3573         background -> fill.
3574
3575         Add a new set of properties for doing masks.  The code is now refactored so that the mask properties
3576         and the background properties share parsing routines.
3577
3578         Reviewed by Dan
3579
3580         * css/CSSComputedStyleDeclaration.cpp:
3581         (WebCore::):
3582         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3583         * css/CSSParser.cpp:
3584         (WebCore::CSSParser::parseValue):
3585         (WebCore::CSSParser::addFillValue):
3586         (WebCore::CSSParser::parseFillShorthand):
3587         (WebCore::CSSParser::parseFillImage):
3588         (WebCore::CSSParser::parseFillPositionXY):
3589         (WebCore::CSSParser::parseFillPosition):
3590         (WebCore::CSSParser::parseFillSize):
3591         (WebCore::CSSParser::parseFillProperty):
3592         (WebCore::CSSParser::parseTransformOrigin):
3593         * css/CSSParser.h:
3594     &nb