99defa831a0d0a413d5f12b283ed932886d2dba3
[WebKit-https.git] / WebCore / ChangeLog
1 2008-03-28  Steve Falkenburg  <sfalken@apple.com>
2
3         Enabled LTCG on files within "page".
4
5         Rubber stamped by Oliver.
6
7         * WebCore.vcproj/WebCore.vcproj:
8
9 2008-03-28  Dan Bernstein  <mitz@apple.com>
10
11         Reviewed by Dave Hyatt.
12
13         - fix a percentage background position regression from r31389
14
15         Test: fast/backgrounds/background-position-1.html
16
17         * rendering/Length.h:
18         (WebCore::Length::calcValue): Divide by 100.
19         (WebCore::Length::calcMinValue): Ditto.
20
21 2008-03-28  David Hyatt  <hyatt@apple.com>
22
23         Back out the Ahem font antialiasing hack, since it is now no longer required for LCD antialiased text
24         to match the reference rendering on Acid 3.
25
26         * platform/graphics/SimpleFontData.h:
27         * platform/graphics/mac/FontMac.mm:
28         (WebCore::Font::drawGlyphs):
29         * platform/graphics/mac/SimpleFontDataMac.mm:
30         (WebCore::SimpleFontData::platformInit):
31         * platform/graphics/win/FontCGWin.cpp:
32         (WebCore::Font::drawGlyphs):
33         * platform/graphics/win/SimpleFontDataCGWin.cpp:
34         (WebCore::SimpleFontData::platformInit):
35         * rendering/RenderBlock.cpp:
36         (WebCore::RenderBlock::positionNewFloats):
37
38 2008-03-28  Brady Eidson  <beidson@apple.com>
39
40         Reviewed by Darin Adler
41
42         More Kit->Core WebArchive changes.
43
44         Create an archive from the current selection in a frame
45
46         * WebCore.base.exp:
47
48         * loader/archive/cf/LegacyWebArchive.cpp:
49         (WebCore::LegacyWebArchive::createFromSelection):
50         * loader/archive/cf/LegacyWebArchive.h:
51
52 2008-03-28  Kevin McCullough  <kmccullough@apple.com>
53
54         - Somehow managed to duplicate code :(
55
56         * xml/XMLHttpRequest.cpp:
57         (WebCore::XMLHttpRequest::didFinishLoading):
58
59 2008-03-28  Kevin McCullough  <kmccullough@apple.com>
60
61         - Missed some changes in previous checkin.
62
63         * xml/XMLHttpRequest.cpp:
64         (WebCore::XMLHttpRequest::send): Get identifier from synchronous loader.
65         (WebCore::XMLHttpRequest::didFinishLoading):
66
67 2008-03-28  Kevin McCullough  <kmccullough@apple.com>
68
69         Reviewed by Adam.
70
71         -<rdar://problem/5712804> XMLHttpRequests do not show response contents, preview images (14313)
72         -<rdar://problem/5712931> XMLHttpRequests should be shown separately and grouped (14315)
73         -<rdar://problem/5732836> XMLHttpRequest: Inspector should show network activity/XHR in Console (17233)
74         - Send the XMLHttpRequest data to the Inspector Controller.
75
76         * loader/FrameLoader.cpp: Return the identifier for this resource since we need it in the XHR case.
77         (WebCore::FrameLoader::loadResourceSynchronously):
78         * loader/FrameLoader.h: Ditto.
79         * page/InspectorController.cpp:
80         (WebCore::XMLHttpRequestResource::XMLHttpRequestResource): We only need the data since the type will
81         be XHR and the encoding is not used (we decoded earlier).
82         (WebCore::XMLHttpRequestResource::~XMLHttpRequestResource): Locking is necessary when setting and clearing
83         the KJS::UString::Rep.
84         (WebCore::InspectorResource::setXMLHttpRequestProperties):
85         (WebCore::InspectorResource::sourceString): Return the decoded source.
86         (WebCore::addSourceToFrame): No longer do the decoding here, it has been encapsulated in the InspectorResource.
87         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
88         * page/InspectorController.h: Pass a UString instead of copying to a WebCore::String.  In case we
89         never ask for the string's contents this will save us an extra copy.
90         * xml/XMLHttpRequest.cpp:
91         (WebCore::XMLHttpRequest::send): In the synchronous load case we normally do not keep the identifier
92         but we need it to find the InspectorResource in order to tell it that it was loaded via XHR.
93         (WebCore::XMLHttpRequest::didFinishLoading): Tell the InspectorController that its resource was loaded
94         via XHR.
95         * xml/XMLHttpRequest.h: Ditto.
96
97 2008-03-28  Brady Eidson  <beidson@apple.com>
98
99         Reviewed by Sam Weinig
100
101         WebArchive saga continues - Can now make archives from ranges in WebCore
102
103         Again, previous layout test coverage exercised this code
104
105         * WebCore.base.exp:
106
107         * editing/markup.cpp:
108         (WebCore::createFullMarkup): Added a "markup from range" variant that copies the previous WebKit implementation
109         * editing/markup.h:
110
111         * loader/archive/cf/LegacyWebArchive.cpp:
112         (WebCore::LegacyWebArchive::create):
113         * loader/archive/cf/LegacyWebArchive.h:
114
115 2008-03-28  Stephanie Lewis  <slewis@apple.com>
116
117         windows build fix.
118
119         * platform/win/MainThreadWin.cpp:
120         (WebCore::initializeThreadingAndMainThread):
121
122 2008-03-28  Brady Eidson  <beidson@apple.com>
123
124         Reviewed by Sam Weinig
125
126         More Kit->Core webarchive code movement
127
128         * WebCore.base.exp:
129         * editing/markup.cpp:
130         (WebCore::createFullMarkup): Replacement for [DOMNode markupString], creating full markup at this node including 
131           the document type string, which the WebKit implementation did indirectly
132         * editing/markup.h:
133
134 2008-03-28  Darin Adler  <darin@apple.com>
135
136         Reviewed by Maciej.
137
138         - cut down on copying and refcount churn a little by using references a bit more for
139           KURL and String
140
141         * bindings/js/JSXMLHttpRequest.cpp:
142         (WebCore::jsXMLHttpRequestPrototypeFunctionOpen): Use const KURL& instead of KURL.
143         * css/StyleSheet.h:
144         (WebCore::StyleSheet::href): Return const String& instead of String.
145         (WebCore::StyleSheet::title): Ditto.
146         * dom/Document.cpp:
147         (WebCore::Document::completeURL): Use const KURL* for a local variable instead of
148         KURL to avoid copying the KURL.
149         * dom/Element.cpp:
150         (WebCore::Element::baseURI): Use const KURL& instead of KURL.
151         * html/HTMLAnchorElement.cpp:
152         (WebCore::HTMLAnchorElement::hostname): Ditto.
153         * html/HTMLFrameElementBase.cpp:
154         (WebCore::HTMLFrameElementBase::isURLAllowed): Ditto.
155         * html/HTMLKeygenElement.cpp: Removed unneeded include of KURL.
156         * page/ContextMenuController.cpp:
157         (WebCore::ContextMenuController::contextMenuItemSelected): Get rid of temporary
158         KURL.
159         * platform/SecurityOrigin.cpp:
160         (WebCore::SecurityOrigin::createForFrame): Use const KURL& instead of KURL.
161
162 2008-03-28  Alexey Proskuryakov  <ap@webkit.org>
163
164         Reviewed by Sam Weinig.
165
166         Fix a dtoa thread safety issue.
167
168         * ForwardingHeaders/kjs/InitializeThreading.h: Added.
169         * platform/MainThread.cpp:
170         * platform/MainThread.h:
171         (WebCore::initializeThreadingAndMainThread): Call KJS::initializeThreading instead of its
172         WTF counterpart.
173
174 2008-03-28  Brent Fulgham  <bfulgham@gmail.com>
175
176         Reviewed by Maciej, landed by Brady
177
178         Correct build regression (http://bugs.webkit.org/show_bug.cgi?id=18148)
179
180         * platform/graphics/win/GraphicsContextCairoWin.cpp:
181         (WebCore::GraphicsContext::getWindowsContext):
182         (WebCore::GraphicsContext::releaseWindowsContext):
183
184 2008-03-28  Brady Eidson  <beidson@apple.com>
185
186         Reviewed by Darin
187
188         "Yet another transitional step" to empty out WebKit-based code for archiving.
189
190         With this patch, the key operation of "Creating a WebArchive rooted at a single Node" takes place
191         entirely within WebCore, and opens the door to saving WebArchives on Windows.
192
193         This is another "zero behavior change" patch, and current editing/ and webarchive/ layout tests
194         covered the relevant code
195
196         * WebCore.base.exp:
197         * loader/archive/cf/LegacyWebArchive.cpp:
198         (WebCore::LegacyWebArchive::create):
199         * loader/archive/cf/LegacyWebArchive.h:
200
201 2008-03-28  Jasper Bryant-Greene  <jasper@unix.geek.nz>
202
203         Reviewed by Alp Toker.
204
205         http://bugs.webkit.org/show_bug.cgi?id=18061
206         PlatformScrollBarGtk attempts to allocate negative width and/or height for widgets
207
208         Missing clampNegativeToZero() call meant that we tried to allocate widgets with negative width and/or height.
209
210         * platform/gtk/PlatformScrollBarGtk.cpp:
211         (PlatformScrollbar::geometryChanged):
212
213 2008-03-28  Brady Eidson  <beidson@apple.com>
214
215         Reviewed by Darin
216
217         Using convertUTF16ToUTF8() from WTF, add a helper function that gives you a UTF8 SharedBuffer
218         created from a String.
219
220         * ForwardingHeaders/wtf/unicode/UTF8.h: Added.
221         * platform/text/PlatformString.h:
222         * platform/text/String.cpp:
223         (WebCore::utf8Buffer):
224
225 2008-03-28  Darin Adler  <darin@apple.com>
226
227         Reviewed by Adam.
228
229         - eliminate a tiny bit of unnecessary refcount churn
230
231         * bindings/js/JSEventTargetBase.cpp:
232         (WebCore::eventNameForPropertyToken): Return const AtomicString&.
233         * bindings/js/JSEventTargetBase.h:
234         (WebCore::JSEventTargetBase::getValueProperty): Update for above change.
235         (WebCore::JSEventTargetBase::putValueProperty): Ditto.
236
237 2008-03-28  Simon Hausmann  <hausmann@webkit.org>
238
239         Fix the Qt build.
240
241         * rendering/Length.h: Include wtf/MathExtras.h for round().
242
243 2008-03-28  David Hyatt  <hyatt@apple.com>
244
245         Fix a bug where background-position truncates instead of rounding when it evaluates to fractional
246         pixel values.  This matches other browsers.
247
248         Reviewed by maciej
249
250         Added fast/backgrounds/background-position-rounding.html
251
252         * rendering/Length.h:
253         (WebCore::Length::calcValue):
254         (WebCore::Length::calcMinValue):
255         * rendering/RenderBox.cpp:
256         (WebCore::RenderBox::calculateBackgroundImageGeometry):
257
258 2008-03-27  Kevin Ollivier  <kevino@theolliviers.com>
259
260         wx build fix. Return a default value for operator == 
261         when !USE(WXGC) (not implemented in that case).
262
263         * platform/graphics/wx/AffineTransformWx.cpp:
264         (WebCore::AffineTransform::operator== ):
265
266 2008-03-27  Maciej Stachowiak  <mjs@apple.com>
267
268         - fix build
269
270         * svg/SVGGlyphMap.h:
271         (WebCore::GlyphMapNode::create):
272
273 2008-03-27  Brady Eidson  <beidson@apple.com>
274
275         Forgot a small requested change before committing
276
277         * loader/DocumentLoader.cpp:
278         (WebCore::DocumentLoader::mainResource):
279
280 2008-03-27  Brady Eidson  <beidson@apple.com>
281
282         Reviewed by Adam Roben
283
284         Move [WebDataSource mainResource] and [WebDataSource subresources] down into WebCore
285         as the push to core-ify WebArchives continues.
286
287         This patch also introduces a behavior change.  WebCore allows ArchiveResources with null or empty data.  
288         WebKit has had the inexplicable distinction of allowing empty Data in a WebResource, but not null.  
289         Since WebResource is API, I decided to leave it be to avoid a behavior change.  But internally created resources 
290         (as in "while archiving a page") are accepting of null or empty data.
291
292         This actually fixes a bug where not all subframes are archived, and resulted in a layout test change.
293
294         * WebCore.base.exp:
295         * loader/DocumentLoader.cpp:
296         (WebCore::DocumentLoader::archiveResourceForURL): Make this const
297         (WebCore::DocumentLoader::mainResource):
298         (WebCore::DocumentLoader::subresource): Make this const and relocate
299         (WebCore::DocumentLoader::getSubresources):
300         * loader/DocumentLoader.h:
301
302 2008-03-27  Maciej Stachowiak  <mjs@apple.com>
303
304         Reviewed by Darin.
305
306         - fixed many buildbot leaks in glyph map code
307
308         * svg/SVGGlyphMap.h:
309         (WebCore::GlyphMapNode::create): Use explicit create pattern, to avoid overreffing and therefore leaking
310         these objects.
311         (WebCore::SVGGlyphMap::add): Call create instead of using new.
312
313 2008-03-27  Maciej Stachowiak  <mjs@apple.com>
314
315         Rubber stamped by Oliver.
316
317         - re-fix Acid3, some code was incorrectly moved when fixing the Qt build
318
319         * rendering/SVGRootInlineBox.cpp:
320         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
321
322 2008-03-27  Simon Hausmann  <hausmann@webkit.org>
323
324         Fix compilation against Qt 4.4 and one missing SVG_FONTS #ifdef.
325
326         * platform/graphics/qt/FontQt.cpp:
327         (WebCore::Font::floatWidth): Forgot to adjust this signture for Qt 4.4.
328         * bindings/js/JSSVGElementWrapperFactory.cpp: Added a missing #ifdef
329         for SVG_FONTS
330
331 2008-03-27  Simon Hausmann  <hausmann@webkit.org>
332
333         Reviewed by Eric Seidel.
334
335         Fix the Qt build and the build without ENABLE(SVG_FONTS)
336
337         * WebCore.pro: Removed ElementTimeControl.idl as it's ObjC only and
338         removed some SVG_FONTS specific idl files from IDL_BINDINGS for now
339         * bindings/js/JSSVGElementWrapperFactory.cpp: altGlyph is
340         ENABLE(SVG_FONTS) only
341         * platform/graphics/qt/FontQt.cpp:
342         (WebCore::Font::floatWidth): Adjust the function signature to Font.h
343         * rendering/SVGRootInlineBox.cpp:
344         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Fix
345         compilation without SVG_FONTS
346         * svg/SVGAltGlyphElement.cpp: Compile only if ENABLE(SVG_FONTS)
347         * svg/SVGAltGlyphElement.h: Ditto
348         * svg/svgtags.in: hkern and altGlyph are SVG_FONTS only.
349         * svg/SVGTSpanElement.cpp:
350         (WebCore::SVGTSpanElement::childShouldCreateRenderer): Compile without
351         SVG_FONTS
352         * svg/SVGTextElement.cpp:
353         (WebCore::SVGTextElement::childShouldCreateRenderer): Ditto
354         * svg/SVGTextPathElement.cpp:
355         (WebCore::SVGTextPathElement::childShouldCreateRenderer):
356
357 2008-03-26  Timothy Hatcher  <timothy@apple.com>
358
359         Rename some Inspector files to facilitate the up-coming UI refresh changes.
360
361         http://bugs.webkit.org/show_bug.cgi?id=17773
362
363         Rubber-stamped by Adam Roben.
364
365         * WebCore.vcproj/WebCore.vcproj:
366         * page/inspector/Console.js: Copied from page/inspector/ConsolePanel.js.
367         * page/inspector/ConsolePanel.js: Removed.
368         * page/inspector/DocumentPanel.js: Removed.
369         * page/inspector/ElementsPanel.js: Copied from page/inspector/DocumentPanel.js.
370         * page/inspector/FontPanel.js: Removed.
371         * page/inspector/FontView.js: Copied from page/inspector/FontPanel.js.
372         * page/inspector/ImagePanel.js: Removed.
373         * page/inspector/ImageView.js: Copied from page/inspector/ImagePanel.js.
374         * page/inspector/NetworkPanel.js: Removed.
375         * page/inspector/ResourcePanel.js: Removed.
376         * page/inspector/ResourceView.js: Copied from page/inspector/ResourcePanel.js.
377         * page/inspector/ResourcesPanel.js: Copied from page/inspector/NetworkPanel.js.
378         * page/inspector/SourcePanel.js: Removed.
379         * page/inspector/SourceView.js: Copied from page/inspector/SourcePanel.js.
380         * page/inspector/WebKit.qrc:
381         * page/inspector/inspector.html:
382
383 2008-03-26  Steve Falkenburg  <sfalken@apple.com>
384
385         Enable LTCG on css, dom files in WebCore
386
387         Reviewed by Stephanie.
388
389         * WebCore.vcproj/WebCore.vcproj:
390
391 2008-03-26  Stephanie Lewis  <slewis@apple.com>
392
393         Fix Windows Build
394
395         * WebCore.vcproj/WebCore.vcproj:
396
397 2008-03-26  Mark Rowe  <mrowe@apple.com>
398
399         Speculative GTK build fix.
400
401         * GNUmakefile.am:
402
403 2008-03-26  Mark Rowe  <mrowe@apple.com>
404
405         Mac build fix.
406
407         * WebCore.base.exp:  Remove nonexistent symbol from the export file.
408
409 2008-03-26  Sam Weinig  <sam@webkit.org>
410
411         Try and fix Gtk+ again.
412
413         * GNUmakefile.am:
414
415 2008-03-26  Dan Bernstein  <mitz@apple.com>
416
417         Reviewed by Dave Hyatt.
418
419         - fix <rdar://problem/5816522> REGRESSION (r30111-30112): Tahoe web cam website has some text in Chinese or japanese
420
421         * html/HTMLParser.cpp:
422         (WebCore::HTMLParser::insertNode): Added call to beginParsingChildren()
423         on the new node.
424         (WebCore::HTMLParser::handleError): Ditto.
425         (WebCore::HTMLParser::reopenResidualStyleTags): Ditto.
426         (WebCore::HTMLParser::pushBlock): Removed incorrect call to
427         beginParsingChildren() on the current node.
428         * manual-tests/applet-finish-parsing-children.html: Added.
429         * manual-tests/resources/DrawMessage.class: Added.
430
431 2008-03-26  Brady Eidson  <beidson@apple.com>
432
433         Reviewed by Darin
434
435         When we create a WebArchive, we walk every node from some starting point, asking each node
436         along the way "What are your subresource URLs?"
437
438         That logic is currently in DOMNode in WebKitMac - this patch moves that ability down into
439         WebCore::Node
440
441         * WebCore.base.exp:
442         
443         * dom/Node.cpp:
444         (WebCore::Node::getSubresourceURLs):
445         (WebCore::Node::getSubresourceAttributeStrings):  Virtual and empty.  Subclasses of Node that have 
446           subresources will override it.
447
448         * dom/ProcessingInstruction.cpp:
449         (WebCore::ProcessingInstruction::getSubresourceAttributeStrings):
450         * dom/ProcessingInstruction.h:
451         * html/HTMLBodyElement.cpp:
452         (WebCore::HTMLBodyElement::getSubresourceAttributeStrings):
453         * html/HTMLBodyElement.h:
454         * html/HTMLEmbedElement.cpp:
455         (WebCore::HTMLEmbedElement::getSubresourceAttributeStrings):
456         * html/HTMLEmbedElement.h:
457         * html/HTMLImageElement.cpp:
458         (WebCore::HTMLImageElement::getSubresourceAttributeStrings):
459         * html/HTMLImageElement.h:
460         * html/HTMLInputElement.cpp:
461         (WebCore::HTMLInputElement::getSubresourceAttributeStrings):
462         * html/HTMLInputElement.h:
463         * html/HTMLLinkElement.cpp:
464         (WebCore::HTMLLinkElement::getSubresourceAttributeStrings):
465         * html/HTMLLinkElement.h:
466         * html/HTMLObjectElement.cpp:
467         (WebCore::HTMLObjectElement::getSubresourceAttributeStrings):
468         * html/HTMLObjectElement.h:
469         * html/HTMLParamElement.cpp:
470         (WebCore::HTMLParamElement::getSubresourceAttributeStrings):
471         * html/HTMLParamElement.h:
472         * html/HTMLScriptElement.cpp:
473         (WebCore::HTMLScriptElement::getSubresourceAttributeStrings):
474         * html/HTMLScriptElement.h:
475         * html/HTMLTableCellElement.cpp:
476         (WebCore::HTMLTableCellElement::getSubresourceAttributeStrings):
477         * html/HTMLTableCellElement.h:
478         * html/HTMLTableElement.cpp:
479         (WebCore::HTMLTableElement::getSubresourceAttributeStrings):
480         * html/HTMLTableElement.h:
481         * svg/SVGCursorElement.cpp:
482         (WebCore::SVGCursorElement::getSubresourceAttributeStrings):
483         * svg/SVGCursorElement.h:
484         * svg/SVGFEImageElement.cpp:
485         (WebCore::SVGFEImageElement::getSubresourceAttributeStrings):
486         * svg/SVGFEImageElement.h:
487         * svg/SVGImageElement.cpp:
488         (WebCore::SVGImageElement::getSubresourceAttributeStrings):
489         * svg/SVGImageElement.h:
490         * svg/SVGScriptElement.cpp:
491         (WebCore::SVGScriptElement::getSubresourceAttributeStrings):
492         * svg/SVGScriptElement.h:
493
494 2008-03-26  Dan Bernstein  <mitz@apple.com>
495
496         Reviewed by Dave Hyatt.
497
498         - maintain subpixel-antialiasing when drawing text with a simple shadow
499
500         * platform/graphics/mac/FontMac.mm:
501         (WebCore::Font::drawComplexText): If the shadow has a zero blur radius,
502         draw the shadow by drawing the text at an offset instead of relying on
503         Core Graphics shadows.
504         (WebCore::Font::drawGlyphs): Ditto.
505         * platform/graphics/win/FontCGWin.cpp:
506         (WebCore::Font::drawGlyphs): Ditto.
507
508 2008-03-26  Brady Eidson  <beidson@apple.com>
509
510         Reviewed by Mark Rowe
511
512         Part of the continued push to move WebArchive-related code down to WebCore, this
513         moves [WebDataSource subresourceForURL:] down to DocumentLoader->subresource()
514
515         * WebCore.base.exp:
516         * loader/DocumentLoader.cpp:
517         (WebCore::DocumentLoader::subresource): Create an ArchiveResource from a CachedResource if it exists
518           Otherwise, fallback to an ArchiveResource from the current Archive if any.  Otherwise, return null
519         * loader/DocumentLoader.h:
520
521         * loader/archive/ArchiveResource.cpp:
522         (WebCore::ArchiveResource::create):
523         (WebCore::ArchiveResource::ArchiveResource):
524         * loader/archive/ArchiveResource.h:
525
526 2008-03-26  Sam Weinig  <sam@webkit.org>
527
528         Fix Gtk+ build.
529
530         * GNUmakefile.am:
531
532 2008-03-26  Mark Rowe  <mrowe@apple.com>
533
534         Rubber-stamped by Brady Eidson.
535
536         Update FEATURE_DEFINES to be consistent with the other locations in which it is defined.
537
538         * Configurations/WebCore.xcconfig:
539
540 2008-03-26  Brent Fulgham  <bfulgham@gmail.com>
541
542         Reviewed by Adam Roben.
543
544         Add necessary files and build commands to vcproj files to
545         build a Curl-based Windows WebKit.  For details, see
546         http://bugs.webkit.org/show_bug.cgi?id=17985
547
548         * WebCore.vcproj/WebCore.vcproj:
549
550 2008-03-26  Adam Roben  <aroben@apple.com>
551
552         Record JS exceptions triggered by the Inspector's use of JSC
553
554         We now dump all exceptions returned from JavaScriptCore into the
555         Inspector's console.
556
557         The HANDLE_EXCEPTION macro records the line on which the exception was
558         returned. It calls a new private handleException method on
559         InspectorController.
560
561         Reviewed by Kevin McCullough.
562
563         * page/InspectorController.cpp:
564         (WebCore::InspectorController::callSimpleFunction): Made this be a
565         member of InspectorController so that it can call handleException.
566         (WebCore::addSourceToFrame): Pass the exception pointer on to inner
567         JSC calls, and check it after those calls return.
568         (WebCore::getResourceDocumentNode): Ditto.
569         (WebCore::search): Ditto. Also changed the name/type of an existing
570         exception variable to ExceptionCode ec.
571         (WebCore::databaseTableNames): Ditto.
572         (WebCore::moveByUnrestricted): Ditto.
573         (WebCore::InspectorController::~InspectorController): Check for and
574         record exceptions as we call JSC.
575         (WebCore::InspectorController::focusNode): Ditto.
576         (WebCore::InspectorController::scriptObjectReady): Ditto.
577         (WebCore::addHeaders): Added an exception parameter.
578         (WebCore::scriptObjectForRequest): Ditto.
579         (WebCore::scriptObjectForResponse): Ditto.
580         (WebCore::InspectorController::addScriptResource): Check for and
581         record exceptions as we call JSC.
582         (WebCore::InspectorController::addAndUpdateScriptResource): Ditto.
583         (WebCore::InspectorController::removeScriptResource): Ditto. Also
584         moved the call to setScriptObject to before the JSC calls so that it
585         will always be called even if we return early if JSC throws an
586         exception.
587         (WebCore::InspectorController::updateScriptResourceRequest): Check for
588         and record exceptions as we call JSC.
589         (WebCore::InspectorController::updateScriptResourceResponse): Ditto.
590         (WebCore::InspectorController::updateScriptResource): Ditto.
591         (WebCore::InspectorController::addDatabaseScriptResource): Ditto.
592         (WebCore::InspectorController::removeDatabaseScriptResource): Ditto.
593         Also moved the call to setScriptObject to before the JSC calls so that
594         it will always be called even if we return early if JSC throws an
595         exception.
596         (WebCore::InspectorController::addScriptConsoleMessage): Check for and
597         record exceptions as we call JSC.
598         (WebCore::InspectorController::handleException): Added.
599         * page/InspectorController.h:
600
601 2008-03-26  Darin Adler  <darin@apple.com>
602
603         Rubber stamped by Maciej.
604
605         - removed a couple log messages in error cases that are handled internally
606
607         * platform/text/TextCodecICU.cpp:
608         (WebCore::TextCodecICU::decode): Removed the LOG_ERROR.
609         * platform/text/mac/TextCodecMac.cpp:
610         (WebCore::TextCodecMac::decode): Ditto.
611
612 2008-03-26  Sam Weinig  <sam@webkit.org>
613
614         Reviewed by Adam Roben.
615
616         * page/Location.idl: Don't enumerate toString.
617
618 2008-03-26  Mark Rowe  <mrowe@apple.com>
619
620         Release build fix.
621
622         * rendering/SVGRootInlineBox.cpp:
623         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Initialize svgFont to zero.
624
625 2008-03-26  Maciej Stachowiak  <mjs@apple.com>
626
627         Reviewed by Hyatt and Adam.
628
629         Coded by me and Darin.
630         
631         - SVG kerning support (horizontal kerning only for now since we don't do vertical text layout right yet) 
632         
633         Acid3 100/100
634
635         * DerivedSources.make:
636         * WebCore.vcproj/WebCore.vcproj:
637         * WebCore.xcodeproj/project.pbxproj:
638         * platform/graphics/Font.cpp:
639         (WebCore::Font::floatWidth):
640         (WebCore::Font::isSVGFont):
641         * platform/graphics/Font.h:
642         * rendering/SVGInlineTextBox.cpp:
643         (WebCore::SVGInlineTextBox::calculateGlyphWidth):
644         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
645         * rendering/SVGInlineTextBox.h:
646         * rendering/SVGRootInlineBox.cpp:
647         (WebCore::cummulatedWidthOrHeightOfTextChunk):
648         (WebCore::SVGRootInlineBox::buildLayoutInformation):
649         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
650         * rendering/SVGRootInlineBox.h:
651         (WebCore::LastGlyphInfo::LastGlyphInfo):
652         * svg/SVGFont.cpp:
653         (WebCore::SVGTextRunWalker::walk):
654         (WebCore::Font::svgFont):
655         (WebCore::floatWidthOfSubStringUsingSVGFont):
656         (WebCore::Font::floatWidthUsingSVGFont):
657         (WebCore::Font::drawTextUsingSVGFont):
658         (WebCore::Font::selectionRectForTextUsingSVGFont):
659         * svg/SVGFontElement.cpp:
660         (WebCore::SVGFontElement::invalidateGlyphCache):
661         (WebCore::SVGFontElement::ensureGlyphCache):
662         (WebCore::parseUnicodeRange):
663         (WebCore::parseUnicodeRangeList):
664         (WebCore::stringMatchesUnicodeRange):
665         (WebCore::matches):
666         (WebCore::SVGFontElement::getHorizontalKerningPairForStringsAndGlyphs):
667         * svg/SVGFontElement.h:
668         * svg/SVGGlyphElement.cpp:
669         (WebCore::SVGGlyphElement::insertedIntoDocument):
670         (WebCore::SVGGlyphElement::removedFromDocument):
671         * svg/SVGHKernElement.cpp: Added.
672         (WebCore::SVGHKernElement::SVGHKernElement):
673         (WebCore::SVGHKernElement::~SVGHKernElement):
674         (WebCore::SVGHKernElement::insertedIntoDocument):
675         (WebCore::SVGHKernElement::removedFromDocument):
676         (WebCore::SVGHKernElement::buildHorizontalKerningPair):
677         * svg/SVGHKernElement.h: Added.
678         (WebCore::SVGHorizontalKerningPair::SVGHorizontalKerningPair):
679         (WebCore::SVGHKernElement::rendererIsNeeded):
680         * svg/SVGHKernElement.idl: Added.
681         * svg/SVGTextContentElement.cpp:
682         (WebCore::cummulatedCharacterRangeLength):
683         (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
684         * svg/svgtags.in:
685
686 2008-03-26  Sam Weinig  <sam@webkit.org>
687
688         Reviewed by Adam Roben.
689
690         Autogenerate JSLocation.
691
692         * GNUmakefile.am:
693         * WebCore.pro:
694         * WebCore.vcproj/WebCore.vcproj:
695         * WebCore.xcodeproj/project.pbxproj:
696         * WebCoreSources.bkl:
697         Add files.
698
699         * DerivedSources.make: Add Location, remove JSLocation.lut.h
700         * bindings/js/JSDOMWindowBase.cpp:
701         (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate):
702         (WebCore::JSDOMWindowBase::getValueProperty):
703         (WebCore::JSDOMWindowBase::put):
704         (WebCore::JSDOMWindowBase::clearHelperObjectProperties):
705         (WebCore::JSDOMWindowBase::disconnectFrame):
706         * bindings/js/JSDOMWindowBase.h:
707         Remove manuel management of the Location object.
708
709         * bindings/js/JSDOMWindowCustom.cpp:
710         (WebCore::JSDOMWindow::mark): Add marking of JSLocation.
711         (WebCore::JSDOMWindow::setLocation): Add custom setLocation as we only want to do this when
712         safe and we need to keep Dashboard quirks.
713
714         * bindings/js/JSDocumentCustom.cpp:
715         (WebCore::JSDocument::location):
716         Fetch the location object using the normal toJS route.
717
718         * bindings/js/JSLocation.cpp: Removed.
719         * bindings/js/JSLocation.h: Removed.
720         * bindings/js/JSLocationCustom.cpp: Added.
721         (WebCore::JSLocation::customGetOwnPropertySlot):
722         (WebCore::JSLocation::customPut):
723         (WebCore::JSLocation::deleteProperty):
724         (WebCore::JSLocation::customGetPropertyNames):
725         (WebCore::navigateIfAllowed):
726         (WebCore::JSLocation::setHref):
727         (WebCore::JSLocation::setProtocol):
728         (WebCore::JSLocation::setHost):
729         (WebCore::JSLocation::setHostname):
730         (WebCore::JSLocation::setPort):
731         (WebCore::JSLocation::setPathname):
732         (WebCore::JSLocation::setSearch):
733         (WebCore::JSLocation::setHash):
734         (WebCore::JSLocation::replace):
735         (WebCore::JSLocation::reload):
736         (WebCore::JSLocation::assign):
737         (WebCore::JSLocation::toString):
738         Setter and Functions need custom implementations as they rely on the dynamic
739         global object for determining the behavior of the navigation.
740
741         * history/CachedPage.cpp:
742         (WebCore::CachedPage::CachedPage):
743         (WebCore::CachedPage::restore):
744         (WebCore::CachedPage::clear):
745         * history/CachedPage.h:
746         Removed all the special casing for location as it should be treated like all
747         the other objects hanging off the window.
748
749         * page/DOMWindow.cpp:
750         (WebCore::DOMWindow::clear):
751         (WebCore::DOMWindow::location):
752         * page/DOMWindow.h:
753         (WebCore::DOMWindow::optionalLocation):
754         * page/DOMWindow.idl:
755         Add Location accessor and pointer getter for marking.
756
757         * page/Location.cpp: Added.
758         (WebCore::Location::Location):
759         (WebCore::Location::disconnectFrame):
760         (WebCore::Location::url):
761         (WebCore::Location::href):
762         (WebCore::Location::protocol):
763         (WebCore::Location::host):
764         (WebCore::Location::hostname):
765         (WebCore::Location::port):
766         (WebCore::Location::pathname):
767         (WebCore::Location::search):
768         (WebCore::Location::hash):
769         (WebCore::Location::toString):
770         * page/Location.h: Added.
771         (WebCore::Location::create):
772         (WebCore::Location::frame):
773         * page/Location.idl: Added.
774
775 2008-03-26  David Hyatt  <hyatt@apple.com>
776
777         Add support for the rendering and measurement of the <altGlyph> element in SVG.  This patch brings
778         is half of what's needed to reach 100/100 on Acid3 and pass the test.  Maciej has coded up the other half. :)
779
780         Reviewed by mjs
781
782         Added svg/custom/altGlyph.svg
783
784         * svg/SVGAltGlyphElement.cpp:
785         (WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
786         (WebCore::SVGAltGlyphElement::glyphElement):
787         * svg/SVGAltGlyphElement.h:
788         * svg/SVGFont.cpp:
789         (WebCore::SVGTextRunWalker::walk):
790         * svg/SVGFontFaceElement.cpp:
791         (WebCore::SVGFontFaceElement::insertedIntoDocument):
792         * svg/SVGGlyphElement.cpp:
793         (WebCore::SVGGlyphElement::insertedIntoDocument):
794         (WebCore::SVGGlyphElement::removedFromDocument):
795
796 2008-03-26  Adam Roben  <aroben@apple.com>
797
798         Turn on SVG animation on Windows
799
800         Also touched some files to force things to rebuild/regenerate.
801
802         * WebCore.vcproj/WebCore.vcproj: Added ENABLE_SVG_ANIMATION.
803         * WebCore.vcproj/build-generated-files.sh: Ditto.
804         * bindings/scripts/CodeGenerator.pm: Touched.
805         * config.h: Touched.
806         * svg/svgtags.in: Touched.
807
808 2008-03-26  Justin Garcia  <justin.garcia@apple.com>
809
810         Reviewed by Harrison.
811
812         <rdar://problem/5820749> REGRESSION (Safari 3.1): Mail's plain text reply omits blank line following the attribution
813
814         * editing/markup.cpp:
815         (WebCore::createFragmentFromText): When asked to create a fragment from "Attribution:\n"
816         with a context from [html, 0] to [html, 0], we'd return "<html>Attribution</html><br>".
817         Don't enclose paragraphs in clones of the context's enclosing block if that block is the
818         html or body element.  Currently no way to test [DOMHTMLElement createFragmentFromText:].
819
820 2008-03-26  Antti Koivisto  <antti@apple.com>
821
822         Reviewed by Anders.
823
824         http://bugs.webkit.org/show_bug.cgi?id=17077
825         Bug 17077: SVG SMIL animation is currently broken (and turned off) (affects Acid3 tests 75 and 76)
826
827         - enable SVG animation support.
828         - basic implementation of beginElement()/endElement().
829         
830         Animation definitely will need more work than this, but it is a start!
831
832         * Configurations/WebCore.xcconfig:
833         * svg/SVGAnimationElement.cpp:
834         (WebCore::SVGAnimationElement::SVGAnimationElement):
835         (WebCore::SVGAnimationElement::updateAnimatedValueForElapsedSeconds):
836         (WebCore::SVGAnimationElement::beginElement):
837         (WebCore::SVGAnimationElement::beginElementAt):
838         (WebCore::SVGAnimationElement::endElement):
839         (WebCore::SVGAnimationElement::endElementAt):
840         * svg/SVGAnimationElement.h:
841
842 2008-03-26  Mark Rowe  <mrowe@apple.com>
843
844         Reviewed by David Hyatt.
845
846         Make the Ahem font antialias correctly on Acid3 on Tiger.
847
848         * WebCore.Tiger.exp:
849         * platform/graphics/mac/SimpleFontDataMac.mm:
850         (WebCore::SimpleFontData::platformInit):
851         * platform/mac/WebCoreSystemInterface.h:
852         * platform/mac/WebCoreSystemInterface.mm:
853
854 2008-03-26  Simon Hausmann  <hausmann@webkit.org>
855
856         Attempt to fix the Qt build.
857
858         * platform/text/qt/TextCodecQt.cpp: Adjust function signature.
859         (WebCore::TextCodecQt::decode):
860         * platform/text/qt/TextCodecQt.h: Ditto.
861
862 2008-03-26  Dan Bernstein  <mitz@apple.com>
863
864         Reviewed by Anders Carlsson.
865
866         - fix http://bugs.webkit.org/show_bug.cgi?id=18104
867           REGRESSION: LEAK: 2 InlineBox in editing/inserting/12882.html
868
869         * rendering/bidi.cpp:
870         (WebCore::RenderBlock::layoutInlineChildren): When deciding to ditch
871         old clean lines (due to changed or newly-added floats), keep the
872         reference to those lines so they can be properly deleted in the end,
873         and use a separate flag to signal that no matching should be attempted.
874
875 2008-03-26  Mark Rowe  <mrowe@apple.com>
876
877         Speculative Windows build fix.
878
879         * platform/graphics/win/SimpleFontDataCGWin.cpp:
880
881 2008-03-25  Steve Falkenburg  <sfalken@apple.com>
882
883         Turn on link-time-codegen in html and rendering related files.
884
885         Reviewed by Oliver.
886
887         * WebCore.vcproj/WebCore.vcproj:
888
889 2008-03-26  Maciej Stachowiak  <mjs@apple.com>
890
891         Reviewed by Darin.
892
893         - fixed "SVG multichar glyph matching matches longest instead of first (affects Acid3 test 79)"
894         http://bugs.webkit.org/show_bug.cgi?id=18118
895
896         * svg/SVGFont.cpp:
897         (WebCore::SVGTextRunWalker::walk):
898         * svg/SVGFontElement.cpp:
899         (WebCore::SVGFontElement::SVGFontElement):
900         (WebCore::SVGFontElement::addGlyphToCache):
901         (WebCore::SVGFontElement::removeGlyphFromCache):
902         (WebCore::SVGFontElement::ensureGlyphCache):
903         (WebCore::SVGFontElement::getGlyphIdentifiersForString):
904         * svg/SVGFontElement.h:
905         * svg/SVGGlyphElement.h:
906         (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
907         * svg/SVGGlyphMap.h: Added. New radix tree based glyph map.
908         (WebCore::GlyphMapNode::GlyphMapNode):
909         (WebCore::SVGGlyphMap::SVGGlyphMap):
910         (WebCore::SVGGlyphMap::add):
911         (WebCore::SVGGlyphMap::compareGlyphPriority):
912         (WebCore::SVGGlyphMap::get):
913         (WebCore::SVGGlyphMap::clear):
914
915 2008-03-26  David Hyatt  <hyatt@apple.com>
916
917         Fix build bustage on Tiger.  Tiger will not have the bug fix.
918
919         * platform/graphics/mac/SimpleFontDataMac.mm:
920         (WebCore::SimpleFontData::platformInit):
921         * platform/graphics/win/SimpleFontDataCGWin.cpp:
922         (WebCore::SimpleFontData::platformInit):
923
924 2008-03-26  David Hyatt  <hyatt@apple.com>
925
926         Make the Ahem font antialias correctly on Acid3.
927
928         Reviewed by Dan
929
930         * platform/graphics/SimpleFontData.h:
931         * platform/graphics/mac/FontMac.mm:
932         (WebCore::Font::drawGlyphs):
933         * platform/graphics/mac/SimpleFontDataMac.mm:
934         (WebCore::SimpleFontData::platformInit):
935         * platform/graphics/win/FontCGWin.cpp:
936         (WebCore::Font::drawGlyphs):
937         * platform/graphics/win/SimpleFontDataCGWin.cpp:
938         (WebCore::SimpleFontData::platformInit):
939
940 2008-03-26  Mark Rowe  <mrowe@apple.com>
941
942         Fix the Mac build.
943
944         * WebCore.xcodeproj/project.pbxproj:  Copy the newly generated header into the right place.
945
946 2008-03-26  Adam Roben  <aroben@apple.com>
947
948         Fix Bug 17768: REGRESSION (r30146): Inspector no longer shows elements
949         properties
950
951         <http://bugs.webkit.org/show_bug.cgi?id=17768>
952
953         We were throwing an exception from Object.describe because of some
954         undefined variables.
955
956         Reviewed by Tim Hatcher.
957
958         * page/inspector/utilities.js:
959         (Object.describe): Reinstate the type1 and type2 variables that were
960         removed in r30146. They're still used when formatting a function.
961
962 2008-03-26  Eric Seidel  <eric@webkit.org>
963
964         Reviewed by darin.
965
966         Forgot to add braces darin asked for during review.
967
968         * dom/XMLTokenizer.cpp:
969         (WebCore::XMLTokenizer::write):
970
971 2008-03-26  Eric Seidel  <eric@webkit.org>
972
973         Reviewed by darin.
974
975         Fix, makes us pass Test 70
976         XML documents should be strict about encoding checks
977         http://bugs.webkit.org/show_bug.cgi?id=17079
978
979         Test: fast/encoding/invalid-xml.html
980
981         * WebCore.base.exp:
982         * dom/XMLTokenizer.cpp:
983         (WebCore::XMLTokenizer::write):
984         * loader/CachedFont.cpp:
985         (WebCore::CachedFont::ensureSVGFontData):
986         * loader/TextResourceDecoder.cpp:
987         (WebCore::TextResourceDecoder::TextResourceDecoder):
988         (WebCore::TextResourceDecoder::decode):
989         * loader/TextResourceDecoder.h:
990         * platform/text/TextCodec.h:
991         (WebCore::TextCodec::decode):
992         * platform/text/TextCodecICU.cpp:
993         (WebCore::TextCodecICU::decodeToBuffer):
994         (WebCore::ErrorCallbackSetter::ErrorCallbackSetter):
995         (WebCore::ErrorCallbackSetter::~ErrorCallbackSetter):
996         (WebCore::TextCodecICU::decode):
997         * platform/text/TextCodecICU.h:
998         * platform/text/TextCodecLatin1.cpp:
999         * platform/text/TextCodecLatin1.h:
1000         * platform/text/TextCodecUTF16.cpp:
1001         * platform/text/TextCodecUTF16.h:
1002         * platform/text/TextCodecUserDefined.cpp:
1003         * platform/text/TextCodecUserDefined.h:
1004         * platform/text/TextDecoder.cpp:
1005         (WebCore::TextDecoder::checkForBOM):
1006         * platform/text/TextDecoder.h:
1007         (WebCore::TextDecoder::decode):
1008         * platform/text/TextEncoding.cpp:
1009         (WebCore::TextEncoding::decode):
1010         * platform/text/TextEncoding.h:
1011         (WebCore::TextEncoding::decode):
1012         * platform/text/mac/TextCodecMac.cpp:
1013         (WebCore::TextCodecMac::decode):
1014         * platform/text/mac/TextCodecMac.h:
1015
1016 2008-03-26  Antti Koivisto  <antti@apple.com>
1017
1018         Reviewed by Adam.
1019
1020         Add ElementTimeControl interface to SVGAnimationElement.
1021         Passes Acid3 test 75.
1022
1023         * DerivedSources.make:
1024         * WebCore.pro:
1025         * WebCore.vcproj/WebCore.vcproj:
1026         * WebCore.xcodeproj/project.pbxproj:
1027         * bindings/scripts/CodeGeneratorObjC.pm:
1028         * svg/ElementTimeControl.h: Added.
1029         (WebCore::ElementTimeControl::~ElementTimeControl):
1030         * svg/ElementTimeControl.idl: Added.
1031         * svg/SVGAnimationElement.cpp:
1032         (WebCore::SVGAnimationElement::beginElement):
1033         (WebCore::SVGAnimationElement::beginElementAt):
1034         (WebCore::SVGAnimationElement::endElement):
1035         (WebCore::SVGAnimationElement::endElementAt):
1036         * svg/SVGAnimationElement.h:
1037         * svg/SVGAnimationElement.idl:
1038
1039 2008-03-26  Kevin McCullough  <kmccullough@apple.com>
1040
1041         - LayoutTest fix.  Null check.
1042
1043         * xml/XMLHttpRequest.cpp:
1044         (WebCore::XMLHttpRequest::send):
1045
1046 2008-03-26  Dan Bernstein  <mitz@apple.com>
1047
1048         Reviewed by Darin Adler.
1049
1050         - fix http://bugs.webkit.org/show_bug.cgi?id=17994
1051           REGRESSION (523-525+) View not updated when changing CSS size via JavaScript
1052         - fix http://bugs.webkit.org/show_bug.cgi?id=18063
1053           REGRESSION (r31250): Small bug that just cropped up in WebKit r31275
1054
1055         Tests: fast/repaint/subtree-root-clip.html
1056                fast/repaint/subtree-root-clip-2.html
1057                fast/repaint/subtree-root-clip-3.html
1058
1059         * rendering/LayoutState.cpp:
1060         (WebCore::LayoutState::LayoutState): Changed to not set an initial clip.
1061         Since the root is clipping, there is no need to set a clip, and setting
1062         the clip based on the container was wrong because often the root was
1063         not included in the container's overflow rect because it had its own
1064         layer.
1065         * rendering/RenderBox.cpp:
1066         (WebCore::RenderBox::absolutePosition): Removed code that added table
1067         cell's extra top offset only in the slow (recursive) code path.
1068         * rendering/RenderTableCell.cpp:
1069         (WebCore::RenderTableCell::absolutePosition): Added code to add the
1070         extra top offset in both code paths.
1071
1072 2008-03-26  Simon Hausmann  <hausmann@webkit.org>
1073
1074         Fix the Qt build.
1075
1076         * platform/graphics/qt/FontQt.cpp:
1077         (WebCore::Font::floatWidth):
1078
1079 2008-03-24  Maciej Stachowiak  <mjs@apple.com>
1080
1081         Reviewed by Eric.
1082
1083         - fixed "SVGTextElement.getStartPositionOfChar does not correctly account for multichar glyphs"
1084         http://bugs.webkit.org/show_bug.cgi?id=18046
1085
1086         * platform/graphics/Font.cpp:
1087         (WebCore::Font::floatWidth): Allow expressing a run that has extra "context" characters beyond the end,
1088         and reporting of how many characters were actually consumed, to support multichar glyphs in SVG fonts.
1089         * platform/graphics/Font.h:
1090         * rendering/SVGInlineTextBox.cpp:
1091         (WebCore::SVGInlineTextBox::calculateGlyphWidth): Pass along extra chars in argument and chars consumed out
1092         argument.
1093         (WebCore::SVGInlineTextBox::calculateGlyphHeight): Pass along extra chars in argument.
1094         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries): Add boilerplate; may not handle multichar glyphs
1095         right but I don't know what effects this would have.
1096         * rendering/SVGInlineTextBox.h:
1097         * rendering/SVGRootInlineBox.cpp:
1098         (WebCore::cummulatedWidthOrHeightOfTextChunk): Add boilerplate; may not handle multichar glyphs right
1099         but again I am not sure what effect this would have.
1100         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Account for multichar glyphs - let glyph
1101         selection consider extra chars, and account for the fact that a glyph may have consumed multiple chars.
1102         * rendering/SVGRootInlineBox.h:
1103         * svg/SVGFont.cpp:
1104         (WebCore::SVGTextRunWalker::walk): This is the place where glyph selection happens, so this is where
1105         we accout for multichar glyphs (both looking at extra chars past the end of the run, and reporting how
1106         many chars were consumed).
1107         (WebCore::floatWidthOfSubStringUsingSVGFont): Pass aforementioned info through the layers.
1108         (WebCore::Font::floatWidthUsingSVGFont): ditto
1109         (WebCore::Font::drawTextUsingSVGFont): ditto
1110         (WebCore::Font::selectionRectForTextUsingSVGFont): ditto
1111         * svg/SVGTextContentElement.cpp:
1112         (WebCore::cummulatedCharacterRangeLength): ditto
1113         (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback): ditto
1114
1115 2008-03-25  Beth Dakin  <bdakin@apple.com>
1116
1117         Reviewed by Oliver.
1118
1119         Fix for <rdar://problem/5811826> CSSValueList::item() does not 
1120         range-check index
1121
1122         Check bounds before accessing the item to avoid a crash. 
1123         itemWithoutBoundsCheck() is still inlined and not bounds-checked to 
1124         avoid slowing down our internal callers of item().
1125         * css/CSSValueList.cpp:
1126         (WebCore::CSSValueList::item):
1127         * css/CSSValueList.h:
1128         (WebCore::CSSValueList::itemWithoutBoundsCheck):
1129
1130         Call itemWithoutBoundsCheck() to avoid slowing down these internal 
1131         callers.
1132         * css/CSSFontSelector.cpp:
1133         (WebCore::CSSFontSelector::addFontFaceRule):
1134         * css/CSSMutableStyleDeclaration.cpp:
1135         (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue):
1136         * css/CSSStyleSelector.cpp:
1137         (WebCore::applyCounterList):
1138         (WebCore::CSSStyleSelector::applyProperty):
1139         * css/MediaQueryEvaluator.cpp:
1140         (WebCore::parseAspectRatio):
1141         * svg/SVGFontFaceElement.cpp:
1142         (WebCore::SVGFontFaceElement::rebuildFontFace):
1143         * svg/graphics/SVGPaintServer.cpp:
1144         (WebCore::dashArrayFromRenderingStyle):
1145
1146 2008-03-25  Antti Koivisto  <antti@apple.com>
1147
1148         Reviewed by Oliver.
1149
1150         Fix http://bugs.webkit.org/show_bug.cgi?id=18082
1151         REGRESSION (r31287): GMail does not work if user stylesheet is set
1152         
1153         Oops, my cache refactoring patch was missing these rather essential lines for
1154         user stylesheets. They would get reloaded repeatedly.
1155
1156         * loader/Cache.cpp:
1157         (WebCore::Cache::requestUserCSSStyleSheet):
1158
1159 2008-03-25  Matt Lilek  <webkit@mattlilek.com>
1160
1161         Rubber stamped by Adam
1162
1163         Roll out r31300 since it causes assertion failures on page load.
1164         See http://bugs.webkit.org/show_bug.cgi?id=18093
1165
1166         * page/InspectorController.cpp:
1167         (WebCore::InspectorController::didFinishLoading):
1168         (WebCore::InspectorController::didFailLoading):
1169
1170 2008-03-25  Darin Adler  <darin@apple.com>
1171
1172         Reviewed by Anders.
1173
1174         - fix http://bugs.webkit.org/show_bug.cgi?id=17252
1175           Acid3 test removing Nodes during NodeIterator walk fails (affects Acid3 test 2)
1176
1177         Test: traversal/acid3-test-2.html
1178
1179         * bindings/js/JSNodeIteratorCustom.cpp:
1180         (WebCore::JSNodeIterator::nextNode): Update since result is PassRefPtr.
1181         (WebCore::JSNodeIterator::previousNode): Ditto.
1182         * dom/NodeIterator.cpp:
1183         (WebCore::NodeIterator::nextNode): Changed result to PassRefPtr. Added code to
1184         track both the current candidate (which needs to move along to the next node
1185         if current node is deleted) and the current provisional result (passed to acceptNode,
1186         and needs to be returned even if it's deleted).
1187         (WebCore::NodeIterator::previousNode): Ditto.
1188         (WebCore::NodeIterator::nodeWillBeRemoved): Call updateForNodeRemoval for
1189         m_candidateNode as well as m_referenceNode.
1190         * dom/NodeIterator.h: Use PassRefPtr for return values.
1191
1192 2008-03-25  Brady Eidson  <beidson@apple.com>
1193
1194         Reviewed by Anders
1195
1196         Add the ability to transform a CString into a SharedBuffer to avoid copying data
1197         This is valuable to avoid copying a block of data for an upcoming patch
1198
1199         * platform/SharedBuffer.cpp:
1200         (WebCore::SharedBuffer::adoptVector):
1201         * platform/SharedBuffer.h:
1202
1203         * platform/text/CString.cpp:
1204         (WebCore::CString::releaseBuffer):
1205         * platform/text/CString.h:
1206         (WebCore::CStringBuffer::releaseBuffer):
1207
1208 2008-03-25  Brady Eidson  <beidson@apple.com>
1209
1210         Attempt to fix .bkl build systems after recent archive additions
1211
1212         * webcore-base.bkl:
1213
1214 2008-03-25  Kevin McCullough  <kmccullough@apple.com>
1215
1216         Reviewed by Adam.
1217
1218         - Cleaned up the needless use of RefPtrs, which we may someday no longer use for
1219         InspectorResources.
1220
1221         * page/InspectorController.cpp:
1222         (WebCore::InspectorController::didFinishLoading):
1223         (WebCore::InspectorController::didFailLoading):
1224
1225 2008-03-25  Kevin McCullough  <kmccullough@apple.com>
1226
1227         Reviewed by Adam.
1228
1229         - Added a null check
1230
1231         * xml/XMLHttpRequest.cpp: Null check
1232         (WebCore::XMLHttpRequest::send):
1233
1234 2008-03-25  Kevin McCullough  <kmccullough@apple.com>
1235
1236         Reviewed by Tim.
1237
1238         -<rdar://problem/5712804> XMLHttpRequests do not show response contents, preview images (14313)
1239         -<rdar://problem/5712931> XMLHttpRequests should be shown separately and grouped (14315)
1240         -<rdar://problem/5732836> XMLHttpRequest: Inspector should show network activity/XHR in Console (17233)
1241         - XMLHttpRequestResources now identify themselves to the inspector which caches the data related to
1242         the request since no one else caches it.  However this is just the plumbing and the Inspector's UI
1243         has not been changed to show XHR resources yet. 
1244
1245         * page/InspectorController.cpp: Add ability to set XHR data on an InspectorResource.
1246         (WebCore::XMLHttpRequestResource::XMLHttpRequestResource):
1247         (WebCore::XMLHttpRequestResource::data):
1248         (WebCore::XMLHttpRequestResource::encoding):
1249         (WebCore::InspectorResource::): Add new type.
1250         (WebCore::InspectorResource::~InspectorResource): No longer virtual since we are not using inheritance.
1251         (WebCore::InspectorResource::type): Ditto.
1252         (WebCore::InspectorResource::setXMLHttpRequestResource):
1253         (WebCore::InspectorResource::isXHR):
1254         (WebCore::InspectorResource::xmlHttpRequestData):
1255         (WebCore::InspectorResource::xmlHttpRequestEncoding):
1256         (WebCore::InspectorResource::InspectorResource):
1257         (WebCore::addSourceToFrame):
1258         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
1259         * page/InspectorController.h: Add accessor for setting the XHR data.
1260         * page/inspector/Resource.js: Keep the XHR resource types in sync with the Inspector Controller.
1261         * xml/XMLHttpRequest.cpp: Give the InspectorController the XHR information to cache.
1262         (WebCore::XMLHttpRequest::send):
1263
1264 2008-03-25  Adam Roben  <aroben@apple.com>
1265
1266         Add an UnusedParam.h forwarding header for use by testapi
1267
1268         Reviewed by Steve Falkenburg.
1269
1270         * ForwardingHeaders/wtf/UnusedParam.h: Added.
1271
1272 2008-03-25  Brady Eidson  <beidson@apple.com>
1273
1274         Reviewed by Adam Roben
1275
1276         <rdar://problem/5819308> - View Source is empty when view webarchives
1277
1278         * WebCore.base.exp:
1279         * loader/DocumentLoader.cpp:
1280         (WebCore::DocumentLoader::setParsedArchiveData):
1281         (WebCore::DocumentLoader::parsedArchiveData):
1282         * loader/DocumentLoader.h:
1283
1284         * loader/FrameLoader.cpp:
1285         (WebCore::FrameLoader::finishedLoadingDocument): Set the archive's MainResource data as the parsedArchiveData
1286           in the DocumentLoader
1287
1288 2008-03-25  Eric Seidel  <eric@webkit.org>
1289
1290         Reviewed by Oliver.
1291
1292         Speculative crash fix for Acid3 crasher.
1293         I couldn't figure out how to make a test case for this?
1294         Suggestions welcome.
1295
1296         * css/CSSFontSelector.cpp: null check document->renderer()
1297
1298 2008-03-25  Antti Koivisto  <antti@apple.com>
1299
1300         Reviewed by Geoff Garen.
1301
1302         Some memory cache cleanups:
1303         - Separate CachedResource loading from construction, initiate load using a separate load() method.
1304         - Add special case function to Cache for loading user stylesheets. This allows removal
1305           of a bunch of parameters from several methods and CachedResource constructors.
1306         - Construct CachedResources with m_inCache set to false which is quite a bit more logical as they
1307           are not yet in the cache at that point.
1308         - Pass encoding around as const String& instead of const String*.
1309
1310         * css/CSSImageValue.cpp:
1311         (WebCore::CSSImageValue::image):
1312         * html/HTMLImageLoader.cpp:
1313         (WebCore::HTMLImageLoader::updateFromElement):
1314         * loader/Cache.cpp:
1315         (WebCore::createResource):
1316         (WebCore::Cache::requestResource):
1317         (WebCore::Cache::requestUserCSSStyleSheet):
1318         (WebCore::Cache::remove):
1319         * loader/Cache.h:
1320         * loader/CachedCSSStyleSheet.cpp:
1321         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
1322         * loader/CachedCSSStyleSheet.h:
1323         * loader/CachedFont.cpp:
1324         (WebCore::CachedFont::CachedFont):
1325         (WebCore::CachedFont::load):
1326         (WebCore::CachedFont::ref):
1327         * loader/CachedFont.h:
1328         * loader/CachedImage.cpp:
1329         (WebCore::CachedImage::CachedImage):
1330         (WebCore::CachedImage::load):
1331         * loader/CachedImage.h:
1332         * loader/CachedResource.cpp:
1333         (WebCore::CachedResource::CachedResource):
1334         (WebCore::CachedResource::~CachedResource):
1335         (WebCore::CachedResource::load):
1336         * loader/CachedResource.h:
1337         (WebCore::CachedResource::load):
1338         * loader/CachedScript.cpp:
1339         (WebCore::CachedScript::CachedScript):
1340         * loader/CachedScript.h:
1341         * loader/CachedXBLDocument.cpp:
1342         (WebCore::CachedXBLDocument::CachedXBLDocument):
1343         * loader/CachedXBLDocument.h:
1344         * loader/CachedXSLStyleSheet.cpp:
1345         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
1346         * loader/CachedXSLStyleSheet.h:
1347         * loader/DocLoader.cpp:
1348         (WebCore::DocLoader::requestImage):
1349         (WebCore::DocLoader::requestFont):
1350         (WebCore::DocLoader::requestCSSStyleSheet):
1351         (WebCore::DocLoader::requestUserCSSStyleSheet):
1352         (WebCore::DocLoader::requestScript):
1353         (WebCore::DocLoader::requestXSLStyleSheet):
1354         (WebCore::DocLoader::requestXBLDocument):
1355         (WebCore::DocLoader::requestResource):
1356         (WebCore::DocLoader::preload):
1357         * loader/DocLoader.h:
1358
1359 2008-03-25  Darin Adler  <darin@apple.com>
1360
1361         Reviewed by Anders.
1362
1363         - avoid converting UString to String and then later to AtomicString
1364
1365         1% speedup on Acid3 test 26
1366
1367         This is inefficient for the case where there's already an AtomicString.
1368         By first creating and destroying a String we waste time.
1369
1370         * bindings/scripts/CodeGeneratorJS.pm: Use const UString& for string
1371         arguments rather than using String; this uses the object as it's produced
1372         from toString rather than creating a new temporary object that might not
1373         be of the right type. The type conversion happens at the callsite instead.
1374         Also eliminate the ability to use the type AtomicString from IDL.
1375
1376         * dom/KeyboardEvent.idl: AtomicString -> DOMString.
1377         * dom/MouseEvent.idl: Ditto.
1378         * dom/MutationEvent.idl: Ditto.
1379         * dom/UIEvent.idl: Ditto.
1380         * svg/SVGStyleElement.idl: Ditto.
1381
1382 2008-03-25  Brady Eidson  <beidson@apple.com>
1383
1384         Build fix for non-CoreFoundation platforms
1385
1386         * loader/archive/ArchiveFactory.cpp:
1387
1388 2008-03-25  Brady Eidson  <beidson@apple.com>
1389
1390         Reviewed by Darin
1391
1392         Remove newly obsolete FrameLoaderClient methods
1393
1394         * loader/FrameLoaderClient.h:
1395         * svg/graphics/SVGImageEmptyClients.h:
1396         (WebCore::SVGEmptyFrameLoaderClient::setMainDocumentError):
1397         (WebCore::SVGEmptyFrameLoaderClient::finishedLoading):
1398
1399 2008-03-25  Brady Eidson  <beidson@apple.com>
1400
1401         Reviewed by Darin
1402
1403         <rdar://problem/4516169> - Support WebArchives on Windows
1404         And pave the way for many future WebArchive bug fixes and enhancements
1405
1406         This patch accomplishes two main goals:
1407         1 - Consolidates much of the spread out WebKitMac archive code into one place in WebCore.  This allows for cleaner refactoring 
1408             in the future as well as adding more archive formats with ease.
1409         2 - Hooks up WebArchive support on Windows.  Safari-style .webarchive files are nothing more than property lists readable by
1410             CoreFoundation.  While there are still some outstanding issues, including an NSKeyedArchiver chunk of data for the 
1411             ResourceResponse for each resource, this patch manually parses through the property list on CoreFoundation platforms and
1412             gets many archives loading on Windows
1413
1414         My goal for this first cut was zero behavior change.  As such, I went for a direct port of the WebKitMac code.  There will be
1415         opportunities for redesign and refactoring as followups.
1416
1417         * WebCore.base.exp:
1418
1419         * loader/DocumentLoader.cpp:
1420         (WebCore::DocumentLoader::setupForReplaceByMIMEType): Ported from WebKitMac, WebDataSource
1421         (WebCore::DocumentLoader::addAllArchiveResources):
1422         (WebCore::DocumentLoader::addArchiveResource):
1423         (WebCore::DocumentLoader::archiveResourceForURL):
1424         (WebCore::DocumentLoader::popArchiveForSubframe):
1425         (WebCore::DocumentLoader::clearArchiveResources):
1426         * loader/DocumentLoader.h:
1427
1428         * loader/FrameLoader.cpp: Moved WebFrameLoaderClient and WebFrame code down into their more appropriate FrameLoader home
1429         (WebCore::FrameLoader::FrameLoader):
1430         (WebCore::FrameLoader::setDefersLoading):
1431         (WebCore::FrameLoader::deliverArchivedResourcesAfterDelay):
1432         (WebCore::FrameLoader::archiveResourceDeliveryTimerFired):
1433         (WebCore::FrameLoader::loadURLIntoChildFrame):
1434         (WebCore::FrameLoader::loadArchive):
1435         (WebCore::FrameLoader::scheduleArchiveLoad):
1436         (WebCore::FrameLoader::stopAllLoaders):
1437         (WebCore::FrameLoader::cancelPendingArchiveLoad):
1438         (WebCore::FrameLoader::isArchiveLoadPending):
1439         (WebCore::FrameLoader::finishedLoadingDocument):
1440         * loader/FrameLoader.h:
1441
1442         * loader/ResourceLoader.cpp:
1443         (WebCore::ResourceLoader::load):
1444
1445         * loader/archive/Archive.h: Generic "Archive of web resources" class that is only useful when subclassed.  
1446             Contains a MainResource, subresources, and Archives for subframes
1447         (WebCore::Archive::mainResource):
1448         (WebCore::Archive::subresources):
1449         (WebCore::Archive::subframeArchives):
1450         (WebCore::Archive::setMainResource):
1451         (WebCore::Archive::addSubresource):
1452         (WebCore::Archive::addSubframeArchive):
1453
1454         * loader/archive/ArchiveFactory.cpp: A class that will take raw archive data and the MIMEtype, and create the
1455             appropriate Archive class for it.  Additionally it handles registering the known MIMEtypes for all known archive formats
1456         (WebCore::archiveFactoryCreate):
1457         (WebCore::archiveMIMETypes):
1458         (WebCore::ArchiveFactory::isArchiveMimeType):
1459         (WebCore::ArchiveFactory::create):
1460         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
1461         * loader/archive/ArchiveFactory.h:
1462
1463         * loader/archive/ArchiveResource.cpp: Analog to "WebResource" in WebKitMac.  Contains the data and other important
1464             attributes of an archived resource
1465         (WebCore::ArchiveResource::create):
1466         (WebCore::ArchiveResource::ArchiveResource):
1467         (WebCore::ArchiveResource::response):
1468         * loader/archive/ArchiveResource.h:
1469         (WebCore::ArchiveResource::data):
1470         (WebCore::ArchiveResource::url):
1471         (WebCore::ArchiveResource::mimeType):
1472         (WebCore::ArchiveResource::textEncoding):
1473         (WebCore::ArchiveResource::frameName):
1474         (WebCore::ArchiveResource::ignoreWhenUnarchiving):
1475         (WebCore::ArchiveResource::shouldIgnoreWhenUnarchiving):
1476
1477         * loader/archive/ArchiveResourceCollection.cpp: Analog of "WebUnarchivingState" in WebKitMac.  Contains a hash of
1478             all the resources for every frame in an archive, and contains the archives for each subframe needed to load a multi-frame archive
1479         (WebCore::ArchiveResourceCollection::ArchiveResourceCollection):
1480         (WebCore::ArchiveResourceCollection::addAllResources):
1481         (WebCore::ArchiveResourceCollection::addResource):
1482         (WebCore::ArchiveResourceCollection::archiveResourceForURL):
1483         (WebCore::ArchiveResourceCollection::popSubframeArchive):
1484         * loader/archive/ArchiveResourceCollection.h:
1485
1486         * loader/archive/cf/LegacyWebArchive.cpp: Subclass of Archive specifically for Webkit's Objective-C based ".webarchive" format.
1487             Mostly a collection of static methods involved in parsing and serializing a WebKit-style .webarchive.  Is mostly supported
1488             for any CF platform.
1489         (WebCore::createPropertyListRepresentationFromResource):
1490         (WebCore::createPropertyListRep):
1491         (WebCore::createResourceResponseFromPropertyListData):
1492         (WebCore::createResource):
1493         (WebCore::LegacyWebArchive::create):
1494         (WebCore::LegacyWebArchive::LegacyWebArchive):
1495         (WebCore::LegacyWebArchive::init):
1496         (WebCore::LegacyWebArchive::extract):
1497         (WebCore::LegacyWebArchive::rawDataRepresentation):
1498         (WebCore::createResourceResponseFromMacArchivedData):
1499         (WebCore::propertyListDataFromResourceResponse):
1500         * loader/archive/cf/LegacyWebArchive.h:
1501         * loader/archive/cf/LegacyWebArchiveMac.mm:
1502         (WebCore::createResourceResponseFromMacArchivedData):
1503         (WebCore::propertyListDataFromResourceResponse):
1504
1505         * platform/network/mac/ResourceRequest.h:
1506         * platform/network/mac/ResourceRequestMac.mm:
1507         (WebCore::ResourceRequest::applyWebArchiveHackForMail): Tweak the resource request for Mac clients when loading WebArchives
1508
1509 2008-03-25  David Hyatt  <hyatt@apple.com>
1510
1511         Cut and paste error in the zoom code.  A width() should have been a height().  Regression tests caught this.
1512
1513         * page/DOMWindow.cpp:
1514         (WebCore::DOMWindow::innerHeight):
1515
1516 2008-03-24  Darin Adler  <darin@apple.com>
1517
1518         - try to fix broken Wx build
1519
1520         * platform/wx/TemporaryLinkStubs.cpp:
1521         (GraphicsContext::setPlatformShadow):
1522         (GraphicsContext::clearPlatformShadow):
1523
1524 2008-03-24  Darin Adler  <darin@apple.com>
1525
1526         Reviewed by Sam.
1527
1528         - use AtomicString more consistently for attribute values
1529
1530         1% speedup on Acid3 test 26
1531
1532         * dom/Element.cpp:
1533         (WebCore::Element::setAttribute): Changed value argument to AtomicString.
1534         Also fixed call to lower() to only be done if the name isn't already lowercase.
1535         Also took out one unneeded condition in a cascade of if statements.
1536         (WebCore::Element::createAttribute): Ditto.
1537         (WebCore::Element::setAttributeNS): Ditto.
1538         * dom/Element.h: Ditto.
1539         * dom/StyledElement.cpp:
1540         (WebCore::StyledElement::createAttribute): Ditto.
1541         * dom/StyledElement.h: Ditto.
1542
1543 2008-03-24  Darin Adler  <darin@apple.com>
1544
1545         Reviewed by Sam.
1546
1547         - get rid of extra level of function call in toJS functions for Node
1548
1549         0.6% speedup on Acid3 test 26
1550
1551         * bindings/js/JSNodeCustom.cpp:
1552         (WebCore::toJS): Take a raw pointer, not a PassRefPtr, like other toJS functions.
1553
1554         * bindings/scripts/CodeGeneratorJS.pm: Add an inlined toJS for EventTargetNode*
1555         to avoid ambiguity that otherwise exists between the toJS for EventTarget* and
1556         for Node*.
1557
1558 2008-03-24  Darin Adler  <darin@apple.com>
1559
1560         Reviewed by Hyatt.
1561
1562         - add fast path to isValidName that does not use advanced Unicode functions
1563
1564         2% speedup on Acid3 test 26
1565
1566         * dom/Document.cpp:
1567         (WebCore::isValidNameNonASCII): Added. Contains the old isValidName function.
1568         (WebCore::isValidNameASCII): Added. Contains a simpler function that returns
1569         true for most valid names that are also all ASCII.
1570         (WebCore::Document::isValidName): Changed to call both of the above functions.
1571         The common case is that isValidNameASCII returns true so isValidNameNonASCII
1572         is never called.
1573
1574 2008-03-24  David Hyatt  <hyatt@apple.com>
1575
1576         Fix for bug 18052, window properties need to respect zoom factor.
1577
1578         Reviewed by Beth
1579
1580         * page/DOMWindow.cpp:
1581         (WebCore::DOMWindow::innerHeight):
1582         (WebCore::DOMWindow::innerWidth):
1583         (WebCore::DOMWindow::scrollX):
1584         (WebCore::DOMWindow::scrollY):
1585         (WebCore::DOMWindow::scrollTo):
1586         * page/FrameView.cpp:
1587         (WebCore::FrameViewPrivate::reset):
1588         (WebCore::FrameView::layout):
1589         (WebCore::FrameView::performPostLayoutTasks):
1590
1591 2008-03-24  Sam Weinig  <sam@webkit.org>
1592
1593         Reviewed by Darin Adler.
1594
1595         Fix http://bugs.webkit.org/show_bug.cgi?id=18048
1596         The "thisObject" parameter to JSEvaluateScript is not used properly
1597
1598         * bindings/js/kjs_proxy.cpp:
1599         (WebCore::KJSProxy::evaluate): No need to pass a thisObject since we want the global object to be used.
1600         * bridge/jni/jni_jsobject.mm:
1601         (JavaJSObject::eval): To avoid any change to this function, don't pass a thisObject to keep the same
1602         behavior.
1603
1604 2008-03-24  Brady Eidson  <beidson@apple.com>
1605
1606         Reviewed by Darin's rubberstamp
1607
1608         Land a load of empty files for upcoming work to make sure I'm not breaking any platform's build
1609
1610         * GNUmakefile.am:
1611         * WebCore.pro:
1612         * WebCore.vcproj/WebCore.vcproj:
1613         * WebCore.xcodeproj/project.pbxproj:
1614         * WebCoreSources.bkl:
1615         * loader/archive: Added.
1616         * loader/archive/Archive.h: Added.
1617         * loader/archive/ArchiveFactory.cpp: Added.
1618         * loader/archive/ArchiveFactory.h: Added.
1619         * loader/archive/ArchiveResource.cpp: Added.
1620         * loader/archive/ArchiveResource.h: Added.
1621         * loader/archive/ArchiveResourceCollection.cpp: Added.
1622         * loader/archive/ArchiveResourceCollection.h: Added.
1623         * loader/archive/cf: Added.
1624         * loader/archive/cf/LegacyWebArchive.cpp: Added.
1625         * loader/archive/cf/LegacyWebArchive.h: Added.
1626         * loader/archive/cf/LegacyWebArchiveMac.mm: Added.
1627
1628 2008-03-24  David Hyatt  <hyatt@apple.com>
1629
1630         Fix for bug 18009. Make sure the IE offset/client/scroll*** extensions respect full page zoom.
1631
1632         Reviewed by Beth
1633
1634         * dom/Element.cpp:
1635         (WebCore::localZoomForRenderer):
1636         (WebCore::adjustForLocalZoom):
1637         (WebCore::adjustForAbsoluteZoom):
1638         (WebCore::Element::offsetLeft):
1639         (WebCore::Element::offsetTop):
1640         (WebCore::Element::offsetWidth):
1641         (WebCore::Element::offsetHeight):
1642         (WebCore::Element::clientLeft):
1643         (WebCore::Element::clientTop):
1644         (WebCore::Element::clientWidth):
1645         (WebCore::Element::clientHeight):
1646         (WebCore::Element::scrollLeft):
1647         (WebCore::Element::scrollTop):
1648         (WebCore::Element::setScrollLeft):
1649         (WebCore::Element::setScrollTop):
1650         (WebCore::Element::scrollWidth):
1651         (WebCore::Element::scrollHeight):
1652         * rendering/RenderBox.cpp:
1653         (WebCore::RenderBox::setStyle):
1654         * rendering/RenderObject.cpp:
1655         (WebCore::RenderObject::offsetParent):
1656         * rendering/RenderObject.h:
1657
1658 2008-03-24  Brady Eidson  <beidson@apple.com>
1659
1660         Reviewed by Darin
1661
1662         Some style cleanup and add a logging channel for upcoming work
1663
1664         * platform/Logging.cpp:
1665         * platform/Logging.h:
1666
1667         * platform/MIMETypeRegistry.cpp:
1668         (WebCore::initializeSupportedImageMIMETypes):
1669         (WebCore::initializeSupportedNonImageMimeTypes):
1670
1671 2008-03-24  Dan Bernstein  <mitz@apple.com>
1672
1673         Reviewed by Sam Weinig.
1674
1675         - fix <rdar://problem/5812292> CrashTracer: [REGRESSION] 60 crashes in Safari at com.apple.WebCore: WebCore::RenderObject::repaintRectangle + 47
1676
1677         Test: fast/repaint/renderer-destruction-by-invalidateSelection-crash.html
1678
1679         * page/FrameView.cpp:
1680         (WebCore::FrameViewPrivate::reset): Removed repaintRects code.
1681         (WebCore::FrameView::layout): Ditto.
1682         (WebCore::FrameView::addRepaintInfo): Removed.
1683
1684         * page/FrameView.h: Removed addRepaintInfo().
1685
1686         * rendering/RenderBlock.cpp:
1687         (WebCore::RenderBlock::layoutBlock): Changed to call repaintRectangle
1688         instead of FrameView::addRepaintInfo().
1689         * rendering/RenderTable.cpp:
1690         (WebCore::RenderTable::layout): Ditto.
1691
1692 2008-03-24  Alp Toker  <alp@atoker.com>
1693
1694         GTK+/soup http backend build fix for breakage introduced in r31141.
1695         Fix suggested by Xan.
1696
1697         * platform/network/ResourceHandle.h:
1698
1699 2008-03-24  Dan Bernstein  <mitz@apple.com>
1700
1701         Reviewed by Sam Weinig.
1702
1703         - fix <rdar://problem/5792582> CSS opacity does not work with GDI text
1704         - fix <rdar://problem/5792619> non-opaque CSS colors do not work with GDI text (RGBA, HSLA)
1705         - fix <rdar://problem/5792624> GDI text can't be stroked/filled independently
1706         - make text-shadow work with GDI text
1707         - make -webkit-background-clip: text work with GDI text
1708
1709         * platform/graphics/GraphicsContext.cpp:
1710         (WebCore::GraphicsContext::setShadow): Made this a shared method that
1711         updates the state and calls the platform-specific method.
1712         (WebCore::GraphicsContext::clearShadow): Ditto.
1713         (WebCore::GraphicsContext::getShadow): Added.
1714
1715         * platform/graphics/GraphicsContext.h:
1716         (WebCore::GraphicsContext::WindowsBitmap): Added this class that
1717         represents a bitmap with a Windows device context that GDI can draw into.
1718
1719         * platform/graphics/GraphicsContextPrivate.h:
1720         (WebCore::GraphicsContextState::GraphicsContextState): Added the shadow
1721         parameters to the graphics state.
1722
1723         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1724         (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform-
1725         specific implementation to this.
1726         (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform-
1727         specific implementation to this.
1728
1729         * platform/graphics/cg/GraphicsContextCG.cpp:
1730         (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform-
1731         specific implementation to this.
1732         (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform-
1733         specific implementation to this.
1734
1735         * platform/graphics/qt/GraphicsContextQt.cpp:
1736         (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform-
1737         specific implementation to this.
1738         (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform-
1739         specific implementation to this.
1740
1741         * platform/graphics/win/FontCGWin.cpp:
1742         (WebCore::toCGFloat): Added. Converts a Windows FIXED.
1743         (WebCore::createPathForGlyph): Added. Retrieves a glyph's hinted
1744         outline from GDI and creates a CGPath containing it.
1745         (WebCore::Font::drawGlyphs): Added two code paths in the GDI case.
1746         The existing code path, which uses GDI to draw text directly to the
1747         graphics context, is used for opaque-colored, non-transformed,
1748         non-stroked, non-shadowed text in a GDI-backed graphics context that is
1749         not in a transparency layer.
1750         An additional code path is used for non-stroked text in all other cases.
1751         It uses GDI to draw black text into an all-white Windows bitmap, then
1752         uses the green channel as a mask to create a bitmap with the desired
1753         fill color and alpha. The bitmap is then drawn into the graphics
1754         context, at which time transparency layers, transforms and shadows are
1755         handled properly.
1756         A third code path is used for stroked text. It constructs a path from
1757         hinted glyph outlines retrieved from GDI and strokes (and optionally
1758         fills) it.
1759
1760         * platform/graphics/win/GraphicsContextCGWin.cpp:
1761         (WebCore::GraphicsContext::getWindowsContext): Added a mayCreateBitmap
1762         parameter. When false, prevents this method from creating a Windows
1763         device context if the graphics context does not already have one.
1764         (WebCore::GraphicsContext::releaseWindowsContext): Added a
1765         mayCreateBitmap parameter to match getWindowsContext().
1766         (WebCore::GraphicsContext::WindowsBitmap::WindowsBitmap):
1767         (WebCore::GraphicsContext::WindowsBitmap::~WindowsBitmap):
1768         (WebCore::GraphicsContext::createWindowsBitmap): Added.
1769         (WebCore::GraphicsContext::drawWindowsBitmap): Added. Draws the bitmap
1770         as a non-alpha-premultiplied image.
1771
1772 2008-03-24  Kevin McCullough <kmccullough@apple.com>
1773
1774           - Fixed Changelog
1775
1776 2008-03-24  Marco Barisione  <marco.barisione@collabora.co.uk>
1777
1778         Reviewed by Alp Toker.
1779
1780         http://bugs.webkit.org/show_bug.cgi?id=17845
1781         [GTK] combo box menu displayed in the wrong position
1782
1783         * platform/gtk/PopupMenuGtk.cpp:
1784         (WebCore::PopupMenu::show): Change the popup menu vertical position so
1785         that the active item is over the combo box.
1786         (WebCore::PopupMenu::menuPositionFunction): use the "push in" style
1787         like native GTK+ combo boxes to handle menus that don't fit in the
1788         screen.
1789
1790 2008-03-24  Adam Roben  <aroben@apple.com>
1791
1792         * WebCore.vcproj/WebCore.vcproj: Add files from WebCore/page/inspector
1793         to the project.
1794
1795 2008-03-24  Alexey Proskuryakov  <ap@webkit.org>
1796
1797         Build fix.
1798
1799         * WebCore.xcodeproj/project.pbxproj: Added DOMSVGAltGlyphElement.h and
1800         DOMSVGAltGlyphElementInternal.h to Copy Generated Headers phase.
1801
1802 2008-03-24  Eric Seidel  <eric@webkit.org>
1803
1804         Build fix, no review.
1805
1806         Fix project paths to be group relative instead of project relative
1807
1808         * WebCore.xcodeproj/project.pbxproj:
1809
1810 2008-03-23  Maciej Stachowiak  <mjs@apple.com>
1811
1812         Reviewed by Eric.
1813
1814         - fixed "SVGTextElement.getNumberOfChars is broken for altGlyph (affects Acid3 test 79)"
1815         http://bugs.webkit.org/show_bug.cgi?id=17062
1816
1817         * svg/SVGAltGlyphElement.cpp: Added. Implementation for new element.
1818         (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
1819         (WebCore::SVGAltGlyphElement::~SVGAltGlyphElement):
1820         (WebCore::SVGAltGlyphElement::setGlyphRef):
1821         (WebCore::SVGAltGlyphElement::glyphRef):
1822         (WebCore::SVGAltGlyphElement::setFormat):
1823         (WebCore::SVGAltGlyphElement::format):
1824         (WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
1825         (WebCore::SVGAltGlyphElement::createRenderer): For now, this just renders as a tspan,
1826         which is right for everything besides the alternate glyph substitution itself.
1827         * svg/SVGAltGlyphElement.h: Added. Header for new element.
1828         (WebCore::SVGAltGlyphElement::contextElement):
1829         * svg/SVGAltGlyphElement.idl: Added. Interface for new element.
1830         * svg/SVGTSpanElement.cpp:
1831         (WebCore::SVGTSpanElement::childShouldCreateRenderer): Allow altGlyph to render here.
1832         * svg/SVGTextElement.cpp:
1833         (WebCore::SVGTextElement::childShouldCreateRenderer): ditto
1834         * svg/SVGTextPathElement.cpp:
1835         (WebCore::SVGTextPathElement::childShouldCreateRenderer): ditto
1836         * svg/svgtags.in: Add altGlyph
1837         * DerivedSources.make: Add new files
1838         * GNUmakefile.am: ditto
1839         * WebCore.SVG.exp: Add new ObjC DOM class
1840         * WebCore.pro: Add new files
1841         * WebCore.vcproj/WebCore.vcproj: ditto
1842         * WebCore.xcodeproj/project.pbxproj: ditto
1843         * bindings/js/JSSVGElementWrapperFactory.cpp: Handle altGlyph
1844         * bindings/objc/DOM.mm:
1845         (WebCore::createElementClassMap): ditto
1846         * bindings/objc/DOMInternal.h: Include altGlyph header
1847         * bindings/objc/DOMSVG.h: Include altGlyph header
1848
1849 2008-03-23  Robert Blaut  <webkit@blaut.biz>
1850
1851         Reviewed by eseidel.  Landed by eseidel.
1852
1853         Bug 17685: [~=] attribute selector failing to match empty string
1854         <http://bugs.webkit.org/show_bug.cgi?id=17685>
1855
1856         Test: fast/css/attribute-selector-empty-value.html
1857
1858         * css/CSSStyleSelector.cpp:
1859         (WebCore::CSSStyleSelector::checkOneSelector):
1860
1861 2008-03-22  Marco Barisione  <marco.barisione@collabora.co.uk>
1862
1863         Reviewed by Darin Adler.
1864
1865         http://bugs.webkit.org/show_bug.cgi?id=16339
1866         Frame scrollbar positions are not updated on page scroll
1867
1868         Widget::geometryChanged() was called instead of
1869         ScrollViewScrollbar::geometryChanged() because of a missing const.
1870
1871         * platform/gtk/ScrollViewGtk.cpp:
1872         (WebCore::ScrollViewScrollbar::geometryChanged): add the missing
1873         const.
1874
1875 2008-03-22  Rodney Dawes  <dobey@wayofthemonkey.com>
1876
1877         Reviewed by Mark Rowe.
1878
1879         Bug 17974: REGRESSION: npfunctions.h should not import npruntime_internal.h
1880         <http://bugs.webkit.org/show_bug.cgi?id=17974>
1881         <rdar://problem/5782310>
1882
1883         Include npapi.h and npruntime.h directly in npfunctions.h.
1884         Add npfunctions.h and npapi.h to npruntime_internal.h.
1885         Replace includes of npfunctions.h with npruntime_internal.h.
1886
1887         * bridge/npruntime_internal.h:
1888         * plugins/PluginPackage.h:
1889         * plugins/PluginStream.h:
1890         * plugins/npapi.cpp:
1891         * plugins/npfunctions.h:
1892
1893 2008-03-22  Mark Rowe  <mrowe@apple.com>
1894
1895         Qt build fix.
1896
1897         * bridge/qt/qt_runtime.cpp:
1898         (KJS::Bindings::valueRealType):
1899
1900 2008-03-22  Eric Seidel  <eric@webkit.org>
1901
1902         Reviewed by mjs.
1903
1904         Unify handling of NAMESPACE_ERR and fix Acid3 test 25
1905         http://bugs.webkit.org/show_bug.cgi?id=16693
1906
1907         Test: fast/dom/DOMImplementation/createDocumentType-err.html
1908
1909         * dom/DOMImplementation.cpp:
1910         (WebCore::DOMImplementation::createDocumentType):
1911         (WebCore::DOMImplementation::createDocument):
1912         * dom/DOMImplementation.idl:
1913         * dom/Document.cpp:
1914         (WebCore::Document::hasPrefixNamespaceMismatch):
1915         (WebCore::Document::createElementNS):
1916         (WebCore::Document::parseQualifiedName):
1917         (WebCore::Document::createAttributeNS):
1918         * dom/Document.h:
1919         * dom/Element.cpp:
1920         (WebCore::Element::setAttributeNS):
1921         * editing/FormatBlockCommand.cpp:
1922         (WebCore::FormatBlockCommand::doApply):
1923
1924 2008-03-22  Eric Seidel  <eric@webkit.org>
1925
1926         Reviewed by mjs.
1927
1928         Fix createElementNS to throw exceptions for invalid qualified names
1929         Fixes Acid3 sub-test 23
1930         http://bugs.webkit.org/show_bug.cgi?id=16833
1931
1932         Tests: fast/dom/Document/createAttributeNS-namespace-err.html
1933                fast/dom/Document/createElementNS-namespace-err.html
1934
1935         * dom/Document.cpp:
1936         (WebCore::Document::createElement):
1937         (WebCore::hasNamespaceError):
1938         (WebCore::Document::createElementNS):
1939         (WebCore::Document::createAttributeNS):
1940         * dom/Document.idl:
1941
1942 2008-03-21  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
1943
1944         Reviewed by Oliver Hunt.
1945
1946         Bug 13693: REGRESSION (r13615): Acid2 Test Eyes render improperly after a page refresh
1947         <http://bugs.webkit.org/show_bug.cgi?id=13693>
1948
1949         Do not create bogus history items for unloaded <object> elements, because they
1950         cause fallback content to be ignored on reload.
1951
1952         * loader/FrameLoader.cpp:
1953         (WebCore::FrameLoader::createHistoryItemTree):
1954
1955 2008-03-21  Dan Bernstein  <mitz@apple.com>
1956
1957         Reviewed by Oliver Hunt.
1958
1959         - fix http://bugs.webkit.org/show_bug.cgi?id=17988
1960           REGRESSION (r31114-31132): Crash in InlineBox::isDirty() opening chowhound.com
1961
1962         Test: fast/css-generated-content/empty-content-with-float-crash.html
1963
1964         * rendering/bidi.cpp:
1965         (WebCore::RenderBlock::layoutInlineChildren): Added a null check for
1966         the case where the block contains no in-flow elements but still lays
1967         out as a line flow, which can happen as a result of empty generated
1968         content.
1969
1970 2008-03-21  Sam Weinig  <sam@webkit.org>
1971
1972         Reviewed by Oliver Hunt.
1973
1974         Fix <rdar://problem/5788451>
1975         toDataURL not implemented for Windows (need mapping of MIME type to UTI)
1976
1977         Hard code support for just PNG's on windows, the minimum the spec requires.
1978
1979         * platform/MIMETypeRegistry.cpp:
1980         (WebCore::initializeSupportedImageMIMETypesForEncoding):
1981         * platform/graphics/cg/ImageBufferCG.cpp:
1982         (WebCore::utiFromMIMEType):
1983         (WebCore::ImageBuffer::toDataURL):
1984
1985 2008-03-21  Matt Lilek  <webkit@mattlilek.com>
1986
1987         Not reviewed, Mac build fix.
1988
1989         * bindings/objc/WebScriptObject.mm:
1990         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1991         * bridge/jni/jni_utility.cpp:
1992         (KJS::Bindings::convertValueToJValue):
1993         * bridge/objc/objc_runtime.mm:
1994         (ObjcFallbackObjectImp::callAsFunction):
1995
1996 2008-03-21  Adam Roben  <aroben@apple.com>
1997
1998         Attempt to fix the Mac build
1999
2000         * bindings/objc/DOMUtility.mm:
2001         (KJS::createDOMWrapper):
2002
2003 2008-03-21  Adam Roben  <aroben@apple.com>
2004
2005         Rename static info members to s_info
2006
2007         This avoids conflicts with custom "info" methods, such as the one that
2008         will soon be added to Console.
2009
2010         Reviewed by Ada Chan and Sam Weinig.
2011
2012 2008-03-21  David Hyatt  <hyatt@apple.com>
2013
2014         <rdar://problem/5808863> Zooming should not let non-zero border width become zero
2015
2016         Make sure zoomed values that begin >= 1 are not allowed to fall below 1.
2017
2018         Reviewed by adele
2019
2020         * css/CSSPrimitiveValue.cpp:
2021         (WebCore::CSSPrimitiveValue::computeLengthDouble):
2022         * loader/CachedImage.cpp:
2023         (WebCore::CachedImage::imageSize):
2024         (WebCore::CachedImage::imageRect):
2025
2026 2008-03-21  Kevin McCullough  <kmccullough@apple.com>
2027
2028         Reviewed by Sam.
2029
2030         -<rdar://problem/5712804> XMLHttpRequests do not show response contents, preview images (14313)
2031         -<rdar://problem/5712931> XMLHttpRequests should be shown separately and grouped (14315)
2032         -<rdar://problem/5732836> XMLHttpRequest: Inspector should show network activity/XHR in Console (17233)
2033         - Instrument the InspectorController to cache XHR resrouces since they are not cached by WebCore.
2034         The resources will be kept in the same map as all other resources so they will have the exact
2035         same lifecycle. 
2036
2037         * ChangeLog:
2038         * page/InspectorController.cpp:
2039         (WebCore::InspectorCachedXMLHttpRequestResource::type):
2040         (WebCore::InspectorCachedXMLHttpRequestResource::setType):
2041         (WebCore::InspectorCachedXMLHttpRequestResource::data):
2042         (WebCore::InspectorCachedXMLHttpRequestResource::setData):
2043         (WebCore::InspectorCachedXMLHttpRequestResource::encoding):
2044         (WebCore::InspectorCachedXMLHttpRequestResource::setEncoding):
2045         (WebCore::InspectorCachedXMLHttpRequestResource::create):
2046         (WebCore::InspectorCachedXMLHttpRequestResource::InspectorCachedXMLHttpRequestResource):
2047
2048 2008-03-21  Rodney Dawes  <dobey@wayofthemonkey.com>
2049
2050         Reviewed by Holger.
2051
2052         http://bugs.webkit.org/show_bug.cgi?id=17981
2053
2054         Remove WebCore/ForwardingHeaders from cppflags as it is not needed,
2055         and causes build problems with GTK+.
2056
2057         * GNUmakefile.am:
2058
2059 2008-03-21  Dan Bernstein  <mitz@apple.com>
2060
2061         Reviewed by Adele Peterson.
2062
2063         - fix http://bugs.webkit.org/show_bug.cgi?id=17966
2064           REGRESSION (r31114-r31132): Clearing via br behaves unpredictably
2065
2066         Test: fast/block/float/br-with-clear.html
2067
2068         * rendering/bidi.cpp:
2069         (WebCore::RenderBlock::layoutInlineChildren): Fixed the logic for the
2070         very special case of an all-lines-clean block that ends with a float-
2071         clearing <br> by looking for the <br> at the end of the line rather
2072         than at its beginning.
2073
2074 2008-03-21  Adam Roben  <aroben@apple.com>
2075
2076         Don't allow any newly-scheduled plugin requests to be serviced when JS is paused
2077
2078         This is a followup to r31199.
2079
2080         Reviewed by Tim Hatcher.
2081
2082         * plugins/PluginView.cpp:
2083         (WebCore::PluginView::requestTimerFired): Added an assertion that JS
2084         is not paused.
2085         (WebCore::PluginView::scheduleRequest): Don't start the request timer
2086         if JS is paused. This is the bug fix.
2087         (WebCore::PluginView::setJavaScriptPaused): Replaced the use of
2088         m_requestTimerWasActive with a check to see if we have any pending
2089         requests. m_requestTimerWasActive would not be accurate if a new
2090         request had been scheduled while JS was paused.
2091         (WebCore::PluginView::PluginView): Removed initialization of
2092         m_requestTimerWasActive.
2093         * plugins/PluginView.h: Removed m_requestTimerWasActive.
2094
2095 2008-03-20  Dan Bernstein  <mitz@apple.com>
2096
2097         Reviewed by Anders Carlsson.
2098
2099         - fix an assertion failure due to a line being marked dirty during
2100           computeVerticalPositionsForLine() due to temporary box destruction
2101
2102         Test: fast/inline/clean-after-removing-temp-boxes.html
2103
2104         * rendering/RenderText.cpp:
2105         (WebCore::RenderText::setTextWithOffset): Added code to dirty lines
2106         when this method is called on an empty text node, which has no line
2107         boxes.
2108         * rendering/bidi.cpp:
2109         (WebCore::RenderBlock::computeVerticalPositionsForLine): Mark the line
2110         clean in the end.
2111
2112 2008-03-20  Anders Carlsson  <andersca@apple.com>
2113
2114         Reviewed by Maciej.
2115
2116         Make some member variables private.
2117         
2118         * loader/ResourceLoader.cpp:
2119         (WebCore::ResourceLoader::ResourceLoader):
2120         * loader/ResourceLoader.h:
2121
2122 2008-03-20  Anders Carlsson  <andersca@apple.com>
2123
2124         Reviewed by Maciej.
2125
2126         Get rid of m_originalURL in ResourceLoader.
2127
2128         * loader/ResourceLoader.cpp:
2129         (WebCore::ResourceLoader::load):
2130         Don't store m_originalURL.
2131         
2132         * loader/ResourceLoader.h:
2133         * loader/SubresourceLoader.cpp:
2134         (WebCore::SubresourceLoader::willSendRequest):
2135         Use the url of the current request instead of the original URL.
2136
2137 2008-03-20  Anders Carlsson  <andersca@apple.com>
2138
2139         Reviewed by Maciej.
2140
2141         Small loader cleanups.
2142         
2143         * loader/MainResourceLoader.cpp:
2144         (WebCore::MainResourceLoader::willSendRequest):
2145         No need to call setRequest here, ResourceLoader::willSendRequest takes care of that. 
2146         Also, there is no need to check that newRequest is null here, because we assert earlier that it is not.
2147         
2148         * loader/ResourceLoader.h:
2149         Get rid of setRequest, it is no longer needed.
2150
2151 2008-03-20  Anders Carlsson  <andersca@apple.com>
2152
2153         Get rid of a couple of unnecessary class declarations.
2154         
2155         * loader/SubresourceLoader.h:
2156
2157 2008-03-20  David Hyatt  <hyatt@apple.com>
2158
2159         Add a new value to background-clip, "text", that allows backgrounds to be clipped to foreground text (and
2160         associated text decorations like shadows and underlines).
2161
2162         Reviewed by Beth
2163
2164         * css/CSSParser.cpp:
2165         (WebCore::CSSParser::parseBackgroundProperty):
2166         * css/CSSPrimitiveValueMappings.h:
2167         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2168         (WebCore::CSSPrimitiveValue::operator EBackgroundBox):
2169         * platform/graphics/GraphicsContext.cpp:
2170         (WebCore::GraphicsContext::clipToImageBuffer):
2171         * platform/graphics/GraphicsContext.h:
2172         * platform/graphics/cg/GraphicsContextCG.cpp:
2173         (WebCore::GraphicsContext::clipToImageBuffer):
2174         * rendering/InlineBox.cpp:
2175         (WebCore::InlineBox::paint):
2176         * rendering/InlineFlowBox.cpp:
2177         (WebCore::InlineFlowBox::paintBackgrounds):
2178         (WebCore::InlineFlowBox::paintBackground):
2179         (WebCore::InlineFlowBox::paintBoxDecorations):
2180         * rendering/InlineFlowBox.h:
2181         * rendering/InlineTextBox.cpp:
2182         (WebCore::InlineTextBox::paint):
2183         * rendering/RenderBlock.cpp:
2184         (WebCore::RenderBlock::paintColumns):
2185         (WebCore::RenderBlock::paintObject):
2186         (WebCore::RenderBlock::paintFloats):
2187         * rendering/RenderBlock.h:
2188         * rendering/RenderBox.cpp:
2189         (WebCore::RenderBox::paintRootBoxDecorations):
2190         (WebCore::RenderBox::paintBoxDecorations):
2191         (WebCore::RenderBox::paintBackgrounds):
2192         (WebCore::RenderBox::paintBackground):
2193         (WebCore::RenderBox::paintBackgroundExtended):
2194         * rendering/RenderBox.h:
2195         * rendering/RenderFieldset.cpp:
2196         (WebCore::RenderFieldset::paintBoxDecorations):
2197         * rendering/RenderFlow.cpp:
2198         (WebCore::RenderFlow::paintLines):
2199         * rendering/RenderObject.h:
2200         (WebCore::):
2201         (WebCore::RenderObject::paintBackgroundExtended):
2202         * rendering/RenderStyle.h:
2203         (WebCore::):
2204         * rendering/RenderTable.cpp:
2205         (WebCore::RenderTable::paintBoxDecorations):
2206         * rendering/RenderTableCell.cpp:
2207         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
2208
2209 2008-03-20  Adam Roben  <aroben@apple.com>
2210
2211         Allow pausing/blocking of JS execution by plugins
2212
2213         Part of Bug 17133: Should support pausing JavaScript execution without
2214         hanging the process
2215
2216         <http://bugs.webkit.org/show_bug.cgi?id=17133>
2217         <rdar://problem/5719551>
2218
2219         This patch doesn't affect Mac, which doesn't use the shared PluginView
2220         code.
2221
2222         Note that this patch doesn't prevent plugins from executing JS via an
2223         NPObject they've already gotten hold of. It just blocks obtaining new
2224         NPObjects and pauses any requests to evaluate javascript: URIs. This
2225         is probably good enough for now because most plugins seem to always
2226         obtain the Window object each time they want to execute JS.
2227
2228         Reviewed by Tim Hatcher.
2229
2230         * plugins/PluginView.cpp:
2231         (WebCore::PluginView::getValue): Return an error if JS is paused.
2232         (WebCore::PluginView::setJavaScriptPaused): Stop the request timer if
2233         we're pausing, and resume it if we're unpausing.
2234         (WebCore::PluginView::PluginView): Initialize new members.
2235         * plugins/PluginView.h:
2236
2237 2008-03-20  Adam Roben  <aroben@apple.com>
2238
2239         Allow pausing of callOnMainThread callbacks
2240
2241         Part of Bug 17133: Should support pausing JavaScript execution without
2242         hanging the process
2243
2244         <http://bugs.webkit.org/show_bug.cgi?id=17133>
2245         <rdar://problem/5719551>
2246
2247         Reviewed by Tim Hatcher.
2248
2249         * platform/MainThread.cpp:
2250         (WebCore::dispatchFunctionsFromMainThread): If callbacks are paused,
2251         don't dispatch the functions.
2252         (WebCore::setMainThreadCallbacksPaused): Added. If we're being
2253         unpaused, call scheduleDispatchFunctionsOnMainThread so that any
2254         queued callbacks will get dispatched in the near future.
2255         * platform/MainThread.h:
2256
2257 2008-03-20  Adam Roben  <aroben@apple.com>
2258
2259         Allow blocking of JS event handlers/javascript: URIs per-Frame
2260
2261         Part of Bug 17133: Should support pausing JavaScript execution without
2262         hanging the process
2263
2264         <http://bugs.webkit.org/show_bug.cgi?id=17133>
2265         <rdar://problem/5719551>
2266
2267         Two new methods are added to KJSProxy: setPaused and isPaused. When
2268         setPaused(true) is called, JS event handlers are blocked and
2269         javascript: URIs will not be evaluated.
2270
2271         Reviewed by Tim Hatcher.
2272
2273         * bindings/js/kjs_events.cpp:
2274         (WebCore::JSAbstractEventListener::handleEvent):
2275           - Removed some old KJS_DEBUGGER code
2276           - Don't run the handler if the KJSProxy is paused.
2277         * bindings/js/kjs_proxy.cpp:
2278         (WebCore::KJSProxy::KJSProxy): Initialize new member.
2279         * bindings/js/kjs_proxy.h: Added new methods.
2280         * loader/FrameLoader.cpp:
2281         (WebCore::FrameLoader::executeScript): Don't execute the script if the
2282         KJSProxy is paused.
2283
2284 2008-03-20  Jon Honeycutt  <jhoneycutt@apple.com>
2285
2286         Reviewed by Anders.
2287
2288         Fix Windows warning / leak: warning C4150: deletion of pointer to
2289         incomplete type 'WebCore::PluginRequest'; no destructor called
2290
2291         * plugins/PluginView.cpp: Move PluginRequest class to PluginView.h so
2292         Windows PluginView destructor can use WTF::deleteAllValues to clean up
2293         m_requests.
2294         * plugins/PluginView.h:
2295         (WebCore::PluginRequest::PluginRequest):
2296         (WebCore::PluginRequest::frameLoadRequest):
2297         (WebCore::PluginRequest::notifyData):
2298         (WebCore::PluginRequest::sendNotification):
2299         (WebCore::PluginRequest::shouldAllowPopups):
2300
2301 2008-03-20  Mark Rowe  <mrowe@apple.com>
2302
2303         Reviewed by Sam Weinig.
2304
2305         Ensure that the defines in FEATURE_DEFINES are sorted so that they will match the default settings of build-webkit.
2306         This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the
2307         command-line.
2308
2309         * Configurations/WebCore.xcconfig:
2310
2311 2008-03-20  Jon Honeycutt  <jhoneycutt@apple.com>
2312
2313         Reviewed by Anders.
2314
2315         <rdar://problem/5809600> REGRESSION:
2316         http/tests/plugins/cross-frame-object-access.html hangs Windows Layout
2317         Tests
2318
2319         r30897 changed the way we conditionalize this feature.
2320
2321         * plugins/PluginView.cpp:
2322         (WebCore::PluginView::getValue): Test ENABLE(NETSCAPE_PLUGIN_API)
2323         instead of USE(NPOBJECT).
2324         (WebCore::PluginView::bindingInstance): Same.
2325
2326 2008-03-20  Adam Roben  <aroben@apple.com>
2327
2328         Highlight nodes when you hover over them in the Console
2329
2330         Part of Bug 16532: Inspector should highlight nodes in page when
2331         hovering over nodes in Inspector's interface
2332
2333         <http://bugs.webkit.org/show_bug.cgi?id=16532>
2334         <rdar://problem/5712896>
2335
2336         Reviewed by Tim Hatcher.
2337
2338         * page/inspector/ConsolePanel.js:
2339         (WebInspector.ConsolePanel._formatnode): Add mouseover/mouseout event
2340         listeners to highlight the node and clear the highlight.
2341
2342 2008-03-20  Adam Roben  <aroben@apple.com>
2343
2344         Highlight nodes in the page when you hover over their DOM breadcrumbs
2345
2346         Part of Bug 16532: Inspector should highlight nodes in page when
2347         hovering over nodes in Inspector's interface
2348
2349         <http://bugs.webkit.org/show_bug.cgi?id=16532>
2350         <rdar://problem/5712896>
2351
2352         Reviewed by Tim Hatcher.
2353
2354         * page/inspector/DocumentPanel.js:
2355         (WebInspector.DocumentPanel): Add an mouseout event listener to the
2356         breadcrumbs element to clear the highlighted node.
2357         (WebInspector.DocumentPanel.updateBreadcrumbs): Change the mouseover
2358         event listener to highlight the node represented by the hovered
2359         breadcrumb.
2360
2361 2008-03-20  Adam Roben  <aroben@apple.com>
2362
2363         Highlight nodes in the page when you hover over them in the DOM tree
2364
2365         Part of Bug 16532: Inspector should highlight nodes in page when
2366         hovering over nodes in Inspector's interface
2367
2368         <http://bugs.webkit.org/show_bug.cgi?id=16532>
2369         <rdar://problem/5712896>
2370
2371         The inspected node is no longer highlighted (unless, of course, you
2372         hover over it).
2373
2374         Reviewed by Tim Hatcher.
2375
2376         * page/inspector/DocumentPanel.js:
2377         (WebInspector.DocumentPanel):
2378           - Don't highlight the focused node when the DOM tree is shown
2379           - Added mousemove/mouseout event listeners to set/clear the
2380             highlighted node. These are added to the root of the DOM tree
2381             instead of to each individual list item to avoid flashing as the
2382             mouse moves between nodes.
2383         (WebInspector.DocumentPanel.set focusedDOMNode): Don't highlight the
2384         focused node.
2385         (WebInspector.DocumentPanel._onmousemove): Highlight the node under
2386         the mouse.
2387
2388 2008-03-20  Adam Roben  <aroben@apple.com>
2389
2390         Show nodes' content/padding/border/margin boxes in the node highlight
2391
2392         Part of Bug 17221: Node highlight should show node metrics
2393
2394         <http://bugs.webkit.org/show_bug.cgi?id=17221>
2395         <rdar://problem/5732822>
2396
2397         Outstanding issues:
2398           1) We don't show padding/border/margins for inlines
2399           2) We don't show any numeric metrics, we just draw the boxes
2400           3) We'll probably want to tweak the look of the highlight some, at
2401              least to make the boxes better distinguishable
2402
2403         Reviewed by Tim Hatcher.
2404
2405         * page/InspectorController.cpp:
2406         (WebCore::drawOutlinedRect): Added. Just draws a single rect.
2407         (WebCore::drawHighlightForBoxes): Added. Takes the rects we calculated
2408         for the node and draws the highlight.
2409         (WebCore::InspectorController::drawNodeHighlight): Calculates the
2410         content/padding/border/margin boxes for blocks and passes them off to
2411         drawHighlightForBoxes. The behavior for inlines is for now unchanged.
2412
2413 2008-03-20  Adam Roben  <aroben@apple.com>
2414
2415         Fix RenderContainer's override of addLineBoxRects to match RenderObject's
2416
2417         RenderContainer::addLineBoxRects was never getting called because its
2418         parameters didn't match those of RenderObject::addLineBoxRects.
2419
2420         Reviewed by Mitz Pettel.
2421
2422         No test possible.
2423
2424         * rendering/RenderContainer.cpp: Added an optional bool
2425         useSelectionHeight parameter to match RenderObject's method.
2426         * rendering/RenderContainer.h: Ditto.
2427
2428 2008-03-20  Marco Barisione  <marco.barisione@collabora.co.uk>
2429
2430         Reviewed by Alp Toker.
2431
2432         http://bugs.webkit.org/show_bug.cgi?id=17946
2433         [GTK] Widgets are not clipped
2434
2435         * platform/gtk/RenderThemeGtk.cpp:
2436         (WebCore::paintMozWidget): pass the clipping rectangle to
2437         moz_gtk_widget_paint() instead of just the widget rectangle.
2438
2439 2008-03-20  David Hyatt  <hyatt@apple.com>
2440
2441         Fix for http://bugs.webkit.org/show_bug.cgi?id=9279
2442
2443         Make :hover work with the adjacent sibling selector.  This fix makes all forms of dynamic changes
2444         (class name changes, :hover, :focus, etc.) work properly when used with the + selector.
2445
2446         Reviewed by weinig
2447
2448         Added fast/css/dynamic-sibling-selector.html
2449
2450         * dom/Element.cpp:
2451         (WebCore::Element::recalcStyle):
2452
2453 2008-03-20  Aaron Golden  <aegolden@gmail.com>
2454
2455         Reviewed by Darin and David Kilzer.
2456
2457         Addresses <http://bugs.webkit.org/show_bug.cgi?id=15263>, which caused certain marquees to not display.
2458
2459         Test: fast/html/marquee-scroll.html
2460
2461         * html/HTMLMarqueeElement.cpp:
2462         (WebCore::HTMLMarqueeElement::parseMappedAttribute):
2463
2464 2008-03-20  Adam Roben  <aroben@apple.com>
2465
2466         Export InspectorController::drawNodeHighlight
2467
2468         Reviewed by Tim Hatcher.
2469
2470         * WebCore.base.exp: Also sorted this file.
2471
2472 2008-03-19  Stephanie Lewis  <slewis@apple.com>
2473
2474         Rubber-stamped by Anders.
2475
2476         Fix Windows Build
2477
2478         * platform/cf/SharedBufferCF.cpp:
2479         (WebCore::SharedBuffer::createCFData):
2480
2481 2008-03-19  Stephanie Lewis <slewis@apple.com>
2482
2483         Rubber-stamped by Anders.
2484
2485         Fix Windows Build
2486
2487         * platform/SharedBuffer.h:
2488
2489 2008-03-19  Justin Garcia  <justin.garcia@apple.com>
2490
2491         Reviewed by Oliver.
2492         
2493         <rdar://problem/5780697> Copying content with CSS property values that are percentages can cause fidelity issues
2494          
2495         Elements with height: x%; overflow: visible; overlap what's below them when they are copied from
2496         a document in quirksmode and pasted into to one in standards mode.  This fix uses the computed 
2497         the value for a property if its value is a percentage.
2498         
2499         * css/CSSMutableStyleDeclaration.cpp:
2500         (WebCore::CSSMutableStyleDeclaration::addParsedProperty): Added so that we don't have to use
2501         setProperty from appendStartMarkup.  We already have a parsed property value, so we shouldn't
2502         use setProperty, since it takes in a String.  If we did, we would have to call CSSValue::cssText()
2503         for a String only to re-parse it in setProperty.  This wasn't extremely important now, but it will 
2504         be as we compute more properties to fix the rest of the copy/paste fidelity bugs.
2505         * css/CSSMutableStyleDeclaration.h:
2506         * editing/markup.cpp:
2507         (WebCore::appendStartMarkup): Compute values for properties that have percentage values.  We could
2508         perhaps narrow this special case to only include properties that are effected by quirksmode.
2509
2510 2008-03-19  Sam Weinig  <sam@webkit.org>
2511
2512         Reviewed by Anders Carlsson.
2513
2514         Fix for <rdar://problem/5785694>
2515         Crash occurs at KJS::Collector::collect() when loading web clip widgets with a PAC file
2516
2517         Make the activeExecStates stack per JSGlobalObject instead of static to ensure
2518         thread safety.
2519
2520         * bindings/objc/WebScriptObject.mm:
2521         (+[WebScriptObject throwException:]): Change to throw an exception on the current
2522         GlobalObject instead of the top of the static activeExecStates stack.
2523         (-[WebScriptObject setException:]): Change to use the top of the rootObjects GlobalObject
2524         instead of the top of the static activeExecStates stack.
2525
2526         * bridge/c/c_instance.cpp:
2527         * bridge/c/c_instance.h:
2528         * bridge/jni/jni_instance.cpp:
2529         (JavaInstance::virtualBegin):
2530         (JavaInstance::virtualEnd):
2531         * bridge/jni/jni_instance.h:
2532         * bridge/objc/objc_instance.h:
2533         * bridge/objc/objc_instance.mm:
2534         (ObjcInstance::~ObjcInstance):
2535         (ObjcInstance::virtualBegin):
2536         (ObjcInstance::virtualEnd):
2537         * bridge/runtime.cpp:
2538         (KJS::Bindings::Instance::setDidExecuteFunction):
2539         (KJS::Bindings::Instance::didExecuteFunction):
2540         (KJS::Bindings::Instance::setCurrentGlobalObject): Added.
2541         (KJS::Bindings::Instance::currentGlobalObject): Added.
2542         (KJS::Bindings::Instance::begin):
2543         (KJS::Bindings::Instance::end):
2544         * bridge/runtime.h:
2545         (KJS::Bindings::Instance::virtualBegin): Renamed from begin().
2546         (KJS::Bindings::Instance::virtualEnd): Renamed from end().
2547         We now store the currently active globalObject everytime we cross the runtime
2548         object boundary.  To do this, we take advantage of the existing begin/end
2549         methods that are called when crossing this boundary, making begin set the current
2550         globalObject and then call the old begin, now called virtualBegin.
2551
2552 2008-03-19  Brady Eidson  <beidson@apple.com>
2553
2554         Reviewed by Anders
2555
2556         Change SharedBuffer so the wrapping platform data aspect can be shared with all CoreFoundation platforms
2557         (Mac and Windows instead of just Mac)
2558
2559         * WebCore.vcproj/WebCore.vcproj: Add SharedBufferCF.cpp
2560         * WebCore.xcodeproj/project.pbxproj: Ditto
2561
2562         * platform/SharedBuffer.cpp:
2563         * platform/SharedBuffer.h: Change the private c'tor from NSData to CFDataRef, other PLATFORM tweaks
2564
2565         * platform/cf/SharedBufferCF.cpp: Added.
2566         (WebCore::SharedBuffer::SharedBuffer):
2567         (WebCore::SharedBuffer::createCFData): Non-Mac version of createCFData
2568         (WebCore::SharedBuffer::hasPlatformData):
2569         (WebCore::SharedBuffer::platformData):
2570         (WebCore::SharedBuffer::platformDataSize):
2571         (WebCore::SharedBuffer::maybeTransferPlatformData):
2572         (WebCore::SharedBuffer::clearPlatformData):
2573
2574         * platform/mac/SharedBufferMac.mm:
2575         (WebCore::SharedBuffer::wrapNSData): Use the CFDataRef constructor via toll-free bridging
2576         (WebCore::SharedBuffer::createCFData): Mac-specific version of createCFData
2577
2578 2008-03-19  Oliver Hunt  <oliver@apple.com>
2579
2580         Reviewed by Antti.
2581
2582         Bug 17954: Canvas arc() with radius of 0 throws exception
2583         http://bugs.webkit.org/show_bug.cgi?id=17954
2584
2585         Simple fix -- use >= instead of > when validating the radius.
2586
2587         * html/CanvasRenderingContext2D.cpp:
2588         (WebCore::CanvasRenderingContext2D::arc):
2589
2590 2008-03-19  Justin Garcia  <justin.garcia@apple.com>
2591
2592         Reviewed by Oliver.
2593
2594         <rdar://problem/5794920> Acid3: Assertion failure in VisiblePosition::previous when clicking on results (17004)
2595         
2596         The position inside an empty inline-block was a candidate, but upstream and downstream
2597         would move across it without stopping.  This confused canonicalPosition, since no more
2598         than two candidates should have the same upstream/downstream (be visually equivalent).
2599         
2600         Code was added intentionally in isCandidate to make VisiblePositions inside empty 
2601         inline-blocks, so we need to make upstream/downstream understand that.
2602
2603         * dom/Position.cpp:
2604         (WebCore::endsOfNodeAreVisuallyDistinctPositions): upstream and downstream used to only
2605         stop when entering or leaving a non-inline element (referred to as a "block").  We must also 
2606         avoid entering or leaving an empty inline-block.  This will allow a VisiblePosition there, to 
2607         match up with what the code in isCandidate intended.
2608         (WebCore::enclosingVisualBoundary): Removed enclosingBlock and replaced it with this.
2609         (WebCore::Position::upstream): Added better comments, called the new functions.
2610         (WebCore::Position::downstream): Ditto.
2611         * dom/Position.h:
2612
2613 2008-03-19  Dan Bernstein  <mitz@apple.com>
2614
2615         Rubber-stamped by John Sullivan.
2616
2617         - change CSS property and value keyword constants from all-caps with
2618           underscores to intra-caps.
2619
2620         * css/makeprop.pl:
2621         * css/makevalues.pl:
2622         * All files using the constants
2623
2624 2008-03-19  Adam Roben  <aroben@apple.com>
2625
2626         Make clicking anywhere in a row in the DOM tree select that row's node
2627
2628         We now have mousedown and dblclick event listeners on the root of the
2629         tree that forward the event to the node on the row the mouse is over.
2630
2631         Reviewed by Tim Hatcher.
2632
2633         * page/inspector/DocumentPanel.js:
2634         (WebInspector.DocumentPanel): Added a dblclick and mousedown event
2635         listeners to the root of the tree.
2636         (WebInspector.DocumentPanel._treeElementFromEvent): Added. Finds the
2637         tree element for the row underneath the mouse.
2638         (WebInspector.DocumentPanel._ondblclick): Added. Sends the dblclick
2639         event on to the tree element in the current row.
2640         (WebInspector.DocumentPanel._onmousedown): Added. Selects the tree
2641         element in the current row.
2642         * page/inspector/treeoutline.js:
2643         (TreeOutline.treeElementFromPoint): Added.
2644         (TreeElement.treeElementSelected): Changed to call
2645         TreeElement.isEventWithinDisclosureTriangle, and added an early return.
2646         (TreeElement.treeElementToggled): Ditto.
2647         (TreeElement.isEventWithinDisclosureTriangle): Added.
2648         * page/inspector/utilities.js:
2649         (Node.enclosingNodeOrSelfWithNodeNameInArray): Added.
2650         (Node.enclosingNodeOrSelfWithNodeName): Now just calls
2651         enclosingNodeOrSelfWithNodeNameInArray.
2652         (Elemnt.get totalOffsetLeft): Added.
2653         (Elemnt.get totalOffsetTop): Added.
2654
2655 2008-03-19  Dan Bernstein  <mitz@apple.com>
2656
2657         Reviewed by Sam Weinig.
2658
2659         - fix assertion failure in RenderBlock::determineStartPosition() at http://www.wired.com/techbiz/it/magazine/16-04/bz_apple
2660
2661         Test: fast/repaint/line-flow-with-floats-10.html
2662
2663         * rendering/bidi.cpp:
2664         (WebCore::RenderBlock::determineStartPosition): Removed bogus assertion.
2665         If the float's top margin has changed and it has not been repositioned
2666         yet, we do not have its new y position.
2667
2668 2008-03-19  David Hyatt  <hyatt@apple.com>
2669
2670         New implementation of full page zoom.  Because of how much doesn't transform when zooming, and because
2671         of the need to obey viewport constraints, I decided to take a completely different approach.  Now CSS
2672         lengths and intrinsic sizes are simply adjusted by the zoom factor.  This approach works much better and
2673         avoids pixel cracks more than the old approach.   In addition widgets "just work", namely plugins zoom
2674         and scrollbars do not.
2675
2676         This patch also implements the IE zoom CSS property.  This property allows fine-grained control over
2677         zooming at the element level.  It takes values of normal | <number> | <percentage> to match WinIE.  In
2678         addition, in the vein of text-size-adjust for text zooming, I have extended the zoom property with an
2679         extra value, reset.  The reset keyword can be used to prevent a section of the page from scaling at all
2680         when a zoom is applied.
2681
2682         Reviewed by olliej
2683
2684         * css/CSSComputedStyleDeclaration.cpp:
2685         (WebCore::):
2686         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2687         Support the new 'zoom' property for getComputedStyle.
2688
2689         * css/CSSParser.cpp:
2690         (WebCore::CSSParser::parseValue):
2691         Code that parses the 'zoom' property.
2692
2693         * css/CSSPrimitiveValue.cpp:
2694         (WebCore::CSSPrimitiveValue::computeLengthInt):
2695         (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
2696         (WebCore::CSSPrimitiveValue::computeLengthShort):
2697         (WebCore::CSSPrimitiveValue::computeLengthFloat):
2698         (WebCore::CSSPrimitiveValue::computeLengthDouble):
2699         * css/CSSPrimitiveValue.h:
2700         Extend all of the computeLength methods to take a multiplier so that lengths can be adjusted by the
2701         zoom factor.
2702
2703         * css/CSSPropertyNames.in:
2704         Add the new zoom property to the list of properties we understand.
2705
2706         * css/CSSStyleSelector.cpp:
2707         (WebCore::CSSStyleSelector::applyDeclarations):
2708         (WebCore::CSSStyleSelector::applyProperty):
2709         (WebCore::CSSStyleSelector::mapBackgroundSize):
2710         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
2711         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
2712         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
2713         * css/CSSStyleSelector.h:
2714         (WebCore::CSSStyleSelector::setStyle):
2715         Pass in the zoom factor when computing all lengths in CSS.
2716
2717         * css/CSSValueKeywords.in:
2718         Add support for the 'reset' keyword of the zoom property.
2719
2720         * dom/Document.cpp:
2721         (WebCore::Document::recalcStyle):
2722         Set the 'zoom' CSS property on the RenderView.  This is how we implement full page zoom.
2723
2724         * html/CanvasRenderingContext2D.cpp:
2725         (WebCore::size):
2726         Make sure the back end canvas size ignores zooming when rendering images.
2727
2728         * html/HTMLImageElement.cpp:
2729         (WebCore::HTMLImageElement::width):
2730         (WebCore::HTMLImageElement::height):
2731         (WebCore::HTMLImageElement::naturalWidth):
2732         (WebCore::HTMLImageElement::naturalHeight):
2733         Use the unzoomed width/height if we have no style information in HTMLImageElement.cpp.
2734
2735         * loader/CachedImage.cpp:
2736         (WebCore::CachedImage::ref):
2737         (WebCore::CachedImage::imageSize):
2738         (WebCore::CachedImage::imageRect):
2739         * loader/CachedImage.h:
2740         (WebCore::CachedImage::canRender):
2741         Force access to the CachedImage metrics to take a multiplier so that people have to think about
2742         the zoom factor.  The "intrinsic size" of the image then takes that into account.
2743
2744         * loader/ImageDocument.cpp:
2745         (WebCore::ImageTokenizer::finish):
2746         (WebCore::ImageDocument::scale):
2747         (WebCore::ImageDocument::resizeImageToFit):
2748         (WebCore::ImageDocument::imageChanged):
2749         (WebCore::ImageDocument::restoreImageSize):
2750         (WebCore::ImageDocument::imageFitsInWindow):
2751         Make sure image documents respect the zoom.
2752
2753         * page/AnimationController.cpp:
2754         (WebCore::ImplicitAnimation::animate):
2755         Make the 'zoom' CSS property work with CSS transitions.
2756
2757         * page/Frame.h:
2758         (WebCore::Frame::pageZoomFactor):
2759         (WebCore::Frame::textZoomFactor):
2760         Add accessors for obtaining the pageZoom vs. textZoom.
2761
2762         * page/FrameView.cpp:
2763         (WebCore::FrameView::adjustViewSize):
2764         Remove the old zoom implementation that used transforms.
2765
2766         * page/mac/WebCoreAXObject.mm:
2767         (-[WebCoreAXObject accessibilityIsIgnored]):
2768         Pass in the zoom factor.
2769
2770         * rendering/InlineFlowBox.cpp:
2771         (WebCore::InlineFlowBox::paintBackground):
2772         (WebCore::InlineFlowBox::paintBoxDecorations):
2773         Pass in the zoom factor when testing for size.
2774
2775         * rendering/RenderBox.cpp:
2776         (WebCore::RenderBox::calculateBackgroundSize):
2777         (WebCore::RenderBox::imageChanged):
2778         (WebCore::RenderBox::paintBackgroundExtended):
2779         (WebCore::RenderBox::calcHeight):
2780         * rendering/RenderFrameSet.cpp:
2781         (WebCore::RenderFrameSet::layout):
2782         * rendering/RenderHTMLCanvas.cpp:
2783         (WebCore::RenderHTMLCanvas::canvasSizeChanged):
2784         * rendering/RenderHTMLCanvas.h:
2785         (WebCore::RenderHTMLCanvas::renderName):
2786         (WebCore::RenderHTMLCanvas::intrinsicSizeChanged):
2787         * rendering/RenderImage.cpp:
2788         (WebCore::RenderImage::setImageSizeForAltText):
2789         (WebCore::RenderImage::imageChanged):
2790         (WebCore::RenderImage::calcReplacedWidth):
2791         (WebCore::RenderImage::calcReplacedHeight):
2792         * rendering/RenderImage.h:
2793         (WebCore::RenderImage::intrinsicSizeChanged):
2794         * rendering/RenderListMarker.cpp:
2795         (WebCore::RenderListMarker::layout):
2796         (WebCore::RenderListMarker::imageChanged):
2797         (WebCore::RenderListMarker::getRelativeMarkerRect):
2798         * rendering/RenderObject.cpp:
2799         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
2800         (WebCore::RenderObject::paintBorder):
2801         Pass in the zoom factor when testing for size.
2802
2803         * rendering/RenderReplaced.cpp:
2804         (WebCore::RenderReplaced::RenderReplaced):
2805         (WebCore::RenderReplaced::setStyle):
2806         (WebCore::RenderReplaced::intrinsicSizeChanged):
2807         * rendering/RenderReplaced.h:
2808         Added a new call when the zoom factor changes, intrinsicSizeChanged().  Replaced element subclasses
2809         respond to this via overrides.
2810
2811         * rendering/RenderStyle.cpp:
2812         (WebCore::StyleVisualData::StyleVisualData):
2813         (WebCore::StyleInheritedData::StyleInheritedData):
2814         (WebCore::StyleInheritedData::operator==):
2815         (WebCore::RenderStyle::diff):
2816         * rendering/RenderStyle.h:
2817         (WebCore::StyleVisualData::operator==):
2818         (WebCore::RenderStyle::zoom):
2819         (WebCore::RenderStyle::zoomInEffect):
2820         (WebCore::RenderStyle::setZoom):
2821         (WebCore::RenderStyle::setZoomInEffect):
2822         (WebCore::RenderStyle::initialZoom):
2823         Support for 'zoom' in the RenderStyle.  "zoomInEffect" represents the computed zoom taking into account
2824         all the zooms specified on ancestors.
2825
2826         * rendering/RenderTableCol.cpp:
2827         (WebCore::RenderTableCol::imageChanged):
2828         * rendering/RenderTableRow.cpp:
2829         (WebCore::RenderTableRow::imageChanged):
2830         * rendering/RenderTableSection.cpp:
2831         (WebCore::RenderTableSection::imageChanged):
2832         * rendering/RenderVideo.h:
2833         (WebCore::RenderVideo::intrinsicSizeChanged):
2834         Pass in the zoom factor.
2835
2836         * rendering/RenderView.cpp:
2837         (WebCore::RenderView::calcHeight):
2838         (WebCore::RenderView::calcWidth):
2839         (WebCore::RenderView::layout):
2840         (WebCore::RenderView::viewHeight):
2841         (WebCore::RenderView::viewWidth):
2842         * rendering/RenderView.h:
2843         (WebCore::RenderView::zoomFactor):
2844         Back out the old implementation.
2845
2846 2008-03-19  Adam Roben  <aroben@apple.com>
2847
2848         Rename firstParent* methods to enclosingNode*
2849
2850         Rubberstamped by John Sullivan.
2851
2852         * page/inspector/ConsolePanel.js:
2853         * page/inspector/DocumentPanel.js:
2854         * page/inspector/NetworkPanel.js:
2855         * page/inspector/inspector.js:
2856         * page/inspector/utilities.js:
2857
2858 2008-03-19  Dan Bernstein  <mitz@apple.com>
2859
2860         Reviewed by John Sullivan.
2861
2862         - fix <rdar://problem/5805070> CrashTracer: [USER] 33 crashes in Safari at com.apple.WebCore: WebCore::FrameView::layout + 431
2863
2864         Test: fast/dynamic/subtree-parent-static-y.html
2865
2866         * rendering/RenderObject.cpp:
2867         (WebCore::RenderObject::markContainingBlocksForLayout): Avoid calling
2868         this method on the parent if the parent is the new layout subtree root,
2869         which would result in marking all the way to the top, when it should
2870         actually do nothing.
2871
2872 2008-03-19  Mark Rowe  <mrowe@apple.com>
2873
2874         Reviewed by Oliver Hunt.
2875
2876         Use WTF::Unicode abstraction rather than using ICU functions directly.
2877
2878         * html/PreloadScanner.cpp:
2879         (WebCore::PreloadScanner::tokenize):
2880
2881 2008-03-19  Mark Rowe  <mrowe@apple.com>
2882
2883         Attempt to fix the Gtk build.
2884
2885         * platform/network/curl/ResourceHandleCurl.cpp:
2886         (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate):
2887
2888 2008-03-18  Darin Adler  <darin@apple.com>
2889
2890         Reviewed by Maciej.
2891
2892         - Speed up JavaScript built-in properties by changing the
2893           hash table to take advantage of the identifier objects
2894
2895         5% speedup for Acid3 test 26
2896
2897         * bindings/js/JSDOMWindowBase.cpp:
2898         (WebCore::JSDOMWindowBase::getOwnPropertySlot): Update for change to HashTable.
2899         (WebCore::JSDOMWindowBase::put): Ditto.
2900         * bindings/js/JSDOMWindowCustom.cpp:
2901         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Ditto.
2902         * bindings/js/JSHTMLInputElementBase.cpp:
2903         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot): Ditto.
2904         * bindings/js/JSHistoryCustom.cpp:
2905         (WebCore::JSHistory::customGetOwnPropertySlot): Ditto.
2906         * bindings/js/JSLocation.cpp:
2907         (WebCore::JSLocation::customGetOwnPropertySlot): Ditto.
2908         (WebCore::JSLocation::put): Ditto.
2909         * bindings/js/kjs_binding.cpp:
2910         (WebCore::nonCachingStaticFunctionGetter): Ditto.
2911
2912         * bindings/scripts/CodeGeneratorJS.pm: Same changes as in the
2913         create_hash_table script.
2914
2915 2008-03-18  Matt Lilek  <webkit@mattlilek.com>
2916
2917         Fix the Gtk build for real this time.
2918
2919         * platform/network/curl/AuthenticationChallenge.h:
2920
2921 2008-03-18  Sam Weinig  <sam@webkit.org>
2922
2923         Reviewed by Anders Carlsson.
2924
2925         Fix for http://bugs.webkit.org/show_bug.cgi?id=17057
2926         REGRESSION: Frequent random crashes in WebCore::JSNodeList::indexGetter
2927         <rdar://problem/5725058>
2928
2929         Tests: fast/dom/NodeList/5725058-crash-scenario-1.html
2930                fast/dom/NodeList/5725058-crash-scenario-2.html
2931                fast/dom/NodeList/5725058-crash-scenario-3.html
2932
2933         * dom/ChildNodeList.cpp: 
2934         (WebCore::ChildNodeList::ChildNodeList):
2935         * dom/ChildNodeList.h:
2936         Remove rootNodeChildrenChanged() method and fix the constructor to not 
2937         pass in a needsNotifications argument to DynamicNodeList, as it no longer
2938         takes one.
2939
2940         * dom/ClassNodeList.cpp:
2941         (WebCore::ClassNodeList::ClassNodeList):
2942         Don't pass the needsNotifications argument to DynamicNodeList.
2943
2944         * dom/ContainerNode.cpp:
2945         (WebCore::ContainerNode::childrenChanged):
2946         Rename call to hasNodeLists() to hasNodeListCaches().
2947
2948         * dom/Document.cpp:
2949         (WebCore::Document::Document):
2950         (WebCore::Document::~Document): Zero out the m_document variable to signify
2951         to destructors down the destruction chain that this is a Document type node
2952         being destructed, and thus, accessing document() is prohibited.
2953         * dom/Document.h:
2954         (WebCore::Document::addNodeListCache): Renamed from addNodeList.
2955         (WebCore::Document::removeNodeListCache): Renamed from removeNodeList, adds assertion.
2956         (WebCore::Document::hasNodeListCaches): Renamed from hasNodeListCaches.
2957         Rename m_numNodeLists to m_numNodeListCaches.
2958
2959         * dom/DynamicNodeList.cpp:
2960         (WebCore::DynamicNodeList::DynamicNodeList):
2961         (WebCore::DynamicNodeList::~DynamicNodeList):
2962         (WebCore::DynamicNodeList::invalidateCache):
2963         (WebCore::DynamicNodeList::Caches::Caches):
2964         * dom/DynamicNodeList.h:
2965         (WebCore::DynamicNodeList::hasOwnCaches):
2966         Remove the needsNotifications concept from DynamicNodeList, instead, manually
2967         invalidate the cache for lists that own their own cache.
2968
2969         * dom/NameNodeList.cpp:
2970         (WebCore::NameNodeList::NameNodeList):
2971         * dom/NameNodeList.h:
2972         Remove rootNodeAttributeChanged() method and fix the constructor to not 
2973         pass in a needsNotifications argument to DynamicNodeList, as it no longer
2974         takes one.
2975
2976         * dom/Node.cpp:
2977         (WebCore::Node::~Node): Decrement the document's nodeListCache count
2978         if we had a NodeListsNodeData cache and this is not the Document being
2979         destructor, as tagged by a null m_document.
2980         (WebCore::Node::childNodes): Increment the document's nodeListCache count 
2981         if we need create the NodeListsNodeData.
2982         (WebCore::Node::registerDynamicNodeList): Increment the document's nodeListCache count 
2983         if we need create the NodeListsNodeData.  Change to invalidate all the caches, instead 
2984         of just the ChildNodeList, if document has had no NodeListCaches.
2985         (WebCore::Node::unregisterDynamicNodeList): Change to remove the cache from the m_listsWithCaches
2986         set if it is owned by the NodeList and clear the m_nodeLists if it is empty.
2987         (WebCore::Node::notifyLocalNodeListsAttributeChanged): Move logic to 
2988         NodeListsNodeData::invalidateAttributeCaches and clear the cache pointer if it is empty.
2989         (WebCore::Node::notifyLocalNodeListsChildrenChanged): Move logic to 
2990         NodeListsNodeData::invalidateCaches and clear the cache pointer if it is empty.
2991         (WebCore::Node::notifyNodeListsChildrenChanged): Cleanup.
2992         (WebCore::Node::getElementsByName): Increment the document's nodeListCache count 
2993         if we need create the NodeListsNodeData.
2994         (WebCore::Node::getElementsByClassName): Increment the document's nodeListCache count 
2995         if we need create the NodeListsNodeData.
2996
2997         (WebCore::NodeListsNodeData::invalidateCaches): Added.
2998         (WebCore::NodeListsNodeData::invalidateAttributeCaches): Added.
2999         (WebCore::NodeListsNodeData::isEmpty): Added.
3000
3001         * dom/TagNodeList.cpp:
3002         (WebCore::TagNodeList::TagNodeList):
3003         Don't pass the needsNotifications argument to DynamicNodeList.
3004
3005 2008-03-18  Matt Lilek  <webkit@mattlilek.com>
3006
3007         Not reviewed, build fix.
3008
3009         * platform/network/curl/AuthenticationChallenge.h:
3010
3011 2008-03-18  Brent Fulgham  <bfulgham@gmail.com>
3012
3013         Reviewed by Adam Roben.
3014
3015         Provide some stub implementations for things that WebKit
3016         uses for performing authentication/challenge activities.  This
3017         is in support of http://bugs.webkit.org/show_bug.cgi?id=17837
3018
3019         * platform/network/ResourceHandle.h:
3020         * platform/network/curl/AuthenticationChallenge.h:
3021         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
3022         (WebCore::AuthenticationChallenge::sourceHandle):
3023
3024 2008-03-18  Eric Seidel  <eric@webkit.org>
3025
3026         Reviewed by Oliver.
3027
3028         Fix SVGImage crash seen once, and obvious via code inspection.
3029         
3030         I was not able to find a test case for this.
3031
3032         * svg/graphics/SVGImage.cpp:
3033         (WebCore::SVGImage::setContainerSize):
3034         (WebCore::SVGImage::usesContainerSize):
3035         (WebCore::SVGImage::hasRelativeWidth):
3036         (WebCore::SVGImage::hasRelativeHeight):
3037
3038 2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
3039
3040         Fix Qt build after r31123.
3041
3042         Add PluginView methods to TemporaryLinkStubs.
3043
3044         * platform/qt/TemporaryLinkStubs.cpp:
3045
3046 2008-03-18  Sam Weinig  <sam@webkit.org>
3047
3048         Reviewed by Darin Adler.
3049
3050         - Speed up JavaScript prototype and constructor object creation
3051           using a static Identifier in the self() methods to avoid the
3052           cost of creating one from a c-string each time.
3053
3054         5% speedup for Acid3 test 26
3055
3056         * bindings/scripts/CodeGeneratorJS.pm:
3057
3058 2008-03-18  Antti Koivisto  <antti@apple.com>
3059
3060         Reviewed by Mark Rowe.
3061
3062         Enable preloading for other platforms besides Mac.
3063
3064         * GNUmakefile.am:
3065         * WebCore.pro:
3066         * WebCore.vcproj/WebCore.vcproj:
3067         * WebCoreSources.bkl:
3068         * html/HTMLTokenizer.cpp:
3069         * html/HTMLTokenizer.h:
3070         * html/PreloadScanner.cpp:
3071         (WebCore::PreloadScanner::tokenize):
3072
3073 2008-03-18  Dan Bernstein  <mitz@apple.com>
3074
3075         Reviewed by Adele Peterson.
3076
3077         - fix <rdar://problem/5805127> REGRESSION (r31116): Assertion failure (floatIndex < floats.size()) in RenderBlock::determineStartPosition() at digg.com
3078
3079         Test: fast/dynamic/floating-to-positioned.html
3080
3081         * rendering/RenderObject.cpp:
3082         (WebCore::RenderObject::setStyle): Added code to remove a float from
3083         object lists if its position property changes to something other than
3084         static, since then it ceases to be a float.
3085
3086 2008-03-18  Adam Roben  <aroben@apple.com>
3087
3088         Windows build fix after r31123
3089
3090         * plugins/win/PluginViewWin.cpp: Add back MozillaUserAgent.
3091
3092 2008-03-18  Dan Bernstein  <mitz@apple.com>
3093
3094         Reviewed by Darin Adler.
3095
3096         - eliminate RenderFlow::m_clear
3097
3098         * rendering/RenderBlock.cpp:
3099         (WebCore::RenderBlock::layoutBlock): Removed code to set m_clear.
3100         (WebCore::RenderBlock::newLine): Added a 'clear' parameter.
3101         * rendering/RenderBlock.h:
3102         * rendering/RenderFlow.h:
3103         (WebCore::RenderFlow::RenderFlow): Removed initialization of m_clear.
3104         * rendering/bidi.cpp:
3105         (WebCore::RenderBlock::layoutInlineChildren): Added a local 'clear'
3106         variable, passing a pointer to it to findNextLineBreak() and its value
3107         to newLine(). 
3108         (WebCore::RenderBlock::findNextLineBreak): Added a 'clear' parameter,
3109         which this method adjusts when it encounters a <br>.
3110
3111 2008-03-18  Simon Hausmann  <hausmann@webkit.org>
3112
3113         Reviewed by Holger.
3114
3115         Fix the Qt build and clean up the invoke mechanism for dispatching
3116         functions in the main thread by using QMetaObject::invokeMethod
3117         instead of posting a null event.
3118
3119         * platform/qt/MainThreadQt.cpp:
3120
3121 2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
3122
3123         Fix Mac build from commit of r31123.
3124
3125         Add a typedef for NSView* to PlatformWidget, remove duplicate PluginMessageThrottlerWin definition.
3126
3127         * platform/Widget.h:
3128         * WebCore.vcproj/WebCore.vcproj:
3129
3130 2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
3131
3132         Reviewed by Jon Honeycutt.
3133
3134         Add PluginView.cpp and npapi.cpp to build files.
3135         Copy win/PluginViewWin.cpp to PluginView.cpp for shared code.
3136         Split Windows specific code out of PluginView.cpp.
3137         Add #if USE(NPOBJECT) around dependant code.
3138         Use npruntime_internal.h instead of npapi.h.
3139         Add PlatformWidget typedef to Widget.h.
3140         Update WidgetGtk.cpp for the PlatformWidget usage.
3141         Add needed methods to TemporaryLinkStubs for GTK+ port.
3142
3143         * GNUmakefile.am:
3144         * WebCore.pro:
3145         * WebCoreSources.bkl:
3146         * WebCore.vcproj/WebCore.vcproj:
3147         * plugins/win/PluginViewWin.cpp:
3148         * plugins/PluginView.cpp:
3149         * plugins/PluginView.h:
3150         * plugins/npapi.cpp:
3151         * platform/Widget.h:
3152         * platform/gtk/WidgetGtk.cpp:
3153         * platform/gtk/TemporaryLinkStubs.cpp:
3154
3155 2008-03-17  Darin Adler  <darin@apple.com>
3156
3157         Reviewed by Maciej.
3158
3159         - speed up document property fetching (eliminate the AtomicString
3160           objects made during document property lookup)
3161
3162         3% speedup for Acid3 test 26
3163
3164         * bindings/js/JSDOMWindowBase.cpp:
3165         (WebCore::JSDOMWindowBase::getOwnPropertySlot): Use AtomicString::find to
3166         locate the AtomicString, only if already present. Also call the new faster
3167         versions of the hasNamedItem and hasElementWithId functions that don't
3168         ref/deref the AtomicStringImpl, get inlined, etc.
3169         * bindings/js/JSHTMLDocumentCustom.cpp:
3170         (WebCore::JSHTMLDocument::canGetItemsForName): Ditto.
3171         (WebCore::writeHelper): Use a Vector instead of a String to build up
3172         the string to avoid the bad performance of string append.
3173
3174         * dom/Document.cpp: Tweaked code and comments a bit. Nothing substantive.
3175         * dom/Document.h: Added new hasElementWithId function that's faster than
3176         getElementById because it doesn't ref/deref the AtomicStringImpl*, gets
3177         inlined, doesn't have to handle the 0 case, and doesn't try to return the
3178         element pointer (just a boolean).
3179
3180         * html/HTMLAppletElement.cpp:
3181         (WebCore::HTMLAppletElement::parseMappedAttribute): Use AtomicString
3182         consistently. Also renamed the data member for clarity.
3183         (WebCore::HTMLAppletElement::insertedIntoDocument): Ditto.
3184         (WebCore::HTMLAppletElement::removedFromDocument): Ditto.
3185         * html/HTMLAppletElement.h: Ditto.
3186
3187         * html/HTMLDocument.cpp:
3188         (WebCore::addItemToMap): Use AtomicString instead of String.
3189         (WebCore::removeItemFromMap): Ditto.
3190         (WebCore::HTMLDocument::addNamedItem): Updated for member name change.
3191         (WebCore::HTMLDocument::removeNamedItem): Ditto.
3192         (WebCore::HTMLDocument::addExtraNamedItem): Ditto.
3193         (WebCore::HTMLDocument::removeExtraNamedItem): Ditto.
3194         (WebCore::HTMLDocument::clear): Added. Moved code here from the JavaScript
3195         bindings. If we're going to have an empty placeholder function, there's no
3196         reason to have it in the bindings instead of here.
3197         * html/HTMLDocument.h: Added clear. Changed the named item function
3198         arguments to AtomicString insted of String. Changed the NameCountMap to
3199         use AtomicStringImpl* instead of StringImpl*. Renamed the data members
3200         to add a m_ prefix and remove the needless doc prefix. Added hasNamedItem
3201         and hasExtraNamedItem functions that are inlined and faster than the old
3202         idiom because they doesn't ref/deref the AtomicStringImpl*, get inlined,
3203         and don't have to handle the 0 case.
3204         * html/HTMLDocument.idl: Removed the [Custom] attribute on clear and took
3205         it out of the JavaScript-specific section.
3206
3207         * html/HTMLEmbedElement.cpp:
3208         (WebCore::HTMLEmbedElement::parseMappedAttribute): Use AtomicString
3209         consistently. Also renamed the data member for clarity.
3210         (WebCore::HTMLEmbedElement::insertedIntoDocument): Ditto.
3211         (WebCore::HTMLEmbedElement::removedFromDocument): Ditto.
3212         * html/HTMLFormElement.cpp:
3213         (WebCore::HTMLFormElement::insertedIntoDocument): Ditto.
3214         (WebCore::HTMLFormElement::removedFromDocument): Ditto.
3215         (WebCore::HTMLFormElement::parseMappedAttribute): Ditto.
3216         * html/HTMLFormElement.h: Ditto.
3217
3218         * html/HTMLFrameElementBase.cpp:
3219         (WebCore::HTMLFrameElementBase::openURL): Renamed m_name to m_frameName for
3220         clarity, since the frame name is not the same as the name attribute.
3221         (WebCore::HTMLFrameElementBase::parseMappedAttribute): Ditto.
3222         (WebCore::HTMLFrameElementBase::setNameAndOpenURL): Ditto.
3223         * html/HTMLFrameElementBase.h: Ditto.
3224
3225         * html/HTMLIFrameElement.cpp:
3226         (WebCore::HTMLIFrameElement::parseMappedAttribute): Use AtomicString
3227         consistently. Also renamed the data member for clarity.
3228         (WebCore::HTMLIFrameElement::insertedIntoDocument): Ditto.
3229         (WebCore::HTMLIFrameElement::removedFromDocument): Ditto.
3230         * html/HTMLIFrameElement.h: Ditto.
3231         * html/HTMLImageElement.cpp:
3232         (WebCore::HTMLImageElement::parseMappedAttribute): Ditto.
3233         (WebCore::HTMLImageElement::insertedIntoDocument): Ditto.
3234         (WebCore::HTMLImageElement::removedFromDocument): Ditto.
3235         * html/HTMLImageElement.h: Ditto.
3236         * html/HTMLObjectElement.cpp:
3237         (WebCore::HTMLObjectElement::parseMappedAttribute): Ditto.
3238         (WebCore::HTMLObjectElement::insertedIntoDocument): Ditto.
3239         (WebCore::HTMLObjectElement::removedFromDocument): Ditto.
3240         (WebCore::HTMLObjectElement::updateDocNamedItem): Ditto.
3241         * html/HTMLObjectElement.h: Ditto.
3242
3243         * html/HTMLParamElement.cpp:
3244         (WebCore::HTMLParamElement::isURLAttribute): Use equalIgnoringCase instead
3245         of callling lower().
3246
3247         * html/HTMLPlugInElement.h: Changed the type of m_name. The code that
3248         uses this is in HTMLAppletElement, HTMLEmbedElement, and HTMLObjectElement.
3249
3250         * platform/text/AtomicString.cpp:
3251         (WebCore::equal): Moved to an inline so we can share this code between a
3252         few different functions. It could move to a header too if we want to use
3253         it elsewhere.
3254         (WebCore::UCharBufferTranslator::equal): Change to use inline.
3255         (WebCore::HashAndCharactersTranslator::hash): Added.
3256         (WebCore::HashAndCharactersTranslator::equal): Added.
3257         (WebCore::HashAndCharactersTranslator::translate): Added.
3258         (WebCore::AtomicString::add): Improved the Identifier and UString overloads
3259         to use the already-computed hash code instead of rehashing the string.
3260         (WebCore::AtomicString::find): Added.
3261         * platform/text/AtomicString.h: Added a find function so we can avoid
3262         allocating memory just to look up a string in an atomic string set or map.
3263
3264         * platform/text/StringImpl.h: Added declarations needed for the
3265         AtomicString changes.
3266
3267 2008-03-17  Timothy Hatcher  <timothy@apple.com>
3268
3269         Reviewed by Mark Rowe.
3270
3271         Bug 17908: Various bugs in the Console completion code
3272         http://bugs.webkit.org/show_bug.cgi?id=17908
3273
3274         * page/inspector/ConsolePanel.js:
3275         (WebInspector.ConsolePanel.complete): Moved the code that checked for the caret being at the end
3276         of the prompt into the _caretAtEndOfPrompt helper function.
3277         (WebInspector.ConsolePanel.messagesSelectStart): Clear and redo the auto complete when the selection changes.
3278         (WebInspector.ConsolePanel._caretInsidePrompt): Fixed a logic error that always caused a false result.
3279         (WebInspector.ConsolePanel._caretAtEndOfPrompt): Added. Tests if the selection is a caret at the
3280         end of the prompt.
3281         (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Changed the offset to use the childNodes length.
3282         This makes sure the caret is at the end when there are multiple text nodes in the prompt.
3283
3284 2008-03-17  Dan Bernstein  <mitz@apple.com>
3285
3286         Rubber-stamped by Dave Hyatt.
3287
3288         - FloatingObject cleanup
3289
3290         Renamed FloatingObject's data members as follows: node -> m_renderer,
3291         startY -> m_top, endY -> m_bottom, left -> m_left, width -> m_width,
3292         and noPaint -> !m_shouldPaint, reversing the meaning of the flag.
3293
3294         Also addressed the FIXME in RenderBlock::containsFloat().
3295
3296         * rendering/RenderBlock.cpp:
3297         (WebCore::RenderBlock::repaintOverhangingFloats):
3298         (WebCore::RenderBlock::paintFloats):
3299         (WebCore::RenderBlock::insertFloatingObject):
3300         (WebCore::RenderBlock::removeFloatingObject):
3301         (WebCore::RenderBlock::positionNewFloats):
3302         (WebCore::RenderBlock::leftRelOffset):
3303         (WebCore::RenderBlock::rightRelOffset):
3304         (WebCore::RenderBlock::nextFloatBottomBelow):
3305         (WebCore::RenderBlock::floatBottom):
3306         (WebCore::RenderBlock::floatRect):
3307         (WebCore::RenderBlock::lowestPosition):
3308         (WebCore::RenderBlock::rightmostPosition):
3309         (WebCore::RenderBlock::leftmostPosition):
3310         (WebCore::RenderBlock::leftBottom):
3311         (WebCore::RenderBlock::rightBottom):
3312         (WebCore::RenderBlock::clearFloats):
3313         (WebCore::RenderBlock::addOverhangingFloats):
3314         (WebCore::RenderBlock::addIntrudingFloats):
3315         (WebCore::RenderBlock::containsFloat): Changed to return false if the
3316         floats lists exists but is empty, since line layout code no longer
3317         relies on the buggy behavior.
3318         (WebCore::RenderBlock::nodeAtPoint):
3319         (WebCore::RenderBlock::adjustForBorderFit):
3320         * rendering/RenderBlock.h:
3321         (WebCore::RenderBlock::containsFloats):
3322         (WebCore::RenderBlock::FloatingObject::FloatingObject):
3323         * rendering/bidi.cpp:
3324         (WebCore::RenderBlock::layoutInlineChildren):
3325         (WebCore::RenderBlock::matchedEndLine):
3326
3327 2008-03-17  Dan Bernstein  <mitz@apple.com>
3328
3329         Reviewed by Dave Hyatt.
3330
3331         - allow incremental relayout of blocks that contain floats
3332
3333         Tests: fast/repaint/line-flow-with-floats-[1-9].html
3334
3335         * rendering/RenderBlock.cpp:
3336         (WebCore::RenderBlock::clearFloatsIfNeeded): Cleaned up by moving most
3337         of the function body out of an if statement which was replaced with an
3338         early return.
3339         (WebCore::RenderBlock::insertFloatingObject): Cleaned up by moving most
3340         of the function body out of an if statement and moving the ASSERT, which
3341         is a crash in release builds, to the beginning. Made this function set
3342         the m_isDescendant flag of floating objects it creates.
3343         (WebCore::RenderBlock::removeFloatingObject): Added a call to
3344         markLinesDirtyInVerticalRange() when removing a float from a block with
3345         inline children.
3346         (WebCore::RenderBlock::markLinesDirtyInVerticalRange): Added. Marks the
3347         lines in the given range as dirty.
3348         (WebCore::RenderBlock::clearFloats): Added code to detect changes to
3349         the geometry of floats intruding into this block from other blocks and
3350         mark any lines whose available width has changed as a result as dirty.
3351
3352         * rendering/RenderBlock.h:
3353         (WebCore::RenderBlock::FloatWithRect::FloatWithRect): Added a structure
3354         to cache a float with its position and size.
3355         (WebCore::RenderBlock::FloatingObject::FloatingObject): Added an
3356         m_isDescendant flag, used by clearFloats() to distinguish between floats
3357         entering the block from outside and floats internal to the block.
3358
3359         * rendering/RootInlineBox.h:
3360         (WebCore::RootInlineBox::floats): Added.
3361         (WebCore::RootInlineBox::floatsPtr): Added.
3362         (WebCore::RootInlineBox::Overflow::Overflow): Added a data member to
3363         hold the floats originating on the line.
3364
3365         * rendering/bidi.cpp:
3366         (WebCore::RenderBlock::layoutInlineChildren): Made the existence of
3367         floats not force a full layout. Changed to cache the geometry of floats
3368         in the block and detect changes to it. If a float's size or position
3369         changes, all lines from that point on are treated as dirty. An exception
3370         is a change in the dimensions of a float on an otherwise-clean line,
3371         which only dirties lines potentially affected by the change (see
3372         determineStartPosition()). Added code to update each RootInlineBox's
3373         set of floats as lines are laid out. Added code to shift floats
3374         belonging to clean lines in the end along with the lines.
3375         (WebCore::RenderBlock::determineStartPosition): Made this function look
3376         for changes to floats' dimensions and mark lines as dirty accordingly.
3377         Also look for new floats and if found, cause a full layout. Added code
3378         to re-add floats belonging to clean lines.
3379         (WebCore::RenderBlock::matchedEndLine): Added checking that the clean
3380         lines in the end can be shifted vertically as needed, i.e. that the
3381         available width along the way is uniform.
3382
3383 2008-03-17  Eric Seidel  <eric@webkit.org>
3384
3385         Reviewed by darin.
3386
3387         Fix _NPN_IntFromIdentifier (and export the symbol for use!)
3388
3389         Test: plugins/netscape-identifier-conversion.html
3390
3391         * WebCore.NPAPI.exp:
3392         * bridge/npruntime.cpp:
3393         (_NPN_IntFromIdentifier):
3394
3395 2008-03-17  Sam Weinig  <sam@webkit.org>
3396
3397         Reviewed by Dan Bernstein.
3398
3399         Add HTMLCollection constructor to the Window object. (Omission noticed by Harri Porten)
3400
3401         * page/DOMWindow.idl: 
3402
3403 2008-03-17  Holger Hans Peter Freyther  <zecke@selfish.org>
3404
3405         Unreviewed Gtk+ build fix.
3406
3407         * platform/gtk/ScrollViewGtk.cpp: remove const
3408
3409 2008-03-17  Julien Chaffraix  <julien.chaffraix@gmail.com>
3410
3411         Reviewed by Holger.
3412
3413         <http://bugs.webkit.org/show_bug.cgi?id=17754>
3414
3415         - Implement ResourceHandle::loadResourceSynchronously to dispatch synchronous
3416           requests.
3417
3418         - Implement WebCoreSynchronousLoader, the ResourceHandleClient which holds
3419           the network data, response and error for us during the transfert.
3420
3421         * platform/network/ResourceHandleInternal.h: Remove trailing white space.
3422         * platform/network/curl/ResourceHandleCurl.cpp: Add WebCoreSynchronousLoader
3423         (WebCore::WebCoreSynchronousLoader::resourceResponse):
3424         (WebCore::WebCoreSynchronousLoader::resourceError):
3425         (WebCore::WebCoreSynchronousLoader::data):
3426         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
3427         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
3428         (WebCore::WebCoreSynchronousLoader::didReceiveData):
3429         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
3430         (WebCore::WebCoreSynchronousLoader::didFail):
3431         (WebCore::ResourceHandle::loadResourceSynchronously): Implement method
3432         using WebCoreSynchronousLoader.
3433
3434         * platform/network/curl/ResourceHandleManager.cpp:
3435         (WebCore::ResourceHandleManager::dispatchSynchronousJob):
3436         (WebCore::ResourceHandleManager::startJob):
3437         (WebCore::ResourceHandleManager::initializeHandle): Handle initialization
3438         method used both for synchronous and asynchronous job.
3439
3440         * platform/network/curl/ResourceHandleManager.h:
3441
3442 2008-03-17  Darin Adler  <darin@apple.com>
3443
3444         - try to fix GTK build
3445
3446         * platform/ScrollView.h: Make setGtkAdjustments adjustment.
3447         And non-virtual (why was it virtual?).
3448
3449 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
3450
3451         Fix Bug 17898: Split PluginMessageThrottlerWin into its own files
3452
3453         <http://bugs.webkit.org/show_bug.cgi?id=17898>
3454
3455         Move the PluginMessageThrottlerWin class into its own files, in
3456         preparation for refactoring PluginView code to be shared.
3457
3458         Reviewed and tweaked by Adam Roben.
3459
3460         * WebCore.vcproj/WebCore.vcproj:
3461         * plugins/PluginView.h:
3462         * plugins/win/PluginMessageThrottlerWin.cpp: Added.
3463         * plugins/win/PluginMessageThrottlerWin.h: Added.
3464         * plugins/win/PluginViewWin.cpp:
3465
3466 2008-03-17  Adam Roben  <aroben@apple.com>
3467
3468         More Windows build fixes after r31098
3469
3470         * platform/ScrollView.h: Make some more methods public.
3471
3472 2008-03-17  Adam Roben  <aroben@apple.com>
3473
3474         Windows and Qt build fixes after r31098
3475
3476         * platform/ScrollView.h: Mark methods public that still need to be so.
3477
3478 2008-03-16  Timothy Hatcher  <timothy@apple.com>
3479
3480         Reviewed by Darin Adler.
3481
3482         Bug 17883: Console completion should support bracket notation
3483         http://bugs.webkit.org/show_bug.cgi?id=17883
3484
3485         Also fixes a bug where the Inspector's window object was used instead of the
3486         inspected window object.
3487
3488         * page/inspector/ConsolePanel.js:
3489         (WebInspector.ConsolePanel.complete): Add a comment about the _backwardsRange call.
3490         (WebInspector.ConsolePanel.completions): Add a comment about the _backwardsRange call.
3491         Check the last character of the expression for a dot or bracket. Fallback
3492         to the InspectorController.inspectedWindow() instead of window, this was a bad bug.
3493         If the expression caused an exception, just consider the prefix a window property.
3494         When bracket notation is used remember what quote was used and compared property names
3495         with that quote surrounding it. Also escape the property name for the quote and backslash.
3496
3497 2008-03-17  Robert Blaut  <webkit@blaut.biz>
3498
3499         Reviewed by Darin.
3500
3501         Fix for bug http://bugs.webkit.org/show_bug.cgi?id=17696
3502         Set default margin-bottom for form element in quirk mode
3503         and be compatible with Gecko.
3504
3505         Tests: fast/css/margin-bottom-form-element-quirk.html
3506                fast/css/margin-bottom-form-element-strict.html
3507
3508         * css/html4.css:
3509         * css/quirks.css:
3510
3511 2008-03-17  Antti Koivisto  <antti@apple.com>
3512
3513         Reviewed by Darin.
3514
3515         Speculative fix for http://bugs.webkit.org/show_bug.cgi?id=17878
3516         Bug 17878: REGRESSION: Acid3 sometimes crashes Webkit under WebCore::Loader::Host::cancelRequests
3517         
3518         I can't reproduce the crash or make a test case for this one but I'm pretty sure this
3519         is the problem. Essentially the same bug as http://bugs.webkit.org/show_bug.cgi?id=17862
3520         except in didFail() instead of didFinishLoading().
3521
3522         * loader/loader.cpp:
3523         (WebCore::Loader::Host::didFail):
3524
3525 2008-03-17  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
3526
3527         Reviewed and tweaked by Darin.
3528
3529         http://bugs.webkit.org/show_bug.cgi?id=17172
3530         Refactor platform checks in ScrollView.h
3531
3532         * platform/ScrollView.h: Change #ifs around.
3533
3534 2008-03-17  Yuzhu Shen  <yuzhu.shen@gmail.com>
3535
3536         Reviewed by Darin.
3537
3538         Fix the bug: http://bugs.webkit.org/show_bug.cgi?id=17760
3539         It is necessary to load the image even when src="".
3540
3541         Test: fast/images/load-img-with-empty-src.html
3542
3543         * html/HTMLImageLoader.cpp:
3544         (WebCore::HTMLImageLoader::updateFromElement): isNull rather than isEmpty.
3545
3546 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
3547
3548         Fix GTK+ build from r31094.
3549
3550         * plugins/gtk/PluginDatabaseGtk.cpp:
3551         (PluginDatabase::getPluginsInPaths):
3552
3553 2008-03-17  Adam Roben  <aroben@apple.com>
3554
3555         Fix Bug 17876: REGRESSION (r31060): Attempting to visit Ofcom page causes crash
3556
3557         <http://bugs.webkit.org/show_bug.cgi?id=17876>
3558
3559         Reviewed by John.
3560
3561         Test: fast/dom/remove-named-attribute-crash.html
3562
3563         * dom/NamedAttrMap.cpp:
3564         (WebCore::NamedAttrMap::removeAttribute): Store the Attribute we're
3565         going to remove from the m_attributes Vector in a RefPtr so it doesn't
3566         get deleted when it is removed from the Vector.
3567
3568 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
3569
3570         Reviewed by Adam Roben.
3571
3572         Implement PluginDatabase for GTK+ with PluginDatabaseGtk.cpp.
3573         Remove implemented methods from TemporaryLinkStubs.
3574
3575         * GNUmakefile.am:
3576         * plugins/gtk:
3577         * plugins/gtk/PluginDatabaseGtk.cpp:
3578         * platform/gtk/TemporaryLinkStubs.cpp:
3579
3580 2008-03-17  Simon Hausmann  <hausmann@webkit.org>
3581
3582         Fix the Qt build.
3583
3584         * platform/text/qt/TextCodecQt.cpp:
3585         (WebCore::TextCodecQt::encode):
3586         * platform/text/qt/TextCodecQt.h:
3587
3588 2008-03-16  Maciej Stachowiak  <mjs@apple.com>
3589
3590         Not reviewed, just fixing an incomplete comment from the last commit.
3591
3592         * dom/Range.cpp:
3593         (WebCore::Range::surroundContents):
3594
3595 2008-03-16  Maciej Stachowiak  <mjs@apple.com>
3596
3597         Reviewed by Darin.
3598
3599         - fixed "Acid3 expects different exceptions for surroundContents calls involving comment nodes (affects Acid3 test 11)"
3600         http://bugs.webkit.org/show_bug.cgi?id=17509
3601         
3602         This gets us to 92/100
3603
3604         * dom/Range.cpp:
3605         (WebCore::Range::surroundContents): Check for
3606         HIERARCHY_REQUEST_ERR before BAD_BOUNDARYPOINTS_ERR, since Acid3
3607         expects exceptional conditions to be tested in the order that the
3608         spec lists them. Also, adjust the HIERARCHY_REQUEST_ERR check. If
3609         the start point of the range is in a comment node, the node that
3610         would be the parent of a partial replacement is actually the
3611         comment node's parent (since comment nodes have character
3612         indices), so we should do the HIERARCHY_REQUEST_ERR check based on
3613         the parent of the comment node, as for text nodes, even though it
3614         will fail later with a different exception because it is not
3615         allowed to surround a partially selected non-text node.
3616
3617 2008-03-16  Marvin Decker  <marv.decker@gmail.com>
3618
3619         Reviewed by Darin.
3620
3621         Fix bug 15119: URL query characters that are unencodable in the
3622         request's character set should be converted to XML entities with
3623         non-alphanumeric characters escaped.
3624
3625         Test: http/tests/uri/escaped-entity.html
3626
3627         * html/FormDataList.cpp:
3628         (WebCore::FormDataList::appendString):
3629         * html/HTMLFormElement.cpp:
3630         (WebCore::HTMLFormElement::formData):
3631         * platform/KURL.cpp:
3632         (WebCore::encodeRelativeString):
3633         * platform/text/String.cpp:
3634         (WebCore::String::latin1):
3635         (WebCore::String::utf8):
3636         * platform/text/TextCodec.cpp:
3637         (WebCore::TextCodec::unencodableCharReplacement):
3638         * platform/text/TextCodec.h:
3639         (WebCore::):
3640         * platform/text/TextCodecICU.cpp:
3641         (WebCore::urlEscapedEntityCallback):
3642         (WebCore::gbkUrlEscapedEntityCallack):
3643         (WebCore::TextCodecICU::encode):
3644         * platform/text/TextCodecICU.h:
3645         (WebCore::TextCodecICU::setNeedsGBKFallbacks):
3646         * platform/text/TextCodecLatin1.cpp:
3647         (WebCore::encodeComplexWindowsLatin1):
3648         (WebCore::TextCodecLatin1::encode):
3649         * platform/text/TextCodecLatin1.h:
3650         * platform/text/TextCodecUTF16.cpp:
3651         (WebCore::TextCodecUTF16::encode):
3652         * platform/text/TextCodecUTF16.h:
3653         * platform/text/TextCodecUserDefined.cpp:
3654         (WebCore::encodeComplexUserDefined):
3655         (WebCore::TextCodecUserDefined::encode):
3656         * platform/text/TextCodecUserDefined.h:
3657         * platform/text/TextEncoding.cpp:
3658         (WebCore::TextEncoding::encode):
3659         * platform/text/TextEncoding.h:
3660         * platform/text/mac/TextCodecMac.cpp:
3661         (WebCore::TextCodecMac::encode):
3662         * platform/text/mac/TextCodecMac.h:
3663         * xml/XMLHttpRequest.cpp:
3664         (WebCore::XMLHttpRequest::send):
3665
3666 2008-03-16  Kevin Ollivier  <kevino@theolliviers.com>
3667
3668         Rubber stamped by Darin.
3669
3670         Add set-webkit-configuration support for wx port, and centralize
3671         build dir location setting.
3672
3673         http://bugs.webkit.org/show_bug.cgi?id=17790
3674
3675         * webcore-base.bkl:
3676
3677 2008-03-16  Darin Adler  <darin@apple.com>
3678
3679         Reviewed by Mark Rowe.
3680
3681         - http://bugs.webkit.org/show_bug.cgi?id=17881
3682           a little cleanup for HTMLTextAreaElement
3683
3684         Tests: fast/forms/textarea-default-value-leading-newline.html
3685                fast/forms/textarea-linewrap-dynamic.html
3686
3687         * html/HTMLTextAreaElement.cpp:
3688         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Tweaked names/
3689         (WebCore::HTMLTextAreaElement::selectionStart): Ditto, also use early return
3690         and check for < 0 rather than -1 specifically.
3691         (WebCore::HTMLTextAreaElement::selectionEnd): Ditto.
3692         (WebCore::HTMLTextAreaElement::setSelectionStart): Early return.
3693         (WebCore::HTMLTextAreaElement::setSelectionEnd): Ditto.
3694         (WebCore::HTMLTextAreaElement::select): Ditto.
3695         (WebCore::HTMLTextAreaElement::setSelectionRange): Ditto.
3696         (WebCore::HTMLTextAreaElement::parseMappedAttribute): Changed value parsing
3697         to treat unknown values as meaning "default" rather than "leave value as-is".
3698         Only call setNeedsLayoutAndPrefWidthsRecalc when mode changed.
3699         (WebCore::HTMLTextAreaElement::createRenderer): Removed name of unused argument.
3700         (WebCore::HTMLTextAreaElement::appendFormData): Updated for name changes.
3701         (WebCore::HTMLTextAreaElement::isKeyboardFocusable): Got rid of unnneeded explicit
3702         class name in isFocusable call.
3703         (WebCore::HTMLTextAreaElement::isMouseFocusable): Ditto.
3704         (WebCore::HTMLTextAreaElement::updateFocusAppearance): Tweaked formatting.
3705         (WebCore::HTMLTextAreaElement::defaultEventHandler): Ditto.
3706         (WebCore::HTMLTextAreaElement::updateValue): Early return.
3707         (WebCore::HTMLTextAreaElement::setValue): Got rid of intermediate value to
3708         eliminate on small refcount churn.
3709         (WebCore::HTMLTextAreaElement::defaultValue): Got rid of unneeded redundant
3710         string length checks, since String already checks all indexing and returns 0.
3711         (WebCore::HTMLTextAreaElement::setDefaultValue): Added code to normalize
3712         line endings and add a leading line ending to fix cases where the first
3713         character is a newline.
3714         (WebCore::HTMLTextAreaElement::accessKeyAction): Removed name of unused arg.
3715         (WebCore::HTMLTextAreaElement::accessKey): Changed return value to avoid
3716         refcount churn.
3717         (WebCore::HTMLTextAreaElement::selection): Updated names and use < 0 instead
3718         of -1 specifically.
3719
3720         * html/HTMLTextAreaElement.h: Replaced wrap function with more-specific
3721         shouldWrapText one. Changed return value of accessKey. Made WrapMethod enum
3722         provate and renamed the values. Renamed cachedSelStart and cachedSelEnd to
3723         m_cachedSelectionStart and m_cachedSelectionEnd.
3724
3725         * rendering/RenderTextControl.cpp:
3726         (WebCore::RenderTextControl::createInnerTextStyle): Updated for change to
3727         HTMLTextAreaElement wrap function.
3728
3729 2008-03-16  Antti Koivisto  <antti@apple.com>
3730
3731         Reviewed by Mitz.
3732
3733         Fix http/tests/security/frame-loading-via-document-write.html
3734         which was broken by the preload patch.
3735         
3736         Don't print error message when preload fails local file security check.
3737         Some minor refactoring.
3738
3739         * html/PreloadScanner.cpp:
3740         (WebCore::PreloadScanner::emitTag):
3741         (WebCore::PreloadScanner::emitCSSRule):
3742         * loader/Cache.cpp:
3743         (WebCore::Cache::requestResource):
3744         * loader/Cache.h:
3745         * loader/DocLoader.cpp:
3746         (WebCore::DocLoader::requestResource):
3747         (WebCore::DocLoader::preload):
3748         (WebCore::DocLoader::printPreloadStats):
3749         * loader/DocLoader.h:
3750
3751 2008-03-16  Antti Koivisto  <antti@apple.com>
3752
3753         Reviewed by Darin.
3754         
3755         Fix http://bugs.webkit.org/show_bug.cgi?id=17862
3756         REGRESSION (r31038): Reproducible crash under DocLoader::checkForReload() at marware.com
3757         
3758         This was a memory smasher introduced by the preloading patch. 
3759         If a script resource was marked uncacheable, early deletion of the 
3760         Request object would cause deletion of the CachedResource too if
3761         it was referred more than once in a single document.
3762
3763         Test: http/tests/misc/uncacheable-script-repeated.html
3764
3765         * loader/loader.cpp:
3766         (WebCore::Loader::Host::servePendingRequests):
3767         (WebCore::Loader::Host::didFinishLoading):
3768
3769 2008-03-16  Yuzhu Shen  <yuzhu.shen@gmail.com>
3770
3771         Reviewed by Darin.
3772
3773         Fix bug http://bugs.webkit.org/show_bug.cgi?id=17714
3774         <img href="#"> should go to top of the page.
3775
3776         Test: fast/html/empty-fragment-id-goto-top.html
3777
3778         * loader/FrameLoader.cpp:
3779         (WebCore::FrameLoader::gotoAnchor):
3780
3781 2008-03-16  Thiago Macieira  <thiago.macieira@trolltech.com>
3782
3783         Reviewed by Darin.
3784
3785         Don't use RefPtr in classes you haven't seen the implementation of.
3786
3787         Forward-declaration and declaration of RefPtr<Foo> is ok. But you
3788         cannot *use* said objects until Foo is defined. This is true even for
3789         initialisation with a 0.
3790
3791         Seems the HP aCC compiler is more strict here than gcc.
3792
3793         * editing/SplitTextNodeCommand.h:
3794         * page/FrameTree.h:
3795         * xml/XPathExpressionNode.h:
3796
3797 2008-03-16  Darin Adler  <darin@apple.com>
3798
3799         Reviewed by Mitz.
3800
3801         - fix http://bugs.webkit.org/show_bug.cgi?id=14941
3802           <rdar://problem/5404093> textarea value from JavaScript includes extra newline
3803
3804         Test: fast/forms/textarea-trailing-newline.html
3805
3806         * rendering/RenderTextControl.cpp:
3807         (WebCore::RenderTextControl::finishText): Added code to strip the trailing
3808         newline. It's possible there are some obscure cases where this is not wanted,
3809         but I couldn't find any. If someone finds a case where this is bad, we can
3810         make the code conditional.
3811
3812 2008-03-16  Darin Adler  <darin@apple.com>
3813
3814         Reviewed by Mitz.
3815
3816         - fix http://bugs.webkit.org/show_bug.cgi?id=17876
3817           Attempting to visit Ofcom page causes crash
3818
3819         This is causing intermittent crashes on some existing test cases on the buildbot
3820         too; I don't have a 100% test case right now, but it should be easy to add one later
3821         and this does fix a crash in a test we already have.
3822
3823         * dom/CharacterData.cpp:
3824         (WebCore::CharacterData::CharacterData): Initialize m_data to the empty string,
3825         not the null string. The class assumes the string can never being null.
3826         (WebCore::CharacterData::setData): If asked to set the data to the null string,
3827         set it to the empty string instead. This matches what the (non-empty) constructor
3828         has always done.
3829
3830 2008-03-15  Timothy Hatcher  <timothy@apple.com>
3831
3832         Reviewed by Adam Roben.
3833
3834         Bug 17870: Web Inspector console should feel more like a terminal
3835         http://bugs.webkit.org/show_bug.cgi?id=17870
3836
3837         Bug 14390: Console input area should be more noticeable
3838         http://bugs.webkit.org/show_bug.cgi?id=14390
3839         <rdar://5712831>
3840
3841         Bug 17237: Inspector should tab-complete object properties in the Console
3842         http://bugs.webkit.org/show_bug.cgi?id=17237
3843         <rdar://5732842>
3844
3845         Adds tab completion, auto completion and a blended input prompt.
3846         The prompt is also focused when the console is shown.
3847            Implements a new look, that will be part of the UI refresh.
3848
3849         * page/inspector/ConsolePanel.js: 
3850         (WebInspector.ConsolePanel): Renamed a few properties.
3851         (WebInspector.ConsolePanel.get/set promptText): Property to set
3852         and get the current prompt text. Does not affect command history.
3853         (WebInspector.ConsolePanel.show): Make the prompt focus on show.
3854         (WebInspector.ConsolePanel.acceptAutoComplete): Accepts any
3855         pending auto complete text.
3856         (WebInspector.ConsolePanel.clearAutoComplete): Cancels any pending
3857         auto complete text.
3858         (WebInspector.ConsolePanel.autoCompleteSoon): Sets a timeout to auto
3859         complete in 250 ms, only if there isn't a pending auto complete.
3860         (WebInspector.ConsolePanel.complete): 
3861         (WebInspector.ConsolePanel.completions): Generate a list of possible
3862         completions based on the prefix and the previous expression ranges.
3863         (WebInspector.ConsolePanel._backwardsRange): Helper to scan backwards
3864         from a node and offset to find a start node and offset of the first
3865         character found in the characters string.
3866         (WebInspector.ConsolePanel._evalInInspectedWindow): Helper to eval in the
3867         inspected window.
3868         (WebInspector.ConsolePanel._caretInsidePrompt): Returns true if the selection
3869         is collapsed and is inside the prompt element.
3870         (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Moves the selection
3871         to the end of the prompt.
3872         (WebInspector.ConsolePanel._onTabPressed): Calls complete on
3873         tab press.
3874         (WebInspector.ConsolePanel._onEnterPressed): Call clearAutoComplete so the
3875         autocompletion text is not evaluated.
3876
3877         * page/inspector/Images/errorIcon.png: New image.
3878         * page/inspector/Images/userInputIcon.png: Added.
3879         * page/inspector/Images/userInputPreviousIcon.png: Added.
3880         * page/inspector/Images/warningIcon.png: New image.
3881         * page/inspector/inspector.css: New refreshed UI.
3882
3883 2008-03-15  Mark Mentovai  <mark@moxienet.com>
3884
3885         Reviewed and landed by Darin.
3886
3887         - http://bugs.webkit.org/show_bug.cgi?id=17833
3888           use file extensions instead of explicit file types in WebCore's Xcode project
3889
3890         * WebCore.xcodeproj/project.pbxproj: Remove unnecessary
3891           uses of explicitFileType, preferring lastKnownFileType ("File Type:
3892           Default for File" in Xcode's File Info's General tab).  Files below
3893           that relied on an explicit file type setting other than what would
3894           be implied by their extensions have been renamed to have correct
3895           extensions.
3896         * bridge/jni/jni_jsobject.cpp: Removed.
3897         * bridge/jni/jni_jsobject.mm: Copied from bridge/jni/jni_jsobject.cpp.
3898         * loader/mac/LoaderNSURLExtras.m: Removed.
3899         * loader/mac/LoaderNSURLExtras.mm: Copied from loader/mac/LoaderNSURLExtras.m.
3900         * platform/mac/SharedTimerMac.cpp: Removed.
3901         * platform/mac/SharedTimerMac.mm: Copied from platform/mac/SharedTimerMac.cpp.
3902
3903 2008-03-15  Darin Adler  <darin@apple.com>
3904
3905         Reviewed by Sam.
3906
3907         - fix http://bugs.webkit.org/show_bug.cgi?id=11997
3908           Ranges are not fixed after mutation (affects Acid3 test 13)
3909
3910         Test: fast/dom/Range/mutation.html
3911
3912         * WebCore.xcodeproj/project.pbxproj: Added NodeWithIndex.h, NodeWithIndexAfter.h,
3913         and NodeWithIndexBefore.h.
3914
3915         * dom/CharacterData.cpp:
3916         (WebCore::CharacterData::setData): Replaced call to Document::removeMarkers
3917         with call to Document::textRemoved.
3918         (WebCore::CharacterData::insertData): Replaced call to Document::shiftMarkers
3919         with call to Document::textInserted.
3920         (WebCore::CharacterData::deleteData): Replaced call to Document::removeMarkers
3921         and Document::shiftMarkers with call to Document::textRemoved.
3922         (WebCore::CharacterData::replaceData): Replaced call to Document::removeMarkers
3923         and Document::shiftMarkers with call to Document::textRemoved and
3924         Document::textInserted.
3925         (WebCore::CharacterData::containsOnlyWhitespace): Tweaked a bit.
3926
3927         * dom/ContainerNode.cpp:
3928         (WebCore::ContainerNode::childrenChanged): Added a call to
3929         Document::nodeChildrenChanged when the nmber of children was changed (and not
3930         by the parser).
3931         (WebCore::dispatchChildRemovalEvents): Updated for name change.
3932
3933         * dom/Document.cpp:
3934         (WebCore::Document::~Document): Assert that all ranges are gone.
3935         (WebCore::Document::nodeChildrenChanged): Added. Calls nodeChildrenChanged on
3936         all ranges.
3937         (WebCore::Document::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
3938         Added code to call nodeWillBeRemoved on all ranges.
3939         (WebCore::Document::textInserted): Added. Calls textInserted on all ranges and
3940         also calls shiftMarkers.
3941         (WebCore::Document::textRemoved): Added. Calls textRemoved on all ranges and also
3942         calls removeMarkers and shiftMarkers.
3943         (WebCore::Document::textNodesMerged): Added. Calls textNodesMerged on all ranges.
3944         (WebCore::Document::textNodeSplit): Added. Calls textNodeSplit on all ranges.
3945         (WebCore::Document::attachRange): Added. Adds range to the HashSet of all ranges
3946         for this document.
3947         (WebCore::Document::detachRange): Added. Removes range from the HashSet.
3948         * dom/Document.h: Added the new functions and the data member.
3949
3950         * dom/Element.cpp:
3951         (WebCore::Element::normalizeAttributes): Added. Contains the part of the
3952         normalize function that's specific to Element. Better encapsulation to have it
3953         here rather than in Node::normalize.
3954         * dom/Element.h: Added the new function.
3955
3956         * dom/Node.cpp:
3957         (WebCore::Node::normalize): Rewrote so it's no longer recursive. Also added
3958         a call to textNodesMerged after each pair of nodes is merged but before the
3959         second node is removed.
3960         (WebCore::Node::traverseNextNodePostOrder): Added. Helper function used by
3961         normalize, but also useful elsewhere.
3962         * dom/Node.h: Added the new function.
3963
3964         * dom/NodeIterator.cpp:
3965         (WebCore::NodeIterator::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
3966         * dom/NodeIterator.h: Ditto.
3967
3968         * dom/ProcessingInstruction.cpp:
3969         (WebCore::ProcessingInstruction::setData): Call textRemoved.
3970
3971         * dom/Range.cpp:
3972         (WebCore::NodeWithIndex::index): Added. Computes and stores index.
3973         (WebCore::NodeWithIndexBefore::indexBefore): Added. Computes and stores index.
3974         (WebCore::NodeWithIndexAfter::indexAfter): Added. Computes and stores index.
3975         (WebCore::Range::Range): Call attachRange.
3976         (WebCore::Range::~Range): Call detachRange unless the range is already detached.
3977         (WebCore::Range::commonAncestorContainer): Removed check for WRONG_DOCUMENT_ERR.
3978         It's no longer possible to create a range where the two containers are non-zero
3979         and have no common ancestor.
3980         (WebCore::Range::isPointInRange): Rewrote expression to be more readable.
3981         (WebCore::Range::compareNode): Changed local variable to use int for consistency.
3982         (WebCore::Range::compareBoundaryPoints): Replaced ASSERT with ASSERT_NOT_REACHED.
3983         (WebCore::Range::deleteContents): Removed check for INVALID_STATE_ERR and
3984         initialization of ec to 0; both are now inside checkDeleteExtract.
3985         (WebCore::Range::intersectsNode): Changed local variable to use int for consistency.
3986         Also changed comparison to use < 0 and >= 0 rather than checking explicitly for 1
3987         and -1.
3988         (WebCore::Range::processContents): Changed code to not get the nodeType multiple
3989         times on the same node, and tweaked formatting. Removed code to update the range
3990         on deletion, because the normal delete logic will take care of that now.
3991         (WebCore::Range::extractContents): Removed check for INVALID_STATE_ERR and
3992         initialization of ec to 0; both are now inside checkDeleteExtract.
3993         (WebCore::Range::insertNode): Changed local variable to use int for consistency.
3994         (WebCore::Range::toString): Changed variable name to pastLast.
3995         (WebCore::Range::detach): Call detachRange.
3996         (WebCore::Range::checkDeleteExtract): Added check for detached range and code to
3997         set ec to 0; moved here from the two callers. Also changed variable name to pastLast.
3998         (WebCore::endpointNodeChildrenChanged): Added.
3999         (WebCore::Range::nodeChildrenChanged): Added.
4000         (WebCore::endpointNodeWillBeRemoved): Added.
4001         (WebCore::Range::nodeWillBeRemoved): Added.
4002         (WebCore::endpointTextInserted): Added.
4003         (WebCore::Range::textInserted): Added.
4004         (WebCore::endpointTextRemoved): Added.
4005         (WebCore::Range::textRemoved): Added.
4006         (WebCore::endpointTextNodesMerged): Added.
4007         (WebCore::Range::textNodesMerged): Added.
4008         (WebCore::endpointTextNodesSplit): Added.
4009         (WebCore::Range::textNodeSplit): Added.
4010
4011         * dom/Range.h: Added new member functions.
4012
4013         * dom/NodeWithIndex.h: Added. Makes it so we won't find the index for the same
4014         node more than once.
4015         * dom/NodeWithIndexAfter.h: Added. Similar to NodeWithIndex but gives the index after a
4016         node and treats a node pointer of 0 as meaning "before first node in parent container".
4017         * dom/NodeWithIndexBefore.h: Added.  Similar to NodeWithIndex but treats a node pointer of 0
4018         as meaning "after last node in parent container".
4019
4020         * dom/Text.cpp:
4021         (WebCore::Text::splitText): Call textNodeSplit.
4022
4023         * editing/ApplyStyleCommand.cpp:
4024         (WebCore::ApplyStyleCommand::applyInlineStyle): Changed variable name to pastLast.
4025
4026 2008-03-15  Julien Chaffraix  <julien.chaffraix@gmail.com>
4027
4028         Reviewed by Holger.
4029
4030         [CURL] Crash below ResourceHandleManager::setupPOST when job->request().httpBody() is NULL
4031         http://bugs.webkit.org/show_bug.cgi?id=16906
4032
4033         Add null checks for httpBody() to match other ports.
4034
4035         Test: http/tests/xmlhttprequest/xmlhttprequest-post-crash.html
4036
4037         * platform/network/curl/ResourceHandleManager.cpp:
4038         (WebCore::readCallback): Add null check.
4039         (WebCore::ResourceHandleManager::setupPOST): Ditto.
4040
4041 2008-03-14  Steve Falkenburg  <sfalken@apple.com>
4042
4043         PGO build fixes.
4044
4045         * WebCore.vcproj/WebCore.vcproj:
4046
4047 2008-03-14  Anders Carlsson  <andersca@apple.com>
4048
4049         Reviewed by Sam.
4050
4051         <rdar://problem/5794989>
4052         https://bugs.webkit.org/show_bug.cgi?id=17792
4053         REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work
4054
4055         Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow
4056         so that somewindow.open calls where the active window and 'somewindow' differ return the correct frame.
4057         
4058         * bindings/js/JSDOMWindowBase.cpp:
4059         (WebCore::createWindow):
4060         * loader/FrameLoader.cpp:
4061         (WebCore::FrameLoader::createWindow):
4062         * loader/FrameLoader.h:
4063
4064 2008-03-14  Dan Bernstein  <mitz@apple.com>
4065
4066         Reviewed by Mark Rowe.
4067
4068         - fix <rdar://problem/5797836> shadow offsets are smaller than specified
4069
4070         * platform/graphics/cg/GraphicsContextCG.cpp:
4071         (WebCore::GraphicsContext::setShadow): Made the workaround for
4072         <rdar://problem/5539388> unconditional.
4073
4074 2008-03-14  Adam Roben  <aroben@apple.com>
4075
4076         Fix it right this time
4077
4078         * platform/MainThread.cpp: Cast to unsigned so we can use %u in the
4079         format string.
4080         * platform/mac/MainThreadMac.mm:
4081
4082 2008-03-14  Adam Roben  <aroben@apple.com>
4083
4084         Mac build fix
4085
4086         * platform/mac/MainThreadMac.mm: Corrected a typo.
4087
4088 2008-03-14  Dan Bernstein  <mitz@apple.com>
4089
4090         Reviewed by Darin Adler.
4091
4092         - fix http://bugs.webkit.org/show_bug.cgi?id=17834
4093           REGRESSION: floated first-letter does not work when included in table
4094
4095         Test: fast/css/first-letter-float.html
4096
4097         * rendering/RenderBlock.cpp:
4098         (WebCore::RenderBlock::updateFirstLetter): Changed the search for the
4099         first text node to stop at a float if that float is an existing first-
4100         letter.
4101
4102 2008-03-14  Sam Weinig  <sam@webkit.org>
4103
4104         Fix Mac build
4105
4106         * WebCore.xcodeproj/project.pbxproj:
4107
4108 2008-03-13  Adam Roben  <aroben@apple.com>
4109
4110         Make most of callOnMainThread's implementation be cross-platform
4111
4112         I took the non-platform-specific parts of MainThreadWin.cpp and moved
4113         them to a new MainThread.cpp. Each platform is now responsible for
4114         implementing one function, scheduleDispatchFunctionsOnMainThread,
4115         which is supposed to set things up so that
4116         dispatchFunctionsFromMainThread gets called from the main thread in
4117         the near future.
4118
4119         Reviewed by Alexey.
4120
4121         * GNUmakefile.am: Added MainThread.cpp to the project.
4122         * WebCore.pro: Ditto.
4123         * WebCore.vcproj/WebCore.vcproj: Ditto.
4124         * WebCore.xcodeproj/project.pbxproj: Ditto.
4125         * WebCoreSources.bkl: Ditto.
4126         * platform/MainThread.cpp:
4127           - Copied from WebCore/platform/win/MainThreadWin.cpp.
4128           - Removed the Windows-specific parts.
4129         (WebCore::callOnMainThread): Changed to call
4130         scheduleDispatchFunctionsOnMainThread instead of PostMessage.
4131         * platform/gtk/MainThreadGtk.cpp:
4132         (WebCore::timeoutFired): Renamed from callFunctionOnMainThread. Now
4133         just calls dispatchFunctionsFromMainThread.
4134         (WebCore::scheduleDispatchFunctionsOnMainThread): Added. Calls through
4135         to g_timeout_add.
4136         * platform/mac/MainThreadMac.mm: Renamed WebCoreFunctionWrapper to
4137         WebCoreMainThreadCaller.
4138         (-[WebCoreMainThreadCaller call]): Calls through to
4139         dispatchFunctionsFromMainThread.
4140         (WebCore::scheduleDispatchFunctionsOnMainThread): Makes a new
4141         WebCoreMainThreadCaller and calls performSelectorOnMainThread on it.
4142         * platform/qt/MainThreadQt.cpp: Removed PerformFunctionEvent.
4143         (WebCore::MainThreadInvoker::event): Chagned to call through to
4144         dispatchFunctionsFromMainThread.
4145         (WebCore::scheduleDispatchFunctionsOnMainThread): Sends an empty event
4146         to the MainThreadInvoker.
4147         * platform/win/MainThreadWin.cpp:
4148           - Removed the non-Windows-specific parts.
4149           - Removed some unnecessary initialization of static variables to 0.
4150         (WebCore::ThreadingWindowWndProc): Changed to call
4151         dispatchFunctionsFromMainThread.
4152         (WebCore::scheduleDispatchFunctionsOnMainThread): Calls through to
4153         PostMessage.
4154         * platform/wx/MainThreadWx.cpp:
4155         (WebCore::scheduleDispatchFunctionsOnMainThread): Added.
4156
4157 2008-03-14  Beth Dakin  <bdakin@apple.com>
4158
4159         Reviewed by Geoff.
4160
4161         Fix for <rdar://problem/5728171> Potential PLT speedup: don't 
4162         realloc every time inside NamedAttrMap::addAttribute
4163
4164         The speed-up for this turned out to be so small that it is mostly 
4165         imperceptible. It is likely that it is a tiny boost, though, and 
4166         the new code is much cleaner.
4167
4168         * dom/Element.cpp:
4169         (WebCore::Element::setAttributeMap): attrs is now called 
4170         m_attributes
4171         * dom/NamedAttrMap.cpp: The array attrs is now the Vector of 
4172         RefPtrs called m_attributes, and there is no longer any need for 
4173         the len member variable. 
4174         (WebCore::NamedAttrMap::NamedAttrMap): 
4175         (WebCore::NamedAttrMap::item):
4176         (WebCore::NamedAttrMap::getAttributeItem):
4177         (WebCore::NamedAttrMap::clearAttributes):
4178         (WebCore::NamedAttrMap::operator=):
4179         (WebCore::NamedAttrMap::addAttribute):
4180         (WebCore::NamedAttrMap::removeAttribute):
4181         (WebCore::NamedAttrMap::mapsEquivalent):
4182         * dom/NamedAttrMap.h: Same.
4183         (WebCore::NamedAttrMap::length):
4184         (WebCore::NamedAttrMap::attributeItem):
4185         (WebCore::NamedAttrMap::shrinkToLength):
4186         (WebCore::NamedAttrMap::reserveCapacity):
4187         * html/HTMLTokenizer.cpp: One of the benefits of the old array was 
4188         that it never took up more memory than it needed to. So the 
4189         tokenizer utilizes new member functions on NamedAttrMap 
4190         (shrinkToLength and reserveCapacity) to try to keep memory usage at 
4191         a minimum. 
4192         (WebCore::Token::addAttribute):
4193         (WebCore::HTMLTokenizer::processToken):
4194
4195 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
4196
4197         BUILD FIX when ENABLE(MAC_JAVA_BRIDGE) set to 0.
4198
4199         * page/mac/FrameMac.mm: Move up #if ENABLE(MAC_JAVA_BRIDGE) guard
4200         to comment out unused code.
4201
4202 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
4203
4204         Unify concept of enabling the Mac Java bridge.
4205
4206         Reviewed by Darin and Anders.