Holger Hans Peter Freyther <zecke@selfish.org>
[WebKit-https.git] / WebCore / ChangeLog
1 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
2
3         Reviewed by Simon.
4
5         Allow ListboxAppearance to take focus as well. Stolen from Tor Arne
6
7         * platform/qt/RenderThemeQt.cpp:
8         (WebCore::RenderThemeQt::supportsFocus):
9
10 2008-04-25  Simon Hausmann  <hausmann@webkit.org>
11
12         Reviewed by Holger.
13
14         Remove debug output.
15
16         * platform/network/qt/ResourceHandleQt.cpp:
17         (WebCore::ResourceHandle::loadResourceSynchronously):
18
19 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
20
21         Reviewed by Simon.
22
23         Change the string for searchableIndexIntroduction() to match the mac
24         and pass http/tests/misc/isindex-formdata.html
25
26         * platform/qt/Localizations.cpp:
27
28 2008-04-25  Simon Hausmann  <hausmann@webkit.org>
29
30         Reviewed by Holger.
31
32         When we encounter a new/unknown HTTP request type report it back to WebCore as loading error.
33
34         * platform/network/qt/QNetworkReplyHandler.cpp:
35         (WebCore::QNetworkReplyHandler::start):
36
37 2008-04-25  Benjamin Meyer  <bmeyer@trolltech.com>
38
39         Reviewed by Simon.
40
41         Fix crash in the networking layer.
42
43         Set the m_reply to null right after calling deleteLater().
44
45         * platform/network/qt/QNetworkReplyHandler.cpp:
46         (WebCore::QNetworkReplyHandler::finish):
47
48 2008-04-24  Mark Rowe  <mrowe@apple.com>
49
50         Rubber-stamped by Oliver Hunt.
51
52         * WebCore.base.exp: Remove two symbols from the export list that don't need to be exported.
53
54 2008-04-24  Dan Bernstein  <mitz@apple.com>
55
56         Reviewed by Dave Hyatt.
57
58         - fix https://bugs.webkit.org/show_bug.cgi?id=18722
59           <rdar://problem/5888360> REGRESSION (3.1 -> TOT): Webkit Nightly Build crashes when visiting i has a hotdog
60
61         Test: fast/dynamic/float-remove-above-line.html
62
63         * rendering/bidi.cpp:
64         (WebCore::RenderBlock::layoutInlineChildren): Avoid adding floats that
65         do not intrude into the line to its floats vector. When such floats go
66         away, they do not dirty the line (because they do not intersect with it)
67         and having it keep them in its floats vector is what caused the crash.
68
69 2008-04-24  Justin Garcia  <justin.garcia@apple.com>
70
71         Reviewed by John Sullivan.
72         
73         It is possible, despite our safeguards, for createMarkup to iterate past the end of the Range
74         that is passed to it.  Added a null check to prevent crashes in this situation (we won't crash but
75         we will create too much markup), and added an ASSERT to hopefully catch the scenario in a debugger 
76         and help us understand what's going on.
77
78         * editing/markup.cpp:
79         (WebCore::createMarkup):
80
81 2008-04-24  Mark Rowe  <mrowe@apple.com>
82
83         Reviewed by Sam Weinig.
84
85         Remove code for calculating the glyph cache size.
86
87         * WebCore.base.exp: Remove unused symbol.
88         * platform/graphics/mac/FontCacheMac.mm: Remove code that is unused now that we do not compute the glyph cache size.
89         * platform/mac/WebCoreSystemInterface.h: Remove unused symbol.
90         * platform/mac/WebCoreSystemInterface.mm: Ditto.
91
92 2008-04-24  Mark Rowe  <mrowe@apple.com>
93
94         Reviewed by Sam Weinig.
95
96         Add a definition of BUILDING_ON_LEOPARD to complement BUILDING_ON_TIGER.
97
98         * WebCorePrefix.h:
99
100 2008-04-24  Cameron McCormack  <cam@mcc.id.au>
101
102         Reviewed by Maciej Stachowiak.
103
104         Ensure that changes to rx="" and ry="" attributes on an SVG <rect>
105         element cause a relayout.
106
107         Test: svg/dom/SVGRectElement/rect-modify-rx.svg
108
109         * svg/SVGRectElement.cpp:
110         (WebCore::SVGRectElement::svgAttributeChanged): Call needsLayout()
111         when the attribute is rx or ry.
112         (WebCore::SVGRectElement::hasRelativeValues): Return true when the
113         attribute is rx or ry, since they also can have relative values.
114
115 2008-04-24  Adam Barth  <hk9565@gmail.com>
116
117         Reviewed by Sam Weinig.
118
119         Update the XMLHttpRequest header black list to match the spec.
120
121         * xml/XMLHttpRequest.cpp:
122         (WebCore::isSafeRequestHeader):
123
124 2008-04-22  Feng Qian  <ian.eng.webkit@gmail.com>
125
126         Reviewed by Geoff Garen.
127
128         Fix https://bugs.webkit.org/show_bug.cgi?id=18677
129         Bug 18677: Synchronous event dispatch confuses the popup blocker into incorrectly blocking chat popups in gmail.com.
130
131         Test: fast/events/nested-window-event.html
132
133         * bindings/js/kjs_events.cpp:
134         (WebCore::JSAbstractEventListener::handleEvent): Save and restore the current event around the event dispatch.
135
136 2008-04-24  Brady Eidson  <beidson@apple.com>
137
138         Reviewed by Teh Mitzpettel
139
140         Make it so PageGroups know what their own name is.
141
142         * WebCore.base.exp:
143
144         * page/Page.cpp:
145         (WebCore::Page::setGroupName):
146         (WebCore::Page::groupName):
147         * page/Page.h:
148
149         * page/PageGroup.cpp: Move the PageGroupMap into the PageGroup class.
150         (WebCore::PageGroup::PageGroup): Added a c'tor that takes the group name as an argument instead of
151           the initial Page.
152         (WebCore::PageGroup::pageGroup): Handles creating and mapping names to groups
153         * page/PageGroup.h:
154         (WebCore::PageGroup::name):
155
156 2008-04-24  Adele Peterson  <adele@apple.com>
157
158         Reviewed by Darin.
159
160         Consolidate two versions of pathGetFileName.
161
162         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formData): Call FileSystem.h version of pathGetFileName and removed the static helper function.
163         * platform/posix/FileSystemPOSIX.cpp: (WebCore::pathGetFileName): Moved general case from HTMLFormElement version here.
164           If other platforms relied on that default they should implement this function for their platform specific version of FileSystem.cpp
165         * platform/win/FileSystemWin.cpp: (WebCore::pathGetFileName): Moved win implementation from HTMLFormElement here.
166         * platform/wx/FileSystemWx.cpp: (WebCore::pathGetFileName): Moved wx implementation from HTMLFormElement here.
167
168 2008-04-24  Anders Carlsson  <andersca@apple.com>
169
170         Windows build fix.
171         
172         * html/HTMLFormElement.cpp:
173         (WebCore::pathGetFilename):
174
175 2008-04-24  Anders Carlsson  <andersca@apple.com>
176
177         Don't crash when the string is empty.
178         
179         * html/HTMLMediaElement.cpp:
180         (WebCore::parseTimeOffset):
181
182 2008-04-24  Dan Bernstein  <mitz@apple.com>
183
184         Reviewed by Darin Adler.
185
186         - preparation for https://bugs.webkit.org/show_bug.cgi?id=3729
187           <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
188
189         The three main changes in this patch are:
190
191         1) Making all inline boxes know their bidi level, instead of just text
192            boxes knowing whether their bidi level is odd or even. This is
193            required for the next change.
194
195         2) Replacing RenderObject::inlineBox() with
196            Position::getInlineBoxAndOffset() in recognition of the fact that the
197            inline box containing the primary caret for a position in a given
198            node may belong to a different node's renderer.
199
200         3) Changing RenderObject::caretRect() to take an InlineBox parameter,
201            and changing callers to call VisiblePosition::caretRect(), which
202            locates the inline box, then calls caretRect() on the renderer for
203            that box. This, combined with the previous change, ensures that the
204            primary caret is rendered at the right place for positions that
205            lie on a directionality boundary.
206
207         Test: platform/mac/editing/input/caret-primary-bidi.html
208
209         * WebCore.base.exp: Added the VisiblePosition(Node*, int, EAffinity)
210         constructor and VisiblePosition::caretRect(), and sorted.
211
212         * dom/Position.cpp:
213         (WebCore::nextRenderedEditable): Adjusted for the removal of
214         RenderObject::inlineBox().
215         (WebCore::previousRenderedEditable): Ditto.
216         (WebCore::Position::rendersInDifferentPosition): Ditto.
217         (WebCore::Position::getInlineBoxAndOffset): Added. Gets the inline box
218         and the offset within that box at which the primary caret for this
219         position should render.
220
221         * dom/Position.h:
222
223         * editing/DeleteSelectionCommand.cpp:
224         (WebCore::DeleteSelectionCommand::mergeParagraphs): Changed to call
225         VisiblePosition::caretRect() instead of calling the RenderObject method.
226
227         * editing/SelectionController.cpp:
228         (WebCore::caretY): Ditto.
229         (WebCore::SelectionController::xPosForVerticalArrowNavigation): Ditto.
230         (WebCore::SelectionController::layout): Ditto.
231
232         * editing/VisiblePosition.cpp:
233         (WebCore::VisiblePosition::caretRect): Changed to call
234         getInlineBoxAndOffset() to get the correct inline box and call the
235         renderer for that box.
236
237         * editing/VisiblePosition.h:
238         (WebCore::VisiblePosition::getInlineBoxAndOffset): Added convenience
239         methods for getting the inline box and caret offset for a visible
240         position, accounting for its affinity.
241
242         * editing/visible_units.cpp:
243         (WebCore::rootBoxForLine): Changed to use getInlineBoxAndOffset()
244         instead of RenderObject::inlineBox().
245         (WebCore::startPositionForLine):
246         (WebCore::endPositionForLine):
247         (WebCore::previousLinePosition): Ditto.
248         (WebCore::nextLinePosition): Ditto.
249
250         * page/AccessibilityObject.cpp:
251         (WebCore::updateAXLineStartForVisiblePosition): Ditto.
252
253         * page/Frame.cpp:
254         (WebCore::Frame::firstRectForRange): Ditto.
255
256         * rendering/InlineBox.cpp:
257         (WebCore::InlineBox::caretMinOffset): Changed to forward to the
258         renderer.
259         (WebCore::InlineBox::caretMaxOffset): Ditto.
260         * rendering/InlineBox.h: Replaced the m_reversed bit, intended for use
261         in InlineTextBox only, with six bits of the bidi level of the box,
262         intended for use in all leaf inline boxes.
263         (WebCore::InlineBox::InlineBox): Added missing initializer for
264         m_dirOverride and initialized the bidi level.
265         (WebCore::InlineBox::bidiLevel): Added this accessor.
266         (WebCore::InlineBox::setBidiLevel): Ditto.
267         (WebCore::InlineBox::direction): Ditto.
268         (WebCore::InlineBox::caretLeftmostOffset): Added this convenience
269         method.
270         (WebCore::InlineBox::caretRightmostOffset): Ditto.
271
272         * rendering/InlineTextBox.cpp: Replaced all references to m_reversed
273         with checking of direction().
274         (WebCore::InlineTextBox::selectionRect):
275         (WebCore::InlineTextBox::placeEllipsisBox):
276         (WebCore::InlineTextBox::paint):
277         (WebCore::InlineTextBox::paintSelection):
278         (WebCore::InlineTextBox::paintCompositionBackground):
279         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
280         (WebCore::InlineTextBox::paintTextMatchMarker):
281         (WebCore::InlineTextBox::textPos):
282         (WebCore::InlineTextBox::offsetForPosition):
283         (WebCore::InlineTextBox::positionForOffset):
284
285         * rendering/RenderBR.cpp: Removed inlineBox().
286         * rendering/RenderBR.h: Ditto.
287
288         * rendering/RenderBox.cpp:
289         (WebCore::RenderBox::caretRect): Changed to take an inline box and
290         account for the direction of the box (or the renderer) in positioning
291         the caret: in right-to-left boxes, the "before" position is to the right
292         while "after" is to the left.
293         * rendering/RenderBox.h:
294
295         * rendering/RenderFlow.cpp:
296         (WebCore::RenderFlow::caretRect): Updated the signature.
297         * rendering/RenderFlow.h:
298
299         * rendering/RenderObject.cpp:
300         (WebCore::RenderObject::caretRect): Updated the signature.
301         (WebCore::RenderObject::caretMaxOffset): Changed to return the child
302         node count (or 1 if there are no children) for replaced elements, such
303         as <select>s.
304         * rendering/RenderObject.h:
305
306         * rendering/RenderReplaced.cpp: Removed caretMinOffset() and
307         caretMaxOffset() because the base class implementation does the right
308         thing for replaced objects now.
309         * rendering/RenderReplaced.h:
310
311         * rendering/RenderSVGInlineText.cpp:
312         (WebCore::RenderSVGInlineText::caretRect): Updated the signature.
313         (WebCore::RenderSVGInlineText::positionForCoordinates): Updated for
314         the change from m_reversed to direction().
315         * rendering/RenderSVGInlineText.h:
316
317         * rendering/RenderText.cpp:
318         (WebCore::RenderText::caretRect): Changed to take an inline box and
319         removed the code that used to find the inline for the given position.
320         Changed use of m_reversed to use direction().
321         (WebCore::RenderText::position): Changed use of m_reversed to use
322         direction().
323         * rendering/RenderText.h:
324
325         * rendering/RenderTextControl.cpp:
326         (WebCore::RenderTextControl::textWithHardLineBreaks): Adjusted for the
327         removal of RenderObject::inlineBox().
328
329         * rendering/RenderTreeAsText.cpp:
330         (WebCore::writeTextRun): Changed to use direction() instead of
331         m_reversed.
332
333         * rendering/SVGInlineTextBox.cpp: Ditto.
334         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
335         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
336         (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
337
338         * rendering/SVGRenderTreeAsText.cpp: Ditto.
339         (WebCore::writeSVGInlineTextBox):
340
341         * rendering/SVGRootInlineBox.cpp: Ditto.
342         (WebCore::svgTextRunForInlineTextBox):
343         (WebCore::cummulatedWidthOrHeightOfTextChunk):
344         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
345
346         * rendering/bidi.cpp:
347         (WebCore::RenderBlock::constructLine): Made this function set the
348         bidi level on all leaf boxes.
349
350         * svg/SVGTextContentElement.cpp: Changed to use direction() instead of
351         m_reversed.
352         (WebCore::cumulativeCharacterRangeLength):
353         (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
354
355 2008-04-24  Sam Weinig  <sam@webkit.org>
356
357         Fix the world.
358
359         * bindings/js/kjs_proxy.cpp:
360         (WebCore::KJSProxy::clear):
361
362 2008-04-24  Darin Adler  <darin@apple.com>
363
364         Reviewed by Geoff.
365
366         - fix crash in regression test where we'd ask a frame for a user agent string
367           after the WebView was already closed
368
369         * loader/FrameLoader.cpp:
370         (WebCore::FrameLoader::scheduleHTTPRedirection): Quietly do nothing if this is
371         called on a frame that's already detached from its page.
372         (WebCore::FrameLoader::scheduleLocationChange): Ditto.
373         (WebCore::FrameLoader::scheduleRefresh): Ditto.
374         (WebCore::FrameLoader::scheduleHistoryNavigation): Ditto.
375         (WebCore::FrameLoader::redirectionTimerFired): Assert that this is never called
376         for a frame that's already detached from its page.
377         (WebCore::FrameLoader::scheduleRedirection): Ditto.
378         (WebCore::FrameLoader::startRedirectionTimer): Ditto.
379
380 2008-04-23  Timothy Hatcher  <timothy@apple.com>
381
382         Add a new callFunction helper function to remove duplicate code
383         for calling JavaScript functions with arguments.
384
385         Reviewed by Darin Adler.
386
387         * page/InspectorController.cpp:
388         (WebCore::InspectorController::callSimpleFunction): Call callFunction.
389         (WebCore::InspectorController::callFunction): Extended version of the original
390         callSimpleFunction, with script function arguments and an exception argument.
391         (WebCore::InspectorController::focusNode): Use callFunction.
392         (WebCore::InspectorController::addScriptResource): Ditto.
393         (WebCore::InspectorController::removeScriptResource): Ditto.
394         (WebCore::InspectorController::addDatabaseScriptResource): Ditto.
395         (WebCore::InspectorController::removeDatabaseScriptResource): Ditto.
396         (WebCore::InspectorController::addScriptConsoleMessage): Ditto.
397         * page/InspectorController.h: Add callFunction.
398
399 2008-04-24  Anders Carlsson  <andersca@apple.com>
400
401         Reviewed by Sam.
402
403         Change some String arguments to be const references instead.
404         
405         * css/CSSRule.cpp:
406         (WebCore::CSSRule::setCssText):
407         * css/CSSRule.h:
408         * html/HTMLFormElement.cpp:
409         (WebCore::pathGetFilename):
410         * html/HTMLMediaElement.cpp:
411         (WebCore::parseTimeOffset):
412         * page/EditorClient.h:
413         * platform/SecurityOrigin.cpp:
414         (WebCore::isDefaultPortForProtocol):
415         * platform/graphics/MediaPlayer.cpp:
416         (WebCore::MediaPlayer::load):
417         * platform/graphics/MediaPlayer.h:
418         * rendering/MediaControlElements.cpp:
419         (WebCore::MediaControlInputElement::MediaControlInputElement):
420         * rendering/MediaControlElements.h:
421         * svg/animation/SVGSMILElement.cpp:
422         (WebCore::SVGSMILElement::Condition::Condition):
423         * svg/animation/SVGSMILElement.h:
424         * svg/graphics/SVGImageEmptyClients.h:
425         (WebCore::SVGEmptyEditorClient::shouldInsertText):
426         * xml/XSLTProcessor.cpp:
427         (WebCore::createFragmentFromSource):
428
429 2008-04-24  Justin Garcia  <justin.garcia@apple.com>
430
431         Reviewed by Darin Adler.
432
433         <rdar://problem/5604313> FormatBlock to apply an h1 also inserts a style span around the first letter (16004)
434         
435         * editing/TextIterator.cpp:
436         (WebCore::TextIterator::advance): We emit an extra newline when leaving a
437         block element that has atypical margin/padding. When we emit the extra newline, 
438         it needs to be positioned after that block's contents, not after the block. 
439         This is how we position the first newline, too, since the range for emitted newlines 
440         should start where the line break begins visually.
441
442 2008-04-24  Anders Carlsson  <andersca@apple.com>
443
444         Reviewed by Adam.
445
446         Only avoid implicit entries when doing the initial caching.
447         
448         * loader/appcache/ApplicationCacheGroup.cpp:
449         (WebCore::ApplicationCacheGroup::didReceiveResponse):
450         (WebCore::ApplicationCacheGroup::startLoadingEntry):
451
452 2008-04-24  Kevin McCullough  <kmccullough@apple.com>
453
454         Reviewed by Adam and Sam.
455
456         -<rdar://problem/5770054> JavaScript profiler (10928)
457         -Only profile the page group that starts profiling to avoid profiling
458         tools that shouldn't be profiled unless explicitly requested to.
459
460         * bindings/js/kjs_proxy.cpp: When a new global object is created set its
461         page group identifier.
462         (WebCore::KJSProxy::clear):
463         (WebCore::KJSProxy::initScript):
464         * page/Console.cpp: When calling console.profile set the identifier of
465         the page group being profiled.
466         (WebCore::Console::profile):
467         * page/PageGroup.cpp: Implement unique identifiers.
468         (WebCore::getUniqueIdentifier):
469         (WebCore::PageGroup::PageGroup):
470         * page/PageGroup.h: Ditto.
471         (WebCore::PageGroup::identifier):
472
473 2008-04-24  John Sullivan  <sullivan@apple.com>
474
475         Mac buid fix
476
477         * page/mac/WebCoreViewFactory.h:
478         add declarations of six new AX methods that were added to LocalizedStrings.h
479         
480         * platform/mac/LocalizedStringsMac.mm:
481         (WebCore::AXButtonActionVerb):
482         implement by calling through to WebCoreViewFactory as we do with the other functions here
483         (WebCore::AXRadioButtonActionVerb):
484         ditto
485         (WebCore::AXTextFieldActionVerb):
486         ditto
487         (WebCore::AXCheckedCheckBoxActionVerb):
488         ditto
489         (WebCore::AXUncheckedCheckBoxActionVerb):
490         ditto
491         (WebCore::AXLinkActionVerb):
492         ditto
493
494 2008-04-24  Simon Hausmann  <hausmann@webkit.org>
495
496         Rubber-stamped by Lars
497
498         Fix text rendering in -reverse mode on Qt/Mac.
499
500         For Font::width() don't use a plain QFontMetrics object but also the properly
501         setup QTextLayout that has the RTL/LTR force flags set.
502
503         * platform/graphics/qt/FontQt.cpp:
504         (WebCore::Font::width):
505
506 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
507
508         Reviewed by Simon.
509
510         Don't do anti-aliasing for arcs, lines and rects, but continue to anti-alias
511         all drawing primitives in the HTML Canvas element.
512
513         This speeds up drawing of dashed outlines significantly.
514
515         Also preserve the anti-aliasing renderhint for transparency layers and
516         get rid of the mostly unused device pointer.
517
518         * platform/graphics/qt/GraphicsContextQt.cpp:
519         (WebCore::TransparencyLayer::TransparencyLayer):
520         (WebCore::GraphicsContextPlatformPrivate::p):
521         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
522         (WebCore::GraphicsContext::beginTransparencyLayer):
523         (WebCore::GraphicsContext::drawRect):
524         (WebCore::GraphicsContext::drawLine):
525         (WebCore::GraphicsContext::strokeArc):
526
527 2008-04-24  Paul Olav Tvete <paul@trolltech.com>
528
529         Reviewed by Simon.
530
531         Fix various compiler warnings related to QString(const char *)
532         construction by using QLatin1String.
533
534         * bridge/qt/qt_instance.cpp:
535         (KJS::Bindings::QtField::valueFromInstance):
536         (KJS::Bindings::QtField::setValueToInstance):
537         * dom/XMLTokenizer.cpp:
538         (WebCore::):
539         * platform/graphics/qt/PathQt.cpp:
540         (WebCore::Path::debugString):
541
542 2008-04-24  Morten Johan Sørvig  <msorvig@trolltech.com>
543
544         Reviewed by Simon.
545
546         Work around QMacStyle bug in repainting the vertical scrollbar.
547
548         We draw the scrollbar using HITheme but somehow the translation and the
549         clipping we previously set using ClipCGContextToRegion is ignored. Drawing
550         without the translation fixes the clip.
551
552         * platform/qt/PlatformScrollBarQt.cpp:
553         (WebCore::PlatformScrollbar::paint):
554
555 2008-04-24  Holger Hans Peter Freyther  <zecke@selfish.org>
556
557         Reviewed by Simon.
558
559         * Set an expiration date for local files as we do not know what will happen
560         to these files (in contrast to a http server with max-age and other headers)
561         * Remember the time when we started the job and use that for the expiration date
562         * QNetworkManager does not handle expiration at all, we might want to set the
563         expiration for all downloads but this will be a performance nightmare.
564
565         * platform/network/qt/QNetworkReplyHandler.cpp:
566         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
567         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
568         (WebCore::QNetworkReplyHandler::start):
569         * platform/network/qt/QNetworkReplyHandler.h:
570
571 2008-04-24  Simon Hausmann  <hausmann@webkit.org>
572
573         Fix the Gtk and Qt builds.
574
575         Added missing localization stubs for accessibility.
576
577         * platform/gtk/LocalizedStringsGtk.cpp:
578         (WebCore::AXButtonActionVerb):
579         (WebCore::AXRadioButtonActionVerb):
580         (WebCore::AXTextFieldActionVerb):
581         (WebCore::AXCheckedCheckBoxActionVerb):
582         (WebCore::AXUncheckedCheckBoxActionVerb):
583         (WebCore::AXLinkActionVerb):
584         * platform/qt/Localizations.cpp:
585         (WebCore::AXButtonActionVerb):
586         (WebCore::AXRadioButtonActionVerb):
587         (WebCore::AXTextFieldActionVerb):
588         (WebCore::AXCheckedCheckBoxActionVerb):
589         (WebCore::AXUncheckedCheckBoxActionVerb):
590         (WebCore::AXLinkActionVerb):
591
592 2008-04-24  Olivier Goffart  <ogoffart@trolltech.com>
593
594         Reviewed by Simon
595
596         Fix various compiler warnings in the Qt port.
597
598         * platform/graphics/qt/ImageQt.cpp:
599         (loadResourcePixmap):
600         * platform/qt/CookieJarQt.cpp:
601         (WebCore::cookies):
602         * platform/qt/ScrollViewQt.cpp:
603         (WebCore::ScrollView::wheelEvent):
604         * plugins/qt/PluginDataQt.cpp:
605         (WebCore::PluginData::initPlugins):
606
607 2008-04-24  Andre Poenitz  <andre.poenitz@trolltech.com>
608
609         Reviewed by Simon.
610
611         Removed spurious QHideEvent forward declaration.
612
613         * platform/qt/QWebPopup.h:
614
615 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
616
617         Reviewed by Simon.
618
619         Render text areas using Qt (ensures proper style).
620
621         * platform/qt/RenderThemeQt.cpp:
622         (WebCore::RenderThemeQt::paintTextField):
623         (WebCore::RenderThemeQt::adjustTextFieldStyle):
624         (WebCore::RenderThemeQt::paintTextArea):
625         (WebCore::RenderThemeQt::supportsFocus):
626         * platform/qt/RenderThemeQt.h:
627
628 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
629
630         Reviewed by Simon.
631
632         Make mouse wheel events over scrollbars behave the same as in Qt, i.e. both
633         horizontal and vertical wheel events will scroll the view in the orientation
634         of the scrollbar underneath the cursor.
635
636         * platform/qt/ScrollViewQt.cpp:
637         (WebCore::ScrollView::paint):
638         (WebCore::ScrollView::wheelEvent):
639
640 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
641
642         Reviewed by Brady.
643
644         * page/AccessibilityObject.cpp:
645         (WebCore::AccessibilityObject::press): Return false if this object
646         doesn't have an action element associated with it.
647         * page/AccessibilityObject.h: Added a performDefaultAction() method,
648         which just calls press(). Marked press() const and changed its return
649         type to bool.
650
651 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
652
653         Reviewed by Adam.
654
655         Don't allow a hit test to return an AccessibilityObject that should be
656         ignored.
657
658         * page/AccessibilityObject.cpp:
659         (WebCore::AccessibilityObject::doAccessibilityHitTest): If this result
660         object's accessibility is ignored, return the parent unignored object.
661
662 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
663
664         Reviewed by Adam.
665
666         Fix a crash when performing a hit test on an AccessibilityObject with
667         no layer (e.g., an AccessibilityObject for a RenderText object).
668
669         * page/AccessibilityObject.cpp:
670         (WebCore::AccessibilityObject::doAccessibilityHitTest): Added a null
671         check for layer. Removed a null check for m_renderer, which shouldn't
672         occur.
673
674 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
675
676         * page/AccessibilityObject.cpp:
677         (WebCore::AccessibilityObject::boundingBoxRect): Added FIXME about this
678         method not working correctly for objects with CSS transforms applied.
679
680 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
681
682         Reviewed by Adam.
683
684         Implement contentsToScreen() and screenToContents() on Windows.
685
686         * platform/ScrollView.h: Make these declarations conditional on
687         HAVE(ACCESSIBILITY) instead of PLATFORM(MAC).
688         * platform/win/ScrollViewWin.cpp:
689         (WebCore::ScrollView::contentsToScreen): Translate from coordinates
690         relative to the ScrollView to coordinates relative to the screen. Do
691         this by getting the offset of the ScrollView in screen coordinates and
692         moving the rect by this amount.
693         (WebCore::ScrollView::screenToContents): Translate from coordinates
694         relative to the screen to coordinates relative to the ScrollView.
695
696 2008-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
697
698         Reviewed by Oliver.
699
700         Add a method to get a localized, human-readable string stating this
701         object's default action, e.g., a button's default action is "press."
702
703         * page/AccessibilityObject.cpp:
704         (WebCore::AccessibilityObject::actionVerb): Added.
705         * page/AccessibilityObject.h: Added declaration for actionVerb().
706         * platform/LocalizedStrings.h: Added declarations for:
707             AXButtonActionVerb()
708             AXRadioButtonActionVerb()
709             AXTextFieldActionVerb()
710             AXCheckedCheckBoxActionVerb()
711             AXUncheckedCheckBoxActionVerb()
712             AXLinkActionVerb()
713
714 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
715
716         Reviewed by Simon.
717
718         Cleaned up copyright headers in the Qt port (removed misplaced class
719         descriptions and fixed inconsistent whitespace and indentation).
720
721         * platform/graphics/qt/FontQt.cpp:
722         * platform/qt/WheelEventQt.cpp:
723
724 2008-04-24  Tor Arne Vestbø  <tavestbo@trolltech.com>
725
726         Reviewed by Simon.
727
728         Disable vanlilla focus rings since Qt provides this as part of the style.
729
730         * platform/qt/RenderThemeQt.cpp:
731
732 2008-04-24  George Staikos  <george@staikos.net>
733
734         Reviewed by Simon.
735
736         This optimization in BitmapImage::drawPattern for the identity
737         transform is bogus and causes incorrect results on sites like youtube.
738
739         * platform/graphics/qt/ImageQt.cpp:
740         (WebCore::BitmapImage::drawPattern):
741
742 2008-04-23  Brady Eidson  <beidson@apple.com>
743
744         Reviewed by Jon Honeycutt
745
746         Preparing for making LocalStorageAreas persistent.
747
748         Since LocalStorageAreas will need to do a lot of additional work for each of the basic
749         operations a Storage object supports, this patch makes the API entry points virtual so
750         LocalStorageArea can override them.  The behavior for both Local and Session StorageAreas
751         is unchanged with this patch, but LocalStorageArea will override them in the future.
752
753         * storage/StorageArea.cpp: Rename the implementations to internalFoo
754         (WebCore::StorageArea::internalLength):
755         (WebCore::StorageArea::internalKey):
756         (WebCore::StorageArea::internalGetItem):
757         (WebCore::StorageArea::internalSetItem):
758         (WebCore::StorageArea::internalRemoveItem):
759         (WebCore::StorageArea::internalContains):
760
761         * storage/StorageArea.h: Call internalFoo variants
762         (WebCore::StorageArea::length):
763         (WebCore::StorageArea::key):
764         (WebCore::StorageArea::getItem):
765         (WebCore::StorageArea::setItem):
766         (WebCore::StorageArea::removeItem):
767         (WebCore::StorageArea::contains):
768
769 2008-04-23  David Hyatt  <hyatt@apple.com>
770
771         Implement getComputedStyle for border-image.
772
773         Reviewed by Dan Bernstein
774
775         Added fast/css/getComputedStyle-border-image.html
776
777         * css/CSSComputedStyleDeclaration.cpp:
778         (WebCore::):
779         (WebCore::valueForRepeatRule):
780         (WebCore::valueForNinePieceImage):
781         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
782
783 2008-04-22  Darin Adler  <darin@apple.com>
784
785         Reviewed by Anders.
786
787         - simplify use of HashTraits to prepare for some upcoming hash table changes
788
789         * page/AXObjectCache.h: Removed uneeded AXIDHashTraits, which are no different
790         from the default hash traits for unsigned.
791         * page/mac/AXObjectCacheMac.mm:
792         (WebCore::AXObjectCache::removeAXID): Remove assertion that's already done
793         by HashTable that the value is not the deleted value.
794
795         * platform/graphics/StringTruncator.cpp: Removed unneeded include.
796         * svg/SVGFontFaceElement.cpp: Removed unneeded include.
797
798 2008-04-23  Kevin Ollivier  <kevino@theolliviers.com>
799
800         wx build fixes. Changing BackgroundLayer -> FillLayer and adding
801         Frame::disconnectPlatformScriptObjects().
802
803         * platform/wx/RenderThemeWx.cpp:
804         (WebCore::RenderThemeWx::isControlStyled):
805         * platform/wx/TemporaryLinkStubs.cpp:
806         (Frame::disconnectPlatformScriptObjects):
807
808 2008-04-23  David Hyatt  <hyatt@apple.com>
809
810         Add support for mask-box-image (similar to border-image).  This property enables a single image
811         to overlay the entire mask area (with nine-piece slicing rules similar to border image).
812
813         Reviewed by Dan Bernstein
814
815         Added inline-mask-overlay.html, block-mask-overlay.html
816
817         * css/CSSComputedStyleDeclaration.cpp:
818         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
819         * css/CSSParser.cpp:
820         (WebCore::CSSParser::parseValue):
821         (WebCore::CSSParser::parseBorderImage):
822         * css/CSSPropertyNames.in:
823         * css/CSSStyleSelector.cpp:
824         (WebCore::CSSStyleSelector::applyProperty):
825         * rendering/InlineFlowBox.cpp:
826         (WebCore::InlineFlowBox::paintMask):
827         * rendering/RenderBox.cpp:
828         (WebCore::RenderBox::paintMask):
829         * rendering/RenderFlow.cpp:
830         (WebCore::RenderFlow::paintLines):
831         * rendering/RenderObject.cpp:
832         (WebCore::RenderObject::paintNinePieceImage):
833         (WebCore::RenderObject::paintBorder):
834         * rendering/RenderObject.h:
835         * rendering/RenderStyle.cpp:
836         (WebCore::NinePieceImage::operator==):
837         * rendering/RenderStyle.h:
838         (WebCore::):
839         (WebCore::NinePieceImage::m_verticalRule):
840         (WebCore::NinePieceImage::horizontalRule):
841         (WebCore::NinePieceImage::verticalRule):
842         (WebCore::RenderStyle::borderImage):
843         (WebCore::RenderStyle::maskOverlayImage):
844         (WebCore::RenderStyle::hasMask):
845         (WebCore::RenderStyle::resetBorderImage):
846         (WebCore::RenderStyle::setBorderImage):
847         (WebCore::RenderStyle::setMaskOverlayImage):
848         (WebCore::RenderStyle::initialNinePieceImage):
849         * rendering/RenderTable.cpp:
850         (WebCore::RenderTable::paintMask):
851         * rendering/RenderTableCell.cpp:
852         (WebCore::RenderTableCell::paintMask):
853
854 2008-04-23  Justin Garcia  <justin.garcia@apple.com>
855
856         Reviewed by Darin Adler.
857
858         <rdar://problem/5825350> OWA: Caret disappears when navigating with arrows keys in contenteditable div
859
860         * editing/htmlediting.cpp:
861         (WebCore::firstEditablePositionAfterPositionInRoot): Return a null VisiblePosition if
862         this function moves out of highestRoot.  Re-wrote so as to not duplicate code inside
863         and outside of the while loop.
864         (WebCore::lastEditablePositionBeforePositionInRoot): Ditto.
865
866 2008-04-23  Daniel Zucker  <zucker@wake3.com>
867
868         Reviewed by Adam Roben.
869
870         Fix build errors needed to compile Curl in Cairo build.  Add stubs for
871         didReceiveAuthenticationChallenge, receivedCredential,
872         receivedRequestToContinueWithoutCredential, and receivedCancellation.
873         <https://bugs.webkit.org/show_bug.cgi?id=18468>
874
875         * platform/network/ResourceHandle.h:  
876         * platform/network/curl/ResourceHandleCurl.cpp:
877         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
878         (WebCore::ResourceHandle::receivedCredential):
879         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
880         (WebCore::ResourceHandle::receivedCancellation):
881
882 2008-04-23  Dan Bernstein  <mitz@apple.com>
883
884         Reviewed by Darin Adler.
885
886         - fix a bug where moving forward in bidirectional text skips over the
887           position after the end of the line
888
889         Test: editing/selection/move-past-trailing-space.html
890
891         * dom/Position.cpp:
892         (WebCore::Position::upstream): Changed the logic for identifying when a
893         position is after the last character of a text box of a text node that
894         continues on the next line, to make it work correctly when boxes are not
895         laid out in logical order.
896         (WebCore::Position::downstream): Ditto.
897
898 2008-04-23  Brad Hughes  <bhughes@trolltech.com>
899
900         Reviewed by Simon.
901
902         Fix release build with the intel compiler
903
904         Intel compiler can't compile qtwebkit with -O2 or -O1, so we're left with -O0
905
906         * WebCore.pro:
907
908 2008-04-22  Dan Bernstein  <mitz@apple.com>
909
910         Reviewed by Anders Carlsson.
911
912         - remove unused calls to Position::upstream()
913
914         * editing/InsertLineBreakCommand.cpp:
915         (WebCore::InsertLineBreakCommand::insertNodeAfterPosition):
916         (WebCore::InsertLineBreakCommand::insertNodeBeforePosition):
917
918 2008-04-22  Jon Honeycutt  <jhoneycutt@apple.com>
919
920         Reviewed by Sam.
921
922         Add a method to query which modifier keys the platform uses for access
923         key actions.
924
925         * page/EventHandler.cpp:
926         (WebCore::EventHandler::handleAccessKey): Bitwise and the event's
927         modifier keys with the platform's access key modifier mask to determine
928         whether this event can perform an access key action.
929         * page/EventHandler.h: Added s_accessKeyModifiers, a platform-defined
930         mask of modifier keys used for access key actions, and a getter.
931         * page/mac/EventHandlerMac.mm: Use PlatformKeyboardEvent::CtrlKey for
932         access key actions.
933         * page/qt/EventHandlerQt.cpp: Same.
934         * page/gtk/EventHandlerGtk.cpp: Use AltKey.
935         * page/win/EventHandlerWin.cpp: Same.
936         * page/wx/EventHandlerWx.cpp: Same.
937         * platform/PlatformKeyboardEvent.h: Added an enum, ModifierKey.
938         (WebCore::PlatformKeyboardEvent::):
939         (WebCore::PlatformKeyboardEvent::modifiers): Return which modifier keys
940         were active, a combination of ModifierKey values.
941
942 2008-04-22  Sam Weinig  <sam@webkit.org>
943
944         Reviewed by Maciej Stachowiak.
945
946         Make the KJSProxy and FrameLoader member variables instead of pointers
947         in FramePrivate in a bid to do a little clean up before the last of the
948         split window patches.  Also, make the KJSProxy not lazily created, as the
949         real benefit comes from lazily creating the JSDOMWindowWrapper, which we
950         still do.
951
952         * page/Frame.cpp:
953         (WebCore::Frame::~Frame):
954         (WebCore::Frame::init):
955         (WebCore::Frame::loader):
956         (WebCore::Frame::scriptProxy):
957         (WebCore::Frame::document):
958         (WebCore::Frame::setDocument):
959         (WebCore::Frame::clearScriptProxy):
960         (WebCore::Frame::pageDestroyed):
961         (WebCore::FramePrivate::FramePrivate):
962         (WebCore::FramePrivate::~FramePrivate):
963         * page/FramePrivate.h:
964
965 2008-04-22  Anatoli Papirovski  <apapirovski@mac.com>
966
967         Reviewed by Dan Bernstein.
968
969         - fix https://bugs.webkit.org/show_bug.cgi?id=18584
970         border-color, outline-color, column-color, -webkit-text-stroke-color,
971         and -webkit-text-fill-color inheritance to correctly use parent's color
972         if the parent's corresponding (border, outline, etc.)-color property
973         wasn't set.
974
975         Test: fast/borders/border-color-inherit.html
976
977         * css/CSSStyleSelector.cpp:
978         (WebCore::CSSStyleSelector::applyProperty):
979
980 2008-04-22  Alp Toker  <alp@nuanti.com>
981
982         Rubber-stamped by Dave Hyatt.
983
984         Move GraphicsContext::clipToImageBuffer() notImplemented() stub to
985         GraphicsContextCairo.
986
987         * platform/graphics/GraphicsContext.cpp:
988         * platform/graphics/cairo/GraphicsContextCairo.cpp:
989         (WebCore::GraphicsContext::clipToImageBuffer):
990
991 2008-04-22  David Hyatt  <hyatt@apple.com>
992
993         Add support for mask-composite to match background-composite.
994
995         Reviewed by Sam Weinig
996
997         Added fast/backgrounds/mask-composite.html
998
999         * css/CSSComputedStyleDeclaration.cpp:
1000         (WebCore::):
1001         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1002         * css/CSSParser.cpp:
1003         (WebCore::CSSParser::parseValue):
1004         (WebCore::CSSParser::parseFillProperty):
1005         * css/CSSPropertyNames.in:
1006         * css/CSSStyleSelector.cpp:
1007         (WebCore::CSSStyleSelector::applyProperty):
1008         * rendering/InlineFlowBox.cpp:
1009         (WebCore::InlineFlowBox::paintMask):
1010
1011 2008-04-22  David Hyatt  <hyatt@apple.com>
1012
1013         Fix for bug 18688, background-color stopped painting on inlines.  Fix a virtual function
1014         misnaming that led to the derived class not getting called properly.
1015
1016         Reviewed by Mark Rowe
1017
1018         * ChangeLog:
1019         * rendering/InlineFlowBox.cpp:
1020         (WebCore::InlineFlowBox::paintFillLayer):
1021         * rendering/RenderObject.h:
1022         (WebCore::RenderObject::paintFillLayerExtended):
1023
1024 2008-04-22  Brady Eidson  <beidson@apple.com>
1025
1026         Reviewed by Sam Weinig
1027
1028         <rdar://problem/5733282> and https://bugs.webkit.org/show_bug.cgi?id=18680
1029         Always loads default shortcut icon URL when an external <script> is referenced before the icon URL is set.
1030
1031         * dom/Document.cpp:
1032         (WebCore::Document::implicitClose): Call FrameLoader->startIconLoader() here, when the document is
1033           finished parsing.
1034
1035         * loader/FrameLoader.cpp:
1036         (WebCore::FrameLoader::endIfNotLoadingMainResource):  Don't start the icon load here, when the
1037           document is finished parsing.  This was often too early, as document parsing may be blocked
1038           on an external script and therefore the correct iconURL is not set yet.
1039           The isLoadingFromCachedPage() check was when we started the icon load based on *loading* instead parsing,
1040           and is now irrelevant.
1041         * loader/FrameLoader.h:  Make startIconLoader() public
1042
1043 2008-04-22  Antti Koivisto  <antti@apple.com>
1044
1045         Reviewed by Oliver.
1046
1047         Support keyPoints attribute of <animateMotion>.
1048         
1049         Tested by SVG test suite test
1050         animate-elem-33-t.svg
1051
1052         * svg/SVGAnimateMotionElement.cpp:
1053         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
1054         * svg/SVGAnimationElement.cpp:
1055         (WebCore::parseKeyTimes):
1056         (WebCore::SVGAnimationElement::parseMappedAttribute):
1057         (WebCore::SVGAnimationElement::calculatePercentForSpline):
1058         (WebCore::SVGAnimationElement::calculatePercentFromKeyPoints):
1059         (WebCore::SVGAnimationElement::currentValuesFromKeyPoints):
1060         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
1061         (WebCore::SVGAnimationElement::startedActiveInterval):
1062         (WebCore::SVGAnimationElement::updateAnimation):
1063         * svg/SVGAnimationElement.h:
1064
1065 2008-04-22  Holger Hans Peter Freyther  <zecke@selfish.org>
1066
1067         Unreviewed build fix.
1068
1069         Update WebKit.qrc to catch up with the addition and removal of images
1070         from page/inspector/Images in recent commits.
1071
1072         * page/inspector/WebKit.qrc:
1073
1074 2008-04-22  David Hyatt  <hyatt@apple.com>
1075
1076         Fix for <rdar://5589634>.
1077
1078         Implement CSS alpha masks.  The syntax is very similar to that used for backgrounds.  Multiple mask images
1079         can be specified, and each one can be tiled, positioned, etc.  The following new properties have been
1080         added (all of which are analogous to their background-* counterparts).
1081
1082         mask, mask-image, mask-clip, mask-origin, mask-repeat, mask-attachment, mask-position
1083
1084         The alpha values in the final composite image are used to determine how the mask applies (alpha of 1 = show,
1085         alpha of 0 = don't show).
1086
1087         SVG images and CSS gradients can also be used as masks.
1088
1089         Reviewed by Dan
1090
1091         Added fast/backgrounds/repeat/mask-negative-offset-repeat.html, fast/backgrounds/svg-as-mask.html
1092
1093         * css/CSSMutableStyleDeclaration.cpp:
1094         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
1095         (WebCore::initShorthandMap):
1096         * css/CSSParser.cpp:
1097         (WebCore::CSSParser::parseFillProperty):
1098         (WebCore::CSSParser::parseTransformOrigin):
1099         * css/CSSStyleSelector.cpp:
1100         (WebCore::CSSStyleSelector::adjustRenderStyle):
1101         (WebCore::CSSStyleSelector::applyProperty):
1102         * rendering/InlineFlowBox.cpp:
1103         (WebCore::InlineFlowBox::paint):
1104         (WebCore::InlineFlowBox::paintFillLayers):
1105         (WebCore::InlineFlowBox::paintFillLayer):
1106         (WebCore::InlineFlowBox::paintBoxDecorations):
1107         (WebCore::InlineFlowBox::paintMask):
1108         * rendering/InlineFlowBox.h:
1109         * rendering/RenderBlock.cpp:
1110         (WebCore::RenderBlock::paint):
1111         (WebCore::RenderBlock::paintObject):
1112         * rendering/RenderBox.cpp:
1113         (WebCore::RenderBox::paintRootBoxDecorations):
1114         (WebCore::RenderBox::paintBoxDecorations):
1115         (WebCore::RenderBox::paintMask):
1116         (WebCore::RenderBox::paintFillLayers):
1117         (WebCore::RenderBox::paintFillLayer):
1118         (WebCore::RenderBox::paintFillLayerExtended):
1119         * rendering/RenderBox.h:
1120         * rendering/RenderFieldset.cpp:
1121         (WebCore::RenderFieldset::paintBoxDecorations):
1122         (WebCore::RenderFieldset::paintMask):
1123         * rendering/RenderFieldset.h:
1124         * rendering/RenderInline.cpp:
1125         (WebCore::RenderInline::requiresLayer):
1126         * rendering/RenderLayer.cpp:
1127         (WebCore::RenderLayer::isTransparent):
1128         (WebCore::RenderLayer::paintLayer):
1129         * rendering/RenderObject.cpp:
1130         (WebCore::RenderObject::requiresLayer):
1131         (WebCore::mustRepaintFillLayers):
1132         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
1133         (WebCore::RenderObject::setStyle):
1134         (WebCore::RenderObject::updateFillImages):
1135         * rendering/RenderObject.h:
1136         (WebCore::):
1137         (WebCore::RenderObject::hasMask):
1138         (WebCore::RenderObject::paintMask):
1139         (WebCore::RenderObject::paintFillExtended):
1140         * rendering/RenderReplaced.cpp:
1141         (WebCore::RenderReplaced::paint):
1142         * rendering/RenderStyle.cpp:
1143         (WebCore::FillLayer::FillLayer):
1144         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1145         * rendering/RenderStyle.h:
1146         (WebCore::FillLayer::initialFillComposite):
1147         (WebCore::FillLayer::initialFillSize):
1148         (WebCore::FillLayer::FillLayer):
1149         (WebCore::RenderStyle::hasMask):
1150         * rendering/RenderTable.cpp:
1151         (WebCore::RenderTable::paint):
1152         (WebCore::RenderTable::paintBoxDecorations):
1153         (WebCore::RenderTable::paintMask):
1154         * rendering/RenderTable.h:
1155         * rendering/RenderTableCell.cpp:
1156         (WebCore::RenderTableCell::requiresLayer):
1157         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
1158         (WebCore::RenderTableCell::paintMask):
1159         * rendering/RenderTableCell.h:
1160         * rendering/RenderWidget.cpp:
1161         (WebCore::RenderWidget::paint):
1162         * svg/graphics/SVGImage.cpp:
1163         (WebCore::SVGImage::draw):
1164         (WebCore::SVGImage::dataChanged):
1165
1166 2008-04-22  Sam Weinig  <sam@webkit.org>
1167
1168         Reviewed by Geoffrey Garen.
1169
1170         Make DOMAbstractView have a weak reference to the Frame instead of ref'ing
1171         the DOMWindow.
1172
1173         To ensure that the WindowScriptObject (which is a DOMAbstractView) stays valid
1174         after a navigation once the split window is completed, the DOMAbstractView must
1175         wrap the Frame instead of a DOMWindow since the DOMWindow will change.
1176
1177         * WebCore.xcodeproj/project.pbxproj:
1178         * bindings/objc/DOMAbstractView.mm: Added.
1179         (-[DOMAbstractView dealloc]):
1180         (-[DOMAbstractView finalize]):
1181         (-[DOMAbstractView document]):
1182         (-[DOMAbstractView _disconnectFrame]):
1183         (-[DOMAbstractView WebCore::]):
1184         (-[DOMAbstractView _initWithFrame:WebCore::]):
1185         (+[DOMAbstractView _wrapAbstractView:WebCore::]):
1186         Add custom implementation to implement weak reference semantics.
1187
1188         * bindings/objc/DOMAbstractViewFrame.h: Added.
1189         Declare the [DOMAbstractView _disconectFrame] selector.
1190         * bindings/objc/DOMInternal.h:
1191         Remove DOMRGBColor Internal category since it is now generated.
1192
1193         * bindings/objc/DOMUtility.mm:
1194         (KJS::createDOMWrapper):
1195         Don't ever create a DOMAbstractView from a JSDOMWindow, only from JSDOMWindowWrapper.
1196
1197         * bindings/scripts/CodeGeneratorObjC.pm:
1198         Generate internal header for IDLs that want custom implementations.
1199
1200         * css/RGBColor.idl:
1201         Make this a PODType as it really is in the implementation.
1202
1203         * page/AbstractView.idl:
1204         This now needs a custom objective-c binding implementation.
1205
1206         * page/Frame.cpp:
1207         (WebCore::Frame::~Frame):
1208         disconnect the weak frame reference in the WindowScriptObject.
1209
1210         * page/Frame.h:
1211         * page/gtk/FrameGtk.cpp:
1212         (WebCore::Frame::disconnectPlatformScriptObjects): Dummy implementation.
1213         * page/mac/FrameMac.mm:
1214         (WebCore::Frame::windowScriptObject): ASSERT that the windowScriptObject is a DOMAbstractView.
1215         (WebCore::Frame::disconnectPlatformScriptObjects): Disconnect the frame pointer from the windowScriptObject.
1216         * page/qt/FrameQt.cpp:
1217         (WebCore::Frame::disconnectPlatformScriptObjects): Dummy implementation.
1218         * page/win/FrameWin.cpp:
1219         (WebCore::Frame::disconnectPlatformScriptObjects): Ditto.
1220
1221 2008-04-22  Dan Bernstein  <mitz@apple.com>
1222
1223         Reviewed by Sam Weinig.
1224
1225         - preparation for https://bugs.webkit.org/show_bug.cgi?id=3729
1226           <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
1227
1228         * rendering/bidi.cpp:
1229         (WebCore::RenderBlock::layoutInlineChildren): Make sure to give the
1230         trailing white space a bidi level consistent with its position.
1231
1232 2008-04-22  Timothy Hatcher  <timothy@apple.com>
1233
1234         Remove many unused Web Inspector images.
1235
1236         Rubber-stamped by Adam Roben and Sam Weinig.
1237
1238         * page/inspector/Images/attachedShadow.png: Removed.
1239         * page/inspector/Images/backNormal.png: Removed.
1240         * page/inspector/Images/bottomShadow.png: Removed.
1241         * page/inspector/Images/breadcrumbBackground.png: Removed.
1242         * page/inspector/Images/console.png: Removed.
1243         * page/inspector/Images/databaseBrowserViewNormal.png: Removed.
1244         * page/inspector/Images/databaseBrowserViewNormalSelected.png: Removed.
1245         * page/inspector/Images/databaseBrowserViewSmall.png: Removed.
1246         * page/inspector/Images/databaseBrowserViewSmallSelected.png: Removed.
1247         * page/inspector/Images/databaseQueryViewNormal.png: Removed.
1248         * page/inspector/Images/databaseQueryViewNormalSelected.png: Removed.
1249         * page/inspector/Images/databaseQueryViewSmall.png: Removed.
1250         * page/inspector/Images/databaseQueryViewSmallSelected.png: Removed.
1251         * page/inspector/Images/disclosureDownPressed.png: Removed.
1252         * page/inspector/Images/disclosureRightDown.png: Removed.
1253         * page/inspector/Images/disclosureRightPressed.png: Removed.
1254         * page/inspector/Images/document.png: Removed.
1255         * page/inspector/Images/domViewNormal.png: Removed.
1256         * page/inspector/Images/domViewNormalSelected.png: Removed.
1257         * page/inspector/Images/domViewSmall.png: Removed.
1258         * page/inspector/Images/domViewSmallSelected.png: Removed.
1259         * page/inspector/Images/downTriangle.png: Removed.
1260         * page/inspector/Images/folder.png: Removed.
1261         * page/inspector/Images/forwardNormal.png: Removed.
1262         * page/inspector/Images/gradient.png: Removed.
1263         * page/inspector/Images/gradientHighlight.png: Removed.
1264         * page/inspector/Images/gradientHighlightBottom.png: Removed.
1265         * page/inspector/Images/hideStatusWidget.png: Removed.
1266         * page/inspector/Images/hideStatusWidgetPressed.png: Removed.
1267         * page/inspector/Images/network.png: Removed.
1268         * page/inspector/Images/plainDocument.png: Removed.
1269         * page/inspector/Images/popupArrows.png: Removed.
1270         * page/inspector/Images/popupArrowsBlack.png: Removed.
1271         * page/inspector/Images/reload.png: Removed.
1272         * page/inspector/Images/rightTriangle.png: Removed.
1273         * page/inspector/Images/showStatusWidget.png: Removed.
1274         * page/inspector/Images/showStatusWidgetPressed.png: Removed.
1275         * page/inspector/Images/sidbarItemBackground.png: Removed.
1276         * page/inspector/Images/sidebarActionWidget.png: Removed.
1277         * page/inspector/Images/sidebarActionWidgetPressed.png: Removed.
1278         * page/inspector/Images/sidebarAttachWidget.png: Removed.
1279         * page/inspector/Images/sidebarAttachWidgetPressed.png: Removed.
1280         * page/inspector/Images/sidebarDetachWidget.png: Removed.
1281         * page/inspector/Images/sidebarDetachWidgetPressed.png: Removed.
1282         * page/inspector/Images/sidebarResizeWidget.png: Removed.
1283         * page/inspector/Images/sidebarStatusAreaBackground.png: Removed.
1284         * page/inspector/Images/sourceViewNormal.png: Removed.
1285         * page/inspector/Images/sourceViewNormalSelected.png: Removed.
1286         * page/inspector/Images/sourceViewSmall.png: Removed.
1287         * page/inspector/Images/sourceViewSmallSelected.png: Removed.
1288         * page/inspector/Images/tab.png: Removed.
1289         * page/inspector/Images/tabSelected.png: Removed.
1290         * page/inspector/Images/toggleDown.png: Removed.
1291         * page/inspector/Images/toggleUp.png: Removed.
1292         * page/inspector/Images/toolbarButtonNormal.png: Removed.
1293         * page/inspector/Images/toolbarButtonNormalInactive.png: Removed.
1294         * page/inspector/Images/toolbarButtonNormalPressed.png: Removed.
1295         * page/inspector/Images/toolbarButtonNormalSelected.png: Removed.
1296         * page/inspector/Images/toolbarButtonNormalSelectedInactive.png: Removed.
1297         * page/inspector/Images/toolbarButtonSmall.png: Removed.
1298         * page/inspector/Images/toolbarButtonSmallInactive.png: Removed.
1299         * page/inspector/Images/toolbarButtonSmallPressed.png: Removed.
1300         * page/inspector/Images/toolbarButtonSmallSelected.png: Removed.
1301         * page/inspector/Images/toolbarButtonSmallSelectedInactive.png: Removed.
1302         * page/inspector/Images/toolbarPopupButtonNormal.png: Removed.
1303         * page/inspector/Images/toolbarPopupButtonNormalInactive.png: Removed.
1304         * page/inspector/Images/toolbarPopupButtonNormalPressed.png: Removed.
1305         * page/inspector/Images/toolbarPopupButtonSmall.png: Removed.
1306         * page/inspector/Images/toolbarPopupButtonSmallInactive.png: Removed.
1307         * page/inspector/Images/toolbarPopupButtonSmallPressed.png: Removed.
1308         * page/inspector/Images/toolbarSplitButtonDividerNormal.png: Removed.
1309         * page/inspector/Images/toolbarSplitButtonDividerNormalInactive.png: Removed.
1310         * page/inspector/Images/toolbarSplitButtonDividerSmall.png: Removed.
1311         * page/inspector/Images/toolbarSplitButtonDividerSmallInactive.png: Removed.
1312         * page/inspector/Images/treeLeftTriangleBlack.png: Removed.
1313
1314 2008-04-22  Anders Carlsson  <andersca@apple.com>
1315
1316         Reviewed by Darin.
1317
1318         Add NPN_Construct and NPN_PluginThreadAsyncCall declarations.
1319
1320         * bridge/npapi.h:
1321         * bridge/npruntime.h:
1322         * plugins/npfunctions.h:
1323
1324 2008-04-22  Alice Liu  <alice.liu@apple.com>
1325
1326         Reviewed by John Sullivan and Adam Roben.
1327
1328         Test: fast/events/tabindex-focus-chain.html
1329
1330         * dom/Document.cpp:
1331         (WebCore::Document::nextFocusableNode):
1332         (WebCore::Document::previousFocusableNode):
1333         If the focused node has been removed from the normal tabbing order,
1334         advancing focus from this node should advance to the next focusable
1335         node in tree order, and not start over at the beginning of the focus
1336         chain. 
1337
1338 2008-04-22  Timothy Hatcher  <timothy@apple.com>
1339
1340         Adds a debugger toggle button to the scripts status bar that will start
1341         and stop debugging of the inspected page.
1342
1343         Reviewed by Adam Roben.
1344
1345         * English.lproj/InspectorLocalizedStrings.js: Adds the two new tooltip strings.
1346         * page/InspectorController.cpp:
1347         (WebCore::debuggerAttached): Call InspectorController::debuggerAttached.
1348         (WebCore::InspectorController::InspectorController): Initialize
1349         m_debuggerAttached to false.
1350         (WebCore::InspectorController::windowScriptObjectAvailable): Add the debuggerAttached
1351         property to the InspectorController class.
1352         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage):
1353         Set m_debuggerAttached to true.
1354         (WebCore::InspectorController::stopDebugging): Set m_debuggerAttached to false.
1355         * page/InspectorController.h:
1356         * page/inspector/Images/debuggingButtons.png: Added.
1357         * page/inspector/ScriptsPanel.js:
1358         (WebInspector.ScriptsPanel): Disable the pause button. Create the debugging
1359         button and setup the id, className and event listener. Call reset.
1360         (WebInspector.ScriptsPanel.prototype.get statusBarItems): Return an array
1361         (WebInspector.ScriptsPanel.prototype.reset): Call _updateDebuggerButtons.
1362         (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): Adjust the title of
1363         the debugging button to match what will happen when clicked. Change the style class,
1364         and toggle the disabled state of the pause button.
1365         (WebInspector.ScriptsPanel.prototype._toggleDebugging): Start or stop debugging
1366         depending on InspectorController.debuggerAttached().
1367         * page/inspector/inspector.css: Added style rules for the debugger button.
1368
1369 2008-04-21  Adam Roben  <aroben@apple.com>
1370
1371         Change PlatformWheelEvent to use GET_WHEEL_DELTA_WPARAM
1372
1373         Reviewed by Dan Bernstein.
1374
1375         * platform/win/WheelEventWin.cpp:
1376         (WebCore::PlatformWheelEvent::PlatformWheelEvent): Use
1377         GET_WHEEL_DELTA_WPARAM, which is documented way of getting the wheel
1378         delta (it is equivalent to what we were previously doing, however).
1379
1380 2008-04-22  Simon Hausmann  <hausmann@webkit.org>
1381
1382         Qt build fix.
1383
1384         Adjust the Qt resource file to removed image files.
1385
1386         * page/inspector/WebKit.qrc:
1387
1388 2008-04-21  Timothy Hatcher  <timothy@apple.com>
1389
1390         Use CSS gradients to replace many image files in the Web Inspector.
1391
1392         Rubber-stamped by Adam Roben.
1393
1394         * page/inspector/Images/alternateTableRows.png: Removed.
1395         * page/inspector/Images/darkShadow.png: Removed.
1396         * page/inspector/Images/paneHeader.png: Removed.
1397         * page/inspector/Images/paneHeaderActive.png: Removed.
1398         * page/inspector/Images/sidebarSelection.png: Removed.
1399         * page/inspector/Images/sidebarSelectionBackground.png: Removed.
1400         * page/inspector/Images/sidebarSelectionBackgroundFocused.png: Removed.
1401         * page/inspector/Images/sidebarSelectionBackgroundInactive.png: Removed.
1402         * page/inspector/Images/sidebarSelectionBlurred.png: Removed.
1403         * page/inspector/Images/sidebarSelectionBlurredTall.png: Removed.
1404         * page/inspector/Images/sidebarSelectionGray.png: Removed.
1405         * page/inspector/Images/sidebarSelectionGrayTall.png: Removed.
1406         * page/inspector/Images/sidebarSelectionTall.png: Removed.
1407         * page/inspector/Images/sidebarSmallSelectionBackground.png: Removed.
1408         * page/inspector/Images/sidebarSmallSelectionBackgroundFocused.png: Removed.
1409         * page/inspector/Images/sidebarSmallSelectionBackgroundInactive.png: Removed.
1410         * page/inspector/Images/toolbarBackground.png: Removed.
1411         * page/inspector/Images/toolbarBackgroundInactive.png: Removed.
1412         * page/inspector/inspector.css:
1413
1414 2008-04-22  Andre Poenitz  <andre.poenitz@trolltech.com>
1415
1416         Reviewed by Simon.
1417
1418         Remove compiler warnings on string literals used to construct QStrings
1419         in webkit.
1420
1421         * bridge/qt/qt_instance.cpp:
1422         (KJS::Bindings::QtField::valueFromInstance):
1423         (KJS::Bindings::QtField::setValueToInstance):
1424         * bridge/qt/qt_runtime.cpp:
1425         (KJS::Bindings::convertValueToQVariant):
1426         (KJS::Bindings::QtRuntimeConnectionMethod::callAsFunction):
1427
1428 2008-04-22  Tor Arne Vestbø  <tavestbo@trolltech.com>
1429
1430         Reviewed by Simon.
1431
1432         Fall back to last path component for suggested filename if the HTTP content disposition is not set.
1433
1434         * platform/network/qt/QNetworkReplyHandler.cpp:
1435         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1436
1437 2008-04-22  Tor Arne Vestbø  <tavestbo@trolltech.com>
1438
1439         Reviewed by Simon.
1440
1441         Implemented the generation of the title string for images.
1442
1443         * platform/qt/Localizations.cpp:
1444
1445 2008-04-22  Simon Hausmann  <hausmann@webkit.org>
1446
1447         Qt build fix.
1448
1449         * platform/qt/RenderThemeQt.cpp: Adjust isControlStyled signature to
1450         the signature in the base class.
1451         * platform/qt/RenderThemeQt.h: Ditto.
1452
1453 2008-04-19  Jon Honeycutt  <jhoneycutt@apple.com>
1454
1455         Reviewed by Darin.
1456
1457         Add a method to get the AccessibilityObject's access key,
1458
1459         * page/AccessibilityObject.cpp:
1460         (WebCore::AccessibilityObject::accessKey): Added; returns the object's
1461         access key attribute.
1462         * page/AccessibilityObject.h: Added declaration for accessKey().
1463
1464 2008-04-21  Sam Weinig  <sam@webkit.org>
1465
1466         Reviewed by Anders Carlsson.
1467
1468         Fix numerous crashing tests.
1469
1470         * html/HTMLHtmlElement.cpp:
1471         (WebCore::HTMLHtmlElement::insertedIntoDocument): Null check document->frame().
1472
1473 2008-04-21  Dan Bernstein  <mitz@apple.com>
1474
1475         Reviewed by Darin Adler.
1476
1477         Tests: fast/media/implicit-media-all.html
1478                fast/media/monochrome.html
1479
1480         - allow implicit "all" media in media queries
1481         - use a value of 0 for the monochrome media feature on color displays
1482
1483         * css/CSSGrammar.y:
1484         * css/CSSParser.cpp:
1485         (WebCore::CSSParser::createFloatingMediaQuery):
1486         * css/CSSParser.h:
1487         * css/MediaQueryEvaluator.cpp:
1488         (WebCore::monochromeMediaFeatureEval):
1489
1490 2008-04-21  Brady Eidson  <beidson@apple.com>
1491
1492         Rockingly reviewed by Adele
1493
1494         Small StorageArea cleanups
1495
1496         * storage/SessionStorageArea.cpp:
1497         (WebCore::SessionStorageArea::copy): Pass "this" instead of the StorageMap belonging to this
1498         (WebCore::SessionStorageArea::SessionStorageArea):
1499         * storage/SessionStorageArea.h:
1500
1501         * storage/StorageArea.cpp:  Changed to not expose the StorageMap at all - it's dangerous to expose
1502           it since we rely explicitly on its ref-count
1503         (WebCore::StorageArea::StorageArea): Take another StorageArea as the c'tor argument and get the 
1504           StorageMap from that.
1505         (WebCore::StorageArea::setItem):  The previous comment/code here was bogus.  All JS objects passed in
1506           to this API are stringified, so there's no such thing as "null" for setItem()
1507         * storage/StorageArea.h:
1508
1509 2008-04-21  Justin Garcia  <justin.garcia@apple.com>
1510
1511         Reviewed by John Sullivan.
1512
1513         <rdar://problem/5803706> Pressing return at the end of a header doesn't break out of header (17460)
1514         
1515         If we're doing InsertParagraphSeparator at the end of a header element, do not clone it.
1516         Renamed m_useDefaultParagraphElement to m_mustUseDefaultParagraphElement, since now,
1517         when it is false, that does not necessarily mean that a default paragraph element
1518         will not be used.  Callers that passed false for this argument are OK with this.
1519
1520         * editing/InsertParagraphSeparatorCommand.cpp:
1521         (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): 
1522         (WebCore::InsertParagraphSeparatorCommand::shouldUseDefaultParagraphElement):
1523         (WebCore::InsertParagraphSeparatorCommand::doApply):
1524         * editing/InsertParagraphSeparatorCommand.h:
1525
1526 2008-04-21  Anders Carlsson  <andersca@apple.com>
1527
1528         Reviewed by Adam.
1529
1530         Perform cache selection. If a main resource has a URL that exists in a cache, load it from there.
1531         
1532         * html/HTMLAttributeNames.in:
1533         Add manifest attribute.
1534         
1535         * html/HTMLHtmlElement.cpp:
1536         (WebCore::HTMLHtmlElement::insertedIntoDocument):
1537         * html/HTMLHtmlElement.h:
1538         Perform cache selection.
1539         
1540         * loader/MainResourceLoader.cpp:
1541         (WebCore::MainResourceLoader::load):
1542         * loader/appcache/ApplicationCacheGroup.cpp:
1543         (WebCore::cacheHostSet):
1544         (WebCore::urlHostHash):
1545         (WebCore::ApplicationCacheGroup::cacheForRequest):
1546         (WebCore::ApplicationCacheGroup::selectCache):
1547         * loader/appcache/ApplicationCacheGroup.h:
1548         * platform/KURL.h:
1549         (WebCore::KURL::hostStart):
1550         (WebCore::KURL::hostEnd):
1551
1552 2008-04-21  Mike Belshe  <mike@belshe.com>
1553
1554         Reviewed by eseidel and darin.  Landed by eseidel.
1555
1556         Fix broken optimization in createStrippingNullCharacters.
1557
1558         * platform/text/StringImpl.cpp:
1559         (WebCore::StringImpl::createStrippingNullCharacters):
1560
1561 2008-04-21  David Hyatt  <hyatt@apple.com>
1562
1563         Make the back end parsing of background properties generic.  Rename all the parsing functions from
1564         background -> fill.
1565
1566         Add a new set of properties for doing masks.  The code is now refactored so that the mask properties
1567         and the background properties share parsing routines.
1568
1569         Reviewed by Dan
1570
1571         * css/CSSComputedStyleDeclaration.cpp:
1572         (WebCore::):
1573         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1574         * css/CSSParser.cpp:
1575         (WebCore::CSSParser::parseValue):
1576         (WebCore::CSSParser::addFillValue):
1577         (WebCore::CSSParser::parseFillShorthand):
1578         (WebCore::CSSParser::parseFillImage):
1579         (WebCore::CSSParser::parseFillPositionXY):
1580         (WebCore::CSSParser::parseFillPosition):
1581         (WebCore::CSSParser::parseFillSize):
1582         (WebCore::CSSParser::parseFillProperty):
1583         (WebCore::CSSParser::parseTransformOrigin):
1584         * css/CSSParser.h:
1585         * css/CSSPropertyNames.in:
1586         * css/CSSStyleSelector.cpp:
1587         (WebCore::CSSStyleSelector::CSSStyleSelector):
1588         (WebCore::CSSStyleSelector::mapFillAttachment):
1589         (WebCore::CSSStyleSelector::mapFillClip):
1590         (WebCore::CSSStyleSelector::mapFillComposite):
1591         (WebCore::CSSStyleSelector::mapFillOrigin):
1592         (WebCore::CSSStyleSelector::mapFillImage):
1593         (WebCore::CSSStyleSelector::mapFillRepeat):
1594         (WebCore::CSSStyleSelector::mapFillSize):
1595         (WebCore::CSSStyleSelector::mapFillXPosition):
1596         (WebCore::CSSStyleSelector::mapFillYPosition):
1597         * rendering/RenderStyle.cpp:
1598         (WebCore::FillLayer::FillLayer):
1599         (WebCore::FillLayer::operator=):
1600         (WebCore::FillLayer::operator==):
1601         (WebCore::StyleBackgroundData::StyleBackgroundData):
1602         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1603         (WebCore::StyleRareNonInheritedData::operator==):
1604         (WebCore::RenderStyle::diff):
1605         * rendering/RenderStyle.h:
1606         (WebCore::LengthSize::LengthSize):
1607         (WebCore::):
1608         (WebCore::FillLayer::type):
1609         (WebCore::FillLayer::initialFillAttachment):
1610         (WebCore::FillLayer::initialFillClip):
1611         (WebCore::FillLayer::initialFillOrigin):
1612         (WebCore::FillLayer::initialFillRepeat):
1613         (WebCore::FillLayer::initialFillComposite):
1614         (WebCore::FillLayer::initialFillSize):
1615         (WebCore::FillLayer::initialFillXPosition):
1616         (WebCore::FillLayer::initialFillYPosition):
1617         (WebCore::FillLayer::initialFillImage):
1618         (WebCore::RenderStyle::maskImage):
1619         (WebCore::RenderStyle::maskRepeat):
1620         (WebCore::RenderStyle::maskComposite):
1621         (WebCore::RenderStyle::maskAttachment):
1622         (WebCore::RenderStyle::maskClip):
1623         (WebCore::RenderStyle::maskOrigin):
1624         (WebCore::RenderStyle::maskXPosition):
1625         (WebCore::RenderStyle::maskYPosition):
1626         (WebCore::RenderStyle::maskSize):
1627         (WebCore::RenderStyle::accessMaskLayers):
1628         (WebCore::RenderStyle::maskLayers):
1629         (WebCore::RenderStyle::clearBackgroundLayers):
1630         (WebCore::RenderStyle::clearMaskLayers):
1631         (WebCore::RenderStyle::inheritMaskLayers):
1632
1633 2008-04-21  Timothy Hatcher  <timothy@apple.com>
1634
1635         Fixes the issue were a Database view could still be visible after navigating to a new page.
1636
1637         Reviewed by Darin Adler.
1638
1639         * page/inspector/DatabasesPanel.js:
1640         (WebInspector.DatabasesPanel.prototype.reset): Delete the _tableViews and _queryView properties
1641         from all databases. Remove all the children from databaseViews.
1642
1643 2008-04-21  Timothy Hatcher  <timothy@apple.com>
1644
1645         Adds the ability to enter multi-line commands in the console by holding the
1646         alt/option key when pressing enter/return.
1647
1648         https://bugs.webkit.org/show_bug.cgi?id=18454
1649
1650         Reviewed by Darin Adler.
1651
1652         * page/inspector/Console.js:
1653         (WebInspector.Console.prototype._enterKeyPressed): Return early if the
1654         alt/option key is held when enter is pressed.
1655         * page/inspector/inspector.css:
1656         (.console-message-text): Added. Set white-space: pre-wrap.
1657
1658 2008-04-21  Timothy Hatcher  <timothy@apple.com>
1659
1660         Fixes the bug where the Database table names do not update when
1661         running the CREATE TABLE or DROP TABLE queries. Also makes the
1662         table names update every time the database is collapsed and expanded.
1663
1664         https://bugs.webkit.org/show_bug.cgi?id=18453
1665
1666         Reviewed by Darin Adler.
1667
1668         * page/inspector/DatabasesPanel.js:
1669         (WebInspector.DatabasesPanel.prototype.updateDatabaseTables):
1670         Set shouldRefreshChildren to true on the Database's tree element.
1671         The refreshChildren property was renamed to shouldRefreshChildren.
1672         (WebInspector.DatabaseSidebarTreeElement.prototype.oncollapse):
1673         Request a refresh after every collapse so the next expand will
1674         have an updated table list.
1675
1676 2008-04-21  Timothy Hatcher  <timothy@apple.com>
1677
1678         Adds INDEX to the list of completion words for the Databases query view.
1679
1680         https://bugs.webkit.org/show_bug.cgi?id=18452
1681
1682         Reviewed by Darin Adler.
1683
1684         * page/inspector/DatabaseQueryView.js:
1685         (WebInspector.DatabaseQueryView.prototype.completions): Split up "CREATE TABLE "
1686         and "DROP TABLE " into "CREATE ", "DROP ", "TABLE ". And added "INDEX ".
1687
1688 2008-04-21  Timothy Hatcher  <timothy@apple.com>
1689
1690         Adds the UI portions of the Scripts panel to the Web Inspector.
1691         The Scripts panel has not been added to the toolbar yet.
1692
1693         https://bugs.webkit.org/show_bug.cgi?id=18601
1694
1695         Reviewed by Adam Roben.
1696
1697         * English.lproj/InspectorLocalizedStrings.js: Changed "Show inherited properties"
1698         to "Show inherited". Adds new strings for the Scripts' panel tooltips.
1699         * page/inspector/BreakpointsSidebarPane.js: Added.
1700         * page/inspector/CallStackSidebarPane.js: Added.
1701         * page/inspector/Images/back.png: Added.
1702         * page/inspector/Images/debuggerContinue.png: Added.
1703         * page/inspector/Images/debuggerPause.png: Added.
1704         * page/inspector/Images/debuggerStepInto.png: Added.
1705         * page/inspector/Images/debuggerStepOut.png: Added.
1706         * page/inspector/Images/debuggerStepOver.png: Added.
1707         * page/inspector/Images/forward.png: Added.
1708         * page/inspector/Images/statusbarResizerHorizontal.png: Added.
1709         * page/inspector/PropertiesSection.js:
1710         (WebInspector.PropertiesSection): Flip the order the subtile is appended
1711         so it can float right in the CSS.
1712         * page/inspector/ScriptsPanel.js: Added.
1713         * page/inspector/StylesSidebarPane.js:
1714         (WebInspector.StylePropertiesSection): Changed "Show inherited properties"
1715         to "Show inherited".
1716         * page/inspector/inspector.css: Added new CSS rules for the Scripts panel. 
1717         Also changes the look of the section to match the mockup, this affects
1718         Styles and Properties in Elements.
1719         * page/inspector/inspector.html: Import new files.
1720         * page/inspector/inspector.js:
1721         (Preferences.minScriptsSidebarWidth): Added.
1722
1723 2008-04-21  Kevin McCullough  <kmccullough@apple.com>
1724
1725         Reviewed by Adam.
1726
1727         <rdar://problem/5770054> JavaScript profiler (10928)
1728         Took out debugging printing since we really want to hook into the
1729         inspector and not to print to the terminal.
1730
1731         * page/Console.cpp:
1732         (WebCore::Console::profileEnd):
1733
1734 2008-04-21  Sam Weinig  <sam@webkit.org>
1735
1736         Reviewed by Alexey Proskuryakov.
1737
1738         Fix up XMLHttpRequestProgressEvent.
1739
1740         * bindings/js/JSEventCustom.cpp:
1741         (WebCore::toJS):
1742         * xml/XMLHttpRequestProgressEvent.cpp:
1743         * xml/XMLHttpRequestProgressEvent.h:
1744
1745 2008-04-21  Adam Roben  <aroben@apple.com>
1746
1747         Fix Bug 18615: Crash in PluginPackage::hash
1748
1749         <https://bugs.webkit.org/show_bug.cgi?id=18615>
1750
1751         Reviewed by Anders Carlsson.
1752
1753         * plugins/PluginDatabase.cpp:
1754         (WebCore::PluginDatabase::refresh): Don't pass a null PluginPackage*
1755         to add().
1756
1757 2008-04-21  Anders Carlsson  <andersca@apple.com>
1758
1759         Reviewed by Adam.
1760
1761         Add cache group implementation.
1762
1763         * loader/DocumentLoader.cpp:
1764         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
1765         * loader/appcache/ApplicationCache.cpp:
1766         (WebCore::ApplicationCache::requestIsHTTPOrHTTPSGet):
1767         (WebCore::ApplicationCache::resourceForRequest):
1768         * loader/appcache/ApplicationCache.h:
1769         * loader/appcache/ApplicationCacheGroup.cpp:
1770         (WebCore::cacheGroupMap):
1771         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
1772         (WebCore::ApplicationCacheGroup::selectCache):
1773         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
1774         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
1775         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
1776         (WebCore::ApplicationCacheGroup::cacheDestroyed):
1777         (WebCore::ApplicationCacheGroup::update):
1778         (WebCore::ApplicationCacheGroup::didReceiveResponse):
1779         (WebCore::ApplicationCacheGroup::didReceiveData):
1780         (WebCore::ApplicationCacheGroup::didFinishLoading):
1781         (WebCore::ApplicationCacheGroup::didFail):
1782         (WebCore::ApplicationCacheGroup::didReceiveManifestResponse):
1783         (WebCore::ApplicationCacheGroup::didReceiveManifestData):
1784         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
1785         (WebCore::ApplicationCacheGroup::cacheUpdateFailed):
1786         (WebCore::ApplicationCacheGroup::didFailToLoadManifest):
1787         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
1788         (WebCore::ApplicationCacheGroup::startLoadingEntry):
1789         (WebCore::ApplicationCacheGroup::addEntry):
1790         (WebCore::ApplicationCacheGroup::associateDocumentLoaderWithCache):
1791         (WebCore::ApplicationCacheGroup::callListenersOnAssociatedDocuments):
1792         (WebCore::ApplicationCacheGroup::callListeners):
1793         * loader/appcache/ApplicationCacheGroup.h:
1794         (WebCore::ApplicationCacheGroup::status):
1795         (WebCore::ApplicationCacheGroup::newestCache):
1796         * platform/KURL.h:
1797         (WebCore::KURL::hostStart):
1798         (WebCore::KURL::hostEnd):
1799
1800 2008-04-21  David Hyatt  <hyatt@apple.com>
1801
1802         Rename BackgroundLayer -> FillLayer in preparation for it being used for other types of fills.
1803
1804         Reviewed by Dan
1805
1806         * css/CSSComputedStyleDeclaration.cpp:
1807         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1808         * css/CSSPrimitiveValueMappings.h:
1809         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1810         (WebCore::CSSPrimitiveValue::operator EFillBox):
1811         (WebCore::CSSPrimitiveValue::operator EFillRepeat):
1812         * css/CSSStyleSelector.cpp:
1813         (WebCore::CSSStyleSelector::applyProperty):
1814         (WebCore::CSSStyleSelector::mapFillAttachment):
1815         (WebCore::CSSStyleSelector::mapFillClip):
1816         (WebCore::CSSStyleSelector::mapFillComposite):
1817         (WebCore::CSSStyleSelector::mapFillOrigin):
1818         (WebCore::CSSStyleSelector::mapFillImage):
1819         (WebCore::CSSStyleSelector::mapFillRepeat):
1820         (WebCore::CSSStyleSelector::mapFillSize):
1821         (WebCore::CSSStyleSelector::mapFillXPosition):
1822         (WebCore::CSSStyleSelector::mapFillYPosition):
1823         (WebCore::CSSStyleSelector::mapTransitionDuration):
1824         (WebCore::CSSStyleSelector::mapTransitionRepeatCount):
1825         (WebCore::CSSStyleSelector::mapTransitionTimingFunction):
1826         (WebCore::CSSStyleSelector::mapTransitionProperty):
1827         * css/CSSStyleSelector.h:
1828         * page/AnimationController.cpp:
1829         (WebCore::ImplicitAnimation::ImplicitAnimation):
1830         (WebCore::CompositeImplicitAnimation::animate):
1831         * rendering/InlineFlowBox.cpp:
1832         (WebCore::InlineFlowBox::paintBackgrounds):
1833         (WebCore::InlineFlowBox::paintBackground):
1834         * rendering/InlineFlowBox.h:
1835         * rendering/RenderBox.cpp:
1836         (WebCore::RenderBox::paintRootBoxDecorations):
1837         (WebCore::RenderBox::paintBackgrounds):
1838         (WebCore::RenderBox::paintBackground):
1839         (WebCore::RenderBox::calculateBackgroundSize):
1840         (WebCore::RenderBox::imageChanged):
1841         (WebCore::RenderBox::calculateBackgroundImageGeometry):
1842         (WebCore::RenderBox::paintBackgroundExtended):
1843         * rendering/RenderBox.h:
1844         * rendering/RenderObject.cpp:
1845         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
1846         (WebCore::RenderObject::updateBackgroundImages):
1847         (WebCore::RenderObject::arenaDelete):
1848         * rendering/RenderObject.h:
1849         (WebCore::RenderObject::paintBackgroundExtended):
1850         * rendering/RenderStyle.cpp:
1851         (WebCore::FillLayer::FillLayer):
1852         (WebCore::FillLayer::~FillLayer):
1853         (WebCore::FillLayer::operator=):
1854         (WebCore::FillLayer::operator==):
1855         (WebCore::FillLayer::fillUnsetProperties):
1856         (WebCore::FillLayer::cullEmptyLayers):
1857         (WebCore::Transition::fillUnsetProperties):
1858         * rendering/RenderStyle.h:
1859         (WebCore::):
1860         (WebCore::FillLayer::image):
1861         (WebCore::FillLayer::xPosition):
1862         (WebCore::FillLayer::yPosition):
1863         (WebCore::FillLayer::attachment):
1864         (WebCore::FillLayer::clip):
1865         (WebCore::FillLayer::origin):
1866         (WebCore::FillLayer::repeat):
1867         (WebCore::FillLayer::composite):
1868         (WebCore::FillLayer::size):
1869         (WebCore::FillLayer::next):
1870         (WebCore::FillLayer::isImageSet):
1871         (WebCore::FillLayer::isXPositionSet):
1872         (WebCore::FillLayer::isYPositionSet):
1873         (WebCore::FillLayer::isAttachmentSet):
1874         (WebCore::FillLayer::isClipSet):
1875         (WebCore::FillLayer::isOriginSet):
1876         (WebCore::FillLayer::isRepeatSet):
1877         (WebCore::FillLayer::isCompositeSet):
1878         (WebCore::FillLayer::isSizeSet):
1879         (WebCore::FillLayer::setImage):
1880         (WebCore::FillLayer::setXPosition):
1881         (WebCore::FillLayer::setYPosition):
1882         (WebCore::FillLayer::setAttachment):
1883         (WebCore::FillLayer::setClip):
1884         (WebCore::FillLayer::setOrigin):
1885         (WebCore::FillLayer::setRepeat):
1886         (WebCore::FillLayer::setComposite):
1887         (WebCore::FillLayer::setSize):
1888         (WebCore::FillLayer::clearImage):
1889         (WebCore::FillLayer::clearXPosition):
1890         (WebCore::FillLayer::clearYPosition):
1891         (WebCore::FillLayer::clearAttachment):
1892         (WebCore::FillLayer::clearClip):
1893         (WebCore::FillLayer::clearOrigin):
1894         (WebCore::FillLayer::clearRepeat):
1895         (WebCore::FillLayer::clearComposite):
1896         (WebCore::FillLayer::clearSize):
1897         (WebCore::FillLayer::setNext):
1898         (WebCore::FillLayer::operator!=):
1899         (WebCore::FillLayer::hasFixedImage):
1900         (WebCore::Transition::isDurationSet):
1901         (WebCore::Transition::isRepeatCountSet):
1902         (WebCore::Transition::isTimingFunctionSet):
1903         (WebCore::Transition::isPropertySet):
1904         (WebCore::Transition::clearDuration):
1905         (WebCore::Transition::clearRepeatCount):
1906         (WebCore::Transition::clearTimingFunction):
1907         (WebCore::Transition::clearProperty):
1908         (WebCore::Transition::duration):
1909         (WebCore::Transition::repeatCount):
1910         (WebCore::Transition::timingFunction):
1911         (WebCore::Transition::property):
1912         (WebCore::Transition::setDuration):
1913         (WebCore::Transition::setRepeatCount):
1914         (WebCore::Transition::setTimingFunction):
1915         (WebCore::Transition::setProperty):
1916         (WebCore::RenderStyle::NonInheritedFlags::operator==):
1917         (WebCore::RenderStyle::setBitDefaults):
1918         (WebCore::RenderStyle::backgroundRepeat):
1919         (WebCore::RenderStyle::backgroundComposite):
1920         (WebCore::RenderStyle::backgroundAttachment):
1921         (WebCore::RenderStyle::backgroundClip):
1922         (WebCore::RenderStyle::backgroundOrigin):
1923         (WebCore::RenderStyle::backgroundSize):
1924         (WebCore::RenderStyle::accessBackgroundLayers):
1925         (WebCore::RenderStyle::backgroundLayers):
1926         (WebCore::RenderStyle::clearBackgroundLayers):
1927         (WebCore::RenderStyle::inheritBackgroundLayers):
1928         (WebCore::RenderStyle::initialFillAttachment):
1929         (WebCore::RenderStyle::initialFillClip):
1930         (WebCore::RenderStyle::initialFillOrigin):
1931         (WebCore::RenderStyle::initialFillRepeat):
1932         (WebCore::RenderStyle::initialFillComposite):
1933         (WebCore::RenderStyle::initialFillSize):
1934         (WebCore::RenderStyle::initialFillXPosition):
1935         (WebCore::RenderStyle::initialFillYPosition):
1936         (WebCore::RenderStyle::initialFillImage):
1937         (WebCore::RenderStyle::initialWhiteSpace):
1938         (WebCore::RenderStyle::initialColor):
1939         * rendering/RenderTableCell.cpp:
1940         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
1941         * rendering/RenderTheme.cpp:
1942         (WebCore::RenderTheme::adjustStyle):
1943         (WebCore::RenderTheme::isControlStyled):
1944         * rendering/RenderTheme.h:
1945         * rendering/RenderThemeMac.h:
1946         * rendering/RenderThemeMac.mm:
1947         (WebCore::RenderThemeMac::isControlStyled):
1948
1949 2008-04-21  Julien Chaffraix  <jchaffraix@webkit.org>
1950
1951         Rubber-stamped by Ap.
1952
1953         Add 2 explicit casts.
1954         Fixes built on 64-bit machines (64-bit to 32-bit conversion warning).
1955
1956         * xml/XMLHttpRequest.cpp:
1957         (WebCore::XMLHttpRequest::dispatchProgressEvent):
1958
1959 2008-04-21  Anders Carlsson  <andersca@apple.com>
1960
1961         Reviewed by Adam.
1962
1963         Make it possible to load resources from the cache. 
1964         (Currently no documents are ever associated with a cache though.)
1965         
1966         * loader/DocumentLoader.cpp:
1967         (WebCore::DocumentLoader::setPrimaryLoadComplete):
1968         (WebCore::DocumentLoader::mainResourceApplicationCache):
1969         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
1970         * loader/DocumentLoader.h:
1971         * loader/MainResourceLoader.cpp:
1972         (WebCore::MainResourceLoader::didFinishLoading):
1973         (WebCore::MainResourceLoader::load):
1974         * loader/MainResourceLoader.h:
1975         (WebCore::MainResourceLoader::applicationCache):
1976         * loader/ResourceLoader.cpp:
1977         (WebCore::ResourceLoader::ResourceLoader):
1978         (WebCore::ResourceLoader::load):
1979         * loader/ResourceLoader.h:
1980         * loader/appcache/ApplicationCacheGroup.h:
1981         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
1982
1983 2008-04-21  MorganL  <morganl.webkit@yahoo.com>
1984
1985         Reviewed by eseidel.  Landed by eseidel.
1986
1987         Add FrameLoader::policyDocumentLoader, and change
1988         provisionalDocumentLoader to have a const signature to be
1989         consistent with documentLoader and activeDocumentLoader.
1990
1991         * WebCore.base.exp:
1992         * WebCore.order:
1993         * loader/FrameLoader.cpp:
1994         (WebCore::FrameLoader::policyDocumentLoader):
1995         (WebCore::FrameLoader::provisionalDocumentLoader):
1996         * loader/FrameLoader.h:
1997
1998 2008-04-21  Julien Chaffraix  <jchaffraix@webkit.org>
1999
2000         Not reviewed, add missing files in my previous commit.
2001
2002         Test: http/tests/xmlhttprequest/infoOnProgressEvent.html
2003
2004         * xml/XMLHttpRequestProgressEvent.cpp: Added.
2005         (WebCore::XMLHttpRequestProgressEvent::XMLHttpRequestProgressEvent):
2006         (WebCore::XMLHttpRequestProgressEvent::position):
2007         (WebCore::XMLHttpRequestProgressEvent::totalSize):
2008         * xml/XMLHttpRequestProgressEvent.h: Added.
2009         (WebCore::XMLHttpRequestProgressEvent::isXMLHttpRequestProgressEvent):
2010         (WebCore::XMLHttpRequestProgressEvent::isProgressEvent):
2011         (WebCore::XMLHttpRequestProgressEvent::lengthComputable):
2012         (WebCore::XMLHttpRequestProgressEvent::loaded):
2013         (WebCore::XMLHttpRequestProgressEvent::total):
2014         * xml/XMLHttpRequestProgressEvent.idl: Added.
2015
2016 2008-04-21  Julien Chaffraix  <jchaffraix@webkit.org>
2017
2018         Reviewed by Ap.
2019
2020         Bug 13596: Implement .onprogress handler on XMLHttpRequest objects to support
2021         progressive download content length information.
2022
2023         - Add the onprogress attribute to XMLHttpRequest and the necessary bindings.
2024
2025         - We use a custom event XMLHttpRequestProgressEvent that is derived from ProgressEvent
2026          (as specified by the XHR2 specification) but also implement LSProgressEvent interface
2027          (to be compliant with Firefox event).
2028
2029         Test: http/tests/xmlhttprequest/infoOnProgressEvent.html
2030
2031         * DerivedSources.make:
2032         * GNUmakefile.am:
2033         * WebCore.pro:
2034         * WebCore.vcproj/WebCore.vcproj:
2035         * WebCore.xcodeproj/project.pbxproj:
2036         * WebCoreSources.bkl:
2037         * bindings/js/JSEventCustom.cpp:
2038         (WebCore::toJS):
2039         * bindings/js/JSXMLHttpRequestCustom.cpp:
2040         (WebCore::JSXMLHttpRequest::mark):
2041         (WebCore::JSXMLHttpRequest::onprogress):
2042         (WebCore::JSXMLHttpRequest::setOnprogress):
2043         * dom/Event.cpp:
2044         (WebCore::Event::isXMLHttpRequestProgressEvent):
2045         * dom/Event.h:
2046         * dom/ProgressEvent.h: Replaced 'private' by 'protected' to enable derivation.
2047         * xml/XMLHttpRequest.cpp:
2048         (WebCore::XMLHttpRequest::onProgressListener): onprogress getter.
2049         (WebCore::XMLHttpRequest::setOnProgressListener): onprogress setter.
2050         (WebCore::XMLHttpRequest::XMLHttpRequest): initialize m_receivedLength.
2051         (WebCore::XMLHttpRequest::internalAbort): reset m_receivedLength on abort.
2052         (WebCore::XMLHttpRequest::didReceiveData): add updateAndDispatchOnProgress call.
2053         (WebCore::XMLHttpRequest::updateAndDispatchOnProgress):
2054         (WebCore::XMLHttpRequest::dispatchProgressEvent):
2055         * xml/XMLHttpRequest.h:
2056         * xml/XMLHttpRequest.idl: Add onprogress event handler.
2057         * xml/XMLHttpRequestProgressEvent.cpp: Added.
2058         (WebCore::XMLHttpRequestProgressEvent::XMLHttpRequestProgressEvent):
2059         (WebCore::XMLHttpRequestProgressEvent::position):
2060         (WebCore::XMLHttpRequestProgressEvent::totalSize):
2061         The two previous methods are used for Firefox compatibility and map to the
2062         same value as the ProgressEvent methods (but they are deprecated and display
2063
2064         * xml/XMLHttpRequestProgressEvent.h: Added.
2065         (WebCore::XMLHttpRequestProgressEvent::isXMLHttpRequestProgressEvent):
2066         (WebCore::XMLHttpRequestProgressEvent::isProgressEvent):
2067         (WebCore::XMLHttpRequestProgressEvent::lengthComputable):
2068         (WebCore::XMLHttpRequestProgressEvent::loaded):
2069         (WebCore::XMLHttpRequestProgressEvent::total):
2070         * xml/XMLHttpRequestProgressEvent.idl: Added.
2071
2072 2008-04-21  Michael Goddard  <michael.goddard@trolltech.com>
2073
2074         Reviewed by Simon.
2075
2076         Better handle Qt binding object lifetime in JS.
2077         Add explicit marking of JS objects created for Qt
2078         bindings, and remove the gcProtect calls.
2079
2080         * bridge/qt/qt_class.cpp:
2081         (KJS::Bindings::QtClass::fallbackObject):
2082         * bridge/qt/qt_instance.cpp:
2083         (KJS::Bindings::QtRuntimeObjectImp::mark):
2084         (KJS::Bindings::QtInstance::~QtInstance):
2085         (KJS::Bindings::QtInstance::mark):
2086         (KJS::Bindings::QtInstance::invokeDefaultMethod):
2087         (KJS::Bindings::QtField::valueFromInstance):
2088         * bridge/qt/qt_instance.h:
2089
2090 2008-04-21  Michael Goddard  <michael.goddard@trolltech.com>
2091
2092         Reviewed by Simon.
2093
2094         Add better support for RuntimeArray type conversions.
2095         It seems that RuntimeArray claims to inherit ArrayInstance
2096         (in the JS sense), but the C++ class doesn't, so properly
2097         access RuntimeArrays.  Also, properly support turning
2098         a JS object into a QVariantMap, since we support the
2099         reverse.
2100
2101         * bridge/qt/qt_runtime.cpp:
2102         (KJS::Bindings::):
2103         (KJS::Bindings::operator<<):
2104         (KJS::Bindings::valueRealType):
2105         (KJS::Bindings::convertValueToQVariant):
2106         (KJS::Bindings::convertQVariantToValue):
2107
2108 2008-04-21  Simon Hausmann  <hausmann@webkit.org>
2109
2110         Reviewed by Holger.
2111
2112         Fix painting of text fields in the CleanLooks style.
2113
2114         The CleanLooks style calls painter->drawRect() and expects a painter
2115         that has no brush set. This is a fairly common assumption and therefore
2116         we now always set the brush to NoBrush before calling a style. This
2117         is done by centralizing the painter setup code into StylePainter
2118         and restore the old brush in the StylePainter destructor.
2119
2120         In addition for textfields it is not necessary anymore to draw
2121         PE_FrameLineEdit as we set the lineWidth in the style option correctly
2122         and it's the style responsibility (QCommonStyle usually) to draw
2123         PE_FrameLineEdit.
2124
2125         * platform/qt/RenderThemeQt.cpp:
2126         (WebCore::RenderThemeQt::paintButton):
2127         (WebCore::RenderThemeQt::paintTextField):
2128         (WebCore::RenderThemeQt::paintMenuList):
2129         (WebCore::StylePainter::StylePainter):
2130         (WebCore::StylePainter::~StylePainter):
2131         * platform/qt/RenderThemeQt.h:
2132         (WebCore::StylePainter::isValid):
2133         (WebCore::StylePainter::drawPrimitive):
2134         (WebCore::StylePainter::drawControl):
2135         (WebCore::StylePainter::drawComplexControl):
2136
2137 2008-04-21  Olivier Goffart  <ogoffart@trolltech.com>
2138
2139         Reviewed by Simon.
2140
2141         Fixes copy and paste of international characters.
2142
2143         When exporting HTML to the clipboard we need meta tags for now that confirm the
2144         conversion to utf-8 done inside QClipboard.
2145
2146         * platform/qt/PasteboardQt.cpp:
2147         (WebCore::Pasteboard::writeSelection):
2148
2149 2008-04-21  Olivier Goffart  <ogoffart@trolltech.com>
2150
2151         Reviewed by Simon.
2152
2153         Fixes: Copying on X11 doesn't always work in webkit
2154
2155         Calling QClipboard::clear right before QClipboard::setData create a race condition with klipper. So don't call QClipboard::clear since it's not required.
2156
2157         * platform/qt/PasteboardQt.cpp:
2158
2159 2008-04-21  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2160
2161         Reviewed by Simon.
2162
2163         * Assume that our lineedit has a frame. This is needed for the motif style
2164
2165         * platform/qt/RenderThemeQt.cpp:
2166         (WebCore::RenderThemeQt::paintTextField):
2167
2168 2008-04-21  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2169
2170         Reviewed by Simon.
2171
2172         * Follow the windows render theme when determining whether to style
2173         listboxes or not.
2174
2175         * platform/qt/RenderThemeQt.cpp:
2176         (WebCore::RenderThemeQt::isControlStyled):
2177
2178 2008-04-21  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2179
2180         Reviewed by Simon.
2181
2182         * Try to bring the notImplemented implementations closer together. This will
2183         print each unimplemted method name only once.
2184
2185         * We might want to change wtf/Assertions.cpp to use qDebug
2186
2187         * platform/NotImplemented.h:
2188
2189 2008-04-21  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2190
2191         Reviewed by Simon.
2192
2193         * Remove the special Qt ctor of BitmapImage as it did not work. The Bitmap returned
2194         0 as width and after intialising drawing would fail. BitmapImage relies on a proper
2195         ImageSource.
2196         * Instead of adding more special cases to BitmapImage create a new class called StillImage
2197         which is getting one QPixmap and is implementing Image::draw and Image::size. This is
2198         working well for the images created using Image::loadPlatformResource.
2199
2200         * platform/graphics/BitmapImage.h:
2201         * platform/graphics/qt/ImageQt.cpp:
2202         (WebCore::BitmapImage::initPlatformData):
2203         (WebCore::BitmapImage::getPixmap):
2204         (WebCore::StillImage::StillImage):
2205         (WebCore::StillImage::size):
2206         (WebCore::StillImage::getPixmap):
2207         (WebCore::StillImage::draw):
2208
2209 2008-04-21  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2210
2211         Reviewed by Simon.
2212
2213         * Package the Resources into a qrc
2214
2215         * Resources/WebKitResources.qrc: Added.
2216         * WebCore.pro:
2217
2218 2008-04-21  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2219
2220         Reviewed by Simon.
2221
2222         * Make sure every resource is available als png as well.
2223
2224         * Resources/deleteButton.png: Added.
2225         * Resources/deleteButtonPressed.png: Added.
2226         * Resources/missingImage.png: Added.
2227         * Resources/nullPlugin.png: Copied from WebKit/win/WebKit.vcproj/nullplugin.png.
2228         * Resources/textAreaResizeCorner.png: Added.
2229         * Resources/urlIcon.png: Copied from WebKit/win/WebKit.vcproj/urlIcon.png.
2230
2231 2008-04-20  Sriram Neelakandan  <sriram.neelakandan@gmail.com>
2232
2233         Reviewed by Alp Toker.
2234
2235         Implement FileSystemGtk's getFileModificationTime() with GLib.
2236
2237         * platform/gtk/FileSystemGtk.cpp:
2238         (WebCore::getFileModificationTime):
2239
2240 2008-04-20  Christian Persch  <chpe@gnome.org>
2241
2242         Reviewed by Alp Toker.
2243
2244         Bundle GTK+ Xt compatibility code from Mozilla. These files are used
2245         by all currently proposed GTK+ plugin patches and will make the
2246         proposed patches smaller and easier to review.
2247
2248         These files should be kept as close to the upstream versions as
2249         possible so fixes can be shared between projects and to ensure
2250         compatibility with the reference implementation.
2251
2252         * plugins/gtk/gtk2xtbin.c: Added.
2253         (xt_event_prepare):
2254         (xt_event_check):
2255         (xt_event_dispatch):
2256         (xt_event_polling_timer_callback):
2257         (gtk_xtbin_get_type):
2258         (gtk_xtbin_class_init):
2259         (gtk_xtbin_init):
2260         (gtk_xtbin_realize):
2261         (gtk_xtbin_new):
2262         (gtk_xtbin_set_position):
2263         (gtk_xtbin_resize):
2264         (gtk_xtbin_unrealize):
2265         (gtk_xtbin_destroy):
2266         (xt_client_init):
2267         (xt_client_create):
2268         (xt_client_unrealize):
2269         (xt_client_destroy):
2270         (xt_client_set_info):
2271         (xt_client_handle_xembed_message):
2272         (xt_client_event_handler):
2273         (send_xembed_message):
2274         (error_handler):
2275         (trap_errors):
2276         (untrap_error):
2277         (xt_client_focus_listener):
2278         (xt_add_focus_listener):
2279         (xt_remove_focus_listener):
2280         (xt_add_focus_listener_tree):
2281         * plugins/gtk/gtk2xtbin.h: Added.
2282
2283 2008-04-20  Dirk Schulze  <vbs85@gmx.de>
2284
2285         Reviewed by Alp Toker.
2286
2287         http://bugs.webkit.org/show_bug.cgi?id=15449
2288         [CAIRO] SVG gradients do not work properly
2289
2290         Fixed SVG-gradients in Cairo.
2291
2292         * svg/graphics/cairo/SVGPaintServerGradientCairo.cpp:
2293         (WebCore::SVGPaintServerGradient::setup):
2294
2295 2008-04-20  Simon Hausmann  <hausmann@webkit.org>
2296
2297         Reviewed by Alp Toker.
2298
2299         http://bugs.webkit.org/show_bug.cgi?id=18578
2300         Share the printing code between the Gtk and the Qt port
2301
2302         Share the printing code between the Gtk and the Qt port
2303         and added printing to the Qt WebKit API.
2304
2305         * GNUmakefile.am:
2306         * WebCore.pro:
2307         * page/PrintContext.cpp: Added.
2308         (WebCore::PrintContext::PrintContext):
2309         (WebCore::PrintContext::~PrintContext):
2310         (WebCore::PrintContext::pageCount):
2311         (WebCore::PrintContext::computePageRects):
2312         (WebCore::PrintContext::begin):
2313         (WebCore::PrintContext::spoolPage):
2314         * page/PrintContext.h: Added.
2315
2316 2008-04-19  Alp Toker  <alp@nuanti.com>
2317
2318         Reviewed by Mark Rowe.
2319
2320         Complete the Cairo (CSS) gradient implementation.
2321
2322         * platform/graphics/Gradient.h:
2323         * platform/graphics/cairo/GradientCairo.cpp:
2324         (WebCore::Gradient::platformDestroy):
2325         (WebCore::Gradient::fill):
2326
2327 2008-04-19  Alp Toker  <alp@nuanti.com>
2328
2329         Reviewed by Dave Hyatt.
2330
2331         Restore Cairo canvas support following the recent changes in
2332         BitmapImage and ImageBuffer integrating canvas with CSS. Some
2333         drawing regressions remain unfixed.
2334
2335         * platform/graphics/BitmapImage.h:
2336         * platform/graphics/ImageBuffer.h:
2337         * platform/graphics/cairo/ImageBufferCairo.cpp:
2338         (WebCore::ImageBuffer::image):
2339         * platform/graphics/cairo/ImageCairo.cpp:
2340         (WebCore::BitmapImage::BitmapImage):
2341         (WebCore::BitmapImage::draw):
2342         * platform/graphics/cairo/ImageSourceCairo.cpp:
2343         (WebCore::ImageSource::createFrameAtIndex):
2344
2345 2008-04-19  Dan Bernstein  <mitz@apple.com>
2346
2347         Reviewed by Dave Hyatt.
2348
2349         - fix additional cases of https://bugs.webkit.org/show_bug.cgi?id=17921
2350           namely cases where the trailing white space is already in a separate
2351           run but still needs to be re-ordered.
2352
2353         Test: fast/text/trailing-white-space-2.html
2354
2355         * platform/text/BidiResolver.h:
2356         (WebCore::::moveRunToEnd):
2357         (WebCore::::moveRunToBeginning):
2358         * rendering/bidi.cpp:
2359         (WebCore::RenderBlock::layoutInlineChildren):
2360
2361 2008-04-19  Alp Toker  <alp@nuanti.com>
2362
2363         Reviewed by Nikolas.
2364
2365         Add text shadow support for simple text in FontCairo.
2366
2367         * platform/graphics/cairo/FontCairo.cpp:
2368         (WebCore::Font::drawGlyphs):
2369
2370 2008-04-19  David Hyatt  <hyatt@apple.com>
2371
2372         Fix a minor typo in CSSGradientValue's cssText() method.
2373
2374         Reviewed by olliej
2375
2376         * css/CSSGradientValue.cpp:
2377         (WebCore::CSSGradientValue::cssText):
2378
2379 2008-04-19  Brady Eidson  <beidson@apple.com>
2380
2381         Reviewed by Tim Hatcher
2382
2383         Add LocalStorageDatabasePath to the settings for the location of persistent local storage.
2384
2385         * WebCore.base.exp:
2386
2387         * page/Settings.cpp:
2388         (WebCore::Settings::setLocalStorageDatabasePath):
2389         * page/Settings.h:
2390         (WebCore::Settings::localStorageDatabasePath):
2391
2392 2008-04-18 Jan  Michael Alonzo  <jmalonzo@unpluggable.com>
2393
2394         Reviewed by Alp Toker.
2395
2396         http://bugs.webkit.org/show_bug.cgi?id=16620
2397         [GTK] Autotools make dist and make check support
2398
2399         Cleanups.
2400
2401         * GNUmakefile.am:
2402
2403 2008-04-18  Jon Honeycutt  <jhoneycutt@apple.com>
2404
2405         Reviewed by Ollie.
2406
2407         Change when AccessibilityObject children are added.
2408
2409         Children are now added when children() is called if the children vector
2410         is not up to date. This removes the need for addChildren() and
2411         hasChildren() to be called from outside of AccessibilityObject.
2412
2413         * page/AccessibilityObject.cpp:
2414         (WebCore::AccessibilityObject::AccessibilityObject): Initialize
2415         m_haveChildren to false.
2416         (WebCore::AccessibilityObject::clearChildren): Set m_haveChildren to
2417         false.
2418         (WebCore::AccessibilityObject::children): If m_haveChildren is false,
2419         call addChildren().
2420         (WebCore::AccessibilityObject::addChildren): Set m_haveChildren to true.
2421         * page/AccessibilityObject.h: Removed hasChildren(). Made addChildren()
2422         private and const. Added m_haveChildren. Made m_children mutable so
2423         children() could modify it.
2424         * page/mac/AccessibilityObjectWrapper.mm:
2425         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): Don't
2426         call hasChildren() or addChildren().
2427
2428 2008-04-18  Marco Barisione  <marco.barisione@collabora.co.uk>
2429
2430         Reviewed by Alexey.
2431
2432         http://bugs.webkit.org/show_bug.cgi?id=18357
2433         [GTK] Enter on buttons doesn't work
2434
2435         * platform/gtk/KeyEventGtk.cpp:
2436         (WebCore::singleCharacterString): Set the text of a keyboard event for
2437         GDK_ISO_Enter, GDK_KP_Enter, GDK_Return to "\r" instead of an empty
2438         string.
2439
2440 2008-04-18  Marco Barisione  <marco@barisione.org>
2441
2442         Reviewed by Alp Toker.
2443
2444         https://bugs.webkit.org/show_bug.cgi?id=18576
2445         [GTK] windowsKeyCodeForKeyEvent doesn't handle GDK_ISO_Enter and
2446         GDK_KP_Enter
2447
2448         * platform/gtk/KeyEventGtk.cpp:
2449         (WebCore::windowsKeyCodeForKeyEvent): handle GDK_ISO_Enter and
2450         GDK_KP_Enter in windowsKeyCodeForKeyEvent.
2451
2452 2008-04-18  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2453
2454         Reviewed by Mark Rowe.
2455
2456         Gtk build fix.  Profiler.h does not live inside the kjs directory of JavaScriptCore
2457         so it doesn't make sense to include it as kjs/Profiler.h from WebCore.
2458
2459         * ForwardingHeaders/profiler/Profiler.h: Renamed from WebCore/ForwardingHeaders/kjs/Profiler.h.
2460         * page/Console.cpp:
2461
2462 2008-04-18  Antti Koivisto  <antti@apple.com>
2463
2464         Reviewed by Oliver.
2465
2466         Implement path animation for <animateMotion>.
2467         
2468         SVG test suite tests
2469         animate-elem-07-t.svg
2470         animate-elem-08-t.svg
2471         animate-elem-24-t.svg
2472         animate-elem-30-t.svg
2473
2474         * svg/SVGAnimateMotionElement.cpp:
2475         (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement):
2476         (WebCore::SVGAnimateMotionElement::hasValidTarget):
2477         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
2478         (WebCore::SVGAnimateMotionElement::rotateMode):
2479         (WebCore::SVGAnimateMotionElement::animationPath):
2480         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
2481         (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
2482         * svg/SVGAnimateMotionElement.h:
2483         (WebCore::SVGAnimateMotionElement::):
2484         * svg/SVGAnimationElement.cpp:
2485         (WebCore::SVGAnimationElement::animationMode):
2486         (WebCore::SVGAnimationElement::startedActiveInterval):
2487         * svg/SVGAnimationElement.h:
2488         (WebCore::SVGAnimationElement::):
2489         (WebCore::SVGAnimationElement::calculateDistance):
2490         (WebCore::SVGAnimationElement::animationPath):
2491
2492 2008-04-11  Mark Rowe  <mrowe@apple.com>
2493
2494         Rubber-stamped by Antti Koivisto.
2495
2496         Silence GCC 4.3 warnings by removing extraneous consts.
2497
2498         * platform/graphics/Font.h:
2499         * platform/network/ResourceRequestBase.cpp:
2500         * platform/network/ResourceRequestBase.h:
2501
2502 2008-04-18  Brady Eidson  <beidson@apple.com>
2503
2504         Rubberstamped by Mark Rowe
2505
2506         Roll out http://trac.webkit.org/projects/webkit/changeset/32204 as it was an incorrect build fix.
2507         The feature in question was NOT database support.
2508
2509         The proper build fix was later applied by Mark in http://trac.webkit.org/projects/webkit/changeset/32225
2510
2511         * page/PageGroup.cpp:
2512         (WebCore::PageGroup::localStorage):
2513
2514 2008-04-18  Brady Eidson  <beidson@apple.com>
2515
2516         Reviewed by Darin and Sam
2517
2518         Don't forget PageGroups when their last Page goes away, as this hurts visited links and anything
2519         else that will be per-PageGroup in the future (such as LocalStorage).
2520
2521         This also fixes a leak, since PageGroups are ref-counted and therefore clearing the raw pointer out
2522         of the PageGroups map without manual deletion leaked it!
2523
2524         * page/Page.cpp:
2525         (WebCore::Page::setGroupName):
2526
2527 2008-04-18  Dan Bernstein  <mitz@apple.com>
2528
2529         Reviewed by Brady Eidson.
2530
2531         - fix <rdar://problem/5872671> REGRESSION (3.1.1-TOT): Repro crash going to Ortega Park home page
2532
2533         Test: fast/dynamic/5872671.html
2534
2535         * rendering/bidi.cpp:
2536         (WebCore::RenderBlock::layoutInlineChildren): Added a missing null
2537         check.
2538
2539 2008-04-18  Sam Weinig  <sam@webkit.org>
2540
2541         Rubber-stamped by Mark Rowe.
2542
2543         responseText and responseXML don't throw exceptions so they don't need an ExceptionCode parameter.
2544
2545         * bindings/js/JSXMLHttpRequestCustom.cpp:
2546         * xml/XMLHttpRequest.cpp:
2547         (WebCore::XMLHttpRequest::responseText):
2548         (WebCore::XMLHttpRequest::responseXML):
2549         * xml/XMLHttpRequest.h:
2550         * xml/XMLHttpRequest.idl:
2551
2552 2008-04-18  Kevin McCullough  <kmccullough@apple.com>
2553
2554         Reviewed by Sam.
2555
2556         - Build fix.
2557
2558         * page/Console.cpp:
2559         (WebCore::Console::profile):
2560         * page/Console.h:
2561         * page/Console.idl:
2562
2563 2008-04-18  Eric Seidel  <eric@webkit.org>
2564
2565         Reviewed by darin.
2566
2567         Fix probable crasher caused by invalid static_cast
2568         https://bugs.webkit.org/show_bug.cgi?id=18585
2569
2570         * page/Frame.cpp:
2571         (WebCore::Frame::contentRenderer):
2572         (WebCore::Frame::ownerRenderer):
2573         * rendering/RenderObject.h: sort the "is*" functions
2574         (WebCore::RenderObject::isApplet):
2575         (WebCore::RenderObject::isBR):
2576         (WebCore::RenderObject::isBlockFlow):
2577         (WebCore::RenderObject::isCounter):
2578         (WebCore::RenderObject::isFrame):
2579         (WebCore::RenderObject::isFrameSet):
2580         (WebCore::RenderObject::isImage):
2581         (WebCore::RenderObject::isInlineBlockOrInlineTable):
2582         (WebCore::RenderObject::isInlineFlow):
2583         (WebCore::RenderObject::isListBox):
2584         (WebCore::RenderObject::isListItem):
2585         (WebCore::RenderObject::isListMarker):
2586         (WebCore::RenderObject::isMedia):
2587         (WebCore::RenderObject::isMenuList):
2588         (WebCore::RenderObject::isRenderBlock):
2589         (WebCore::RenderObject::isRenderImage):
2590         (WebCore::RenderObject::isRenderInline):
2591         (WebCore::RenderObject::isRenderPart):
2592         (WebCore::RenderObject::isRenderView):
2593         (WebCore::RenderObject::isSlider):
2594         (WebCore::RenderObject::isTable):
2595         (WebCore::RenderObject::isTableCell):
2596         (WebCore::RenderObject::isTableCol):
2597         (WebCore::RenderObject::isTableRow):
2598         (WebCore::RenderObject::isTableSection):
2599         (WebCore::RenderObject::isTextArea):
2600         * rendering/RenderPart.h:
2601
2602 2008-04-17  Eric Seidel  <eric@webkit.org>
2603
2604         Reviewed by beth.
2605
2606         Rename Frame::renderer() to contentRenderer() and fix uses.
2607
2608         * WebCore.base.exp:
2609         * editing/Editor.cpp:
2610         (WebCore::Editor::respondToChangedContents):
2611         * loader/FrameLoader.cpp:
2612         (WebCore::FrameLoader::gotoAnchor):
2613         * page/DragController.cpp:
2614         (WebCore::DragController::canProcessDrag):
2615         (WebCore::DragController::mayStartDragAtEventLocation):
2616         (WebCore::DragController::startDrag):
2617         * page/EventHandler.cpp:
2618         (WebCore::EventHandler::eventMayStartDrag):
2619         (WebCore::EventHandler::updateSelectionForMouseDrag):
2620         (WebCore::EventHandler::hitTestResultAtPoint):
2621         (WebCore::EventHandler::hoverTimerFired):
2622         (WebCore::EventHandler::handleDrag):
2623         * page/Frame.cpp:
2624         (WebCore::Frame::selectionLayoutChanged):
2625         (WebCore::Frame::contentRenderer):
2626         (WebCore::Frame::paint):
2627         (WebCore::Frame::markAllMatchesForText):
2628         (WebCore::Frame::documentAtPoint):
2629         * page/Frame.h:
2630         * page/FrameView.cpp:
2631         (WebCore::FrameView::~FrameView):
2632         (WebCore::FrameView::adjustViewSize):
2633         (WebCore::FrameView::layout):
2634         (WebCore::FrameView::scheduleRelayoutOfSubtree):
2635         (WebCore::FrameView::needsLayout):
2636         (WebCore::FrameView::setNeedsLayout):
2637         (WebCore::FrameView::updateControlTints):
2638         * rendering/RenderTreeAsText.cpp:
2639         (WebCore::write):
2640         * svg/graphics/SVGImage.cpp:
2641         (WebCore::SVGImage::nativeImageForCurrentFrame):
2642
2643 2008-04-18  Antti Koivisto  <antti@apple.com>
2644
2645         Reviewed by Oliver.
2646
2647         https://bugs.webkit.org/show_bug.cgi?id=18551
2648         REGRESSION (r31801?): Crash in ContainerNode::removedFromDocument on many SVG tests
2649         
2650         Fix for test svg/W3C-SVG-1.1/animate-elem-62-t.svg which was still
2651         crashing under guard malloc after the previous fix.
2652         
2653         If the event base element was a parent of the current element, dereffing it during 
2654         removedFromDocument() would cause problems. Avoid this by not holding ref pointer
2655         to the event base but instead checking from the ref count of the event listener whether
2656         it is still alive and in need for unregistering.
2657         
2658         This shold not be a problem for syncbase pointers since those are always animation elements
2659         and leaf nodes.
2660
2661         * svg/animation/SVGSMILElement.cpp:
2662         (WebCore::ConditionEventListener::ConditionEventListener):
2663         (WebCore::ConditionEventListener::unregister):
2664         (WebCore::ConditionEventListener::handleEvent):
2665         (WebCore::SVGSMILElement::connectConditions):
2666         (WebCore::SVGSMILElement::disconnectConditions):
2667         (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
2668         * svg/animation/SVGSMILElement.h:
2669
2670 2008-04-18  Kevin McCullough  <kmccullough@apple.com>
2671
2672         Reviewed by Sam and Adam.
2673
2674         -<rdar://problem/5770054> JavaScript profiler (10928)
2675         - Added support for console.profile() and console.profileEnd().
2676
2677         * ForwardingHeaders/kjs/FunctionCallProfile.h: Added.
2678         * ForwardingHeaders/kjs/Profiler.h: Added.
2679         * page/Console.cpp:
2680         (WebCore::Console::profile):
2681         (WebCore::Console::profileEnd):
2682         * page/Console.h:
2683         * page/Console.idl:
2684
2685 2008-04-18  Kevin Ollivier  <kevino@theolliviers.com>
2686
2687         wx build fix. Add the new loader/appcache files.
2688
2689         * WebCoreSources.bkl:
2690
2691 2008-04-18  Dan Bernstein  <mitz@apple.com>
2692
2693         Reviewed by Darin Adler.
2694
2695         - fix https://bugs.webkit.org/show_bug.cgi?id=17921
2696           Extra white space at the end of right-aligned or justified text with -webkit-line-break: after-white-space
2697
2698         Test: fast/text/trailing-white-space.html
2699
2700         Made trailing white space on the line always behave like it has the base
2701         bidi level of the block, meaning it will always go on the right (left)
2702         of the line in a left-to-right (right-to-left) block. Made the trailing
2703         white space vanish when it is next to a margin that the text should
2704         be touching, and made its width not count when computing the center
2705         point for center alignment.
2706
2707         * platform/text/BidiResolver.h:
2708         (WebCore::::prependRun): Added.
2709         * rendering/RenderBlock.h:
2710         * rendering/bidi.cpp:
2711         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed the
2712         logicallyLastRun parameter to an optional trailingSpaceRun and changed
2713         the alignment logic to implement the above rules.
2714         (WebCore::RenderBlock::layoutInlineChildren): Added code to identify
2715         when there is trailing white space that needs to be split into its own
2716         run and optionally re-ordered.
2717         (WebCore::RenderBlock::findNextLineBreak): Removed code that split some
2718         trailing space into a separate run in one special case.
2719
2720 2008-04-10  Mark Rowe  <mrowe@apple.com>
2721
2722         Rubber-stamped by Brady Eidson.
2723
2724         Fix builds that do not have DOM storage enabled.
2725
2726         * page/DOMWindow.cpp:
2727         * page/Page.cpp:
2728         * page/PageGroup.cpp:
2729         * page/PageGroup.h:
2730
2731 2008-04-18  Timothy Hatcher  <timothy@apple.com>
2732
2733         Fixes the regression where style rules in the Inspector always show "inline stylesheet"
2734         for the source of the rule and not the URL or other sources.
2735
2736         https://bugs.webkit.org/show_bug.cgi?id=18592
2737
2738         Reviewed by Dan Bernstein.
2739
2740         * page/inspector/StylesSidebarPane.js:
2741         (WebInspector.StylesSidebarPane.prototype.update): Add parentStyleSheet to the anonymous obejct
2742         that we make for each matched rule. The parentStyleSheet property is used later to make the subtitle.
2743
2744 2008-04-18  Dean Jackson <dino@apple.com>
2745
2746         Fixed marquee suspension on wrong document. Passes current
2747         document into Frame::clearTimers.
2748
2749         Reviewed by hyatt.
2750
2751         * history/CachedPage.cpp:
2752         (WebCore::CachedPage::clear):
2753         * page/Frame.cpp:
2754         (WebCore::Frame::clearTimers):
2755         * page/Frame.h:
2756
2757 2008-04-18  Dean Jackson <dino@apple.com>
2758
2759         Add 'ease' timing function to transitions and
2760         make it the default. See latest specification proposal at:
2761         http://webkit.org/specs/CSSVisualEffects/CSSTransitions.html
2762
2763         Reviewed by hyatt.
2764
2765         NOTE: still working on a way to test animating/transitioning content
2766
2767         * css/CSSParser.cpp:
2768         (WebCore::CSSParser::parseTransitionTimingFunction):
2769         * css/CSSStyleSelector.cpp:
2770         (WebCore::CSSStyleSelector::mapTransitionTimingFunction):
2771         * css/CSSValueKeywords.in:
2772
2773 2008-04-18  Adam Roben  <aroben@apple.com>
2774
2775         Change JavaScriptDebugListener to use KJS::UString instead of
2776         WebCore::String
2777
2778         This should reduce the number of string allocations performed while
2779         debugging.
2780
2781         Reviewed by Tim Hatcher.
2782
2783         * page/InspectorController.cpp: Updated JavaScriptDebugListener
2784         functions.
2785         * page/InspectorController.h: Ditto.
2786         * page/JavaScriptDebugListener.h: Changed to use KJS::UString instead
2787         of WebCore::String.
2788         * page/JavaScriptDebugServer.cpp: Ditto.
2789         * platform/win/BString.cpp:
2790         (WebCore::BString::BString): Added a constructor that takes a
2791         KJS::UString.
2792         * platform/win/BString.h:
2793
2794 2008-04-18  Adam Roben  <aroben@apple.com>
2795
2796         Mac build fix
2797
2798         * WebCore.xcodeproj/project.pbxproj: Mark JavaScriptDebugListener.h
2799         private.
2800
2801 2008-04-18  Adam Roben  <aroben@apple.com>
2802
2803         Make InspectorController a JavaScriptDebugListener
2804
2805         I added two new functions to the InspectorController JS object:
2806         reloadInspectedPageAndStartDebugging and stopDebugging. These control
2807         when the InspectorController adds/removes itself to/from the
2808         JavaScriptDebugServer.
2809
2810         Reviewed by Tim Hatcher.
2811
2812         * page/InspectorController.cpp:
2813         (WebCore::reloadInspectedPageAndStartDebugging): Added. Just calls
2814         through to InspectorController.
2815         (WebCore::stopDebugging): Ditto.
2816         (WebCore::InspectorController::~InspectorController): Make sure we
2817         stop debugging before we are destroyed so the JavaScriptDebugServer
2818         won't be left with a stale pointer.
2819         (WebCore::InspectorController::windowScriptObjectAvailable): Added two
2820         new functions to our JS object.
2821         (WebCore::InspectorController::closeWindow): Stop debugging when the
2822         window closes.
2823         (WebCore::InspectorController::reloadInspectedPageAndStartDebugging):
2824         Added.
2825         (WebCore::InspectorController::stopDebugging): Added.
2826
2827         (WebCore::InspectorController::didParseSource):
2828         (WebCore::InspectorController::failedToParseSource):
2829         (WebCore::InspectorController::didEnterCallFrame):
2830         (WebCore::InspectorController::willExecuteStatement):
2831         (WebCore::InspectorController::willLeaveCallFrame):
2832         Added empty implementations of the JavaScriptDebugListener functions.
2833
2834         * page/InspectorController.h:
2835
2836 2008-04-17  Adam Roben  <aroben@apple.com>
2837
2838         Rename ExecState* instances from state to exec
2839
2840         Requested by Darin Adler and Sam Weinig.
2841
2842         * bindings/js/JSConsoleCustom.cpp:
2843
2844 2008-04-17  Adam Roben  <aroben@apple.com>
2845
2846         Clean up InspectorController's use of JSStringRef
2847
2848         All JSStringRef creation now happens through a helper function,
2849         jsStringRef, which takes either a const char* or a const String& and
2850         returns a JSRetainPtr<JSStringRef>.
2851
2852         Reviewed by Mitz Pettel.
2853
2854         * page/InspectorController.cpp:
2855         Added jsStringRef and converted all callers to
2856         JSStringCreateWithUTF8CString or JSStringCreateWithCharacters to use
2857         it.
2858
2859 2008-04-17  Adam Roben  <aroben@apple.com>
2860
2861         Add wrappers around InspectorClient::{show,close}Window
2862
2863         This will let us perform actions when the window is actually
2864         showing/closing (InspectorController::show doesn't always directly
2865         show the window).
2866
2867         Reviewed by Tim Hatcher.
2868
2869         * page/InspectorController.cpp:
2870         (WebCore::InspectorController::scriptObjectReady): Call showWindow()
2871         instead of m_client->showWindow().
2872         (WebCore::InspectorController::show): Ditto.
2873         (WebCore::InspectorController::close): Ditto for closeWindow().
2874         (WebCore::InspectorController::showWindow):
2875         (WebCore::InspectorController::closeWindow):
2876         * page/InspectorController.h:
2877
2878 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
2879
2880         Reviewed by Holger.
2881
2882         Adapt to the API changes in WebKit/qt/
2883
2884         * platform/graphics/qt/ImageQt.cpp:
2885         (loadResourcePixmap):
2886
2887 2008-04-18  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2888
2889         Reviewed by Adam Roben.
2890
2891         https://bugs.webkit.org/show_bug.cgi?id=18477
2892
2893         No resize indication is shown when moving/hovering over the frame
2894         border/splitter.
2895
2896         * page/EventHandler.cpp:
2897         (WebCore::EventHandler::selectCursor):
2898
2899 2008-04-18  Adam Roben  <aroben@apple.com>
2900
2901         Windows build fix
2902
2903         Same as before, but for fabs/fabsf.
2904
2905         * svg/SVGAnimateTransformElement.cpp:
2906         (WebCore::SVGAnimateTransformElement::calculateDistance): Changed to
2907         use fabsf and removed narrowPrecisionToFloat.
2908
2909 2008-04-18  Adam Roben  <aroben@apple.com>
2910
2911         Windows build fix
2912
2913         In MSVC, sqrt() has three overloads: float, double, and long
2914         double. In GCC, sqrt() is only for doubles. Both MSVC and GCC have
2915         sqrtf() to operate explicitly on floats.
2916
2917         * svg/SVGAnimateMotionElement.cpp:
2918         (WebCore::SVGAnimateMotionElement::calculateDistance): Changed to use
2919         sqrtf and removed narrowPrecisionToFloat.
2920         * svg/SVGAnimateTransformElement.cpp:
2921         (WebCore::SVGAnimateTransformElement::calculateDistance): Ditto.
2922
2923 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
2924
2925         Fix the build without Database support (fixes the Qt/win build).
2926
2927         * page/PageGroup.cpp:
2928         (WebCore::PageGroup::localStorage):
2929
2930 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
2931
2932         Fix the Gtk build on the build bot.
2933
2934         * GNUmakefile.am: Back out the previous LocalStorage, etc. additions
2935         as they're already listed in another sources group that wasn't used
2936         due to a local configure error.
2937
2938 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
2939
2940         Prospective wx build fix.
2941
2942         * webcore-base.bkl: Add loader/appcache to include paths.
2943
2944 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
2945
2946         Build fix. Back out previous #include fix for PageGroup.h as it broke
2947         the Mac build due to forwarding headers.
2948
2949         * page/PageGroup.h:
2950
2951 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
2952
2953         Build fix for Qt and gcc 4.3.
2954
2955         * WebCore.pro: Added missing files and include paths, re-ordered
2956         the storage/ include path to avoid conflict of storage/LocalStorage.h
2957         with kjs/LocalStorage.h
2958         * page/PageGroup.h: Include LocalStorage.h instead of forward
2959         declaration to fix compilation with gcc 4.3.
2960
2961 2008-04-18  Simon Hausmann  <hausmann@webkit.org>
2962
2963         Build fix for Gtk and gcc 4.3.
2964
2965         * GNUmakefile.am: Added missing files and include paths.
2966         * storage/LocalStorage.h: Include LocalStorageArea.h instead of
2967         forward declaring it due to the HashMap use where gcc 4.3 needs to
2968         see the class.
2969
2970 2008-04-17  Antti Koivisto  <antti@apple.com>
2971
2972         Reviewed by Oliver.
2973         
2974         https://bugs.webkit.org/show_bug.cgi?id=18573
2975
2976         Implement supplemental transforms and use them for <animateMotion> instead of the transform list.
2977         This will allow <animateTransform> and <animateMotion> combine properly.
2978
2979         * svg/SVGAnimateMotionElement.cpp:
2980         (WebCore::SVGAnimateMotionElement::resetToBaseValue):
2981         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
2982         (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
2983         * svg/SVGElement.h:
2984         (WebCore::SVGElement::supplementalTransform):
2985         * svg/SVGStyledTransformableElement.cpp:
2986         (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
2987         * svg/SVGStyledTransformableElement.h:
2988         (WebCore::SVGStyledTransformableElement::supplementalTransform):
2989         * svg/SVGTextElement.cpp:
2990         (WebCore::SVGTextElement::animatedLocalTransform):
2991         * svg/SVGTextElement.h:
2992         (WebCore::SVGTextElement::supplementalTransform):
2993
2994 2008-04-17  Antti Koivisto  <antti@apple.com>
2995
2996         Reviewed by Oliver.
2997
2998         Implement calcMode=paced.
2999         
3000         Tested by SVG testsuite tests
3001         animate-elem-11-t.svg
3002         animate-elem-15-t.svg
3003         animate-elem-82-t.svg
3004
3005         * svg/SVGAnimateElement.cpp:
3006         (WebCore::SVGAnimateElement::calculateDistance):
3007         * svg/SVGAnimateElement.h:
3008         * svg/SVGAnimateMotionElement.cpp:
3009         (WebCore::SVGAnimateMotionElement::calculateDistance):
3010         * svg/SVGAnimateMotionElement.h:
3011         * svg/SVGAnimateTransformElement.cpp:
3012         (WebCore::SVGAnimateTransformElement::calculateDistance):
3013         * svg/SVGAnimateTransformElement.h:
3014         * svg/SVGAnimationElement.cpp:
3015         (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
3016         (WebCore::SVGAnimationElement::startedActiveInterval):
3017         * svg/SVGAnimationElement.h:
3018         (WebCore::SVGAnimationElement::calculateDistance):
3019
3020 2008-04-17  David Hyatt  <hyatt@apple.com>
3021
3022         Fix a leak in ImageBuffer's clearImage method.
3023
3024         Reviewed by olliej
3025
3026         * platform/graphics/ImageBuffer.h:
3027         (WebCore::ImageBuffer::clearImage):
3028
3029 2008-04-17  Antti Koivisto  <antti@apple.com>
3030
3031         Reviewed by Eric.
3032         
3033         https://bugs.webkit.org/show_bug.cgi?id=12438
3034
3035         More SVG animation:
3036         
3037         - Make multiple additive animations work
3038         - Support animating <use> instance trees
3039
3040         * svg/SVGAnimateColorElement.cpp:
3041         (WebCore::SVGAnimateColorElement::SVGAnimateColorElement):
3042         * svg/SVGAnimateColorElement.h:
3043         
3044         Made this AnimateElement subclass. All functionality is now provided by AnimateElement.
3045         
3046         * svg/SVGAnimateElement.cpp:
3047         (WebCore::SVGAnimateElement::determinePropertyType):
3048         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3049         (WebCore::SVGAnimateElement::calculateFromAndToValues):
3050         (WebCore::SVGAnimateElement::calculateFromAndByValues):
3051         (WebCore::SVGAnimateElement::resetToBaseValue):
3052         (WebCore::SVGAnimateElement::applyResultsToTarget):
3053         * svg/SVGAnimateElement.h:
3054         * svg/SVGAnimateMotionElement.cpp:
3055         (WebCore::SVGAnimateMotionElement::resetToBaseValue):
3056         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
3057         (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
3058         * svg/SVGAnimateMotionElement.h:
3059         * svg/SVGAnimateTransformElement.cpp:
3060         (WebCore::SVGAnimateTransformElement::resetToBaseValue):
3061         (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
3062         (WebCore::SVGAnimateTransformElement::calculateFromAndByValues):
3063         (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
3064         * svg/SVGAnimateTransformElement.h:
3065         
3066         Switch to new model where
3067         - resetToBaseValue() resets the animated value back to the base value
3068         - calculateAnimatedValue() computes the value and adds it to the element used for accumulation
3069         - applyResultsToTarget() sets the computed value the target element
3070         
3071         * svg/SVGAnimationElement.cpp:
3072         (WebCore::SVGAnimationElement::fromValue):
3073         (WebCore::SVGAnimationElement::attributeIsCSS):
3074         (WebCore::SVGAnimationElement::targetAttributeIsCSS):
3075         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
3076         
3077         Update instances too.
3078         
3079         (WebCore::SVGAnimationElement::startedActiveInterval):
3080         (WebCore::SVGAnimationElement::updateAnimation):
3081         (WebCore::SVGAnimationElement::endedActiveInterval):
3082         * svg/SVGAnimationElement.h:
3083         * svg/SVGSVGElement.cpp:
3084         (WebCore::SVGSVGElement::SVGSVGElement):
3085         * svg/SVGSetElement.cpp:
3086         (WebCore::SVGSetElement::SVGSetElement):
3087         * svg/SVGSetElement.h:
3088         
3089         Made this AnimateElement subclass. All functionality is now provided by AnimateElement.
3090         
3091         * svg/animation/SMILTimeContainer.cpp:
3092         (WebCore::SMILTimeContainer::SMILTimeContainer):
3093         (WebCore::SMILTimeContainer::unschedule):
3094         (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
3095         (WebCore::PriorityCompare::PriorityCompare):
3096         (WebCore::PriorityCompare::operator()):
3097         (WebCore::SMILTimeContainer::sortByPriority):
3098         (WebCore::applyOrderSortFunction):
3099         (WebCore::sortByApplyOrder):
3100         (WebCore::SMILTimeContainer::baseValueFor):
3101         (WebCore::SMILTimeContainer::updateAnimations):
3102         * svg/animation/SMILTimeContainer.h:
3103         (WebCore::SMILTimeContainer::create):
3104         (WebCore::SMILTimeContainer::setDocumentOrderIndexesDirty):
3105         
3106         Do additive animation with the following steps
3107         - sort active animations based on their priority (begin time, document order).
3108         - if not yet saved for each (element, attribute) pair save the base value.
3109         - lowest priority animation for each (element, attribute) acts as the result element.
3110         - animation results are resolved in priority order and results are accumulated to the result element.
3111         - after all active animations have been processed the values in result elements are applied to the target elements.
3112         
3113         * svg/animation/SVGSMILElement.cpp:
3114         (WebCore::SVGSMILElement::SVGSMILElement):
3115         (WebCore::SVGSMILElement::insertedIntoDocument):
3116         
3117         Invalidate document order index.
3118         
3119         (WebCore::SVGSMILElement::attributeName):
3120         (WebCore::SVGSMILElement::isInactive):
3121         (WebCore::SVGSMILElement::isFrozen):
3122         (WebCore::SVGSMILElement::beginListChanged):
3123         (WebCore::SVGSMILElement::determineActiveState):
3124         (WebCore::SVGSMILElement::isContributing):
3125         (WebCore::SVGSMILElement::progress):
3126         
3127         Take care that animations in frozen state still contribute to the total. Since we now build the result starting
3128         from the base value, fill="replace" works magically simply by not contributing anything.
3129         
3130         * svg/animation/SVGSMILElement.h:
3131         (WebCore::SVGSMILElement::previousIntervalBegin):
3132         (WebCore::SVGSMILElement::documentOrderIndex):
3133         (WebCore::SVGSMILElement::setDocumentOrderIndex):
3134
3135 2008-04-17  Jon Honeycutt  <jhoneycutt@apple.com>
3136
3137         Reviewed by Darin, Alice.
3138
3139         Implement AXObjectCache::detachWrapper() on Windows.
3140
3141         * page/win/AXObjectCacheWin.cpp:
3142         (WebCore::AXObjectCache::detachWrapper): If this object has a wrapper,
3143         call its detach() method.
3144
3145 2008-04-17  Jon Honeycutt  <jhoneycutt@apple.com>
3146
3147         Reviewed by mrowe.
3148
3149         Define HAVE_ACCESSIBILITY in a way that WebKit and WebCore can see it.
3150
3151         * config.h: Remove HAVE_ACCESSIBILITY.
3152         * page/AccessibilityObject.h: Include wtf/Platform.h to pick up
3153         HAVE_ACCESSIBILITY.
3154
3155 2008-04-17  Jon Honeycutt  <jhoneycutt@apple.com>
3156
3157         Reviewed by aliu.
3158
3159         * page/AccessibilityObject.cpp:
3160         (WebCore::AccessibilityObject::layoutCount): Check isRenderView() before
3161         casting to RenderView.
3162
3163 2008-04-17  Antti Koivisto  <antti@apple.com>
3164
3165         Reviewed by Oliver.
3166         
3167         Fix https://bugs.webkit.org/show_bug.cgi?id=18551
3168         Bug 18551: REGRESSION (r31801?): Crash in ContainerNode::removedFromDocument on many SVG tests under guard malloc
3169         
3170         Freeing a RefPtr that is the last ref to the parent from removedFromDocument() is a bad idea.
3171
3172         Caching the target element is too dangerous, let's simply not do it. Getting it is very cheap anyway.
3173
3174         * svg/animation/SVGSMILElement.cpp:
3175         (WebCore::SVGSMILElement::removedFromDocument):
3176         (WebCore::SVGSMILElement::attributeChanged):
3177         (WebCore::SVGSMILElement::targetElement):
3178         * svg/animation/SVGSMILElement.h:
3179
3180 2008-04-17  Sam Weinig  <sam@webkit.org>
3181
3182         Reviewed by Anders Carlsson.
3183
3184         Autogenerate the XMLHttpRequest javascript binding.
3185
3186         * GNUmakefile.am:
3187         * WebCore.pro:
3188         * WebCore.vcproj/WebCore.vcproj:
3189         * WebCoreSources.bkl:
3190         * DerivedSources.make:
3191         * WebCore.xcodeproj/project.pbxproj:
3192         * bindings/js/JSDOMWindowBase.cpp:
3193         * bindings/js/JSXMLHttpRequest.cpp: Removed.
3194         * bindings/js/JSXMLHttpRequest.h: Removed.
3195         * bindings/js/JSXMLHttpRequestConstructor.cpp: Added.
3196         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
3197         (WebCore::JSXMLHttpRequestConstructor::implementsConstruct):
3198         (WebCore::JSXMLHttpRequestConstructor::construct):
3199         * bindings/js/JSXMLHttpRequestConstructor.h: Added.
3200         (WebCore::JSXMLHttpRequestConstructor::classInfo):
3201         * bindings/js/JSXMLHttpRequestCustom.cpp: Added.
3202         (WebCore::JSXMLHttpRequest::mark):
3203         (WebCore::JSXMLHttpRequest::onreadystatechange):
3204         (WebCore::JSXMLHttpRequest::setOnreadystatechange):
3205         (WebCore::JSXMLHttpRequest::onload):
3206         (WebCore::JSXMLHttpRequest::setOnload):
3207         (WebCore::JSXMLHttpRequest::responseXML):
3208         (WebCore::JSXMLHttpRequest::open):
3209         (WebCore::JSXMLHttpRequest::setRequestHeader):
3210         (WebCore::JSXMLHttpRequest::send):
3211         (WebCore::JSXMLHttpRequest::getResponseHeader):
3212         (WebCore::JSXMLHttpRequest::overrideMimeType):
3213         (WebCore::JSXMLHttpRequest::addEventListener):
3214         (WebCore::JSXMLHttpRequest::removeEventListener):
3215         (WebCore::JSXMLHttpRequest::dispatchEvent):
3216         * xml/XMLHttpRequest.cpp:
3217         (WebCore::XMLHttpRequest::readyState):
3218         (WebCore::XMLHttpRequest::responseText):
3219         * xml/XMLHttpRequest.h:
3220         * xml/XMLHttpRequest.idl: Added.
3221
3222 2008-04-17  Brady Eidson  <beidson@apple.com>
3223
3224         Reviewed by Anders
3225
3226         The SessionStorage for a Page has to be copied every time a new Page is created.
3227
3228         I thought I had the right choke point for creating new Pages at FrameLoader::createWindow(),
3229         but it just so happens there was another - in the ContextMenuController.
3230
3231         The *real* choke point for this, then, is in the Chrome itself.
3232
3233         * loader/FrameLoader.cpp:
3234         (WebCore::FrameLoader::createWindow): Don't do the SessionStorage copy here...
3235
3236         * page/Chrome.cpp:
3237         (WebCore::Chrome::createWindow): Do it here, instead!
3238
3239 2008-04-17  Alice Liu  <alice.liu@apple.com>
3240
3241         Reviewed by Jon Honeycutt.
3242
3243         Added some asserts to catch undesirable usage of setWrapper and addChildren.
3244         * page/AccessibilityObject.cpp:
3245         (WebCore::AccessibilityObject::addChildren):
3246         * page/AccessibilityObject.h:
3247         (WebCore::AccessibilityObject::setWrapper):
3248
3249 2008-04-17  Brady Eidson  <beidson@apple.com>
3250
3251         Reviewed by the Mitzpettel
3252
3253         Before things get much more intertwined, move away from a global LocalStorage model
3254         to a per-PageGroup LocalStorage model.
3255
3256         * page/DOMWindow.cpp:
3257         (WebCore::DOMWindow::localStorage): Get it from the current PageGroup, not the global
3258           LocalStorage (which doesn't exist anymore).
3259
3260         * page/Page.cpp:
3261         * page/PageGroup.cpp:
3262         (WebCore::PageGroup::localStorage): Create a LocalStorage object on demand.
3263         * page/PageGroup.h:
3264
3265         * storage/LocalStorage.cpp:
3266         (WebCore::LocalStorage::LocalStorage): Hold a back pointer to the owning PageGroup.
3267         (WebCore::LocalStorage::storageArea):
3268         * storage/LocalStorage.h:
3269         (WebCore::LocalStorage::create):
3270
3271         * storage/LocalStorageArea.cpp:
3272         (WebCore::LocalStorageArea::LocalStorageArea): Hold a back pointer to the owning LocalStorage.
3273         * storage/LocalStorageArea.h:
3274         (WebCore::LocalStorageArea::create):
3275
3276 2008-04-17  Anders Carlsson  <andersca@apple.com>
3277
3278         Fix indentation.
3279         
3280         * loader/DocumentLoader.cpp:
3281         (WebCore::DocumentLoader::scheduleArchiveLoad):
3282
3283 2008-04-17  Anders Carlsson  <andersca@apple.com>
3284
3285         Reviewed by Brady.
3286
3287         When in the web archive debug mode, don't call didFail immediately. Instead,
3288         add the loader to the substitute resource map, but with a null resource, which
3289         indicates to substituteResourceDeliveryTimerFired that the load should fail.
3290         
3291         * loader/DocumentLoader.cpp:
3292         (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
3293         (WebCore::DocumentLoader::scheduleArchiveLoad):
3294         * loader/ResourceLoader.cpp:
3295         (WebCore::ResourceLoader::load):
3296
3297 2008-04-17  Anders Carlsson  <andersca@apple.com>
3298
3299         Reviewed by Sam.
3300
3301         Add JS bindings for the DOMApplicationCache object.
3302         
3303         * bindings/js/JSDOMApplicationCacheCustom.cpp:
3304         (WebCore::JSDOMApplicationCache::add):
3305         (WebCore::JSDOMApplicationCache::remove):
3306         (WebCore::JSDOMApplicationCache::addEventListener):
3307         (WebCore::JSDOMApplicationCache::removeEventListener):
3308         (WebCore::JSDOMApplicationCache::dispatchEvent):
3309         (WebCore::JSDOMApplicationCache::setOnchecking):
3310         (WebCore::JSDOMApplicationCache::onchecking):
3311         (WebCore::JSDOMApplicationCache::setOnerror):
3312         (WebCore::JSDOMApplicationCache::onerror):
3313         (WebCore::JSDOMApplicationCache::setOnnoupdate):
3314         (WebCore::JSDOMApplicationCache::onnoupdate):
3315         (WebCore::JSDOMApplicationCache::setOndownloading):
3316         (WebCore::JSDOMApplicationCache::ondownloading):
3317         (WebCore::JSDOMApplicationCache::setOnprogress):
3318         (WebCore::JSDOMApplicationCache::onprogress):
3319         (WebCore::JSDOMApplicationCache::setOnupdateready):
3320         (WebCore::JSDOMApplicationCache::onupdateready):
3321         (WebCore::JSDOMApplicationCache::setOncached):
3322         (WebCore::JSDOMApplicationCache::oncached):
3323         (WebCore::JSDOMApplicationCache::mark):
3324         * bindings/js/JSDOMWindowCustom.cpp:
3325         (WebCore::JSDOMWindow::mark):
3326         * bindings/js/JSEventTargetBase.cpp:
3327         (WebCore::toJS):
3328         * loader/appcache/DOMApplicationCache.idl:
3329         * page/DOMWindow.idl:
3330
3331 2008-04-17 Eric Carlson  <eric.carlson@apple.com> 
3332
3333         Reviewed by Adele. 
3334
3335         Fix for <rdar://problem/5861642> QTMovieWin returns uninitialized values
3336
3337         * platform/graphics/win/QTMovieWin.cpp:
3338         (QTMovieWin::rate):
3339         (QTMovieWin::setRate):
3340         (QTMovieWin::setVolume):
3341         (QTMovieWin::getNaturalSize):
3342
3343 2008-04-17  Marco Barisione  <marco.barisione@collabora.co.uk>
3344
3345         Reviewed by Alp Toker.
3346
3347         http://bugs.webkit.org/show_bug.cgi?id=18335
3348         Pango font backend unable to display japanese properly
3349
3350         Different fonts can have different glyph indices, so we need to pass
3351         the right font when retrieving a glyph index.
3352
3353         * platform/graphics/gtk/GlyphPageTreeNodePango.cpp:
3354         (WebCore::pango_font_get_glyph): Temporarily override the font in the
3355         PangoAnalysis passed to pango_shape.
3356
3357 2008-04-17  Anders Carlsson  <andersca@apple.com>
3358
3359         According to Sam and David, it's "topLevel", not "toplevel".
3360         
3361         * loader/DocumentLoader.cpp:
3362         (WebCore::DocumentLoader::topLevelApplicationCache):
3363         * loader/DocumentLoader.h:
3364         * loader/appcache/DOMApplicationCache.cpp:
3365         (WebCore::DOMApplicationCache::associatedCache):
3366
3367 2008-04-17  Anders Carlsson  <andersca@apple.com>
3368
3369         Reviewed by Sam.
3370
3371         Add DOMApplicationCache implementation.
3372         
3373         * dom/EventNames.h:
3374         Add new event names.
3375         
3376         * dom/EventTarget.cpp:
3377         (WebCore::EventTarget::toDOMApplicationCache):
3378         * dom/EventTarget.h:
3379         Add EventTarget conversion method.
3380         
3381         * loader/appcache/ApplicationCacheGroup.h:
3382         (WebCore::ApplicationCacheGroup::):
3383         (WebCore::ApplicationCacheGroup::status):
3384         (WebCore::ApplicationCacheGroup::update):
3385         (WebCore::ApplicationCacheGroup::newestCache):
3386         Add more stubs.
3387         
3388         * loader/appcache/DOMApplicationCache.cpp:
3389         * loader/appcache/DOMApplicationCache.h:
3390
3391         * page/DOMWindow.cpp:
3392         (WebCore::DOMWindow::clear):
3393         (WebCore::DOMWindow::applicationCache):
3394         * page/DOMWindow.h:
3395         (WebCore::DOMWindow::optionalApplicationCache):
3396         Add ApplicationCache member.
3397         
3398 2008-04-17  Anders Carlsson  <andersca@apple.com>
3399
3400         Build fix.
3401
3402         * WebCore.vcproj/WebCore.vcproj:
3403
3404 2008-04-17  Dean Jackson  <dino@apple.com>
3405
3406         Reviewed by Hyatt.
3407
3408         Fix for <rdar://problem/5849968> translate method should have Y=0 when only X is present
3409
3410         Test: fast/css/transform-default-parameter.html
3411
3412         * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty):
3413         translate function with only X parameter now leaves the Y parameter as zero.
3414
3415 2008-04-17  Anders Carlsson  <andersca@apple.com>
3416
3417         Reviewed by Sam.
3418         
3419         Add plumbing for associating document loaders with application caches.
3420         
3421         * loader/DocumentLoader.cpp:
3422         (WebCore::DocumentLoader::DocumentLoader):
3423         (WebCore::DocumentLoader::~DocumentLoader):
3424         (WebCore::DocumentLoader::originalURL):
3425         (WebCore::DocumentLoader::requestURL):
3426         (WebCore::DocumentLoader::responseURL):
3427         (WebCore::DocumentLoader::responseMIMEType):
3428         (WebCore::DocumentLoader::setCandidateApplicationCacheGroup):
3429         (WebCore::DocumentLoader::setApplicationCache):
3430         (WebCore::DocumentLoader::toplevelApplicationCache):
3431         * loader/DocumentLoader.h:
3432         (WebCore::DocumentLoader::candidateApplicationCacheGroup):
3433         (WebCore::DocumentLoader::applicationCache):
3434         * loader/appcache/ApplicationCacheGroup.h:
3435         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
3436
3437 2008-04-17  Adam Roben  <aroben@apple.com>
3438
3439         Fix Bug 18544: REGRESSION (r31951): Two fast/xsl tests crash
3440
3441         <https://bugs.webkit.org/show_bug.cgi?id=18544>
3442
3443         r31951 changed XSLTProcessor::parseErrorFunc to expect a Console* as
3444         the context parameter. The caller in XSLTProcessor was changed, but
3445         the one in XSLStyleSheet was missed.
3446
3447         Reviewed by Alexey Proskuryakov.
3448
3449         * xml/XSLStyleSheet.cpp:
3450         (WebCore::XSLStyleSheet::parseString): Pass the Console as the context
3451         to parseErrorFunc.
3452
3453 2008-04-17  Adam Roben  <aroben@apple.com>
3454
3455         Windows build fix after r31981
3456
3457         * dom/Document.idl: Omit getCSSCanvasContext from the COM bindings.
3458
3459 2008-04-17  Ariya Hidayat  <ariya.hidayat@trolltech.com>
3460
3461         Reviewed by Simon.
3462
3463         Implemented getFileModificationTime and pathGetFileName for the Qt port.
3464
3465         * platform/qt/FileSystemQt.cpp:
3466         (WebCore::getFileModificationTime):
3467
3468 2008-04-17  Mark Rowe  <mrowe@apple.com>
3469
3470         Fix the non-Mac builds that I broke with my Mac build fix.
3471
3472         * css/CSSMutableStyleDeclaration.cpp:
3473         (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue): Explicitly use the size_t version of max
3474         to avoid making assumptions about sizeof(size_t).
3475
3476 2008-04-17  Mark Rowe  <mrowe@apple.com>
3477
3478         Rubber-stamped by Dan Bernstein.
3479
3480         Fix the Mac build.
3481
3482         * css/CSSMutableStyleDeclaration.cpp:
3483         (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue): Update to use size_t in place of unsigned.
3484         * dom/NamedNodeMap.h: Ditto.
3485         * page/AccessibilityObject.h: Forward-declare AccessibilityObjectWrapper in the non-Objective-C case too.
3486
3487 2008-04-16  Jon Honeycutt  <jhoneycutt@apple.com>
3488
3489         Reviewed by Darin.
3490
3491         Use size_t instead of unsigned where appropriate.
3492
3493         * css/CSSValueList.h:
3494         * dom/NamedAttrMap.h:
3495         * rendering/RenderStyle.h:
3496
3497 2008-04-15  Jon Honeycutt  <jhoneycutt@apple.com>
3498
3499         Reviewed by Darin.
3500
3501         Add some methods to check AccessibilityObject state.
3502
3503         * page/AccessibilityObject.cpp:
3504         (WebCore::AccessibilityObject::AccessibilityObject): Assert that the
3505         passed renderer is not null.
3506         (WebCore::AccessibilityObject::isPasswordField): Refactored to use early
3507         return.
3508         (WebCore::AccessibilityObject::isPressed): Return true if this is a
3509         button in the pressed state.
3510         (WebCore::AccessibilityObject::isIndeterminate): Return true if this is
3511         a tri-state checkbox in the indeterminate state.
3512         (WebCore::AccessibilityObject::isChecked): True if this is a radio
3513         button or checkbox in the checked state.
3514         (WebCore::AccessibilityObject::isHovered): True if object is currently
3515         under the mouse cursor.
3516         (WebCore::AccessibilityObject::isMultiSelect): True if this is a select
3517         element capable of multi-select.
3518         (WebCore::AccessibilityObject::isReadOnly): False if this object has
3519         editable content.
3520         (WebCore::AccessibilityObject::isOffScreen): True if this object is not
3521         in the visible portion of the view.
3522         * page/AccessibilityObject.h: Grouped methods into is-state and is-kind.
3523
3524 2008-04-15  Jon Honeycutt  <jhoneycutt@apple.com>
3525
3526         Reviewed by Darin.
3527
3528         Add AccessibilityObjectWrapper to Windows.
3529
3530         * WebCore.vcproj/WebCore.vcproj: Add AccessibilityObjectWrapperWin.h
3531         * page/AccessibilityObject.h: Include COMPtr.h,
3532         AccessibilityObjectWrapperWin.h on Windows. Define wrapper() and
3533         setWrapper() if accessibility is present. Add an m_wrapper on Windows.
3534         * page/AccessibilityObject.cpp:
3535         (WebCore::AccessibilityObject::detach): Clear m_wrapper if
3536         accessibility is present.
3537         * page/win/AccessibilityObjectWrapperWin.h: Added; defines a wrapper for
3538         AccessibilityObjects on Windows.
3539         (WebCore::AccessibilityObjectWrapper::attached): Return true if attached
3540         to an object.
3541         (WebCore::AccessibilityObjectWrapper::accessibilityObject): Return the
3542         wrapped object.
3543         (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper):
3544
3545 2008-04-15  Jon Honeycutt  <jhoneycutt@apple.com>
3546
3547         Reviewed by Darin.
3548
3549         Add AXObjectCache to Windows.
3550
3551         * WebCore.vcproj/WebCore.vcproj: Add AXObjectCacheWin.cpp.
3552         * page/AXObjectCache.h: Add handleFocusedUIElementChanged definition to
3553         non-Mac platforms, and added stub for it. Replace PLATFORM(MAC)
3554         conditional with HAVE(ACCESSIBILITY) for stubs.
3555         (WebCore::AXObjectCache::enableAccessibility):
3556         (WebCore::AXObjectCache::accessibilityEnabled):
3557         * page/win/AXObjectCacheWin.cpp: Added; contains stubs for the methods
3558         below.
3559         (WebCore::AXObjectCache::detachWrapper):
3560         (WebCore::AXObjectCache::attachWrapper):
3561         (WebCore::AXObjectCache::postNotification):
3562         (WebCore::AXObjectCache::postNotificationToElement):
3563         * config.h: Define HAVE_ACCESSIBILITY on Mac and Windows.
3564
3565 2008-04-15  Jon Honeycutt  <jhoneycutt@apple.com>
3566
3567         Reviewed by Darin.
3568
3569         * WebCore.vcproj/WebCore.vcproj: Fix path to AXObjectCache.h.
3570
3571 2008-04-16  Brady Eidson  <beidson@apple.com>
3572
3573         Reviewed by Darin Adler
3574
3575         Merge the StorageAreaClient into the StorageArea class itself as pure virtual methods.
3576         Add "LocalStorageArea" and "SessionStorageArea" implementations, and have SessionStorage
3577         and LocalStorage instantiate the appropriate type of StorageArea object.
3578
3579         This purpose of this change is because while adding the persistent store to LocalStorage,
3580         it became obvious that the client approach wasn't scaling well.  Additionally, a StorageArea
3581         backing a local storage area required vastly different data members compared to one backing
3582         a session storage area.
3583
3584         This will be much cleaner going forward.
3585
3586         * GNUmakefile.am:
3587         * WebCore.pro:
3588         * WebCore.vcproj/WebCore.vcproj:
3589         * WebCore.xcodeproj/project.pbxproj:
3590         * WebCoreSources.bkl:
3591
3592         * storage/LocalStorage.cpp:
3593         (WebCore::LocalStorage::storageArea):
3594         * storage/LocalStorage.h:
3595
3596         * storage/LocalStorageArea.cpp: Added.
3597         (WebCore::LocalStorageArea::LocalStorageArea):
3598         (WebCore::LocalStorageArea::itemChanged):
3599         (WebCore::LocalStorageArea::itemRemoved):
3600         (WebCore::LocalStorageArea::dispatchStorageEvent):
3601         * storage/LocalStorageArea.h: Added.
3602         (WebCore::LocalStorageArea::create):
3603
3604         * storage/SessionStorage.cpp:
3605         (WebCore::SessionStorage::copy):
3606         (WebCore::SessionStorage::storageArea):
3607         * storage/SessionStorage.h:
3608
3609         * storage/SessionStorageArea.cpp: Added.
3610         (WebCore::SessionStorageArea::copy):
3611         (WebCore::SessionStorageArea::SessionStorageArea):
3612         (WebCore::SessionStorageArea::itemChanged):
3613         (WebCore::SessionStorageArea::itemRemoved):
3614         (WebCore::SessionStorageArea::dispatchStorageEvent):
3615         * storage/SessionStorageArea.h: Added.
3616         (WebCore::SessionStorageArea::create):
3617         (WebCore::SessionStorageArea::page):
3618
3619         * storage/StorageArea.cpp:
3620         (WebCore::StorageArea::StorageArea):
3621         (WebCore::StorageArea::setItem):
3622         (WebCore::StorageArea::removeItem):
3623         (WebCore::StorageArea::storageMap):
3624         * storage/StorageArea.h:
3625
3626         * storage/StorageAreaClient.h: Removed.
3627
3628 2008-04-16  David Hyatt  <hyatt@apple.com>
3629
3630         Add support for the ability to draw directly into CSS images using CanvasRenderingContext2D.
3631
3632         Reviewed by olliej
3633
3634         Added fast/canvas/canvas-bg.html
3635
3636         * GNUmakefile.am:
3637         * WebCore.pro:
3638         * WebCore.vcproj/WebCore.vcproj:
3639         * WebCore.xcodeproj/project.pbxproj:
3640         * WebCoreSources.bkl:
3641         * css/CSSCanvasValue.cpp: Added.
3642         (WebCore::CSSCanvasValue::~CSSCanvasValue):
3643         (WebCore::CSSCanvasValue::cssText):
3644         (WebCore::CSSCanvasValue::canvasChanged):
3645         (WebCore::CSSCanvasValue::canvasResized):
3646         (WebCore::CSSCanvasValue::fixedSize):
3647         (WebCore::CSSCanvasValue::element):
3648         (WebCore::CSSCanvasValue::image):
3649         * css/CSSCanvasValue.h: Added.
3650         (WebCore::CSSCanvasValue::CSSCanvasValue):
3651         (WebCore::CSSCanvasValue::isFixedSize):
3652         (WebCore::CSSCanvasValue::setName):
3653         * css/CSSGradientValue.cpp:
3654         * css/CSSGradientValue.h:
3655         * css/CSSImageGeneratorValue.cpp:
3656         (WebCore::CSSImageGeneratorValue::generatedImage):
3657         * css/CSSImageGeneratorValue.h:
3658         (WebCore::CSSImageGeneratorValue::isFixedSize):
3659         (WebCore::CSSImageGeneratorValue::fixedSize):
3660         * css/CSSParser.cpp:
3661         (WebCore::CSSParser::parseContent):
3662         (WebCore::CSSParser::parseBackgroundImage):
3663         (WebCore::CSSParser::parseBorderImage):
3664         (WebCore::CSSParser::parseCanvas):
3665         * css/CSSParser.h:
3666         * dom/Document.cpp:
3667         (WebCore::Document::getCSSCanvasContext):
3668         (WebCore::Document::getCSSCanvasElement):
3669         * dom/Document.h:
3670         * dom/Document.idl:
3671         * html/HTMLCanvasElement.cpp:
3672         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
3673         (WebCore::HTMLCanvasElement::reset):
3674         * html/HTMLCanvasElement.h:
3675         (WebCore::HTMLCanvasElement::setSize):
3676         * rendering/RenderBox.cpp:
3677         (WebCore::RenderBox::calculateBackgroundSize):
3678         (WebCore::RenderBox::imageChanged):
3679         * rendering/RenderBox.h:
3680         * rendering/RenderImage.cpp:
3681         (WebCore::RenderImage::imageChanged):
3682         * rendering/RenderImage.h:
3683         (WebCore::RenderImage::imagePtr):
3684         (WebCore::RenderImage::intrinsicSizeChanged):
3685         * rendering/RenderImageGeneratedContent.h:
3686         (WebCore::RenderImageGeneratedContent::imageSize):
3687         (WebCore::RenderImageGeneratedContent::imagePtr):
3688         * rendering/RenderListMarker.cpp:
3689         (WebCore::RenderListMarker::layout):
3690         (WebCore::RenderListMarker::imageChanged):
3691         (WebCore::RenderListMarker::calcPrefWidths):
3692         (WebCore::RenderListMarker::getRelativeMarkerRect):
3693         * rendering/RenderListMarker.h:
3694         * rendering/RenderObject.cpp:
3695         (WebCore::RenderObject::paintBorderImage):
3696         (WebCore::RenderObject::imageChanged):
3697         * rendering/RenderObject.h:
3698         (WebCore::RenderObject::imageChanged):
3699         * rendering/RenderSVGImage.cpp:
3700         (WebCore::RenderSVGImage::imageChanged):
3701         * rendering/RenderSVGImage.h:
3702         * rendering/RenderStyle.cpp:
3703         (WebCore::StyleCachedImage::imageSize):
3704         (WebCore::StyleGeneratedImage::imageSize):
3705         * rendering/RenderStyle.h:
3706         (WebCore::StyleCachedImage::data):
3707         (WebCore::StyleGeneratedImage::StyleGeneratedImage):
3708         (WebCore::StyleGeneratedImage::data):
3709         (WebCore::StyleGeneratedImage::imageHasRelativeWidth):
3710         (WebCore::StyleGeneratedImage::imageHasRelativeHeight):
3711         (WebCore::StyleGeneratedImage::usesImageContainerSize):
3712         * rendering/RenderTableCol.cpp:
3713         (WebCore::RenderTableCol::imageChanged):
3714         * rendering/RenderTableCol.h:
3715         * rendering/RenderTableRow.cpp:
3716         (WebCore::RenderTableRow::imageChanged):
3717         * rendering/RenderTableRow.h:
3718         * rendering/RenderTableSection.cpp:
3719         (WebCore::RenderTableSection::imageChanged):
3720         * rendering/RenderTableSection.h:
3721
3722 2008-04-16  Anders Carlsson  <andersca@apple.com>
3723
3724         Reviewed by Darin.
3725
3726         Add manifest parser.
3727
3728         * loader/appcache/ManifestParser.cpp:
3729         (WebCore::):
3730         (WebCore::parseManifest):
3731         * loader/appcache/ManifestParser.h:
3732         * platform/text/CharacterNames.h:
3733
3734 2008-04-16  Darin Adler  <darin@apple.com>
3735
3736         Reviewed by Mitz.
3737
3738         - fix <rdar://problem/5858617> REGRESSION (r21452-Safari 3.1):
3739           Safari does not find words containing ß (German letter sharp-s)
3740
3741         Test: fast/text/find-case-folding.html
3742
3743         * platform/text/StringImpl.cpp:
3744         (WebCore::StringImpl::foldCase):
3745         Pass the folded length to foldCase rather than the original string length.
3746         Without this, we get an error code every time.
3747
3748 2008-04-16  Anders Carlsson  <andersca@apple.com>
3749
3750         Fix build.
3751         
3752         * loader/appcache/ApplicationCache.cpp:
3753         (WebCore::ApplicationCache::ApplicationCache):
3754         (WebCore::ApplicationCache::setManifestResource):
3755         (WebCore::ApplicationCache::addResource):
3756
3757 2008-04-16  Anders Carlsson  <andersca@apple.com>
3758
3759         Reviewed by Darin.
3760
3761         Add new protocolHostAndPortAreEqual function.
3762         
3763         * platform/KURL.cpp:
3764         (WebCore::KURL::host):
3765         (WebCore::KURL::setHost):
3766         (WebCore::KURL::setHostAndPort):
3767         (WebCore::protocolHostAndPortAreEqual):
3768         * platform/KURL.h:
3769         (WebCore::KURL::hostStart):
3770
3771 2008-04-16  Anders Carlsson  <andersca@apple.com>
3772
3773         Reviewed by Sam.
3774         
3775         Fix some style nits.
3776         
3777         * loader/appcache/ApplicationCache.cpp:
3778         (WebCore::ApplicationCache::ApplicationCache):
3779         (WebCore::ApplicationCache::setManifestResource):
3780         (WebCore::ApplicationCache::addResource):
3781         (WebCore::ApplicationCache::removeResource):
3782         (WebCore::ApplicationCache::dump):
3783         * loader/appcache/ApplicationCacheGroup.h:
3784
3785 2008-04-16  Anders Carlsson  <andersca@apple.com>
3786
3787         Reviewed by Brady and Sam.
3788
3789         Add ApplicationCache implementation. Stub out ApplicationCacheGroup methods
3790         needed by ApplicationCache.
3791         
3792         * loader/appcache/ApplicationCache.cpp:
3793         (WebCore::ApplicationCache::ApplicationCache):
3794         (WebCore::ApplicationCache::~ApplicationCache):
3795         (WebCore::ApplicationCache::setManifestResource):
3796         (WebCore::ApplicationCache::addResource):
3797         (WebCore::ApplicationCache::removeResource):
3798         (WebCore::ApplicationCache::resourceForURL):
3799         (WebCore::ApplicationCache::resourceForRequest):
3800         (WebCore::ApplicationCache::numDynamicEntries):
3801         (WebCore::ApplicationCache::dynamicEntry):
3802         (WebCore::ApplicationCache::addDynamicEntry):
3803         (WebCore::ApplicationCache::removeDynamicEntry):
3804         (WebCore::ApplicationCache::setOnlineWhitelist):
3805         (WebCore::ApplicationCache::isURLInOnlineWhitelist):
3806         (WebCore::ApplicationCache::dump):
3807         * loader/appcache/ApplicationCache.h:
3808         (WebCore::ApplicationCache::create):
3809         (WebCore::ApplicationCache::manifestResource):
3810         (WebCore::ApplicationCache::group):
3811         (WebCore::ApplicationCache::begin):
3812         (WebCore::ApplicationCache::end):
3813         * loader/appcache/ApplicationCacheGroup.h:
3814         (WebCore::ApplicationCacheGroup::manifestURL):
3815         (WebCore::ApplicationCacheGroup::cacheDestroyed):
3816
3817 2008-04-16  Adam Roben  <aroben@apple.com>
3818
3819         Fix Bug 18505: REGRESSION: Search is disabled and not functional
3820
3821         <https://bugs.webkit.org/show_bug.cgi?id=18505>
3822
3823         Reviewed by Tim Hatcher.
3824
3825         * page/inspector/ResourcesPanel.js:
3826         (WebInspector.ResourcesPanel.sourceFrameForResource): Added.
3827         * page/inspector/inspector.css: Added back rules for the search field
3828         that were removed in r31736.
3829         * page/inspector/inspector.html:
3830           - Removed the disabled attribute from the search field
3831           - Added back the #searchResults and #searchResultsResizer divs which
3832             were removed in r31736
3833         * page/inspector/inspector.js:
3834         (WebInspector.set showingSearchResults): Updated for class rename
3835         panels -> main-panels.
3836         (WebInspector.loaded): Added back the mousedown event listener for the
3837         search results resizer that was removed in r31736.
3838         (WebInspector.searchResultsResizerDrag): Updated for class rename
3839         panels -> main-panels.
3840         (WebInspector.performSearch):
3841           - Changed to use sourceFrameForResource
3842           - Changed to use showResource
3843           - Changed to save/restore the focused element around the setting of
3844             the current panel
3845           - Changed to get the source document from the match range instead of
3846             by crawling back up to the source view
3847           - Changed to bind the onselect handlers to this so that we can
3848             access the Elements/Resources panels
3849
3850 2008-04-16  Brady Eidson  <beidson@apple.com>
3851
3852         Reviewed by Sam Weinig
3853
3854         Changing ThreadSafeShared to start with a ref count of 1, so updating all users to
3855         adoptRef() that initial reference.
3856
3857         * bindings/js/JSCustomSQLStatementCallback.h:
3858         (WebCore::JSCustomSQLStatementCallback::create):
3859         * bindings/js/JSCustomSQLStatementErrorCallback.h:
3860         (WebCore::JSCustomSQLStatementErrorCallback::create):
3861         * bindings/js/JSCustomSQLTransactionCallback.h:
3862         (WebCore::JSCustomSQLTransactionCallback::create):
3863         * bindings/js/JSCustomSQLTransactionErrorCallback.h:
3864         (WebCore::JSCustomSQLTransactionErrorCallback::create):
3865
3866         * bindings/js/JSDatabaseCustom.cpp:
3867         (WebCore::JSDatabase::changeVersion):
3868         (WebCore::JSDatabase::transaction):
3869
3870         * bindings/js/JSSQLTransactionCustom.cpp:
3871         (WebCore::JSSQLTransaction::executeSql):
3872
3873         * dom/Document.cpp:
3874         (WebCore::Document::databaseThread):
3875
3876         * platform/SecurityOrigin.cpp:
3877         (WebCore::SecurityOrigin::create):
3878
3879         * platform/sql/SQLiteAuthorizer.h:
3880         (WebCore::SQLiteAuthorizer::create):
3881         (WebCore::SQLiteAuthorizer::SQLiteAuthorizer):
3882
3883         * storage/ChangeVersionWrapper.cpp:
3884         (WebCore::ChangeVersionWrapper::performPreflight):
3885         (WebCore::ChangeVersionWrapper::performPostflight):
3886         * storage/ChangeVersionWrapper.h:
3887         (WebCore::ChangeVersionWrapper::create):
3888
3889         * storage/Database.cpp:
3890         (WebCore::Database::openAndVerifyVersion):
3891         (WebCore::Database::markAsDeletedAndClose):
3892         (WebCore::Database::changeVersion):
3893         (WebCore::Database::transaction):
3894         (WebCore::Database::scheduleTransaction):
3895         (WebCore::Database::scheduleTransactionStep):
3896         (WebCore::Database::tableNames):
3897
3898         * storage/DatabaseAuthorizer.h:
3899         (WebCore::DatabaseAuthorizer::create):
3900
3901         * storage/DatabaseTask.h:
3902         (WebCore::DatabaseOpenTask::create):
3903         (WebCore::DatabaseCloseTask::create):
3904         (WebCore::DatabaseTransactionTask::create):
3905         (WebCore::DatabaseTableNamesTask::create):
3906
3907         * storage/DatabaseThread.cpp:
3908         (WebCore::DatabaseThread::scheduleTask): Change to take a PassRefPtr instead of raw
3909         (WebCore::DatabaseThread::scheduleImmediateTask): Ditto
3910         * storage/DatabaseThread.h:
3911         (WebCore::DatabaseThread::create):
3912
3913         * storage/SQLError.h:
3914         (WebCore::SQLError::create):
3915         (WebCore::SQLError::SQLError):
3916
3917         * storage/SQLResultSet.h:
3918         (WebCore::SQLResultSet::create):
3919
3920         * storage/SQLStatement.cpp:
3921         (WebCore::SQLStatement::create):
3922         (WebCore::SQLStatement::execute):
3923         (WebCore::SQLStatement::setDatabaseDeletedError):
3924         (WebCore::SQLStatement::setVersionMismatchedError):
3925         (WebCore::SQLStatement::setFailureDueToQuota):
3926         * storage/SQLStatement.h:
3927
3928         * storage/SQLTransaction.cpp:
3929         (WebCore::SQLTransaction::create):
3930         (WebCore::SQLTransaction::executeSQL):
3931         (WebCore::SQLTransaction::openTransactionAndPreflight):
3932         (WebCore::SQLTransaction::deliverTransactionCallback):
3933         (WebCore::SQLTransaction::handleCurrentStatementError):
3934         (WebCore::SQLTransaction::deliverStatementCallback):
3935         (WebCore::SQLTransaction::postflightAndCommit):
3936         * storage/SQLTransaction.h:
3937
3938 2008-04-16  Anders Carlsson  <andersca@apple.com>
3939
3940         Reviewed by Adam and Brady.
3941         
3942         Add implementation of ApplicationCacheResource.
3943         
3944         * loader/appcache/ApplicationCacheResource.cpp:
3945         (WebCore::ApplicationCacheResource::ApplicationCacheResource):
3946         (WebCore::ApplicationCacheResource::dumpType):
3947         * loader/appcache/ApplicationCacheResource.h:
3948         (WebCore::ApplicationCacheResource::):
3949         (WebCore::ApplicationCacheResource::create):
3950         (WebCore::ApplicationCacheResource::type):
3951         (WebCore::ApplicationCacheResource::addType):
3952
3953 2008-04-16  Timothy Hatcher  <timothy@apple.com>
3954
3955         Fixes an issue where the source for a resource that had errors would
3956         not be shown because the view was created before the resource load
3957         finished. The right view is now created, even if the resource isn't 
3958         finished. The SourceView just makes sure to not load the source until
3959         the resource is finished. Only if the category changes, does the view
3960         need to be recreated.
3961
3962         Reviewed by Adam Roben.
3963
3964         * page/inspector/Resource.js:
3965         (WebInspector.Resource.prototype.set category): Call recreateViewForResourceIfNeeded.
3966         * page/inspector/ResourcesPanel.js:
3967         (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
3968         Added. Tries to make a new view, if the view is the same prototype of the
3969         previous view, return early. If they differ, close and detach the old view
3970         and associate the resource with the new view. Calling updateErrorsAndWarnings
3971         is needed, because the errors and warnings that might have been added to the
3972         previous view will be lost, so make the tree element match.
3973         (WebInspector.Resource.prototype._createResourceView): Always create a view
3974         that matches the resource category. Ignore the loading and failed status.
3975         * page/inspector/SourceView.js:
3976         (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded): Don't setup the
3977         frame if the resource hasn't finished or if the load failed.
3978
3979 2008-04-16  Timothy Hatcher  <timothy@apple.com>
3980
3981         Adds a console formatter for Error objects. So typing a expression in the
3982         console that ends in an exception will print meaningful info. Also calling
3983         console.{log,error,warn,info} with an error object will output nicely.
3984
3985         Reviewed by Adam Roben.
3986
3987         * page/inspector/Console.js:
3988         (WebInspector.Console.prototype._formaterror): Added. Formats an error
3989         object by showing it like other exceptions, with a clickable file URL.
3990
3991 2008-04-16  Timothy Hatcher  <timothy@apple.com>
3992
3993         Refactors code that updates the errors and warnings count in the
3994         resources sidebar so other functions can easily trigger updates.
3995
3996         Reviewed by Adam Roben.
3997
3998         * page/inspector/ResourcesPanel.js:
3999         (WebInspector.ResourcesPanel.prototype.addMessageToResource): Call updateErrorsAndWarnings.
4000         Removes code that updates the bubbleText and class names.
4001         (WebInspector.ResourcesPanel.prototype.clearMessages): Ditto.
4002         (WebInspector.ResourceSidebarTreeElement.prototype.updateErrorsAndWarnings):
4003         Added. Updates the bubbleText and adds or removes the class names
4004         depending on if the values are zero.
4005
4006 2008-04-16  Antti Koivisto  <antti@apple.com>
4007
4008         Reviewed by Alexey.
4009         
4010         Fix <rdar://problem/5863728>
4011         REGRESSION: Garbage character shown in temperatures in the Weather widget (encoding issue with degree symbol)
4012         
4013         Parse the encoding attribute in PreloadScanner.
4014
4015         Test: fast/encoding/script-preload-encoding.html
4016
4017         * html/PreloadScanner.cpp:
4018         (WebCore::PreloadScanner::processAttribute):
4019         (WebCore::PreloadScanner::emitTag):
4020         (WebCore::PreloadScanner::emitCSSRule):
4021         * html/PreloadScanner.h:
4022         * loader/DocLoader.cpp:
4023         (WebCore::DocLoader::preload):
4024         * loader/DocLoader.h:
4025
4026 2008-04-16  Anders Carlsson  <andersca@apple.com>
4027
4028         Reviewed by Adam.
4029
4030         Generate the DOMApplicationCache JS wrapper, add JSDOMApplicationCacheCustom.cpp and 
4031         fix typos in the #if line.
4032         
4033         * DerivedSources.make:
4034         * WebCore.vcproj/WebCore.vcproj:
4035         * WebCore.xcodeproj/project.pbxproj:
4036         * bindings/js/JSDOMApplicationCacheCustom.cpp: Added.
4037         * loader/appcache/ApplicationCache.cpp:
4038         * loader/appcache/ApplicationCache.h:
4039         * loader/appcache/ApplicationCacheGroup.cpp:
4040         * loader/appcache/ApplicationCacheGroup.h:
4041         * loader/appcache/ApplicationCacheResource.cpp:
4042         * loader/appcache/ApplicationCacheResource.h:
4043         * loader/appcache/DOMApplicationCache.cpp:
4044         * loader/appcache/DOMApplicationCache.h:
4045         * loader/appcache/DOMApplicationCache.idl:
4046         * loader/appcache/ManifestParser.cpp:
4047         * loader/appcache/ManifestParser.h:
4048
4049 2008-04-16  Sam Weinig  <sam@webkit.org>
4050
4051         Reviewed by Geoffrey Garen.
4052
4053         - To keep the behavior of the WebKit and JavaScriptCore API's the same,
4054           we need to hide the fact that the global object and the window object
4055           are no longer the same thing, and the the global object now changes on
4056           navigations.  To do this, only the wrapper should ever be exposed.  This
4057           fixes the two remaining spots where the internal global object is exposed,
4058           the windowScriptObject returned from [WebFrame windowObject] and the object
4059           return by calling JSContextGetGlobalObject on [WebFrame globalContext]
4060
4061         * bindings/js/JSDOMWindowWrapper.cpp:
4062         (WebCore::JSDOMWindowWrapper::putWithAttributes):
4063         * bindings/js/JSDOMWindowWrapper.h:
4064         Forward this new method so that JSObjectSetProperty doesn't set properties on the 
4065         wrapper.
4066
4067         * page/mac/FrameMac.mm:
4068         (WebCore::Frame::windowScriptObject):
4069         Return the wrapper instead of the global object.
4070
4071 2008-04-16  David Hyatt  <hyatt@apple.com>
4072
4073         Eliminate the paintBuffer and drawImage(ImageBuffer*) methods from GraphicsContext* in favor of just
4074         snagging an Image* from the ImageBuffer and drawing that instead.
4075
4076         Enhance canvas with a CanvasObserver so that notifications of dirtying or resizing can be tracked by
4077         a consumer.
4078
4079         Reviewed by olliej
4080
4081         * html/CanvasRenderingContext2D.cpp:
4082         (WebCore::CanvasRenderingContext2D::drawImage):
4083         * html/HTMLCanvasElement.cpp:
4084         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
4085         (WebCore::HTMLCanvasElement::willDraw):
4086         (WebCore::HTMLCanvasElement::reset):
4087         (WebCore::HTMLCanvasElement::paint):
4088         * html/HTMLCanvasElement.h:
4089         (WebCore::CanvasObserver::~CanvasObserver):
4090         (WebCore::HTMLCanvasElement::setSize):
4091         (WebCore::HTMLCanvasElement::setObserver):
4092         * platform/graphics/GraphicsContext.cpp:
4093         (WebCore::GraphicsContext::drawImage):
4094         (WebCore::GraphicsContext::drawTiledImage):
4095         * platform/graphics/GraphicsContext.h:
4096         * platform/graphics/ImageBuffer.h:
4097         (WebCore::ImageBuffer::clearImage):
4098         * platform/graphics/cairo/GraphicsContextCairo.cpp:
4099         * platform/graphics/cg/GraphicsContextCG.cpp:
4100         * platform/graphics/cg/ImageCG.cpp:
4101         (WebCore::BitmapImage::draw):
4102         (WebCore::Image::drawPattern):
4103         * platform/graphics/cg/ImageSourceCG.cpp:
4104         (WebCore::ImageSource::createFrameAtIndex):
4105         * platform/graphics/qt/GraphicsContextQt.cpp:
4106         * platform/graphics/wx/GraphicsContextWx.cpp:
4107
4108 2008-04-16  Steve Falkenburg  <sfalken@apple.com>
4109
4110         Improve timer latency/resolution.
4111                 
4112         The primary timing mechanism is now CreateTimerQueueTimer, with a PostMessage from
4113         the callback proc.  This event will be delivered sooner than if we used SetTimer(),
4114         since it is higher priority than other messages.
4115         
4116         If there is an input message pending, we'll use we SetTimer() based timers to avoid
4117         starving user input.
4118
4119         Don't call PostMessage immediately on all timers < 10ms.  Only call immediately if
4120         timer is already expired.  This avoids the case where no timers would be processed,
4121         causing the timer to be re-posted via the slower SetTimer method.
4122
4123         Don't call PostMessage immediately if there's a pending WM_PAINT, since
4124         we don't want to starve all paints when bombarded with a continuous stream of low
4125         duration timers.
4126
4127         Removed reentrancy check, since we're now looking for specific starvation cases,
4128         and will typically defer non-expired timers through CreateTimerQueueTimer.
4129
4130         The reason Windows wouldn't starve paints in favor of timers with the old code:
4131         When we went to reset the timer when it fired, the timer reset code treated this as a
4132         reentrant timer, causing us to hit the slow SetTimer code rather than calling PostMessage,
4133         even for timers expiring in < 10ms.  I corrected that, exposing the paint starvation problem.
4134
4135         Use timeBeginPeriod/timeEndPeriod to improve resolution of system timers.
4136         Limit this resolution change to within 20ms of the last high resolution timer request.
4137                         
4138         Corrected GetQueueStatus to check for specific input (and paint) messages rather than
4139         checking QS_ALLINPUT.  Contrary to its name, QS_ALLINPUT actually indicates interest
4140         in ALL queued messages, not just input messages.
4141         
4142         Fix SetTimer/KillTimer calls to pass our window handle.
4143
4144         Reviewed by Brady.
4145
4146         * platform/win/SharedTimerWin.cpp:
4147         (WebCore::):
4148         (WebCore::TimerWindowWndProc):
4149         (WebCore::queueTimerProc):
4150         (WebCore::setSharedTimerFireTime):
4151         (WebCore::stopSharedTimer):
4152
4153 2008-04-16  Adam Roben  <aroben@apple.com>
4154
4155         Fix console-log-formatting to truly test formatting an undefined value
4156
4157         Exceptions thrown by the test will also now be shown as errors.
4158
4159         Reviewed by Tim Hatcher.
4160
4161         * manual-tests/inspector/console-log-formatting.html:
4162         (test): Use console.error to report exceptions.
4163         (runTests): Use window.noSuchVariable instead of just noSuchVariable
4164         to avoid an exception.
4165
4166 2008-04-16  Anatoli Papirovski  <apapirovski@mac.com>
4167
4168         Reviewed by David.
4169
4170         Optimized the calculation of background-size.
4171
4172         * rendering/RenderBox.cpp:
4173         (WebCore::RenderBox::calculateBackgroundSize):
4174
4175 2008-04-16  Adam Roben  <aroben@apple.com>
4176
4177         Fix Bug 17228: console.{log,warn,info,error} should support format
4178         strings, variable arguments
4179
4180         <https://bugs.webkit.org/show_bug.cgi?id=17228>
4181         <rdar://problem/5732828>
4182
4183         Reviewed by Tim Hatcher.
4184
4185         Test: manual-tests/inspector/console-log-formatting.html
4186
4187         * page/inspector/Console.js:
4188         (WebInspector.ConsoleMessage): Pass any extra arguments down to
4189         _format.
4190         (WebInspector.ConsoleMessage._format): This method constructs
4191         this.formattedMessage. We treat the first parameter as a format
4192         string. Any parameters that have not been used after substituting into
4193         the format string are concatenated together, separated by spaces.
4194         (WebInspector.ConsoleMessage.toMessageElement): Updated to use
4195         this.formattedMessage.
4196         (WebInspector.ConsoleMessage.toString): Ditto.
4197
4198 2008-04-15  Adam Roben  <aroben@apple.com>
4199
4200         Make String.format return an array of unused substitutions
4201
4202         String.format now returns an object with two properties:
4203         formattedResult and unusedSubstitutions.
4204
4205         Reviewed by Tim Hatcher.
4206
4207         * page/inspector/utilities.js:
4208         (String.vsprintf): Updated for changes to String.format. We throw away
4209         the array of unused substitutions.
4210         (String.format): Changed to keep track of which substitutions are used
4211         when formatting. We then return both the formatted result and the
4212         array of unused substitutions.
4213
4214 2008-04-15  Adam Roben  <aroben@apple.com>
4215
4216         Generalize String.format some more
4217
4218         String.format now takes an initial value and an append function which
4219         it uses to build the result. Each time a token is processed,
4220         append(valueSoFar, newValue) is called.
4221
4222         Reviewed by Tim Hatcher.
4223
4224         * page/inspector/utilities.js:
4225         (String.vsprintf): Pass the empty string for the initial value, and
4226         a function that concatenates two strings as the append function.
4227         (String.format): Use initialValue and append to build the result
4228         instead of only working with strings.
4229
4230 2008-04-15  Adam Roben  <aroben@apple.com>
4231
4232         Add String.format
4233
4234         String.format is a more generic form of String.vsprintf that takes a
4235         set of formatter functions, one for each supported format specifier.
4236         Each formatter function is passed the relevant token and substitution
4237         value, and returns the formatted result.
4238
4239         Reviewed by Tim Hatcher.
4240
4241         * page/inspector/utilities.js:
4242         (String.standardFormatters): Added.
4243         (String.vsprintf): Changed to call through to String.format.
4244         (String.format): Added. Most of the code came from String.vsprintf,