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