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