0bcfa977c9202c2b2b0dcba2a74a0feebbcebf02
[WebKit-https.git] / WebCore / ChangeLog
1 2008-03-19  Oliver Hunt  <oliver@apple.com>
2
3         Reviewed by Antti.
4
5         Bug 17954: Canvas arc() with radius of 0 throws exception
6         http://bugs.webkit.org/show_bug.cgi?id=17954
7
8         Simple fix -- use >= instead of > when validating the radius.
9
10         * html/CanvasRenderingContext2D.cpp:
11         (WebCore::CanvasRenderingContext2D::arc):
12
13 2008-03-19  Justin Garcia  <justin.garcia@apple.com>
14
15         Reviewed by Oliver.
16
17         <rdar://problem/5794920> Acid3: Assertion failure in VisiblePosition::previous when clicking on results (17004)
18         
19         The position inside an empty inline-block was a candidate, but upstream and downstream
20         would move across it without stopping.  This confused canonicalPosition, since no more
21         than two candidates should have the same upstream/downstream (be visually equivalent).
22         
23         Code was added intentionally in isCandidate to make VisiblePositions inside empty 
24         inline-blocks, so we need to make upstream/downstream understand that.
25
26         * dom/Position.cpp:
27         (WebCore::endsOfNodeAreVisuallyDistinctPositions): upstream and downstream used to only
28         stop when entering or leaving a non-inline element (referred to as a "block").  We must also 
29         avoid entering or leaving an empty inline-block.  This will allow a VisiblePosition there, to 
30         match up with what the code in isCandidate intended.
31         (WebCore::enclosingVisualBoundary): Removed enclosingBlock and replaced it with this.
32         (WebCore::Position::upstream): Added better comments, called the new functions.
33         (WebCore::Position::downstream): Ditto.
34         * dom/Position.h:
35
36 2008-03-19  Dan Bernstein  <mitz@apple.com>
37
38         Rubber-stamped by John Sullivan.
39
40         - change CSS property and value keyword constants from all-caps with
41           underscores to intra-caps.
42
43         * css/makeprop.pl:
44         * css/makevalues.pl:
45         * All files using the constants
46
47 2008-03-19  Adam Roben  <aroben@apple.com>
48
49         Make clicking anywhere in a row in the DOM tree select that row's node
50
51         We now have mousedown and dblclick event listeners on the root of the
52         tree that forward the event to the node on the row the mouse is over.
53
54         Reviewed by Tim Hatcher.
55
56         * page/inspector/DocumentPanel.js:
57         (WebInspector.DocumentPanel): Added a dblclick and mousedown event
58         listeners to the root of the tree.
59         (WebInspector.DocumentPanel._treeElementFromEvent): Added. Finds the
60         tree element for the row underneath the mouse.
61         (WebInspector.DocumentPanel._ondblclick): Added. Sends the dblclick
62         event on to the tree element in the current row.
63         (WebInspector.DocumentPanel._onmousedown): Added. Selects the tree
64         element in the current row.
65         * page/inspector/treeoutline.js:
66         (TreeOutline.treeElementFromPoint): Added.
67         (TreeElement.treeElementSelected): Changed to call
68         TreeElement.isEventWithinDisclosureTriangle, and added an early return.
69         (TreeElement.treeElementToggled): Ditto.
70         (TreeElement.isEventWithinDisclosureTriangle): Added.
71         * page/inspector/utilities.js:
72         (Node.enclosingNodeOrSelfWithNodeNameInArray): Added.
73         (Node.enclosingNodeOrSelfWithNodeName): Now just calls
74         enclosingNodeOrSelfWithNodeNameInArray.
75         (Elemnt.get totalOffsetLeft): Added.
76         (Elemnt.get totalOffsetTop): Added.
77
78 2008-03-19  Dan Bernstein  <mitz@apple.com>
79
80         Reviewed by Sam Weinig.
81
82         - fix assertion failure in RenderBlock::determineStartPosition() at http://www.wired.com/techbiz/it/magazine/16-04/bz_apple
83
84         Test: fast/repaint/line-flow-with-floats-10.html
85
86         * rendering/bidi.cpp:
87         (WebCore::RenderBlock::determineStartPosition): Removed bogus assertion.
88         If the float's top margin has changed and it has not been repositioned
89         yet, we do not have its new y position.
90
91 2008-03-19  David Hyatt  <hyatt@apple.com>
92
93         New implementation of full page zoom.  Because of how much doesn't transform when zooming, and because
94         of the need to obey viewport constraints, I decided to take a completely different approach.  Now CSS
95         lengths and intrinsic sizes are simply adjusted by the zoom factor.  This approach works much better and
96         avoids pixel cracks more than the old approach.   In addition widgets "just work", namely plugins zoom
97         and scrollbars do not.
98
99         This patch also implements the IE zoom CSS property.  This property allows fine-grained control over
100         zooming at the element level.  It takes values of normal | <number> | <percentage> to match WinIE.  In
101         addition, in the vein of text-size-adjust for text zooming, I have extended the zoom property with an
102         extra value, reset.  The reset keyword can be used to prevent a section of the page from scaling at all
103         when a zoom is applied.
104
105         Reviewed by olliej
106
107         * css/CSSComputedStyleDeclaration.cpp:
108         (WebCore::):
109         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
110         Support the new 'zoom' property for getComputedStyle.
111
112         * css/CSSParser.cpp:
113         (WebCore::CSSParser::parseValue):
114         Code that parses the 'zoom' property.
115
116         * css/CSSPrimitiveValue.cpp:
117         (WebCore::CSSPrimitiveValue::computeLengthInt):
118         (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
119         (WebCore::CSSPrimitiveValue::computeLengthShort):
120         (WebCore::CSSPrimitiveValue::computeLengthFloat):
121         (WebCore::CSSPrimitiveValue::computeLengthDouble):
122         * css/CSSPrimitiveValue.h:
123         Extend all of the computeLength methods to take a multiplier so that lengths can be adjusted by the
124         zoom factor.
125
126         * css/CSSPropertyNames.in:
127         Add the new zoom property to the list of properties we understand.
128
129         * css/CSSStyleSelector.cpp:
130         (WebCore::CSSStyleSelector::applyDeclarations):
131         (WebCore::CSSStyleSelector::applyProperty):
132         (WebCore::CSSStyleSelector::mapBackgroundSize):
133         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
134         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
135         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
136         * css/CSSStyleSelector.h:
137         (WebCore::CSSStyleSelector::setStyle):
138         Pass in the zoom factor when computing all lengths in CSS.
139
140         * css/CSSValueKeywords.in:
141         Add support for the 'reset' keyword of the zoom property.
142
143         * dom/Document.cpp:
144         (WebCore::Document::recalcStyle):
145         Set the 'zoom' CSS property on the RenderView.  This is how we implement full page zoom.
146
147         * html/CanvasRenderingContext2D.cpp:
148         (WebCore::size):
149         Make sure the back end canvas size ignores zooming when rendering images.
150
151         * html/HTMLImageElement.cpp:
152         (WebCore::HTMLImageElement::width):
153         (WebCore::HTMLImageElement::height):
154         (WebCore::HTMLImageElement::naturalWidth):
155         (WebCore::HTMLImageElement::naturalHeight):
156         Use the unzoomed width/height if we have no style information in HTMLImageElement.cpp.
157
158         * loader/CachedImage.cpp:
159         (WebCore::CachedImage::ref):
160         (WebCore::CachedImage::imageSize):
161         (WebCore::CachedImage::imageRect):
162         * loader/CachedImage.h:
163         (WebCore::CachedImage::canRender):
164         Force access to the CachedImage metrics to take a multiplier so that people have to think about
165         the zoom factor.  The "intrinsic size" of the image then takes that into account.
166
167         * loader/ImageDocument.cpp:
168         (WebCore::ImageTokenizer::finish):
169         (WebCore::ImageDocument::scale):
170         (WebCore::ImageDocument::resizeImageToFit):
171         (WebCore::ImageDocument::imageChanged):
172         (WebCore::ImageDocument::restoreImageSize):
173         (WebCore::ImageDocument::imageFitsInWindow):
174         Make sure image documents respect the zoom.
175
176         * page/AnimationController.cpp:
177         (WebCore::ImplicitAnimation::animate):
178         Make the 'zoom' CSS property work with CSS transitions.
179
180         * page/Frame.h:
181         (WebCore::Frame::pageZoomFactor):
182         (WebCore::Frame::textZoomFactor):
183         Add accessors for obtaining the pageZoom vs. textZoom.
184
185         * page/FrameView.cpp:
186         (WebCore::FrameView::adjustViewSize):
187         Remove the old zoom implementation that used transforms.
188
189         * page/mac/WebCoreAXObject.mm:
190         (-[WebCoreAXObject accessibilityIsIgnored]):
191         Pass in the zoom factor.
192
193         * rendering/InlineFlowBox.cpp:
194         (WebCore::InlineFlowBox::paintBackground):
195         (WebCore::InlineFlowBox::paintBoxDecorations):
196         Pass in the zoom factor when testing for size.
197
198         * rendering/RenderBox.cpp:
199         (WebCore::RenderBox::calculateBackgroundSize):
200         (WebCore::RenderBox::imageChanged):
201         (WebCore::RenderBox::paintBackgroundExtended):
202         (WebCore::RenderBox::calcHeight):
203         * rendering/RenderFrameSet.cpp:
204         (WebCore::RenderFrameSet::layout):
205         * rendering/RenderHTMLCanvas.cpp:
206         (WebCore::RenderHTMLCanvas::canvasSizeChanged):
207         * rendering/RenderHTMLCanvas.h:
208         (WebCore::RenderHTMLCanvas::renderName):
209         (WebCore::RenderHTMLCanvas::intrinsicSizeChanged):
210         * rendering/RenderImage.cpp:
211         (WebCore::RenderImage::setImageSizeForAltText):
212         (WebCore::RenderImage::imageChanged):
213         (WebCore::RenderImage::calcReplacedWidth):
214         (WebCore::RenderImage::calcReplacedHeight):
215         * rendering/RenderImage.h:
216         (WebCore::RenderImage::intrinsicSizeChanged):
217         * rendering/RenderListMarker.cpp:
218         (WebCore::RenderListMarker::layout):
219         (WebCore::RenderListMarker::imageChanged):
220         (WebCore::RenderListMarker::getRelativeMarkerRect):
221         * rendering/RenderObject.cpp:
222         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
223         (WebCore::RenderObject::paintBorder):
224         Pass in the zoom factor when testing for size.
225
226         * rendering/RenderReplaced.cpp:
227         (WebCore::RenderReplaced::RenderReplaced):
228         (WebCore::RenderReplaced::setStyle):
229         (WebCore::RenderReplaced::intrinsicSizeChanged):
230         * rendering/RenderReplaced.h:
231         Added a new call when the zoom factor changes, intrinsicSizeChanged().  Replaced element subclasses
232         respond to this via overrides.
233
234         * rendering/RenderStyle.cpp:
235         (WebCore::StyleVisualData::StyleVisualData):
236         (WebCore::StyleInheritedData::StyleInheritedData):
237         (WebCore::StyleInheritedData::operator==):
238         (WebCore::RenderStyle::diff):
239         * rendering/RenderStyle.h:
240         (WebCore::StyleVisualData::operator==):
241         (WebCore::RenderStyle::zoom):
242         (WebCore::RenderStyle::zoomInEffect):
243         (WebCore::RenderStyle::setZoom):
244         (WebCore::RenderStyle::setZoomInEffect):
245         (WebCore::RenderStyle::initialZoom):
246         Support for 'zoom' in the RenderStyle.  "zoomInEffect" represents the computed zoom taking into account
247         all the zooms specified on ancestors.
248
249         * rendering/RenderTableCol.cpp:
250         (WebCore::RenderTableCol::imageChanged):
251         * rendering/RenderTableRow.cpp:
252         (WebCore::RenderTableRow::imageChanged):
253         * rendering/RenderTableSection.cpp:
254         (WebCore::RenderTableSection::imageChanged):
255         * rendering/RenderVideo.h:
256         (WebCore::RenderVideo::intrinsicSizeChanged):
257         Pass in the zoom factor.
258
259         * rendering/RenderView.cpp:
260         (WebCore::RenderView::calcHeight):
261         (WebCore::RenderView::calcWidth):
262         (WebCore::RenderView::layout):
263         (WebCore::RenderView::viewHeight):
264         (WebCore::RenderView::viewWidth):
265         * rendering/RenderView.h:
266         (WebCore::RenderView::zoomFactor):
267         Back out the old implementation.
268
269 2008-03-19  Adam Roben  <aroben@apple.com>
270
271         Rename firstParent* methods to enclosingNode*
272
273         Rubberstamped by John Sullivan.
274
275         * page/inspector/ConsolePanel.js:
276         * page/inspector/DocumentPanel.js:
277         * page/inspector/NetworkPanel.js:
278         * page/inspector/inspector.js:
279         * page/inspector/utilities.js:
280
281 2008-03-19  Dan Bernstein  <mitz@apple.com>
282
283         Reviewed by John Sullivan.
284
285         - fix <rdar://problem/5805070> CrashTracer: [USER] 33 crashes in Safari at com.apple.WebCore: WebCore::FrameView::layout + 431
286
287         Test: fast/dynamic/subtree-parent-static-y.html
288
289         * rendering/RenderObject.cpp:
290         (WebCore::RenderObject::markContainingBlocksForLayout): Avoid calling
291         this method on the parent if the parent is the new layout subtree root,
292         which would result in marking all the way to the top, when it should
293         actually do nothing.
294
295 2008-03-19  Mark Rowe  <mrowe@apple.com>
296
297         Reviewed by Oliver Hunt.
298
299         Use WTF::Unicode abstraction rather than using ICU functions directly.
300
301         * html/PreloadScanner.cpp:
302         (WebCore::PreloadScanner::tokenize):
303
304 2008-03-19  Mark Rowe  <mrowe@apple.com>
305
306         Attempt to fix the Gtk build.
307
308         * platform/network/curl/ResourceHandleCurl.cpp:
309         (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate):
310
311 2008-03-18  Darin Adler  <darin@apple.com>
312
313         Reviewed by Maciej.
314
315         - Speed up JavaScript built-in properties by changing the
316           hash table to take advantage of the identifier objects
317
318         5% speedup for Acid3 test 26
319
320         * bindings/js/JSDOMWindowBase.cpp:
321         (WebCore::JSDOMWindowBase::getOwnPropertySlot): Update for change to HashTable.
322         (WebCore::JSDOMWindowBase::put): Ditto.
323         * bindings/js/JSDOMWindowCustom.cpp:
324         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Ditto.
325         * bindings/js/JSHTMLInputElementBase.cpp:
326         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot): Ditto.
327         * bindings/js/JSHistoryCustom.cpp:
328         (WebCore::JSHistory::customGetOwnPropertySlot): Ditto.
329         * bindings/js/JSLocation.cpp:
330         (WebCore::JSLocation::customGetOwnPropertySlot): Ditto.
331         (WebCore::JSLocation::put): Ditto.
332         * bindings/js/kjs_binding.cpp:
333         (WebCore::nonCachingStaticFunctionGetter): Ditto.
334
335         * bindings/scripts/CodeGeneratorJS.pm: Same changes as in the
336         create_hash_table script.
337
338 2008-03-18  Matt Lilek  <webkit@mattlilek.com>
339
340         Fix the Gtk build for real this time.
341
342         * platform/network/curl/AuthenticationChallenge.h:
343
344 2008-03-18  Sam Weinig  <sam@webkit.org>
345
346         Reviewed by Anders Carlsson.
347
348         Fix for http://bugs.webkit.org/show_bug.cgi?id=17057
349         REGRESSION: Frequent random crashes in WebCore::JSNodeList::indexGetter
350         <rdar://problem/5725058>
351
352         Tests: fast/dom/NodeList/5725058-crash-scenario-1.html
353                fast/dom/NodeList/5725058-crash-scenario-2.html
354                fast/dom/NodeList/5725058-crash-scenario-3.html
355
356         * dom/ChildNodeList.cpp: 
357         (WebCore::ChildNodeList::ChildNodeList):
358         * dom/ChildNodeList.h:
359         Remove rootNodeChildrenChanged() method and fix the constructor to not 
360         pass in a needsNotifications argument to DynamicNodeList, as it no longer
361         takes one.
362
363         * dom/ClassNodeList.cpp:
364         (WebCore::ClassNodeList::ClassNodeList):
365         Don't pass the needsNotifications argument to DynamicNodeList.
366
367         * dom/ContainerNode.cpp:
368         (WebCore::ContainerNode::childrenChanged):
369         Rename call to hasNodeLists() to hasNodeListCaches().
370
371         * dom/Document.cpp:
372         (WebCore::Document::Document):
373         (WebCore::Document::~Document): Zero out the m_document variable to signify
374         to destructors down the destruction chain that this is a Document type node
375         being destructed, and thus, accessing document() is prohibited.
376         * dom/Document.h:
377         (WebCore::Document::addNodeListCache): Renamed from addNodeList.
378         (WebCore::Document::removeNodeListCache): Renamed from removeNodeList, adds assertion.
379         (WebCore::Document::hasNodeListCaches): Renamed from hasNodeListCaches.
380         Rename m_numNodeLists to m_numNodeListCaches.
381
382         * dom/DynamicNodeList.cpp:
383         (WebCore::DynamicNodeList::DynamicNodeList):
384         (WebCore::DynamicNodeList::~DynamicNodeList):
385         (WebCore::DynamicNodeList::invalidateCache):
386         (WebCore::DynamicNodeList::Caches::Caches):
387         * dom/DynamicNodeList.h:
388         (WebCore::DynamicNodeList::hasOwnCaches):
389         Remove the needsNotifications concept from DynamicNodeList, instead, manually
390         invalidate the cache for lists that own their own cache.
391
392         * dom/NameNodeList.cpp:
393         (WebCore::NameNodeList::NameNodeList):
394         * dom/NameNodeList.h:
395         Remove rootNodeAttributeChanged() method and fix the constructor to not 
396         pass in a needsNotifications argument to DynamicNodeList, as it no longer
397         takes one.
398
399         * dom/Node.cpp:
400         (WebCore::Node::~Node): Decrement the document's nodeListCache count
401         if we had a NodeListsNodeData cache and this is not the Document being
402         destructor, as tagged by a null m_document.
403         (WebCore::Node::childNodes): Increment the document's nodeListCache count 
404         if we need create the NodeListsNodeData.
405         (WebCore::Node::registerDynamicNodeList): Increment the document's nodeListCache count 
406         if we need create the NodeListsNodeData.  Change to invalidate all the caches, instead 
407         of just the ChildNodeList, if document has had no NodeListCaches.
408         (WebCore::Node::unregisterDynamicNodeList): Change to remove the cache from the m_listsWithCaches
409         set if it is owned by the NodeList and clear the m_nodeLists if it is empty.
410         (WebCore::Node::notifyLocalNodeListsAttributeChanged): Move logic to 
411         NodeListsNodeData::invalidateAttributeCaches and clear the cache pointer if it is empty.
412         (WebCore::Node::notifyLocalNodeListsChildrenChanged): Move logic to 
413         NodeListsNodeData::invalidateCaches and clear the cache pointer if it is empty.
414         (WebCore::Node::notifyNodeListsChildrenChanged): Cleanup.
415         (WebCore::Node::getElementsByName): Increment the document's nodeListCache count 
416         if we need create the NodeListsNodeData.
417         (WebCore::Node::getElementsByClassName): Increment the document's nodeListCache count 
418         if we need create the NodeListsNodeData.
419
420         (WebCore::NodeListsNodeData::invalidateCaches): Added.
421         (WebCore::NodeListsNodeData::invalidateAttributeCaches): Added.
422         (WebCore::NodeListsNodeData::isEmpty): Added.
423
424         * dom/TagNodeList.cpp:
425         (WebCore::TagNodeList::TagNodeList):
426         Don't pass the needsNotifications argument to DynamicNodeList.
427
428 2008-03-18  Matt Lilek  <webkit@mattlilek.com>
429
430         Not reviewed, build fix.
431
432         * platform/network/curl/AuthenticationChallenge.h:
433
434 2008-03-18  Brent Fulgham  <bfulgham@gmail.com>
435
436         Reviewed by Adam Roben.
437
438         Provide some stub implementations for things that WebKit
439         uses for performing authentication/challenge activities.  This
440         is in support of http://bugs.webkit.org/show_bug.cgi?id=17837
441
442         * platform/network/ResourceHandle.h:
443         * platform/network/curl/AuthenticationChallenge.h:
444         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
445         (WebCore::AuthenticationChallenge::sourceHandle):
446
447 2008-03-18  Eric Seidel  <eric@webkit.org>
448
449         Reviewed by Oliver.
450
451         Fix SVGImage crash seen once, and obvious via code inspection.
452         
453         I was not able to find a test case for this.
454
455         * svg/graphics/SVGImage.cpp:
456         (WebCore::SVGImage::setContainerSize):
457         (WebCore::SVGImage::usesContainerSize):
458         (WebCore::SVGImage::hasRelativeWidth):
459         (WebCore::SVGImage::hasRelativeHeight):
460
461 2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
462
463         Fix Qt build after r31123.
464
465         Add PluginView methods to TemporaryLinkStubs.
466
467         * platform/qt/TemporaryLinkStubs.cpp:
468
469 2008-03-18  Sam Weinig  <sam@webkit.org>
470
471         Reviewed by Darin Adler.
472
473         - Speed up JavaScript prototype and constructor object creation
474           using a static Identifier in the self() methods to avoid the
475           cost of creating one from a c-string each time.
476
477         5% speedup for Acid3 test 26
478
479         * bindings/scripts/CodeGeneratorJS.pm:
480
481 2008-03-18  Antti Koivisto  <antti@apple.com>
482
483         Reviewed by Mark Rowe.
484
485         Enable preloading for other platforms besides Mac.
486
487         * GNUmakefile.am:
488         * WebCore.pro:
489         * WebCore.vcproj/WebCore.vcproj:
490         * WebCoreSources.bkl:
491         * html/HTMLTokenizer.cpp:
492         * html/HTMLTokenizer.h:
493         * html/PreloadScanner.cpp:
494         (WebCore::PreloadScanner::tokenize):
495
496 2008-03-18  Dan Bernstein  <mitz@apple.com>
497
498         Reviewed by Adele Peterson.
499
500         - fix <rdar://problem/5805127> REGRESSION (r31116): Assertion failure (floatIndex < floats.size()) in RenderBlock::determineStartPosition() at digg.com
501
502         Test: fast/dynamic/floating-to-positioned.html
503
504         * rendering/RenderObject.cpp:
505         (WebCore::RenderObject::setStyle): Added code to remove a float from
506         object lists if its position property changes to something other than
507         static, since then it ceases to be a float.
508
509 2008-03-18  Adam Roben  <aroben@apple.com>
510
511         Windows build fix after r31123
512
513         * plugins/win/PluginViewWin.cpp: Add back MozillaUserAgent.
514
515 2008-03-18  Dan Bernstein  <mitz@apple.com>
516
517         Reviewed by Darin Adler.
518
519         - eliminate RenderFlow::m_clear
520
521         * rendering/RenderBlock.cpp:
522         (WebCore::RenderBlock::layoutBlock): Removed code to set m_clear.
523         (WebCore::RenderBlock::newLine): Added a 'clear' parameter.
524         * rendering/RenderBlock.h:
525         * rendering/RenderFlow.h:
526         (WebCore::RenderFlow::RenderFlow): Removed initialization of m_clear.
527         * rendering/bidi.cpp:
528         (WebCore::RenderBlock::layoutInlineChildren): Added a local 'clear'
529         variable, passing a pointer to it to findNextLineBreak() and its value
530         to newLine(). 
531         (WebCore::RenderBlock::findNextLineBreak): Added a 'clear' parameter,
532         which this method adjusts when it encounters a <br>.
533
534 2008-03-18  Simon Hausmann  <hausmann@webkit.org>
535
536         Reviewed by Holger.
537
538         Fix the Qt build and clean up the invoke mechanism for dispatching
539         functions in the main thread by using QMetaObject::invokeMethod
540         instead of posting a null event.
541
542         * platform/qt/MainThreadQt.cpp:
543
544 2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
545
546         Fix Mac build from commit of r31123.
547
548         Add a typedef for NSView* to PlatformWidget, remove duplicate PluginMessageThrottlerWin definition.
549
550         * platform/Widget.h:
551         * WebCore.vcproj/WebCore.vcproj:
552
553 2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
554
555         Reviewed by Jon Honeycutt.
556
557         Add PluginView.cpp and npapi.cpp to build files.
558         Copy win/PluginViewWin.cpp to PluginView.cpp for shared code.
559         Split Windows specific code out of PluginView.cpp.
560         Add #if USE(NPOBJECT) around dependant code.
561         Use npruntime_internal.h instead of npapi.h.
562         Add PlatformWidget typedef to Widget.h.
563         Update WidgetGtk.cpp for the PlatformWidget usage.
564         Add needed methods to TemporaryLinkStubs for GTK+ port.
565
566         * GNUmakefile.am:
567         * WebCore.pro:
568         * WebCoreSources.bkl:
569         * WebCore.vcproj/WebCore.vcproj:
570         * plugins/win/PluginViewWin.cpp:
571         * plugins/PluginView.cpp:
572         * plugins/PluginView.h:
573         * plugins/npapi.cpp:
574         * platform/Widget.h:
575         * platform/gtk/WidgetGtk.cpp:
576         * platform/gtk/TemporaryLinkStubs.cpp:
577
578 2008-03-17  Darin Adler  <darin@apple.com>
579
580         Reviewed by Maciej.
581
582         - speed up document property fetching (eliminate the AtomicString
583           objects made during document property lookup)
584
585         3% speedup for Acid3 test 26
586
587         * bindings/js/JSDOMWindowBase.cpp:
588         (WebCore::JSDOMWindowBase::getOwnPropertySlot): Use AtomicString::find to
589         locate the AtomicString, only if already present. Also call the new faster
590         versions of the hasNamedItem and hasElementWithId functions that don't
591         ref/deref the AtomicStringImpl, get inlined, etc.
592         * bindings/js/JSHTMLDocumentCustom.cpp:
593         (WebCore::JSHTMLDocument::canGetItemsForName): Ditto.
594         (WebCore::writeHelper): Use a Vector instead of a String to build up
595         the string to avoid the bad performance of string append.
596
597         * dom/Document.cpp: Tweaked code and comments a bit. Nothing substantive.
598         * dom/Document.h: Added new hasElementWithId function that's faster than
599         getElementById because it doesn't ref/deref the AtomicStringImpl*, gets
600         inlined, doesn't have to handle the 0 case, and doesn't try to return the
601         element pointer (just a boolean).
602
603         * html/HTMLAppletElement.cpp:
604         (WebCore::HTMLAppletElement::parseMappedAttribute): Use AtomicString
605         consistently. Also renamed the data member for clarity.
606         (WebCore::HTMLAppletElement::insertedIntoDocument): Ditto.
607         (WebCore::HTMLAppletElement::removedFromDocument): Ditto.
608         * html/HTMLAppletElement.h: Ditto.
609
610         * html/HTMLDocument.cpp:
611         (WebCore::addItemToMap): Use AtomicString instead of String.
612         (WebCore::removeItemFromMap): Ditto.
613         (WebCore::HTMLDocument::addNamedItem): Updated for member name change.
614         (WebCore::HTMLDocument::removeNamedItem): Ditto.
615         (WebCore::HTMLDocument::addExtraNamedItem): Ditto.
616         (WebCore::HTMLDocument::removeExtraNamedItem): Ditto.
617         (WebCore::HTMLDocument::clear): Added. Moved code here from the JavaScript
618         bindings. If we're going to have an empty placeholder function, there's no
619         reason to have it in the bindings instead of here.
620         * html/HTMLDocument.h: Added clear. Changed the named item function
621         arguments to AtomicString insted of String. Changed the NameCountMap to
622         use AtomicStringImpl* instead of StringImpl*. Renamed the data members
623         to add a m_ prefix and remove the needless doc prefix. Added hasNamedItem
624         and hasExtraNamedItem functions that are inlined and faster than the old
625         idiom because they doesn't ref/deref the AtomicStringImpl*, get inlined,
626         and don't have to handle the 0 case.
627         * html/HTMLDocument.idl: Removed the [Custom] attribute on clear and took
628         it out of the JavaScript-specific section.
629
630         * html/HTMLEmbedElement.cpp:
631         (WebCore::HTMLEmbedElement::parseMappedAttribute): Use AtomicString
632         consistently. Also renamed the data member for clarity.
633         (WebCore::HTMLEmbedElement::insertedIntoDocument): Ditto.
634         (WebCore::HTMLEmbedElement::removedFromDocument): Ditto.
635         * html/HTMLFormElement.cpp:
636         (WebCore::HTMLFormElement::insertedIntoDocument): Ditto.
637         (WebCore::HTMLFormElement::removedFromDocument): Ditto.
638         (WebCore::HTMLFormElement::parseMappedAttribute): Ditto.
639         * html/HTMLFormElement.h: Ditto.
640
641         * html/HTMLFrameElementBase.cpp:
642         (WebCore::HTMLFrameElementBase::openURL): Renamed m_name to m_frameName for
643         clarity, since the frame name is not the same as the name attribute.
644         (WebCore::HTMLFrameElementBase::parseMappedAttribute): Ditto.
645         (WebCore::HTMLFrameElementBase::setNameAndOpenURL): Ditto.
646         * html/HTMLFrameElementBase.h: Ditto.
647
648         * html/HTMLIFrameElement.cpp:
649         (WebCore::HTMLIFrameElement::parseMappedAttribute): Use AtomicString
650         consistently. Also renamed the data member for clarity.
651         (WebCore::HTMLIFrameElement::insertedIntoDocument): Ditto.
652         (WebCore::HTMLIFrameElement::removedFromDocument): Ditto.
653         * html/HTMLIFrameElement.h: Ditto.
654         * html/HTMLImageElement.cpp:
655         (WebCore::HTMLImageElement::parseMappedAttribute): Ditto.
656         (WebCore::HTMLImageElement::insertedIntoDocument): Ditto.
657         (WebCore::HTMLImageElement::removedFromDocument): Ditto.
658         * html/HTMLImageElement.h: Ditto.
659         * html/HTMLObjectElement.cpp:
660         (WebCore::HTMLObjectElement::parseMappedAttribute): Ditto.
661         (WebCore::HTMLObjectElement::insertedIntoDocument): Ditto.
662         (WebCore::HTMLObjectElement::removedFromDocument): Ditto.
663         (WebCore::HTMLObjectElement::updateDocNamedItem): Ditto.
664         * html/HTMLObjectElement.h: Ditto.
665
666         * html/HTMLParamElement.cpp:
667         (WebCore::HTMLParamElement::isURLAttribute): Use equalIgnoringCase instead
668         of callling lower().
669
670         * html/HTMLPlugInElement.h: Changed the type of m_name. The code that
671         uses this is in HTMLAppletElement, HTMLEmbedElement, and HTMLObjectElement.
672
673         * platform/text/AtomicString.cpp:
674         (WebCore::equal): Moved to an inline so we can share this code between a
675         few different functions. It could move to a header too if we want to use
676         it elsewhere.
677         (WebCore::UCharBufferTranslator::equal): Change to use inline.
678         (WebCore::HashAndCharactersTranslator::hash): Added.
679         (WebCore::HashAndCharactersTranslator::equal): Added.
680         (WebCore::HashAndCharactersTranslator::translate): Added.
681         (WebCore::AtomicString::add): Improved the Identifier and UString overloads
682         to use the already-computed hash code instead of rehashing the string.
683         (WebCore::AtomicString::find): Added.
684         * platform/text/AtomicString.h: Added a find function so we can avoid
685         allocating memory just to look up a string in an atomic string set or map.
686
687         * platform/text/StringImpl.h: Added declarations needed for the
688         AtomicString changes.
689
690 2008-03-17  Timothy Hatcher  <timothy@apple.com>
691
692         Reviewed by Mark Rowe.
693
694         Bug 17908: Various bugs in the Console completion code
695         http://bugs.webkit.org/show_bug.cgi?id=17908
696
697         * page/inspector/ConsolePanel.js:
698         (WebInspector.ConsolePanel.complete): Moved the code that checked for the caret being at the end
699         of the prompt into the _caretAtEndOfPrompt helper function.
700         (WebInspector.ConsolePanel.messagesSelectStart): Clear and redo the auto complete when the selection changes.
701         (WebInspector.ConsolePanel._caretInsidePrompt): Fixed a logic error that always caused a false result.
702         (WebInspector.ConsolePanel._caretAtEndOfPrompt): Added. Tests if the selection is a caret at the
703         end of the prompt.
704         (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Changed the offset to use the childNodes length.
705         This makes sure the caret is at the end when there are multiple text nodes in the prompt.
706
707 2008-03-17  Dan Bernstein  <mitz@apple.com>
708
709         Rubber-stamped by Dave Hyatt.
710
711         - FloatingObject cleanup
712
713         Renamed FloatingObject's data members as follows: node -> m_renderer,
714         startY -> m_top, endY -> m_bottom, left -> m_left, width -> m_width,
715         and noPaint -> !m_shouldPaint, reversing the meaning of the flag.
716
717         Also addressed the FIXME in RenderBlock::containsFloat().
718
719         * rendering/RenderBlock.cpp:
720         (WebCore::RenderBlock::repaintOverhangingFloats):
721         (WebCore::RenderBlock::paintFloats):
722         (WebCore::RenderBlock::insertFloatingObject):
723         (WebCore::RenderBlock::removeFloatingObject):
724         (WebCore::RenderBlock::positionNewFloats):
725         (WebCore::RenderBlock::leftRelOffset):
726         (WebCore::RenderBlock::rightRelOffset):
727         (WebCore::RenderBlock::nextFloatBottomBelow):
728         (WebCore::RenderBlock::floatBottom):
729         (WebCore::RenderBlock::floatRect):
730         (WebCore::RenderBlock::lowestPosition):
731         (WebCore::RenderBlock::rightmostPosition):
732         (WebCore::RenderBlock::leftmostPosition):
733         (WebCore::RenderBlock::leftBottom):
734         (WebCore::RenderBlock::rightBottom):
735         (WebCore::RenderBlock::clearFloats):
736         (WebCore::RenderBlock::addOverhangingFloats):
737         (WebCore::RenderBlock::addIntrudingFloats):
738         (WebCore::RenderBlock::containsFloat): Changed to return false if the
739         floats lists exists but is empty, since line layout code no longer
740         relies on the buggy behavior.
741         (WebCore::RenderBlock::nodeAtPoint):
742         (WebCore::RenderBlock::adjustForBorderFit):
743         * rendering/RenderBlock.h:
744         (WebCore::RenderBlock::containsFloats):
745         (WebCore::RenderBlock::FloatingObject::FloatingObject):
746         * rendering/bidi.cpp:
747         (WebCore::RenderBlock::layoutInlineChildren):
748         (WebCore::RenderBlock::matchedEndLine):
749
750 2008-03-17  Dan Bernstein  <mitz@apple.com>
751
752         Reviewed by Dave Hyatt.
753
754         - allow incremental relayout of blocks that contain floats
755
756         Tests: fast/repaint/line-flow-with-floats-[1-9].html
757
758         * rendering/RenderBlock.cpp:
759         (WebCore::RenderBlock::clearFloatsIfNeeded): Cleaned up by moving most
760         of the function body out of an if statement which was replaced with an
761         early return.
762         (WebCore::RenderBlock::insertFloatingObject): Cleaned up by moving most
763         of the function body out of an if statement and moving the ASSERT, which
764         is a crash in release builds, to the beginning. Made this function set
765         the m_isDescendant flag of floating objects it creates.
766         (WebCore::RenderBlock::removeFloatingObject): Added a call to
767         markLinesDirtyInVerticalRange() when removing a float from a block with
768         inline children.
769         (WebCore::RenderBlock::markLinesDirtyInVerticalRange): Added. Marks the
770         lines in the given range as dirty.
771         (WebCore::RenderBlock::clearFloats): Added code to detect changes to
772         the geometry of floats intruding into this block from other blocks and
773         mark any lines whose available width has changed as a result as dirty.
774
775         * rendering/RenderBlock.h:
776         (WebCore::RenderBlock::FloatWithRect::FloatWithRect): Added a structure
777         to cache a float with its position and size.
778         (WebCore::RenderBlock::FloatingObject::FloatingObject): Added an
779         m_isDescendant flag, used by clearFloats() to distinguish between floats
780         entering the block from outside and floats internal to the block.
781
782         * rendering/RootInlineBox.h:
783         (WebCore::RootInlineBox::floats): Added.
784         (WebCore::RootInlineBox::floatsPtr): Added.
785         (WebCore::RootInlineBox::Overflow::Overflow): Added a data member to
786         hold the floats originating on the line.
787
788         * rendering/bidi.cpp:
789         (WebCore::RenderBlock::layoutInlineChildren): Made the existence of
790         floats not force a full layout. Changed to cache the geometry of floats
791         in the block and detect changes to it. If a float's size or position
792         changes, all lines from that point on are treated as dirty. An exception
793         is a change in the dimensions of a float on an otherwise-clean line,
794         which only dirties lines potentially affected by the change (see
795         determineStartPosition()). Added code to update each RootInlineBox's
796         set of floats as lines are laid out. Added code to shift floats
797         belonging to clean lines in the end along with the lines.
798         (WebCore::RenderBlock::determineStartPosition): Made this function look
799         for changes to floats' dimensions and mark lines as dirty accordingly.
800         Also look for new floats and if found, cause a full layout. Added code
801         to re-add floats belonging to clean lines.
802         (WebCore::RenderBlock::matchedEndLine): Added checking that the clean
803         lines in the end can be shifted vertically as needed, i.e. that the
804         available width along the way is uniform.
805
806 2008-03-17  Eric Seidel  <eric@webkit.org>
807
808         Reviewed by darin.
809
810         Fix _NPN_IntFromIdentifier (and export the symbol for use!)
811
812         Test: plugins/netscape-identifier-conversion.html
813
814         * WebCore.NPAPI.exp:
815         * bridge/npruntime.cpp:
816         (_NPN_IntFromIdentifier):
817
818 2008-03-17  Sam Weinig  <sam@webkit.org>
819
820         Reviewed by Dan Bernstein.
821
822         Add HTMLCollection constructor to the Window object. (Omission noticed by Harri Porten)
823
824         * page/DOMWindow.idl: 
825
826 2008-03-17  Holger Hans Peter Freyther  <zecke@selfish.org>
827
828         Unreviewed Gtk+ build fix.
829
830         * platform/gtk/ScrollViewGtk.cpp: remove const
831
832 2008-03-17  Julien Chaffraix  <julien.chaffraix@gmail.com>
833
834         Reviewed by Holger.
835
836         <http://bugs.webkit.org/show_bug.cgi?id=17754>
837
838         - Implement ResourceHandle::loadResourceSynchronously to dispatch synchronous
839           requests.
840
841         - Implement WebCoreSynchronousLoader, the ResourceHandleClient which holds
842           the network data, response and error for us during the transfert.
843
844         * platform/network/ResourceHandleInternal.h: Remove trailing white space.
845         * platform/network/curl/ResourceHandleCurl.cpp: Add WebCoreSynchronousLoader
846         (WebCore::WebCoreSynchronousLoader::resourceResponse):
847         (WebCore::WebCoreSynchronousLoader::resourceError):
848         (WebCore::WebCoreSynchronousLoader::data):
849         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
850         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
851         (WebCore::WebCoreSynchronousLoader::didReceiveData):
852         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
853         (WebCore::WebCoreSynchronousLoader::didFail):
854         (WebCore::ResourceHandle::loadResourceSynchronously): Implement method
855         using WebCoreSynchronousLoader.
856
857         * platform/network/curl/ResourceHandleManager.cpp:
858         (WebCore::ResourceHandleManager::dispatchSynchronousJob):
859         (WebCore::ResourceHandleManager::startJob):
860         (WebCore::ResourceHandleManager::initializeHandle): Handle initialization
861         method used both for synchronous and asynchronous job.
862
863         * platform/network/curl/ResourceHandleManager.h:
864
865 2008-03-17  Darin Adler  <darin@apple.com>
866
867         - try to fix GTK build
868
869         * platform/ScrollView.h: Make setGtkAdjustments adjustment.
870         And non-virtual (why was it virtual?).
871
872 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
873
874         Fix Bug 17898: Split PluginMessageThrottlerWin into its own files
875
876         <http://bugs.webkit.org/show_bug.cgi?id=17898>
877
878         Move the PluginMessageThrottlerWin class into its own files, in
879         preparation for refactoring PluginView code to be shared.
880
881         Reviewed and tweaked by Adam Roben.
882
883         * WebCore.vcproj/WebCore.vcproj:
884         * plugins/PluginView.h:
885         * plugins/win/PluginMessageThrottlerWin.cpp: Added.
886         * plugins/win/PluginMessageThrottlerWin.h: Added.
887         * plugins/win/PluginViewWin.cpp:
888
889 2008-03-17  Adam Roben  <aroben@apple.com>
890
891         More Windows build fixes after r31098
892
893         * platform/ScrollView.h: Make some more methods public.
894
895 2008-03-17  Adam Roben  <aroben@apple.com>
896
897         Windows and Qt build fixes after r31098
898
899         * platform/ScrollView.h: Mark methods public that still need to be so.
900
901 2008-03-16  Timothy Hatcher  <timothy@apple.com>
902
903         Reviewed by Darin Adler.
904
905         Bug 17883: Console completion should support bracket notation
906         http://bugs.webkit.org/show_bug.cgi?id=17883
907
908         Also fixes a bug where the Inspector's window object was used instead of the
909         inspected window object.
910
911         * page/inspector/ConsolePanel.js:
912         (WebInspector.ConsolePanel.complete): Add a comment about the _backwardsRange call.
913         (WebInspector.ConsolePanel.completions): Add a comment about the _backwardsRange call.
914         Check the last character of the expression for a dot or bracket. Fallback
915         to the InspectorController.inspectedWindow() instead of window, this was a bad bug.
916         If the expression caused an exception, just consider the prefix a window property.
917         When bracket notation is used remember what quote was used and compared property names
918         with that quote surrounding it. Also escape the property name for the quote and backslash.
919
920 2008-03-17  Robert Blaut  <webkit@blaut.biz>
921
922         Reviewed by Darin.
923
924         Fix for bug http://bugs.webkit.org/show_bug.cgi?id=17696
925         Set default margin-bottom for form element in quirk mode
926         and be compatible with Gecko.
927
928         Tests: fast/css/margin-bottom-form-element-quirk.html
929                fast/css/margin-bottom-form-element-strict.html
930
931         * css/html4.css:
932         * css/quirks.css:
933
934 2008-03-17  Antti Koivisto  <antti@apple.com>
935
936         Reviewed by Darin.
937
938         Speculative fix for http://bugs.webkit.org/show_bug.cgi?id=17878
939         Bug 17878: REGRESSION: Acid3 sometimes crashes Webkit under WebCore::Loader::Host::cancelRequests
940         
941         I can't reproduce the crash or make a test case for this one but I'm pretty sure this
942         is the problem. Essentially the same bug as http://bugs.webkit.org/show_bug.cgi?id=17862
943         except in didFail() instead of didFinishLoading().
944
945         * loader/loader.cpp:
946         (WebCore::Loader::Host::didFail):
947
948 2008-03-17  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
949
950         Reviewed and tweaked by Darin.
951
952         http://bugs.webkit.org/show_bug.cgi?id=17172
953         Refactor platform checks in ScrollView.h
954
955         * platform/ScrollView.h: Change #ifs around.
956
957 2008-03-17  Yuzhu Shen  <yuzhu.shen@gmail.com>
958
959         Reviewed by Darin.
960
961         Fix the bug: http://bugs.webkit.org/show_bug.cgi?id=17760
962         It is necessary to load the image even when src="".
963
964         Test: fast/images/load-img-with-empty-src.html
965
966         * html/HTMLImageLoader.cpp:
967         (WebCore::HTMLImageLoader::updateFromElement): isNull rather than isEmpty.
968
969 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
970
971         Fix GTK+ build from r31094.
972
973         * plugins/gtk/PluginDatabaseGtk.cpp:
974         (PluginDatabase::getPluginsInPaths):
975
976 2008-03-17  Adam Roben  <aroben@apple.com>
977
978         Fix Bug 17876: REGRESSION (r31060): Attempting to visit Ofcom page causes crash
979
980         <http://bugs.webkit.org/show_bug.cgi?id=17876>
981
982         Reviewed by John.
983
984         Test: fast/dom/remove-named-attribute-crash.html
985
986         * dom/NamedAttrMap.cpp:
987         (WebCore::NamedAttrMap::removeAttribute): Store the Attribute we're
988         going to remove from the m_attributes Vector in a RefPtr so it doesn't
989         get deleted when it is removed from the Vector.
990
991 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
992
993         Reviewed by Adam Roben.
994
995         Implement PluginDatabase for GTK+ with PluginDatabaseGtk.cpp.
996         Remove implemented methods from TemporaryLinkStubs.
997
998         * GNUmakefile.am:
999         * plugins/gtk:
1000         * plugins/gtk/PluginDatabaseGtk.cpp:
1001         * platform/gtk/TemporaryLinkStubs.cpp:
1002
1003 2008-03-17  Simon Hausmann  <hausmann@webkit.org>
1004
1005         Fix the Qt build.
1006
1007         * platform/text/qt/TextCodecQt.cpp:
1008         (WebCore::TextCodecQt::encode):
1009         * platform/text/qt/TextCodecQt.h:
1010
1011 2008-03-16  Maciej Stachowiak  <mjs@apple.com>
1012
1013         Not reviewed, just fixing an incomplete comment from the last commit.
1014
1015         * dom/Range.cpp:
1016         (WebCore::Range::surroundContents):
1017
1018 2008-03-16  Maciej Stachowiak  <mjs@apple.com>
1019
1020         Reviewed by Darin.
1021
1022         - fixed "Acid3 expects different exceptions for surroundContents calls involving comment nodes (affects Acid3 test 11)"
1023         http://bugs.webkit.org/show_bug.cgi?id=17509
1024         
1025         This gets us to 92/100
1026
1027         * dom/Range.cpp:
1028         (WebCore::Range::surroundContents): Check for
1029         HIERARCHY_REQUEST_ERR before BAD_BOUNDARYPOINTS_ERR, since Acid3
1030         expects exceptional conditions to be tested in the order that the
1031         spec lists them. Also, adjust the HIERARCHY_REQUEST_ERR check. If
1032         the start point of the range is in a comment node, the node that
1033         would be the parent of a partial replacement is actually the
1034         comment node's parent (since comment nodes have character
1035         indices), so we should do the HIERARCHY_REQUEST_ERR check based on
1036         the parent of the comment node, as for text nodes, even though it
1037         will fail later with a different exception because it is not
1038         allowed to surround a partially selected non-text node.
1039
1040 2008-03-16  Marvin Decker  <marv.decker@gmail.com>
1041
1042         Reviewed by Darin.
1043
1044         Fix bug 15119: URL query characters that are unencodable in the
1045         request's character set should be converted to XML entities with
1046         non-alphanumeric characters escaped.
1047
1048         Test: http/tests/uri/escaped-entity.html
1049
1050         * html/FormDataList.cpp:
1051         (WebCore::FormDataList::appendString):
1052         * html/HTMLFormElement.cpp:
1053         (WebCore::HTMLFormElement::formData):
1054         * platform/KURL.cpp:
1055         (WebCore::encodeRelativeString):
1056         * platform/text/String.cpp:
1057         (WebCore::String::latin1):
1058         (WebCore::String::utf8):
1059         * platform/text/TextCodec.cpp:
1060         (WebCore::TextCodec::unencodableCharReplacement):
1061         * platform/text/TextCodec.h:
1062         (WebCore::):
1063         * platform/text/TextCodecICU.cpp:
1064         (WebCore::urlEscapedEntityCallback):
1065         (WebCore::gbkUrlEscapedEntityCallack):
1066         (WebCore::TextCodecICU::encode):
1067         * platform/text/TextCodecICU.h:
1068         (WebCore::TextCodecICU::setNeedsGBKFallbacks):
1069         * platform/text/TextCodecLatin1.cpp:
1070         (WebCore::encodeComplexWindowsLatin1):
1071         (WebCore::TextCodecLatin1::encode):
1072         * platform/text/TextCodecLatin1.h:
1073         * platform/text/TextCodecUTF16.cpp:
1074         (WebCore::TextCodecUTF16::encode):
1075         * platform/text/TextCodecUTF16.h:
1076         * platform/text/TextCodecUserDefined.cpp:
1077         (WebCore::encodeComplexUserDefined):
1078         (WebCore::TextCodecUserDefined::encode):
1079         * platform/text/TextCodecUserDefined.h:
1080         * platform/text/TextEncoding.cpp:
1081         (WebCore::TextEncoding::encode):
1082         * platform/text/TextEncoding.h:
1083         * platform/text/mac/TextCodecMac.cpp:
1084         (WebCore::TextCodecMac::encode):
1085         * platform/text/mac/TextCodecMac.h:
1086         * xml/XMLHttpRequest.cpp:
1087         (WebCore::XMLHttpRequest::send):
1088
1089 2008-03-16  Kevin Ollivier  <kevino@theolliviers.com>
1090
1091         Rubber stamped by Darin.
1092
1093         Add set-webkit-configuration support for wx port, and centralize
1094         build dir location setting.
1095
1096         http://bugs.webkit.org/show_bug.cgi?id=17790
1097
1098         * webcore-base.bkl:
1099
1100 2008-03-16  Darin Adler  <darin@apple.com>
1101
1102         Reviewed by Mark Rowe.
1103
1104         - http://bugs.webkit.org/show_bug.cgi?id=17881
1105           a little cleanup for HTMLTextAreaElement
1106
1107         Tests: fast/forms/textarea-default-value-leading-newline.html
1108                fast/forms/textarea-linewrap-dynamic.html
1109
1110         * html/HTMLTextAreaElement.cpp:
1111         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Tweaked names/
1112         (WebCore::HTMLTextAreaElement::selectionStart): Ditto, also use early return
1113         and check for < 0 rather than -1 specifically.
1114         (WebCore::HTMLTextAreaElement::selectionEnd): Ditto.
1115         (WebCore::HTMLTextAreaElement::setSelectionStart): Early return.
1116         (WebCore::HTMLTextAreaElement::setSelectionEnd): Ditto.
1117         (WebCore::HTMLTextAreaElement::select): Ditto.
1118         (WebCore::HTMLTextAreaElement::setSelectionRange): Ditto.
1119         (WebCore::HTMLTextAreaElement::parseMappedAttribute): Changed value parsing
1120         to treat unknown values as meaning "default" rather than "leave value as-is".
1121         Only call setNeedsLayoutAndPrefWidthsRecalc when mode changed.
1122         (WebCore::HTMLTextAreaElement::createRenderer): Removed name of unused argument.
1123         (WebCore::HTMLTextAreaElement::appendFormData): Updated for name changes.
1124         (WebCore::HTMLTextAreaElement::isKeyboardFocusable): Got rid of unnneeded explicit
1125         class name in isFocusable call.
1126         (WebCore::HTMLTextAreaElement::isMouseFocusable): Ditto.
1127         (WebCore::HTMLTextAreaElement::updateFocusAppearance): Tweaked formatting.
1128         (WebCore::HTMLTextAreaElement::defaultEventHandler): Ditto.
1129         (WebCore::HTMLTextAreaElement::updateValue): Early return.
1130         (WebCore::HTMLTextAreaElement::setValue): Got rid of intermediate value to
1131         eliminate on small refcount churn.
1132         (WebCore::HTMLTextAreaElement::defaultValue): Got rid of unneeded redundant
1133         string length checks, since String already checks all indexing and returns 0.
1134         (WebCore::HTMLTextAreaElement::setDefaultValue): Added code to normalize
1135         line endings and add a leading line ending to fix cases where the first
1136         character is a newline.
1137         (WebCore::HTMLTextAreaElement::accessKeyAction): Removed name of unused arg.
1138         (WebCore::HTMLTextAreaElement::accessKey): Changed return value to avoid
1139         refcount churn.
1140         (WebCore::HTMLTextAreaElement::selection): Updated names and use < 0 instead
1141         of -1 specifically.
1142
1143         * html/HTMLTextAreaElement.h: Replaced wrap function with more-specific
1144         shouldWrapText one. Changed return value of accessKey. Made WrapMethod enum
1145         provate and renamed the values. Renamed cachedSelStart and cachedSelEnd to
1146         m_cachedSelectionStart and m_cachedSelectionEnd.
1147
1148         * rendering/RenderTextControl.cpp:
1149         (WebCore::RenderTextControl::createInnerTextStyle): Updated for change to
1150         HTMLTextAreaElement wrap function.
1151
1152 2008-03-16  Antti Koivisto  <antti@apple.com>
1153
1154         Reviewed by Mitz.
1155
1156         Fix http/tests/security/frame-loading-via-document-write.html
1157         which was broken by the preload patch.
1158         
1159         Don't print error message when preload fails local file security check.
1160         Some minor refactoring.
1161
1162         * html/PreloadScanner.cpp:
1163         (WebCore::PreloadScanner::emitTag):
1164         (WebCore::PreloadScanner::emitCSSRule):
1165         * loader/Cache.cpp:
1166         (WebCore::Cache::requestResource):
1167         * loader/Cache.h:
1168         * loader/DocLoader.cpp:
1169         (WebCore::DocLoader::requestResource):
1170         (WebCore::DocLoader::preload):
1171         (WebCore::DocLoader::printPreloadStats):
1172         * loader/DocLoader.h:
1173
1174 2008-03-16  Antti Koivisto  <antti@apple.com>
1175
1176         Reviewed by Darin.
1177         
1178         Fix http://bugs.webkit.org/show_bug.cgi?id=17862
1179         REGRESSION (r31038): Reproducible crash under DocLoader::checkForReload() at marware.com
1180         
1181         This was a memory smasher introduced by the preloading patch. 
1182         If a script resource was marked uncacheable, early deletion of the 
1183         Request object would cause deletion of the CachedResource too if
1184         it was referred more than once in a single document.
1185
1186         Test: http/tests/misc/uncacheable-script-repeated.html
1187
1188         * loader/loader.cpp:
1189         (WebCore::Loader::Host::servePendingRequests):
1190         (WebCore::Loader::Host::didFinishLoading):
1191
1192 2008-03-16  Yuzhu Shen  <yuzhu.shen@gmail.com>
1193
1194         Reviewed by Darin.
1195
1196         Fix bug http://bugs.webkit.org/show_bug.cgi?id=17714
1197         <img href="#"> should go to top of the page.
1198
1199         Test: fast/html/empty-fragment-id-goto-top.html
1200
1201         * loader/FrameLoader.cpp:
1202         (WebCore::FrameLoader::gotoAnchor):
1203
1204 2008-03-16  Thiago Macieira  <thiago.macieira@trolltech.com>
1205
1206         Reviewed by Darin.
1207
1208         Don't use RefPtr in classes you haven't seen the implementation of.
1209
1210         Forward-declaration and declaration of RefPtr<Foo> is ok. But you
1211         cannot *use* said objects until Foo is defined. This is true even for
1212         initialisation with a 0.
1213
1214         Seems the HP aCC compiler is more strict here than gcc.
1215
1216         * editing/SplitTextNodeCommand.h:
1217         * page/FrameTree.h:
1218         * xml/XPathExpressionNode.h:
1219
1220 2008-03-16  Darin Adler  <darin@apple.com>
1221
1222         Reviewed by Mitz.
1223
1224         - fix http://bugs.webkit.org/show_bug.cgi?id=14941
1225           <rdar://problem/5404093> textarea value from JavaScript includes extra newline
1226
1227         Test: fast/forms/textarea-trailing-newline.html
1228
1229         * rendering/RenderTextControl.cpp:
1230         (WebCore::RenderTextControl::finishText): Added code to strip the trailing
1231         newline. It's possible there are some obscure cases where this is not wanted,
1232         but I couldn't find any. If someone finds a case where this is bad, we can
1233         make the code conditional.
1234
1235 2008-03-16  Darin Adler  <darin@apple.com>
1236
1237         Reviewed by Mitz.
1238
1239         - fix http://bugs.webkit.org/show_bug.cgi?id=17876
1240           Attempting to visit Ofcom page causes crash
1241
1242         This is causing intermittent crashes on some existing test cases on the buildbot
1243         too; I don't have a 100% test case right now, but it should be easy to add one later
1244         and this does fix a crash in a test we already have.
1245
1246         * dom/CharacterData.cpp:
1247         (WebCore::CharacterData::CharacterData): Initialize m_data to the empty string,
1248         not the null string. The class assumes the string can never being null.
1249         (WebCore::CharacterData::setData): If asked to set the data to the null string,
1250         set it to the empty string instead. This matches what the (non-empty) constructor
1251         has always done.
1252
1253 2008-03-15  Timothy Hatcher  <timothy@apple.com>
1254
1255         Reviewed by Adam Roben.
1256
1257         Bug 17870: Web Inspector console should feel more like a terminal
1258         http://bugs.webkit.org/show_bug.cgi?id=17870
1259
1260         Bug 14390: Console input area should be more noticeable
1261         http://bugs.webkit.org/show_bug.cgi?id=14390
1262
1263         Adds tab completion, auto completion and a blended input prompt.
1264         The prompt is also focused when the console is shown.
1265            Implements a new look, that will be part of the UI refresh.
1266
1267         * page/inspector/ConsolePanel.js: 
1268         (WebInspector.ConsolePanel): Renamed a few properties.
1269         (WebInspector.ConsolePanel.get/set promptText): Property to set
1270         and get the current prompt text. Does not affect command history.
1271         (WebInspector.ConsolePanel.show): Make the prompt focus on show.
1272         (WebInspector.ConsolePanel.acceptAutoComplete): Accepts any
1273         pending auto complete text.
1274         (WebInspector.ConsolePanel.clearAutoComplete): Cancels any pending
1275         auto complete text.
1276         (WebInspector.ConsolePanel.autoCompleteSoon): Sets a timeout to auto
1277         complete in 250 ms, only if there isn't a pending auto complete.
1278         (WebInspector.ConsolePanel.complete): 
1279         (WebInspector.ConsolePanel.completions): Generate a list of possible
1280         completions based on the prefix and the previous expression ranges.
1281         (WebInspector.ConsolePanel._backwardsRange): Helper to scan backwards
1282         from a node and offset to find a start node and offset of the first
1283         character found in the characters string.
1284         (WebInspector.ConsolePanel._evalInInspectedWindow): Helper to eval in the
1285         inspected window.
1286         (WebInspector.ConsolePanel._caretInsidePrompt): Returns true if the selection
1287         is collapsed and is inside the prompt element.
1288         (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Moves the selection
1289         to the end of the prompt.
1290         (WebInspector.ConsolePanel._onTabPressed): Calls complete on
1291         tab press.
1292         (WebInspector.ConsolePanel._onEnterPressed): Call clearAutoComplete so the
1293         autocompletion text is not evaluated.
1294
1295         * page/inspector/Images/errorIcon.png: New image.
1296         * page/inspector/Images/userInputIcon.png: Added.
1297         * page/inspector/Images/userInputPreviousIcon.png: Added.
1298         * page/inspector/Images/warningIcon.png: New image.
1299         * page/inspector/inspector.css: New refreshed UI.
1300
1301 2008-03-15  Mark Mentovai  <mark@moxienet.com>
1302
1303         Reviewed and landed by Darin.
1304
1305         - http://bugs.webkit.org/show_bug.cgi?id=17833
1306           use file extensions instead of explicit file types in WebCore's Xcode project
1307
1308         * WebCore.xcodeproj/project.pbxproj: Remove unnecessary
1309           uses of explicitFileType, preferring lastKnownFileType ("File Type:
1310           Default for File" in Xcode's File Info's General tab).  Files below
1311           that relied on an explicit file type setting other than what would
1312           be implied by their extensions have been renamed to have correct
1313           extensions.
1314         * bridge/jni/jni_jsobject.cpp: Removed.
1315         * bridge/jni/jni_jsobject.mm: Copied from bridge/jni/jni_jsobject.cpp.
1316         * loader/mac/LoaderNSURLExtras.m: Removed.
1317         * loader/mac/LoaderNSURLExtras.mm: Copied from loader/mac/LoaderNSURLExtras.m.
1318         * platform/mac/SharedTimerMac.cpp: Removed.
1319         * platform/mac/SharedTimerMac.mm: Copied from platform/mac/SharedTimerMac.cpp.
1320
1321 2008-03-15  Darin Adler  <darin@apple.com>
1322
1323         Reviewed by Sam.
1324
1325         - fix http://bugs.webkit.org/show_bug.cgi?id=11997
1326           Ranges are not fixed after mutation (affects Acid3 test 13)
1327
1328         Test: fast/dom/Range/mutation.html
1329
1330         * WebCore.xcodeproj/project.pbxproj: Added NodeWithIndex.h, NodeWithIndexAfter.h,
1331         and NodeWithIndexBefore.h.
1332
1333         * dom/CharacterData.cpp:
1334         (WebCore::CharacterData::setData): Replaced call to Document::removeMarkers
1335         with call to Document::textRemoved.
1336         (WebCore::CharacterData::insertData): Replaced call to Document::shiftMarkers
1337         with call to Document::textInserted.
1338         (WebCore::CharacterData::deleteData): Replaced call to Document::removeMarkers
1339         and Document::shiftMarkers with call to Document::textRemoved.
1340         (WebCore::CharacterData::replaceData): Replaced call to Document::removeMarkers
1341         and Document::shiftMarkers with call to Document::textRemoved and
1342         Document::textInserted.
1343         (WebCore::CharacterData::containsOnlyWhitespace): Tweaked a bit.
1344
1345         * dom/ContainerNode.cpp:
1346         (WebCore::ContainerNode::childrenChanged): Added a call to
1347         Document::nodeChildrenChanged when the nmber of children was changed (and not
1348         by the parser).
1349         (WebCore::dispatchChildRemovalEvents): Updated for name change.
1350
1351         * dom/Document.cpp:
1352         (WebCore::Document::~Document): Assert that all ranges are gone.
1353         (WebCore::Document::nodeChildrenChanged): Added. Calls nodeChildrenChanged on
1354         all ranges.
1355         (WebCore::Document::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
1356         Added code to call nodeWillBeRemoved on all ranges.
1357         (WebCore::Document::textInserted): Added. Calls textInserted on all ranges and
1358         also calls shiftMarkers.
1359         (WebCore::Document::textRemoved): Added. Calls textRemoved on all ranges and also
1360         calls removeMarkers and shiftMarkers.
1361         (WebCore::Document::textNodesMerged): Added. Calls textNodesMerged on all ranges.
1362         (WebCore::Document::textNodeSplit): Added. Calls textNodeSplit on all ranges.
1363         (WebCore::Document::attachRange): Added. Adds range to the HashSet of all ranges
1364         for this document.
1365         (WebCore::Document::detachRange): Added. Removes range from the HashSet.
1366         * dom/Document.h: Added the new functions and the data member.
1367
1368         * dom/Element.cpp:
1369         (WebCore::Element::normalizeAttributes): Added. Contains the part of the
1370         normalize function that's specific to Element. Better encapsulation to have it
1371         here rather than in Node::normalize.
1372         * dom/Element.h: Added the new function.
1373
1374         * dom/Node.cpp:
1375         (WebCore::Node::normalize): Rewrote so it's no longer recursive. Also added
1376         a call to textNodesMerged after each pair of nodes is merged but before the
1377         second node is removed.
1378         (WebCore::Node::traverseNextNodePostOrder): Added. Helper function used by
1379         normalize, but also useful elsewhere.
1380         * dom/Node.h: Added the new function.
1381
1382         * dom/NodeIterator.cpp:
1383         (WebCore::NodeIterator::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
1384         * dom/NodeIterator.h: Ditto.
1385
1386         * dom/ProcessingInstruction.cpp:
1387         (WebCore::ProcessingInstruction::setData): Call textRemoved.
1388
1389         * dom/Range.cpp:
1390         (WebCore::NodeWithIndex::index): Added. Computes and stores index.
1391         (WebCore::NodeWithIndexBefore::indexBefore): Added. Computes and stores index.
1392         (WebCore::NodeWithIndexAfter::indexAfter): Added. Computes and stores index.
1393         (WebCore::Range::Range): Call attachRange.
1394         (WebCore::Range::~Range): Call detachRange unless the range is already detached.
1395         (WebCore::Range::commonAncestorContainer): Removed check for WRONG_DOCUMENT_ERR.
1396         It's no longer possible to create a range where the two containers are non-zero
1397         and have no common ancestor.
1398         (WebCore::Range::isPointInRange): Rewrote expression to be more readable.
1399         (WebCore::Range::compareNode): Changed local variable to use int for consistency.
1400         (WebCore::Range::compareBoundaryPoints): Replaced ASSERT with ASSERT_NOT_REACHED.
1401         (WebCore::Range::deleteContents): Removed check for INVALID_STATE_ERR and
1402         initialization of ec to 0; both are now inside checkDeleteExtract.
1403         (WebCore::Range::intersectsNode): Changed local variable to use int for consistency.
1404         Also changed comparison to use < 0 and >= 0 rather than checking explicitly for 1
1405         and -1.
1406         (WebCore::Range::processContents): Changed code to not get the nodeType multiple
1407         times on the same node, and tweaked formatting. Removed code to update the range
1408         on deletion, because the normal delete logic will take care of that now.
1409         (WebCore::Range::extractContents): Removed check for INVALID_STATE_ERR and
1410         initialization of ec to 0; both are now inside checkDeleteExtract.
1411         (WebCore::Range::insertNode): Changed local variable to use int for consistency.
1412         (WebCore::Range::toString): Changed variable name to pastLast.
1413         (WebCore::Range::detach): Call detachRange.
1414         (WebCore::Range::checkDeleteExtract): Added check for detached range and code to
1415         set ec to 0; moved here from the two callers. Also changed variable name to pastLast.
1416         (WebCore::endpointNodeChildrenChanged): Added.
1417         (WebCore::Range::nodeChildrenChanged): Added.
1418         (WebCore::endpointNodeWillBeRemoved): Added.
1419         (WebCore::Range::nodeWillBeRemoved): Added.
1420         (WebCore::endpointTextInserted): Added.
1421         (WebCore::Range::textInserted): Added.
1422         (WebCore::endpointTextRemoved): Added.
1423         (WebCore::Range::textRemoved): Added.
1424         (WebCore::endpointTextNodesMerged): Added.
1425         (WebCore::Range::textNodesMerged): Added.
1426         (WebCore::endpointTextNodesSplit): Added.
1427         (WebCore::Range::textNodeSplit): Added.
1428
1429         * dom/Range.h: Added new member functions.
1430
1431         * dom/NodeWithIndex.h: Added. Makes it so we won't find the index for the same
1432         node more than once.
1433         * dom/NodeWithIndexAfter.h: Added. Similar to NodeWithIndex but gives the index after a
1434         node and treats a node pointer of 0 as meaning "before first node in parent container".
1435         * dom/NodeWithIndexBefore.h: Added.  Similar to NodeWithIndex but treats a node pointer of 0
1436         as meaning "after last node in parent container".
1437
1438         * dom/Text.cpp:
1439         (WebCore::Text::splitText): Call textNodeSplit.
1440
1441         * editing/ApplyStyleCommand.cpp:
1442         (WebCore::ApplyStyleCommand::applyInlineStyle): Changed variable name to pastLast.
1443
1444 2008-03-15  Julien Chaffraix  <julien.chaffraix@gmail.com>
1445
1446         Reviewed by Holger.
1447
1448         [CURL] Crash below ResourceHandleManager::setupPOST when job->request().httpBody() is NULL
1449         http://bugs.webkit.org/show_bug.cgi?id=16906
1450
1451         Add null checks for httpBody() to match other ports.
1452
1453         Test: http/tests/xmlhttprequest/xmlhttprequest-post-crash.html
1454
1455         * platform/network/curl/ResourceHandleManager.cpp:
1456         (WebCore::readCallback): Add null check.
1457         (WebCore::ResourceHandleManager::setupPOST): Ditto.
1458
1459 2008-03-14  Steve Falkenburg  <sfalken@apple.com>
1460
1461         PGO build fixes.
1462
1463         * WebCore.vcproj/WebCore.vcproj:
1464
1465 2008-03-14  Anders Carlsson  <andersca@apple.com>
1466
1467         Reviewed by Sam.
1468
1469         <rdar://problem/5794989>
1470         https://bugs.webkit.org/show_bug.cgi?id=17792
1471         REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work
1472
1473         Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow
1474         so that somewindow.open calls where the active window and 'somewindow' differ return the correct frame.
1475         
1476         * bindings/js/JSDOMWindowBase.cpp:
1477         (WebCore::createWindow):
1478         * loader/FrameLoader.cpp:
1479         (WebCore::FrameLoader::createWindow):
1480         * loader/FrameLoader.h:
1481
1482 2008-03-14  Dan Bernstein  <mitz@apple.com>
1483
1484         Reviewed by Mark Rowe.
1485
1486         - fix <rdar://problem/5797836> shadow offsets are smaller than specified
1487
1488         * platform/graphics/cg/GraphicsContextCG.cpp:
1489         (WebCore::GraphicsContext::setShadow): Made the workaround for
1490         <rdar://problem/5539388> unconditional.
1491
1492 2008-03-14  Adam Roben  <aroben@apple.com>
1493
1494         Fix it right this time
1495
1496         * platform/MainThread.cpp: Cast to unsigned so we can use %u in the
1497         format string.
1498         * platform/mac/MainThreadMac.mm:
1499
1500 2008-03-14  Adam Roben  <aroben@apple.com>
1501
1502         Mac build fix
1503
1504         * platform/mac/MainThreadMac.mm: Corrected a typo.
1505
1506 2008-03-14  Dan Bernstein  <mitz@apple.com>
1507
1508         Reviewed by Darin Adler.
1509
1510         - fix http://bugs.webkit.org/show_bug.cgi?id=17834
1511           REGRESSION: floated first-letter does not work when included in table
1512
1513         Test: fast/css/first-letter-float.html
1514
1515         * rendering/RenderBlock.cpp:
1516         (WebCore::RenderBlock::updateFirstLetter): Changed the search for the
1517         first text node to stop at a float if that float is an existing first-
1518         letter.
1519
1520 2008-03-14  Sam Weinig  <sam@webkit.org>
1521
1522         Fix Mac build
1523
1524         * WebCore.xcodeproj/project.pbxproj:
1525
1526 2008-03-13  Adam Roben  <aroben@apple.com>
1527
1528         Make most of callOnMainThread's implementation be cross-platform
1529
1530         I took the non-platform-specific parts of MainThreadWin.cpp and moved
1531         them to a new MainThread.cpp. Each platform is now responsible for
1532         implementing one function, scheduleDispatchFunctionsOnMainThread,
1533         which is supposed to set things up so that
1534         dispatchFunctionsFromMainThread gets called from the main thread in
1535         the near future.
1536
1537         Reviewed by Alexey.
1538
1539         * GNUmakefile.am: Added MainThread.cpp to the project.
1540         * WebCore.pro: Ditto.
1541         * WebCore.vcproj/WebCore.vcproj: Ditto.
1542         * WebCore.xcodeproj/project.pbxproj: Ditto.
1543         * WebCoreSources.bkl: Ditto.
1544         * platform/MainThread.cpp:
1545           - Copied from WebCore/platform/win/MainThreadWin.cpp.
1546           - Removed the Windows-specific parts.
1547         (WebCore::callOnMainThread): Changed to call
1548         scheduleDispatchFunctionsOnMainThread instead of PostMessage.
1549         * platform/gtk/MainThreadGtk.cpp:
1550         (WebCore::timeoutFired): Renamed from callFunctionOnMainThread. Now
1551         just calls dispatchFunctionsFromMainThread.
1552         (WebCore::scheduleDispatchFunctionsOnMainThread): Added. Calls through
1553         to g_timeout_add.
1554         * platform/mac/MainThreadMac.mm: Renamed WebCoreFunctionWrapper to
1555         WebCoreMainThreadCaller.
1556         (-[WebCoreMainThreadCaller call]): Calls through to
1557         dispatchFunctionsFromMainThread.
1558         (WebCore::scheduleDispatchFunctionsOnMainThread): Makes a new
1559         WebCoreMainThreadCaller and calls performSelectorOnMainThread on it.
1560         * platform/qt/MainThreadQt.cpp: Removed PerformFunctionEvent.
1561         (WebCore::MainThreadInvoker::event): Chagned to call through to
1562         dispatchFunctionsFromMainThread.
1563         (WebCore::scheduleDispatchFunctionsOnMainThread): Sends an empty event
1564         to the MainThreadInvoker.
1565         * platform/win/MainThreadWin.cpp:
1566           - Removed the non-Windows-specific parts.
1567           - Removed some unnecessary initialization of static variables to 0.
1568         (WebCore::ThreadingWindowWndProc): Changed to call
1569         dispatchFunctionsFromMainThread.
1570         (WebCore::scheduleDispatchFunctionsOnMainThread): Calls through to
1571         PostMessage.
1572         * platform/wx/MainThreadWx.cpp:
1573         (WebCore::scheduleDispatchFunctionsOnMainThread): Added.
1574
1575 2008-03-14  Beth Dakin  <bdakin@apple.com>
1576
1577         Reviewed by Geoff.
1578
1579         Fix for <rdar://problem/5728171> Potential PLT speedup: don't 
1580         realloc every time inside NamedAttrMap::addAttribute
1581
1582         The speed-up for this turned out to be so small that it is mostly 
1583         imperceptible. It is likely that it is a tiny boost, though, and 
1584         the new code is much cleaner.
1585
1586         * dom/Element.cpp:
1587         (WebCore::Element::setAttributeMap): attrs is now called 
1588         m_attributes
1589         * dom/NamedAttrMap.cpp: The array attrs is now the Vector of 
1590         RefPtrs called m_attributes, and there is no longer any need for 
1591         the len member variable. 
1592         (WebCore::NamedAttrMap::NamedAttrMap): 
1593         (WebCore::NamedAttrMap::item):
1594         (WebCore::NamedAttrMap::getAttributeItem):
1595         (WebCore::NamedAttrMap::clearAttributes):
1596         (WebCore::NamedAttrMap::operator=):
1597         (WebCore::NamedAttrMap::addAttribute):
1598         (WebCore::NamedAttrMap::removeAttribute):
1599         (WebCore::NamedAttrMap::mapsEquivalent):
1600         * dom/NamedAttrMap.h: Same.
1601         (WebCore::NamedAttrMap::length):
1602         (WebCore::NamedAttrMap::attributeItem):
1603         (WebCore::NamedAttrMap::shrinkToLength):
1604         (WebCore::NamedAttrMap::reserveCapacity):
1605         * html/HTMLTokenizer.cpp: One of the benefits of the old array was 
1606         that it never took up more memory than it needed to. So the 
1607         tokenizer utilizes new member functions on NamedAttrMap 
1608         (shrinkToLength and reserveCapacity) to try to keep memory usage at 
1609         a minimum. 
1610         (WebCore::Token::addAttribute):
1611         (WebCore::HTMLTokenizer::processToken):
1612
1613 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
1614
1615         BUILD FIX when ENABLE(MAC_JAVA_BRIDGE) set to 0.
1616
1617         * page/mac/FrameMac.mm: Move up #if ENABLE(MAC_JAVA_BRIDGE) guard
1618         to comment out unused code.
1619
1620 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
1621
1622         Unify concept of enabling the Mac Java bridge.
1623
1624         Reviewed by Darin and Anders.
1625
1626         No test cases added since there is no change in functionality.
1627
1628         * DerivedSources.make: Added check for ENABLE_MAC_JAVA_BRIDGE macro.
1629         If defined as "1", add WebCore.JNI.exp to WEBCORE_EXPORT_DEPENDENCIES.
1630         * WebCore.JNI.exp: Added.
1631         * WebCore.base.exp: Moved exported JNI methods to WebCore.JNI.exp.
1632
1633         * bridge/jni/jni_class.cpp: Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
1634         * bridge/jni/jni_class.h: Ditto.
1635         * bridge/jni/jni_instance.cpp: Ditto.
1636         * bridge/jni/jni_instance.h: Ditto.
1637         * bridge/jni/jni_jsobject.cpp: Ditto.
1638         * bridge/jni/jni_jsobject.h: Ditto.
1639         * bridge/jni/jni_objc.mm: Ditto.
1640         * bridge/jni/jni_runtime.cpp: Ditto.
1641         * bridge/jni/jni_runtime.h: Ditto.
1642         * bridge/jni/jni_utility.cpp: Ditto.
1643         * bridge/jni/jni_utility.h: Ditto.
1644
1645         * bridge/runtime.cpp: Removed unused #include statements.
1646         * bridge/runtime.h:
1647         (KJS::Bindings::Instance::BindingLanguage): Added #if ENABLE(MAC_JAVA_BRIDGE)
1648         guard for JavaLanguage enum.  Also added #if PLATFORM(MAC) guard for
1649         ObjectiveCLanguage enum to match corresponding code in runtime.cpp.
1650
1651         * config.h: Removed definition of HAVE_JNI.
1652
1653         * loader/FrameLoaderClient.h:
1654         (WebCore::FrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
1655         * page/Frame.cpp:
1656         (WebCore::Frame::Frame): Ditto.
1657         * page/Frame.h:
1658         (WebCore::Frame::initJavaJSBindings): Ditto.
1659         * page/mac/FrameMac.mm:
1660         (WebCore::Frame::createScriptInstanceForWidget): Ditto.
1661         (WebCore::Frame::initJavaJSBindings): Ditto.
1662
1663 2008-03-13  Darin Adler  <darin@apple.com>
1664
1665         * html/PreloadScanner.h: Corrected license.
1666         * html/PreloadScanner.cpp: Corrected license.
1667
1668 2008-03-13  Mark Mentovai  <mark@moxienet.com>
1669
1670         Reviewed by darin.  Landed by eseidel.
1671
1672         * platform/FloatConversion.h: Include a header to get CoreGraphics
1673         types when using CoreGraphics types.
1674
1675 2008-03-13  Mark Mentovai  <mark@moxienet.com>
1676
1677         Reviewed by eseidel.  Landed by eseidel.
1678
1679         * WebCore.xcodeproj/project.pbxproj:
1680         * css/CSSParser.cpp:
1681         * css/makeprop.pl:
1682         Move CSSPropertyNames.c to CSSPropertyNames.cpp
1683
1684 2008-03-13  Mark Mentovai  <mark@moxienet.com>
1685
1686         Reviewed by eseidel.  Landed by eseidel.
1687
1688         * platform/Arena.h: Use statement1;statement2 instead of
1689         (statement1,statement2) in CLEAR_UNUSED.
1690
1691 2008-03-13  Tommi Komulainen  <tommi.komulainen@iki.fi>
1692
1693         Reviewed by Alp Toker.
1694
1695         http://bugs.webkit.org/show_bug.cgi?id=17821
1696         [SOUP] POST requests are empty
1697
1698         Send the HTTP request body as well.
1699
1700         * platform/network/soup/ResourceHandleSoup.cpp:
1701         (WebCore::ResourceHandle::start):
1702
1703 2008-03-13  Dan Bernstein  <mitz@apple.com>
1704
1705         Reviewed by Dave Hyatt.
1706
1707         - fix http://bugs.webkit.org/show_bug.cgi?id=17819
1708           Border-collapse: collapse later cell wins on PC, earlier cell on Mac
1709
1710         Test: fast/table/border-collapsing/equal-precedence-resolution.html
1711
1712         * rendering/RenderTableCell.cpp:
1713         (WebCore::RenderTableCell::collapsedLeftBorder): When calling
1714         compareBorders() with borders that may have the same precedence, made
1715         sure to pass the border belonging to the earlier (in document order)
1716         element first, since compareBorders() prefers the first argument when
1717         there is a tie.
1718         (WebCore::RenderTableCell::collapsedRightBorder): Ditto.
1719         (WebCore::RenderTableCell::collapsedTopBorder): Ditto.
1720
1721 2008-03-13  Adam Roben  <aroben@apple.com>
1722
1723         wx build fix and Windows leak fix after r31034
1724
1725         * platform/graphics/wx/ImageWx.cpp:
1726         (WebCore::Image::loadPlatformResource): Use SharedBuffer::create.
1727         * platform/win/SharedBufferWin.cpp:
1728         (WebCore::SharedBuffer::createWithContentsOfFile): Ditto (we were
1729         leaking the SharedBuffer here before).
1730
1731 2008-03-13  Antti Koivisto  <antti@apple.com>
1732
1733         Reviewed by Eric.
1734
1735         Correct a few issues spotted by Mike Belshe. 
1736
1737         * html/PreloadScanner.cpp:
1738         (WebCore::PreloadScanner::tokenize):
1739         * loader/loader.cpp:
1740         (WebCore::Loader::cancelRequests):
1741
1742 2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>
1743
1744         Fix GTK+ build for SharedBuffer changes.
1745
1746         * platform/graphics/gtk/ImageGtk.cpp:
1747         (Image::loadPlatformResource):
1748
1749 2008-03-13  Steve Falkenburg  <sfalken@apple.com>
1750
1751         More PGO build fixes.
1752
1753         * WebCorePrefix.cpp:
1754
1755 2008-03-13  Antti Koivisto  <antti@apple.com>
1756
1757         Reviewed by Darin.
1758         
1759         Make page loads go fast.
1760         
1761         http://bugs.webkit.org/show_bug.cgi?id=17480
1762
1763         - Implement speculative preloading. When a script load blocks the main parser, use a side 
1764           parser to pick up more resources.
1765         - Implement per-host load queues, prioritize scripts and stylesheets over images.
1766         
1767         Depending on content and network latency this may speed things up quite a bit.
1768
1769         * WebCore.xcodeproj/project.pbxproj:
1770         * dom/Document.cpp:
1771         (WebCore::Document::implicitClose):
1772         Clear the preloads after laoding completes.
1773         
1774         * html/HTMLLinkElement.cpp:
1775         (WebCore::HTMLLinkElement::parseMappedAttribute):
1776         (WebCore::HTMLLinkElement::tokenizeRelAttribute):
1777         * html/HTMLLinkElement.h:
1778         Make tokenizeRelAttribute() public static so it can be used from elsewhere.
1779         Eliminate a pointless bitfield so I can get references.
1780         
1781         * html/HTMLTokenizer.cpp:
1782         (WebCore::HTMLTokenizer::scriptHandler):
1783         (WebCore::HTMLTokenizer::scriptExecution):
1784         (WebCore::HTMLTokenizer::write):
1785         * html/HTMLTokenizer.h:
1786         Spin up the preload scanner whenever a script load blocks the parser. One scanner tracks the end of 
1787         the document while temporary ones are created as needed to scan document.write() output.
1788         
1789         * html/PreloadScanner.cpp: Added.
1790         (WebCore::PreloadScanner::PreloadScanner):
1791         (WebCore::PreloadScanner::~PreloadScanner):
1792         (WebCore::PreloadScanner::begin):
1793         (WebCore::PreloadScanner::end):
1794         (WebCore::PreloadScanner::reset):
1795         (WebCore::PreloadScanner::write):
1796         (WebCore::isWhitespace):
1797         (WebCore::PreloadScanner::clearLastCharacters):
1798         (WebCore::PreloadScanner::rememberCharacter):
1799         (WebCore::PreloadScanner::lastCharactersMatch):
1800         (WebCore::legalEntityFor):
1801         (WebCore::PreloadScanner::consumeEntity):
1802         (WebCore::PreloadScanner::tokenize):
1803         (WebCore::PreloadScanner::processAttribute):
1804         (WebCore::PreloadScanner::emitCharacter):
1805         (WebCore::PreloadScanner::tokenizeCSS):
1806         (WebCore::PreloadScanner::emitTag):
1807         (WebCore::PreloadScanner::emitCSSRule):
1808         * html/PreloadScanner.h: Added.
1809         (WebCore::PreloadScanner::inProgress):
1810         (WebCore::PreloadScanner::):
1811         HTML5 tokenization plus some glue code. Fake CSS parsing thrown in just for fun.
1812         
1813         * loader/Cache.cpp:
1814         (WebCore::Cache::pruneDeadResources):
1815         Preloads have zero refcount, avoid kicking them out too early.
1816         
1817         * loader/CachedResource.cpp:
1818         (WebCore::CachedResource::CachedResource):
1819         (WebCore::CachedResource::ref):
1820         * loader/CachedResource.h:
1821         (WebCore::CachedResource::):
1822         (WebCore::CachedResource::preloadResult):
1823         (WebCore::CachedResource::setRequestedFromNetworkingLayer):
1824         (WebCore::CachedResource::canDelete):
1825         (WebCore::CachedResource::isPreloaded):
1826         (WebCore::CachedResource::increasePreloadCount):
1827         (WebCore::CachedResource::decreasePreloadCount):
1828         Keep track which resources are preloads. Avoid deleting them. Track
1829         at which point of the loading preloads get utilized to enable some interesting 
1830         statistics.
1831         
1832         * loader/DocLoader.cpp:
1833         (WebCore::DocLoader::~DocLoader):
1834         (WebCore::DocLoader::checkForReload):
1835         (WebCore::DocLoader::registerPreload):
1836         (WebCore::DocLoader::clearPreloads):
1837         (WebCore::DocLoader::printPreloadStats):
1838         * loader/DocLoader.h:
1839         Ensure we utilize preloaded resources during reloads.
1840         Keep a list of all preloads in the document. Clear the preloads after
1841         parsing is complete. Some debug statistics.
1842         
1843         * loader/DocumentLoader.cpp:
1844         (WebCore::DocumentLoader::isLoadingInAPISense):
1845         Avoid signaling that loading is complete too early. 
1846         
1847         * loader/loader.cpp:
1848         (WebCore::Loader::Loader):
1849         (WebCore::Loader::~Loader):
1850         (WebCore::Loader::determinePriority):
1851         (WebCore::Loader::load):
1852         (WebCore::Loader::scheduleServePendingRequests):
1853         (WebCore::Loader::requestTimerFired):
1854         (WebCore::Loader::servePendingRequests):
1855         (WebCore::Loader::cancelRequests):
1856         (WebCore::Loader::Host::Host):
1857         (WebCore::Loader::Host::~Host):
1858         (WebCore::Loader::Host::addRequest):
1859         (WebCore::Loader::Host::hasRequests):
1860         (WebCore::Loader::Host::servePendingRequests):
1861         (WebCore::Loader::Host::didFinishLoading):
1862         (WebCore::Loader::Host::didFail):
1863         (WebCore::Loader::Host::didReceiveResponse):
1864         (WebCore::Loader::Host::didReceiveData):
1865         (WebCore::Loader::Host::cancelPendingRequests):
1866         (WebCore::Loader::Host::cancelRequests):
1867         * loader/loader.h:
1868         (WebCore::Loader::):
1869         Distribute load requests to per-host priority queues. Limit the number of loads issued to the 
1870         networking layer so we have better changes of getting important requests through first.
1871         Prioritize scripts > stylesheets > images.
1872
1873 2008-03-13  David Hyatt  <hyatt@apple.com>
1874
1875         This patch makes full page zoom work pretty well. It fixes repainting so that it works when transforms
1876         are set on the RenderView. It also implements the "smart layout" behavior that other browsers support when
1877         zooming. The page will still try to constrain to the viewport size even when zoomed.
1878
1879         Reviewed by john
1880
1881         * dom/Document.cpp:
1882         (WebCore::Document::recalcStyle):
1883         Make sure to test for transform changes even when there is no zoom.  This fixes repainting issues
1884         caused by jumping from a zoomed state back to the standard size.
1885
1886         * page/FrameView.cpp:
1887         (WebCore::FrameView::adjustViewSize):
1888         Adjust for the zoom factor (the render tree is in unzoomed coordinates, but the scrollbars of the view
1889         need to handle zoomed coordinates).
1890
1891         * rendering/RenderBox.cpp:
1892         (WebCore::RenderBox::calcHeight):
1893         Fix the body-sizing-to-the-view-height quirk so that it takes the zoom factor into account when
1894         stretching to fill the viewport.
1895
1896         * rendering/RenderLayer.cpp:
1897         (WebCore::RenderLayer::updateLayerPositions):
1898         (WebCore::RenderLayer::setHasVisibleContent):
1899         Remove the FIXMEs now that absoluteClippedOverflowRect works with transforms on the RenderView.
1900
1901         * rendering/RenderView.cpp:
1902         (WebCore::RenderView::calcHeight):
1903         (WebCore::RenderView::calcWidth):
1904         Make sure the calculated width/height take the zoom factor into account in order to get the "smart layout"
1905         behavior.
1906
1907         (WebCore::RenderView::layout):
1908         When deciding whether children have to get a relayout, we need to check the zoomed width/height and not just
1909         the viewport size.
1910
1911         (WebCore::RenderView::computeAbsoluteRepaintRect):
1912         Patched to take into account transforms set on the RenderView.
1913
1914         (WebCore::RenderView::docHeight):
1915         (WebCore::RenderView::docWidth):
1916         Patched to just always use m_width and m_height initially, since those have already been adjusted for
1917         the zoom factor.
1918
1919         (WebCore::RenderView::zoomedHeight):
1920         (WebCore::RenderView::zoomedWidth):
1921         * rendering/RenderView.h:
1922         New helper methods for obtaining the adjusted width/height of the viewport taking into account the
1923         zoom factor.
1924
1925 2008-03-13  Anders Carlsson  <andersca@apple.com>
1926
1927         Build fix.
1928
1929         * WebCore.base.exp:
1930
1931 2008-03-13  Anders Carlsson  <andersca@apple.com>
1932
1933         Reviewed by Adam.
1934
1935         Get rid of actualRequest, it is not used anymore. Also, get rid of 
1936         initialRequest and replace all uses with originalRequest because those are
1937         the same thing.
1938         
1939         * loader/DocumentLoader.cpp:
1940         * loader/DocumentLoader.h:
1941         * loader/FrameLoader.cpp:
1942         (WebCore::FrameLoader::initialRequest):
1943         (WebCore::FrameLoader::originalRequestURL):
1944
1945 2008-03-13  Brady Eidson  <beidson@apple.com>
1946
1947         Reviewed by Anders
1948
1949         Convert SharedBuffer to start with a refCount of 1
1950
1951         * loader/ImageDocument.cpp:
1952         (WebCore::ImageTokenizer::finish):
1953
1954         * loader/ResourceLoader.cpp:
1955         (WebCore::ResourceLoader::addData):
1956         (WebCore::ResourceLoader::willStopBufferingData):
1957
1958         * loader/icon/IconDatabase.cpp:
1959         (WebCore::IconDatabase::defaultIcon):
1960         (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
1961
1962         * loader/loader.cpp:
1963         (WebCore::Loader::didReceiveData):
1964
1965         * platform/SharedBuffer.h:
1966         (WebCore::SharedBuffer::create): Make all constructors private, add ::create() calls
1967         * platform/SharedBuffer.cpp:
1968         (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
1969         (WebCore::SharedBuffer::copy):
1970         * platform/mac/SharedBufferMac.mm:
1971         (WebCore::SharedBuffer::wrapNSData):
1972         (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
1973
1974 2008-03-13  Steve Falkenburg  <sfalken@apple.com>
1975
1976         PGO build fixes.
1977         
1978         Disable PGO for normal release builds.
1979         Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets.
1980
1981         * WebCore.vcproj/WebCore.vcproj:
1982
1983 2008-03-13  Anders Carlsson  <andersca@apple.com>
1984
1985         Reviewed by Darin.
1986
1987         Make a bunch of DocumentLoader setters/getters inline.
1988         
1989         * loader/DocumentLoader.cpp:
1990         * loader/DocumentLoader.h:
1991         (WebCore::DocumentLoader::isStopping):
1992         (WebCore::DocumentLoader::setCommitted):
1993         (WebCore::DocumentLoader::isCommitted):
1994         (WebCore::DocumentLoader::isLoading):
1995         (WebCore::DocumentLoader::setLoading):
1996         (WebCore::DocumentLoader::response):
1997         (WebCore::DocumentLoader::mainDocumentError):
1998         (WebCore::DocumentLoader::setResponse):
1999         (WebCore::DocumentLoader::isClientRedirect):
2000         (WebCore::DocumentLoader::setIsClientRedirect):
2001         (WebCore::DocumentLoader::overrideEncoding):
2002         (WebCore::DocumentLoader::responses):
2003         (WebCore::DocumentLoader::triggeringAction):
2004         (WebCore::DocumentLoader::setTriggeringAction):
2005         (WebCore::DocumentLoader::setOverrideEncoding):
2006         (WebCore::DocumentLoader::setLastCheckedRequest):
2007         (WebCore::DocumentLoader::lastCheckedRequest):
2008         (WebCore::DocumentLoader::title):
2009         (WebCore::DocumentLoader::setLoadingFromCachedPage):
2010         (WebCore::DocumentLoader::isLoadingFromCachedPage):
2011
2012 2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>
2013
2014         Fix builds without SVG enabled.
2015
2016         * page/Frame.cpp:
2017         (Frame::shouldApplyTextZoom):
2018         (Frame::shouldApplyPageZoom):
2019
2020 2008-03-13  Simon Hausmann  <hausmann@webkit.org>
2021
2022         Fix the Qt build.
2023
2024         * bridge/qt/qt_instance.cpp:
2025         (KJS::Bindings::QtInstance::getQtInstance):
2026         (KJS::Bindings::QtInstance::getRuntimeObject):
2027         * bridge/qt/qt_instance.h:
2028         (KJS::Bindings::QtInstance::create):
2029         * bridge/qt/qt_runtime.cpp:
2030         (KJS::Bindings::convertQVariantToValue):
2031         (KJS::Bindings::QtConnectionObject::execute):
2032         * page/qt/FrameQt.cpp:
2033         (WebCore::Frame::createScriptInstanceForWidget):
2034
2035 2008-03-12  Sam Weinig  <sam@webkit.org>
2036
2037         Reviewed by Darin Adler.
2038
2039         Fix <rdar://problem/5784773>
2040         Crash loading QT movies @ apple.com/ipodtouch/features.html with a PAC file (WebKitThreadingException)
2041
2042         Make bridged RuntimeObjects get collected on the main thread only. This is necessary
2043         because clients of the bridged objects are unlikely to prepared for a collection on 
2044         non-main thread, which can happen with a PAC file.
2045
2046         * bridge/runtime_object.cpp:
2047         (RuntimeObjectImp::RuntimeObjectImp):
2048
2049 2008-03-12  Adam Roben  <aroben@apple.com>
2050
2051         Fix Bug 17815: Inspector's DOM tree should descend into subframes
2052
2053         <http://bugs.webkit.org/show_bug.cgi?id=17815>
2054
2055         Reviewed by Tim.
2056
2057         * page/inspector/DocumentPanel.js:
2058         (WebInspector.DocumentPanel.revealNode): Changed to provide
2059         _isAncestorIncludingParentFramesWithinPanel and
2060         _parentNodeOrFrameElementWithinPanel for the isAncestor and getParent
2061         parameters to findTreeElement so that parent frames will be searched.
2062         (WebInspector.DocumentPanel.updateBreadcrumb):
2063           - Changed while loop to for loop
2064           - Use _parentNodeOrFrameElementWithinPanel instead of
2065             Node.parentNode to move to the next node
2066           - The loop now ends when we reach the DocumentPanel's document node
2067           - Traversal past other Document nodes is now allowed
2068           - We add the "start" class to the final crumb after the loop exits
2069         (WebInspector.DocumentPanel._getDocumentForNode): Added. Simple helper
2070         that returns the node itself if the node is a Document node, or the
2071         node's ownerDocument otherwise.
2072         (WebInspector.DocumentPanel._parentNodeOrFrameElementWithinPanel):
2073         Added. Returns the node's parent node or, in the case of a Document
2074         node, the node's window's owning frame element, but will not return a
2075         node that is in a parent frame of the DocumentPanel's Document.
2076         (WebInspector.DocumentPanel._isAncestorIncludingParentFramesWithinPanel):
2077         Added. Returns true if a is an ancestor of b if a is an ancestor of a
2078         frame element whose subframe(s) contain b.
2079         (WebInspector.DOMNodeTreeElement): We now consider ourselves to have
2080         children if we have a contentDocument.
2081         (WebInspector.DOMNodeTreeElement.onpopulate): Moved the appendChild
2082         loop into a function so that we can add both children of our
2083         contentDocument and children of our node to the tree.
2084         (WebInspector.DOMNodeTreeElement.ondblclick): Changed so that we get
2085         the rootDOMNode by traversing the tree outline hierarchy instead of
2086         the DOM hierarchy so that we can easily jump up to a parent frame.
2087
2088 2008-03-12  Adam Roben  <aroben@apple.com>
2089
2090         Update the styles/metrics panes and breadcrumb after editing DOM
2091         attributes
2092
2093         Reviewed by Tim.
2094
2095         * page/inspector/DocumentPanel.js:
2096         (WebInspector.DocumentPanel.set focusedDOMNode): Moved code to update
2097         the parts of the DocumentPanel other than the DOM tree into a new
2098         function, _focusedNodeChanged.
2099         (WebInspector.DocumentPanel._focusedNodeChanged): Added. The
2100         forceUpdate parameter specifies whether the update should occur even
2101         if the focused node hasn't changed since the last update.
2102         (WebInspector.DocumentPanel.updateBreadcrumb): Added a forceUpdate
2103         parameter. If forceUpdate is true, we always rebuild the breadcrumbs.
2104         (WebInspector.DocumentPanel.updateStyles): Added a forceUpdate
2105         parameter. If forceUpdate is true, we always rebuild the styles pane.
2106         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added a
2107         call to DocumentPanel._focusedNodeChanged. We have to force the update
2108         because we haven't changed the focused node (the attributes of the
2109         node have changed).
2110         * page/inspector/StylesSidebarPane.js:
2111         (WebInspector.StylesSidebarPane.update): Added a forceUpdate
2112         parameter. If forceUpdate is true we always rebuild the styles.
2113
2114 2008-03-12  Mark Rowe  <mrowe@apple.com>
2115
2116         Further Gtk and Qt build fixes.
2117
2118         * bridge/runtime.cpp:
2119         (KJS::Bindings::Instance::createRuntimeObject): Adapt Qt-only code for change to PassRefPtr.
2120         * page/gtk/FrameGtk.cpp: Add missing include.
2121
2122 2008-03-12  Mark Rowe  <mrowe@apple.com>
2123
2124         Fix Gtk and Qt builds.
2125
2126         * page/gtk/FrameGtk.cpp:
2127         * page/qt/FrameQt.cpp:
2128
2129 2008-03-12  Mark Rowe  <mrowe@apple.com>
2130
2131         Mac build fix.
2132
2133         * WebCore.base.exp:  Remove symbol.
2134
2135 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
2136
2137         Build fix.
2138
2139         * page/win/FrameWin.cpp:
2140
2141 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
2142
2143         Build fix.
2144
2145         * plugins/win/PluginViewWin.cpp:
2146         (WebCore::PluginView::bindingInstance):
2147
2148 2008-03-12  Darin Adler  <darin@apple.com>
2149
2150         Reviewed by Anders.
2151
2152         - http://bugs.webkit.org/show_bug.cgi?id=17640
2153           eliminate WebCoreFrameBridge
2154
2155         * WebCore.base.exp: Added more exports, needed by code moved from WebCoreFrameBridge
2156         to WebFrame in WebKit.
2157         * WebCore.xcodeproj/project.pbxproj: Added more headers, same reason. Also deleted
2158         WebCoreFrameBridge.h and WebCoreFrameBridge.mm.
2159
2160         * page/Frame.cpp:
2161         (WebCore::Frame::Frame): Added call to initJavaJSBindings(), formerly handled by
2162         the WebCoreFrameBridge.
2163         * page/Frame.h: Added initJavaJSBindings function.
2164
2165         * page/mac/FrameMac.mm:
2166         (WebCore::updateRenderingForBindings): Moved here from WebCoreFrameBridge.
2167         (WebCore::Frame::initJavaJSBindings): Ditto; code was in the init function.
2168
2169         * page/mac/WebCoreFrameBridge.h: Removed.
2170         * page/mac/WebCoreFrameBridge.mm: Removed.
2171
2172 2008-03-12  Sam Weinig  <sam@webkit.org>
2173
2174         Reviewed by Anders Carlsson.
2175
2176         Don't go through the Document just to get the frame Element.
2177
2178         * page/DOMWindow.cpp:
2179         (WebCore::DOMWindow::frameElement):
2180
2181 2008-03-12  Anders Carlsson  <andersca@apple.com>
2182
2183         Reviewed by Geoff and Sam.
2184
2185         More Instance cleanup:
2186         
2187         * Make Instance inherit from RefCounted instead of doing its own refcounting.        
2188         * Make all Instance subclasses private, add static create methods.         
2189         * Have Instance start out with a refcount of 1.
2190         * Get rid of Instance::createBindingForLanguageInstance and call the individual 
2191           instance constructor methods instead.
2192         * Fix many methods to take and return PassRefPtr<Instance> to ensure that the
2193           refcounting is done correctly.
2194          
2195         * bridge/c/c_instance.h:
2196         (KJS::Bindings::CInstance::create):
2197         * bridge/c/c_utility.cpp:
2198         (KJS::Bindings::convertNPVariantToValue):
2199         * bridge/jni/jni_instance.cpp:
2200         (JavaInstance::invokeMethod):
2201         * bridge/jni/jni_instance.h:
2202         (KJS::Bindings::JavaInstance::create):
2203         * bridge/jni/jni_jsobject.cpp:
2204         (JavaJSObject::convertJObjectToValue):
2205         * bridge/jni/jni_runtime.cpp:
2206         (JavaField::valueFromInstance):
2207         (JavaArray::valueAt):
2208         * bridge/objc/objc_instance.h:
2209         (KJS::Bindings::ObjcInstance::create):
2210         * bridge/objc/objc_utility.mm:
2211         (KJS::Bindings::convertObjcValueToValue):
2212         * bridge/qt/qt_instance.cpp:
2213         (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
2214         (KJS::Bindings::QtInstance::getQtInstance):
2215         (KJS::Bindings::QtInstance::getRuntimeObject):
2216         * bridge/qt/qt_instance.h:
2217         * bridge/runtime.cpp:
2218         (KJS::Bindings::Instance::Instance):
2219         (KJS::Bindings::Instance::createRuntimeObject):
2220         * bridge/runtime.h:
2221         * bridge/runtime_object.cpp:
2222         (RuntimeObjectImp::RuntimeObjectImp):
2223         * bridge/runtime_object.h:
2224         * page/Frame.h:
2225         * page/mac/FrameMac.mm:
2226         (WebCore::Frame::createScriptInstanceForWidget):
2227         * page/win/FrameWin.cpp:
2228         (WebCore::Frame::createScriptInstanceForWidget):
2229         * plugins/PluginView.h:
2230         * plugins/win/PluginViewWin.cpp:
2231         (WebCore::PluginView::bindingInstance):
2232
2233 2008-03-12  Dan Bernstein  <mitz@apple.com>
2234
2235         Suggested by Darin Adler. Reviewed by Dave Hyatt.
2236
2237         - speed up BidiIterator::direction()
2238
2239         * rendering/bidi.cpp:
2240         (WebCore::BidiIterator::current): Made inline and corrected the
2241         out-of-bounds condition to work with 0-length text and offsets beyond
2242         the end of the text.
2243         (WebCore::BidiIterator::direction): Changed to call current() and not
2244         call the virtual method isListMarker() most of the time.
2245         (WebCore::addMidpoint): Removed unnecessary null-check of smidpoints.
2246         (WebCore::appendRunsForObject): Ditto.
2247
2248 2008-03-12  Adam Roben  <aroben@apple.com>
2249
2250         Make URLs not be underlined while editing them in the DOM view
2251
2252         Reviewed by Tim.
2253
2254         * page/inspector/inspector.css:
2255
2256 2008-03-12  Adam Roben  <aroben@apple.com>
2257
2258         Part of Bug 17224: DOM nodes/attributes should be editable
2259
2260         <http://bugs.webkit.org/show_bug.cgi?id=17224>
2261         <rdar://problem/5732825>
2262
2263         We now start editing if the user single-clicks on an attribute,
2264         attribute value, or text node while the parent element is selected.
2265         Previously, we started editing on double-click regardless of the
2266         selection state of the element.
2267
2268         URLs in the DOM tree are now followed on Alt/Option-click, rather than
2269         on just click.
2270
2271         Reviewed by Tim.
2272
2273         * English.lproj/InspectorLocalizedStrings.js: Added four new localized
2274         strings.
2275         * page/inspector/DocumentPanel.js:
2276         (WebInspector.DOMNodeTreeElement.onattach): Call new
2277         _makeURLSActivateOnModifiedClick.
2278         (WebInspector.DOMNodeTreeElement._makeURLsActivateOnModifiedClick):
2279         Added. Changes the tooltip of each link in this element to indicate
2280         that Alt/Option-click will follow the URL, and sets the
2281         followOnAltClick property on each link.
2282         (WebInspector.DOMNodeTreeElement.onselect): Mark that we're being
2283         selected.
2284         (WebInspector.DOMNodeTreeElement.onmousedown): If we're not currently
2285         being selected, start editing.
2286         (WebInspector.DOMNodeTreeElement.ondblclick): We no longer start
2287         editing here. We block re-rooting of the tree if we're currently
2288         editing.
2289         (WebInspector.DOMNodeTreeElement._startEditing):
2290           - Don't do anything if we're not focused
2291           - Pass the event down to _startEditingAttribute.
2292         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't do
2293         anything if the event target is a URL and the Alt/Option key is
2294         pressed -- in this case we want to follow the link.
2295         (WebInspector.DOMNodeTreeElement._updateTitle): Call
2296         _makeURLsActivateOnClick again since the anchor elements have all been
2297         recreated.
2298         * page/inspector/inspector.js:
2299         (WebInspector.documentClick): If the anchor as a followOnAltClick
2300         property and the Alt/Option key is not pressed, do nothing.
2301
2302 2008-03-12  Ada Chan  <adachan@apple.com>
2303
2304         Fixed the initial value of zoom factor.
2305
2306         Reviewed by Adam.
2307
2308         * page/Frame.cpp:
2309         (WebCore::FramePrivate::FramePrivate):
2310
2311 2008-03-12  David Hyatt  <hyatt@apple.com>
2312
2313         Make full page zoom vaguely work.  This patch uses the CSS transform system to turn on full page zoom at the
2314         document level.  There are many many bugs that I'm going to file to track all the issues (most of the issues
2315         are just bugs with transforms themselves).
2316
2317         Reviewed by Adam Roben
2318
2319         * css/CSSStyleSelector.cpp:
2320         (WebCore::CSSStyleSelector::applyProperty):
2321         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
2322         * dom/Document.cpp:
2323         (WebCore::Document::recalcStyle):
2324         * page/Frame.cpp:
2325         (WebCore::Frame::shouldApplyTextZoom):
2326         (WebCore::Frame::shouldApplyPageZoom):
2327         * page/Frame.h:
2328         * rendering/RenderLayer.cpp:
2329         (WebCore::RenderLayer::updateLayerPositions):
2330         (WebCore::RenderLayer::setHasVisibleContent):
2331         (WebCore::RenderLayer::paintLayer):
2332         (WebCore::RenderLayer::hitTestLayer):
2333         * rendering/RenderLayer.h:
2334
2335 2008-03-12  David Hyatt  <hyatt@apple.com>
2336
2337         Make the zoom factor a float and not a percent.
2338
2339         Reviewed by antti
2340
2341         * WebCore.base.exp:
2342         * css/CSSStyleSelector.cpp:
2343         (WebCore::CSSStyleSelector::applyProperty):
2344         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
2345         * page/Frame.cpp:
2346         (WebCore::Frame::zoomFactor):
2347         (WebCore::Frame::setZoomFactor):
2348         * page/Frame.h:
2349         * page/FramePrivate.h:
2350         * svg/SVGSVGElement.cpp:
2351         (WebCore::SVGSVGElement::currentScale):
2352         (WebCore::SVGSVGElement::setCurrentScale):
2353
2354 2008-03-12  David Hyatt  <hyatt@apple.com>
2355
2356         Eliminate setTextMultiplier from the bridge.  Make Webkit just call setZoomFactor on the frame directly.
2357
2358         Reviewed by Tim H.
2359
2360         * WebCore.base.exp:
2361         * page/mac/WebCoreFrameBridge.h:
2362         * page/mac/WebCoreFrameBridge.mm:
2363
2364 2008-03-12  Dan Bernstein  <mitz@apple.com>
2365
2366         Reviewed by Darin Adler and Sam Weinig.
2367
2368         - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard
2369
2370         Use CTFontCopyGraphicsFont and CTFontGetPlatformFont on Leopard instead
2371         of wkGetCGFontFromNSFont and wkGetNSFontATSUFontId, relying on NSFont
2372         and CTFontRef being toll-free bridged.
2373
2374         * WebCore.Tiger.exp:
2375         * WebCore.base.exp:
2376         * platform/graphics/mac/FontMac.mm:
2377         (WebCore::Font::drawGlyphs): Changed to use the cgFont() accessor.
2378         * platform/graphics/mac/FontPlatformData.h:
2379         Made m_cgFont a RetainPtr on Leopard.
2380         (WebCore::toCTFontRef): Added a function that encapsulates the
2381         toll-free bridging.
2382         (WebCore::FontPlatformData::FontPlatformData):
2383         (WebCore::FontPlatformData::cgFont): Added this accessor method.
2384         * platform/graphics/mac/FontPlatformDataMac.mm:
2385         (WebCore::FontPlatformData::FontPlatformData): Changed to use
2386         CoreText API on Leopard.
2387         (WebCore::FontPlatformData::setFont): Ditto.
2388         * platform/graphics/mac/SimpleFontDataMac.mm:
2389         (WebCore::initFontData):
2390         (WebCore::pathFromFont):
2391         (WebCore::SimpleFontData::platformInit):
2392         (WebCore::SimpleFontData::platformWidthForGlyph):
2393         * platform/mac/WebCoreSystemInterface.mm:
2394
2395 2008-03-12  David Harrison  <harrison@apple.com>
2396
2397         Reviewed by Darin.
2398
2399         <rdar://problem/5607382> CrashTracer: [REGRESSION] 2290 crashes in Safari at com.apple.WebCore: -[WebCoreAXObject isWebArea] + 8
2400
2401         The problem was that we lost track of the AX cache for a subframe when Frame::disconnectOwnerElement() was
2402         called, so we were unable to locate the AXObjects to de-register from AppKit's accessibility registry.
2403         Also saw that cache clearing was missing from Document::detach(), and fixed that.
2404         
2405         Also added a debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
2406         
2407         Lastly, RenderWidget::destroy() now skips trying to remove the AXObject if accessibility has never been enabled.
2408        
2409         * dom/Document.cpp:
2410         (WebCore::Document::attach):
2411         Assert that there is no AX cache (since there is no renderer).
2412         
2413         (WebCore::Document::detach):
2414         Destroy the AX cache installed on this document.
2415         
2416         (WebCore::Document::clearAXObjectCache):
2417         New. Destroy the AX cache associated with this document.
2418         
2419         (WebCore::Document::axObjectCache):
2420         Added some comments.
2421         
2422         * dom/Document.h:
2423         Declare clearAXObjectCache().
2424         
2425         * page/Frame.cpp:
2426         (WebCore::Frame::disconnectOwnerElement):
2427         Destroy the AX cache associated with this frame's document.
2428         
2429         * page/mac/AXObjectCacheMac.mm:
2430         (WebCore::AXObjectCache::remove):        
2431         * page/mac/WebCoreAXObject.mm:
2432         (-[WebCoreAXObject initWithRenderer:]):
2433         (-[WebCoreAXObject detach]):
2434         * rendering/RenderObject.cpp:
2435         (WebCore::RenderObject::RenderObject):
2436         (WebCore::RenderObject::~RenderObject):
2437         * rendering/RenderObject.h:
2438         (WebCore::RenderObject::setHasAXObject):
2439         (WebCore::RenderObject::hasAXObject):
2440         Add debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
2441         
2442         * rendering/RenderWidget.cpp:
2443         (WebCore::RenderWidget::destroy):
2444         Skip call to remove the AXObject if accessibility has never been enabled. A simple speed optimization in the
2445         very common case that the accessibility APIs are not being used. Same as in RenderObject::destroy().
2446
2447 2008-03-12  Xan Lopez  <xan@gnome.org>
2448
2449         Reviewed by Alp Toker.
2450
2451         http://bugs.webkit.org/show_bug.cgi?id=15229
2452
2453         Add Pango font backend.
2454
2455         Original patch by Sven Herzberg <sven@imendio.com>
2456
2457         * GNUmakefile.am:
2458         * platform/graphics/gtk/FontCacheGtk.cpp:
2459         (WebCore::FontCache::fontExists):
2460         * platform/graphics/gtk/FontCustomPlatformDataPango.cpp: Added.
2461         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
2462         (WebCore::FontCustomPlatformData::fontPlatformData):
2463         (WebCore::releaseData):
2464         (WebCore::createFontCustomPlatformData):
2465         * platform/graphics/gtk/FontPlatformData.h:
2466         (WebCore::FontPlatformData::FontPlatformData):
2467         (WebCore::FontPlatformData::hash):
2468         * platform/graphics/gtk/FontPlatformDataPango.cpp: Added.
2469         (WebCore::FontPlatformData::FontPlatformData):
2470         (WebCore::FontPlatformData::init):
2471         (WebCore::FontPlatformData::~FontPlatformData):
2472         (WebCore::FontPlatformData::isFixedPitch):
2473         (WebCore::FontPlatformData::setFont):
2474         (WebCore::FontPlatformData::operator==):
2475         * platform/graphics/gtk/GlyphPageTreeNodePango.cpp: Added.
2476         (WebCore::pango_font_get_glyph):
2477         (WebCore::GlyphPage::fill):
2478         * platform/graphics/gtk/SimpleFontDataPango.cpp: Added.
2479         (WebCore::SimpleFontData::platformInit):
2480         (WebCore::SimpleFontData::platformDestroy):
2481         (WebCore::SimpleFontData::smallCapsFontData):
2482         (WebCore::SimpleFontData::containsCharacters):
2483         (WebCore::SimpleFontData::determinePitch):
2484         (WebCore::SimpleFontData::platformWidthForGlyph):
2485         (WebCore::SimpleFontData::setFont):
2486
2487 2008-03-12  Justin Garcia  <justin.garcia@apple.com>
2488
2489         Reviewed by Oliver.
2490         
2491         <rdar://problem/5770834> Crash at InsertTextCommand::prepareForTextInsertion() doing RemoveFormat in a certain list
2492         
2493         Fixes some (but not all) of the instances of:
2494         <rdar://problem/5659795> CrashTracer: [REGRESSION] 187 crashes in Safari at com.apple.WebCore: WebCore::InsertTextCommand::prepareForTextInsertion + 241
2495         <rdar://problem/5779631> CrashTracer: [USER] 25 crashes in Mail at WebCore::InsertTextCommand::prepareForTextInsertion
2496
2497         * editing/InsertLineBreakCommand.cpp:
2498         (WebCore::InsertLineBreakCommand::doApply): applyStyle may have destroyed content that held
2499         the old endingSelection(), so we must recompute it.  Added a FIXME.  Added a few comments.
2500         * editing/RemoveFormatCommand.cpp:
2501         (WebCore::RemoveFormatCommand::doApply): Added a FIXME.
2502
2503 2008-03-11  Alexey Proskuryakov  <ap@webkit.org>
2504
2505         Reviewed by Darin.
2506
2507         <rdar://problem/5640615> REGRESSION (Safari 2-3): Changing subframe encoding rules broke
2508         some sites.
2509
2510         Other browsers' behavior keeps changing; let's implement what Firefox and Opera do now:
2511         if the frame and subframe belong to the same site, then the encoding is inherited from parent
2512         frame to subframe. Otherwise, it is not.
2513
2514         Always inheriting the encoding would cause a security problem.
2515
2516         Tests: http/tests/misc/frame-default-enc-different-domain.html
2517                http/tests/misc/frame-default-enc-same-domain.html
2518                fast/encoding/frame-default-enc.html
2519
2520         * loader/FrameLoader.cpp:
2521         (WebCore::FrameLoader::write): Also removed a check for m_frame->document() being non-null -
2522         this function also has code that uses it without checking, so it must be safe.
2523
2524 2008-03-12  Mark Rowe  <mrowe@apple.com>
2525
2526         Gtk build fix.
2527
2528         * page/Frame.h: Forward-declare FramePrivate.
2529
2530 2008-03-11  Steve Falkenburg  <sfalken@apple.com>
2531
2532         Disable LTCG/PGO for all of WebCore for now.
2533         We'll re-enable this as part of follow-on PGO work.
2534         
2535         Reviewed by Oliver.
2536
2537         * WebCore.vcproj/WebCore.vcproj:
2538
2539 2008-03-11  Darin Adler  <darin@apple.com>
2540
2541         Reviewed by Sam.
2542
2543         - remove all bridge-related things from WebCore except the bridge itself
2544
2545         * WebCore.base.exp: Removed the bridge and setBridge functions.
2546
2547         * loader/FrameLoader.cpp:
2548         (WebCore::FrameLoader::detachFromParent): Removed call to the bridge's
2549         close method.
2550
2551         * page/Frame.cpp:
2552         (WebCore::Frame::~Frame): Removed call to setBridge(0).
2553         (WebCore::FramePrivate::FramePrivate): Removed initialization of m_bridge.
2554         * page/Frame.h: Removed setBridge and bridge functions.
2555         * page/FramePrivate.h: Removed m_bridge pointer.
2556         * page/mac/FrameMac.mm: Removed setBridge and bridge functions.
2557
2558         * page/mac/WebCoreFrameBridge.h: Added setWebCoreFrame: method.
2559         Removed bridgeForDOMDocument: and clearFrame methods.
2560         * page/mac/WebCoreFrameBridge.mm: Ditto.
2561         (-[WebCoreFrameBridge close]): Changed to set m_frame to 0 directly.
2562         (-[WebCoreFrameBridge setWebCoreFrame:]): Added.
2563
2564 2008-03-11  Darin Adler  <darin@apple.com>
2565
2566         - restored some code I removed in the Range change; this code can't go
2567           until the rest of the Range fix is in
2568
2569         * dom/Range.cpp:
2570         (WebCore::Range::commonAncestorContainer): Added back the check for 0
2571         that I removed erroneously in the Range patch.
2572         (WebCore::Range::processContents): Left in assertions I used to debug
2573         this.
2574
2575 2008-03-11  Darin Adler  <darin@apple.com>
2576
2577         - fix Release build
2578
2579         * platform/mac/ScrollViewMac.mm:
2580         (WebCore::ScrollView::setContentsPos): Don't use NSMakePoint.
2581
2582 2008-03-11  Darin Adler  <darin@apple.com>
2583
2584         Reviewed by Anders.
2585
2586         - simplify Mac code for ScrollView, since it's used only for FrameView
2587           and not in two different modes like it was historically
2588         - remove code depending on the bridge to get from an NSView to a WebCore::Frame
2589
2590         * bindings/objc/DOMHTML.mm:
2591         (-[DOMHTMLInputElement _rectOnScreen]): getDocumentView -> documentView.
2592
2593         * bridge/jni/jni_jsobject.cpp:
2594         (createRootObject): Instead of using WebCoreViewFactory to find the frame given
2595         and NSView, use the WebCoreFrameView interface to do it.
2596
2597         * editing/mac/EditorMac.mm:
2598         (WebCore::Editor::paste): getDocumentView -> documentView.
2599         * editing/mac/SelectionControllerMac.mm:
2600         (WebCore::SelectionController::notifyAccessibilityForSelectionChange): Ditto.
2601
2602         * page/FrameView.h: Fixed comment.
2603
2604         * page/InspectorController.cpp:
2605         (WebCore::InspectorController::drawNodeHighlight): Removed uneeded typecasts
2606         to ScrollView* since FrameView is derived from ScrollView.
2607
2608         * page/mac/EventHandlerMac.mm:
2609         (WebCore::EventHandler::focusDocumentView): getDocumentView -> documentView.
2610         * page/mac/FrameMac.mm:
2611         (WebCore::Frame::imageFromRect): Ditto.
2612         * page/mac/WebCoreAXObject.mm:
2613         (-[WebCoreAXObject position]): Ditto.
2614         (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto.
2615         (-[WebCoreAXObject rendererForView:]): Updated code that used to use
2616         WebCoreBridgeHolder to use WebCoreFrameView instead.
2617
2618         * page/mac/WebCoreFrameBridge.mm:
2619         (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
2620         getDocumentView -> documentView.
2621
2622         * page/mac/WebCoreFrameView.h: Removed the WebCoreScrollbarMode type; we just
2623         use WebCore::ScrollbarMode directly. Renamed the WebCoreFrameView protocol to
2624         WebCoreFrameScrollView, since it's a protocol for the scroll view, not the
2625         frame view itself. Replaced WebCoreBridgeHolder protocol with WebCoreFrameView
2626         protocol, which returns a WebCore::Frame directly rather than a bridge.
2627
2628         * page/mac/WebCoreViewFactory.h: Eliminated the bridgeForView method.
2629
2630         * platform/ScrollView.h: Moved the constructor and destructor out of the
2631         class-specific #if blocks. Renamed Mac-specific function that gets the
2632         NSView for from getDocumentView to documentView and a scrollView function
2633         that returns an appropriately classed NSScrollView.
2634
2635         * platform/graphics/MediaPlayer.h: Changed type of parentWidget to FrameView
2636         instead of Widget.
2637         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2638         (WebCore::MediaPlayerPrivate::createQTMovieView): Removed unnecessary cast.
2639
2640         * platform/mac/PopupMenuMac.mm:
2641         (WebCore::PopupMenu::show): getDocumentView -> documentView.
2642         * platform/mac/ScrollViewMac.mm:
2643         (WebCore::ScrollView::ScrollView): Added.
2644         (WebCore::ScrollView::~ScrollView): Added.
2645         (WebCore::ScrollView::scrollView): Added.
2646         (WebCore::ScrollView::visibleWidth): Removed unused non-NSScrollView case.
2647         (WebCore::ScrollView::visibleHeight): Ditto.
2648         (WebCore::ScrollView::visibleContentRect): Ditto.
2649         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers): Ditto.
2650         (WebCore::ScrollView::contentsWidth): Ditto.
2651         (WebCore::ScrollView::contentsHeight): Ditto.
2652         (WebCore::ScrollView::contentsX): Ditto.
2653         (WebCore::ScrollView::contentsY): Ditto.
2654         (WebCore::ScrollView::scrollOffset): Ditto.
2655         (WebCore::ScrollView::scrollRectIntoViewRecursively): Ditto.
2656         (WebCore::ScrollView::setContentsPos): Ditto.
2657         (WebCore::ScrollView::setVScrollbarMode): Ditto.
2658         (WebCore::ScrollView::setHScrollbarMode): Ditto.
2659         (WebCore::ScrollView::setScrollbarsMode): Ditto.
2660         (WebCore::ScrollView::vScrollbarMode): Ditto.
2661         (WebCore::ScrollView::hScrollbarMode): Ditto.
2662         (WebCore::ScrollView::suppressScrollbars): Ditto.
2663         (WebCore::ScrollView::addChild): Ditto.
2664         (WebCore::ScrollView::resizeContents): Ditto.
2665         (WebCore::ScrollView::updateContents): Ditto.
2666         (WebCore::ScrollView::contentsToWindow): Ditto.
2667         (WebCore::ScrollView::windowToContents): Ditto.
2668         (WebCore::ScrollView::setStaticBackground): Ditto.
2669         (WebCore::ScrollView::documentView): Renamed and removed unused case.
2670         (WebCore::ScrollView::scrollbarUnderMouse): Removed incorrect comment.
2671
2672         * platform/mac/WidgetMac.mm:
2673         (WebCore::Widget::getOuterView): Update for protocol name change.
2674
2675         * rendering/RenderThemeMac.mm:
2676         (WebCore::RenderThemeMac::paintCheckbox): getDocumentView -> documentView.
2677         (WebCore::RenderThemeMac::paintRadio): Ditto.
2678         (WebCore::RenderThemeMac::paintButton): Ditto.
2679         (WebCore::RenderThemeMac::paintMenuList): Ditto.
2680         (WebCore::RenderThemeMac::paintSliderThumb): Ditto.
2681         (WebCore::RenderThemeMac::paintSearchField): Ditto.
2682         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Ditto.
2683         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Ditto.
2684         (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Ditto.
2685
2686 2008-03-11  Brent Fulgham  <bfulgham@gmail.com>
2687
2688         Reviewed by Adam Roben.
2689
2690         Split CookieJarWin.cpp into CFNet and non-CFNet versions to
2691         reduce the massive amount of conditionalization in the file.
2692         (see http://bugs.webkit.org/show_bug.cgi?id=17788)
2693
2694         * WebCore.vcproj/WebCore.vcproj:
2695         * platform/network/win/CookieJarCFNetWin.cpp: Copied from WebCore/platform/network/win/CookieJarWin.cpp.
2696         (WebCore::setCookies):
2697         (WebCore::cookies):
2698         (WebCore::cookiesEnabled):
2699         * platform/network/win/CookieJarWin.cpp:
2700         (WebCore::setCookies):
2701         (WebCore::cookies):
2702         (WebCore::cookiesEnabled):
2703
2704 2008-03-11  Darin Adler  <darin@apple.com>
2705
2706         Reviewed by Sam.
2707
2708         - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore
2709
2710         * page/ChromeClient.h: Added new client functions to replace calls up to WebKit
2711         that were formerly handled by the bridge.
2712
2713         * page/Frame.h: Removed unneeded declarations. Moved declarations of script-specific
2714         functions to a ScriptController section. Removed willPopupMenu.
2715
2716         * page/mac/ChromeMac.mm:
2717         (WebCore::Chrome::focusNSView): Changed to call firstResponder and makeFirstResponder
2718         via the client instead of the bridge.
2719
2720         * page/mac/EventHandlerMac.mm:
2721         (WebCore::EventHandler::passMouseDownEventToWidget): Changed to call firstResponder
2722         and makeFirstResponder via the chrome client instead of the bridge.
2723
2724         * page/mac/FrameMac.mm: Removed willPopupMenu.
2725
2726         * page/mac/WebCoreFrameBridge.h: Removed WebCoreFrameBridge protocol and
2727         SubclassResponsibility category. Also removed some unneeded imports.
2728
2729         * platform/mac/PopupMenuMac.mm:
2730         (WebCore::PopupMenu::show): Call willPopUpMenu on chrome client instead of frame.
2731
2732         * platform/mac/WidgetMac.mm:
2733         (WebCore::Widget::setIsSelected): Call functions directly on the view rather than
2734         calling via the bridge.
2735
2736 2008-03-11  Darin Adler  <darin@apple.com>
2737
2738         Reviewed by Mitz.
2739
2740         - make some Range improvements (preparation for Range support for DOM mutation)
2741
2742         Made constructors private, added create functions.
2743         Made refcount start at 1 rather than starting at 0 and being incremented.
2744         Made Range use two Position objects for the start/end container/offset pairs.
2745
2746         * WebCore.base.exp: Updated.
2747
2748         * dom/Document.cpp:
2749         (WebCore::Document::createRange): Changed to use Range::create.
2750         (WebCore::Document::removeMarkers): Updated for Range::first/pastLastNode name change.
2751
2752         * dom/Position.cpp:
2753         (WebCore::Position::formatForDebugger): Updated for member variable name change.
2754         (WebCore::Position::showTreeForThis): Ditto.
2755         (WebCore::startPosition): Changed to use Range::startPosition.
2756         (WebCore::endPosition): Changed to use Range::endPosition.
2757
2758         * dom/Position.h: Made the data members public and renamed them to container
2759         and offset. But since offset() is already a function, temporarily used posOffset
2760         for the data member. Later we'll get rid of offset(). Made more functions inline.
2761         Removed the constructor that takes a PositionIterator.
2762
2763         * dom/PositionIterator.cpp:
2764         (WebCore::PositionIterator::operator Position): Added. Replaces the constructor
2765         that used to be in Position.
2766         * dom/PositionIterator.h: Added conversion operator to produce a Position.
2767         Removed friend declaration for Position.
2768
2769         * dom/Range.cpp:
2770         (WebCore::Range::Range): Updated constructors for data member changes and made
2771         them use a refcount of 1.
2772         (WebCore::Range::create): Added.
2773         (WebCore::Range::startContainer): Updated to eliminate use of m_detached; detached
2774         is now indicated by m_start.container of 0. Also updated to use m_start instead
2775         of the old m_startContainer.
2776         (WebCore::Range::startOffset): Ditto.
2777         (WebCore::Range::endContainer): Ditto.
2778         (WebCore::Range::endOffset): Ditto.
2779         (WebCore::Range::commonAncestorContainer): Ditto.
2780         (WebCore::Range::collapsed): Ditto.
2781         (WebCore::Range::setStart): Ditto.
2782         (WebCore::Range::setEnd): Ditto.
2783         (WebCore::Range::collapse): Ditto.
2784         (WebCore::Range::isPointInRange): Ditto.
2785         (WebCore::Range::comparePoint): Ditto.
2786         (WebCore::Range::compareNode): Ditto.
2787         (WebCore::Range::compareBoundaryPoints): Ditto.
2788         (WebCore::Range::boundaryPointsValid): Ditto.
2789         (WebCore::Range::deleteContents): Ditto.
2790         (WebCore::Range::intersectsNode): Ditto.
2791         (WebCore::Range::processContents): Ditto.
2792         (WebCore::Range::extractContents): Ditto.
2793         (WebCore::Range::cloneContents): Ditto.
2794         (WebCore::Range::insertNode): Ditto.
2795         (WebCore::Range::toString): Ditto.
2796         (WebCore::Range::text): Ditto.
2797         (WebCore::Range::createContextualFragment): Ditto.
2798         (WebCore::Range::detach): Ditto.
2799         (WebCore::Range::checkNodeBA): Changed to use switch statements instead of
2800         multiple calls to the virtual nodeType() function.
2801         (WebCore::Range::cloneRange): Ditto.
2802         (WebCore::Range::setStartAfter): Ditto.
2803         (WebCore::Range::setEndBefore): Ditto.
2804         (WebCore::Range::setEndAfter): Ditto.
2805         (WebCore::Range::selectNode): Ditto.
2806         (WebCore::Range::selectNodeContents): Ditto.
2807         (WebCore::Range::surroundContents): Ditto.
2808         (WebCore::Range::setStartBefore): Ditto.
2809         (WebCore::Range::checkDeleteExtract): Ditto.
2810         (WebCore::Range::containedByReadOnly): Ditto.
2811         (WebCore::Range::firstNode): Ditto.
2812         (WebCore::Range::editingStartPosition): Ditto.
2813         (WebCore::Range::pastLastNode): Ditto.
2814         (WebCore::Range::addLineBoxRects): Ditto.
2815         (WebCore::Range::formatForDebugger): Ditto.
2816         (WebCore::operator==): Ditto.
2817         (WebCore::rangeOfContents): Ditto.
2818         (WebCore::Range::maxStartOffset): Ditto.
2819         (WebCore::Range::maxEndOffset): Ditto.
2820
2821         * dom/Range.h: Made constructors private. Added create functions.
2822         Added getters for startContainer/Offset and endContainer/Offset that
2823         return 0 instead of an exception for detached ranges that are inline
2824         and don't require an ExceptionCode out parameter. Changed the parameters
2825         to setStart and setEnd to PassRefPtr. Removed isDetached function.
2826         Made ActionType and processContents private. Made startPosition and
2827         endPosition inlines and have then return const&. Renamed startNode and
2828         pastEndNode to firstNode and pastLastNode to reduce the chance of
2829         confusion with startContainer/endContainer. Used Position for m_start
2830         and m_end instead of separate container and offset members. Changed
2831         maxStartOffset and maxEndOffset into int to match other offsets.
2832
2833         * editing/ApplyStyleCommand.cpp:
2834         (WebCore::ApplyStyleCommand::applyBlockStyle): Changed to use Range::create.
2835         (WebCore::ApplyStyleCommand::applyInlineStyle): Ditto.
2836         * editing/CompositeEditCommand.cpp:
2837         (WebCore::CompositeEditCommand::inputText): Ditto.
2838         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
2839         * editing/DeleteSelectionCommand.cpp:
2840         (WebCore::DeleteSelectionCommand::mergeParagraphs): Ditto.
2841         * editing/Editor.cpp:
2842         (WebCore::Editor::fontForSelection): Changed for pastLastNode name change.
2843         (WebCore::Editor::setComposition): Changed to use Range::create.
2844         (WebCore::paragraphAlignedRangeForRange): Ditto.
2845         (WebCore::markMisspellingsOrBadGrammar): Changed to get rid of check for
2846         isDetached and check for 0 from startContainer instead.
2847         (WebCore::Editor::compositionRange): Changed to use Range::create.
2848         * editing/EditorCommand.cpp:
2849         (WebCore::unionDOMRanges): Ditto.
2850         * editing/Selection.cpp:
2851         (WebCore::Selection::toRange): Ditto.
2852         * editing/TextIterator.cpp:
2853         (WebCore::TextIterator::TextIterator): Changed for firstNode and pastLastNode
2854         name change.
2855         (WebCore::TextIterator::range): Changed to use Range::create.
2856         (WebCore::SimplifiedBackwardsTextIterator::range): Ditto.
2857         (WebCore::TextIterator::subrange): Ditto.
2858         * editing/VisiblePosition.cpp:
2859         (WebCore::makeRange): Ditto.
2860         * editing/VisiblePosition.h: Added now-needed include.
2861         * editing/htmlediting.cpp:
2862         (WebCore::indexForVisiblePosition): Changed to use Range::create.
2863         (WebCore::avoidIntersectionWithNode): Changed to get rid of check for
2864         isDetached and check for 0 instead and to use Range::create.
2865         * editing/markup.cpp:
2866         (WebCore::renderedText): Changed to use Range::create.
2867         (WebCore::createMarkup): Changed to no longer use isDetached and also
2868         for new firstNode/pastEndNode names.
2869         (WebCore::createFragmentFromText): Ditto.
2870         * editing/visible_units.cpp:
2871         (WebCore::previousBoundary): Changed to use Range::create.
2872         * page/mac/WebCoreFrameBridge.mm:
2873         (-[WebCoreFrameBridge convertToNSRange:]): Changed to no longer use
2874         isDetached().
2875         * rendering/RenderTextControl.cpp:
2876         (WebCore::RenderTextControl::visiblePositionForIndex): Changed to use Range::create.
2877         (WebCore::RenderTextControl::indexForVisiblePosition): Ditto.
2878
2879 2008-03-11  Daniel Zucker <zucker@wake3.com>
2880
2881         Reviewed by Adam Roben.
2882
2883         There are a handful of placed where the use of CFNetwork-specific
2884         calls are protected by PLATFORM(CF).  Revise to use the more specific
2885         USE(CFNETWORK) macro.  (See http://bugs.webkit.org/show_bug.cgi?id=17783) 
2886
2887         * platform/network/ProtectionSpace.cpp:  Change PLATFORM(CF) to USE(CFNETWORK)
2888         * platform/network/ResourceHandle.cpp: Change PLATFORM(CF) to USE(CFNETWORK)
2889         * platform/network/win/CookieJarWin.cpp:  Correct error in
2890           InternetGetCookie call.  Conditionalize 'cookiesEnabled' the same
2891           as all other implementations in this file.
2892
2893 2008-03-11  Xan Lopez  <xan@gnome.org>
2894
2895         Reviewed by Alp Toker.
2896
2897         http://bugs.webkit.org/show_bug.cgi?id=16476
2898
2899         Add libsoup HTTP backend.
2900         
2901         * GNUmakefile.am:
2902         * platform/network/ResourceHandleInternal.h:
2903         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2904         * platform/network/soup/AuthenticationChallenge.h: Added.
2905         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2906         * platform/network/soup/ResourceError.h: Added.
2907         (WebCore::ResourceError::ResourceError):
2908         * platform/network/soup/ResourceHandleSoup.cpp: Added.
2909         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2910         (WebCore::ResourceHandle::~ResourceHandle):
2911         (WebCore::dataCallback):
2912         (WebCore::parseDataUrl):
2913         (WebCore::ResourceHandle::start):
2914         (WebCore::ResourceHandle::cancel):
2915         (WebCore::ResourceHandle::bufferedData):
2916         (WebCore::ResourceHandle::supportsBufferedData):
2917         (WebCore::ResourceHandle::setDefersLoading):
2918         (WebCore::ResourceHandle::loadsBlocked):
2919         (WebCore::ResourceHandle::willLoadFromCache):
2920         * platform/network/soup/ResourceRequest.h: Copied from WebCore/platform/network/curl/ResourceRequest.h.
2921         (WebCore::ResourceRequest::ResourceRequest):
2922         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2923         * platform/network/soup/ResourceResponse.h: Added.
2924         (WebCore::ResourceResponse::ResourceResponse):
2925         (WebCore::ResourceResponse::setResponseFired):
2926         (WebCore::ResourceResponse::responseFired):
2927         (WebCore::ResourceResponse::doUpdateResourceResponse):
2928
2929 2008-03-11  Rodney Dawes  <dobey@wayofthemonkey.com>
2930
2931         Fix Qt build.
2932
2933         * plugins/qt/PluginDataQt.cpp:
2934         (PluginData::initPlugins)
2935
2936 2008-03-11  Adam Roben  <aroben@apple.com>
2937
2938         Make attribute quoting in DOM view more consistent with source view
2939
2940         Two changes which make the DOM view more consistent with source view:
2941          1) We now quote all attribute values, including URLs
2942          2) The quotes around the values are now purple, matching the left and
2943             right angle brackets that surround the tag
2944
2945         One bug fixed by these changes:
2946          1) The entire URL is selected for editing when you double-click a URL
2947             that is an attribute value. Previously, the first and last
2948             characters were not included in the selection.
2949
2950         Reviewed by Darin.
2951
2952         * page/inspector/DocumentPanel.js:
2953         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't need
2954         to account for the quotes around attribute values anymore because the
2955         quotes are now outside the webkit-html-attribute-value span.
2956         * page/inspector/utilities.js:
2957         (nodeTitleInfo): Quote all attribute values, including URLs, and place
2958         the quotes outside the webkit-html-attribute-value span.
2959
2960 2008-03-11  Adam Roben  <aroben@apple.com>
2961
2962         Stop including pthread.h in WebCore on Windows
2963
2964         Reviewed by Darin.
2965
2966         * WebCore.vcproj/WebCore.vcproj:
2967           - Changed the include path to not contain pthreads/
2968           - Let VS remove a duplicate FileConfiguration element
2969           - Let VS have its way with the file ordering
2970         * WebCorePrefix.h: Made the #include of pthread.h be compiled out on
2971         Windows.
2972         * loader/FTPDirectoryDocument.cpp: Added a Windows-specific #define of
2973         localtime_r (pthread.h was providing a macro that substituted plain
2974         old localtime before, but localtime_s is "more secure", so I went with
2975         that).
2976         * loader/FTPDirectoryParser.cpp: Ditto for gmtime_r.
2977
2978 2008-03-11  Adam Roben  <aroben@apple.com>
2979
2980         Roll out r30961 since it broke the default site icon on Windows
2981
2982         * loader/icon/IconDatabase.cpp:
2983         (WebCore::IconDatabase::defaultIcon):
2984
2985 2008-03-11  Dan Bernstein  <mitz@apple.com>
2986
2987         Reviewed by Darin Adler.
2988
2989         - clean up line layout code
2990
2991         * platform/graphics/GraphicsContext.cpp:
2992         (WebCore::TextRunIterator::increment): Removed the resolver parameter.
2993         (WebCore::GraphicsContext::drawBidiText): Adjusted for changes to
2994         createBidiRunsForLine(), which no longer takes a start parameter.
2995         * platform/text/BidiResolver.h:
2996         (WebCore::BidiResolver::): Made Noncopyable and removed the
2997         m_adjustEmbedding member variable.
2998         (WebCore::BidiResolver::position): Added. Returns the resolver's current
2999         position.
3000         (WebCore::BidiResolver::setPosition): Added. Sets the resolver's current
3001         position without changing any other state.
3002         (WebCore::BidiResolver::increment): Added. Advances the resolver to the
3003         next position, allowing the iterator to push and pop embedding.
3004         (WebCore::BidiResolver::appendRun): Removed the resolver parameter in
3005         the call to increment().
3006         (WebCore::BidiResolver::embed): Removed code to save, set and restore
3007         m_adjustEmbedding.
3008         (WebCore::BidiResolver::createBidiRunsForLine): Changed to not take a
3009         'start' iterator. Instead, start at the current position. Removed code
3010         to set m_adjustEmbedding. Changed for noncopyability.
3011         * rendering/RenderBlock.h:
3012         * rendering/bidi.cpp:
3013         (WebCore::bidiNext): Made the resolver parameter optional. Changed to
3014         null-check the 'end of inline' pointer only twice.
3015         (WebCore::bidiFirst): Made the resolver parameter optional.
3016         (WebCore::BidiIterator::increment): Ditto.
3017         (WebCore::BidiState::increment): Added. Overrides the default
3018         BidiResolver::increment() method by passing the resolver to
3019         BidiIterator::increment().
3020         (WebCore::checkMidpoints): Removed the resolver parameter.
3021         (WebCore::BidiState::appendRun): Removed code to save, set and restore
3022         m_adjustEmbedding. Adjusted for change to increment().
3023         (WebCore::RenderBlock::bidiReorderLine): Removed the 'start' parameter
3024         and unreachable code.
3025         (WebCore::buildCompactRuns): Adjusted for changes to BidiResolver/
3026         (WebCore::RenderBlock::layoutInlineChildren): Moved code to initialize
3027         the resolver from this method to determineStartPosition(). Unified the
3028         resolver with the 'start' iterator. Removed unreachable code. Moved one
3029         statement from the beginning of the while loop to the end.
3030         (WebCore::RenderBlock::determineStartPosition): Moved code to initialize
3031         the resolver from layoutInlineChildren() into this method.
3032         (WebCore::RenderBlock::matchedEndLine): Adjusted for the resolver and
3033         the 'start' iterator being one object.
3034         (WebCore::skipNonBreakingSpace): Made the parameter const.
3035         (WebCore::requiresLineBox): Ditto.
3036         (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Adjusted for
3037         the change to BidiIterator::increment().
3038         (WebCore::RenderBlock::skipWhitespace): Made two versions of this
3039         method, one for BidiIterator and one for BidiState.
3040         (WebCore::shouldSkipWhitespaceAfterStartObject): Removed the resolver
3041         parameter.
3042         (WebCore::RenderBlock::findNextLineBreak): Removed the resolver
3043         parameter. Removed calls to setAdjustEmbedding(). Removed the 'previous'
3044         variable and changed the 'last' variable to do its job.
3045         * rendering/bidi.h:
3046
3047 2008-03-10  Adam Roben  <aroben@apple.com>
3048
3049         Part of Bug 17224: DOM nodes/attributes should be editable
3050
3051         <http://bugs.webkit.org/show_bug.cgi?id=17224>
3052         <rdar://problem/5732825>
3053
3054         This patch makes text nodes editable via double-click.
3055
3056         Reviewed by Tim.
3057
3058         * page/inspector/DocumentPanel.js:
3059         (WebInspector.DOMNodeTreeElement._startEditing):
3060           - Moved most of this code to _startEditingAttribute
3061           - Calls _startEditingTextNode or _startEditingAttribute as
3062             appropriate
3063         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Added. Code
3064         came from _startEditing.
3065         (WebInspector.DOMNodeTreeElement._startEditingTextNode): Added.
3066         (WebInspector.DOMNodeTreeElement._textNodeEditingCommitted): Added.
3067         (WebInspector.DOMNodeTreeElement._editingCancelled): Renamed from
3068         _attributeEditingCancelled.
3069         * page/inspector/utilities.js:
3070         (nodeTitleInfo): Wrap text nodes in a webkit-html-text-node span so
3071         that we can easily recognize/edit them.
3072
3073 2008-03-11  Holger Hans Peter Freyther  <zecke@selfish.org>
3074
3075         Reviewed by Darin.
3076
3077         r25512 inlined the urlIcon to improve the startup time of Safari on Mac. Inlining is
3078         not suitable for platforms where this icon is themable. E.g. the Qt platform is allowing
3079         to theme this icon and the Gtk+ platform will probably end up with themable icons
3080         as well.
3081         
3082         Remove dead code from the windows port and move the urlIcon from the windows
3083         directory to the Resource directory to be used by Qt and other ports.
3084         
3085         Ifdef the usage of the built-in icon in IconDatabase.cpp and for Qt do not use
3086         it. Gtk+ currently has no proper implementation of Image::loadPlatformResource but
3087         once it does it wants to use this for getting the urlIcon as well.
3088
3089         * Resources/urlIcon.png: Renamed from WebKit/win/WebKit.vcproj/urlIcon.png.
3090         * loader/icon/IconDatabase.cpp:
3091         (WebCore::IconDatabase::defaultIcon):
3092
3093 2008-03-11  Tor Arne Vestbø  <tavestbo@trolltech.com>
3094
3095         Reviewed by Darin.
3096
3097         Implemented HTML media element support for QtWebKit, using Phonon.
3098
3099         http://bugs.webkit.org/show_bug.cgi?id=17766
3100
3101         * WebCore.pro:
3102         * platform/graphics/MediaPlayer.cpp:
3103         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Added.
3104         (debugMediaObject):
3105         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3106         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
3107         (WebCore::MediaPlayerPrivate::getSupportedTypes):
3108         (WebCore::MediaPlayerPrivate::hasVideo):
3109         (WebCore::MediaPlayerPrivate::load):
3110         (WebCore::MediaPlayerPrivate::cancelLoad):
3111         (WebCore::MediaPlayerPrivate::play):
3112         (WebCore::MediaPlayerPrivate::pause):
3113         (WebCore::MediaPlayerPrivate::paused):
3114         (WebCore::MediaPlayerPrivate::seek):
3115         (WebCore::MediaPlayerPrivate::seeking):
3116         (WebCore::MediaPlayerPrivate::duration):
3117         (WebCore::MediaPlayerPrivate::currentTime):
3118         (WebCore::MediaPlayerPrivate::setEndTime):
3119         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
3120         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
3121         (WebCore::MediaPlayerPrivate::bytesLoaded):
3122         (WebCore::MediaPlayerPrivate::totalBytesKnown):
3123         (WebCore::MediaPlayerPrivate::totalBytes):
3124         (WebCore::MediaPlayerPrivate::setRate):
3125         (WebCore::MediaPlayerPrivate::setVolume):
3126         (WebCore::MediaPlayerPrivate::setMuted):
3127         (WebCore::MediaPlayerPrivate::dataRate):
3128         (WebCore::MediaPlayerPrivate::networkState):
3129         (WebCore::MediaPlayerPrivate::readyState):
3130         (WebCore::MediaPlayerPrivate::updateStates):
3131         (WebCore::MediaPlayerPrivate::setVisible):
3132         (WebCore::MediaPlayerPrivate::setRect):
3133         (WebCore::MediaPlayerPrivate::loadStateChanged):
3134         (WebCore::MediaPlayerPrivate::rateChanged):
3135         (WebCore::MediaPlayerPrivate::sizeChanged):
3136         (WebCore::MediaPlayerPrivate::timeChanged):
3137         (WebCore::MediaPlayerPrivate::volumeChanged):
3138         (WebCore::MediaPlayerPrivate::didEnd):
3139         (WebCore::MediaPlayerPrivate::loadingFailed):
3140         (WebCore::MediaPlayerPrivate::naturalSize):
3141         (WebCore::MediaPlayerPrivate::eventFilter):
3142         (WebCore::MediaPlayerPrivate::repaint):
3143         (WebCore::MediaPlayerPrivate::paint):
3144         (WebCore::MediaPlayerPrivate::stateChanged):
3145         (WebCore::MediaPlayerPrivate::tick):
3146         (WebCore::MediaPlayerPrivate::metaDataChanged):
3147         (WebCore::MediaPlayerPrivate::seekableChanged):
3148         (WebCore::MediaPlayerPrivate::hasVideoChanged):
3149         (WebCore::MediaPlayerPrivate::bufferStatus):
3150         (WebCore::MediaPlayerPrivate::finished):
3151         (WebCore::MediaPlayerPrivate::currentSourceChanged):
3152         (WebCore::MediaPlayerPrivate::aboutToFinish):
3153         (WebCore::MediaPlayerPrivate::prefinishMarkReached):
3154         (WebCore::MediaPlayerPrivate::totalTimeChanged):
3155         * platform/graphics/qt/MediaPlayerPrivatePhonon.h: Added.
3156         (WebCore::MediaPlayerPrivate::):
3157         (WebCore::MediaPlayerPrivate::isAvailable):
3158
3159 2008-03-10  Sam Weinig  <sam@webkit.org>
3160
3161         Reviewed by Beth Dakin.
3162
3163         Throw a SECURITY_ERR when accessing a tainted canvas
3164         by CanvasRenderingContext2D::getImageData() and
3165         HTMLCanvasElement::toDataURL().
3166
3167         * html/CanvasRenderingContext2D.cpp:
3168         (WebCore::CanvasRenderingContext2D::getImageData):
3169         * html/CanvasRenderingContext2D.h:
3170         * html/CanvasRenderingContext2D.idl:
3171         * html/HTMLCanvasElement.cpp:
3172         (WebCore::HTMLCanvasElement::toDataURL):
3173         * html/HTMLCanvasElement.h:
3174         * html/HTMLCanvasElement.idl:
3175
3176 2008-03-10  Justin Garcia  <justin.garcia@apple.com>
3177
3178         Reviewed by Sam.
3179
3180         <rdar://problem/5779984> REGRESSION (r30391): GMail: Safari won't display the Edit Link dialog
3181
3182         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3183         (WebCore::hasCSSPropertyNamePrefix): Fixed a typo.  The code was only
3184         comparing the first character of the prefix to the first character
3185         of the property name.
3186
3187 2008-03-10  Andre Boule  <aboule@apple.com>
3188
3189         Reviewed by Beth.
3190
3191         Hold off on initializing the frame to avoid the RenderView getting 
3192         a null FrameView. This could potentially cause problems.
3193
3194         * svg/graphics/SVGImage.cpp:
3195         (WebCore::SVGImage::dataChanged):
3196
3197 2008-03-10  Darin Adler  <darin@apple.com>
3198
3199         - try to fix Qt build
3200
3201         * bridge/qt/qt_runtime.cpp:
3202         (KJS::Bindings::convertQVariantToValue): Change KJS::UChar to UChar.
3203
3204 2008-03-10  Darin Adler  <darin@apple.com>
3205
3206         Reviewed by Antti.
3207
3208         - fix <rdar://problem/3059610> VIP: links opened in new frame, window, or tab
3209           should be redrawn as visited immediately
3210         - fix <rdar://problem/4382809> Going "back" a page doesn't change the color of
3211           the visited URL at directory.umi
3212         - fix http://bugs.webkit.org/show_bug.cgi?id=4941
3213           Visited links should be marked as visited
3214         - fix http://bugs.webkit.org/show_bug.cgi?id=7960
3215           REGRESSION: Visited link color doesn't displayed after loading page from cache
3216
3217         We now mark all links on a page as "changed" at the appropriate times.
3218
3219         * WebCore.base.exp: Update since I made completeURL be a const member function.
3220
3221         * css/CSSStyleSelector.cpp: Got rid of some unneeded globals that could be turned
3222         into locals. Also changed some static data members to file-scoped globals with
3223         internal linkage. Renamed the globals to get rid of the m_ prefix. Changed the
3224         prefix on m_styleNotYetAvailable to s_styleNotYetAvailable.
3225         (WebCore::CSSStyleSelector::CSSStyleSelector): Updated for name changes.
3226         (WebCore::parseUASheet): Tweak the comment.
3227         (WebCore::CSSStyleSelector::loadDefaultStyle): Updated for name changes and to
3228         use local variables instead of globals where possible.
3229         (WebCore::CSSStyleSelector::checkPseudoState): Made this a member function so
3230         it can store the link in a hash. Also changed it to have a return value instead
3231         of having it modify a global variable. Added code to put the hash into a set so
3232         we can tell later if this is one of the links that affects this page.
3233         (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for the change to
3234         checkPseudoState.
3235         (WebCore::CSSStyleSelector::matchUARules): Updated for name changes.
3236         (WebCore::CSSStyleSelector::styleForElement): Ditto.
3237         (WebCore::CSSStyleSelector::adjustRenderStyle): Ditto.
3238         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Changed code to read
3239         the SVG style sheet to use a boolean global and put it right here in the function
3240         since this is the only code that needs to know about it.
3241         (WebCore::CSSStyleSelector::checkOneSelector): Updated for name changes.
3242         (WebCore::colorForCSSValue): Moved code inside the function that is not needed
3243         anywhere else.
3244         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Updaed for the change
3245         to checkPseudoState.
3246         (WebCore::CSSStyleSelector::allVisitedStateChanged): Added. Calls setChanged on
3247         all links if there were any in the set.
3248         (WebCore::CSSStyleSelector::visitedStateChanged): Added. Calls setChanged on all
3249         links if the one that changed is in the set.
3250
3251         * css/CSSStyleSelector.h: Removed unused StyleSelector class and State enum. Made
3252         CSSStyleSelector derive from Noncopyable. Made lots of member functions private that
3253         didn't need to be public, and removed others that could be made into non-member
3254         functions. Changed pseudoStyleRulesForElement to take a const String& instead of
3255         a StringImpl*. Added new allVisitedStateChanged and visitedStateChanged functions.
3256         Got rid of unneeded friend declarations.
3257
3258         * dom/Document.cpp:
3259         (WebCore::Document::completeURL): Made const.
3260         (WebCore::findSlashDotDotSlash): Moved here from PageGroup.
3261         (WebCore::findSlashSlash): Ditto.
3262         (WebCore::findSlashDotSlash): Ditto.
3263         (WebCore::containsColonSlashSlash):
3264         (WebCore::cleanPath): Ditto.
3265         (WebCore::matchLetter): Ditto.
3266         (WebCore::needsTrailingSlash): Ditto.
3267         (WebCore::Document::visitedLinkHash): Moved this here from PageGroup. This is
3268         the poor-man's completeURL function. The idea of putting it here is that this
3269         way it can be alongside the real completeURL function. Later we should figure out
3270         a way to make this function share more code with the real thing and match behavior.
3271
3272         * dom/Document.h: Marked completeURL function const. Added visitedLinkHash function.
3273
3274         * page/DOMWindow.cpp:
3275         (WebCore::DOMWindow::getMatchedCSSRules): Updated for change to CSSStyleSelector.
3276
3277         * page/Page.cpp:
3278         (WebCore::Page::allVisitedStateChanged): Added. Calls allVisitedStateChanged on all
3279         style selectors.
3280         (WebCore::Page::visitedStateChanged): Ditto.
3281         * page/Page.h: Added the above functions.
3282
3283         * page/PageGroup.cpp:
3284         (WebCore::PageGroup::isLinkVisited): Changed to take a visitedLinkHash parameter.
3285         The CSSStyleSelector now handles actually computing the hash, and it does so by
3286         calling code in Document.
3287         (WebCore::PageGroup::addVisitedLink): Refactored so the two overloaded copies share
3288         a bit more code. Added code that calls visitedStateChanged if a new link was added.
3289         (WebCore::PageGroup::removeVisitedLinks): Added code to call allVisitedStateChanged
3290         if any visited links are removed.
3291         * page/PageGroup.h: Include StringHash.h instead of having the AlreadyHashed struct
3292         definition here.
3293
3294         * platform/text/StringHash.h:
3295         (WebCore::CaseFoldingHash::hash): Tweaked to make this a bit more consistent with
3296         the StringImpl::computeHash function, using the same technique for avoiding 0.
3297         (WebCore::AlreadyHashed::hash): Added. Was formerly in PageGroup.h.
3298         (WebCore::AlreadyHashed::avoidDeletedValue): Added. Was formerly in PageGroup.cpp.
3299
3300         * rendering/RenderStyle.cpp:
3301         (WebCore::RenderStyle::isStyleAvailable): Changed to use an inline function instead
3302         of getting directly at a data member so the data member could be made private.
3303
3304         * loader/FrameLoader.cpp:
3305         (WebCore::FrameLoader::scrollToAnchor): Added call to updateHistoryForAnchorScroll.
3306         (WebCore::FrameLoader::updateHistoryForAnchorScroll): Added.
3307         * loader/FrameLoader.h: Added updateHistoryForAnchorScroll.
3308
3309 2008-03-10  Adam Roben  <aroben@apple.com>
3310
3311         Part of Bug 17224: DOM nodes/attributes should be editable
3312
3313         <http://bugs.webkit.org/show_bug.cgi?id=17224>
3314         <rdar://problem/5732825>
3315
3316         This patch makes DOM attributes editable via double-click.
3317
3318         Reviewed by Tim.
3319
3320         * page/inspector/DocumentPanel.js:
3321         (WebInspector.DOMNodeTreeElement.onmousedown): Don't do anything if
3322         we're being edited, since we want default editing behaviors to work.
3323         (WebInspector.DOMNodeTreeElement.ondblclick): Try to start editing
3324         before doing anything else.
3325         (WebInspector.DOMNodeTreeElement._startEditing): Added. Currently only
3326         lets you edit attributes.
3327         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added.
3328         Uses a scratch element to get the new attribute(s) parsed, then sets
3329         the attribute(s) on the node in the inspected document.
3330         (WebInspector.DOMNodeTreeElement._attributeEditingCancelled): Added.
3331         (WebInspector.DOMNodeTreeElement._updateTitle): Added. Refreshes the
3332         representation of the node in the Inspector's DOM tree to reflect
3333         the node's current state.
3334         * page/inspector/inspector.css: Made the .editing class apply
3335         everywhere.
3336         * page/inspector/utilities.js:
3337         (nodeTitleInfo): Changed to surround attribute name/value pairs in a
3338         webkit-html-attribute span so that we can easily edit the pair as a
3339         whole.
3340
3341 2008-03-10  David Kilzer  <ddkilzer@apple.com>
3342
3343         Fix 64-bit builds.
3344
3345         Reviewed by Stephanie.
3346
3347         WebCore.exp only gets generated once for both 32-bit and 64-bit builds,
3348         so we must exclude the _NPN symbols when creating WebCore.LP64.exp.
3349
3350         * WebCore.xcodeproj/project.pbxproj: Reverted build phase shell code to
3351         r30826 to remove _NPN symbols from 64-bit builds in WebCore.LP64.exp.
3352
3353 2008-03-10  Eric Seidel  <eric@webkit.org>
3354
3355         Reviewed by Darin.
3356
3357         Remove KJS::UChar, use ::UChar instead
3358         http://bugs.webkit.org/show_bug.cgi?id=17017
3359
3360         To functional changes, thus no tests.
3361
3362         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3363         (WebCore::hasCSSPropertyNamePrefix):
3364         (WebCore::cssPropertyName):
3365         * bindings/js/JSDOMWindowBase.cpp:
3366         (WebCore::windowProtoFuncAToB):
3367         (WebCore::windowProtoFuncBToA):
3368         * bindings/js/JSSVGPODTypeWrapper.h:
3369         * bindings/js/kjs_proxy.cpp:
3370         (WebCore::KJSProxy::evaluate):
3371         * bridge/objc/objc_utility.mm:
3372         (KJS::Bindings::throwError):
3373         * dom/Document.cpp:
3374         (WebCore::Document::parseQualifiedName):
3375         * platform/text/AtomicString.cpp:
3376         (WebCore::AtomicString::add):
3377         * platform/text/String.cpp:
3378         (WebCore::String::String):
3379         (WebCore::String::operator Identifier):
3380         (WebCore::String::operator UString):
3381         * platform/text/TextCodecICU.cpp:
3382         (WebCore::TextCodecICU::decode):
3383         * svg/SVGAnimatedTemplate.h:
3384
3385 2008-03-10  Darin Adler  <darin@apple.com>
3386
3387         Reviewed by Sam.
3388
3389         - eliminate keyboard UI mode method from WebCoreFrameBridge
3390
3391         * page/ChromeClient.h: Added keyboardUIMode function.
3392         (WebCore::ChromeClient::keyboardUIMode): Ditto.
3393         * page/mac/EventHandlerMac.mm:
3394         (WebCore::EventHandler::tabsToAllControls): Call chrome client function instead
3395         of bridge function.
3396         * page/mac/WebCoreFrameBridge.h: Removed keyboardUIMode method, and other unused
3397         ones.
3398
3399         * WebCore.xcodeproj/project.pbxproj: Allowed Xcode to change the project.
3400         Do not try to fight the Xcode.
3401
3402 2008-03-10  Darin Adler  <darin@apple.com>
3403
3404         - oops, forgot to save last couple changes from the editor
3405
3406         * bindings/js/JSDOMWindowCustom.cpp:
3407         (WebCore::markDOMObjectWrapper): Tweaked a tiny bit.
3408         (WebCore::JSDOMWindow::mark): Sorted alphabetically.
3409
3410 2008-03-10  Darin Adler  <darin@apple.com>
3411
3412         Reviewed by Geoff.
3413
3414         - fix failing regression test (window.navigator is getting garbage
3415           collected and thus losing its custom properties)
3416
3417         * bindings/js/JSDOMWindowCustom.cpp:
3418         (WebCore::markDOMObject): Added helper function.
3419         (WebCore::JSDOMWindow::mark): Added. Marks the wrappers for all the objects that hang
3420         off the window object.
3421
3422         * page/DOMWindow.h:
3423         (WebCore::DOMWindow::optionalScreen): Added so we can get the Screen object without
3424         creating it if it's already there.
3425         (WebCore::DOMWindow::optionalSelection): Ditto.
3426         (WebCore::DOMWindow::optionalHistory): Ditto.
3427         (WebCore::DOMWindow::optionalLocationbar): Ditto.
3428         (WebCore::DOMWindow::optionalMenubar): Ditto.
3429         (WebCore::DOMWindow::optionalPersonalbar): Ditto.
3430         (WebCore::DOMWindow::optionalScrollbars): Ditto.
3431         (WebCore::DOMWindow::optionalStatusbar): Ditto.
3432         (WebCore::DOMWindow::optionalToolbar): Ditto.
3433         (WebCore::DOMWindow::optionalConsole): Ditto.
3434         (WebCore::DOMWindow::optionalNavigator): Ditto.
3435
3436         * page/DOMWindow.idl: Added the CustomMarkFunction flag. Sorted the flags in
3437         alphabetical order since there are a lot of them.
3438
3439 2008-03-10  Darin Adler  <darin@apple.com>
3440
3441         Reviewed by Sam.
3442
3443         - eliminate Java applet methods from WebCoreFrameBridge
3444
3445         * loader/FrameLoaderClient.h: Added a javaApplet function.
3446         * page/mac/FrameMac.mm:
3447         (WebCore::Frame::createScriptInstanceForWidget): Streamlined the code.
3448         Use the loader client instead of the bridge to get the applet.
3449         * page/mac/WebCoreFrameBridge.h: Removed the getAppletInView and
3450         pollForAppletInView methods. Also removed other unused things.
3451
3452 2008-03-10  Marc-Antoine Ruel  <maruel@gmail.com>
3453
3454         Reviewed by Eric, landed by Darin.
3455
3456         http://bugs.webkit.org/show_bug.cgi?id=16095
3457         Move GraphicsContextPrivate to its own header file.
3458
3459         Moves GraphicsContextState and GraphicsContextPrivate to its
3460         own header
3461
3462         * WebCore.vcproj/WebCore.vcproj:
3463         * platform/graphics/GraphicsContext.cpp:
3464         * platform/graphics/GraphicsContextPrivate.h: Added.
3465         (WebCore::GraphicsContextState::GraphicsContextState):
3466         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
3467
3468 2008-03-10  Julien Chaffraix  <julien.chaffraix@gmail.com>
3469
3470         Reviewed and landed by Darin.
3471
3472         bug 12182 : XMLHttpRequest should raise SECURITY_ERR for same-origin policy violations
3473
3474         Removed reference to PERMISSION_DENIED (previous non standard exception) and replaced it
3475         by DOM exception SECURITY_ERR. Updated XMLHttpRequest::open to raise SECURITY_ERR.
3476
3477         * bindings/js/kjs_binding.cpp:
3478         (WebCore::setDOMException): Removed PERMISSION_DENIED code.
3479         * dom/ExceptionCode.cpp: Added SECURITY_ERR exception.
3480         * dom/ExceptionCode.h: Ditto.
3481         * xml/XMLHttpRequest.cpp:
3482         (WebCore::XMLHttpRequest::open): Returns SECURITY_ERR now.
3483         * xml/XMLHttpRequestException.h: Removed PERMISSION_DENIED.
3484
3485 2008-03-09  Adam Roben  <aroben@apple.com>
3486
3487         Refactor CSS editing code so we can share it with DOM editing
3488
3489         Add WebInspector.startEditing, which takes the element to be edited, a
3490         committedCallback, a cancelledCallback, and a context parameter. This
3491         function takes care of setting up the element for editing, and calls
3492         either the cancelledCallback or committedCallback when editing ends.
3493
3494         Reviewed by Tim.
3495
3496         * page/inspector/StylesSidebarPane.js:
3497         (WebInspector.StylePropertyTreeElement.startEditing):
3498           - Call WebInspector.isBeingEdited and WebInspector.startEditing
3499           - Removed code now handled by WebInspector.startEditing
3500         (WebInspector.StylePropertyTreeElement.editingEnded):
3501           - Renamed from endEditing
3502           - Removed code now handled by WebInspector.startEditing
3503         (WebInspector.StylePropertyTreeElement.editingCancelled):
3504           - Renamed from cancelEditing
3505           - Changed parameters to match WebInspector.startEditing's
3506             cancelledCallback
3507         (WebInspector.StylePropertyTreeElement.editingCommitted):
3508           - Renamed from commitEditing
3509           - Changed parameters to match WebInspector.startEditing's
3510             committedCallback
3511         * page/inspector/inspector.js:
3512         (WebInspector.changeFocus): Changed a call to firstParentWithClassName
3513         to firstParentOrSelfWithClassName so that if the focusable element
3514         itself is the target it will be recognized. I don't know why this
3515         change wasn't needed before this.
3516         (WebInspector.isBeingEdited): Added.
3517         (WebInspector.startEditing): Added.
3518
3519 2008-03-10  Adam Roben  <aroben@apple.com>
3520
3521         Windows build fix
3522
3523         * WebCore.vcproj/WebCore.vcproj: Pick up generated source files out of
3524         $(WebKitOutputDir) instead of hard-coding WebKitBuild.
3525
3526 2008-03-10  Darin Adler  <darin@apple.com>
3527
3528         * DerivedSources.make: Merge plug-in-related changes with the new way of handling
3529         autogenerated DOM classes.
3530
3531 2008-03-10  Johnny Ding  <johnnyding.webkit@gmail.com>
3532
3533         Reviewed, tweaked and landed by Alexey.
3534
3535         - fix http://bugs.webkit.org/show_bug.cgi?id=17732        
3536
3537         We didn't have a fallback to frame encoding in the case of loading a script via
3538         changing its src attribute.
3539
3540         Test: fast/dom/HTMLScriptElement/script-decoding-error-after-setting-src.html
3541
3542         * html/HTMLScriptElement.cpp:
3543         (WebCore::HTMLScriptElement::parseMappedAttribute): Use a helper function to get proper
3544         charset for correct decoding of script content.
3545         (WebCore::HTMLScriptElement::insertedIntoDocument):
3546         (WebCore::HTMLScriptElement::scriptCharset): A helper function for getting proper charset
3547         for the script (as much as can be determined prior to loading it).
3548         * html/HTMLScriptElement.h:
3549         * html/HTMLTokenizer.cpp:
3550         (WebCore::HTMLTokenizer::parseTag): Use a helper function to get proper charset for correct
3551         decoding of script content.
3552
3553 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
3554
3555         Reviewed by Lars.
3556
3557         Fix reference counting of returned MimeType and Plugin objects
3558         created in the array wrappers.
3559
3560         * plugins/MimeTypeArray.cpp:
3561         * plugins/MimeTypeArray.h:
3562         * plugins/Plugin.cpp:
3563         * plugins/Plugin.h:
3564         * plugins/PluginArray.cpp:
3565         * plugins/PluginArray.h:
3566
3567 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
3568
3569         Wx linking fix.
3570
3571         Added missing stubs for PluginData.
3572
3573         * platform/wx/TemporaryLinkStubs.cpp:
3574
3575 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
3576
3577         Windows build fix that I forgot to merge earlier ;(
3578
3579         Forward declare Page as class, not struct.
3580
3581         * plugins/PluginData.h:
3582
3583 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
3584
3585         Attempt to fix the Wx build.
3586
3587         * WebCoreSources.bkl:
3588
3589 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
3590
3591         Reviewed by Darin.
3592
3593         Done with Lars.
3594
3595         http://bugs.webkit.org/show_bug.cgi?id=16815
3596
3597         Ported the manually written JS bindings of window.navigator,
3598         window.navigator.plugins and window.navigator.mimeTypes to
3599         auto-generated bindings.
3600
3601         Moved the globally cached plugin and mimetype information to a
3602         per WebCore::Page shared PluginData structure.
3603
3604         Implemented window.navigator.plugins.refresh() in a
3605         platform-independent way.
3606
3607         * DerivedSources.make:
3608         * GNUmakefile.am:
3609         * WebCore.pro:
3610         * WebCore.vcproj/WebCore.vcproj:
3611         * WebCore.xcodeproj/project.pbxproj:
3612         * bindings/js/JSDOMWindowBase.cpp:
3613         (WebCore::JSDOMWindowBase::getValueProperty):
3614         * bindings/js/JSMimeTypeArrayCustom.cpp: Added.
3615         (WebCore::JSMimeTypeArray::canGetItemsForName):
3616         (WebCore::JSMimeTypeArray::nameGetter):
3617         * bindings/js/JSNavigatorCustom.cpp: Added.
3618         (WebCore::needsYouTubeQuirk):
3619         (WebCore::JSNavigator::appVersion):
3620         * bindings/js/JSPluginArrayCustom.cpp: Added.
3621         (WebCore::JSPluginArray::canGetItemsForName):
3622         (WebCore::JSPluginArray::nameGetter):
3623         * bindings/js/JSPluginCustom.cpp: Added.
3624         (WebCore::JSPlugin::canGetItemsForName):
3625         (WebCore::JSPlugin::nameGetter):
3626         * bindings/js/kjs_navigator.cpp: Removed.
3627         * bindings/js/kjs_navigator.h: Removed.
3628         * dom/Clipboard.cpp:
3629         * dom/DOMImplementation.cpp:
3630         (WebCore::DOMImplementation::createDocument):
3631         * loader/FrameLoader.cpp:
3632         (WebCore::FrameLoader::shouldUsePlugin):
3633         * page/DOMWindow.cpp:
3634         (WebCore::DOMWindow::clear):
3635         (WebCore::DOMWindow::navigator):
3636         * page/DOMWindow.h:
3637         * page/DOMWindow.idl:
3638         * page/DragController.cpp:
3639         * page/Frame.cpp:
3640         * page/Frame.h:
3641         * page/Navigator.cpp: Added.
3642         (WebCore::Navigator::Navigator):
3643         (WebCore::Navigator::~Navigator):
3644         (WebCore::Navigator::disconnectFrame):
3645         (WebCore::Navigator::appCodeName):
3646         (WebCore::Navigator::appName):
3647         (WebCore::Navigator::appVersion):
3648         (WebCore::Navigator::language):
3649         (WebCore::Navigator::userAgent):
3650         (WebCore::Navigator::platform):
3651         (WebCore::Navigator::plugins):
3652         (WebCore::Navigator::mimeTypes):
3653         (WebCore::Navigator::product):
3654         (WebCore::Navigator::productSub):
3655         (WebCore::Navigator::vendor):
3656         (WebCore::Navigator::vendorSub):
3657         (WebCore::Navigator::cookieEnabled):
3658         (WebCore::Navigator::javaEnabled):
3659         * page/Navigator.h: Added.
3660         (WebCore::Navigator::create):
3661         (WebCore::Navigator::frame):
3662         * page/Navigator.idl: Added.
3663         * page/Page.cpp:
3664         (WebCore::Page::refreshPlugins):
3665         (WebCore::Page::pluginData):
3666         * page/Page.h:
3667         * page/Plugin.h: Removed.
3668         * page/mac/FrameMac.mm:
3669         * page/mac/WebCoreFrameBridge.mm:
3670         (-[WebCoreFrameBridge canProvideDocumentSource]):
3671         * page/mac/WebCoreViewFactory.h:
3672         * page/qt/FrameQt.cpp:
3673         * page/win/FrameWin.cpp:
3674         * platform/gtk/TemporaryLinkStubs.cpp:
3675         * platform/mac/PlugInInfoStoreMac.mm: Removed.
3676         * platform/qt/MIMETypeRegistryQt.cpp:
3677         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
3678         * plugins/MimeType.cpp: Added.
3679         (WebCore::MimeType::MimeType):
3680         (WebCore::MimeType::~MimeType):
3681         (WebCore::MimeType::type):
3682         (WebCore::MimeType::suffixes):
3683         (WebCore::MimeType::description):
3684         (WebCore::MimeType::enabledPlugin):
3685         * plugins/MimeType.h: Added.
3686         (WebCore::MimeType::create):
3687         * plugins/MimeType.idl: Added.
3688         * plugins/MimeTypeArray.cpp: Added.
3689         (WebCore::MimeTypeArray::MimeTypeArray):
3690         (WebCore::MimeTypeArray::~MimeTypeArray):
3691         (WebCore::MimeTypeArray::length):
3692         (WebCore::MimeTypeArray::item):
3693         (WebCore::MimeTypeArray::canGetItemsForName):
3694         (WebCore::MimeTypeArray::nameGetter):
3695         (WebCore::MimeTypeArray::getPluginData):
3696         * plugins/MimeTypeArray.h: Added.
3697         (WebCore::MimeTypeArray::create):
3698         (WebCore::MimeTypeArray::disconnectFrame):
3699         * plugins/MimeTypeArray.idl: Added.
3700         * plugins/Plugin.cpp: Added.
3701         (WebCore::Plugin::Plugin):
3702         (WebCore::Plugin::~Plugin):
3703         (WebCore::Plugin::name):
3704         (WebCore::Plugin::filename):
3705         (WebCore::Plugin::description):
3706         (WebCore::Plugin::length):
3707         (WebCore::Plugin::item):
3708         (WebCore::Plugin::canGetItemsForName):
3709         (WebCore::Plugin::nameGetter):
3710         * plugins/Plugin.h: Added.
3711         (WebCore::Plugin::create):
3712         * plugins/Plugin.idl: Added.
3713         * plugins/PluginArray.cpp: Added.
3714         (WebCore::PluginArray::PluginArray):
3715         (WebCore::PluginArray::~PluginArray):
3716         (WebCore::PluginArray::length):
3717         (WebCore::PluginArray::item):
3718         (WebCore::PluginArray::canGetItemsForName):
3719         (WebCore::PluginArray::nameGetter):
3720         (WebCore::PluginArray::refresh):
3721         (WebCore::PluginArray::getPluginData):
3722         * plugins/PluginArray.h: Added.
3723         (WebCore::PluginArray::create):
3724         (WebCore::PluginArray::disconnectFrame):
3725         * plugins/PluginArray.idl: Added.
3726         * plugins/PluginData.cpp: Added.
3727         (WebCore::PluginData::PluginData):
3728         (WebCore::PluginData::~PluginData):
3729         (WebCore::PluginData::supportsMimeType):
3730         (WebCore::PluginData::pluginNameForMimeType):
3731         * plugins/PluginData.h: Added.
3732         (WebCore::PluginData::create):
3733         (WebCore::PluginData::disconnectPage):
3734         (WebCore::PluginData::page):
3735         (WebCore::PluginData::plugins):
3736         (WebCore::PluginData::mimes):
3737         * plugins/mac/PluginDataMac.mm: Added.
3738         (WebCore::PluginData::initPlugins):
3739         (WebCore::PluginData::refresh):
3740         * plugins/qt/PluginDataQt.cpp: Added.
3741         (WebCore::PluginData::initPlugins):
3742         * plugins/win/PluginDataWin.cpp: Added.
3743         (WebCore::PluginData::initPlugins):
3744         (WebCore::PluginData::refresh):
3745
3746 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
3747
3748         Reviewed by Holger.
3749
3750         Replace two printfs() in the Qt port with notImplemented().
3751
3752         * html/CanvasRenderingContext2D.cpp:
3753         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
3754         (WebCore::CanvasRenderingContext2D::applyFillPattern):
3755
3756 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
3757
3758         Reviewed by Alp.
3759
3760         Compilation fix with gcc 4.3: Include stdio.h for printf.
3761
3762         * html/CanvasRenderingContext2D.cpp:
3763         * html/HTMLCanvasElement.cpp:
3764
3765 2008-03-09  Steve Falkenburg  <sfalken@apple.com>
3766
3767         Stop Windows build if an error occurs in a prior project.
3768
3769         Rubber stamped by Darin.
3770
3771         * WebCore.vcproj/WebCore.vcproj:
3772         * WebCore.vcproj/WebCoreGenerated.vcproj:
3773
3774 2008-03-09  Darin Adler  <darin@apple.com>
3775
3776         * DerivedSources.make: Third try at fixing the build.
3777         * bindings/js/JSRGBColor.cpp: And touching this file.
3778
3779 2008-03-09  Darin Adler  <darin@apple.com>
3780
3781         * DerivedSources.make: One *more* try at fixing the build.
3782
3783 2008-03-09  Darin Adler  <darin@apple.com>
3784
3785         * DerivedSources.make: One more try at fixing the build.
3786
3787 2008-03-09  Darin Adler  <darin@apple.com>
3788
3789         * DerivedSources.make: Re-land the change, fixed, and with an attempt to fix the
3790         bots by removing the incorrect file.
3791
3792 2008-03-09  Oliver Hunt  <oliver@apple.com>
3793
3794         RS=Mark Rowe
3795
3796         Roll out r30909 -- it breaks the build and is a non-trivial fix (according to weinig)
3797
3798         * DerivedSources.make:
3799
3800 2008-03-09  Darin Adler  <darin@apple.com>
3801
3802         Reviewed by Adam.
3803
3804         * DerivedSources.make: Put the list of DOM classes into its own
3805         variable, and generate the JavaScript bindings and Objective-C
3806         bindings dependencies from that. Added some separators to make it
3807         a little easier to see the sections of the file. Moved all the
3808         Mac-specific rules (except for the SVG conditional part) down
3809         to the bottom of the file in a separate section.
3810
3811 2008-03-09  Adam Roben  <aroben@apple.com>
3812
3813         Windows build fix
3814
3815         * WebCore.vcproj/WebCore.vcproj: Make sure all Cairo files are
3816         excluded from all three CG-based configurations: Debug, Release, and
3817         Debug_Internal.
3818
3819 2008-03-08  Mark Rowe  <mrowe@apple.com>
3820
3821         Attempt to fix the Qt build.
3822
3823         * platform/MIMETypeRegistry.cpp:  Add missing include.
3824
3825 2008-03-08  Oliver Hunt  <oliver@apple.com>
3826
3827         Reviewed by Sam W.
3828
3829         Bug 16516: canvas image patterns stop working with some transformations
3830
3831         Simple fix.  We used x/yStep of FLT_MAX to fake a no-repeat-x/y pattern
3832         with CG.  However any transforms involving FLT_MAX immediately get
3833         consumed by the introduced floating point error.  yStep had already been
3834         clamped to a much smaller arbitrary value, and this patch makes us use
3835         that clamp value for xStep as well.
3836
3837         * html/CanvasPattern.cpp:
3838         (WebCore::CanvasPattern::createPattern):
3839
3840 2008-03-08  Oliver Hunt  <oliver@apple.com>
3841
3842         Reviewed by Mitz.
3843
3844         Bug 17728: Canvas.createPattern with null repeat argument throws an exception
3845
3846         Trivial fix, we were calling toString on null which produces the string "null",
3847         we just needed to switch to using valueToStringWithNullCheck rather than 
3848         JSValue::toString directly
3849
3850         Test: fast/canvas/canvas-pattern-behaviour.html
3851
3852         * WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3853         (WebCore::JSCanvasRenderingContext2D::createPattern):
3854
3855 2008-03-08  Mark Rowe  <mrowe@apple.com>
3856
3857         Reviewed by Darin Adler.
3858
3859         Fix 64-bit build with GCC 4.2.
3860
3861         * bindings/objc/WebScriptObject.mm: Use NSUInteger in place of unsigned where required.
3862         * platform/mac/SharedBufferMac.mm: Ditto.
3863
3864 2008-03-08  Dan Bernstein  <mitz@apple.com>
3865
3866         Reviewed by Oliver Hunt.
3867
3868         - fix garbage in transparent areas in canvas.toDataURL results
3869
3870         * platform/graphics/cg/ImageBufferCG.cpp:
3871         (WebCore::ImageBuffer::toDataURL): Clear the bitmap context before
3872         painting the canvas image onto it.
3873
3874 2008-03-08  Darin Adler  <darin@apple.com>
3875
3876         Reviewed by Adele.
3877
3878         - eliminate custom highlight methods from WebCoreFrameBridge
3879
3880         * page/Chrome.cpp:
3881         (WebCore::ChromeClient::customHighlightRect): Added.
3882         (WebCore::ChromeClient::paintCustomHighlight): Added.
3883         * page/ChromeClient.h: Added custom highlight functions.
3884         * page/Frame.h: Removed custom highlight functions.
3885         * page/mac/FrameMac.mm: Ditto.
3886         * page/mac/WebCoreFrameBridge.h: Removed custom highlight methods.
3887         * rendering/InlineTextBox.cpp:
3888         (WebCore::InlineTextBox::paintCustomHighlight): Changed code to use
3889         the ChromeClient instead of WebCoreFrameBridge to do the custom highlight.
3890         * rendering/RenderBox.cpp:
3891         (WebCore::RenderBox::paintCustomHighlight): Ditto.
3892         * rendering/RootInlineBox.cpp:
3893         (WebCore::RootInlineBox::addHighlightOverflow): Ditto.
3894         (WebCore::RootInlineBox::paintCustomHighlight): Ditto.
3895
3896 2008-03-07  Stephanie Lewis  <slewis@apple.com>
3897
3898         Reviewed by Oliver.
3899
3900         Fix Windows build.
3901
3902         * platform/graphics/cg/ImageBufferCG.cpp:
3903         (WebCore::ImageBuffer::toDataURL):
3904
3905 2008-03-07  David D. Kilzer  <ddkilzer@apple.com>
3906
3907         Unify concept of enabling Netscape Plug-in API (NPAPI).
3908
3909         Reviewed by Darin.
3910
3911         No test cases since there is no change in functionality.
3912
3913         * DerivedSources.make: Added check for ENABLE_NETSCAPE_PLUGIN_API macro.
3914         If defined as "1", add WebCore.NPAPI.exp to WEBCORE_EXPORT_DEPENDENCIES.
3915         * WebCore.NPAPI.exp: Added.
3916         * WebCore.base.exp: Moved exported NPAPI methods to WebCore.NPAPI.exp.
3917         * WebCore.xcodeproj/project.pbxproj: Removed changes in r30826 (except
3918         comments) since we now handle exported NPAPI methods via DerivedSources.make.
3919
3920         * config.h: Removed USE(NPOBJECT) since we now use ENABLE(NETSCAPE_PLUGIN_API) as
3921         defined in Platform.h.
3922
3923         * bindings/objc/DOM.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3924         (-[DOMElement _NPObject]):
3925
3926         * bridge/NP_jsobject.cpp: Replaced !PLATFORM(DARWIN) || !defined(__LP64__) with
3927         ENABLE(NETSCAPE_PLUGIN_API).
3928         * bridge/NP_jsobject.h: Ditto.
3929         * bridge/c/c_class.cpp: Ditto.
3930         * bridge/c/c_class.h: Ditto.
3931         * bridge/c/c_instance.cpp: Ditto.
3932         * bridge/c/c_instance.h: Ditto.
3933         * bridge/c/c_runtime.cpp: Ditto.
3934         * bridge/c/c_runtime.h: Ditto.
3935         * bridge/c/c_utility.cpp: Ditto.
3936         * bridge/c/c_utility.h: Ditto.
3937         * bridge/npruntime.cpp: Ditto.
3938         * bridge/npruntime_impl.h: Ditto.
3939         * bridge/npruntime_priv.h: Ditto.
3940         * bridge/runtime.cpp: Ditto.
3941         (KJS::Bindings::Instance::createBindingForLanguageInstance):
3942
3943         * html/HTMLPlugInElement.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3944         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
3945         (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
3946         * html/HTMLPlugInElement.h: Ditto.
3947
3948         * page/Frame.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3949         (WebCore::Frame::clearScriptObjects):
3950         (WebCore::FramePrivate::FramePrivate): Also added #if ENABLE(NETSCAPE_PLUGIN_API)
3951         guard around m_windowScriptNPObject.
3952         * page/Frame.h: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3953         * page/FramePrivate.h: Added #if ENABLE(NETSCAPE_PLUGIN_API) guard around
3954         m_windowScriptNPObject.
3955         * page/mac/FrameMac.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3956         (WebCore::Frame::createScriptInstanceForWidget):
3957
3958 2008-03-07  Alexey Proskuryakov  <ap@webkit.org>
3959
3960         Reviewed by Darin.
3961
3962         REGRESSION: Korean decoding doesn't support extended EUC-KR.
3963
3964         Test: fast/encoding/char-decoding.html
3965
3966         * platform/text/TextCodecICU.cpp:
3967         (WebCore::TextCodecICU::registerExtendedEncodingNames): Untangle the system of duplicate ICU
3968         encoding names by manually registering windows-939-2000, and mapping all other related
3969         encodings to it.
3970
3971 2008-03-07  Dan Bernstein  <mitz@apple.com>
3972
3973         Reviewed by Stephanie.
3974
3975         - try to fix leaks seen on Tiger after r30840
3976
3977         * css/CSSStyleSelector.cpp:
3978         (WebCore::CSSStyleSelector::~CSSStyleSelector): Use the default operator
3979         delete, rather than arena delete, to deallocate the root default style.
3980
3981 2008-03-07  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
3982
3983         Reviewed by Alp Toker.
3984
3985         http://bugs.webkit.org/show_bug.cgi?id=17681
3986         GtkLauncher fails to render an element with position: fixed
3987
3988         Implement the required parts of PlatformScreenGtk.
3989
3990         * ChangeLog:
3991         * platform/gtk/PlatformScreenGtk.cpp:
3992         (WebCore::screenDepth):
3993         (WebCore::screenIsMonochrome):
3994         (WebCore::screenRect):
3995
3996 2008-03-07  Oliver Hunt  <oliver@apple.com>
3997
3998         Reviewed by Darin Adler.
3999
4000         Bug 16610: <canvas> restore() removes path segments created before it
4001
4002         The problem here is that WebKit stored the Path as part of the state, so
4003         restore would incorrectly lose changes made to the canvas path.  To match
4004         Firefox and HTML5 we make two real changes:
4005           * Move the context path from the state object directly onto the context.
4006             This is responsible for all the changes to the path manipulation functions
4007           * Add transform tracking to each state -- this is needed to correctly transform
4008             the current path when restore()-ing to a prior state.
4009
4010         Test: fast/canvas/canvas-save-restore-with-path.html
4011
4012         * html/CanvasRenderingContext2D.cpp:
4013         (WebCore::CanvasRenderingContext2D::restore):
4014         (WebCore::CanvasRenderingContext2D::scale):
4015         (WebCore::CanvasRenderingContext2D::rotate):
4016         (WebCore::CanvasRenderingContext2D::translate):
4017         (WebCore::CanvasRenderingContext2D::transform):
4018         (WebCore::CanvasRenderingContext2D::beginPath):
4019         (WebCore::CanvasRenderingContext2D::closePath):
4020         (WebCore::CanvasRenderingContext2D::moveTo):
4021         (WebCore::CanvasRenderingContext2D::lineTo):
4022         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
4023         (WebCore::CanvasRenderingContext2D::arcTo):
4024         (WebCore::CanvasRenderingContext2D::arc):
4025         (WebCore::CanvasRenderingContext2D::rect):
4026         (WebCore::CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode):
4027         (WebCore::CanvasRenderingContext2D::fill):
4028         (WebCore::CanvasRenderingContext2D::stroke):
4029         (WebCore::CanvasRenderingContext2D::clip):
4030         (WebCore::CanvasRenderingContext2D::isPointInPath):
4031         * html/CanvasRenderingContext2D.h:
4032
4033 2008-03-07  Oliver Hunt  <oliver@apple.com>
4034
4035         Reviewed by Ada.
4036
4037         Fix for crash caused by FrameLoader incorrectly assuming it has
4038         a RenderWidget
4039
4040         In some circumstances an application embedding a WebView may 
4041         choose to prevent a webview from loading a resource.  If that
4042         resource was requested by an <object> element then we may 
4043         fallback to different content which may not produce a RenderWidget.
4044         Unfortunately FrameLoader::loadSubframe was assuming that if a
4045         renderer was produced it would always be a RenderWidget, and arbitrarily
4046         performed what could be an incorrect cast.  This could then lead to
4047         a crash.
4048
4049         We currently don't have anyway of making a test for this.
4050
4051         * loader/FrameLoader.cpp:
4052         (WebCore::FrameLoader::loadSubframe):
4053
4054 2008-03-07  Samuel Weinig  <sam@webkit.org>
4055
4056         Reviewed by Oliver Hunt.
4057
4058         Fix for http://bugs.webkit.org/show_bug.cgi?id=16673
4059         <canvas> lacks toDataURL()
4060
4061         Tests: fast/canvas/toDataURL-noData.html
4062                fast/canvas/toDataURL-supportedTypes.html
4063
4064         * html/CanvasRenderingContext2D.cpp:
4065         (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage): Make message non-global.
4066         * html/HTMLCanvasElement.cpp:
4067         (WebCore::HTMLCanvasElement::printSecurityExceptionMessage): Log error message indicating that toDataURL has
4068         been called on a tainted canvas. 
4069         (WebCore::HTMLCanvasElement::toDataURL): This does the tainted canvas check, ensures that the canvas has pixel
4070         data, checks to see if the MIME type is supported.  Unsupported MIME types and the null string (which is made
4071         by passing no argument/null/undefined in JavaScript) are treated as being PNG, as per the spec.  The actual 
4072         toDataURL logic is actually done in the ImageBuffer class.
4073         * html/HTMLCanvasElement.h: Add function declarations.
4074         * html/HTMLCanvasElement.idl: Add function declaration.
4075
4076         * platform/MIMETypeRegistry.cpp:
4077         (WebCore::initializeSupportedImageMIMETypes):
4078         (WebCore::initializeSupportedImageMIMETypesForEncoding):
4079         (WebCore::initializeSupportedJavaScriptMIMETypes):
4080         (WebCore::initializeSupportedNonImageMimeTypes):
4081         (WebCore::initializeSupportedMediaMIMETypes):
4082         (WebCore::initializeMIMETypeRegistry):
4083         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
4084         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
4085         (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
4086         (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
4087         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
4088         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
4089         (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
4090         (WebCore::MIMETypeRegistry::isJavaAppletMIMEType):
4091         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
4092         (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
4093         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypesForEncoding):
4094         (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
4095         (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
4096         * platform/MIMETypeRegistry.h:
4097         Clean up and add new supportedImageMIMETypesForEncoding set which contains the set of
4098         MIME types the platform knows how to encode. Currently only implemented for CG and Qt.
4099
4100         * platform/graphics/ImageBuffer.h: Add toDataURL method.
4101         * platform/graphics/cairo/ImageBufferCairo.cpp:
4102         (WebCore::ImageBuffer::toDataURL): Add stub.
4103         * platform/graphics/cg/ImageBufferCG.cpp:
4104         (WebCore::ImageBuffer::create):
4105         (WebCore::ImageBuffer::getImageData):
4106         (WebCore::ImageBuffer::putImageData):
4107         (WebCore::ImageBuffer::toDataURL):
4108         Converts the current context to a data: url of the specified MIME type.  This method
4109         unfortunately has to flip the context, resulting in less than optimal code.
4110
4111         * platform/graphics/qt/ImageBufferQt.cpp:
4112         (WebCore::ImageBuffer::toDataURL): Add stub.
4113         * platform/graphics/wx/ImageBufferWx.cpp:
4114         (WebCore::ImageBuffer::toDataURL): Add stub.
4115
4116 2008-03-07  Steve Falkenburg  <sfalken@apple.com>
4117
4118         Build fix.
4119
4120         * WebCore.vcproj/WebCore.vcproj:
4121
4122 2008-03-07  Brent Fulgham  <bfulgham@gmail.com>
4123
4124         Reviewed by Mark Rowe.
4125
4126         Correct build intermediary output
4127         (http://bugs.webkit.org/show_bug.cgi?id=17713)
4128
4129         * WebCore/WebCore.vcproj:  Correct intermediary paths
4130
4131 2008-03-07  Brent Fulgham  <bfulgham@gmail.com>
4132
4133         Reviewed by Steve Falkenburg.
4134
4135         Add Cairo build requirements to WebCore.vcproj under a new
4136         set of targets.  Exclude Cairo elements from normal CG build.
4137         Exclude CG elements from Cairo builds.
4138         (http://bugs.webkit.org/show_bug.cgi?id=17300)
4139
4140         * WebCore.vcproj/WebCore.vcproj:
4141         * WebCore.vcproj/webcore.vsprops: Added.
4142
4143 2008-03-07  Darin Adler  <darin@apple.com>
4144
4145         Reviewed by Adam.
4146
4147         - eliminated WebCoreFrameBridge runOpenPanel
4148