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