WebCore:
[WebKit-https.git] / WebCore / ChangeLog
1 2008-03-24  Brady Eidson  <beidson@apple.com>
2
3         Reviewed by Darin's rubberstamp
4
5         Land a load of empty files for upcoming work to make sure I'm not breaking any platform's build
6
7         * GNUmakefile.am:
8         * WebCore.pro:
9         * WebCore.vcproj/WebCore.vcproj:
10         * WebCore.xcodeproj/project.pbxproj:
11         * WebCoreSources.bkl:
12         * loader/archive: Added.
13         * loader/archive/Archive.h: Added.
14         * loader/archive/ArchiveFactory.cpp: Added.
15         * loader/archive/ArchiveFactory.h: Added.
16         * loader/archive/ArchiveResource.cpp: Added.
17         * loader/archive/ArchiveResource.h: Added.
18         * loader/archive/ArchiveResourceCollection.cpp: Added.
19         * loader/archive/ArchiveResourceCollection.h: Added.
20         * loader/archive/cf: Added.
21         * loader/archive/cf/LegacyWebArchive.cpp: Added.
22         * loader/archive/cf/LegacyWebArchive.h: Added.
23         * loader/archive/cf/LegacyWebArchiveMac.mm: Added.
24
25 2008-03-24  David Hyatt  <hyatt@apple.com>
26
27         Fix for bug 18009. Make sure the IE offset/client/scroll*** extensions respect full page zoom.
28
29         Reviewed by Beth
30
31         * dom/Element.cpp:
32         (WebCore::localZoomForRenderer):
33         (WebCore::adjustForLocalZoom):
34         (WebCore::adjustForAbsoluteZoom):
35         (WebCore::Element::offsetLeft):
36         (WebCore::Element::offsetTop):
37         (WebCore::Element::offsetWidth):
38         (WebCore::Element::offsetHeight):
39         (WebCore::Element::clientLeft):
40         (WebCore::Element::clientTop):
41         (WebCore::Element::clientWidth):
42         (WebCore::Element::clientHeight):
43         (WebCore::Element::scrollLeft):
44         (WebCore::Element::scrollTop):
45         (WebCore::Element::setScrollLeft):
46         (WebCore::Element::setScrollTop):
47         (WebCore::Element::scrollWidth):
48         (WebCore::Element::scrollHeight):
49         * rendering/RenderBox.cpp:
50         (WebCore::RenderBox::setStyle):
51         * rendering/RenderObject.cpp:
52         (WebCore::RenderObject::offsetParent):
53         * rendering/RenderObject.h:
54
55 2008-03-24  Brady Eidson  <beidson@apple.com>
56
57         Reviewed by Darin
58
59         Some style cleanup and add a logging channel for upcoming work
60
61         * platform/Logging.cpp:
62         * platform/Logging.h:
63
64         * platform/MIMETypeRegistry.cpp:
65         (WebCore::initializeSupportedImageMIMETypes):
66         (WebCore::initializeSupportedNonImageMimeTypes):
67
68 2008-03-24  Dan Bernstein  <mitz@apple.com>
69
70         Reviewed by Sam Weinig.
71
72         - fix <rdar://problem/5812292> CrashTracer: [REGRESSION] 60 crashes in Safari at com.apple.WebCore: WebCore::RenderObject::repaintRectangle + 47
73
74         Test: fast/repaint/renderer-destruction-by-invalidateSelection-crash.html
75
76         * page/FrameView.cpp:
77         (WebCore::FrameViewPrivate::reset): Removed repaintRects code.
78         (WebCore::FrameView::layout): Ditto.
79         (WebCore::FrameView::addRepaintInfo): Removed.
80
81         * page/FrameView.h: Removed addRepaintInfo().
82
83         * rendering/RenderBlock.cpp:
84         (WebCore::RenderBlock::layoutBlock): Changed to call repaintRectangle
85         instead of FrameView::addRepaintInfo().
86         * rendering/RenderTable.cpp:
87         (WebCore::RenderTable::layout): Ditto.
88
89 2008-03-24  Alp Toker  <alp@atoker.com>
90
91         GTK+/soup http backend build fix for breakage introduced in r31141.
92         Fix suggested by Xan.
93
94         * platform/network/ResourceHandle.h:
95
96 2008-03-24  Dan Bernstein  <mitz@apple.com>
97
98         Reviewed by Sam Weinig.
99
100         - fix <rdar://problem/5792582> CSS opacity does not work with GDI text
101         - fix <rdar://problem/5792619> non-opaque CSS colors do not work with GDI text (RGBA, HSLA)
102         - fix <rdar://problem/5792624> GDI text can't be stroked/filled independently
103         - make text-shadow work with GDI text
104         - make -webkit-background-clip: text work with GDI text
105
106         * platform/graphics/GraphicsContext.cpp:
107         (WebCore::GraphicsContext::setShadow): Made this a shared method that
108         updates the state and calls the platform-specific method.
109         (WebCore::GraphicsContext::clearShadow): Ditto.
110         (WebCore::GraphicsContext::getShadow): Added.
111
112         * platform/graphics/GraphicsContext.h:
113         (WebCore::GraphicsContext::WindowsBitmap): Added this class that
114         represents a bitmap with a Windows device context that GDI can draw into.
115
116         * platform/graphics/GraphicsContextPrivate.h:
117         (WebCore::GraphicsContextState::GraphicsContextState): Added the shadow
118         parameters to the graphics state.
119
120         * platform/graphics/cairo/GraphicsContextCairo.cpp:
121         (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform-
122         specific implementation to this.
123         (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform-
124         specific implementation to this.
125
126         * platform/graphics/cg/GraphicsContextCG.cpp:
127         (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform-
128         specific implementation to this.
129         (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform-
130         specific implementation to this.
131
132         * platform/graphics/qt/GraphicsContextQt.cpp:
133         (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform-
134         specific implementation to this.
135         (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform-
136         specific implementation to this.
137
138         * platform/graphics/win/FontCGWin.cpp:
139         (WebCore::toCGFloat): Added. Converts a Windows FIXED.
140         (WebCore::createPathForGlyph): Added. Retrieves a glyph's hinted
141         outline from GDI and creates a CGPath containing it.
142         (WebCore::Font::drawGlyphs): Added two code paths in the GDI case.
143         The existing code path, which uses GDI to draw text directly to the
144         graphics context, is used for opaque-colored, non-transformed,
145         non-stroked, non-shadowed text in a GDI-backed graphics context that is
146         not in a transparency layer.
147         An additional code path is used for non-stroked text in all other cases.
148         It uses GDI to draw black text into an all-white Windows bitmap, then
149         uses the green channel as a mask to create a bitmap with the desired
150         fill color and alpha. The bitmap is then drawn into the graphics
151         context, at which time transparency layers, transforms and shadows are
152         handled properly.
153         A third code path is used for stroked text. It constructs a path from
154         hinted glyph outlines retrieved from GDI and strokes (and optionally
155         fills) it.
156
157         * platform/graphics/win/GraphicsContextCGWin.cpp:
158         (WebCore::GraphicsContext::getWindowsContext): Added a mayCreateBitmap
159         parameter. When false, prevents this method from creating a Windows
160         device context if the graphics context does not already have one.
161         (WebCore::GraphicsContext::releaseWindowsContext): Added a
162         mayCreateBitmap parameter to match getWindowsContext().
163         (WebCore::GraphicsContext::WindowsBitmap::WindowsBitmap):
164         (WebCore::GraphicsContext::WindowsBitmap::~WindowsBitmap):
165         (WebCore::GraphicsContext::createWindowsBitmap): Added.
166         (WebCore::GraphicsContext::drawWindowsBitmap): Added. Draws the bitmap
167         as a non-alpha-premultiplied image.
168
169 2008-03-24  Kevin McCullough <kmccullough@apple.com>
170
171           - Fixed Changelog
172
173 2008-03-24  Marco Barisione  <marco.barisione@collabora.co.uk>
174
175         Reviewed by Alp Toker.
176
177         http://bugs.webkit.org/show_bug.cgi?id=17845
178         [GTK] combo box menu displayed in the wrong position
179
180         * platform/gtk/PopupMenuGtk.cpp:
181         (WebCore::PopupMenu::show): Change the popup menu vertical position so
182         that the active item is over the combo box.
183         (WebCore::PopupMenu::menuPositionFunction): use the "push in" style
184         like native GTK+ combo boxes to handle menus that don't fit in the
185         screen.
186
187 2008-03-24  Adam Roben  <aroben@apple.com>
188
189         * WebCore.vcproj/WebCore.vcproj: Add files from WebCore/page/inspector
190         to the project.
191
192 2008-03-24  Alexey Proskuryakov  <ap@webkit.org>
193
194         Build fix.
195
196         * WebCore.xcodeproj/project.pbxproj: Added DOMSVGAltGlyphElement.h and
197         DOMSVGAltGlyphElementInternal.h to Copy Generated Headers phase.
198
199 2008-03-24  Eric Seidel  <eric@webkit.org>
200
201         Build fix, no review.
202
203         Fix project paths to be group relative instead of project relative
204
205         * WebCore.xcodeproj/project.pbxproj:
206
207 2008-03-23  Maciej Stachowiak  <mjs@apple.com>
208
209         Reviewed by Eric.
210
211         - fixed "SVGTextElement.getNumberOfChars is broken for altGlyph (affects Acid3 test 79)"
212         http://bugs.webkit.org/show_bug.cgi?id=17062
213
214         * svg/SVGAltGlyphElement.cpp: Added. Implementation for new element.
215         (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
216         (WebCore::SVGAltGlyphElement::~SVGAltGlyphElement):
217         (WebCore::SVGAltGlyphElement::setGlyphRef):
218         (WebCore::SVGAltGlyphElement::glyphRef):
219         (WebCore::SVGAltGlyphElement::setFormat):
220         (WebCore::SVGAltGlyphElement::format):
221         (WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
222         (WebCore::SVGAltGlyphElement::createRenderer): For now, this just renders as a tspan,
223         which is right for everything besides the alternate glyph substitution itself.
224         * svg/SVGAltGlyphElement.h: Added. Header for new element.
225         (WebCore::SVGAltGlyphElement::contextElement):
226         * svg/SVGAltGlyphElement.idl: Added. Interface for new element.
227         * svg/SVGTSpanElement.cpp:
228         (WebCore::SVGTSpanElement::childShouldCreateRenderer): Allow altGlyph to render here.
229         * svg/SVGTextElement.cpp:
230         (WebCore::SVGTextElement::childShouldCreateRenderer): ditto
231         * svg/SVGTextPathElement.cpp:
232         (WebCore::SVGTextPathElement::childShouldCreateRenderer): ditto
233         * svg/svgtags.in: Add altGlyph
234         * DerivedSources.make: Add new files
235         * GNUmakefile.am: ditto
236         * WebCore.SVG.exp: Add new ObjC DOM class
237         * WebCore.pro: Add new files
238         * WebCore.vcproj/WebCore.vcproj: ditto
239         * WebCore.xcodeproj/project.pbxproj: ditto
240         * bindings/js/JSSVGElementWrapperFactory.cpp: Handle altGlyph
241         * bindings/objc/DOM.mm:
242         (WebCore::createElementClassMap): ditto
243         * bindings/objc/DOMInternal.h: Include altGlyph header
244         * bindings/objc/DOMSVG.h: Include altGlyph header
245
246 2008-03-23  Robert Blaut  <webkit@blaut.biz>
247
248         Reviewed by eseidel.  Landed by eseidel.
249
250         Bug 17685: [~=] attribute selector failing to match empty string
251         <http://bugs.webkit.org/show_bug.cgi?id=17685>
252
253         Test: fast/css/attribute-selector-empty-value.html
254
255         * css/CSSStyleSelector.cpp:
256         (WebCore::CSSStyleSelector::checkOneSelector):
257
258 2008-03-22  Marco Barisione  <marco.barisione@collabora.co.uk>
259
260         Reviewed by Darin Adler.
261
262         http://bugs.webkit.org/show_bug.cgi?id=16339
263         Frame scrollbar positions are not updated on page scroll
264
265         Widget::geometryChanged() was called instead of
266         ScrollViewScrollbar::geometryChanged() because of a missing const.
267
268         * platform/gtk/ScrollViewGtk.cpp:
269         (WebCore::ScrollViewScrollbar::geometryChanged): add the missing
270         const.
271
272 2008-03-22  Rodney Dawes  <dobey@wayofthemonkey.com>
273
274         Reviewed by Mark Rowe.
275
276         Bug 17974: REGRESSION: npfunctions.h should not import npruntime_internal.h
277         <http://bugs.webkit.org/show_bug.cgi?id=17974>
278         <rdar://problem/5782310>
279
280         Include npapi.h and npruntime.h directly in npfunctions.h.
281         Add npfunctions.h and npapi.h to npruntime_internal.h.
282         Replace includes of npfunctions.h with npruntime_internal.h.
283
284         * bridge/npruntime_internal.h:
285         * plugins/PluginPackage.h:
286         * plugins/PluginStream.h:
287         * plugins/npapi.cpp:
288         * plugins/npfunctions.h:
289
290 2008-03-22  Mark Rowe  <mrowe@apple.com>
291
292         Qt build fix.
293
294         * bridge/qt/qt_runtime.cpp:
295         (KJS::Bindings::valueRealType):
296
297 2008-03-22  Eric Seidel  <eric@webkit.org>
298
299         Reviewed by mjs.
300
301         Unify handling of NAMESPACE_ERR and fix Acid3 test 25
302         http://bugs.webkit.org/show_bug.cgi?id=16693
303
304         Test: fast/dom/DOMImplementation/createDocumentType-err.html
305
306         * dom/DOMImplementation.cpp:
307         (WebCore::DOMImplementation::createDocumentType):
308         (WebCore::DOMImplementation::createDocument):
309         * dom/DOMImplementation.idl:
310         * dom/Document.cpp:
311         (WebCore::Document::hasPrefixNamespaceMismatch):
312         (WebCore::Document::createElementNS):
313         (WebCore::Document::parseQualifiedName):
314         (WebCore::Document::createAttributeNS):
315         * dom/Document.h:
316         * dom/Element.cpp:
317         (WebCore::Element::setAttributeNS):
318         * editing/FormatBlockCommand.cpp:
319         (WebCore::FormatBlockCommand::doApply):
320
321 2008-03-22  Eric Seidel  <eric@webkit.org>
322
323         Reviewed by mjs.
324
325         Fix createElementNS to throw exceptions for invalid qualified names
326         Fixes Acid3 sub-test 23
327         http://bugs.webkit.org/show_bug.cgi?id=16833
328
329         Tests: fast/dom/Document/createAttributeNS-namespace-err.html
330                fast/dom/Document/createElementNS-namespace-err.html
331
332         * dom/Document.cpp:
333         (WebCore::Document::createElement):
334         (WebCore::hasNamespaceError):
335         (WebCore::Document::createElementNS):
336         (WebCore::Document::createAttributeNS):
337         * dom/Document.idl:
338
339 2008-03-21  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
340
341         Reviewed by Oliver Hunt.
342
343         Bug 13693: REGRESSION (r13615): Acid2 Test Eyes render improperly after a page refresh
344         <http://bugs.webkit.org/show_bug.cgi?id=13693>
345
346         Do not create bogus history items for unloaded <object> elements, because they
347         cause fallback content to be ignored on reload.
348
349         * loader/FrameLoader.cpp:
350         (WebCore::FrameLoader::createHistoryItemTree):
351
352 2008-03-21  Dan Bernstein  <mitz@apple.com>
353
354         Reviewed by Oliver Hunt.
355
356         - fix http://bugs.webkit.org/show_bug.cgi?id=17988
357           REGRESSION (r31114-31132): Crash in InlineBox::isDirty() opening chowhound.com
358
359         Test: fast/css-generated-content/empty-content-with-float-crash.html
360
361         * rendering/bidi.cpp:
362         (WebCore::RenderBlock::layoutInlineChildren): Added a null check for
363         the case where the block contains no in-flow elements but still lays
364         out as a line flow, which can happen as a result of empty generated
365         content.
366
367 2008-03-21  Sam Weinig  <sam@webkit.org>
368
369         Reviewed by Oliver Hunt.
370
371         Fix <rdar://problem/5788451>
372         toDataURL not implemented for Windows (need mapping of MIME type to UTI)
373
374         Hard code support for just PNG's on windows, the minimum the spec requires.
375
376         * platform/MIMETypeRegistry.cpp:
377         (WebCore::initializeSupportedImageMIMETypesForEncoding):
378         * platform/graphics/cg/ImageBufferCG.cpp:
379         (WebCore::utiFromMIMEType):
380         (WebCore::ImageBuffer::toDataURL):
381
382 2008-03-21  Matt Lilek  <webkit@mattlilek.com>
383
384         Not reviewed, Mac build fix.
385
386         * bindings/objc/WebScriptObject.mm:
387         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
388         * bridge/jni/jni_utility.cpp:
389         (KJS::Bindings::convertValueToJValue):
390         * bridge/objc/objc_runtime.mm:
391         (ObjcFallbackObjectImp::callAsFunction):
392
393 2008-03-21  Adam Roben  <aroben@apple.com>
394
395         Attempt to fix the Mac build
396
397         * bindings/objc/DOMUtility.mm:
398         (KJS::createDOMWrapper):
399
400 2008-03-21  Adam Roben  <aroben@apple.com>
401
402         Rename static info members to s_info
403
404         This avoids conflicts with custom "info" methods, such as the one that
405         will soon be added to Console.
406
407         Reviewed by Ada Chan and Sam Weinig.
408
409 2008-03-21  David Hyatt  <hyatt@apple.com>
410
411         <rdar://problem/5808863> Zooming should not let non-zero border width become zero
412
413         Make sure zoomed values that begin >= 1 are not allowed to fall below 1.
414
415         Reviewed by adele
416
417         * css/CSSPrimitiveValue.cpp:
418         (WebCore::CSSPrimitiveValue::computeLengthDouble):
419         * loader/CachedImage.cpp:
420         (WebCore::CachedImage::imageSize):
421         (WebCore::CachedImage::imageRect):
422
423 2008-03-21  Kevin McCullough  <kmccullough@apple.com>
424
425         Reviewed by Sam.
426
427         -<rdar://problem/5712804> XMLHttpRequests do not show response contents, preview images (14313)
428         -<rdar://problem/5712931> XMLHttpRequests should be shown separately and grouped (14315)
429         -<rdar://problem/5732836> XMLHttpRequest: Inspector should show network activity/XHR in Console (17233)
430         - Instrument the InspectorController to cache XHR resrouces since they are not cached by WebCore.
431         The resources will be kept in the same map as all other resources so they will have the exact
432         same lifecycle. 
433
434         * ChangeLog:
435         * page/InspectorController.cpp:
436         (WebCore::InspectorCachedXMLHttpRequestResource::type):
437         (WebCore::InspectorCachedXMLHttpRequestResource::setType):
438         (WebCore::InspectorCachedXMLHttpRequestResource::data):
439         (WebCore::InspectorCachedXMLHttpRequestResource::setData):
440         (WebCore::InspectorCachedXMLHttpRequestResource::encoding):
441         (WebCore::InspectorCachedXMLHttpRequestResource::setEncoding):
442         (WebCore::InspectorCachedXMLHttpRequestResource::create):
443         (WebCore::InspectorCachedXMLHttpRequestResource::InspectorCachedXMLHttpRequestResource):
444
445 2008-03-21  Rodney Dawes  <dobey@wayofthemonkey.com>
446
447         Reviewed by Holger.
448
449         http://bugs.webkit.org/show_bug.cgi?id=17981
450
451         Remove WebCore/ForwardingHeaders from cppflags as it is not needed,
452         and causes build problems with GTK+.
453
454         * GNUmakefile.am:
455
456 2008-03-21  Dan Bernstein  <mitz@apple.com>
457
458         Reviewed by Adele Peterson.
459
460         - fix http://bugs.webkit.org/show_bug.cgi?id=17966
461           REGRESSION (r31114-r31132): Clearing via br behaves unpredictably
462
463         Test: fast/block/float/br-with-clear.html
464
465         * rendering/bidi.cpp:
466         (WebCore::RenderBlock::layoutInlineChildren): Fixed the logic for the
467         very special case of an all-lines-clean block that ends with a float-
468         clearing <br> by looking for the <br> at the end of the line rather
469         than at its beginning.
470
471 2008-03-21  Adam Roben  <aroben@apple.com>
472
473         Don't allow any newly-scheduled plugin requests to be serviced when JS is paused
474
475         This is a followup to r31199.
476
477         Reviewed by Tim Hatcher.
478
479         * plugins/PluginView.cpp:
480         (WebCore::PluginView::requestTimerFired): Added an assertion that JS
481         is not paused.
482         (WebCore::PluginView::scheduleRequest): Don't start the request timer
483         if JS is paused. This is the bug fix.
484         (WebCore::PluginView::setJavaScriptPaused): Replaced the use of
485         m_requestTimerWasActive with a check to see if we have any pending
486         requests. m_requestTimerWasActive would not be accurate if a new
487         request had been scheduled while JS was paused.
488         (WebCore::PluginView::PluginView): Removed initialization of
489         m_requestTimerWasActive.
490         * plugins/PluginView.h: Removed m_requestTimerWasActive.
491
492 2008-03-20  Dan Bernstein  <mitz@apple.com>
493
494         Reviewed by Anders Carlsson.
495
496         - fix an assertion failure due to a line being marked dirty during
497           computeVerticalPositionsForLine() due to temporary box destruction
498
499         Test: fast/inline/clean-after-removing-temp-boxes.html
500
501         * rendering/RenderText.cpp:
502         (WebCore::RenderText::setTextWithOffset): Added code to dirty lines
503         when this method is called on an empty text node, which has no line
504         boxes.
505         * rendering/bidi.cpp:
506         (WebCore::RenderBlock::computeVerticalPositionsForLine): Mark the line
507         clean in the end.
508
509 2008-03-20  Anders Carlsson  <andersca@apple.com>
510
511         Reviewed by Maciej.
512
513         Make some member variables private.
514         
515         * loader/ResourceLoader.cpp:
516         (WebCore::ResourceLoader::ResourceLoader):
517         * loader/ResourceLoader.h:
518
519 2008-03-20  Anders Carlsson  <andersca@apple.com>
520
521         Reviewed by Maciej.
522
523         Get rid of m_originalURL in ResourceLoader.
524
525         * loader/ResourceLoader.cpp:
526         (WebCore::ResourceLoader::load):
527         Don't store m_originalURL.
528         
529         * loader/ResourceLoader.h:
530         * loader/SubresourceLoader.cpp:
531         (WebCore::SubresourceLoader::willSendRequest):
532         Use the url of the current request instead of the original URL.
533
534 2008-03-20  Anders Carlsson  <andersca@apple.com>
535
536         Reviewed by Maciej.
537
538         Small loader cleanups.
539         
540         * loader/MainResourceLoader.cpp:
541         (WebCore::MainResourceLoader::willSendRequest):
542         No need to call setRequest here, ResourceLoader::willSendRequest takes care of that. 
543         Also, there is no need to check that newRequest is null here, because we assert earlier that it is not.
544         
545         * loader/ResourceLoader.h:
546         Get rid of setRequest, it is no longer needed.
547
548 2008-03-20  Anders Carlsson  <andersca@apple.com>
549
550         Get rid of a couple of unnecessary class declarations.
551         
552         * loader/SubresourceLoader.h:
553
554 2008-03-20  David Hyatt  <hyatt@apple.com>
555
556         Add a new value to background-clip, "text", that allows backgrounds to be clipped to foreground text (and
557         associated text decorations like shadows and underlines).
558
559         Reviewed by Beth
560
561         * css/CSSParser.cpp:
562         (WebCore::CSSParser::parseBackgroundProperty):
563         * css/CSSPrimitiveValueMappings.h:
564         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
565         (WebCore::CSSPrimitiveValue::operator EBackgroundBox):
566         * platform/graphics/GraphicsContext.cpp:
567         (WebCore::GraphicsContext::clipToImageBuffer):
568         * platform/graphics/GraphicsContext.h:
569         * platform/graphics/cg/GraphicsContextCG.cpp:
570         (WebCore::GraphicsContext::clipToImageBuffer):
571         * rendering/InlineBox.cpp:
572         (WebCore::InlineBox::paint):
573         * rendering/InlineFlowBox.cpp:
574         (WebCore::InlineFlowBox::paintBackgrounds):
575         (WebCore::InlineFlowBox::paintBackground):
576         (WebCore::InlineFlowBox::paintBoxDecorations):
577         * rendering/InlineFlowBox.h:
578         * rendering/InlineTextBox.cpp:
579         (WebCore::InlineTextBox::paint):
580         * rendering/RenderBlock.cpp:
581         (WebCore::RenderBlock::paintColumns):
582         (WebCore::RenderBlock::paintObject):
583         (WebCore::RenderBlock::paintFloats):
584         * rendering/RenderBlock.h:
585         * rendering/RenderBox.cpp:
586         (WebCore::RenderBox::paintRootBoxDecorations):
587         (WebCore::RenderBox::paintBoxDecorations):
588         (WebCore::RenderBox::paintBackgrounds):
589         (WebCore::RenderBox::paintBackground):
590         (WebCore::RenderBox::paintBackgroundExtended):
591         * rendering/RenderBox.h:
592         * rendering/RenderFieldset.cpp:
593         (WebCore::RenderFieldset::paintBoxDecorations):
594         * rendering/RenderFlow.cpp:
595         (WebCore::RenderFlow::paintLines):
596         * rendering/RenderObject.h:
597         (WebCore::):
598         (WebCore::RenderObject::paintBackgroundExtended):
599         * rendering/RenderStyle.h:
600         (WebCore::):
601         * rendering/RenderTable.cpp:
602         (WebCore::RenderTable::paintBoxDecorations):
603         * rendering/RenderTableCell.cpp:
604         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
605
606 2008-03-20  Adam Roben  <aroben@apple.com>
607
608         Allow pausing/blocking of JS execution by plugins
609
610         Part of Bug 17133: Should support pausing JavaScript execution without
611         hanging the process
612
613         <http://bugs.webkit.org/show_bug.cgi?id=17133>
614         <rdar://problem/5719551>
615
616         This patch doesn't affect Mac, which doesn't use the shared PluginView
617         code.
618
619         Note that this patch doesn't prevent plugins from executing JS via an
620         NPObject they've already gotten hold of. It just blocks obtaining new
621         NPObjects and pauses any requests to evaluate javascript: URIs. This
622         is probably good enough for now because most plugins seem to always
623         obtain the Window object each time they want to execute JS.
624
625         Reviewed by Tim Hatcher.
626
627         * plugins/PluginView.cpp:
628         (WebCore::PluginView::getValue): Return an error if JS is paused.
629         (WebCore::PluginView::setJavaScriptPaused): Stop the request timer if
630         we're pausing, and resume it if we're unpausing.
631         (WebCore::PluginView::PluginView): Initialize new members.
632         * plugins/PluginView.h:
633
634 2008-03-20  Adam Roben  <aroben@apple.com>
635
636         Allow pausing of callOnMainThread callbacks
637
638         Part of Bug 17133: Should support pausing JavaScript execution without
639         hanging the process
640
641         <http://bugs.webkit.org/show_bug.cgi?id=17133>
642         <rdar://problem/5719551>
643
644         Reviewed by Tim Hatcher.
645
646         * platform/MainThread.cpp:
647         (WebCore::dispatchFunctionsFromMainThread): If callbacks are paused,
648         don't dispatch the functions.
649         (WebCore::setMainThreadCallbacksPaused): Added. If we're being
650         unpaused, call scheduleDispatchFunctionsOnMainThread so that any
651         queued callbacks will get dispatched in the near future.
652         * platform/MainThread.h:
653
654 2008-03-20  Adam Roben  <aroben@apple.com>
655
656         Allow blocking of JS event handlers/javascript: URIs per-Frame
657
658         Part of Bug 17133: Should support pausing JavaScript execution without
659         hanging the process
660
661         <http://bugs.webkit.org/show_bug.cgi?id=17133>
662         <rdar://problem/5719551>
663
664         Two new methods are added to KJSProxy: setPaused and isPaused. When
665         setPaused(true) is called, JS event handlers are blocked and
666         javascript: URIs will not be evaluated.
667
668         Reviewed by Tim Hatcher.
669
670         * bindings/js/kjs_events.cpp:
671         (WebCore::JSAbstractEventListener::handleEvent):
672           - Removed some old KJS_DEBUGGER code
673           - Don't run the handler if the KJSProxy is paused.
674         * bindings/js/kjs_proxy.cpp:
675         (WebCore::KJSProxy::KJSProxy): Initialize new member.
676         * bindings/js/kjs_proxy.h: Added new methods.
677         * loader/FrameLoader.cpp:
678         (WebCore::FrameLoader::executeScript): Don't execute the script if the
679         KJSProxy is paused.
680
681 2008-03-20  Jon Honeycutt  <jhoneycutt@apple.com>
682
683         Reviewed by Anders.
684
685         Fix Windows warning / leak: warning C4150: deletion of pointer to
686         incomplete type 'WebCore::PluginRequest'; no destructor called
687
688         * plugins/PluginView.cpp: Move PluginRequest class to PluginView.h so
689         Windows PluginView destructor can use WTF::deleteAllValues to clean up
690         m_requests.
691         * plugins/PluginView.h:
692         (WebCore::PluginRequest::PluginRequest):
693         (WebCore::PluginRequest::frameLoadRequest):
694         (WebCore::PluginRequest::notifyData):
695         (WebCore::PluginRequest::sendNotification):
696         (WebCore::PluginRequest::shouldAllowPopups):
697
698 2008-03-20  Mark Rowe  <mrowe@apple.com>
699
700         Reviewed by Sam Weinig.
701
702         Ensure that the defines in FEATURE_DEFINES are sorted so that they will match the default settings of build-webkit.
703         This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the
704         command-line.
705
706         * Configurations/WebCore.xcconfig:
707
708 2008-03-20  Jon Honeycutt  <jhoneycutt@apple.com>
709
710         Reviewed by Anders.
711
712         <rdar://problem/5809600> REGRESSION:
713         http/tests/plugins/cross-frame-object-access.html hangs Windows Layout
714         Tests
715
716         r30897 changed the way we conditionalize this feature.
717
718         * plugins/PluginView.cpp:
719         (WebCore::PluginView::getValue): Test ENABLE(NETSCAPE_PLUGIN_API)
720         instead of USE(NPOBJECT).
721         (WebCore::PluginView::bindingInstance): Same.
722
723 2008-03-20  Adam Roben  <aroben@apple.com>
724
725         Highlight nodes when you hover over them in the Console
726
727         Part of Bug 16532: Inspector should highlight nodes in page when
728         hovering over nodes in Inspector's interface
729
730         <http://bugs.webkit.org/show_bug.cgi?id=16532>
731         <rdar://problem/5712896>
732
733         Reviewed by Tim Hatcher.
734
735         * page/inspector/ConsolePanel.js:
736         (WebInspector.ConsolePanel._formatnode): Add mouseover/mouseout event
737         listeners to highlight the node and clear the highlight.
738
739 2008-03-20  Adam Roben  <aroben@apple.com>
740
741         Highlight nodes in the page when you hover over their DOM breadcrumbs
742
743         Part of Bug 16532: Inspector should highlight nodes in page when
744         hovering over nodes in Inspector's interface
745
746         <http://bugs.webkit.org/show_bug.cgi?id=16532>
747         <rdar://problem/5712896>
748
749         Reviewed by Tim Hatcher.
750
751         * page/inspector/DocumentPanel.js:
752         (WebInspector.DocumentPanel): Add an mouseout event listener to the
753         breadcrumbs element to clear the highlighted node.
754         (WebInspector.DocumentPanel.updateBreadcrumbs): Change the mouseover
755         event listener to highlight the node represented by the hovered
756         breadcrumb.
757
758 2008-03-20  Adam Roben  <aroben@apple.com>
759
760         Highlight nodes in the page when you hover over them in the DOM tree
761
762         Part of Bug 16532: Inspector should highlight nodes in page when
763         hovering over nodes in Inspector's interface
764
765         <http://bugs.webkit.org/show_bug.cgi?id=16532>
766         <rdar://problem/5712896>
767
768         The inspected node is no longer highlighted (unless, of course, you
769         hover over it).
770
771         Reviewed by Tim Hatcher.
772
773         * page/inspector/DocumentPanel.js:
774         (WebInspector.DocumentPanel):
775           - Don't highlight the focused node when the DOM tree is shown
776           - Added mousemove/mouseout event listeners to set/clear the
777             highlighted node. These are added to the root of the DOM tree
778             instead of to each individual list item to avoid flashing as the
779             mouse moves between nodes.
780         (WebInspector.DocumentPanel.set focusedDOMNode): Don't highlight the
781         focused node.
782         (WebInspector.DocumentPanel._onmousemove): Highlight the node under
783         the mouse.
784
785 2008-03-20  Adam Roben  <aroben@apple.com>
786
787         Show nodes' content/padding/border/margin boxes in the node highlight
788
789         Part of Bug 17221: Node highlight should show node metrics
790
791         <http://bugs.webkit.org/show_bug.cgi?id=17221>
792         <rdar://problem/5732822>
793
794         Outstanding issues:
795           1) We don't show padding/border/margins for inlines
796           2) We don't show any numeric metrics, we just draw the boxes
797           3) We'll probably want to tweak the look of the highlight some, at
798              least to make the boxes better distinguishable
799
800         Reviewed by Tim Hatcher.
801
802         * page/InspectorController.cpp:
803         (WebCore::drawOutlinedRect): Added. Just draws a single rect.
804         (WebCore::drawHighlightForBoxes): Added. Takes the rects we calculated
805         for the node and draws the highlight.
806         (WebCore::InspectorController::drawNodeHighlight): Calculates the
807         content/padding/border/margin boxes for blocks and passes them off to
808         drawHighlightForBoxes. The behavior for inlines is for now unchanged.
809
810 2008-03-20  Adam Roben  <aroben@apple.com>
811
812         Fix RenderContainer's override of addLineBoxRects to match RenderObject's
813
814         RenderContainer::addLineBoxRects was never getting called because its
815         parameters didn't match those of RenderObject::addLineBoxRects.
816
817         Reviewed by Mitz Pettel.
818
819         No test possible.
820
821         * rendering/RenderContainer.cpp: Added an optional bool
822         useSelectionHeight parameter to match RenderObject's method.
823         * rendering/RenderContainer.h: Ditto.
824
825 2008-03-20  Marco Barisione  <marco.barisione@collabora.co.uk>
826
827         Reviewed by Alp Toker.
828
829         http://bugs.webkit.org/show_bug.cgi?id=17946
830         [GTK] Widgets are not clipped
831
832         * platform/gtk/RenderThemeGtk.cpp:
833         (WebCore::paintMozWidget): pass the clipping rectangle to
834         moz_gtk_widget_paint() instead of just the widget rectangle.
835
836 2008-03-20  David Hyatt  <hyatt@apple.com>
837
838         Fix for http://bugs.webkit.org/show_bug.cgi?id=9279
839
840         Make :hover work with the adjacent sibling selector.  This fix makes all forms of dynamic changes
841         (class name changes, :hover, :focus, etc.) work properly when used with the + selector.
842
843         Reviewed by weinig
844
845         Added fast/css/dynamic-sibling-selector.html
846
847         * dom/Element.cpp:
848         (WebCore::Element::recalcStyle):
849
850 2008-03-20  Aaron Golden  <aegolden@gmail.com>
851
852         Reviewed by Darin and David Kilzer.
853
854         Addresses <http://bugs.webkit.org/show_bug.cgi?id=15263>, which caused certain marquees to not display.
855
856         Test: fast/html/marquee-scroll.html
857
858         * html/HTMLMarqueeElement.cpp:
859         (WebCore::HTMLMarqueeElement::parseMappedAttribute):
860
861 2008-03-20  Adam Roben  <aroben@apple.com>
862
863         Export InspectorController::drawNodeHighlight
864
865         Reviewed by Tim Hatcher.
866
867         * WebCore.base.exp: Also sorted this file.
868
869 2008-03-19  Stephanie Lewis  <slewis@apple.com>
870
871         Rubber-stamped by Anders.
872
873         Fix Windows Build
874
875         * platform/cf/SharedBufferCF.cpp:
876         (WebCore::SharedBuffer::createCFData):
877
878 2008-03-19  Stephanie Lewis <slewis@apple.com>
879
880         Rubber-stamped by Anders.
881
882         Fix Windows Build
883
884         * platform/SharedBuffer.h:
885
886 2008-03-19  Justin Garcia  <justin.garcia@apple.com>
887
888         Reviewed by Oliver.
889         
890         <rdar://problem/5780697> Copying content with CSS property values that are percentages can cause fidelity issues
891          
892         Elements with height: x%; overflow: visible; overlap what's below them when they are copied from
893         a document in quirksmode and pasted into to one in standards mode.  This fix uses the computed 
894         the value for a property if its value is a percentage.
895         
896         * css/CSSMutableStyleDeclaration.cpp:
897         (WebCore::CSSMutableStyleDeclaration::addParsedProperty): Added so that we don't have to use
898         setProperty from appendStartMarkup.  We already have a parsed property value, so we shouldn't
899         use setProperty, since it takes in a String.  If we did, we would have to call CSSValue::cssText()
900         for a String only to re-parse it in setProperty.  This wasn't extremely important now, but it will 
901         be as we compute more properties to fix the rest of the copy/paste fidelity bugs.
902         * css/CSSMutableStyleDeclaration.h:
903         * editing/markup.cpp:
904         (WebCore::appendStartMarkup): Compute values for properties that have percentage values.  We could
905         perhaps narrow this special case to only include properties that are effected by quirksmode.
906
907 2008-03-19  Sam Weinig  <sam@webkit.org>
908
909         Reviewed by Anders Carlsson.
910
911         Fix for <rdar://problem/5785694>
912         Crash occurs at KJS::Collector::collect() when loading web clip widgets with a PAC file
913
914         Make the activeExecStates stack per JSGlobalObject instead of static to ensure
915         thread safety.
916
917         * bindings/objc/WebScriptObject.mm:
918         (+[WebScriptObject throwException:]): Change to throw an exception on the current
919         GlobalObject instead of the top of the static activeExecStates stack.
920         (-[WebScriptObject setException:]): Change to use the top of the rootObjects GlobalObject
921         instead of the top of the static activeExecStates stack.
922
923         * bridge/c/c_instance.cpp:
924         * bridge/c/c_instance.h:
925         * bridge/jni/jni_instance.cpp:
926         (JavaInstance::virtualBegin):
927         (JavaInstance::virtualEnd):
928         * bridge/jni/jni_instance.h:
929         * bridge/objc/objc_instance.h:
930         * bridge/objc/objc_instance.mm:
931         (ObjcInstance::~ObjcInstance):
932         (ObjcInstance::virtualBegin):
933         (ObjcInstance::virtualEnd):
934         * bridge/runtime.cpp:
935         (KJS::Bindings::Instance::setDidExecuteFunction):
936         (KJS::Bindings::Instance::didExecuteFunction):
937         (KJS::Bindings::Instance::setCurrentGlobalObject): Added.
938         (KJS::Bindings::Instance::currentGlobalObject): Added.
939         (KJS::Bindings::Instance::begin):
940         (KJS::Bindings::Instance::end):
941         * bridge/runtime.h:
942         (KJS::Bindings::Instance::virtualBegin): Renamed from begin().
943         (KJS::Bindings::Instance::virtualEnd): Renamed from end().
944         We now store the currently active globalObject everytime we cross the runtime
945         object boundary.  To do this, we take advantage of the existing begin/end
946         methods that are called when crossing this boundary, making begin set the current
947         globalObject and then call the old begin, now called virtualBegin.
948
949 2008-03-19  Brady Eidson  <beidson@apple.com>
950
951         Reviewed by Anders
952
953         Change SharedBuffer so the wrapping platform data aspect can be shared with all CoreFoundation platforms
954         (Mac and Windows instead of just Mac)
955
956         * WebCore.vcproj/WebCore.vcproj: Add SharedBufferCF.cpp
957         * WebCore.xcodeproj/project.pbxproj: Ditto
958
959         * platform/SharedBuffer.cpp:
960         * platform/SharedBuffer.h: Change the private c'tor from NSData to CFDataRef, other PLATFORM tweaks
961
962         * platform/cf/SharedBufferCF.cpp: Added.
963         (WebCore::SharedBuffer::SharedBuffer):
964         (WebCore::SharedBuffer::createCFData): Non-Mac version of createCFData
965         (WebCore::SharedBuffer::hasPlatformData):
966         (WebCore::SharedBuffer::platformData):
967         (WebCore::SharedBuffer::platformDataSize):
968         (WebCore::SharedBuffer::maybeTransferPlatformData):
969         (WebCore::SharedBuffer::clearPlatformData):
970
971         * platform/mac/SharedBufferMac.mm:
972         (WebCore::SharedBuffer::wrapNSData): Use the CFDataRef constructor via toll-free bridging
973         (WebCore::SharedBuffer::createCFData): Mac-specific version of createCFData
974
975 2008-03-19  Oliver Hunt  <oliver@apple.com>
976
977         Reviewed by Antti.
978
979         Bug 17954: Canvas arc() with radius of 0 throws exception
980         http://bugs.webkit.org/show_bug.cgi?id=17954
981
982         Simple fix -- use >= instead of > when validating the radius.
983
984         * html/CanvasRenderingContext2D.cpp:
985         (WebCore::CanvasRenderingContext2D::arc):
986
987 2008-03-19  Justin Garcia  <justin.garcia@apple.com>
988
989         Reviewed by Oliver.
990
991         <rdar://problem/5794920> Acid3: Assertion failure in VisiblePosition::previous when clicking on results (17004)
992         
993         The position inside an empty inline-block was a candidate, but upstream and downstream
994         would move across it without stopping.  This confused canonicalPosition, since no more
995         than two candidates should have the same upstream/downstream (be visually equivalent).
996         
997         Code was added intentionally in isCandidate to make VisiblePositions inside empty 
998         inline-blocks, so we need to make upstream/downstream understand that.
999
1000         * dom/Position.cpp:
1001         (WebCore::endsOfNodeAreVisuallyDistinctPositions): upstream and downstream used to only
1002         stop when entering or leaving a non-inline element (referred to as a "block").  We must also 
1003         avoid entering or leaving an empty inline-block.  This will allow a VisiblePosition there, to 
1004         match up with what the code in isCandidate intended.
1005         (WebCore::enclosingVisualBoundary): Removed enclosingBlock and replaced it with this.
1006         (WebCore::Position::upstream): Added better comments, called the new functions.
1007         (WebCore::Position::downstream): Ditto.
1008         * dom/Position.h:
1009
1010 2008-03-19  Dan Bernstein  <mitz@apple.com>
1011
1012         Rubber-stamped by John Sullivan.
1013
1014         - change CSS property and value keyword constants from all-caps with
1015           underscores to intra-caps.
1016
1017         * css/makeprop.pl:
1018         * css/makevalues.pl:
1019         * All files using the constants
1020
1021 2008-03-19  Adam Roben  <aroben@apple.com>
1022
1023         Make clicking anywhere in a row in the DOM tree select that row's node
1024
1025         We now have mousedown and dblclick event listeners on the root of the
1026         tree that forward the event to the node on the row the mouse is over.
1027
1028         Reviewed by Tim Hatcher.
1029
1030         * page/inspector/DocumentPanel.js:
1031         (WebInspector.DocumentPanel): Added a dblclick and mousedown event
1032         listeners to the root of the tree.
1033         (WebInspector.DocumentPanel._treeElementFromEvent): Added. Finds the
1034         tree element for the row underneath the mouse.
1035         (WebInspector.DocumentPanel._ondblclick): Added. Sends the dblclick
1036         event on to the tree element in the current row.
1037         (WebInspector.DocumentPanel._onmousedown): Added. Selects the tree
1038         element in the current row.
1039         * page/inspector/treeoutline.js:
1040         (TreeOutline.treeElementFromPoint): Added.
1041         (TreeElement.treeElementSelected): Changed to call
1042         TreeElement.isEventWithinDisclosureTriangle, and added an early return.
1043         (TreeElement.treeElementToggled): Ditto.
1044         (TreeElement.isEventWithinDisclosureTriangle): Added.
1045         * page/inspector/utilities.js:
1046         (Node.enclosingNodeOrSelfWithNodeNameInArray): Added.
1047         (Node.enclosingNodeOrSelfWithNodeName): Now just calls
1048         enclosingNodeOrSelfWithNodeNameInArray.
1049         (Elemnt.get totalOffsetLeft): Added.
1050         (Elemnt.get totalOffsetTop): Added.
1051
1052 2008-03-19  Dan Bernstein  <mitz@apple.com>
1053
1054         Reviewed by Sam Weinig.
1055
1056         - fix assertion failure in RenderBlock::determineStartPosition() at http://www.wired.com/techbiz/it/magazine/16-04/bz_apple
1057
1058         Test: fast/repaint/line-flow-with-floats-10.html
1059
1060         * rendering/bidi.cpp:
1061         (WebCore::RenderBlock::determineStartPosition): Removed bogus assertion.
1062         If the float's top margin has changed and it has not been repositioned
1063         yet, we do not have its new y position.
1064
1065 2008-03-19  David Hyatt  <hyatt@apple.com>
1066
1067         New implementation of full page zoom.  Because of how much doesn't transform when zooming, and because
1068         of the need to obey viewport constraints, I decided to take a completely different approach.  Now CSS
1069         lengths and intrinsic sizes are simply adjusted by the zoom factor.  This approach works much better and
1070         avoids pixel cracks more than the old approach.   In addition widgets "just work", namely plugins zoom
1071         and scrollbars do not.
1072
1073         This patch also implements the IE zoom CSS property.  This property allows fine-grained control over
1074         zooming at the element level.  It takes values of normal | <number> | <percentage> to match WinIE.  In
1075         addition, in the vein of text-size-adjust for text zooming, I have extended the zoom property with an
1076         extra value, reset.  The reset keyword can be used to prevent a section of the page from scaling at all
1077         when a zoom is applied.
1078
1079         Reviewed by olliej
1080
1081         * css/CSSComputedStyleDeclaration.cpp:
1082         (WebCore::):
1083         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1084         Support the new 'zoom' property for getComputedStyle.
1085
1086         * css/CSSParser.cpp:
1087         (WebCore::CSSParser::parseValue):
1088         Code that parses the 'zoom' property.
1089
1090         * css/CSSPrimitiveValue.cpp:
1091         (WebCore::CSSPrimitiveValue::computeLengthInt):
1092         (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
1093         (WebCore::CSSPrimitiveValue::computeLengthShort):
1094         (WebCore::CSSPrimitiveValue::computeLengthFloat):
1095         (WebCore::CSSPrimitiveValue::computeLengthDouble):
1096         * css/CSSPrimitiveValue.h:
1097         Extend all of the computeLength methods to take a multiplier so that lengths can be adjusted by the
1098         zoom factor.
1099
1100         * css/CSSPropertyNames.in:
1101         Add the new zoom property to the list of properties we understand.
1102
1103         * css/CSSStyleSelector.cpp:
1104         (WebCore::CSSStyleSelector::applyDeclarations):
1105         (WebCore::CSSStyleSelector::applyProperty):
1106         (WebCore::CSSStyleSelector::mapBackgroundSize):
1107         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
1108         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
1109         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
1110         * css/CSSStyleSelector.h:
1111         (WebCore::CSSStyleSelector::setStyle):
1112         Pass in the zoom factor when computing all lengths in CSS.
1113
1114         * css/CSSValueKeywords.in:
1115         Add support for the 'reset' keyword of the zoom property.
1116
1117         * dom/Document.cpp:
1118         (WebCore::Document::recalcStyle):
1119         Set the 'zoom' CSS property on the RenderView.  This is how we implement full page zoom.
1120
1121         * html/CanvasRenderingContext2D.cpp:
1122         (WebCore::size):
1123         Make sure the back end canvas size ignores zooming when rendering images.
1124
1125         * html/HTMLImageElement.cpp:
1126         (WebCore::HTMLImageElement::width):
1127         (WebCore::HTMLImageElement::height):
1128         (WebCore::HTMLImageElement::naturalWidth):
1129         (WebCore::HTMLImageElement::naturalHeight):
1130         Use the unzoomed width/height if we have no style information in HTMLImageElement.cpp.
1131
1132         * loader/CachedImage.cpp:
1133         (WebCore::CachedImage::ref):
1134         (WebCore::CachedImage::imageSize):
1135         (WebCore::CachedImage::imageRect):
1136         * loader/CachedImage.h:
1137         (WebCore::CachedImage::canRender):
1138         Force access to the CachedImage metrics to take a multiplier so that people have to think about
1139         the zoom factor.  The "intrinsic size" of the image then takes that into account.
1140
1141         * loader/ImageDocument.cpp:
1142         (WebCore::ImageTokenizer::finish):
1143         (WebCore::ImageDocument::scale):
1144         (WebCore::ImageDocument::resizeImageToFit):
1145         (WebCore::ImageDocument::imageChanged):
1146         (WebCore::ImageDocument::restoreImageSize):
1147         (WebCore::ImageDocument::imageFitsInWindow):
1148         Make sure image documents respect the zoom.
1149
1150         * page/AnimationController.cpp:
1151         (WebCore::ImplicitAnimation::animate):
1152         Make the 'zoom' CSS property work with CSS transitions.
1153
1154         * page/Frame.h:
1155         (WebCore::Frame::pageZoomFactor):
1156         (WebCore::Frame::textZoomFactor):
1157         Add accessors for obtaining the pageZoom vs. textZoom.
1158
1159         * page/FrameView.cpp:
1160         (WebCore::FrameView::adjustViewSize):
1161         Remove the old zoom implementation that used transforms.
1162
1163         * page/mac/WebCoreAXObject.mm:
1164         (-[WebCoreAXObject accessibilityIsIgnored]):
1165         Pass in the zoom factor.
1166
1167         * rendering/InlineFlowBox.cpp:
1168         (WebCore::InlineFlowBox::paintBackground):
1169         (WebCore::InlineFlowBox::paintBoxDecorations):
1170         Pass in the zoom factor when testing for size.
1171
1172         * rendering/RenderBox.cpp:
1173         (WebCore::RenderBox::calculateBackgroundSize):
1174         (WebCore::RenderBox::imageChanged):
1175         (WebCore::RenderBox::paintBackgroundExtended):
1176         (WebCore::RenderBox::calcHeight):
1177         * rendering/RenderFrameSet.cpp:
1178         (WebCore::RenderFrameSet::layout):
1179         * rendering/RenderHTMLCanvas.cpp:
1180         (WebCore::RenderHTMLCanvas::canvasSizeChanged):
1181         * rendering/RenderHTMLCanvas.h:
1182         (WebCore::RenderHTMLCanvas::renderName):
1183         (WebCore::RenderHTMLCanvas::intrinsicSizeChanged):
1184         * rendering/RenderImage.cpp:
1185         (WebCore::RenderImage::setImageSizeForAltText):
1186         (WebCore::RenderImage::imageChanged):
1187         (WebCore::RenderImage::calcReplacedWidth):
1188         (WebCore::RenderImage::calcReplacedHeight):
1189         * rendering/RenderImage.h:
1190         (WebCore::RenderImage::intrinsicSizeChanged):
1191         * rendering/RenderListMarker.cpp:
1192         (WebCore::RenderListMarker::layout):
1193         (WebCore::RenderListMarker::imageChanged):
1194         (WebCore::RenderListMarker::getRelativeMarkerRect):
1195         * rendering/RenderObject.cpp:
1196         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
1197         (WebCore::RenderObject::paintBorder):
1198         Pass in the zoom factor when testing for size.
1199
1200         * rendering/RenderReplaced.cpp:
1201         (WebCore::RenderReplaced::RenderReplaced):
1202         (WebCore::RenderReplaced::setStyle):
1203         (WebCore::RenderReplaced::intrinsicSizeChanged):
1204         * rendering/RenderReplaced.h:
1205         Added a new call when the zoom factor changes, intrinsicSizeChanged().  Replaced element subclasses
1206         respond to this via overrides.
1207
1208         * rendering/RenderStyle.cpp:
1209         (WebCore::StyleVisualData::StyleVisualData):
1210         (WebCore::StyleInheritedData::StyleInheritedData):
1211         (WebCore::StyleInheritedData::operator==):
1212         (WebCore::RenderStyle::diff):
1213         * rendering/RenderStyle.h:
1214         (WebCore::StyleVisualData::operator==):
1215         (WebCore::RenderStyle::zoom):
1216         (WebCore::RenderStyle::zoomInEffect):
1217         (WebCore::RenderStyle::setZoom):
1218         (WebCore::RenderStyle::setZoomInEffect):
1219         (WebCore::RenderStyle::initialZoom):
1220         Support for 'zoom' in the RenderStyle.  "zoomInEffect" represents the computed zoom taking into account
1221         all the zooms specified on ancestors.
1222
1223         * rendering/RenderTableCol.cpp:
1224         (WebCore::RenderTableCol::imageChanged):
1225         * rendering/RenderTableRow.cpp:
1226         (WebCore::RenderTableRow::imageChanged):
1227         * rendering/RenderTableSection.cpp:
1228         (WebCore::RenderTableSection::imageChanged):
1229         * rendering/RenderVideo.h:
1230         (WebCore::RenderVideo::intrinsicSizeChanged):
1231         Pass in the zoom factor.
1232
1233         * rendering/RenderView.cpp:
1234         (WebCore::RenderView::calcHeight):
1235         (WebCore::RenderView::calcWidth):
1236         (WebCore::RenderView::layout):
1237         (WebCore::RenderView::viewHeight):
1238         (WebCore::RenderView::viewWidth):
1239         * rendering/RenderView.h:
1240         (WebCore::RenderView::zoomFactor):
1241         Back out the old implementation.
1242
1243 2008-03-19  Adam Roben  <aroben@apple.com>
1244
1245         Rename firstParent* methods to enclosingNode*
1246
1247         Rubberstamped by John Sullivan.
1248
1249         * page/inspector/ConsolePanel.js:
1250         * page/inspector/DocumentPanel.js:
1251         * page/inspector/NetworkPanel.js:
1252         * page/inspector/inspector.js:
1253         * page/inspector/utilities.js:
1254
1255 2008-03-19  Dan Bernstein  <mitz@apple.com>
1256
1257         Reviewed by John Sullivan.
1258
1259         - fix <rdar://problem/5805070> CrashTracer: [USER] 33 crashes in Safari at com.apple.WebCore: WebCore::FrameView::layout + 431
1260
1261         Test: fast/dynamic/subtree-parent-static-y.html
1262
1263         * rendering/RenderObject.cpp:
1264         (WebCore::RenderObject::markContainingBlocksForLayout): Avoid calling
1265         this method on the parent if the parent is the new layout subtree root,
1266         which would result in marking all the way to the top, when it should
1267         actually do nothing.
1268
1269 2008-03-19  Mark Rowe  <mrowe@apple.com>
1270
1271         Reviewed by Oliver Hunt.
1272
1273         Use WTF::Unicode abstraction rather than using ICU functions directly.
1274
1275         * html/PreloadScanner.cpp:
1276         (WebCore::PreloadScanner::tokenize):
1277
1278 2008-03-19  Mark Rowe  <mrowe@apple.com>
1279
1280         Attempt to fix the Gtk build.
1281
1282         * platform/network/curl/ResourceHandleCurl.cpp:
1283         (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate):
1284
1285 2008-03-18  Darin Adler  <darin@apple.com>
1286
1287         Reviewed by Maciej.
1288
1289         - Speed up JavaScript built-in properties by changing the
1290           hash table to take advantage of the identifier objects
1291
1292         5% speedup for Acid3 test 26
1293
1294         * bindings/js/JSDOMWindowBase.cpp:
1295         (WebCore::JSDOMWindowBase::getOwnPropertySlot): Update for change to HashTable.
1296         (WebCore::JSDOMWindowBase::put): Ditto.
1297         * bindings/js/JSDOMWindowCustom.cpp:
1298         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Ditto.
1299         * bindings/js/JSHTMLInputElementBase.cpp:
1300         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot): Ditto.
1301         * bindings/js/JSHistoryCustom.cpp:
1302         (WebCore::JSHistory::customGetOwnPropertySlot): Ditto.
1303         * bindings/js/JSLocation.cpp:
1304         (WebCore::JSLocation::customGetOwnPropertySlot): Ditto.
1305         (WebCore::JSLocation::put): Ditto.
1306         * bindings/js/kjs_binding.cpp:
1307         (WebCore::nonCachingStaticFunctionGetter): Ditto.
1308
1309         * bindings/scripts/CodeGeneratorJS.pm: Same changes as in the
1310         create_hash_table script.
1311
1312 2008-03-18  Matt Lilek  <webkit@mattlilek.com>
1313
1314         Fix the Gtk build for real this time.
1315
1316         * platform/network/curl/AuthenticationChallenge.h:
1317
1318 2008-03-18  Sam Weinig  <sam@webkit.org>
1319
1320         Reviewed by Anders Carlsson.
1321
1322         Fix for http://bugs.webkit.org/show_bug.cgi?id=17057
1323         REGRESSION: Frequent random crashes in WebCore::JSNodeList::indexGetter
1324         <rdar://problem/5725058>
1325
1326         Tests: fast/dom/NodeList/5725058-crash-scenario-1.html
1327                fast/dom/NodeList/5725058-crash-scenario-2.html
1328                fast/dom/NodeList/5725058-crash-scenario-3.html
1329
1330         * dom/ChildNodeList.cpp: 
1331         (WebCore::ChildNodeList::ChildNodeList):
1332         * dom/ChildNodeList.h:
1333         Remove rootNodeChildrenChanged() method and fix the constructor to not 
1334         pass in a needsNotifications argument to DynamicNodeList, as it no longer
1335         takes one.
1336
1337         * dom/ClassNodeList.cpp:
1338         (WebCore::ClassNodeList::ClassNodeList):
1339         Don't pass the needsNotifications argument to DynamicNodeList.
1340
1341         * dom/ContainerNode.cpp:
1342         (WebCore::ContainerNode::childrenChanged):
1343         Rename call to hasNodeLists() to hasNodeListCaches().
1344
1345         * dom/Document.cpp:
1346         (WebCore::Document::Document):
1347         (WebCore::Document::~Document): Zero out the m_document variable to signify
1348         to destructors down the destruction chain that this is a Document type node
1349         being destructed, and thus, accessing document() is prohibited.
1350         * dom/Document.h:
1351         (WebCore::Document::addNodeListCache): Renamed from addNodeList.
1352         (WebCore::Document::removeNodeListCache): Renamed from removeNodeList, adds assertion.
1353         (WebCore::Document::hasNodeListCaches): Renamed from hasNodeListCaches.
1354         Rename m_numNodeLists to m_numNodeListCaches.
1355
1356         * dom/DynamicNodeList.cpp:
1357         (WebCore::DynamicNodeList::DynamicNodeList):
1358         (WebCore::DynamicNodeList::~DynamicNodeList):
1359         (WebCore::DynamicNodeList::invalidateCache):
1360         (WebCore::DynamicNodeList::Caches::Caches):
1361         * dom/DynamicNodeList.h:
1362         (WebCore::DynamicNodeList::hasOwnCaches):
1363         Remove the needsNotifications concept from DynamicNodeList, instead, manually
1364         invalidate the cache for lists that own their own cache.
1365
1366         * dom/NameNodeList.cpp:
1367         (WebCore::NameNodeList::NameNodeList):
1368         * dom/NameNodeList.h:
1369         Remove rootNodeAttributeChanged() method and fix the constructor to not 
1370         pass in a needsNotifications argument to DynamicNodeList, as it no longer
1371         takes one.
1372
1373         * dom/Node.cpp:
1374         (WebCore::Node::~Node): Decrement the document's nodeListCache count
1375         if we had a NodeListsNodeData cache and this is not the Document being
1376         destructor, as tagged by a null m_document.
1377         (WebCore::Node::childNodes): Increment the document's nodeListCache count 
1378         if we need create the NodeListsNodeData.
1379         (WebCore::Node::registerDynamicNodeList): Increment the document's nodeListCache count 
1380         if we need create the NodeListsNodeData.  Change to invalidate all the caches, instead 
1381         of just the ChildNodeList, if document has had no NodeListCaches.
1382         (WebCore::Node::unregisterDynamicNodeList): Change to remove the cache from the m_listsWithCaches
1383         set if it is owned by the NodeList and clear the m_nodeLists if it is empty.
1384         (WebCore::Node::notifyLocalNodeListsAttributeChanged): Move logic to 
1385         NodeListsNodeData::invalidateAttributeCaches and clear the cache pointer if it is empty.
1386         (WebCore::Node::notifyLocalNodeListsChildrenChanged): Move logic to 
1387         NodeListsNodeData::invalidateCaches and clear the cache pointer if it is empty.
1388         (WebCore::Node::notifyNodeListsChildrenChanged): Cleanup.
1389         (WebCore::Node::getElementsByName): Increment the document's nodeListCache count 
1390         if we need create the NodeListsNodeData.
1391         (WebCore::Node::getElementsByClassName): Increment the document's nodeListCache count 
1392         if we need create the NodeListsNodeData.
1393
1394         (WebCore::NodeListsNodeData::invalidateCaches): Added.
1395         (WebCore::NodeListsNodeData::invalidateAttributeCaches): Added.
1396         (WebCore::NodeListsNodeData::isEmpty): Added.
1397
1398         * dom/TagNodeList.cpp:
1399         (WebCore::TagNodeList::TagNodeList):
1400         Don't pass the needsNotifications argument to DynamicNodeList.
1401
1402 2008-03-18  Matt Lilek  <webkit@mattlilek.com>
1403
1404         Not reviewed, build fix.
1405
1406         * platform/network/curl/AuthenticationChallenge.h:
1407
1408 2008-03-18  Brent Fulgham  <bfulgham@gmail.com>
1409
1410         Reviewed by Adam Roben.
1411
1412         Provide some stub implementations for things that WebKit
1413         uses for performing authentication/challenge activities.  This
1414         is in support of http://bugs.webkit.org/show_bug.cgi?id=17837
1415
1416         * platform/network/ResourceHandle.h:
1417         * platform/network/curl/AuthenticationChallenge.h:
1418         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
1419         (WebCore::AuthenticationChallenge::sourceHandle):
1420
1421 2008-03-18  Eric Seidel  <eric@webkit.org>
1422
1423         Reviewed by Oliver.
1424
1425         Fix SVGImage crash seen once, and obvious via code inspection.
1426         
1427         I was not able to find a test case for this.
1428
1429         * svg/graphics/SVGImage.cpp:
1430         (WebCore::SVGImage::setContainerSize):
1431         (WebCore::SVGImage::usesContainerSize):
1432         (WebCore::SVGImage::hasRelativeWidth):
1433         (WebCore::SVGImage::hasRelativeHeight):
1434
1435 2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
1436
1437         Fix Qt build after r31123.
1438
1439         Add PluginView methods to TemporaryLinkStubs.
1440
1441         * platform/qt/TemporaryLinkStubs.cpp:
1442
1443 2008-03-18  Sam Weinig  <sam@webkit.org>
1444
1445         Reviewed by Darin Adler.
1446
1447         - Speed up JavaScript prototype and constructor object creation
1448           using a static Identifier in the self() methods to avoid the
1449           cost of creating one from a c-string each time.
1450
1451         5% speedup for Acid3 test 26
1452
1453         * bindings/scripts/CodeGeneratorJS.pm:
1454
1455 2008-03-18  Antti Koivisto  <antti@apple.com>
1456
1457         Reviewed by Mark Rowe.
1458
1459         Enable preloading for other platforms besides Mac.
1460
1461         * GNUmakefile.am:
1462         * WebCore.pro:
1463         * WebCore.vcproj/WebCore.vcproj:
1464         * WebCoreSources.bkl:
1465         * html/HTMLTokenizer.cpp:
1466         * html/HTMLTokenizer.h:
1467         * html/PreloadScanner.cpp:
1468         (WebCore::PreloadScanner::tokenize):
1469
1470 2008-03-18  Dan Bernstein  <mitz@apple.com>
1471
1472         Reviewed by Adele Peterson.
1473
1474         - fix <rdar://problem/5805127> REGRESSION (r31116): Assertion failure (floatIndex < floats.size()) in RenderBlock::determineStartPosition() at digg.com
1475
1476         Test: fast/dynamic/floating-to-positioned.html
1477
1478         * rendering/RenderObject.cpp:
1479         (WebCore::RenderObject::setStyle): Added code to remove a float from
1480         object lists if its position property changes to something other than
1481         static, since then it ceases to be a float.
1482
1483 2008-03-18  Adam Roben  <aroben@apple.com>
1484
1485         Windows build fix after r31123
1486
1487         * plugins/win/PluginViewWin.cpp: Add back MozillaUserAgent.
1488
1489 2008-03-18  Dan Bernstein  <mitz@apple.com>
1490
1491         Reviewed by Darin Adler.
1492
1493         - eliminate RenderFlow::m_clear
1494
1495         * rendering/RenderBlock.cpp:
1496         (WebCore::RenderBlock::layoutBlock): Removed code to set m_clear.
1497         (WebCore::RenderBlock::newLine): Added a 'clear' parameter.
1498         * rendering/RenderBlock.h:
1499         * rendering/RenderFlow.h:
1500         (WebCore::RenderFlow::RenderFlow): Removed initialization of m_clear.
1501         * rendering/bidi.cpp:
1502         (WebCore::RenderBlock::layoutInlineChildren): Added a local 'clear'
1503         variable, passing a pointer to it to findNextLineBreak() and its value
1504         to newLine(). 
1505         (WebCore::RenderBlock::findNextLineBreak): Added a 'clear' parameter,
1506         which this method adjusts when it encounters a <br>.
1507
1508 2008-03-18  Simon Hausmann  <hausmann@webkit.org>
1509
1510         Reviewed by Holger.
1511
1512         Fix the Qt build and clean up the invoke mechanism for dispatching
1513         functions in the main thread by using QMetaObject::invokeMethod
1514         instead of posting a null event.
1515
1516         * platform/qt/MainThreadQt.cpp:
1517
1518 2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
1519
1520         Fix Mac build from commit of r31123.
1521
1522         Add a typedef for NSView* to PlatformWidget, remove duplicate PluginMessageThrottlerWin definition.
1523
1524         * platform/Widget.h:
1525         * WebCore.vcproj/WebCore.vcproj:
1526
1527 2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
1528
1529         Reviewed by Jon Honeycutt.
1530
1531         Add PluginView.cpp and npapi.cpp to build files.
1532         Copy win/PluginViewWin.cpp to PluginView.cpp for shared code.
1533         Split Windows specific code out of PluginView.cpp.
1534         Add #if USE(NPOBJECT) around dependant code.
1535         Use npruntime_internal.h instead of npapi.h.
1536         Add PlatformWidget typedef to Widget.h.
1537         Update WidgetGtk.cpp for the PlatformWidget usage.
1538         Add needed methods to TemporaryLinkStubs for GTK+ port.
1539
1540         * GNUmakefile.am:
1541         * WebCore.pro:
1542         * WebCoreSources.bkl:
1543         * WebCore.vcproj/WebCore.vcproj:
1544         * plugins/win/PluginViewWin.cpp:
1545         * plugins/PluginView.cpp:
1546         * plugins/PluginView.h:
1547         * plugins/npapi.cpp:
1548         * platform/Widget.h:
1549         * platform/gtk/WidgetGtk.cpp:
1550         * platform/gtk/TemporaryLinkStubs.cpp:
1551
1552 2008-03-17  Darin Adler  <darin@apple.com>
1553
1554         Reviewed by Maciej.
1555
1556         - speed up document property fetching (eliminate the AtomicString
1557           objects made during document property lookup)
1558
1559         3% speedup for Acid3 test 26
1560
1561         * bindings/js/JSDOMWindowBase.cpp:
1562         (WebCore::JSDOMWindowBase::getOwnPropertySlot): Use AtomicString::find to
1563         locate the AtomicString, only if already present. Also call the new faster
1564         versions of the hasNamedItem and hasElementWithId functions that don't
1565         ref/deref the AtomicStringImpl, get inlined, etc.
1566         * bindings/js/JSHTMLDocumentCustom.cpp:
1567         (WebCore::JSHTMLDocument::canGetItemsForName): Ditto.
1568         (WebCore::writeHelper): Use a Vector instead of a String to build up
1569         the string to avoid the bad performance of string append.
1570
1571         * dom/Document.cpp: Tweaked code and comments a bit. Nothing substantive.
1572         * dom/Document.h: Added new hasElementWithId function that's faster than
1573         getElementById because it doesn't ref/deref the AtomicStringImpl*, gets
1574         inlined, doesn't have to handle the 0 case, and doesn't try to return the
1575         element pointer (just a boolean).
1576
1577         * html/HTMLAppletElement.cpp:
1578         (WebCore::HTMLAppletElement::parseMappedAttribute): Use AtomicString
1579         consistently. Also renamed the data member for clarity.
1580         (WebCore::HTMLAppletElement::insertedIntoDocument): Ditto.
1581         (WebCore::HTMLAppletElement::removedFromDocument): Ditto.
1582         * html/HTMLAppletElement.h: Ditto.
1583
1584         * html/HTMLDocument.cpp:
1585         (WebCore::addItemToMap): Use AtomicString instead of String.
1586         (WebCore::removeItemFromMap): Ditto.
1587         (WebCore::HTMLDocument::addNamedItem): Updated for member name change.
1588         (WebCore::HTMLDocument::removeNamedItem): Ditto.
1589         (WebCore::HTMLDocument::addExtraNamedItem): Ditto.
1590         (WebCore::HTMLDocument::removeExtraNamedItem): Ditto.
1591         (WebCore::HTMLDocument::clear): Added. Moved code here from the JavaScript
1592         bindings. If we're going to have an empty placeholder function, there's no
1593         reason to have it in the bindings instead of here.
1594         * html/HTMLDocument.h: Added clear. Changed the named item function
1595         arguments to AtomicString insted of String. Changed the NameCountMap to
1596         use AtomicStringImpl* instead of StringImpl*. Renamed the data members
1597         to add a m_ prefix and remove the needless doc prefix. Added hasNamedItem
1598         and hasExtraNamedItem functions that are inlined and faster than the old
1599         idiom because they doesn't ref/deref the AtomicStringImpl*, get inlined,
1600         and don't have to handle the 0 case.
1601         * html/HTMLDocument.idl: Removed the [Custom] attribute on clear and took
1602         it out of the JavaScript-specific section.
1603
1604         * html/HTMLEmbedElement.cpp:
1605         (WebCore::HTMLEmbedElement::parseMappedAttribute): Use AtomicString
1606         consistently. Also renamed the data member for clarity.
1607         (WebCore::HTMLEmbedElement::insertedIntoDocument): Ditto.
1608         (WebCore::HTMLEmbedElement::removedFromDocument): Ditto.
1609         * html/HTMLFormElement.cpp:
1610         (WebCore::HTMLFormElement::insertedIntoDocument): Ditto.
1611         (WebCore::HTMLFormElement::removedFromDocument): Ditto.
1612         (WebCore::HTMLFormElement::parseMappedAttribute): Ditto.
1613         * html/HTMLFormElement.h: Ditto.
1614
1615         * html/HTMLFrameElementBase.cpp:
1616         (WebCore::HTMLFrameElementBase::openURL): Renamed m_name to m_frameName for
1617         clarity, since the frame name is not the same as the name attribute.
1618         (WebCore::HTMLFrameElementBase::parseMappedAttribute): Ditto.
1619         (WebCore::HTMLFrameElementBase::setNameAndOpenURL): Ditto.
1620         * html/HTMLFrameElementBase.h: Ditto.
1621
1622         * html/HTMLIFrameElement.cpp:
1623         (WebCore::HTMLIFrameElement::parseMappedAttribute): Use AtomicString
1624         consistently. Also renamed the data member for clarity.
1625         (WebCore::HTMLIFrameElement::insertedIntoDocument): Ditto.
1626         (WebCore::HTMLIFrameElement::removedFromDocument): Ditto.
1627         * html/HTMLIFrameElement.h: Ditto.
1628         * html/HTMLImageElement.cpp:
1629         (WebCore::HTMLImageElement::parseMappedAttribute): Ditto.
1630         (WebCore::HTMLImageElement::insertedIntoDocument): Ditto.
1631         (WebCore::HTMLImageElement::removedFromDocument): Ditto.
1632         * html/HTMLImageElement.h: Ditto.
1633         * html/HTMLObjectElement.cpp:
1634         (WebCore::HTMLObjectElement::parseMappedAttribute): Ditto.
1635         (WebCore::HTMLObjectElement::insertedIntoDocument): Ditto.
1636         (WebCore::HTMLObjectElement::removedFromDocument): Ditto.
1637         (WebCore::HTMLObjectElement::updateDocNamedItem): Ditto.
1638         * html/HTMLObjectElement.h: Ditto.
1639
1640         * html/HTMLParamElement.cpp:
1641         (WebCore::HTMLParamElement::isURLAttribute): Use equalIgnoringCase instead
1642         of callling lower().
1643
1644         * html/HTMLPlugInElement.h: Changed the type of m_name. The code that
1645         uses this is in HTMLAppletElement, HTMLEmbedElement, and HTMLObjectElement.
1646
1647         * platform/text/AtomicString.cpp:
1648         (WebCore::equal): Moved to an inline so we can share this code between a
1649         few different functions. It could move to a header too if we want to use
1650         it elsewhere.
1651         (WebCore::UCharBufferTranslator::equal): Change to use inline.
1652         (WebCore::HashAndCharactersTranslator::hash): Added.
1653         (WebCore::HashAndCharactersTranslator::equal): Added.
1654         (WebCore::HashAndCharactersTranslator::translate): Added.
1655         (WebCore::AtomicString::add): Improved the Identifier and UString overloads
1656         to use the already-computed hash code instead of rehashing the string.
1657         (WebCore::AtomicString::find): Added.
1658         * platform/text/AtomicString.h: Added a find function so we can avoid
1659         allocating memory just to look up a string in an atomic string set or map.
1660
1661         * platform/text/StringImpl.h: Added declarations needed for the
1662         AtomicString changes.
1663
1664 2008-03-17  Timothy Hatcher  <timothy@apple.com>
1665
1666         Reviewed by Mark Rowe.
1667
1668         Bug 17908: Various bugs in the Console completion code
1669         http://bugs.webkit.org/show_bug.cgi?id=17908
1670
1671         * page/inspector/ConsolePanel.js:
1672         (WebInspector.ConsolePanel.complete): Moved the code that checked for the caret being at the end
1673         of the prompt into the _caretAtEndOfPrompt helper function.
1674         (WebInspector.ConsolePanel.messagesSelectStart): Clear and redo the auto complete when the selection changes.
1675         (WebInspector.ConsolePanel._caretInsidePrompt): Fixed a logic error that always caused a false result.
1676         (WebInspector.ConsolePanel._caretAtEndOfPrompt): Added. Tests if the selection is a caret at the
1677         end of the prompt.
1678         (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Changed the offset to use the childNodes length.
1679         This makes sure the caret is at the end when there are multiple text nodes in the prompt.
1680
1681 2008-03-17  Dan Bernstein  <mitz@apple.com>
1682
1683         Rubber-stamped by Dave Hyatt.
1684
1685         - FloatingObject cleanup
1686
1687         Renamed FloatingObject's data members as follows: node -> m_renderer,
1688         startY -> m_top, endY -> m_bottom, left -> m_left, width -> m_width,
1689         and noPaint -> !m_shouldPaint, reversing the meaning of the flag.
1690
1691         Also addressed the FIXME in RenderBlock::containsFloat().
1692
1693         * rendering/RenderBlock.cpp:
1694         (WebCore::RenderBlock::repaintOverhangingFloats):
1695         (WebCore::RenderBlock::paintFloats):
1696         (WebCore::RenderBlock::insertFloatingObject):
1697         (WebCore::RenderBlock::removeFloatingObject):
1698         (WebCore::RenderBlock::positionNewFloats):
1699         (WebCore::RenderBlock::leftRelOffset):
1700         (WebCore::RenderBlock::rightRelOffset):
1701         (WebCore::RenderBlock::nextFloatBottomBelow):
1702         (WebCore::RenderBlock::floatBottom):
1703         (WebCore::RenderBlock::floatRect):
1704         (WebCore::RenderBlock::lowestPosition):
1705         (WebCore::RenderBlock::rightmostPosition):
1706         (WebCore::RenderBlock::leftmostPosition):
1707         (WebCore::RenderBlock::leftBottom):
1708         (WebCore::RenderBlock::rightBottom):
1709         (WebCore::RenderBlock::clearFloats):
1710         (WebCore::RenderBlock::addOverhangingFloats):
1711         (WebCore::RenderBlock::addIntrudingFloats):
1712         (WebCore::RenderBlock::containsFloat): Changed to return false if the
1713         floats lists exists but is empty, since line layout code no longer
1714         relies on the buggy behavior.
1715         (WebCore::RenderBlock::nodeAtPoint):
1716         (WebCore::RenderBlock::adjustForBorderFit):
1717         * rendering/RenderBlock.h:
1718         (WebCore::RenderBlock::containsFloats):
1719         (WebCore::RenderBlock::FloatingObject::FloatingObject):
1720         * rendering/bidi.cpp:
1721         (WebCore::RenderBlock::layoutInlineChildren):
1722         (WebCore::RenderBlock::matchedEndLine):
1723
1724 2008-03-17  Dan Bernstein  <mitz@apple.com>
1725
1726         Reviewed by Dave Hyatt.
1727
1728         - allow incremental relayout of blocks that contain floats
1729
1730         Tests: fast/repaint/line-flow-with-floats-[1-9].html
1731
1732         * rendering/RenderBlock.cpp:
1733         (WebCore::RenderBlock::clearFloatsIfNeeded): Cleaned up by moving most
1734         of the function body out of an if statement which was replaced with an
1735         early return.
1736         (WebCore::RenderBlock::insertFloatingObject): Cleaned up by moving most
1737         of the function body out of an if statement and moving the ASSERT, which
1738         is a crash in release builds, to the beginning. Made this function set
1739         the m_isDescendant flag of floating objects it creates.
1740         (WebCore::RenderBlock::removeFloatingObject): Added a call to
1741         markLinesDirtyInVerticalRange() when removing a float from a block with
1742         inline children.
1743         (WebCore::RenderBlock::markLinesDirtyInVerticalRange): Added. Marks the
1744         lines in the given range as dirty.
1745         (WebCore::RenderBlock::clearFloats): Added code to detect changes to
1746         the geometry of floats intruding into this block from other blocks and
1747         mark any lines whose available width has changed as a result as dirty.
1748
1749         * rendering/RenderBlock.h:
1750         (WebCore::RenderBlock::FloatWithRect::FloatWithRect): Added a structure
1751         to cache a float with its position and size.
1752         (WebCore::RenderBlock::FloatingObject::FloatingObject): Added an
1753         m_isDescendant flag, used by clearFloats() to distinguish between floats
1754         entering the block from outside and floats internal to the block.
1755
1756         * rendering/RootInlineBox.h:
1757         (WebCore::RootInlineBox::floats): Added.
1758         (WebCore::RootInlineBox::floatsPtr): Added.
1759         (WebCore::RootInlineBox::Overflow::Overflow): Added a data member to
1760         hold the floats originating on the line.
1761
1762         * rendering/bidi.cpp:
1763         (WebCore::RenderBlock::layoutInlineChildren): Made the existence of
1764         floats not force a full layout. Changed to cache the geometry of floats
1765         in the block and detect changes to it. If a float's size or position
1766         changes, all lines from that point on are treated as dirty. An exception
1767         is a change in the dimensions of a float on an otherwise-clean line,
1768         which only dirties lines potentially affected by the change (see
1769         determineStartPosition()). Added code to update each RootInlineBox's
1770         set of floats as lines are laid out. Added code to shift floats
1771         belonging to clean lines in the end along with the lines.
1772         (WebCore::RenderBlock::determineStartPosition): Made this function look
1773         for changes to floats' dimensions and mark lines as dirty accordingly.
1774         Also look for new floats and if found, cause a full layout. Added code
1775         to re-add floats belonging to clean lines.
1776         (WebCore::RenderBlock::matchedEndLine): Added checking that the clean
1777         lines in the end can be shifted vertically as needed, i.e. that the
1778         available width along the way is uniform.
1779
1780 2008-03-17  Eric Seidel  <eric@webkit.org>
1781
1782         Reviewed by darin.
1783
1784         Fix _NPN_IntFromIdentifier (and export the symbol for use!)
1785
1786         Test: plugins/netscape-identifier-conversion.html
1787
1788         * WebCore.NPAPI.exp:
1789         * bridge/npruntime.cpp:
1790         (_NPN_IntFromIdentifier):
1791
1792 2008-03-17  Sam Weinig  <sam@webkit.org>
1793
1794         Reviewed by Dan Bernstein.
1795
1796         Add HTMLCollection constructor to the Window object. (Omission noticed by Harri Porten)
1797
1798         * page/DOMWindow.idl: 
1799
1800 2008-03-17  Holger Hans Peter Freyther  <zecke@selfish.org>
1801
1802         Unreviewed Gtk+ build fix.
1803
1804         * platform/gtk/ScrollViewGtk.cpp: remove const
1805
1806 2008-03-17  Julien Chaffraix  <julien.chaffraix@gmail.com>
1807
1808         Reviewed by Holger.
1809
1810         <http://bugs.webkit.org/show_bug.cgi?id=17754>
1811
1812         - Implement ResourceHandle::loadResourceSynchronously to dispatch synchronous
1813           requests.
1814
1815         - Implement WebCoreSynchronousLoader, the ResourceHandleClient which holds
1816           the network data, response and error for us during the transfert.
1817
1818         * platform/network/ResourceHandleInternal.h: Remove trailing white space.
1819         * platform/network/curl/ResourceHandleCurl.cpp: Add WebCoreSynchronousLoader
1820         (WebCore::WebCoreSynchronousLoader::resourceResponse):
1821         (WebCore::WebCoreSynchronousLoader::resourceError):
1822         (WebCore::WebCoreSynchronousLoader::data):
1823         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
1824         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
1825         (WebCore::WebCoreSynchronousLoader::didReceiveData):
1826         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
1827         (WebCore::WebCoreSynchronousLoader::didFail):
1828         (WebCore::ResourceHandle::loadResourceSynchronously): Implement method
1829         using WebCoreSynchronousLoader.
1830
1831         * platform/network/curl/ResourceHandleManager.cpp:
1832         (WebCore::ResourceHandleManager::dispatchSynchronousJob):
1833         (WebCore::ResourceHandleManager::startJob):
1834         (WebCore::ResourceHandleManager::initializeHandle): Handle initialization
1835         method used both for synchronous and asynchronous job.
1836
1837         * platform/network/curl/ResourceHandleManager.h:
1838
1839 2008-03-17  Darin Adler  <darin@apple.com>
1840
1841         - try to fix GTK build
1842
1843         * platform/ScrollView.h: Make setGtkAdjustments adjustment.
1844         And non-virtual (why was it virtual?).
1845
1846 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
1847
1848         Fix Bug 17898: Split PluginMessageThrottlerWin into its own files
1849
1850         <http://bugs.webkit.org/show_bug.cgi?id=17898>
1851
1852         Move the PluginMessageThrottlerWin class into its own files, in
1853         preparation for refactoring PluginView code to be shared.
1854
1855         Reviewed and tweaked by Adam Roben.
1856
1857         * WebCore.vcproj/WebCore.vcproj:
1858         * plugins/PluginView.h:
1859         * plugins/win/PluginMessageThrottlerWin.cpp: Added.
1860         * plugins/win/PluginMessageThrottlerWin.h: Added.
1861         * plugins/win/PluginViewWin.cpp:
1862
1863 2008-03-17  Adam Roben  <aroben@apple.com>
1864
1865         More Windows build fixes after r31098
1866
1867         * platform/ScrollView.h: Make some more methods public.
1868
1869 2008-03-17  Adam Roben  <aroben@apple.com>
1870
1871         Windows and Qt build fixes after r31098
1872
1873         * platform/ScrollView.h: Mark methods public that still need to be so.
1874
1875 2008-03-16  Timothy Hatcher  <timothy@apple.com>
1876
1877         Reviewed by Darin Adler.
1878
1879         Bug 17883: Console completion should support bracket notation
1880         http://bugs.webkit.org/show_bug.cgi?id=17883
1881
1882         Also fixes a bug where the Inspector's window object was used instead of the
1883         inspected window object.
1884
1885         * page/inspector/ConsolePanel.js:
1886         (WebInspector.ConsolePanel.complete): Add a comment about the _backwardsRange call.
1887         (WebInspector.ConsolePanel.completions): Add a comment about the _backwardsRange call.
1888         Check the last character of the expression for a dot or bracket. Fallback
1889         to the InspectorController.inspectedWindow() instead of window, this was a bad bug.
1890         If the expression caused an exception, just consider the prefix a window property.
1891         When bracket notation is used remember what quote was used and compared property names
1892         with that quote surrounding it. Also escape the property name for the quote and backslash.
1893
1894 2008-03-17  Robert Blaut  <webkit@blaut.biz>
1895
1896         Reviewed by Darin.
1897
1898         Fix for bug http://bugs.webkit.org/show_bug.cgi?id=17696
1899         Set default margin-bottom for form element in quirk mode
1900         and be compatible with Gecko.
1901
1902         Tests: fast/css/margin-bottom-form-element-quirk.html
1903                fast/css/margin-bottom-form-element-strict.html
1904
1905         * css/html4.css:
1906         * css/quirks.css:
1907
1908 2008-03-17  Antti Koivisto  <antti@apple.com>
1909
1910         Reviewed by Darin.
1911
1912         Speculative fix for http://bugs.webkit.org/show_bug.cgi?id=17878
1913         Bug 17878: REGRESSION: Acid3 sometimes crashes Webkit under WebCore::Loader::Host::cancelRequests
1914         
1915         I can't reproduce the crash or make a test case for this one but I'm pretty sure this
1916         is the problem. Essentially the same bug as http://bugs.webkit.org/show_bug.cgi?id=17862
1917         except in didFail() instead of didFinishLoading().
1918
1919         * loader/loader.cpp:
1920         (WebCore::Loader::Host::didFail):
1921
1922 2008-03-17  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1923
1924         Reviewed and tweaked by Darin.
1925
1926         http://bugs.webkit.org/show_bug.cgi?id=17172
1927         Refactor platform checks in ScrollView.h
1928
1929         * platform/ScrollView.h: Change #ifs around.
1930
1931 2008-03-17  Yuzhu Shen  <yuzhu.shen@gmail.com>
1932
1933         Reviewed by Darin.
1934
1935         Fix the bug: http://bugs.webkit.org/show_bug.cgi?id=17760
1936         It is necessary to load the image even when src="".
1937
1938         Test: fast/images/load-img-with-empty-src.html
1939
1940         * html/HTMLImageLoader.cpp:
1941         (WebCore::HTMLImageLoader::updateFromElement): isNull rather than isEmpty.
1942
1943 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
1944
1945         Fix GTK+ build from r31094.
1946
1947         * plugins/gtk/PluginDatabaseGtk.cpp:
1948         (PluginDatabase::getPluginsInPaths):
1949
1950 2008-03-17  Adam Roben  <aroben@apple.com>
1951
1952         Fix Bug 17876: REGRESSION (r31060): Attempting to visit Ofcom page causes crash
1953
1954         <http://bugs.webkit.org/show_bug.cgi?id=17876>
1955
1956         Reviewed by John.
1957
1958         Test: fast/dom/remove-named-attribute-crash.html
1959
1960         * dom/NamedAttrMap.cpp:
1961         (WebCore::NamedAttrMap::removeAttribute): Store the Attribute we're
1962         going to remove from the m_attributes Vector in a RefPtr so it doesn't
1963         get deleted when it is removed from the Vector.
1964
1965 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
1966
1967         Reviewed by Adam Roben.
1968
1969         Implement PluginDatabase for GTK+ with PluginDatabaseGtk.cpp.
1970         Remove implemented methods from TemporaryLinkStubs.
1971
1972         * GNUmakefile.am:
1973         * plugins/gtk:
1974         * plugins/gtk/PluginDatabaseGtk.cpp:
1975         * platform/gtk/TemporaryLinkStubs.cpp:
1976
1977 2008-03-17  Simon Hausmann  <hausmann@webkit.org>
1978
1979         Fix the Qt build.
1980
1981         * platform/text/qt/TextCodecQt.cpp:
1982         (WebCore::TextCodecQt::encode):
1983         * platform/text/qt/TextCodecQt.h:
1984
1985 2008-03-16  Maciej Stachowiak  <mjs@apple.com>
1986
1987         Not reviewed, just fixing an incomplete comment from the last commit.
1988
1989         * dom/Range.cpp:
1990         (WebCore::Range::surroundContents):
1991
1992 2008-03-16  Maciej Stachowiak  <mjs@apple.com>
1993
1994         Reviewed by Darin.
1995
1996         - fixed "Acid3 expects different exceptions for surroundContents calls involving comment nodes (affects Acid3 test 11)"
1997         http://bugs.webkit.org/show_bug.cgi?id=17509
1998         
1999         This gets us to 92/100
2000
2001         * dom/Range.cpp:
2002         (WebCore::Range::surroundContents): Check for
2003         HIERARCHY_REQUEST_ERR before BAD_BOUNDARYPOINTS_ERR, since Acid3
2004         expects exceptional conditions to be tested in the order that the
2005         spec lists them. Also, adjust the HIERARCHY_REQUEST_ERR check. If
2006         the start point of the range is in a comment node, the node that
2007         would be the parent of a partial replacement is actually the
2008         comment node's parent (since comment nodes have character
2009         indices), so we should do the HIERARCHY_REQUEST_ERR check based on
2010         the parent of the comment node, as for text nodes, even though it
2011         will fail later with a different exception because it is not
2012         allowed to surround a partially selected non-text node.
2013
2014 2008-03-16  Marvin Decker  <marv.decker@gmail.com>
2015
2016         Reviewed by Darin.
2017
2018         Fix bug 15119: URL query characters that are unencodable in the
2019         request's character set should be converted to XML entities with
2020         non-alphanumeric characters escaped.
2021
2022         Test: http/tests/uri/escaped-entity.html
2023
2024         * html/FormDataList.cpp:
2025         (WebCore::FormDataList::appendString):
2026         * html/HTMLFormElement.cpp:
2027         (WebCore::HTMLFormElement::formData):
2028         * platform/KURL.cpp:
2029         (WebCore::encodeRelativeString):
2030         * platform/text/String.cpp:
2031         (WebCore::String::latin1):
2032         (WebCore::String::utf8):
2033         * platform/text/TextCodec.cpp:
2034         (WebCore::TextCodec::unencodableCharReplacement):
2035         * platform/text/TextCodec.h:
2036         (WebCore::):
2037         * platform/text/TextCodecICU.cpp:
2038         (WebCore::urlEscapedEntityCallback):
2039         (WebCore::gbkUrlEscapedEntityCallack):
2040         (WebCore::TextCodecICU::encode):
2041         * platform/text/TextCodecICU.h:
2042         (WebCore::TextCodecICU::setNeedsGBKFallbacks):
2043         * platform/text/TextCodecLatin1.cpp:
2044         (WebCore::encodeComplexWindowsLatin1):
2045         (WebCore::TextCodecLatin1::encode):
2046         * platform/text/TextCodecLatin1.h:
2047         * platform/text/TextCodecUTF16.cpp:
2048         (WebCore::TextCodecUTF16::encode):
2049         * platform/text/TextCodecUTF16.h:
2050         * platform/text/TextCodecUserDefined.cpp:
2051         (WebCore::encodeComplexUserDefined):
2052         (WebCore::TextCodecUserDefined::encode):
2053         * platform/text/TextCodecUserDefined.h:
2054         * platform/text/TextEncoding.cpp:
2055         (WebCore::TextEncoding::encode):
2056         * platform/text/TextEncoding.h:
2057         * platform/text/mac/TextCodecMac.cpp:
2058         (WebCore::TextCodecMac::encode):
2059         * platform/text/mac/TextCodecMac.h:
2060         * xml/XMLHttpRequest.cpp:
2061         (WebCore::XMLHttpRequest::send):
2062
2063 2008-03-16  Kevin Ollivier  <kevino@theolliviers.com>
2064
2065         Rubber stamped by Darin.
2066
2067         Add set-webkit-configuration support for wx port, and centralize
2068         build dir location setting.
2069
2070         http://bugs.webkit.org/show_bug.cgi?id=17790
2071
2072         * webcore-base.bkl:
2073
2074 2008-03-16  Darin Adler  <darin@apple.com>
2075
2076         Reviewed by Mark Rowe.
2077
2078         - http://bugs.webkit.org/show_bug.cgi?id=17881
2079           a little cleanup for HTMLTextAreaElement
2080
2081         Tests: fast/forms/textarea-default-value-leading-newline.html
2082                fast/forms/textarea-linewrap-dynamic.html
2083
2084         * html/HTMLTextAreaElement.cpp:
2085         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Tweaked names/
2086         (WebCore::HTMLTextAreaElement::selectionStart): Ditto, also use early return
2087         and check for < 0 rather than -1 specifically.
2088         (WebCore::HTMLTextAreaElement::selectionEnd): Ditto.
2089         (WebCore::HTMLTextAreaElement::setSelectionStart): Early return.
2090         (WebCore::HTMLTextAreaElement::setSelectionEnd): Ditto.
2091         (WebCore::HTMLTextAreaElement::select): Ditto.
2092         (WebCore::HTMLTextAreaElement::setSelectionRange): Ditto.
2093         (WebCore::HTMLTextAreaElement::parseMappedAttribute): Changed value parsing
2094         to treat unknown values as meaning "default" rather than "leave value as-is".
2095         Only call setNeedsLayoutAndPrefWidthsRecalc when mode changed.
2096         (WebCore::HTMLTextAreaElement::createRenderer): Removed name of unused argument.
2097         (WebCore::HTMLTextAreaElement::appendFormData): Updated for name changes.
2098         (WebCore::HTMLTextAreaElement::isKeyboardFocusable): Got rid of unnneeded explicit
2099         class name in isFocusable call.
2100         (WebCore::HTMLTextAreaElement::isMouseFocusable): Ditto.
2101         (WebCore::HTMLTextAreaElement::updateFocusAppearance): Tweaked formatting.
2102         (WebCore::HTMLTextAreaElement::defaultEventHandler): Ditto.
2103         (WebCore::HTMLTextAreaElement::updateValue): Early return.
2104         (WebCore::HTMLTextAreaElement::setValue): Got rid of intermediate value to
2105         eliminate on small refcount churn.
2106         (WebCore::HTMLTextAreaElement::defaultValue): Got rid of unneeded redundant
2107         string length checks, since String already checks all indexing and returns 0.
2108         (WebCore::HTMLTextAreaElement::setDefaultValue): Added code to normalize
2109         line endings and add a leading line ending to fix cases where the first
2110         character is a newline.
2111         (WebCore::HTMLTextAreaElement::accessKeyAction): Removed name of unused arg.
2112         (WebCore::HTMLTextAreaElement::accessKey): Changed return value to avoid
2113         refcount churn.
2114         (WebCore::HTMLTextAreaElement::selection): Updated names and use < 0 instead
2115         of -1 specifically.
2116
2117         * html/HTMLTextAreaElement.h: Replaced wrap function with more-specific
2118         shouldWrapText one. Changed return value of accessKey. Made WrapMethod enum
2119         provate and renamed the values. Renamed cachedSelStart and cachedSelEnd to
2120         m_cachedSelectionStart and m_cachedSelectionEnd.
2121
2122         * rendering/RenderTextControl.cpp:
2123         (WebCore::RenderTextControl::createInnerTextStyle): Updated for change to
2124         HTMLTextAreaElement wrap function.
2125
2126 2008-03-16  Antti Koivisto  <antti@apple.com>
2127
2128         Reviewed by Mitz.
2129
2130         Fix http/tests/security/frame-loading-via-document-write.html
2131         which was broken by the preload patch.
2132         
2133         Don't print error message when preload fails local file security check.
2134         Some minor refactoring.
2135
2136         * html/PreloadScanner.cpp:
2137         (WebCore::PreloadScanner::emitTag):
2138         (WebCore::PreloadScanner::emitCSSRule):
2139         * loader/Cache.cpp:
2140         (WebCore::Cache::requestResource):
2141         * loader/Cache.h:
2142         * loader/DocLoader.cpp:
2143         (WebCore::DocLoader::requestResource):
2144         (WebCore::DocLoader::preload):
2145         (WebCore::DocLoader::printPreloadStats):
2146         * loader/DocLoader.h:
2147
2148 2008-03-16  Antti Koivisto  <antti@apple.com>
2149
2150         Reviewed by Darin.
2151         
2152         Fix http://bugs.webkit.org/show_bug.cgi?id=17862
2153         REGRESSION (r31038): Reproducible crash under DocLoader::checkForReload() at marware.com
2154         
2155         This was a memory smasher introduced by the preloading patch. 
2156         If a script resource was marked uncacheable, early deletion of the 
2157         Request object would cause deletion of the CachedResource too if
2158         it was referred more than once in a single document.
2159
2160         Test: http/tests/misc/uncacheable-script-repeated.html
2161
2162         * loader/loader.cpp:
2163         (WebCore::Loader::Host::servePendingRequests):
2164         (WebCore::Loader::Host::didFinishLoading):
2165
2166 2008-03-16  Yuzhu Shen  <yuzhu.shen@gmail.com>
2167
2168         Reviewed by Darin.
2169
2170         Fix bug http://bugs.webkit.org/show_bug.cgi?id=17714
2171         <img href="#"> should go to top of the page.
2172
2173         Test: fast/html/empty-fragment-id-goto-top.html
2174
2175         * loader/FrameLoader.cpp:
2176         (WebCore::FrameLoader::gotoAnchor):
2177
2178 2008-03-16  Thiago Macieira  <thiago.macieira@trolltech.com>
2179
2180         Reviewed by Darin.
2181
2182         Don't use RefPtr in classes you haven't seen the implementation of.
2183
2184         Forward-declaration and declaration of RefPtr<Foo> is ok. But you
2185         cannot *use* said objects until Foo is defined. This is true even for
2186         initialisation with a 0.
2187
2188         Seems the HP aCC compiler is more strict here than gcc.
2189
2190         * editing/SplitTextNodeCommand.h:
2191         * page/FrameTree.h:
2192         * xml/XPathExpressionNode.h:
2193
2194 2008-03-16  Darin Adler  <darin@apple.com>
2195
2196         Reviewed by Mitz.
2197
2198         - fix http://bugs.webkit.org/show_bug.cgi?id=14941
2199           <rdar://problem/5404093> textarea value from JavaScript includes extra newline
2200
2201         Test: fast/forms/textarea-trailing-newline.html
2202
2203         * rendering/RenderTextControl.cpp:
2204         (WebCore::RenderTextControl::finishText): Added code to strip the trailing
2205         newline. It's possible there are some obscure cases where this is not wanted,
2206         but I couldn't find any. If someone finds a case where this is bad, we can
2207         make the code conditional.
2208
2209 2008-03-16  Darin Adler  <darin@apple.com>
2210
2211         Reviewed by Mitz.
2212
2213         - fix http://bugs.webkit.org/show_bug.cgi?id=17876
2214           Attempting to visit Ofcom page causes crash
2215
2216         This is causing intermittent crashes on some existing test cases on the buildbot
2217         too; I don't have a 100% test case right now, but it should be easy to add one later
2218         and this does fix a crash in a test we already have.
2219
2220         * dom/CharacterData.cpp:
2221         (WebCore::CharacterData::CharacterData): Initialize m_data to the empty string,
2222         not the null string. The class assumes the string can never being null.
2223         (WebCore::CharacterData::setData): If asked to set the data to the null string,
2224         set it to the empty string instead. This matches what the (non-empty) constructor
2225         has always done.
2226
2227 2008-03-15  Timothy Hatcher  <timothy@apple.com>
2228
2229         Reviewed by Adam Roben.
2230
2231         Bug 17870: Web Inspector console should feel more like a terminal
2232         http://bugs.webkit.org/show_bug.cgi?id=17870
2233
2234         Bug 14390: Console input area should be more noticeable
2235         http://bugs.webkit.org/show_bug.cgi?id=14390
2236         <rdar://5712831>
2237
2238         Bug 17237: Inspector should tab-complete object properties in the Console
2239         http://bugs.webkit.org/show_bug.cgi?id=17237
2240         <rdar://5732842>
2241
2242         Adds tab completion, auto completion and a blended input prompt.
2243         The prompt is also focused when the console is shown.
2244            Implements a new look, that will be part of the UI refresh.
2245
2246         * page/inspector/ConsolePanel.js: 
2247         (WebInspector.ConsolePanel): Renamed a few properties.
2248         (WebInspector.ConsolePanel.get/set promptText): Property to set
2249         and get the current prompt text. Does not affect command history.
2250         (WebInspector.ConsolePanel.show): Make the prompt focus on show.
2251         (WebInspector.ConsolePanel.acceptAutoComplete): Accepts any
2252         pending auto complete text.
2253         (WebInspector.ConsolePanel.clearAutoComplete): Cancels any pending
2254         auto complete text.
2255         (WebInspector.ConsolePanel.autoCompleteSoon): Sets a timeout to auto
2256         complete in 250 ms, only if there isn't a pending auto complete.
2257         (WebInspector.ConsolePanel.complete): 
2258         (WebInspector.ConsolePanel.completions): Generate a list of possible
2259         completions based on the prefix and the previous expression ranges.
2260         (WebInspector.ConsolePanel._backwardsRange): Helper to scan backwards
2261         from a node and offset to find a start node and offset of the first
2262         character found in the characters string.
2263         (WebInspector.ConsolePanel._evalInInspectedWindow): Helper to eval in the
2264         inspected window.
2265         (WebInspector.ConsolePanel._caretInsidePrompt): Returns true if the selection
2266         is collapsed and is inside the prompt element.
2267         (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Moves the selection
2268         to the end of the prompt.
2269         (WebInspector.ConsolePanel._onTabPressed): Calls complete on
2270         tab press.
2271         (WebInspector.ConsolePanel._onEnterPressed): Call clearAutoComplete so the
2272         autocompletion text is not evaluated.
2273
2274         * page/inspector/Images/errorIcon.png: New image.
2275         * page/inspector/Images/userInputIcon.png: Added.
2276         * page/inspector/Images/userInputPreviousIcon.png: Added.
2277         * page/inspector/Images/warningIcon.png: New image.
2278         * page/inspector/inspector.css: New refreshed UI.
2279
2280 2008-03-15  Mark Mentovai  <mark@moxienet.com>
2281
2282         Reviewed and landed by Darin.
2283
2284         - http://bugs.webkit.org/show_bug.cgi?id=17833
2285           use file extensions instead of explicit file types in WebCore's Xcode project
2286
2287         * WebCore.xcodeproj/project.pbxproj: Remove unnecessary
2288           uses of explicitFileType, preferring lastKnownFileType ("File Type:
2289           Default for File" in Xcode's File Info's General tab).  Files below
2290           that relied on an explicit file type setting other than what would
2291           be implied by their extensions have been renamed to have correct
2292           extensions.
2293         * bridge/jni/jni_jsobject.cpp: Removed.
2294         * bridge/jni/jni_jsobject.mm: Copied from bridge/jni/jni_jsobject.cpp.
2295         * loader/mac/LoaderNSURLExtras.m: Removed.
2296         * loader/mac/LoaderNSURLExtras.mm: Copied from loader/mac/LoaderNSURLExtras.m.
2297         * platform/mac/SharedTimerMac.cpp: Removed.
2298         * platform/mac/SharedTimerMac.mm: Copied from platform/mac/SharedTimerMac.cpp.
2299
2300 2008-03-15  Darin Adler  <darin@apple.com>
2301
2302         Reviewed by Sam.
2303
2304         - fix http://bugs.webkit.org/show_bug.cgi?id=11997
2305           Ranges are not fixed after mutation (affects Acid3 test 13)
2306
2307         Test: fast/dom/Range/mutation.html
2308
2309         * WebCore.xcodeproj/project.pbxproj: Added NodeWithIndex.h, NodeWithIndexAfter.h,
2310         and NodeWithIndexBefore.h.
2311
2312         * dom/CharacterData.cpp:
2313         (WebCore::CharacterData::setData): Replaced call to Document::removeMarkers
2314         with call to Document::textRemoved.
2315         (WebCore::CharacterData::insertData): Replaced call to Document::shiftMarkers
2316         with call to Document::textInserted.
2317         (WebCore::CharacterData::deleteData): Replaced call to Document::removeMarkers
2318         and Document::shiftMarkers with call to Document::textRemoved.
2319         (WebCore::CharacterData::replaceData): Replaced call to Document::removeMarkers
2320         and Document::shiftMarkers with call to Document::textRemoved and
2321         Document::textInserted.
2322         (WebCore::CharacterData::containsOnlyWhitespace): Tweaked a bit.
2323
2324         * dom/ContainerNode.cpp:
2325         (WebCore::ContainerNode::childrenChanged): Added a call to
2326         Document::nodeChildrenChanged when the nmber of children was changed (and not
2327         by the parser).
2328         (WebCore::dispatchChildRemovalEvents): Updated for name change.
2329
2330         * dom/Document.cpp:
2331         (WebCore::Document::~Document): Assert that all ranges are gone.
2332         (WebCore::Document::nodeChildrenChanged): Added. Calls nodeChildrenChanged on
2333         all ranges.
2334         (WebCore::Document::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
2335         Added code to call nodeWillBeRemoved on all ranges.
2336         (WebCore::Document::textInserted): Added. Calls textInserted on all ranges and
2337         also calls shiftMarkers.
2338         (WebCore::Document::textRemoved): Added. Calls textRemoved on all ranges and also
2339         calls removeMarkers and shiftMarkers.
2340         (WebCore::Document::textNodesMerged): Added. Calls textNodesMerged on all ranges.
2341         (WebCore::Document::textNodeSplit): Added. Calls textNodeSplit on all ranges.
2342         (WebCore::Document::attachRange): Added. Adds range to the HashSet of all ranges
2343         for this document.
2344         (WebCore::Document::detachRange): Added. Removes range from the HashSet.
2345         * dom/Document.h: Added the new functions and the data member.
2346
2347         * dom/Element.cpp:
2348         (WebCore::Element::normalizeAttributes): Added. Contains the part of the
2349         normalize function that's specific to Element. Better encapsulation to have it
2350         here rather than in Node::normalize.
2351         * dom/Element.h: Added the new function.
2352
2353         * dom/Node.cpp:
2354         (WebCore::Node::normalize): Rewrote so it's no longer recursive. Also added
2355         a call to textNodesMerged after each pair of nodes is merged but before the
2356         second node is removed.
2357         (WebCore::Node::traverseNextNodePostOrder): Added. Helper function used by
2358         normalize, but also useful elsewhere.
2359         * dom/Node.h: Added the new function.
2360
2361         * dom/NodeIterator.cpp:
2362         (WebCore::NodeIterator::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
2363         * dom/NodeIterator.h: Ditto.
2364
2365         * dom/ProcessingInstruction.cpp:
2366         (WebCore::ProcessingInstruction::setData): Call textRemoved.
2367
2368         * dom/Range.cpp:
2369         (WebCore::NodeWithIndex::index): Added. Computes and stores index.
2370         (WebCore::NodeWithIndexBefore::indexBefore): Added. Computes and stores index.
2371         (WebCore::NodeWithIndexAfter::indexAfter): Added. Computes and stores index.
2372         (WebCore::Range::Range): Call attachRange.
2373         (WebCore::Range::~Range): Call detachRange unless the range is already detached.
2374         (WebCore::Range::commonAncestorContainer): Removed check for WRONG_DOCUMENT_ERR.
2375         It's no longer possible to create a range where the two containers are non-zero
2376         and have no common ancestor.
2377         (WebCore::Range::isPointInRange): Rewrote expression to be more readable.
2378         (WebCore::Range::compareNode): Changed local variable to use int for consistency.
2379         (WebCore::Range::compareBoundaryPoints): Replaced ASSERT with ASSERT_NOT_REACHED.
2380         (WebCore::Range::deleteContents): Removed check for INVALID_STATE_ERR and
2381         initialization of ec to 0; both are now inside checkDeleteExtract.
2382         (WebCore::Range::intersectsNode): Changed local variable to use int for consistency.
2383         Also changed comparison to use < 0 and >= 0 rather than checking explicitly for 1
2384         and -1.
2385         (WebCore::Range::processContents): Changed code to not get the nodeType multiple
2386         times on the same node, and tweaked formatting. Removed code to update the range
2387         on deletion, because the normal delete logic will take care of that now.
2388         (WebCore::Range::extractContents): Removed check for INVALID_STATE_ERR and
2389         initialization of ec to 0; both are now inside checkDeleteExtract.
2390         (WebCore::Range::insertNode): Changed local variable to use int for consistency.
2391         (WebCore::Range::toString): Changed variable name to pastLast.
2392         (WebCore::Range::detach): Call detachRange.
2393         (WebCore::Range::checkDeleteExtract): Added check for detached range and code to
2394         set ec to 0; moved here from the two callers. Also changed variable name to pastLast.
2395         (WebCore::endpointNodeChildrenChanged): Added.
2396         (WebCore::Range::nodeChildrenChanged): Added.
2397         (WebCore::endpointNodeWillBeRemoved): Added.
2398         (WebCore::Range::nodeWillBeRemoved): Added.
2399         (WebCore::endpointTextInserted): Added.
2400         (WebCore::Range::textInserted): Added.
2401         (WebCore::endpointTextRemoved): Added.
2402         (WebCore::Range::textRemoved): Added.
2403         (WebCore::endpointTextNodesMerged): Added.
2404         (WebCore::Range::textNodesMerged): Added.
2405         (WebCore::endpointTextNodesSplit): Added.
2406         (WebCore::Range::textNodeSplit): Added.
2407
2408         * dom/Range.h: Added new member functions.
2409
2410         * dom/NodeWithIndex.h: Added. Makes it so we won't find the index for the same
2411         node more than once.
2412         * dom/NodeWithIndexAfter.h: Added. Similar to NodeWithIndex but gives the index after a
2413         node and treats a node pointer of 0 as meaning "before first node in parent container".
2414         * dom/NodeWithIndexBefore.h: Added.  Similar to NodeWithIndex but treats a node pointer of 0
2415         as meaning "after last node in parent container".
2416
2417         * dom/Text.cpp:
2418         (WebCore::Text::splitText): Call textNodeSplit.
2419
2420         * editing/ApplyStyleCommand.cpp:
2421         (WebCore::ApplyStyleCommand::applyInlineStyle): Changed variable name to pastLast.
2422
2423 2008-03-15  Julien Chaffraix  <julien.chaffraix@gmail.com>
2424
2425         Reviewed by Holger.
2426
2427         [CURL] Crash below ResourceHandleManager::setupPOST when job->request().httpBody() is NULL
2428         http://bugs.webkit.org/show_bug.cgi?id=16906
2429
2430         Add null checks for httpBody() to match other ports.
2431
2432         Test: http/tests/xmlhttprequest/xmlhttprequest-post-crash.html
2433
2434         * platform/network/curl/ResourceHandleManager.cpp:
2435         (WebCore::readCallback): Add null check.
2436         (WebCore::ResourceHandleManager::setupPOST): Ditto.
2437
2438 2008-03-14  Steve Falkenburg  <sfalken@apple.com>
2439
2440         PGO build fixes.
2441
2442         * WebCore.vcproj/WebCore.vcproj:
2443
2444 2008-03-14  Anders Carlsson  <andersca@apple.com>
2445
2446         Reviewed by Sam.
2447
2448         <rdar://problem/5794989>
2449         https://bugs.webkit.org/show_bug.cgi?id=17792
2450         REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work
2451
2452         Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow
2453         so that somewindow.open calls where the active window and 'somewindow' differ return the correct frame.
2454         
2455         * bindings/js/JSDOMWindowBase.cpp:
2456         (WebCore::createWindow):
2457         * loader/FrameLoader.cpp:
2458         (WebCore::FrameLoader::createWindow):
2459         * loader/FrameLoader.h:
2460
2461 2008-03-14  Dan Bernstein  <mitz@apple.com>
2462
2463         Reviewed by Mark Rowe.
2464
2465         - fix <rdar://problem/5797836> shadow offsets are smaller than specified
2466
2467         * platform/graphics/cg/GraphicsContextCG.cpp:
2468         (WebCore::GraphicsContext::setShadow): Made the workaround for
2469         <rdar://problem/5539388> unconditional.
2470
2471 2008-03-14  Adam Roben  <aroben@apple.com>
2472
2473         Fix it right this time
2474
2475         * platform/MainThread.cpp: Cast to unsigned so we can use %u in the
2476         format string.
2477         * platform/mac/MainThreadMac.mm:
2478
2479 2008-03-14  Adam Roben  <aroben@apple.com>
2480
2481         Mac build fix
2482
2483         * platform/mac/MainThreadMac.mm: Corrected a typo.
2484
2485 2008-03-14  Dan Bernstein  <mitz@apple.com>
2486
2487         Reviewed by Darin Adler.
2488
2489         - fix http://bugs.webkit.org/show_bug.cgi?id=17834
2490           REGRESSION: floated first-letter does not work when included in table
2491
2492         Test: fast/css/first-letter-float.html
2493
2494         * rendering/RenderBlock.cpp:
2495         (WebCore::RenderBlock::updateFirstLetter): Changed the search for the
2496         first text node to stop at a float if that float is an existing first-
2497         letter.
2498
2499 2008-03-14  Sam Weinig  <sam@webkit.org>
2500
2501         Fix Mac build
2502
2503         * WebCore.xcodeproj/project.pbxproj:
2504
2505 2008-03-13  Adam Roben  <aroben@apple.com>
2506
2507         Make most of callOnMainThread's implementation be cross-platform
2508
2509         I took the non-platform-specific parts of MainThreadWin.cpp and moved
2510         them to a new MainThread.cpp. Each platform is now responsible for
2511         implementing one function, scheduleDispatchFunctionsOnMainThread,
2512         which is supposed to set things up so that
2513         dispatchFunctionsFromMainThread gets called from the main thread in
2514         the near future.
2515
2516         Reviewed by Alexey.
2517
2518         * GNUmakefile.am: Added MainThread.cpp to the project.
2519         * WebCore.pro: Ditto.
2520         * WebCore.vcproj/WebCore.vcproj: Ditto.
2521         * WebCore.xcodeproj/project.pbxproj: Ditto.
2522         * WebCoreSources.bkl: Ditto.
2523         * platform/MainThread.cpp:
2524           - Copied from WebCore/platform/win/MainThreadWin.cpp.
2525           - Removed the Windows-specific parts.
2526         (WebCore::callOnMainThread): Changed to call
2527         scheduleDispatchFunctionsOnMainThread instead of PostMessage.
2528         * platform/gtk/MainThreadGtk.cpp:
2529         (WebCore::timeoutFired): Renamed from callFunctionOnMainThread. Now
2530         just calls dispatchFunctionsFromMainThread.
2531         (WebCore::scheduleDispatchFunctionsOnMainThread): Added. Calls through
2532         to g_timeout_add.
2533         * platform/mac/MainThreadMac.mm: Renamed WebCoreFunctionWrapper to
2534         WebCoreMainThreadCaller.
2535         (-[WebCoreMainThreadCaller call]): Calls through to
2536         dispatchFunctionsFromMainThread.
2537         (WebCore::scheduleDispatchFunctionsOnMainThread): Makes a new
2538         WebCoreMainThreadCaller and calls performSelectorOnMainThread on it.
2539         * platform/qt/MainThreadQt.cpp: Removed PerformFunctionEvent.
2540         (WebCore::MainThreadInvoker::event): Chagned to call through to
2541         dispatchFunctionsFromMainThread.
2542         (WebCore::scheduleDispatchFunctionsOnMainThread): Sends an empty event
2543         to the MainThreadInvoker.
2544         * platform/win/MainThreadWin.cpp:
2545           - Removed the non-Windows-specific parts.
2546           - Removed some unnecessary initialization of static variables to 0.
2547         (WebCore::ThreadingWindowWndProc): Changed to call
2548         dispatchFunctionsFromMainThread.
2549         (WebCore::scheduleDispatchFunctionsOnMainThread): Calls through to
2550         PostMessage.
2551         * platform/wx/MainThreadWx.cpp:
2552         (WebCore::scheduleDispatchFunctionsOnMainThread): Added.
2553
2554 2008-03-14  Beth Dakin  <bdakin@apple.com>
2555
2556         Reviewed by Geoff.
2557
2558         Fix for <rdar://problem/5728171> Potential PLT speedup: don't 
2559         realloc every time inside NamedAttrMap::addAttribute
2560
2561         The speed-up for this turned out to be so small that it is mostly 
2562         imperceptible. It is likely that it is a tiny boost, though, and 
2563         the new code is much cleaner.
2564
2565         * dom/Element.cpp:
2566         (WebCore::Element::setAttributeMap): attrs is now called 
2567         m_attributes
2568         * dom/NamedAttrMap.cpp: The array attrs is now the Vector of 
2569         RefPtrs called m_attributes, and there is no longer any need for 
2570         the len member variable. 
2571         (WebCore::NamedAttrMap::NamedAttrMap): 
2572         (WebCore::NamedAttrMap::item):
2573         (WebCore::NamedAttrMap::getAttributeItem):
2574         (WebCore::NamedAttrMap::clearAttributes):
2575         (WebCore::NamedAttrMap::operator=):
2576         (WebCore::NamedAttrMap::addAttribute):
2577         (WebCore::NamedAttrMap::removeAttribute):
2578         (WebCore::NamedAttrMap::mapsEquivalent):
2579         * dom/NamedAttrMap.h: Same.
2580         (WebCore::NamedAttrMap::length):
2581         (WebCore::NamedAttrMap::attributeItem):
2582         (WebCore::NamedAttrMap::shrinkToLength):
2583         (WebCore::NamedAttrMap::reserveCapacity):
2584         * html/HTMLTokenizer.cpp: One of the benefits of the old array was 
2585         that it never took up more memory than it needed to. So the 
2586         tokenizer utilizes new member functions on NamedAttrMap 
2587         (shrinkToLength and reserveCapacity) to try to keep memory usage at 
2588         a minimum. 
2589         (WebCore::Token::addAttribute):
2590         (WebCore::HTMLTokenizer::processToken):
2591
2592 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
2593
2594         BUILD FIX when ENABLE(MAC_JAVA_BRIDGE) set to 0.
2595
2596         * page/mac/FrameMac.mm: Move up #if ENABLE(MAC_JAVA_BRIDGE) guard
2597         to comment out unused code.
2598
2599 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
2600
2601         Unify concept of enabling the Mac Java bridge.
2602
2603         Reviewed by Darin and Anders.
2604
2605         No test cases added since there is no change in functionality.
2606
2607         * DerivedSources.make: Added check for ENABLE_MAC_JAVA_BRIDGE macro.
2608         If defined as "1", add WebCore.JNI.exp to WEBCORE_EXPORT_DEPENDENCIES.
2609         * WebCore.JNI.exp: Added.
2610         * WebCore.base.exp: Moved exported JNI methods to WebCore.JNI.exp.
2611
2612         * bridge/jni/jni_class.cpp: Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
2613         * bridge/jni/jni_class.h: Ditto.
2614         * bridge/jni/jni_instance.cpp: Ditto.
2615         * bridge/jni/jni_instance.h: Ditto.
2616         * bridge/jni/jni_jsobject.cpp: Ditto.
2617         * bridge/jni/jni_jsobject.h: Ditto.
2618         * bridge/jni/jni_objc.mm: Ditto.
2619         * bridge/jni/jni_runtime.cpp: Ditto.
2620         * bridge/jni/jni_runtime.h: Ditto.
2621         * bridge/jni/jni_utility.cpp: Ditto.
2622         * bridge/jni/jni_utility.h: Ditto.
2623
2624         * bridge/runtime.cpp: Removed unused #include statements.
2625         * bridge/runtime.h:
2626         (KJS::Bindings::Instance::BindingLanguage): Added #if ENABLE(MAC_JAVA_BRIDGE)
2627         guard for JavaLanguage enum.  Also added #if PLATFORM(MAC) guard for
2628         ObjectiveCLanguage enum to match corresponding code in runtime.cpp.
2629
2630         * config.h: Removed definition of HAVE_JNI.
2631
2632         * loader/FrameLoaderClient.h:
2633         (WebCore::FrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
2634         * page/Frame.cpp:
2635         (WebCore::Frame::Frame): Ditto.
2636         * page/Frame.h:
2637         (WebCore::Frame::initJavaJSBindings): Ditto.
2638         * page/mac/FrameMac.mm:
2639         (WebCore::Frame::createScriptInstanceForWidget): Ditto.
2640         (WebCore::Frame::initJavaJSBindings): Ditto.
2641
2642 2008-03-13  Darin Adler  <darin@apple.com>
2643
2644         * html/PreloadScanner.h: Corrected license.
2645         * html/PreloadScanner.cpp: Corrected license.
2646
2647 2008-03-13  Mark Mentovai  <mark@moxienet.com>
2648
2649         Reviewed by darin.  Landed by eseidel.
2650
2651         * platform/FloatConversion.h: Include a header to get CoreGraphics
2652         types when using CoreGraphics types.
2653
2654 2008-03-13  Mark Mentovai  <mark@moxienet.com>
2655
2656         Reviewed by eseidel.  Landed by eseidel.
2657
2658         * WebCore.xcodeproj/project.pbxproj:
2659         * css/CSSParser.cpp:
2660         * css/makeprop.pl:
2661         Move CSSPropertyNames.c to CSSPropertyNames.cpp
2662
2663 2008-03-13  Mark Mentovai  <mark@moxienet.com>
2664
2665         Reviewed by eseidel.  Landed by eseidel.
2666
2667         * platform/Arena.h: Use statement1;statement2 instead of
2668         (statement1,statement2) in CLEAR_UNUSED.
2669
2670 2008-03-13  Tommi Komulainen  <tommi.komulainen@iki.fi>
2671
2672         Reviewed by Alp Toker.
2673
2674         http://bugs.webkit.org/show_bug.cgi?id=17821
2675         [SOUP] POST requests are empty
2676
2677         Send the HTTP request body as well.
2678
2679         * platform/network/soup/ResourceHandleSoup.cpp:
2680         (WebCore::ResourceHandle::start):
2681
2682 2008-03-13  Dan Bernstein  <mitz@apple.com>
2683
2684         Reviewed by Dave Hyatt.
2685
2686         - fix http://bugs.webkit.org/show_bug.cgi?id=17819
2687           Border-collapse: collapse later cell wins on PC, earlier cell on Mac
2688
2689         Test: fast/table/border-collapsing/equal-precedence-resolution.html
2690
2691         * rendering/RenderTableCell.cpp:
2692         (WebCore::RenderTableCell::collapsedLeftBorder): When calling
2693         compareBorders() with borders that may have the same precedence, made
2694         sure to pass the border belonging to the earlier (in document order)
2695         element first, since compareBorders() prefers the first argument when
2696         there is a tie.
2697         (WebCore::RenderTableCell::collapsedRightBorder): Ditto.
2698         (WebCore::RenderTableCell::collapsedTopBorder): Ditto.
2699
2700 2008-03-13  Adam Roben  <aroben@apple.com>
2701
2702         wx build fix and Windows leak fix after r31034
2703
2704         * platform/graphics/wx/ImageWx.cpp:
2705         (WebCore::Image::loadPlatformResource): Use SharedBuffer::create.
2706         * platform/win/SharedBufferWin.cpp:
2707         (WebCore::SharedBuffer::createWithContentsOfFile): Ditto (we were
2708         leaking the SharedBuffer here before).
2709
2710 2008-03-13  Antti Koivisto  <antti@apple.com>
2711
2712         Reviewed by Eric.
2713
2714         Correct a few issues spotted by Mike Belshe. 
2715
2716         * html/PreloadScanner.cpp:
2717         (WebCore::PreloadScanner::tokenize):
2718         * loader/loader.cpp:
2719         (WebCore::Loader::cancelRequests):
2720
2721 2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>
2722
2723         Fix GTK+ build for SharedBuffer changes.
2724
2725         * platform/graphics/gtk/ImageGtk.cpp:
2726         (Image::loadPlatformResource):
2727
2728 2008-03-13  Steve Falkenburg  <sfalken@apple.com>
2729
2730         More PGO build fixes.
2731
2732         * WebCorePrefix.cpp:
2733
2734 2008-03-13  Antti Koivisto  <antti@apple.com>
2735
2736         Reviewed by Darin.
2737         
2738         Make page loads go fast.
2739         
2740         http://bugs.webkit.org/show_bug.cgi?id=17480
2741
2742         - Implement speculative preloading. When a script load blocks the main parser, use a side 
2743           parser to pick up more resources.
2744         - Implement per-host load queues, prioritize scripts and stylesheets over images.
2745         
2746         Depending on content and network latency this may speed things up quite a bit.
2747
2748         * WebCore.xcodeproj/project.pbxproj:
2749         * dom/Document.cpp:
2750         (WebCore::Document::implicitClose):
2751         Clear the preloads after laoding completes.
2752         
2753         * html/HTMLLinkElement.cpp:
2754         (WebCore::HTMLLinkElement::parseMappedAttribute):
2755         (WebCore::HTMLLinkElement::tokenizeRelAttribute):
2756         * html/HTMLLinkElement.h:
2757         Make tokenizeRelAttribute() public static so it can be used from elsewhere.
2758         Eliminate a pointless bitfield so I can get references.
2759         
2760         * html/HTMLTokenizer.cpp:
2761         (WebCore::HTMLTokenizer::scriptHandler):
2762         (WebCore::HTMLTokenizer::scriptExecution):
2763         (WebCore::HTMLTokenizer::write):
2764         * html/HTMLTokenizer.h:
2765         Spin up the preload scanner whenever a script load blocks the parser. One scanner tracks the end of 
2766         the document while temporary ones are created as needed to scan document.write() output.
2767         
2768         * html/PreloadScanner.cpp: Added.
2769         (WebCore::PreloadScanner::PreloadScanner):
2770         (WebCore::PreloadScanner::~PreloadScanner):
2771         (WebCore::PreloadScanner::begin):
2772         (WebCore::PreloadScanner::end):
2773         (WebCore::PreloadScanner::reset):
2774         (WebCore::PreloadScanner::write):
2775         (WebCore::isWhitespace):
2776         (WebCore::PreloadScanner::clearLastCharacters):
2777         (WebCore::PreloadScanner::rememberCharacter):
2778         (WebCore::PreloadScanner::lastCharactersMatch):
2779         (WebCore::legalEntityFor):
2780         (WebCore::PreloadScanner::consumeEntity):
2781         (WebCore::PreloadScanner::tokenize):
2782         (WebCore::PreloadScanner::processAttribute):
2783         (WebCore::PreloadScanner::emitCharacter):
2784         (WebCore::PreloadScanner::tokenizeCSS):
2785         (WebCore::PreloadScanner::emitTag):
2786         (WebCore::PreloadScanner::emitCSSRule):
2787         * html/PreloadScanner.h: Added.
2788         (WebCore::PreloadScanner::inProgress):
2789         (WebCore::PreloadScanner::):
2790         HTML5 tokenization plus some glue code. Fake CSS parsing thrown in just for fun.
2791         
2792         * loader/Cache.cpp:
2793         (WebCore::Cache::pruneDeadResources):
2794         Preloads have zero refcount, avoid kicking them out too early.
2795         
2796         * loader/CachedResource.cpp:
2797         (WebCore::CachedResource::CachedResource):
2798         (WebCore::CachedResource::ref):
2799         * loader/CachedResource.h:
2800         (WebCore::CachedResource::):
2801         (WebCore::CachedResource::preloadResult):
2802         (WebCore::CachedResource::setRequestedFromNetworkingLayer):
2803         (WebCore::CachedResource::canDelete):
2804         (WebCore::CachedResource::isPreloaded):
2805         (WebCore::CachedResource::increasePreloadCount):
2806         (WebCore::CachedResource::decreasePreloadCount):
2807         Keep track which resources are preloads. Avoid deleting them. Track
2808         at which point of the loading preloads get utilized to enable some interesting 
2809         statistics.
2810         
2811         * loader/DocLoader.cpp:
2812         (WebCore::DocLoader::~DocLoader):
2813         (WebCore::DocLoader::checkForReload):
2814         (WebCore::DocLoader::registerPreload):
2815         (WebCore::DocLoader::clearPreloads):
2816         (WebCore::DocLoader::printPreloadStats):
2817         * loader/DocLoader.h:
2818         Ensure we utilize preloaded resources during reloads.
2819         Keep a list of all preloads in the document. Clear the preloads after
2820         parsing is complete. Some debug statistics.
2821         
2822         * loader/DocumentLoader.cpp:
2823         (WebCore::DocumentLoader::isLoadingInAPISense):
2824         Avoid signaling that loading is complete too early. 
2825         
2826         * loader/loader.cpp:
2827         (WebCore::Loader::Loader):
2828         (WebCore::Loader::~Loader):
2829         (WebCore::Loader::determinePriority):
2830         (WebCore::Loader::load):
2831         (WebCore::Loader::scheduleServePendingRequests):
2832         (WebCore::Loader::requestTimerFired):
2833         (WebCore::Loader::servePendingRequests):
2834         (WebCore::Loader::cancelRequests):
2835         (WebCore::Loader::Host::Host):
2836         (WebCore::Loader::Host::~Host):
2837         (WebCore::Loader::Host::addRequest):
2838         (WebCore::Loader::Host::hasRequests):
2839         (WebCore::Loader::Host::servePendingRequests):
2840         (WebCore::Loader::Host::didFinishLoading):
2841         (WebCore::Loader::Host::didFail):
2842         (WebCore::Loader::Host::didReceiveResponse):
2843         (WebCore::Loader::Host::didReceiveData):
2844         (WebCore::Loader::Host::cancelPendingRequests):
2845         (WebCore::Loader::Host::cancelRequests):
2846         * loader/loader.h:
2847         (WebCore::Loader::):
2848         Distribute load requests to per-host priority queues. Limit the number of loads issued to the 
2849         networking layer so we have better changes of getting important requests through first.
2850         Prioritize scripts > stylesheets > images.
2851
2852 2008-03-13  David Hyatt  <hyatt@apple.com>
2853
2854         This patch makes full page zoom work pretty well. It fixes repainting so that it works when transforms
2855         are set on the RenderView. It also implements the "smart layout" behavior that other browsers support when
2856         zooming. The page will still try to constrain to the viewport size even when zoomed.
2857
2858         Reviewed by john
2859
2860         * dom/Document.cpp:
2861         (WebCore::Document::recalcStyle):
2862         Make sure to test for transform changes even when there is no zoom.  This fixes repainting issues
2863         caused by jumping from a zoomed state back to the standard size.
2864
2865         * page/FrameView.cpp:
2866         (WebCore::FrameView::adjustViewSize):
2867         Adjust for the zoom factor (the render tree is in unzoomed coordinates, but the scrollbars of the view
2868         need to handle zoomed coordinates).
2869
2870         * rendering/RenderBox.cpp:
2871         (WebCore::RenderBox::calcHeight):
2872         Fix the body-sizing-to-the-view-height quirk so that it takes the zoom factor into account when
2873         stretching to fill the viewport.
2874
2875         * rendering/RenderLayer.cpp:
2876         (WebCore::RenderLayer::updateLayerPositions):
2877         (WebCore::RenderLayer::setHasVisibleContent):
2878         Remove the FIXMEs now that absoluteClippedOverflowRect works with transforms on the RenderView.
2879
2880         * rendering/RenderView.cpp:
2881         (WebCore::RenderView::calcHeight):
2882         (WebCore::RenderView::calcWidth):
2883         Make sure the calculated width/height take the zoom factor into account in order to get the "smart layout"
2884         behavior.
2885
2886         (WebCore::RenderView::layout):
2887         When deciding whether children have to get a relayout, we need to check the zoomed width/height and not just
2888         the viewport size.
2889
2890         (WebCore::RenderView::computeAbsoluteRepaintRect):
2891         Patched to take into account transforms set on the RenderView.
2892
2893         (WebCore::RenderView::docHeight):
2894         (WebCore::RenderView::docWidth):
2895         Patched to just always use m_width and m_height initially, since those have already been adjusted for
2896         the zoom factor.
2897
2898         (WebCore::RenderView::zoomedHeight):
2899         (WebCore::RenderView::zoomedWidth):
2900         * rendering/RenderView.h:
2901         New helper methods for obtaining the adjusted width/height of the viewport taking into account the
2902         zoom factor.
2903
2904 2008-03-13  Anders Carlsson  <andersca@apple.com>
2905
2906         Build fix.
2907
2908         * WebCore.base.exp:
2909
2910 2008-03-13  Anders Carlsson  <andersca@apple.com>
2911
2912         Reviewed by Adam.
2913
2914         Get rid of actualRequest, it is not used anymore. Also, get rid of 
2915         initialRequest and replace all uses with originalRequest because those are
2916         the same thing.
2917         
2918         * loader/DocumentLoader.cpp:
2919         * loader/DocumentLoader.h:
2920         * loader/FrameLoader.cpp:
2921         (WebCore::FrameLoader::initialRequest):
2922         (WebCore::FrameLoader::originalRequestURL):
2923
2924 2008-03-13  Brady Eidson  <beidson@apple.com>
2925
2926         Reviewed by Anders
2927
2928         Convert SharedBuffer to start with a refCount of 1
2929
2930         * loader/ImageDocument.cpp:
2931         (WebCore::ImageTokenizer::finish):
2932
2933         * loader/ResourceLoader.cpp:
2934         (WebCore::ResourceLoader::addData):
2935         (WebCore::ResourceLoader::willStopBufferingData):
2936
2937         * loader/icon/IconDatabase.cpp:
2938         (WebCore::IconDatabase::defaultIcon):
2939         (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
2940
2941         * loader/loader.cpp:
2942         (WebCore::Loader::didReceiveData):
2943
2944         * platform/SharedBuffer.h:
2945         (WebCore::SharedBuffer::create): Make all constructors private, add ::create() calls
2946         * platform/SharedBuffer.cpp:
2947         (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
2948         (WebCore::SharedBuffer::copy):
2949         * platform/mac/SharedBufferMac.mm:
2950         (WebCore::SharedBuffer::wrapNSData):
2951         (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
2952
2953 2008-03-13  Steve Falkenburg  <sfalken@apple.com>
2954
2955         PGO build fixes.
2956         
2957         Disable PGO for normal release builds.
2958         Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets.
2959
2960         * WebCore.vcproj/WebCore.vcproj:
2961
2962 2008-03-13  Anders Carlsson  <andersca@apple.com>
2963
2964         Reviewed by Darin.
2965
2966         Make a bunch of DocumentLoader setters/getters inline.
2967         
2968         * loader/DocumentLoader.cpp:
2969         * loader/DocumentLoader.h:
2970         (WebCore::DocumentLoader::isStopping):
2971         (WebCore::DocumentLoader::setCommitted):
2972         (WebCore::DocumentLoader::isCommitted):
2973         (WebCore::DocumentLoader::isLoading):
2974         (WebCore::DocumentLoader::setLoading):
2975         (WebCore::DocumentLoader::response):
2976         (WebCore::DocumentLoader::mainDocumentError):
2977         (WebCore::DocumentLoader::setResponse):
2978         (WebCore::DocumentLoader::isClientRedirect):
2979         (WebCore::DocumentLoader::setIsClientRedirect):
2980         (WebCore::DocumentLoader::overrideEncoding):
2981         (WebCore::DocumentLoader::responses):
2982         (WebCore::DocumentLoader::triggeringAction):
2983         (WebCore::DocumentLoader::setTriggeringAction):
2984         (WebCore::DocumentLoader::setOverrideEncoding):
2985         (WebCore::DocumentLoader::setLastCheckedRequest):
2986         (WebCore::DocumentLoader::lastCheckedRequest):
2987         (WebCore::DocumentLoader::title):
2988         (WebCore::DocumentLoader::setLoadingFromCachedPage):
2989         (WebCore::DocumentLoader::isLoadingFromCachedPage):
2990
2991 2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>
2992
2993         Fix builds without SVG enabled.
2994
2995         * page/Frame.cpp:
2996         (Frame::shouldApplyTextZoom):
2997         (Frame::shouldApplyPageZoom):
2998
2999 2008-03-13  Simon Hausmann  <hausmann@webkit.org>
3000
3001         Fix the Qt build.
3002
3003         * bridge/qt/qt_instance.cpp:
3004         (KJS::Bindings::QtInstance::getQtInstance):
3005         (KJS::Bindings::QtInstance::getRuntimeObject):
3006         * bridge/qt/qt_instance.h:
3007         (KJS::Bindings::QtInstance::create):
3008         * bridge/qt/qt_runtime.cpp:
3009         (KJS::Bindings::convertQVariantToValue):
3010         (KJS::Bindings::QtConnectionObject::execute):
3011         * page/qt/FrameQt.cpp:
3012         (WebCore::Frame::createScriptInstanceForWidget):
3013
3014 2008-03-12  Sam Weinig  <sam@webkit.org>
3015
3016         Reviewed by Darin Adler.
3017
3018         Fix <rdar://problem/5784773>
3019         Crash loading QT movies @ apple.com/ipodtouch/features.html with a PAC file (WebKitThreadingException)
3020
3021         Make bridged RuntimeObjects get collected on the main thread only. This is necessary
3022         because clients of the bridged objects are unlikely to prepared for a collection on 
3023         non-main thread, which can happen with a PAC file.
3024
3025         * bridge/runtime_object.cpp:
3026         (RuntimeObjectImp::RuntimeObjectImp):
3027
3028 2008-03-12  Adam Roben  <aroben@apple.com>
3029
3030         Fix Bug 17815: Inspector's DOM tree should descend into subframes
3031
3032         <http://bugs.webkit.org/show_bug.cgi?id=17815>
3033
3034         Reviewed by Tim.
3035
3036         * page/inspector/DocumentPanel.js:
3037         (WebInspector.DocumentPanel.revealNode): Changed to provide
3038         _isAncestorIncludingParentFramesWithinPanel and
3039         _parentNodeOrFrameElementWithinPanel for the isAncestor and getParent
3040         parameters to findTreeElement so that parent frames will be searched.
3041         (WebInspector.DocumentPanel.updateBreadcrumb):
3042           - Changed while loop to for loop
3043           - Use _parentNodeOrFrameElementWithinPanel instead of
3044             Node.parentNode to move to the next node
3045           - The loop now ends when we reach the DocumentPanel's document node
3046           - Traversal past other Document nodes is now allowed
3047           - We add the "start" class to the final crumb after the loop exits
3048         (WebInspector.DocumentPanel._getDocumentForNode): Added. Simple helper
3049         that returns the node itself if the node is a Document node, or the
3050         node's ownerDocument otherwise.
3051         (WebInspector.DocumentPanel._parentNodeOrFrameElementWithinPanel):
3052         Added. Returns the node's parent node or, in the case of a Document
3053         node, the node's window's owning frame element, but will not return a
3054         node that is in a parent frame of the DocumentPanel's Document.
3055         (WebInspector.DocumentPanel._isAncestorIncludingParentFramesWithinPanel):
3056         Added. Returns true if a is an ancestor of b if a is an ancestor of a
3057         frame element whose subframe(s) contain b.
3058         (WebInspector.DOMNodeTreeElement): We now consider ourselves to have
3059         children if we have a contentDocument.
3060         (WebInspector.DOMNodeTreeElement.onpopulate): Moved the appendChild
3061         loop into a function so that we can add both children of our
3062         contentDocument and children of our node to the tree.
3063         (WebInspector.DOMNodeTreeElement.ondblclick): Changed so that we get
3064         the rootDOMNode by traversing the tree outline hierarchy instead of
3065         the DOM hierarchy so that we can easily jump up to a parent frame.
3066
3067 2008-03-12  Adam Roben  <aroben@apple.com>
3068
3069         Update the styles/metrics panes and breadcrumb after editing DOM
3070         attributes
3071
3072         Reviewed by Tim.
3073
3074         * page/inspector/DocumentPanel.js:
3075         (WebInspector.DocumentPanel.set focusedDOMNode): Moved code to update
3076         the parts of the DocumentPanel other than the DOM tree into a new
3077         function, _focusedNodeChanged.
3078         (WebInspector.DocumentPanel._focusedNodeChanged): Added. The
3079         forceUpdate parameter specifies whether the update should occur even
3080         if the focused node hasn't changed since the last update.
3081         (WebInspector.DocumentPanel.updateBreadcrumb): Added a forceUpdate
3082         parameter. If forceUpdate is true, we always rebuild the breadcrumbs.
3083         (WebInspector.DocumentPanel.updateStyles): Added a forceUpdate
3084         parameter. If forceUpdate is true, we always rebuild the styles pane.
3085         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added a
3086         call to DocumentPanel._focusedNodeChanged. We have to force the update
3087         because we haven't changed the focused node (the attributes of the
3088         node have changed).
3089         * page/inspector/StylesSidebarPane.js:
3090         (WebInspector.StylesSidebarPane.update): Added a forceUpdate
3091         parameter. If forceUpdate is true we always rebuild the styles.
3092
3093 2008-03-12  Mark Rowe  <mrowe@apple.com>
3094
3095         Further Gtk and Qt build fixes.
3096
3097         * bridge/runtime.cpp:
3098         (KJS::Bindings::Instance::createRuntimeObject): Adapt Qt-only code for change to PassRefPtr.
3099         * page/gtk/FrameGtk.cpp: Add missing include.
3100
3101 2008-03-12  Mark Rowe  <mrowe@apple.com>
3102
3103         Fix Gtk and Qt builds.
3104
3105         * page/gtk/FrameGtk.cpp:
3106         * page/qt/FrameQt.cpp:
3107
3108 2008-03-12  Mark Rowe  <mrowe@apple.com>
3109
3110         Mac build fix.
3111
3112         * WebCore.base.exp:  Remove symbol.
3113
3114 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
3115
3116         Build fix.
3117
3118         * page/win/FrameWin.cpp:
3119
3120 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
3121
3122         Build fix.
3123
3124         * plugins/win/PluginViewWin.cpp:
3125         (WebCore::PluginView::bindingInstance):
3126
3127 2008-03-12  Darin Adler  <darin@apple.com>
3128
3129         Reviewed by Anders.
3130
3131         - http://bugs.webkit.org/show_bug.cgi?id=17640
3132           eliminate WebCoreFrameBridge
3133
3134         * WebCore.base.exp: Added more exports, needed by code moved from WebCoreFrameBridge
3135         to WebFrame in WebKit.
3136         * WebCore.xcodeproj/project.pbxproj: Added more headers, same reason. Also deleted
3137         WebCoreFrameBridge.h and WebCoreFrameBridge.mm.
3138
3139         * page/Frame.cpp:
3140         (WebCore::Frame::Frame): Added call to initJavaJSBindings(), formerly handled by
3141         the WebCoreFrameBridge.
3142         * page/Frame.h: Added initJavaJSBindings function.
3143
3144         * page/mac/FrameMac.mm:
3145         (WebCore::updateRenderingForBindings): Moved here from WebCoreFrameBridge.
3146         (WebCore::Frame::initJavaJSBindings): Ditto; code was in the init function.
3147
3148         * page/mac/WebCoreFrameBridge.h: Removed.
3149         * page/mac/WebCoreFrameBridge.mm: Removed.
3150
3151 2008-03-12  Sam Weinig  <sam@webkit.org>
3152
3153         Reviewed by Anders Carlsson.
3154
3155         Don't go through the Document just to get the frame Element.
3156
3157         * page/DOMWindow.cpp:
3158         (WebCore::DOMWindow::frameElement):
3159
3160 2008-03-12  Anders Carlsson  <andersca@apple.com>
3161
3162         Reviewed by Geoff and Sam.
3163
3164         More Instance cleanup:
3165         
3166         * Make Instance inherit from RefCounted instead of doing its own refcounting.        
3167         * Make all Instance subclasses private, add static create methods.         
3168         * Have Instance start out with a refcount of 1.
3169         * Get rid of Instance::createBindingForLanguageInstance and call the individual 
3170           instance constructor methods instead.
3171         * Fix many methods to take and return PassRefPtr<Instance> to ensure that the
3172           refcounting is done correctly.
3173          
3174         * bridge/c/c_instance.h:
3175         (KJS::Bindings::CInstance::create):
3176         * bridge/c/c_utility.cpp:
3177         (KJS::Bindings::convertNPVariantToValue):
3178         * bridge/jni/jni_instance.cpp:
3179         (JavaInstance::invokeMethod):
3180         * bridge/jni/jni_instance.h:
3181         (KJS::Bindings::JavaInstance::create):
3182         * bridge/jni/jni_jsobject.cpp:
3183         (JavaJSObject::convertJObjectToValue):
3184         * bridge/jni/jni_runtime.cpp:
3185         (JavaField::valueFromInstance):
3186         (JavaArray::valueAt):
3187         * bridge/objc/objc_instance.h:
3188         (KJS::Bindings::ObjcInstance::create):
3189         * bridge/objc/objc_utility.mm:
3190         (KJS::Bindings::convertObjcValueToValue):
3191         * bridge/qt/qt_instance.cpp:
3192         (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
3193         (KJS::Bindings::QtInstance::getQtInstance):
3194         (KJS::Bindings::QtInstance::getRuntimeObject):
3195         * bridge/qt/qt_instance.h:
3196         * bridge/runtime.cpp:
3197         (KJS::Bindings::Instance::Instance):
3198         (KJS::Bindings::Instance::createRuntimeObject):
3199         * bridge/runtime.h:
3200         * bridge/runtime_object.cpp:
3201         (RuntimeObjectImp::RuntimeObjectImp):
3202         * bridge/runtime_object.h:
3203         * page/Frame.h:
3204         * page/mac/FrameMac.mm:
3205         (WebCore::Frame::createScriptInstanceForWidget):
3206         * page/win/FrameWin.cpp:
3207         (WebCore::Frame::createScriptInstanceForWidget):
3208         * plugins/PluginView.h:
3209         * plugins/win/PluginViewWin.cpp:
3210         (WebCore::PluginView::bindingInstance):
3211
3212 2008-03-12  Dan Bernstein  <mitz@apple.com>
3213
3214         Suggested by Darin Adler. Reviewed by Dave Hyatt.
3215
3216         - speed up BidiIterator::direction()
3217
3218         * rendering/bidi.cpp:
3219         (WebCore::BidiIterator::current): Made inline and corrected the
3220         out-of-bounds condition to work with 0-length text and offsets beyond
3221         the end of the text.
3222         (WebCore::BidiIterator::direction): Changed to call current() and not
3223         call the virtual method isListMarker() most of the time.
3224         (WebCore::addMidpoint): Removed unnecessary null-check of smidpoints.
3225         (WebCore::appendRunsForObject): Ditto.
3226
3227 2008-03-12  Adam Roben  <aroben@apple.com>
3228
3229         Make URLs not be underlined while editing them in the DOM view
3230
3231         Reviewed by Tim.
3232
3233         * page/inspector/inspector.css:
3234
3235 2008-03-12  Adam Roben  <aroben@apple.com>
3236
3237         Part of Bug 17224: DOM nodes/attributes should be editable
3238
3239         <http://bugs.webkit.org/show_bug.cgi?id=17224>
3240         <rdar://problem/5732825>
3241
3242         We now start editing if the user single-clicks on an attribute,
3243         attribute value, or text node while the parent element is selected.
3244         Previously, we started editing on double-click regardless of the
3245         selection state of the element.
3246
3247         URLs in the DOM tree are now followed on Alt/Option-click, rather than
3248         on just click.
3249
3250         Reviewed by Tim.
3251
3252         * English.lproj/InspectorLocalizedStrings.js: Added four new localized
3253         strings.
3254         * page/inspector/DocumentPanel.js:
3255         (WebInspector.DOMNodeTreeElement.onattach): Call new
3256         _makeURLSActivateOnModifiedClick.
3257         (WebInspector.DOMNodeTreeElement._makeURLsActivateOnModifiedClick):
3258         Added. Changes the tooltip of each link in this element to indicate
3259         that Alt/Option-click will follow the URL, and sets the
3260         followOnAltClick property on each link.
3261         (WebInspector.DOMNodeTreeElement.onselect): Mark that we're being
3262         selected.
3263         (WebInspector.DOMNodeTreeElement.onmousedown): If we're not currently
3264         being selected, start editing.
3265         (WebInspector.DOMNodeTreeElement.ondblclick): We no longer start
3266         editing here. We block re-rooting of the tree if we're currently
3267         editing.
3268         (WebInspector.DOMNodeTreeElement._startEditing):
3269           - Don't do anything if we're not focused
3270           - Pass the event down to _startEditingAttribute.
3271         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't do
3272         anything if the event target is a URL and the Alt/Option key is
3273         pressed -- in this case we want to follow the link.
3274         (WebInspector.DOMNodeTreeElement._updateTitle): Call
3275         _makeURLsActivateOnClick again since the anchor elements have all been
3276         recreated.
3277         * page/inspector/inspector.js:
3278         (WebInspector.documentClick): If the anchor as a followOnAltClick
3279         property and the Alt/Option key is not pressed, do nothing.
3280
3281 2008-03-12  Ada Chan  <adachan@apple.com>
3282
3283         Fixed the initial value of zoom factor.
3284
3285         Reviewed by Adam.
3286
3287         * page/Frame.cpp:
3288         (WebCore::FramePrivate::FramePrivate):
3289
3290 2008-03-12  David Hyatt  <hyatt@apple.com>
3291
3292         Make full page zoom vaguely work.  This patch uses the CSS transform system to turn on full page zoom at the
3293         document level.  There are many many bugs that I'm going to file to track all the issues (most of the issues
3294         are just bugs with transforms themselves).
3295
3296         Reviewed by Adam Roben
3297
3298         * css/CSSStyleSelector.cpp:
3299         (WebCore::CSSStyleSelector::applyProperty):
3300         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
3301         * dom/Document.cpp:
3302         (WebCore::Document::recalcStyle):
3303         * page/Frame.cpp:
3304         (WebCore::Frame::shouldApplyTextZoom):
3305         (WebCore::Frame::shouldApplyPageZoom):
3306         * page/Frame.h:
3307         * rendering/RenderLayer.cpp:
3308         (WebCore::RenderLayer::updateLayerPositions):
3309         (WebCore::RenderLayer::setHasVisibleContent):
3310         (WebCore::RenderLayer::paintLayer):
3311         (WebCore::RenderLayer::hitTestLayer):
3312         * rendering/RenderLayer.h:
3313
3314 2008-03-12  David Hyatt  <hyatt@apple.com>
3315
3316         Make the zoom factor a float and not a percent.
3317
3318         Reviewed by antti
3319
3320         * WebCore.base.exp:
3321         * css/CSSStyleSelector.cpp:
3322         (WebCore::CSSStyleSelector::applyProperty):
3323         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
3324         * page/Frame.cpp:
3325         (WebCore::Frame::zoomFactor):
3326         (WebCore::Frame::setZoomFactor):
3327         * page/Frame.h:
3328         * page/FramePrivate.h:
3329         * svg/SVGSVGElement.cpp:
3330         (WebCore::SVGSVGElement::currentScale):
3331         (WebCore::SVGSVGElement::setCurrentScale):
3332
3333 2008-03-12  David Hyatt  <hyatt@apple.com>
3334
3335         Eliminate setTextMultiplier from the bridge.  Make Webkit just call setZoomFactor on the frame directly.
3336
3337         Reviewed by Tim H.
3338
3339         * WebCore.base.exp:
3340         * page/mac/WebCoreFrameBridge.h:
3341         * page/mac/WebCoreFrameBridge.mm:
3342
3343 2008-03-12  Dan Bernstein  <mitz@apple.com>
3344
3345         Reviewed by Darin Adler and Sam Weinig.
3346
3347         - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard
3348
3349         Use CTFontCopyGraphicsFont and CTFontGetPlatformFont on Leopard instead
3350         of wkGetCGFontFromNSFont and wkGetNSFontATSUFontId, relying on NSFont
3351         and CTFontRef being toll-free bridged.
3352
3353         * WebCore.Tiger.exp:
3354         * WebCore.base.exp:
3355         * platform/graphics/mac/FontMac.mm:
3356         (WebCore::Font::drawGlyphs): Changed to use the cgFont() accessor.
3357         * platform/graphics/mac/FontPlatformData.h:
3358         Made m_cgFont a RetainPtr on Leopard.
3359         (WebCore::toCTFontRef): Added a function that encapsulates the
3360         toll-free bridging.
3361         (WebCore::FontPlatformData::FontPlatformData):
3362         (WebCore::FontPlatformData::cgFont): Added this accessor method.
3363         * platform/graphics/mac/FontPlatformDataMac.mm:
3364         (WebCore::FontPlatformData::FontPlatformData): Changed to use
3365         CoreText API on Leopard.
3366         (WebCore::FontPlatformData::setFont): Ditto.
3367         * platform/graphics/mac/SimpleFontDataMac.mm:
3368         (WebCore::initFontData):
3369         (WebCore::pathFromFont):
3370         (WebCore::SimpleFontData::platformInit):
3371         (WebCore::SimpleFontData::platformWidthForGlyph):
3372         * platform/mac/WebCoreSystemInterface.mm:
3373
3374 2008-03-12  David Harrison  <harrison@apple.com>
3375
3376         Reviewed by Darin.
3377
3378         <rdar://problem/5607382> CrashTracer: [REGRESSION] 2290 crashes in Safari at com.apple.WebCore: -[WebCoreAXObject isWebArea] + 8
3379
3380         The problem was that we lost track of the AX cache for a subframe when Frame::disconnectOwnerElement() was
3381         called, so we were unable to locate the AXObjects to de-register from AppKit's accessibility registry.
3382         Also saw that cache clearing was missing from Document::detach(), and fixed that.
3383         
3384         Also added a debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
3385         
3386         Lastly, RenderWidget::destroy() now skips trying to remove the AXObject if accessibility has never been enabled.
3387        
3388         * dom/Document.cpp:
3389         (WebCore::Document::attach):
3390         Assert that there is no AX cache (since there is no renderer).
3391         
3392         (WebCore::Document::detach):
3393         Destroy the AX cache installed on this document.
3394         
3395         (WebCore::Document::clearAXObjectCache):
3396         New. Destroy the AX cache associated with this document.
3397         
3398         (WebCore::Document::axObjectCache):
3399         Added some comments.
3400         
3401         * dom/Document.h:
3402         Declare clearAXObjectCache().
3403         
3404         * page/Frame.cpp:
3405         (WebCore::Frame::disconnectOwnerElement):
3406         Destroy the AX cache associated with this frame's document.
3407         
3408         * page/mac/AXObjectCacheMac.mm:
3409         (WebCore::AXObjectCache::remove):        
3410         * page/mac/WebCoreAXObject.mm:
3411         (-[WebCoreAXObject initWithRenderer:]):
3412         (-[WebCoreAXObject detach]):
3413         * rendering/RenderObject.cpp:
3414         (WebCore::RenderObject::RenderObject):
3415         (WebCore::RenderObject::~RenderObject):
3416         * rendering/RenderObject.h:
3417         (WebCore::RenderObject::setHasAXObject):
3418         (WebCore::RenderObject::hasAXObject):
3419         Add debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
3420         
3421         * rendering/RenderWidget.cpp:
3422         (WebCore::RenderWidget::destroy):
3423         Skip call to remove the AXObject if accessibility has never been enabled. A simple speed optimization in the
3424         very common case that the accessibility APIs are not being used. Same as in RenderObject::destroy().
3425
3426 2008-03-12  Xan Lopez  <xan@gnome.org>
3427
3428         Reviewed by Alp Toker.
3429
3430         http://bugs.webkit.org/show_bug.cgi?id=15229
3431
3432         Add Pango font backend.
3433
3434         Original patch by Sven Herzberg <sven@imendio.com>
3435
3436         * GNUmakefile.am:
3437         * platform/graphics/gtk/FontCacheGtk.cpp:
3438         (WebCore::FontCache::fontExists):
3439         * platform/graphics/gtk/FontCustomPlatformDataPango.cpp: Added.
3440         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
3441         (WebCore::FontCustomPlatformData::fontPlatformData):
3442         (WebCore::releaseData):
3443         (WebCore::createFontCustomPlatformData):
3444         * platform/graphics/gtk/FontPlatformData.h:
3445         (WebCore::FontPlatformData::FontPlatformData):
3446         (WebCore::FontPlatformData::hash):
3447         * platform/graphics/gtk/FontPlatformDataPango.cpp: Added.
3448         (WebCore::FontPlatformData::FontPlatformData):
3449         (WebCore::FontPlatformData::init):
3450         (WebCore::FontPlatformData::~FontPlatformData):
3451         (WebCore::FontPlatformData::isFixedPitch):
3452         (WebCore::FontPlatformData::setFont):
3453         (WebCore::FontPlatformData::operator==):
3454         * platform/graphics/gtk/GlyphPageTreeNodePango.cpp: Added.
3455         (WebCore::pango_font_get_glyph):
3456         (WebCore::GlyphPage::fill):
3457         * platform/graphics/gtk/SimpleFontDataPango.cpp: Added.
3458         (WebCore::SimpleFontData::platformInit):
3459         (WebCore::SimpleFontData::platformDestroy):
3460         (WebCore::SimpleFontData::smallCapsFontData):
3461         (WebCore::SimpleFontData::containsCharacters):
3462         (WebCore::SimpleFontData::determinePitch):
3463         (WebCore::SimpleFontData::platformWidthForGlyph):
3464         (WebCore::SimpleFontData::setFont):
3465
3466 2008-03-12  Justin Garcia  <justin.garcia@apple.com>
3467
3468         Reviewed by Oliver.
3469         
3470         <rdar://problem/5770834> Crash at InsertTextCommand::prepareForTextInsertion() doing RemoveFormat in a certain list
3471         
3472         Fixes some (but not all) of the instances of:
3473         <rdar://problem/5659795> CrashTracer: [REGRESSION] 187 crashes in Safari at com.apple.WebCore: WebCore::InsertTextCommand::prepareForTextInsertion + 241
3474         <rdar://problem/5779631> CrashTracer: [USER] 25 crashes in Mail at WebCore::InsertTextCommand::prepareForTextInsertion
3475
3476         * editing/InsertLineBreakCommand.cpp:
3477         (WebCore::InsertLineBreakCommand::doApply): applyStyle may have destroyed content that held
3478         the old endingSelection(), so we must recompute it.  Added a FIXME.  Added a few comments.
3479         * editing/RemoveFormatCommand.cpp:
3480         (WebCore::RemoveFormatCommand::doApply): Added a FIXME.
3481
3482 2008-03-11  Alexey Proskuryakov  <ap@webkit.org>
3483
3484         Reviewed by Darin.
3485
3486         <rdar://problem/5640615> REGRESSION (Safari 2-3): Changing subframe encoding rules broke
3487         some sites.
3488
3489         Other browsers' behavior keeps changing; let's implement what Firefox and Opera do now:
3490         if the frame and subframe belong to the same site, then the encoding is inherited from parent
3491         frame to subframe. Otherwise, it is not.
3492
3493         Always inheriting the encoding would cause a security problem.
3494
3495         Tests: http/tests/misc/frame-default-enc-different-domain.html
3496                http/tests/misc/frame-default-enc-same-domain.html
3497                fast/encoding/frame-default-enc.html
3498
3499         * loader/FrameLoader.cpp:
3500         (WebCore::FrameLoader::write): Also removed a check for m_frame->document() being non-null -
3501         this function also has code that uses it without checking, so it must be safe.
3502
3503 2008-03-12  Mark Rowe  <mrowe@apple.com>
3504
3505         Gtk build fix.
3506
3507         * page/Frame.h: Forward-declare FramePrivate.
3508
3509 2008-03-11  Steve Falkenburg  <sfalken@apple.com>
3510
3511         Disable LTCG/PGO for all of WebCore for now.
3512         We'll re-enable this as part of follow-on PGO work.
3513         
3514         Reviewed by Oliver.
3515
3516         * WebCore.vcproj/WebCore.vcproj:
3517
3518 2008-03-11  Darin Adler  <darin@apple.com>
3519
3520         Reviewed by Sam.
3521
3522         - remove all bridge-related things from WebCore except the bridge itself
3523
3524         * WebCore.base.exp: Removed the bridge and setBridge functions.
3525
3526         * loader/FrameLoader.cpp:
3527         (WebCore::FrameLoader::detachFromParent): Removed call to the bridge's
3528         close method.
3529
3530         * page/Frame.cpp:
3531         (WebCore::Frame::~Frame): Removed call to setBridge(0).
3532         (WebCore::FramePrivate::FramePrivate): Removed initialization of m_bridge.
3533         * page/Frame.h: Removed setBridge and bridge functions.
3534         * page/FramePrivate.h: Removed m_bridge pointer.
3535         * page/mac/FrameMac.mm: Removed setBridge and bridge functions.
3536
3537         * page/mac/WebCoreFrameBridge.h: Added setWebCoreFrame: method.
3538         Removed bridgeForDOMDocument: and clearFrame methods.
3539         * page/mac/WebCoreFrameBridge.mm: Ditto.
3540         (-[WebCoreFrameBridge close]): Changed to set m_frame to 0 directly.
3541         (-[WebCoreFrameBridge setWebCoreFrame:]): Added.
3542
3543 2008-03-11  Darin Adler  <darin@apple.com>
3544
3545         - restored some code I removed in the Range change; this code can't go
3546           until the rest of the Range fix is in
3547
3548         * dom/Range.cpp:
3549         (WebCore::Range::commonAncestorContainer): Added back the check for 0
3550         that I removed erroneously in the Range patch.
3551         (WebCore::Range::processContents): Left in assertions I used to debug
3552         this.
3553
3554 2008-03-11  Darin Adler  <darin@apple.com>
3555
3556         - fix Release build
3557