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