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