d7706ddebe86da73fc3dc1d7654b3613c5fcd3e0
[WebKit-https.git] / WebCore / ChangeLog
1 2008-03-17  Dan Bernstein  <mitz@apple.com>
2
3         Rubber-stamped by Dave Hyatt.
4
5         - FloatingObject cleanup
6
7         Renamed FloatingObject's data members as follows: node -> m_renderer,
8         startY -> m_top, endY -> m_bottom, left -> m_left, width -> m_width,
9         and noPaint -> !m_shouldPaint, reversing the meaning of the flag.
10
11         Also addressed the FIXME in RenderBlock::containsFloat().
12
13         * rendering/RenderBlock.cpp:
14         (WebCore::RenderBlock::repaintOverhangingFloats):
15         (WebCore::RenderBlock::paintFloats):
16         (WebCore::RenderBlock::insertFloatingObject):
17         (WebCore::RenderBlock::removeFloatingObject):
18         (WebCore::RenderBlock::positionNewFloats):
19         (WebCore::RenderBlock::leftRelOffset):
20         (WebCore::RenderBlock::rightRelOffset):
21         (WebCore::RenderBlock::nextFloatBottomBelow):
22         (WebCore::RenderBlock::floatBottom):
23         (WebCore::RenderBlock::floatRect):
24         (WebCore::RenderBlock::lowestPosition):
25         (WebCore::RenderBlock::rightmostPosition):
26         (WebCore::RenderBlock::leftmostPosition):
27         (WebCore::RenderBlock::leftBottom):
28         (WebCore::RenderBlock::rightBottom):
29         (WebCore::RenderBlock::clearFloats):
30         (WebCore::RenderBlock::addOverhangingFloats):
31         (WebCore::RenderBlock::addIntrudingFloats):
32         (WebCore::RenderBlock::containsFloat): Changed to return false if the
33         floats lists exists but is empty, since line layout code no longer
34         relies on the buggy behavior.
35         (WebCore::RenderBlock::nodeAtPoint):
36         (WebCore::RenderBlock::adjustForBorderFit):
37         * rendering/RenderBlock.h:
38         (WebCore::RenderBlock::containsFloats):
39         (WebCore::RenderBlock::FloatingObject::FloatingObject):
40         * rendering/bidi.cpp:
41         (WebCore::RenderBlock::layoutInlineChildren):
42         (WebCore::RenderBlock::matchedEndLine):
43
44 2008-03-17  Dan Bernstein  <mitz@apple.com>
45
46         Reviewed by Dave Hyatt.
47
48         - allow incremental relayout of blocks that contain floats
49
50         Tests: fast/repaint/line-flow-with-floats-[1-9].html
51
52         * rendering/RenderBlock.cpp:
53         (WebCore::RenderBlock::clearFloatsIfNeeded): Cleaned up by moving most
54         of the function body out of an if statement which was replaced with an
55         early return.
56         (WebCore::RenderBlock::insertFloatingObject): Cleaned up by moving most
57         of the function body out of an if statement and moving the ASSERT, which
58         is a crash in release builds, to the beginning. Made this function set
59         the m_isDescendant flag of floating objects it creates.
60         (WebCore::RenderBlock::removeFloatingObject): Added a call to
61         markLinesDirtyInVerticalRange() when removing a float from a block with
62         inline children.
63         (WebCore::RenderBlock::markLinesDirtyInVerticalRange): Added. Marks the
64         lines in the given range as dirty.
65         (WebCore::RenderBlock::clearFloats): Added code to detect changes to
66         the geometry of floats intruding into this block from other blocks and
67         mark any lines whose available width has changed as a result as dirty.
68
69         * rendering/RenderBlock.h:
70         (WebCore::RenderBlock::FloatWithRect::FloatWithRect): Added a structure
71         to cache a float with its position and size.
72         (WebCore::RenderBlock::FloatingObject::FloatingObject): Added an
73         m_isDescendant flag, used by clearFloats() to distinguish between floats
74         entering the block from outside and floats internal to the block.
75
76         * rendering/RootInlineBox.h:
77         (WebCore::RootInlineBox::floats): Added.
78         (WebCore::RootInlineBox::floatsPtr): Added.
79         (WebCore::RootInlineBox::Overflow::Overflow): Added a data member to
80         hold the floats originating on the line.
81
82         * rendering/bidi.cpp:
83         (WebCore::RenderBlock::layoutInlineChildren): Made the existence of
84         floats not force a full layout. Changed to cache the geometry of floats
85         in the block and detect changes to it. If a float's size or position
86         changes, all lines from that point on are treated as dirty. An exception
87         is a change in the dimensions of a float on an otherwise-clean line,
88         which only dirties lines potentially affected by the change (see
89         determineStartPosition()). Added code to update each RootInlineBox's
90         set of floats as lines are laid out. Added code to shift floats
91         belonging to clean lines in the end along with the lines.
92         (WebCore::RenderBlock::determineStartPosition): Made this function look
93         for changes to floats' dimensions and mark lines as dirty accordingly.
94         Also look for new floats and if found, cause a full layout. Added code
95         to re-add floats belonging to clean lines.
96         (WebCore::RenderBlock::matchedEndLine): Added checking that the clean
97         lines in the end can be shifted vertically as needed, i.e. that the
98         available width along the way is uniform.
99
100 2008-03-17  Eric Seidel  <eric@webkit.org>
101
102         Reviewed by darin.
103
104         Fix _NPN_IntFromIdentifier (and export the symbol for use!)
105
106         Test: plugins/netscape-identifier-conversion.html
107
108         * WebCore.NPAPI.exp:
109         * bridge/npruntime.cpp:
110         (_NPN_IntFromIdentifier):
111
112 2008-03-17  Sam Weinig  <sam@webkit.org>
113
114         Reviewed by Dan Bernstein.
115
116         Add HTMLCollection constructor to the Window object. (Omission noticed by Harri Porten)
117
118         * page/DOMWindow.idl: 
119
120 2008-03-17  Holger Hans Peter Freyther  <zecke@selfish.org>
121
122         Unreviewed Gtk+ build fix.
123
124         * platform/gtk/ScrollViewGtk.cpp: remove const
125
126 2008-03-17  Julien Chaffraix  <julien.chaffraix@gmail.com>
127
128         Reviewed by Holger.
129
130         <http://bugs.webkit.org/show_bug.cgi?id=17754>
131
132         - Implement ResourceHandle::loadResourceSynchronously to dispatch synchronous
133           requests.
134
135         - Implement WebCoreSynchronousLoader, the ResourceHandleClient which holds
136           the network data, response and error for us during the transfert.
137
138         * platform/network/ResourceHandleInternal.h: Remove trailing white space.
139         * platform/network/curl/ResourceHandleCurl.cpp: Add WebCoreSynchronousLoader
140         (WebCore::WebCoreSynchronousLoader::resourceResponse):
141         (WebCore::WebCoreSynchronousLoader::resourceError):
142         (WebCore::WebCoreSynchronousLoader::data):
143         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
144         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
145         (WebCore::WebCoreSynchronousLoader::didReceiveData):
146         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
147         (WebCore::WebCoreSynchronousLoader::didFail):
148         (WebCore::ResourceHandle::loadResourceSynchronously): Implement method
149         using WebCoreSynchronousLoader.
150
151         * platform/network/curl/ResourceHandleManager.cpp:
152         (WebCore::ResourceHandleManager::dispatchSynchronousJob):
153         (WebCore::ResourceHandleManager::startJob):
154         (WebCore::ResourceHandleManager::initializeHandle): Handle initialization
155         method used both for synchronous and asynchronous job.
156
157         * platform/network/curl/ResourceHandleManager.h:
158
159 2008-03-17  Darin Adler  <darin@apple.com>
160
161         - try to fix GTK build
162
163         * platform/ScrollView.h: Make setGtkAdjustments adjustment.
164         And non-virtual (why was it virtual?).
165
166 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
167
168         Fix Bug 17898: Split PluginMessageThrottlerWin into its own files
169
170         <http://bugs.webkit.org/show_bug.cgi?id=17898>
171
172         Move the PluginMessageThrottlerWin class into its own files, in
173         preparation for refactoring PluginView code to be shared.
174
175         Reviewed and tweaked by Adam Roben.
176
177         * WebCore.vcproj/WebCore.vcproj:
178         * plugins/PluginView.h:
179         * plugins/win/PluginMessageThrottlerWin.cpp: Added.
180         * plugins/win/PluginMessageThrottlerWin.h: Added.
181         * plugins/win/PluginViewWin.cpp:
182
183 2008-03-17  Adam Roben  <aroben@apple.com>
184
185         More Windows build fixes after r31098
186
187         * platform/ScrollView.h: Make some more methods public.
188
189 2008-03-17  Adam Roben  <aroben@apple.com>
190
191         Windows and Qt build fixes after r31098
192
193         * platform/ScrollView.h: Mark methods public that still need to be so.
194
195 2008-03-16  Timothy Hatcher  <timothy@apple.com>
196
197         Reviewed by Darin Adler.
198
199         Bug 17883: Console completion should support bracket notation
200         http://bugs.webkit.org/show_bug.cgi?id=17883
201
202         Also fixes a bug where the Inspector's window object was used instead of the
203         inspected window object.
204
205         * page/inspector/ConsolePanel.js:
206         (WebInspector.ConsolePanel.complete): Add a comment about the _backwardsRange call.
207         (WebInspector.ConsolePanel.completions): Add a comment about the _backwardsRange call.
208         Check the last character of the expression for a dot or bracket. Fallback
209         to the InspectorController.inspectedWindow() instead of window, this was a bad bug.
210         If the expression caused an exception, just consider the prefix a window property.
211         When bracket notation is used remember what quote was used and compared property names
212         with that quote surrounding it. Also escape the property name for the quote and backslash.
213
214 2008-03-17  Robert Blaut  <webkit@blaut.biz>
215
216         Reviewed by Darin.
217
218         Fix for bug http://bugs.webkit.org/show_bug.cgi?id=17696
219         Set default margin-bottom for form element in quirk mode
220         and be compatible with Gecko.
221
222         Tests: fast/css/margin-bottom-form-element-quirk.html
223                fast/css/margin-bottom-form-element-strict.html
224
225         * css/html4.css:
226         * css/quirks.css:
227
228 2008-03-17  Antti Koivisto  <antti@apple.com>
229
230         Reviewed by Darin.
231
232         Speculative fix for http://bugs.webkit.org/show_bug.cgi?id=17878
233         Bug 17878: REGRESSION: Acid3 sometimes crashes Webkit under WebCore::Loader::Host::cancelRequests
234         
235         I can't reproduce the crash or make a test case for this one but I'm pretty sure this
236         is the problem. Essentially the same bug as http://bugs.webkit.org/show_bug.cgi?id=17862
237         except in didFail() instead of didFinishLoading().
238
239         * loader/loader.cpp:
240         (WebCore::Loader::Host::didFail):
241
242 2008-03-17  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
243
244         Reviewed and tweaked by Darin.
245
246         http://bugs.webkit.org/show_bug.cgi?id=17172
247         Refactor platform checks in ScrollView.h
248
249         * platform/ScrollView.h: Change #ifs around.
250
251 2008-03-17  Yuzhu Shen  <yuzhu.shen@gmail.com>
252
253         Reviewed by Darin.
254
255         Fix the bug: http://bugs.webkit.org/show_bug.cgi?id=17760
256         It is necessary to load the image even when src="".
257
258         Test: fast/images/load-img-with-empty-src.html
259
260         * html/HTMLImageLoader.cpp:
261         (WebCore::HTMLImageLoader::updateFromElement): isNull rather than isEmpty.
262
263 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
264
265         Fix GTK+ build from r31094.
266
267         * plugins/gtk/PluginDatabaseGtk.cpp:
268         (PluginDatabase::getPluginsInPaths):
269
270 2008-03-17  Adam Roben  <aroben@apple.com>
271
272         Fix Bug 17876: REGRESSION (r31060): Attempting to visit Ofcom page causes crash
273
274         <http://bugs.webkit.org/show_bug.cgi?id=17876>
275
276         Reviewed by John.
277
278         Test: fast/dom/remove-named-attribute-crash.html
279
280         * dom/NamedAttrMap.cpp:
281         (WebCore::NamedAttrMap::removeAttribute): Store the Attribute we're
282         going to remove from the m_attributes Vector in a RefPtr so it doesn't
283         get deleted when it is removed from the Vector.
284
285 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
286
287         Reviewed by Adam Roben.
288
289         Implement PluginDatabase for GTK+ with PluginDatabaseGtk.cpp.
290         Remove implemented methods from TemporaryLinkStubs.
291
292         * GNUmakefile.am:
293         * plugins/gtk:
294         * plugins/gtk/PluginDatabaseGtk.cpp:
295         * platform/gtk/TemporaryLinkStubs.cpp:
296
297 2008-03-17  Simon Hausmann  <hausmann@webkit.org>
298
299         Fix the Qt build.
300
301         * platform/text/qt/TextCodecQt.cpp:
302         (WebCore::TextCodecQt::encode):
303         * platform/text/qt/TextCodecQt.h:
304
305 2008-03-16  Maciej Stachowiak  <mjs@apple.com>
306
307         Not reviewed, just fixing an incomplete comment from the last commit.
308
309         * dom/Range.cpp:
310         (WebCore::Range::surroundContents):
311
312 2008-03-16  Maciej Stachowiak  <mjs@apple.com>
313
314         Reviewed by Darin.
315
316         - fixed "Acid3 expects different exceptions for surroundContents calls involving comment nodes (affects Acid3 test 11)"
317         http://bugs.webkit.org/show_bug.cgi?id=17509
318         
319         This gets us to 92/100
320
321         * dom/Range.cpp:
322         (WebCore::Range::surroundContents): Check for
323         HIERARCHY_REQUEST_ERR before BAD_BOUNDARYPOINTS_ERR, since Acid3
324         expects exceptional conditions to be tested in the order that the
325         spec lists them. Also, adjust the HIERARCHY_REQUEST_ERR check. If
326         the start point of the range is in a comment node, the node that
327         would be the parent of a partial replacement is actually the
328         comment node's parent (since comment nodes have character
329         indices), so we should do the HIERARCHY_REQUEST_ERR check based on
330         the parent of the comment node, as for text nodes, even though it
331         will fail later with a different exception because it is not
332         allowed to surround a partially selected non-text node.
333
334 2008-03-16  Marvin Decker  <marv.decker@gmail.com>
335
336         Reviewed by Darin.
337
338         Fix bug 15119: URL query characters that are unencodable in the
339         request's character set should be converted to XML entities with
340         non-alphanumeric characters escaped.
341
342         Test: http/tests/uri/escaped-entity.html
343
344         * html/FormDataList.cpp:
345         (WebCore::FormDataList::appendString):
346         * html/HTMLFormElement.cpp:
347         (WebCore::HTMLFormElement::formData):
348         * platform/KURL.cpp:
349         (WebCore::encodeRelativeString):
350         * platform/text/String.cpp:
351         (WebCore::String::latin1):
352         (WebCore::String::utf8):
353         * platform/text/TextCodec.cpp:
354         (WebCore::TextCodec::unencodableCharReplacement):
355         * platform/text/TextCodec.h:
356         (WebCore::):
357         * platform/text/TextCodecICU.cpp:
358         (WebCore::urlEscapedEntityCallback):
359         (WebCore::gbkUrlEscapedEntityCallack):
360         (WebCore::TextCodecICU::encode):
361         * platform/text/TextCodecICU.h:
362         (WebCore::TextCodecICU::setNeedsGBKFallbacks):
363         * platform/text/TextCodecLatin1.cpp:
364         (WebCore::encodeComplexWindowsLatin1):
365         (WebCore::TextCodecLatin1::encode):
366         * platform/text/TextCodecLatin1.h:
367         * platform/text/TextCodecUTF16.cpp:
368         (WebCore::TextCodecUTF16::encode):
369         * platform/text/TextCodecUTF16.h:
370         * platform/text/TextCodecUserDefined.cpp:
371         (WebCore::encodeComplexUserDefined):
372         (WebCore::TextCodecUserDefined::encode):
373         * platform/text/TextCodecUserDefined.h:
374         * platform/text/TextEncoding.cpp:
375         (WebCore::TextEncoding::encode):
376         * platform/text/TextEncoding.h:
377         * platform/text/mac/TextCodecMac.cpp:
378         (WebCore::TextCodecMac::encode):
379         * platform/text/mac/TextCodecMac.h:
380         * xml/XMLHttpRequest.cpp:
381         (WebCore::XMLHttpRequest::send):
382
383 2008-03-16  Kevin Ollivier  <kevino@theolliviers.com>
384
385         Rubber stamped by Darin.
386
387         Add set-webkit-configuration support for wx port, and centralize
388         build dir location setting.
389
390         http://bugs.webkit.org/show_bug.cgi?id=17790
391
392         * webcore-base.bkl:
393
394 2008-03-16  Darin Adler  <darin@apple.com>
395
396         Reviewed by Mark Rowe.
397
398         - http://bugs.webkit.org/show_bug.cgi?id=17881
399           a little cleanup for HTMLTextAreaElement
400
401         Tests: fast/forms/textarea-default-value-leading-newline.html
402                fast/forms/textarea-linewrap-dynamic.html
403
404         * html/HTMLTextAreaElement.cpp:
405         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Tweaked names/
406         (WebCore::HTMLTextAreaElement::selectionStart): Ditto, also use early return
407         and check for < 0 rather than -1 specifically.
408         (WebCore::HTMLTextAreaElement::selectionEnd): Ditto.
409         (WebCore::HTMLTextAreaElement::setSelectionStart): Early return.
410         (WebCore::HTMLTextAreaElement::setSelectionEnd): Ditto.
411         (WebCore::HTMLTextAreaElement::select): Ditto.
412         (WebCore::HTMLTextAreaElement::setSelectionRange): Ditto.
413         (WebCore::HTMLTextAreaElement::parseMappedAttribute): Changed value parsing
414         to treat unknown values as meaning "default" rather than "leave value as-is".
415         Only call setNeedsLayoutAndPrefWidthsRecalc when mode changed.
416         (WebCore::HTMLTextAreaElement::createRenderer): Removed name of unused argument.
417         (WebCore::HTMLTextAreaElement::appendFormData): Updated for name changes.
418         (WebCore::HTMLTextAreaElement::isKeyboardFocusable): Got rid of unnneeded explicit
419         class name in isFocusable call.
420         (WebCore::HTMLTextAreaElement::isMouseFocusable): Ditto.
421         (WebCore::HTMLTextAreaElement::updateFocusAppearance): Tweaked formatting.
422         (WebCore::HTMLTextAreaElement::defaultEventHandler): Ditto.
423         (WebCore::HTMLTextAreaElement::updateValue): Early return.
424         (WebCore::HTMLTextAreaElement::setValue): Got rid of intermediate value to
425         eliminate on small refcount churn.
426         (WebCore::HTMLTextAreaElement::defaultValue): Got rid of unneeded redundant
427         string length checks, since String already checks all indexing and returns 0.
428         (WebCore::HTMLTextAreaElement::setDefaultValue): Added code to normalize
429         line endings and add a leading line ending to fix cases where the first
430         character is a newline.
431         (WebCore::HTMLTextAreaElement::accessKeyAction): Removed name of unused arg.
432         (WebCore::HTMLTextAreaElement::accessKey): Changed return value to avoid
433         refcount churn.
434         (WebCore::HTMLTextAreaElement::selection): Updated names and use < 0 instead
435         of -1 specifically.
436
437         * html/HTMLTextAreaElement.h: Replaced wrap function with more-specific
438         shouldWrapText one. Changed return value of accessKey. Made WrapMethod enum
439         provate and renamed the values. Renamed cachedSelStart and cachedSelEnd to
440         m_cachedSelectionStart and m_cachedSelectionEnd.
441
442         * rendering/RenderTextControl.cpp:
443         (WebCore::RenderTextControl::createInnerTextStyle): Updated for change to
444         HTMLTextAreaElement wrap function.
445
446 2008-03-16  Antti Koivisto  <antti@apple.com>
447
448         Reviewed by Mitz.
449
450         Fix http/tests/security/frame-loading-via-document-write.html
451         which was broken by the preload patch.
452         
453         Don't print error message when preload fails local file security check.
454         Some minor refactoring.
455
456         * html/PreloadScanner.cpp:
457         (WebCore::PreloadScanner::emitTag):
458         (WebCore::PreloadScanner::emitCSSRule):
459         * loader/Cache.cpp:
460         (WebCore::Cache::requestResource):
461         * loader/Cache.h:
462         * loader/DocLoader.cpp:
463         (WebCore::DocLoader::requestResource):
464         (WebCore::DocLoader::preload):
465         (WebCore::DocLoader::printPreloadStats):
466         * loader/DocLoader.h:
467
468 2008-03-16  Antti Koivisto  <antti@apple.com>
469
470         Reviewed by Darin.
471         
472         Fix http://bugs.webkit.org/show_bug.cgi?id=17862
473         REGRESSION (r31038): Reproducible crash under DocLoader::checkForReload() at marware.com
474         
475         This was a memory smasher introduced by the preloading patch. 
476         If a script resource was marked uncacheable, early deletion of the 
477         Request object would cause deletion of the CachedResource too if
478         it was referred more than once in a single document.
479
480         Test: http/tests/misc/uncacheable-script-repeated.html
481
482         * loader/loader.cpp:
483         (WebCore::Loader::Host::servePendingRequests):
484         (WebCore::Loader::Host::didFinishLoading):
485
486 2008-03-16  Yuzhu Shen  <yuzhu.shen@gmail.com>
487
488         Reviewed by Darin.
489
490         Fix bug http://bugs.webkit.org/show_bug.cgi?id=17714
491         <img href="#"> should go to top of the page.
492
493         Test: fast/html/empty-fragment-id-goto-top.html
494
495         * loader/FrameLoader.cpp:
496         (WebCore::FrameLoader::gotoAnchor):
497
498 2008-03-16  Thiago Macieira  <thiago.macieira@trolltech.com>
499
500         Reviewed by Darin.
501
502         Don't use RefPtr in classes you haven't seen the implementation of.
503
504         Forward-declaration and declaration of RefPtr<Foo> is ok. But you
505         cannot *use* said objects until Foo is defined. This is true even for
506         initialisation with a 0.
507
508         Seems the HP aCC compiler is more strict here than gcc.
509
510         * editing/SplitTextNodeCommand.h:
511         * page/FrameTree.h:
512         * xml/XPathExpressionNode.h:
513
514 2008-03-16  Darin Adler  <darin@apple.com>
515
516         Reviewed by Mitz.
517
518         - fix http://bugs.webkit.org/show_bug.cgi?id=14941
519           <rdar://problem/5404093> textarea value from JavaScript includes extra newline
520
521         Test: fast/forms/textarea-trailing-newline.html
522
523         * rendering/RenderTextControl.cpp:
524         (WebCore::RenderTextControl::finishText): Added code to strip the trailing
525         newline. It's possible there are some obscure cases where this is not wanted,
526         but I couldn't find any. If someone finds a case where this is bad, we can
527         make the code conditional.
528
529 2008-03-16  Darin Adler  <darin@apple.com>
530
531         Reviewed by Mitz.
532
533         - fix http://bugs.webkit.org/show_bug.cgi?id=17876
534           Attempting to visit Ofcom page causes crash
535
536         This is causing intermittent crashes on some existing test cases on the buildbot
537         too; I don't have a 100% test case right now, but it should be easy to add one later
538         and this does fix a crash in a test we already have.
539
540         * dom/CharacterData.cpp:
541         (WebCore::CharacterData::CharacterData): Initialize m_data to the empty string,
542         not the null string. The class assumes the string can never being null.
543         (WebCore::CharacterData::setData): If asked to set the data to the null string,
544         set it to the empty string instead. This matches what the (non-empty) constructor
545         has always done.
546
547 2008-03-15  Timothy Hatcher  <timothy@apple.com>
548
549         Reviewed by Adam Roben.
550
551         Bug 17870: Web Inspector console should feel more like a terminal
552         http://bugs.webkit.org/show_bug.cgi?id=17870
553
554         Bug 14390: Console input area should be more noticeable
555         http://bugs.webkit.org/show_bug.cgi?id=14390
556
557         Adds tab completion, auto completion and a blended input prompt.
558         The prompt is also focused when the console is shown.
559            Implements a new look, that will be part of the UI refresh.
560
561         * page/inspector/ConsolePanel.js: 
562         (WebInspector.ConsolePanel): Renamed a few properties.
563         (WebInspector.ConsolePanel.get/set promptText): Property to set
564         and get the current prompt text. Does not affect command history.
565         (WebInspector.ConsolePanel.show): Make the prompt focus on show.
566         (WebInspector.ConsolePanel.acceptAutoComplete): Accepts any
567         pending auto complete text.
568         (WebInspector.ConsolePanel.clearAutoComplete): Cancels any pending
569         auto complete text.
570         (WebInspector.ConsolePanel.autoCompleteSoon): Sets a timeout to auto
571         complete in 250 ms, only if there isn't a pending auto complete.
572         (WebInspector.ConsolePanel.complete): 
573         (WebInspector.ConsolePanel.completions): Generate a list of possible
574         completions based on the prefix and the previous expression ranges.
575         (WebInspector.ConsolePanel._backwardsRange): Helper to scan backwards
576         from a node and offset to find a start node and offset of the first
577         character found in the characters string.
578         (WebInspector.ConsolePanel._evalInInspectedWindow): Helper to eval in the
579         inspected window.
580         (WebInspector.ConsolePanel._caretInsidePrompt): Returns true if the selection
581         is collapsed and is inside the prompt element.
582         (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Moves the selection
583         to the end of the prompt.
584         (WebInspector.ConsolePanel._onTabPressed): Calls complete on
585         tab press.
586         (WebInspector.ConsolePanel._onEnterPressed): Call clearAutoComplete so the
587         autocompletion text is not evaluated.
588
589         * page/inspector/Images/errorIcon.png: New image.
590         * page/inspector/Images/userInputIcon.png: Added.
591         * page/inspector/Images/userInputPreviousIcon.png: Added.
592         * page/inspector/Images/warningIcon.png: New image.
593         * page/inspector/inspector.css: New refreshed UI.
594
595 2008-03-15  Mark Mentovai  <mark@moxienet.com>
596
597         Reviewed and landed by Darin.
598
599         - http://bugs.webkit.org/show_bug.cgi?id=17833
600           use file extensions instead of explicit file types in WebCore's Xcode project
601
602         * WebCore.xcodeproj/project.pbxproj: Remove unnecessary
603           uses of explicitFileType, preferring lastKnownFileType ("File Type:
604           Default for File" in Xcode's File Info's General tab).  Files below
605           that relied on an explicit file type setting other than what would
606           be implied by their extensions have been renamed to have correct
607           extensions.
608         * bridge/jni/jni_jsobject.cpp: Removed.
609         * bridge/jni/jni_jsobject.mm: Copied from bridge/jni/jni_jsobject.cpp.
610         * loader/mac/LoaderNSURLExtras.m: Removed.
611         * loader/mac/LoaderNSURLExtras.mm: Copied from loader/mac/LoaderNSURLExtras.m.
612         * platform/mac/SharedTimerMac.cpp: Removed.
613         * platform/mac/SharedTimerMac.mm: Copied from platform/mac/SharedTimerMac.cpp.
614
615 2008-03-15  Darin Adler  <darin@apple.com>
616
617         Reviewed by Sam.
618
619         - fix http://bugs.webkit.org/show_bug.cgi?id=11997
620           Ranges are not fixed after mutation (affects Acid3 test 13)
621
622         Test: fast/dom/Range/mutation.html
623
624         * WebCore.xcodeproj/project.pbxproj: Added NodeWithIndex.h, NodeWithIndexAfter.h,
625         and NodeWithIndexBefore.h.
626
627         * dom/CharacterData.cpp:
628         (WebCore::CharacterData::setData): Replaced call to Document::removeMarkers
629         with call to Document::textRemoved.
630         (WebCore::CharacterData::insertData): Replaced call to Document::shiftMarkers
631         with call to Document::textInserted.
632         (WebCore::CharacterData::deleteData): Replaced call to Document::removeMarkers
633         and Document::shiftMarkers with call to Document::textRemoved.
634         (WebCore::CharacterData::replaceData): Replaced call to Document::removeMarkers
635         and Document::shiftMarkers with call to Document::textRemoved and
636         Document::textInserted.
637         (WebCore::CharacterData::containsOnlyWhitespace): Tweaked a bit.
638
639         * dom/ContainerNode.cpp:
640         (WebCore::ContainerNode::childrenChanged): Added a call to
641         Document::nodeChildrenChanged when the nmber of children was changed (and not
642         by the parser).
643         (WebCore::dispatchChildRemovalEvents): Updated for name change.
644
645         * dom/Document.cpp:
646         (WebCore::Document::~Document): Assert that all ranges are gone.
647         (WebCore::Document::nodeChildrenChanged): Added. Calls nodeChildrenChanged on
648         all ranges.
649         (WebCore::Document::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
650         Added code to call nodeWillBeRemoved on all ranges.
651         (WebCore::Document::textInserted): Added. Calls textInserted on all ranges and
652         also calls shiftMarkers.
653         (WebCore::Document::textRemoved): Added. Calls textRemoved on all ranges and also
654         calls removeMarkers and shiftMarkers.
655         (WebCore::Document::textNodesMerged): Added. Calls textNodesMerged on all ranges.
656         (WebCore::Document::textNodeSplit): Added. Calls textNodeSplit on all ranges.
657         (WebCore::Document::attachRange): Added. Adds range to the HashSet of all ranges
658         for this document.
659         (WebCore::Document::detachRange): Added. Removes range from the HashSet.
660         * dom/Document.h: Added the new functions and the data member.
661
662         * dom/Element.cpp:
663         (WebCore::Element::normalizeAttributes): Added. Contains the part of the
664         normalize function that's specific to Element. Better encapsulation to have it
665         here rather than in Node::normalize.
666         * dom/Element.h: Added the new function.
667
668         * dom/Node.cpp:
669         (WebCore::Node::normalize): Rewrote so it's no longer recursive. Also added
670         a call to textNodesMerged after each pair of nodes is merged but before the
671         second node is removed.
672         (WebCore::Node::traverseNextNodePostOrder): Added. Helper function used by
673         normalize, but also useful elsewhere.
674         * dom/Node.h: Added the new function.
675
676         * dom/NodeIterator.cpp:
677         (WebCore::NodeIterator::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
678         * dom/NodeIterator.h: Ditto.
679
680         * dom/ProcessingInstruction.cpp:
681         (WebCore::ProcessingInstruction::setData): Call textRemoved.
682
683         * dom/Range.cpp:
684         (WebCore::NodeWithIndex::index): Added. Computes and stores index.
685         (WebCore::NodeWithIndexBefore::indexBefore): Added. Computes and stores index.
686         (WebCore::NodeWithIndexAfter::indexAfter): Added. Computes and stores index.
687         (WebCore::Range::Range): Call attachRange.
688         (WebCore::Range::~Range): Call detachRange unless the range is already detached.
689         (WebCore::Range::commonAncestorContainer): Removed check for WRONG_DOCUMENT_ERR.
690         It's no longer possible to create a range where the two containers are non-zero
691         and have no common ancestor.
692         (WebCore::Range::isPointInRange): Rewrote expression to be more readable.
693         (WebCore::Range::compareNode): Changed local variable to use int for consistency.
694         (WebCore::Range::compareBoundaryPoints): Replaced ASSERT with ASSERT_NOT_REACHED.
695         (WebCore::Range::deleteContents): Removed check for INVALID_STATE_ERR and
696         initialization of ec to 0; both are now inside checkDeleteExtract.
697         (WebCore::Range::intersectsNode): Changed local variable to use int for consistency.
698         Also changed comparison to use < 0 and >= 0 rather than checking explicitly for 1
699         and -1.
700         (WebCore::Range::processContents): Changed code to not get the nodeType multiple
701         times on the same node, and tweaked formatting. Removed code to update the range
702         on deletion, because the normal delete logic will take care of that now.
703         (WebCore::Range::extractContents): Removed check for INVALID_STATE_ERR and
704         initialization of ec to 0; both are now inside checkDeleteExtract.
705         (WebCore::Range::insertNode): Changed local variable to use int for consistency.
706         (WebCore::Range::toString): Changed variable name to pastLast.
707         (WebCore::Range::detach): Call detachRange.
708         (WebCore::Range::checkDeleteExtract): Added check for detached range and code to
709         set ec to 0; moved here from the two callers. Also changed variable name to pastLast.
710         (WebCore::endpointNodeChildrenChanged): Added.
711         (WebCore::Range::nodeChildrenChanged): Added.
712         (WebCore::endpointNodeWillBeRemoved): Added.
713         (WebCore::Range::nodeWillBeRemoved): Added.
714         (WebCore::endpointTextInserted): Added.
715         (WebCore::Range::textInserted): Added.
716         (WebCore::endpointTextRemoved): Added.
717         (WebCore::Range::textRemoved): Added.
718         (WebCore::endpointTextNodesMerged): Added.
719         (WebCore::Range::textNodesMerged): Added.
720         (WebCore::endpointTextNodesSplit): Added.
721         (WebCore::Range::textNodeSplit): Added.
722
723         * dom/Range.h: Added new member functions.
724
725         * dom/NodeWithIndex.h: Added. Makes it so we won't find the index for the same
726         node more than once.
727         * dom/NodeWithIndexAfter.h: Added. Similar to NodeWithIndex but gives the index after a
728         node and treats a node pointer of 0 as meaning "before first node in parent container".
729         * dom/NodeWithIndexBefore.h: Added.  Similar to NodeWithIndex but treats a node pointer of 0
730         as meaning "after last node in parent container".
731
732         * dom/Text.cpp:
733         (WebCore::Text::splitText): Call textNodeSplit.
734
735         * editing/ApplyStyleCommand.cpp:
736         (WebCore::ApplyStyleCommand::applyInlineStyle): Changed variable name to pastLast.
737
738 2008-03-15  Julien Chaffraix  <julien.chaffraix@gmail.com>
739
740         Reviewed by Holger.
741
742         [CURL] Crash below ResourceHandleManager::setupPOST when job->request().httpBody() is NULL
743         http://bugs.webkit.org/show_bug.cgi?id=16906
744
745         Add null checks for httpBody() to match other ports.
746
747         Test: http/tests/xmlhttprequest/xmlhttprequest-post-crash.html
748
749         * platform/network/curl/ResourceHandleManager.cpp:
750         (WebCore::readCallback): Add null check.
751         (WebCore::ResourceHandleManager::setupPOST): Ditto.
752
753 2008-03-14  Steve Falkenburg  <sfalken@apple.com>
754
755         PGO build fixes.
756
757         * WebCore.vcproj/WebCore.vcproj:
758
759 2008-03-14  Anders Carlsson  <andersca@apple.com>
760
761         Reviewed by Sam.
762
763         <rdar://problem/5794989>
764         https://bugs.webkit.org/show_bug.cgi?id=17792
765         REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work
766
767         Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow
768         so that somewindow.open calls where the active window and 'somewindow' differ return the correct frame.
769         
770         * bindings/js/JSDOMWindowBase.cpp:
771         (WebCore::createWindow):
772         * loader/FrameLoader.cpp:
773         (WebCore::FrameLoader::createWindow):
774         * loader/FrameLoader.h:
775
776 2008-03-14  Dan Bernstein  <mitz@apple.com>
777
778         Reviewed by Mark Rowe.
779
780         - fix <rdar://problem/5797836> shadow offsets are smaller than specified
781
782         * platform/graphics/cg/GraphicsContextCG.cpp:
783         (WebCore::GraphicsContext::setShadow): Made the workaround for
784         <rdar://problem/5539388> unconditional.
785
786 2008-03-14  Adam Roben  <aroben@apple.com>
787
788         Fix it right this time
789
790         * platform/MainThread.cpp: Cast to unsigned so we can use %u in the
791         format string.
792         * platform/mac/MainThreadMac.mm:
793
794 2008-03-14  Adam Roben  <aroben@apple.com>
795
796         Mac build fix
797
798         * platform/mac/MainThreadMac.mm: Corrected a typo.
799
800 2008-03-14  Dan Bernstein  <mitz@apple.com>
801
802         Reviewed by Darin Adler.
803
804         - fix http://bugs.webkit.org/show_bug.cgi?id=17834
805           REGRESSION: floated first-letter does not work when included in table
806
807         Test: fast/css/first-letter-float.html
808
809         * rendering/RenderBlock.cpp:
810         (WebCore::RenderBlock::updateFirstLetter): Changed the search for the
811         first text node to stop at a float if that float is an existing first-
812         letter.
813
814 2008-03-14  Sam Weinig  <sam@webkit.org>
815
816         Fix Mac build
817
818         * WebCore.xcodeproj/project.pbxproj:
819
820 2008-03-13  Adam Roben  <aroben@apple.com>
821
822         Make most of callOnMainThread's implementation be cross-platform
823
824         I took the non-platform-specific parts of MainThreadWin.cpp and moved
825         them to a new MainThread.cpp. Each platform is now responsible for
826         implementing one function, scheduleDispatchFunctionsOnMainThread,
827         which is supposed to set things up so that
828         dispatchFunctionsFromMainThread gets called from the main thread in
829         the near future.
830
831         Reviewed by Alexey.
832
833         * GNUmakefile.am: Added MainThread.cpp to the project.
834         * WebCore.pro: Ditto.
835         * WebCore.vcproj/WebCore.vcproj: Ditto.
836         * WebCore.xcodeproj/project.pbxproj: Ditto.
837         * WebCoreSources.bkl: Ditto.
838         * platform/MainThread.cpp:
839           - Copied from WebCore/platform/win/MainThreadWin.cpp.
840           - Removed the Windows-specific parts.
841         (WebCore::callOnMainThread): Changed to call
842         scheduleDispatchFunctionsOnMainThread instead of PostMessage.
843         * platform/gtk/MainThreadGtk.cpp:
844         (WebCore::timeoutFired): Renamed from callFunctionOnMainThread. Now
845         just calls dispatchFunctionsFromMainThread.
846         (WebCore::scheduleDispatchFunctionsOnMainThread): Added. Calls through
847         to g_timeout_add.
848         * platform/mac/MainThreadMac.mm: Renamed WebCoreFunctionWrapper to
849         WebCoreMainThreadCaller.
850         (-[WebCoreMainThreadCaller call]): Calls through to
851         dispatchFunctionsFromMainThread.
852         (WebCore::scheduleDispatchFunctionsOnMainThread): Makes a new
853         WebCoreMainThreadCaller and calls performSelectorOnMainThread on it.
854         * platform/qt/MainThreadQt.cpp: Removed PerformFunctionEvent.
855         (WebCore::MainThreadInvoker::event): Chagned to call through to
856         dispatchFunctionsFromMainThread.
857         (WebCore::scheduleDispatchFunctionsOnMainThread): Sends an empty event
858         to the MainThreadInvoker.
859         * platform/win/MainThreadWin.cpp:
860           - Removed the non-Windows-specific parts.
861           - Removed some unnecessary initialization of static variables to 0.
862         (WebCore::ThreadingWindowWndProc): Changed to call
863         dispatchFunctionsFromMainThread.
864         (WebCore::scheduleDispatchFunctionsOnMainThread): Calls through to
865         PostMessage.
866         * platform/wx/MainThreadWx.cpp:
867         (WebCore::scheduleDispatchFunctionsOnMainThread): Added.
868
869 2008-03-14  Beth Dakin  <bdakin@apple.com>
870
871         Reviewed by Geoff.
872
873         Fix for <rdar://problem/5728171> Potential PLT speedup: don't 
874         realloc every time inside NamedAttrMap::addAttribute
875
876         The speed-up for this turned out to be so small that it is mostly 
877         imperceptible. It is likely that it is a tiny boost, though, and 
878         the new code is much cleaner.
879
880         * dom/Element.cpp:
881         (WebCore::Element::setAttributeMap): attrs is now called 
882         m_attributes
883         * dom/NamedAttrMap.cpp: The array attrs is now the Vector of 
884         RefPtrs called m_attributes, and there is no longer any need for 
885         the len member variable. 
886         (WebCore::NamedAttrMap::NamedAttrMap): 
887         (WebCore::NamedAttrMap::item):
888         (WebCore::NamedAttrMap::getAttributeItem):
889         (WebCore::NamedAttrMap::clearAttributes):
890         (WebCore::NamedAttrMap::operator=):
891         (WebCore::NamedAttrMap::addAttribute):
892         (WebCore::NamedAttrMap::removeAttribute):
893         (WebCore::NamedAttrMap::mapsEquivalent):
894         * dom/NamedAttrMap.h: Same.
895         (WebCore::NamedAttrMap::length):
896         (WebCore::NamedAttrMap::attributeItem):
897         (WebCore::NamedAttrMap::shrinkToLength):
898         (WebCore::NamedAttrMap::reserveCapacity):
899         * html/HTMLTokenizer.cpp: One of the benefits of the old array was 
900         that it never took up more memory than it needed to. So the 
901         tokenizer utilizes new member functions on NamedAttrMap 
902         (shrinkToLength and reserveCapacity) to try to keep memory usage at 
903         a minimum. 
904         (WebCore::Token::addAttribute):
905         (WebCore::HTMLTokenizer::processToken):
906
907 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
908
909         BUILD FIX when ENABLE(MAC_JAVA_BRIDGE) set to 0.
910
911         * page/mac/FrameMac.mm: Move up #if ENABLE(MAC_JAVA_BRIDGE) guard
912         to comment out unused code.
913
914 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
915
916         Unify concept of enabling the Mac Java bridge.
917
918         Reviewed by Darin and Anders.
919
920         No test cases added since there is no change in functionality.
921
922         * DerivedSources.make: Added check for ENABLE_MAC_JAVA_BRIDGE macro.
923         If defined as "1", add WebCore.JNI.exp to WEBCORE_EXPORT_DEPENDENCIES.
924         * WebCore.JNI.exp: Added.
925         * WebCore.base.exp: Moved exported JNI methods to WebCore.JNI.exp.
926
927         * bridge/jni/jni_class.cpp: Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
928         * bridge/jni/jni_class.h: Ditto.
929         * bridge/jni/jni_instance.cpp: Ditto.
930         * bridge/jni/jni_instance.h: Ditto.
931         * bridge/jni/jni_jsobject.cpp: Ditto.
932         * bridge/jni/jni_jsobject.h: Ditto.
933         * bridge/jni/jni_objc.mm: Ditto.
934         * bridge/jni/jni_runtime.cpp: Ditto.
935         * bridge/jni/jni_runtime.h: Ditto.
936         * bridge/jni/jni_utility.cpp: Ditto.
937         * bridge/jni/jni_utility.h: Ditto.
938
939         * bridge/runtime.cpp: Removed unused #include statements.
940         * bridge/runtime.h:
941         (KJS::Bindings::Instance::BindingLanguage): Added #if ENABLE(MAC_JAVA_BRIDGE)
942         guard for JavaLanguage enum.  Also added #if PLATFORM(MAC) guard for
943         ObjectiveCLanguage enum to match corresponding code in runtime.cpp.
944
945         * config.h: Removed definition of HAVE_JNI.
946
947         * loader/FrameLoaderClient.h:
948         (WebCore::FrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
949         * page/Frame.cpp:
950         (WebCore::Frame::Frame): Ditto.
951         * page/Frame.h:
952         (WebCore::Frame::initJavaJSBindings): Ditto.
953         * page/mac/FrameMac.mm:
954         (WebCore::Frame::createScriptInstanceForWidget): Ditto.
955         (WebCore::Frame::initJavaJSBindings): Ditto.
956
957 2008-03-13  Darin Adler  <darin@apple.com>
958
959         * html/PreloadScanner.h: Corrected license.
960         * html/PreloadScanner.cpp: Corrected license.
961
962 2008-03-13  Mark Mentovai  <mark@moxienet.com>
963
964         Reviewed by darin.  Landed by eseidel.
965
966         * platform/FloatConversion.h: Include a header to get CoreGraphics
967         types when using CoreGraphics types.
968
969 2008-03-13  Mark Mentovai  <mark@moxienet.com>
970
971         Reviewed by eseidel.  Landed by eseidel.
972
973         * WebCore.xcodeproj/project.pbxproj:
974         * css/CSSParser.cpp:
975         * css/makeprop.pl:
976         Move CSSPropertyNames.c to CSSPropertyNames.cpp
977
978 2008-03-13  Mark Mentovai  <mark@moxienet.com>
979
980         Reviewed by eseidel.  Landed by eseidel.
981
982         * platform/Arena.h: Use statement1;statement2 instead of
983         (statement1,statement2) in CLEAR_UNUSED.
984
985 2008-03-13  Tommi Komulainen  <tommi.komulainen@iki.fi>
986
987         Reviewed by Alp Toker.
988
989         http://bugs.webkit.org/show_bug.cgi?id=17821
990         [SOUP] POST requests are empty
991
992         Send the HTTP request body as well.
993
994         * platform/network/soup/ResourceHandleSoup.cpp:
995         (WebCore::ResourceHandle::start):
996
997 2008-03-13  Dan Bernstein  <mitz@apple.com>
998
999         Reviewed by Dave Hyatt.
1000
1001         - fix http://bugs.webkit.org/show_bug.cgi?id=17819
1002           Border-collapse: collapse later cell wins on PC, earlier cell on Mac
1003
1004         Test: fast/table/border-collapsing/equal-precedence-resolution.html
1005
1006         * rendering/RenderTableCell.cpp:
1007         (WebCore::RenderTableCell::collapsedLeftBorder): When calling
1008         compareBorders() with borders that may have the same precedence, made
1009         sure to pass the border belonging to the earlier (in document order)
1010         element first, since compareBorders() prefers the first argument when
1011         there is a tie.
1012         (WebCore::RenderTableCell::collapsedRightBorder): Ditto.
1013         (WebCore::RenderTableCell::collapsedTopBorder): Ditto.
1014
1015 2008-03-13  Adam Roben  <aroben@apple.com>
1016
1017         wx build fix and Windows leak fix after r31034
1018
1019         * platform/graphics/wx/ImageWx.cpp:
1020         (WebCore::Image::loadPlatformResource): Use SharedBuffer::create.
1021         * platform/win/SharedBufferWin.cpp:
1022         (WebCore::SharedBuffer::createWithContentsOfFile): Ditto (we were
1023         leaking the SharedBuffer here before).
1024
1025 2008-03-13  Antti Koivisto  <antti@apple.com>
1026
1027         Reviewed by Eric.
1028
1029         Correct a few issues spotted by Mike Belshe. 
1030
1031         * html/PreloadScanner.cpp:
1032         (WebCore::PreloadScanner::tokenize):
1033         * loader/loader.cpp:
1034         (WebCore::Loader::cancelRequests):
1035
1036 2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>
1037
1038         Fix GTK+ build for SharedBuffer changes.
1039
1040         * platform/graphics/gtk/ImageGtk.cpp:
1041         (Image::loadPlatformResource):
1042
1043 2008-03-13  Steve Falkenburg  <sfalken@apple.com>
1044
1045         More PGO build fixes.
1046
1047         * WebCorePrefix.cpp:
1048
1049 2008-03-13  Antti Koivisto  <antti@apple.com>
1050
1051         Reviewed by Darin.
1052         
1053         Make page loads go fast.
1054         
1055         http://bugs.webkit.org/show_bug.cgi?id=17480
1056
1057         - Implement speculative preloading. When a script load blocks the main parser, use a side 
1058           parser to pick up more resources.
1059         - Implement per-host load queues, prioritize scripts and stylesheets over images.
1060         
1061         Depending on content and network latency this may speed things up quite a bit.
1062
1063         * WebCore.xcodeproj/project.pbxproj:
1064         * dom/Document.cpp:
1065         (WebCore::Document::implicitClose):
1066         Clear the preloads after laoding completes.
1067         
1068         * html/HTMLLinkElement.cpp:
1069         (WebCore::HTMLLinkElement::parseMappedAttribute):
1070         (WebCore::HTMLLinkElement::tokenizeRelAttribute):
1071         * html/HTMLLinkElement.h:
1072         Make tokenizeRelAttribute() public static so it can be used from elsewhere.
1073         Eliminate a pointless bitfield so I can get references.
1074         
1075         * html/HTMLTokenizer.cpp:
1076         (WebCore::HTMLTokenizer::scriptHandler):
1077         (WebCore::HTMLTokenizer::scriptExecution):
1078         (WebCore::HTMLTokenizer::write):
1079         * html/HTMLTokenizer.h:
1080         Spin up the preload scanner whenever a script load blocks the parser. One scanner tracks the end of 
1081         the document while temporary ones are created as needed to scan document.write() output.
1082         
1083         * html/PreloadScanner.cpp: Added.
1084         (WebCore::PreloadScanner::PreloadScanner):
1085         (WebCore::PreloadScanner::~PreloadScanner):
1086         (WebCore::PreloadScanner::begin):
1087         (WebCore::PreloadScanner::end):
1088         (WebCore::PreloadScanner::reset):
1089         (WebCore::PreloadScanner::write):
1090         (WebCore::isWhitespace):
1091         (WebCore::PreloadScanner::clearLastCharacters):
1092         (WebCore::PreloadScanner::rememberCharacter):
1093         (WebCore::PreloadScanner::lastCharactersMatch):
1094         (WebCore::legalEntityFor):
1095         (WebCore::PreloadScanner::consumeEntity):
1096         (WebCore::PreloadScanner::tokenize):
1097         (WebCore::PreloadScanner::processAttribute):
1098         (WebCore::PreloadScanner::emitCharacter):
1099         (WebCore::PreloadScanner::tokenizeCSS):
1100         (WebCore::PreloadScanner::emitTag):
1101         (WebCore::PreloadScanner::emitCSSRule):
1102         * html/PreloadScanner.h: Added.
1103         (WebCore::PreloadScanner::inProgress):
1104         (WebCore::PreloadScanner::):
1105         HTML5 tokenization plus some glue code. Fake CSS parsing thrown in just for fun.
1106         
1107         * loader/Cache.cpp:
1108         (WebCore::Cache::pruneDeadResources):
1109         Preloads have zero refcount, avoid kicking them out too early.
1110         
1111         * loader/CachedResource.cpp:
1112         (WebCore::CachedResource::CachedResource):
1113         (WebCore::CachedResource::ref):
1114         * loader/CachedResource.h:
1115         (WebCore::CachedResource::):
1116         (WebCore::CachedResource::preloadResult):
1117         (WebCore::CachedResource::setRequestedFromNetworkingLayer):
1118         (WebCore::CachedResource::canDelete):
1119         (WebCore::CachedResource::isPreloaded):
1120         (WebCore::CachedResource::increasePreloadCount):
1121         (WebCore::CachedResource::decreasePreloadCount):
1122         Keep track which resources are preloads. Avoid deleting them. Track
1123         at which point of the loading preloads get utilized to enable some interesting 
1124         statistics.
1125         
1126         * loader/DocLoader.cpp:
1127         (WebCore::DocLoader::~DocLoader):
1128         (WebCore::DocLoader::checkForReload):
1129         (WebCore::DocLoader::registerPreload):
1130         (WebCore::DocLoader::clearPreloads):
1131         (WebCore::DocLoader::printPreloadStats):
1132         * loader/DocLoader.h:
1133         Ensure we utilize preloaded resources during reloads.
1134         Keep a list of all preloads in the document. Clear the preloads after
1135         parsing is complete. Some debug statistics.
1136         
1137         * loader/DocumentLoader.cpp:
1138         (WebCore::DocumentLoader::isLoadingInAPISense):
1139         Avoid signaling that loading is complete too early. 
1140         
1141         * loader/loader.cpp:
1142         (WebCore::Loader::Loader):
1143         (WebCore::Loader::~Loader):
1144         (WebCore::Loader::determinePriority):
1145         (WebCore::Loader::load):
1146         (WebCore::Loader::scheduleServePendingRequests):
1147         (WebCore::Loader::requestTimerFired):
1148         (WebCore::Loader::servePendingRequests):
1149         (WebCore::Loader::cancelRequests):
1150         (WebCore::Loader::Host::Host):
1151         (WebCore::Loader::Host::~Host):
1152         (WebCore::Loader::Host::addRequest):
1153         (WebCore::Loader::Host::hasRequests):
1154         (WebCore::Loader::Host::servePendingRequests):
1155         (WebCore::Loader::Host::didFinishLoading):
1156         (WebCore::Loader::Host::didFail):
1157         (WebCore::Loader::Host::didReceiveResponse):
1158         (WebCore::Loader::Host::didReceiveData):
1159         (WebCore::Loader::Host::cancelPendingRequests):
1160         (WebCore::Loader::Host::cancelRequests):
1161         * loader/loader.h:
1162         (WebCore::Loader::):
1163         Distribute load requests to per-host priority queues. Limit the number of loads issued to the 
1164         networking layer so we have better changes of getting important requests through first.
1165         Prioritize scripts > stylesheets > images.
1166
1167 2008-03-13  David Hyatt  <hyatt@apple.com>
1168
1169         This patch makes full page zoom work pretty well. It fixes repainting so that it works when transforms
1170         are set on the RenderView. It also implements the "smart layout" behavior that other browsers support when
1171         zooming. The page will still try to constrain to the viewport size even when zoomed.
1172
1173         Reviewed by john
1174
1175         * dom/Document.cpp:
1176         (WebCore::Document::recalcStyle):
1177         Make sure to test for transform changes even when there is no zoom.  This fixes repainting issues
1178         caused by jumping from a zoomed state back to the standard size.
1179
1180         * page/FrameView.cpp:
1181         (WebCore::FrameView::adjustViewSize):
1182         Adjust for the zoom factor (the render tree is in unzoomed coordinates, but the scrollbars of the view
1183         need to handle zoomed coordinates).
1184
1185         * rendering/RenderBox.cpp:
1186         (WebCore::RenderBox::calcHeight):
1187         Fix the body-sizing-to-the-view-height quirk so that it takes the zoom factor into account when
1188         stretching to fill the viewport.
1189
1190         * rendering/RenderLayer.cpp:
1191         (WebCore::RenderLayer::updateLayerPositions):
1192         (WebCore::RenderLayer::setHasVisibleContent):
1193         Remove the FIXMEs now that absoluteClippedOverflowRect works with transforms on the RenderView.
1194
1195         * rendering/RenderView.cpp:
1196         (WebCore::RenderView::calcHeight):
1197         (WebCore::RenderView::calcWidth):
1198         Make sure the calculated width/height take the zoom factor into account in order to get the "smart layout"
1199         behavior.
1200
1201         (WebCore::RenderView::layout):
1202         When deciding whether children have to get a relayout, we need to check the zoomed width/height and not just
1203         the viewport size.
1204
1205         (WebCore::RenderView::computeAbsoluteRepaintRect):
1206         Patched to take into account transforms set on the RenderView.
1207
1208         (WebCore::RenderView::docHeight):
1209         (WebCore::RenderView::docWidth):
1210         Patched to just always use m_width and m_height initially, since those have already been adjusted for
1211         the zoom factor.
1212
1213         (WebCore::RenderView::zoomedHeight):
1214         (WebCore::RenderView::zoomedWidth):
1215         * rendering/RenderView.h:
1216         New helper methods for obtaining the adjusted width/height of the viewport taking into account the
1217         zoom factor.
1218
1219 2008-03-13  Anders Carlsson  <andersca@apple.com>
1220
1221         Build fix.
1222
1223         * WebCore.base.exp:
1224
1225 2008-03-13  Anders Carlsson  <andersca@apple.com>
1226
1227         Reviewed by Adam.
1228
1229         Get rid of actualRequest, it is not used anymore. Also, get rid of 
1230         initialRequest and replace all uses with originalRequest because those are
1231         the same thing.
1232         
1233         * loader/DocumentLoader.cpp:
1234         * loader/DocumentLoader.h:
1235         * loader/FrameLoader.cpp:
1236         (WebCore::FrameLoader::initialRequest):
1237         (WebCore::FrameLoader::originalRequestURL):
1238
1239 2008-03-13  Brady Eidson  <beidson@apple.com>
1240
1241         Reviewed by Anders
1242
1243         Convert SharedBuffer to start with a refCount of 1
1244
1245         * loader/ImageDocument.cpp:
1246         (WebCore::ImageTokenizer::finish):
1247
1248         * loader/ResourceLoader.cpp:
1249         (WebCore::ResourceLoader::addData):
1250         (WebCore::ResourceLoader::willStopBufferingData):
1251
1252         * loader/icon/IconDatabase.cpp:
1253         (WebCore::IconDatabase::defaultIcon):
1254         (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
1255
1256         * loader/loader.cpp:
1257         (WebCore::Loader::didReceiveData):
1258
1259         * platform/SharedBuffer.h:
1260         (WebCore::SharedBuffer::create): Make all constructors private, add ::create() calls
1261         * platform/SharedBuffer.cpp:
1262         (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
1263         (WebCore::SharedBuffer::copy):
1264         * platform/mac/SharedBufferMac.mm:
1265         (WebCore::SharedBuffer::wrapNSData):
1266         (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
1267
1268 2008-03-13  Steve Falkenburg  <sfalken@apple.com>
1269
1270         PGO build fixes.
1271         
1272         Disable PGO for normal release builds.
1273         Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets.
1274
1275         * WebCore.vcproj/WebCore.vcproj:
1276
1277 2008-03-13  Anders Carlsson  <andersca@apple.com>
1278
1279         Reviewed by Darin.
1280
1281         Make a bunch of DocumentLoader setters/getters inline.
1282         
1283         * loader/DocumentLoader.cpp:
1284         * loader/DocumentLoader.h:
1285         (WebCore::DocumentLoader::isStopping):
1286         (WebCore::DocumentLoader::setCommitted):
1287         (WebCore::DocumentLoader::isCommitted):
1288         (WebCore::DocumentLoader::isLoading):
1289         (WebCore::DocumentLoader::setLoading):
1290         (WebCore::DocumentLoader::response):
1291         (WebCore::DocumentLoader::mainDocumentError):
1292         (WebCore::DocumentLoader::setResponse):
1293         (WebCore::DocumentLoader::isClientRedirect):
1294         (WebCore::DocumentLoader::setIsClientRedirect):
1295         (WebCore::DocumentLoader::overrideEncoding):
1296         (WebCore::DocumentLoader::responses):
1297         (WebCore::DocumentLoader::triggeringAction):
1298         (WebCore::DocumentLoader::setTriggeringAction):
1299         (WebCore::DocumentLoader::setOverrideEncoding):
1300         (WebCore::DocumentLoader::setLastCheckedRequest):
1301         (WebCore::DocumentLoader::lastCheckedRequest):
1302         (WebCore::DocumentLoader::title):
1303         (WebCore::DocumentLoader::setLoadingFromCachedPage):
1304         (WebCore::DocumentLoader::isLoadingFromCachedPage):
1305
1306 2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>
1307
1308         Fix builds without SVG enabled.
1309
1310         * page/Frame.cpp:
1311         (Frame::shouldApplyTextZoom):
1312         (Frame::shouldApplyPageZoom):
1313
1314 2008-03-13  Simon Hausmann  <hausmann@webkit.org>
1315
1316         Fix the Qt build.
1317
1318         * bridge/qt/qt_instance.cpp:
1319         (KJS::Bindings::QtInstance::getQtInstance):
1320         (KJS::Bindings::QtInstance::getRuntimeObject):
1321         * bridge/qt/qt_instance.h:
1322         (KJS::Bindings::QtInstance::create):
1323         * bridge/qt/qt_runtime.cpp:
1324         (KJS::Bindings::convertQVariantToValue):
1325         (KJS::Bindings::QtConnectionObject::execute):
1326         * page/qt/FrameQt.cpp:
1327         (WebCore::Frame::createScriptInstanceForWidget):
1328
1329 2008-03-12  Sam Weinig  <sam@webkit.org>
1330
1331         Reviewed by Darin Adler.
1332
1333         Fix <rdar://problem/5784773>
1334         Crash loading QT movies @ apple.com/ipodtouch/features.html with a PAC file (WebKitThreadingException)
1335
1336         Make bridged RuntimeObjects get collected on the main thread only. This is necessary
1337         because clients of the bridged objects are unlikely to prepared for a collection on 
1338         non-main thread, which can happen with a PAC file.
1339
1340         * bridge/runtime_object.cpp:
1341         (RuntimeObjectImp::RuntimeObjectImp):
1342
1343 2008-03-12  Adam Roben  <aroben@apple.com>
1344
1345         Fix Bug 17815: Inspector's DOM tree should descend into subframes
1346
1347         <http://bugs.webkit.org/show_bug.cgi?id=17815>
1348
1349         Reviewed by Tim.
1350
1351         * page/inspector/DocumentPanel.js:
1352         (WebInspector.DocumentPanel.revealNode): Changed to provide
1353         _isAncestorIncludingParentFramesWithinPanel and
1354         _parentNodeOrFrameElementWithinPanel for the isAncestor and getParent
1355         parameters to findTreeElement so that parent frames will be searched.
1356         (WebInspector.DocumentPanel.updateBreadcrumb):
1357           - Changed while loop to for loop
1358           - Use _parentNodeOrFrameElementWithinPanel instead of
1359             Node.parentNode to move to the next node
1360           - The loop now ends when we reach the DocumentPanel's document node
1361           - Traversal past other Document nodes is now allowed
1362           - We add the "start" class to the final crumb after the loop exits
1363         (WebInspector.DocumentPanel._getDocumentForNode): Added. Simple helper
1364         that returns the node itself if the node is a Document node, or the
1365         node's ownerDocument otherwise.
1366         (WebInspector.DocumentPanel._parentNodeOrFrameElementWithinPanel):
1367         Added. Returns the node's parent node or, in the case of a Document
1368         node, the node's window's owning frame element, but will not return a
1369         node that is in a parent frame of the DocumentPanel's Document.
1370         (WebInspector.DocumentPanel._isAncestorIncludingParentFramesWithinPanel):
1371         Added. Returns true if a is an ancestor of b if a is an ancestor of a
1372         frame element whose subframe(s) contain b.
1373         (WebInspector.DOMNodeTreeElement): We now consider ourselves to have
1374         children if we have a contentDocument.
1375         (WebInspector.DOMNodeTreeElement.onpopulate): Moved the appendChild
1376         loop into a function so that we can add both children of our
1377         contentDocument and children of our node to the tree.
1378         (WebInspector.DOMNodeTreeElement.ondblclick): Changed so that we get
1379         the rootDOMNode by traversing the tree outline hierarchy instead of
1380         the DOM hierarchy so that we can easily jump up to a parent frame.
1381
1382 2008-03-12  Adam Roben  <aroben@apple.com>
1383
1384         Update the styles/metrics panes and breadcrumb after editing DOM
1385         attributes
1386
1387         Reviewed by Tim.
1388
1389         * page/inspector/DocumentPanel.js:
1390         (WebInspector.DocumentPanel.set focusedDOMNode): Moved code to update
1391         the parts of the DocumentPanel other than the DOM tree into a new
1392         function, _focusedNodeChanged.
1393         (WebInspector.DocumentPanel._focusedNodeChanged): Added. The
1394         forceUpdate parameter specifies whether the update should occur even
1395         if the focused node hasn't changed since the last update.
1396         (WebInspector.DocumentPanel.updateBreadcrumb): Added a forceUpdate
1397         parameter. If forceUpdate is true, we always rebuild the breadcrumbs.
1398         (WebInspector.DocumentPanel.updateStyles): Added a forceUpdate
1399         parameter. If forceUpdate is true, we always rebuild the styles pane.
1400         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added a
1401         call to DocumentPanel._focusedNodeChanged. We have to force the update
1402         because we haven't changed the focused node (the attributes of the
1403         node have changed).
1404         * page/inspector/StylesSidebarPane.js:
1405         (WebInspector.StylesSidebarPane.update): Added a forceUpdate
1406         parameter. If forceUpdate is true we always rebuild the styles.
1407
1408 2008-03-12  Mark Rowe  <mrowe@apple.com>
1409
1410         Further Gtk and Qt build fixes.
1411
1412         * bridge/runtime.cpp:
1413         (KJS::Bindings::Instance::createRuntimeObject): Adapt Qt-only code for change to PassRefPtr.
1414         * page/gtk/FrameGtk.cpp: Add missing include.
1415
1416 2008-03-12  Mark Rowe  <mrowe@apple.com>
1417
1418         Fix Gtk and Qt builds.
1419
1420         * page/gtk/FrameGtk.cpp:
1421         * page/qt/FrameQt.cpp:
1422
1423 2008-03-12  Mark Rowe  <mrowe@apple.com>
1424
1425         Mac build fix.
1426
1427         * WebCore.base.exp:  Remove symbol.
1428
1429 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
1430
1431         Build fix.
1432
1433         * page/win/FrameWin.cpp:
1434
1435 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
1436
1437         Build fix.
1438
1439         * plugins/win/PluginViewWin.cpp:
1440         (WebCore::PluginView::bindingInstance):
1441
1442 2008-03-12  Darin Adler  <darin@apple.com>
1443
1444         Reviewed by Anders.
1445
1446         - http://bugs.webkit.org/show_bug.cgi?id=17640
1447           eliminate WebCoreFrameBridge
1448
1449         * WebCore.base.exp: Added more exports, needed by code moved from WebCoreFrameBridge
1450         to WebFrame in WebKit.
1451         * WebCore.xcodeproj/project.pbxproj: Added more headers, same reason. Also deleted
1452         WebCoreFrameBridge.h and WebCoreFrameBridge.mm.
1453
1454         * page/Frame.cpp:
1455         (WebCore::Frame::Frame): Added call to initJavaJSBindings(), formerly handled by
1456         the WebCoreFrameBridge.
1457         * page/Frame.h: Added initJavaJSBindings function.
1458
1459         * page/mac/FrameMac.mm:
1460         (WebCore::updateRenderingForBindings): Moved here from WebCoreFrameBridge.
1461         (WebCore::Frame::initJavaJSBindings): Ditto; code was in the init function.
1462
1463         * page/mac/WebCoreFrameBridge.h: Removed.
1464         * page/mac/WebCoreFrameBridge.mm: Removed.
1465
1466 2008-03-12  Sam Weinig  <sam@webkit.org>
1467
1468         Reviewed by Anders Carlsson.
1469
1470         Don't go through the Document just to get the frame Element.
1471
1472         * page/DOMWindow.cpp:
1473         (WebCore::DOMWindow::frameElement):
1474
1475 2008-03-12  Anders Carlsson  <andersca@apple.com>
1476
1477         Reviewed by Geoff and Sam.
1478
1479         More Instance cleanup:
1480         
1481         * Make Instance inherit from RefCounted instead of doing its own refcounting.        
1482         * Make all Instance subclasses private, add static create methods.         
1483         * Have Instance start out with a refcount of 1.
1484         * Get rid of Instance::createBindingForLanguageInstance and call the individual 
1485           instance constructor methods instead.
1486         * Fix many methods to take and return PassRefPtr<Instance> to ensure that the
1487           refcounting is done correctly.
1488          
1489         * bridge/c/c_instance.h:
1490         (KJS::Bindings::CInstance::create):
1491         * bridge/c/c_utility.cpp:
1492         (KJS::Bindings::convertNPVariantToValue):
1493         * bridge/jni/jni_instance.cpp:
1494         (JavaInstance::invokeMethod):
1495         * bridge/jni/jni_instance.h:
1496         (KJS::Bindings::JavaInstance::create):
1497         * bridge/jni/jni_jsobject.cpp:
1498         (JavaJSObject::convertJObjectToValue):
1499         * bridge/jni/jni_runtime.cpp:
1500         (JavaField::valueFromInstance):
1501         (JavaArray::valueAt):
1502         * bridge/objc/objc_instance.h:
1503         (KJS::Bindings::ObjcInstance::create):
1504         * bridge/objc/objc_utility.mm:
1505         (KJS::Bindings::convertObjcValueToValue):
1506         * bridge/qt/qt_instance.cpp:
1507         (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
1508         (KJS::Bindings::QtInstance::getQtInstance):
1509         (KJS::Bindings::QtInstance::getRuntimeObject):
1510         * bridge/qt/qt_instance.h:
1511         * bridge/runtime.cpp:
1512         (KJS::Bindings::Instance::Instance):
1513         (KJS::Bindings::Instance::createRuntimeObject):
1514         * bridge/runtime.h:
1515         * bridge/runtime_object.cpp:
1516         (RuntimeObjectImp::RuntimeObjectImp):
1517         * bridge/runtime_object.h:
1518         * page/Frame.h:
1519         * page/mac/FrameMac.mm:
1520         (WebCore::Frame::createScriptInstanceForWidget):
1521         * page/win/FrameWin.cpp:
1522         (WebCore::Frame::createScriptInstanceForWidget):
1523         * plugins/PluginView.h:
1524         * plugins/win/PluginViewWin.cpp:
1525         (WebCore::PluginView::bindingInstance):
1526
1527 2008-03-12  Dan Bernstein  <mitz@apple.com>
1528
1529         Suggested by Darin Adler. Reviewed by Dave Hyatt.
1530
1531         - speed up BidiIterator::direction()
1532
1533         * rendering/bidi.cpp:
1534         (WebCore::BidiIterator::current): Made inline and corrected the
1535         out-of-bounds condition to work with 0-length text and offsets beyond
1536         the end of the text.
1537         (WebCore::BidiIterator::direction): Changed to call current() and not
1538         call the virtual method isListMarker() most of the time.
1539         (WebCore::addMidpoint): Removed unnecessary null-check of smidpoints.
1540         (WebCore::appendRunsForObject): Ditto.
1541
1542 2008-03-12  Adam Roben  <aroben@apple.com>
1543
1544         Make URLs not be underlined while editing them in the DOM view
1545
1546         Reviewed by Tim.
1547
1548         * page/inspector/inspector.css:
1549
1550 2008-03-12  Adam Roben  <aroben@apple.com>
1551
1552         Part of Bug 17224: DOM nodes/attributes should be editable
1553
1554         <http://bugs.webkit.org/show_bug.cgi?id=17224>
1555         <rdar://problem/5732825>
1556
1557         We now start editing if the user single-clicks on an attribute,
1558         attribute value, or text node while the parent element is selected.
1559         Previously, we started editing on double-click regardless of the
1560         selection state of the element.
1561
1562         URLs in the DOM tree are now followed on Alt/Option-click, rather than
1563         on just click.
1564
1565         Reviewed by Tim.
1566
1567         * English.lproj/InspectorLocalizedStrings.js: Added four new localized
1568         strings.
1569         * page/inspector/DocumentPanel.js:
1570         (WebInspector.DOMNodeTreeElement.onattach): Call new
1571         _makeURLSActivateOnModifiedClick.
1572         (WebInspector.DOMNodeTreeElement._makeURLsActivateOnModifiedClick):
1573         Added. Changes the tooltip of each link in this element to indicate
1574         that Alt/Option-click will follow the URL, and sets the
1575         followOnAltClick property on each link.
1576         (WebInspector.DOMNodeTreeElement.onselect): Mark that we're being
1577         selected.
1578         (WebInspector.DOMNodeTreeElement.onmousedown): If we're not currently
1579         being selected, start editing.
1580         (WebInspector.DOMNodeTreeElement.ondblclick): We no longer start
1581         editing here. We block re-rooting of the tree if we're currently
1582         editing.
1583         (WebInspector.DOMNodeTreeElement._startEditing):
1584           - Don't do anything if we're not focused
1585           - Pass the event down to _startEditingAttribute.
1586         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't do
1587         anything if the event target is a URL and the Alt/Option key is
1588         pressed -- in this case we want to follow the link.
1589         (WebInspector.DOMNodeTreeElement._updateTitle): Call
1590         _makeURLsActivateOnClick again since the anchor elements have all been
1591         recreated.
1592         * page/inspector/inspector.js:
1593         (WebInspector.documentClick): If the anchor as a followOnAltClick
1594         property and the Alt/Option key is not pressed, do nothing.
1595
1596 2008-03-12  Ada Chan  <adachan@apple.com>
1597
1598         Fixed the initial value of zoom factor.
1599
1600         Reviewed by Adam.
1601
1602         * page/Frame.cpp:
1603         (WebCore::FramePrivate::FramePrivate):
1604
1605 2008-03-12  David Hyatt  <hyatt@apple.com>
1606
1607         Make full page zoom vaguely work.  This patch uses the CSS transform system to turn on full page zoom at the
1608         document level.  There are many many bugs that I'm going to file to track all the issues (most of the issues
1609         are just bugs with transforms themselves).
1610
1611         Reviewed by Adam Roben
1612
1613         * css/CSSStyleSelector.cpp:
1614         (WebCore::CSSStyleSelector::applyProperty):
1615         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
1616         * dom/Document.cpp:
1617         (WebCore::Document::recalcStyle):
1618         * page/Frame.cpp:
1619         (WebCore::Frame::shouldApplyTextZoom):
1620         (WebCore::Frame::shouldApplyPageZoom):
1621         * page/Frame.h:
1622         * rendering/RenderLayer.cpp:
1623         (WebCore::RenderLayer::updateLayerPositions):
1624         (WebCore::RenderLayer::setHasVisibleContent):
1625         (WebCore::RenderLayer::paintLayer):
1626         (WebCore::RenderLayer::hitTestLayer):
1627         * rendering/RenderLayer.h:
1628
1629 2008-03-12  David Hyatt  <hyatt@apple.com>
1630
1631         Make the zoom factor a float and not a percent.
1632
1633         Reviewed by antti
1634
1635         * WebCore.base.exp:
1636         * css/CSSStyleSelector.cpp:
1637         (WebCore::CSSStyleSelector::applyProperty):
1638         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
1639         * page/Frame.cpp:
1640         (WebCore::Frame::zoomFactor):
1641         (WebCore::Frame::setZoomFactor):
1642         * page/Frame.h:
1643         * page/FramePrivate.h:
1644         * svg/SVGSVGElement.cpp:
1645         (WebCore::SVGSVGElement::currentScale):
1646         (WebCore::SVGSVGElement::setCurrentScale):
1647
1648 2008-03-12  David Hyatt  <hyatt@apple.com>
1649
1650         Eliminate setTextMultiplier from the bridge.  Make Webkit just call setZoomFactor on the frame directly.
1651
1652         Reviewed by Tim H.
1653
1654         * WebCore.base.exp:
1655         * page/mac/WebCoreFrameBridge.h:
1656         * page/mac/WebCoreFrameBridge.mm:
1657
1658 2008-03-12  Dan Bernstein  <mitz@apple.com>
1659
1660         Reviewed by Darin Adler and Sam Weinig.
1661
1662         - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard
1663
1664         Use CTFontCopyGraphicsFont and CTFontGetPlatformFont on Leopard instead
1665         of wkGetCGFontFromNSFont and wkGetNSFontATSUFontId, relying on NSFont
1666         and CTFontRef being toll-free bridged.
1667
1668         * WebCore.Tiger.exp:
1669         * WebCore.base.exp:
1670         * platform/graphics/mac/FontMac.mm:
1671         (WebCore::Font::drawGlyphs): Changed to use the cgFont() accessor.
1672         * platform/graphics/mac/FontPlatformData.h:
1673         Made m_cgFont a RetainPtr on Leopard.
1674         (WebCore::toCTFontRef): Added a function that encapsulates the
1675         toll-free bridging.
1676         (WebCore::FontPlatformData::FontPlatformData):
1677         (WebCore::FontPlatformData::cgFont): Added this accessor method.
1678         * platform/graphics/mac/FontPlatformDataMac.mm:
1679         (WebCore::FontPlatformData::FontPlatformData): Changed to use
1680         CoreText API on Leopard.
1681         (WebCore::FontPlatformData::setFont): Ditto.
1682         * platform/graphics/mac/SimpleFontDataMac.mm:
1683         (WebCore::initFontData):
1684         (WebCore::pathFromFont):
1685         (WebCore::SimpleFontData::platformInit):
1686         (WebCore::SimpleFontData::platformWidthForGlyph):
1687         * platform/mac/WebCoreSystemInterface.mm:
1688
1689 2008-03-12  David Harrison  <harrison@apple.com>
1690
1691         Reviewed by Darin.
1692
1693         <rdar://problem/5607382> CrashTracer: [REGRESSION] 2290 crashes in Safari at com.apple.WebCore: -[WebCoreAXObject isWebArea] + 8
1694
1695         The problem was that we lost track of the AX cache for a subframe when Frame::disconnectOwnerElement() was
1696         called, so we were unable to locate the AXObjects to de-register from AppKit's accessibility registry.
1697         Also saw that cache clearing was missing from Document::detach(), and fixed that.
1698         
1699         Also added a debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
1700         
1701         Lastly, RenderWidget::destroy() now skips trying to remove the AXObject if accessibility has never been enabled.
1702        
1703         * dom/Document.cpp:
1704         (WebCore::Document::attach):
1705         Assert that there is no AX cache (since there is no renderer).
1706         
1707         (WebCore::Document::detach):
1708         Destroy the AX cache installed on this document.
1709         
1710         (WebCore::Document::clearAXObjectCache):
1711         New. Destroy the AX cache associated with this document.
1712         
1713         (WebCore::Document::axObjectCache):
1714         Added some comments.
1715         
1716         * dom/Document.h:
1717         Declare clearAXObjectCache().
1718         
1719         * page/Frame.cpp:
1720         (WebCore::Frame::disconnectOwnerElement):
1721         Destroy the AX cache associated with this frame's document.
1722         
1723         * page/mac/AXObjectCacheMac.mm:
1724         (WebCore::AXObjectCache::remove):        
1725         * page/mac/WebCoreAXObject.mm:
1726         (-[WebCoreAXObject initWithRenderer:]):
1727         (-[WebCoreAXObject detach]):
1728         * rendering/RenderObject.cpp:
1729         (WebCore::RenderObject::RenderObject):
1730         (WebCore::RenderObject::~RenderObject):
1731         * rendering/RenderObject.h:
1732         (WebCore::RenderObject::setHasAXObject):
1733         (WebCore::RenderObject::hasAXObject):
1734         Add debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
1735         
1736         * rendering/RenderWidget.cpp:
1737         (WebCore::RenderWidget::destroy):
1738         Skip call to remove the AXObject if accessibility has never been enabled. A simple speed optimization in the
1739         very common case that the accessibility APIs are not being used. Same as in RenderObject::destroy().
1740
1741 2008-03-12  Xan Lopez  <xan@gnome.org>
1742
1743         Reviewed by Alp Toker.
1744
1745         http://bugs.webkit.org/show_bug.cgi?id=15229
1746
1747         Add Pango font backend.
1748
1749         Original patch by Sven Herzberg <sven@imendio.com>
1750
1751         * GNUmakefile.am:
1752         * platform/graphics/gtk/FontCacheGtk.cpp:
1753         (WebCore::FontCache::fontExists):
1754         * platform/graphics/gtk/FontCustomPlatformDataPango.cpp: Added.
1755         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1756         (WebCore::FontCustomPlatformData::fontPlatformData):
1757         (WebCore::releaseData):
1758         (WebCore::createFontCustomPlatformData):
1759         * platform/graphics/gtk/FontPlatformData.h:
1760         (WebCore::FontPlatformData::FontPlatformData):
1761         (WebCore::FontPlatformData::hash):
1762         * platform/graphics/gtk/FontPlatformDataPango.cpp: Added.
1763         (WebCore::FontPlatformData::FontPlatformData):
1764         (WebCore::FontPlatformData::init):
1765         (WebCore::FontPlatformData::~FontPlatformData):
1766         (WebCore::FontPlatformData::isFixedPitch):
1767         (WebCore::FontPlatformData::setFont):
1768         (WebCore::FontPlatformData::operator==):
1769         * platform/graphics/gtk/GlyphPageTreeNodePango.cpp: Added.
1770         (WebCore::pango_font_get_glyph):
1771         (WebCore::GlyphPage::fill):
1772         * platform/graphics/gtk/SimpleFontDataPango.cpp: Added.
1773         (WebCore::SimpleFontData::platformInit):
1774         (WebCore::SimpleFontData::platformDestroy):
1775         (WebCore::SimpleFontData::smallCapsFontData):
1776         (WebCore::SimpleFontData::containsCharacters):
1777         (WebCore::SimpleFontData::determinePitch):
1778         (WebCore::SimpleFontData::platformWidthForGlyph):
1779         (WebCore::SimpleFontData::setFont):
1780
1781 2008-03-12  Justin Garcia  <justin.garcia@apple.com>
1782
1783         Reviewed by Oliver.
1784         
1785         <rdar://problem/5770834> Crash at InsertTextCommand::prepareForTextInsertion() doing RemoveFormat in a certain list
1786         
1787         Fixes some (but not all) of the instances of:
1788         <rdar://problem/5659795> CrashTracer: [REGRESSION] 187 crashes in Safari at com.apple.WebCore: WebCore::InsertTextCommand::prepareForTextInsertion + 241
1789         <rdar://problem/5779631> CrashTracer: [USER] 25 crashes in Mail at WebCore::InsertTextCommand::prepareForTextInsertion
1790
1791         * editing/InsertLineBreakCommand.cpp:
1792         (WebCore::InsertLineBreakCommand::doApply): applyStyle may have destroyed content that held
1793         the old endingSelection(), so we must recompute it.  Added a FIXME.  Added a few comments.
1794         * editing/RemoveFormatCommand.cpp:
1795         (WebCore::RemoveFormatCommand::doApply): Added a FIXME.
1796
1797 2008-03-11  Alexey Proskuryakov  <ap@webkit.org>
1798
1799         Reviewed by Darin.
1800
1801         <rdar://problem/5640615> REGRESSION (Safari 2-3): Changing subframe encoding rules broke
1802         some sites.
1803
1804         Other browsers' behavior keeps changing; let's implement what Firefox and Opera do now:
1805         if the frame and subframe belong to the same site, then the encoding is inherited from parent
1806         frame to subframe. Otherwise, it is not.
1807
1808         Always inheriting the encoding would cause a security problem.
1809
1810         Tests: http/tests/misc/frame-default-enc-different-domain.html
1811                http/tests/misc/frame-default-enc-same-domain.html
1812                fast/encoding/frame-default-enc.html
1813
1814         * loader/FrameLoader.cpp:
1815         (WebCore::FrameLoader::write): Also removed a check for m_frame->document() being non-null -
1816         this function also has code that uses it without checking, so it must be safe.
1817
1818 2008-03-12  Mark Rowe  <mrowe@apple.com>
1819
1820         Gtk build fix.
1821
1822         * page/Frame.h: Forward-declare FramePrivate.
1823
1824 2008-03-11  Steve Falkenburg  <sfalken@apple.com>
1825
1826         Disable LTCG/PGO for all of WebCore for now.
1827         We'll re-enable this as part of follow-on PGO work.
1828         
1829         Reviewed by Oliver.
1830
1831         * WebCore.vcproj/WebCore.vcproj:
1832
1833 2008-03-11  Darin Adler  <darin@apple.com>
1834
1835         Reviewed by Sam.
1836
1837         - remove all bridge-related things from WebCore except the bridge itself
1838
1839         * WebCore.base.exp: Removed the bridge and setBridge functions.
1840
1841         * loader/FrameLoader.cpp:
1842         (WebCore::FrameLoader::detachFromParent): Removed call to the bridge's
1843         close method.
1844
1845         * page/Frame.cpp:
1846         (WebCore::Frame::~Frame): Removed call to setBridge(0).
1847         (WebCore::FramePrivate::FramePrivate): Removed initialization of m_bridge.
1848         * page/Frame.h: Removed setBridge and bridge functions.
1849         * page/FramePrivate.h: Removed m_bridge pointer.
1850         * page/mac/FrameMac.mm: Removed setBridge and bridge functions.
1851
1852         * page/mac/WebCoreFrameBridge.h: Added setWebCoreFrame: method.
1853         Removed bridgeForDOMDocument: and clearFrame methods.
1854         * page/mac/WebCoreFrameBridge.mm: Ditto.
1855         (-[WebCoreFrameBridge close]): Changed to set m_frame to 0 directly.
1856         (-[WebCoreFrameBridge setWebCoreFrame:]): Added.
1857
1858 2008-03-11  Darin Adler  <darin@apple.com>
1859
1860         - restored some code I removed in the Range change; this code can't go
1861           until the rest of the Range fix is in
1862
1863         * dom/Range.cpp:
1864         (WebCore::Range::commonAncestorContainer): Added back the check for 0
1865         that I removed erroneously in the Range patch.
1866         (WebCore::Range::processContents): Left in assertions I used to debug
1867         this.
1868
1869 2008-03-11  Darin Adler  <darin@apple.com>
1870
1871         - fix Release build
1872
1873         * platform/mac/ScrollViewMac.mm:
1874         (WebCore::ScrollView::setContentsPos): Don't use NSMakePoint.
1875
1876 2008-03-11  Darin Adler  <darin@apple.com>
1877
1878         Reviewed by Anders.
1879
1880         - simplify Mac code for ScrollView, since it's used only for FrameView
1881           and not in two different modes like it was historically
1882         - remove code depending on the bridge to get from an NSView to a WebCore::Frame
1883
1884         * bindings/objc/DOMHTML.mm:
1885         (-[DOMHTMLInputElement _rectOnScreen]): getDocumentView -> documentView.
1886
1887         * bridge/jni/jni_jsobject.cpp:
1888         (createRootObject): Instead of using WebCoreViewFactory to find the frame given
1889         and NSView, use the WebCoreFrameView interface to do it.
1890
1891         * editing/mac/EditorMac.mm:
1892         (WebCore::Editor::paste): getDocumentView -> documentView.
1893         * editing/mac/SelectionControllerMac.mm:
1894         (WebCore::SelectionController::notifyAccessibilityForSelectionChange): Ditto.
1895
1896         * page/FrameView.h: Fixed comment.
1897
1898         * page/InspectorController.cpp:
1899         (WebCore::InspectorController::drawNodeHighlight): Removed uneeded typecasts
1900         to ScrollView* since FrameView is derived from ScrollView.
1901
1902         * page/mac/EventHandlerMac.mm:
1903         (WebCore::EventHandler::focusDocumentView): getDocumentView -> documentView.
1904         * page/mac/FrameMac.mm:
1905         (WebCore::Frame::imageFromRect): Ditto.
1906         * page/mac/WebCoreAXObject.mm:
1907         (-[WebCoreAXObject position]): Ditto.
1908         (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto.
1909         (-[WebCoreAXObject rendererForView:]): Updated code that used to use
1910         WebCoreBridgeHolder to use WebCoreFrameView instead.
1911
1912         * page/mac/WebCoreFrameBridge.mm:
1913         (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
1914         getDocumentView -> documentView.
1915
1916         * page/mac/WebCoreFrameView.h: Removed the WebCoreScrollbarMode type; we just
1917         use WebCore::ScrollbarMode directly. Renamed the WebCoreFrameView protocol to
1918         WebCoreFrameScrollView, since it's a protocol for the scroll view, not the
1919         frame view itself. Replaced WebCoreBridgeHolder protocol with WebCoreFrameView
1920         protocol, which returns a WebCore::Frame directly rather than a bridge.
1921
1922         * page/mac/WebCoreViewFactory.h: Eliminated the bridgeForView method.
1923
1924         * platform/ScrollView.h: Moved the constructor and destructor out of the
1925         class-specific #if blocks. Renamed Mac-specific function that gets the
1926         NSView for from getDocumentView to documentView and a scrollView function
1927         that returns an appropriately classed NSScrollView.
1928
1929         * platform/graphics/MediaPlayer.h: Changed type of parentWidget to FrameView
1930         instead of Widget.
1931         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1932         (WebCore::MediaPlayerPrivate::createQTMovieView): Removed unnecessary cast.
1933
1934         * platform/mac/PopupMenuMac.mm:
1935         (WebCore::PopupMenu::show): getDocumentView -> documentView.
1936         * platform/mac/ScrollViewMac.mm:
1937         (WebCore::ScrollView::ScrollView): Added.
1938         (WebCore::ScrollView::~ScrollView): Added.
1939         (WebCore::ScrollView::scrollView): Added.
1940         (WebCore::ScrollView::visibleWidth): Removed unused non-NSScrollView case.
1941         (WebCore::ScrollView::visibleHeight): Ditto.
1942         (WebCore::ScrollView::visibleContentRect): Ditto.
1943         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers): Ditto.
1944         (WebCore::ScrollView::contentsWidth): Ditto.
1945         (WebCore::ScrollView::contentsHeight): Ditto.
1946         (WebCore::ScrollView::contentsX): Ditto.
1947         (WebCore::ScrollView::contentsY): Ditto.
1948         (WebCore::ScrollView::scrollOffset): Ditto.
1949         (WebCore::ScrollView::scrollRectIntoViewRecursively): Ditto.
1950         (WebCore::ScrollView::setContentsPos): Ditto.
1951         (WebCore::ScrollView::setVScrollbarMode): Ditto.
1952         (WebCore::ScrollView::setHScrollbarMode): Ditto.
1953         (WebCore::ScrollView::setScrollbarsMode): Ditto.
1954         (WebCore::ScrollView::vScrollbarMode): Ditto.
1955         (WebCore::ScrollView::hScrollbarMode): Ditto.
1956         (WebCore::ScrollView::suppressScrollbars): Ditto.
1957         (WebCore::ScrollView::addChild): Ditto.
1958         (WebCore::ScrollView::resizeContents): Ditto.
1959         (WebCore::ScrollView::updateContents): Ditto.
1960         (WebCore::ScrollView::contentsToWindow): Ditto.
1961         (WebCore::ScrollView::windowToContents): Ditto.
1962         (WebCore::ScrollView::setStaticBackground): Ditto.
1963         (WebCore::ScrollView::documentView): Renamed and removed unused case.
1964         (WebCore::ScrollView::scrollbarUnderMouse): Removed incorrect comment.
1965
1966         * platform/mac/WidgetMac.mm:
1967         (WebCore::Widget::getOuterView): Update for protocol name change.
1968
1969         * rendering/RenderThemeMac.mm:
1970         (WebCore::RenderThemeMac::paintCheckbox): getDocumentView -> documentView.
1971         (WebCore::RenderThemeMac::paintRadio): Ditto.
1972         (WebCore::RenderThemeMac::paintButton): Ditto.
1973         (WebCore::RenderThemeMac::paintMenuList): Ditto.
1974         (WebCore::RenderThemeMac::paintSliderThumb): Ditto.
1975         (WebCore::RenderThemeMac::paintSearchField): Ditto.
1976         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Ditto.
1977         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Ditto.
1978         (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Ditto.
1979
1980 2008-03-11  Brent Fulgham  <bfulgham@gmail.com>
1981
1982         Reviewed by Adam Roben.
1983
1984         Split CookieJarWin.cpp into CFNet and non-CFNet versions to
1985         reduce the massive amount of conditionalization in the file.
1986         (see http://bugs.webkit.org/show_bug.cgi?id=17788)
1987
1988         * WebCore.vcproj/WebCore.vcproj:
1989         * platform/network/win/CookieJarCFNetWin.cpp: Copied from WebCore/platform/network/win/CookieJarWin.cpp.
1990         (WebCore::setCookies):
1991         (WebCore::cookies):
1992         (WebCore::cookiesEnabled):
1993         * platform/network/win/CookieJarWin.cpp:
1994         (WebCore::setCookies):
1995         (WebCore::cookies):
1996         (WebCore::cookiesEnabled):
1997
1998 2008-03-11  Darin Adler  <darin@apple.com>
1999
2000         Reviewed by Sam.
2001
2002         - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore
2003
2004         * page/ChromeClient.h: Added new client functions to replace calls up to WebKit
2005         that were formerly handled by the bridge.
2006
2007         * page/Frame.h: Removed unneeded declarations. Moved declarations of script-specific
2008         functions to a ScriptController section. Removed willPopupMenu.
2009
2010         * page/mac/ChromeMac.mm:
2011         (WebCore::Chrome::focusNSView): Changed to call firstResponder and makeFirstResponder
2012         via the client instead of the bridge.
2013
2014         * page/mac/EventHandlerMac.mm:
2015         (WebCore::EventHandler::passMouseDownEventToWidget): Changed to call firstResponder
2016         and makeFirstResponder via the chrome client instead of the bridge.
2017
2018         * page/mac/FrameMac.mm: Removed willPopupMenu.
2019
2020         * page/mac/WebCoreFrameBridge.h: Removed WebCoreFrameBridge protocol and
2021         SubclassResponsibility category. Also removed some unneeded imports.
2022
2023         * platform/mac/PopupMenuMac.mm:
2024         (WebCore::PopupMenu::show): Call willPopUpMenu on chrome client instead of frame.
2025
2026         * platform/mac/WidgetMac.mm:
2027         (WebCore::Widget::setIsSelected): Call functions directly on the view rather than
2028         calling via the bridge.
2029
2030 2008-03-11  Darin Adler  <darin@apple.com>
2031
2032         Reviewed by Mitz.
2033
2034         - make some Range improvements (preparation for Range support for DOM mutation)
2035
2036         Made constructors private, added create functions.
2037         Made refcount start at 1 rather than starting at 0 and being incremented.
2038         Made Range use two Position objects for the start/end container/offset pairs.
2039
2040         * WebCore.base.exp: Updated.
2041
2042         * dom/Document.cpp:
2043         (WebCore::Document::createRange): Changed to use Range::create.
2044         (WebCore::Document::removeMarkers): Updated for Range::first/pastLastNode name change.
2045
2046         * dom/Position.cpp:
2047         (WebCore::Position::formatForDebugger): Updated for member variable name change.
2048         (WebCore::Position::showTreeForThis): Ditto.
2049         (WebCore::startPosition): Changed to use Range::startPosition.
2050         (WebCore::endPosition): Changed to use Range::endPosition.
2051
2052         * dom/Position.h: Made the data members public and renamed them to container
2053         and offset. But since offset() is already a function, temporarily used posOffset
2054         for the data member. Later we'll get rid of offset(). Made more functions inline.
2055         Removed the constructor that takes a PositionIterator.
2056
2057         * dom/PositionIterator.cpp:
2058         (WebCore::PositionIterator::operator Position): Added. Replaces the constructor
2059         that used to be in Position.
2060         * dom/PositionIterator.h: Added conversion operator to produce a Position.
2061         Removed friend declaration for Position.
2062
2063         * dom/Range.cpp:
2064         (WebCore::Range::Range): Updated constructors for data member changes and made
2065         them use a refcount of 1.
2066         (WebCore::Range::create): Added.
2067         (WebCore::Range::startContainer): Updated to eliminate use of m_detached; detached
2068         is now indicated by m_start.container of 0. Also updated to use m_start instead
2069         of the old m_startContainer.
2070         (WebCore::Range::startOffset): Ditto.
2071         (WebCore::Range::endContainer): Ditto.
2072         (WebCore::Range::endOffset): Ditto.
2073         (WebCore::Range::commonAncestorContainer): Ditto.
2074         (WebCore::Range::collapsed): Ditto.
2075         (WebCore::Range::setStart): Ditto.
2076         (WebCore::Range::setEnd): Ditto.
2077         (WebCore::Range::collapse): Ditto.
2078         (WebCore::Range::isPointInRange): Ditto.
2079         (WebCore::Range::comparePoint): Ditto.
2080         (WebCore::Range::compareNode): Ditto.
2081         (WebCore::Range::compareBoundaryPoints): Ditto.
2082         (WebCore::Range::boundaryPointsValid): Ditto.
2083         (WebCore::Range::deleteContents): Ditto.
2084         (WebCore::Range::intersectsNode): Ditto.
2085         (WebCore::Range::processContents): Ditto.
2086         (WebCore::Range::extractContents): Ditto.
2087         (WebCore::Range::cloneContents): Ditto.
2088         (WebCore::Range::insertNode): Ditto.
2089         (WebCore::Range::toString): Ditto.
2090         (WebCore::Range::text): Ditto.
2091         (WebCore::Range::createContextualFragment): Ditto.
2092         (WebCore::Range::detach): Ditto.
2093         (WebCore::Range::checkNodeBA): Changed to use switch statements instead of
2094         multiple calls to the virtual nodeType() function.
2095         (WebCore::Range::cloneRange): Ditto.
2096         (WebCore::Range::setStartAfter): Ditto.
2097         (WebCore::Range::setEndBefore): Ditto.
2098         (WebCore::Range::setEndAfter): Ditto.
2099         (WebCore::Range::selectNode): Ditto.
2100         (WebCore::Range::selectNodeContents): Ditto.
2101         (WebCore::Range::surroundContents): Ditto.
2102         (WebCore::Range::setStartBefore): Ditto.
2103         (WebCore::Range::checkDeleteExtract): Ditto.
2104         (WebCore::Range::containedByReadOnly): Ditto.
2105         (WebCore::Range::firstNode): Ditto.
2106         (WebCore::Range::editingStartPosition): Ditto.
2107         (WebCore::Range::pastLastNode): Ditto.
2108         (WebCore::Range::addLineBoxRects): Ditto.
2109         (WebCore::Range::formatForDebugger): Ditto.
2110         (WebCore::operator==): Ditto.
2111         (WebCore::rangeOfContents): Ditto.
2112         (WebCore::Range::maxStartOffset): Ditto.
2113         (WebCore::Range::maxEndOffset): Ditto.
2114
2115         * dom/Range.h: Made constructors private. Added create functions.
2116         Added getters for startContainer/Offset and endContainer/Offset that
2117         return 0 instead of an exception for detached ranges that are inline
2118         and don't require an ExceptionCode out parameter. Changed the parameters
2119         to setStart and setEnd to PassRefPtr. Removed isDetached function.
2120         Made ActionType and processContents private. Made startPosition and
2121         endPosition inlines and have then return const&. Renamed startNode and
2122         pastEndNode to firstNode and pastLastNode to reduce the chance of
2123         confusion with startContainer/endContainer. Used Position for m_start
2124         and m_end instead of separate container and offset members. Changed
2125         maxStartOffset and maxEndOffset into int to match other offsets.
2126
2127         * editing/ApplyStyleCommand.cpp:
2128         (WebCore::ApplyStyleCommand::applyBlockStyle): Changed to use Range::create.
2129         (WebCore::ApplyStyleCommand::applyInlineStyle): Ditto.
2130         * editing/CompositeEditCommand.cpp:
2131         (WebCore::CompositeEditCommand::inputText): Ditto.
2132         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
2133         * editing/DeleteSelectionCommand.cpp:
2134         (WebCore::DeleteSelectionCommand::mergeParagraphs): Ditto.
2135         * editing/Editor.cpp:
2136         (WebCore::Editor::fontForSelection): Changed for pastLastNode name change.
2137         (WebCore::Editor::setComposition): Changed to use Range::create.
2138         (WebCore::paragraphAlignedRangeForRange): Ditto.
2139         (WebCore::markMisspellingsOrBadGrammar): Changed to get rid of check for
2140         isDetached and check for 0 from startContainer instead.
2141         (WebCore::Editor::compositionRange): Changed to use Range::create.
2142         * editing/EditorCommand.cpp:
2143         (WebCore::unionDOMRanges): Ditto.
2144         * editing/Selection.cpp:
2145         (WebCore::Selection::toRange): Ditto.
2146         * editing/TextIterator.cpp:
2147         (WebCore::TextIterator::TextIterator): Changed for firstNode and pastLastNode
2148         name change.
2149         (WebCore::TextIterator::range): Changed to use Range::create.
2150         (WebCore::SimplifiedBackwardsTextIterator::range): Ditto.
2151         (WebCore::TextIterator::subrange): Ditto.
2152         * editing/VisiblePosition.cpp:
2153         (WebCore::makeRange): Ditto.
2154         * editing/VisiblePosition.h: Added now-needed include.
2155         * editing/htmlediting.cpp:
2156         (WebCore::indexForVisiblePosition): Changed to use Range::create.
2157         (WebCore::avoidIntersectionWithNode): Changed to get rid of check for
2158         isDetached and check for 0 instead and to use Range::create.
2159         * editing/markup.cpp:
2160         (WebCore::renderedText): Changed to use Range::create.
2161         (WebCore::createMarkup): Changed to no longer use isDetached and also
2162         for new firstNode/pastEndNode names.
2163         (WebCore::createFragmentFromText): Ditto.
2164         * editing/visible_units.cpp:
2165         (WebCore::previousBoundary): Changed to use Range::create.
2166         * page/mac/WebCoreFrameBridge.mm:
2167         (-[WebCoreFrameBridge convertToNSRange:]): Changed to no longer use
2168         isDetached().
2169         * rendering/RenderTextControl.cpp:
2170         (WebCore::RenderTextControl::visiblePositionForIndex): Changed to use Range::create.
2171         (WebCore::RenderTextControl::indexForVisiblePosition): Ditto.
2172
2173 2008-03-11  Daniel Zucker <zucker@wake3.com>
2174
2175         Reviewed by Adam Roben.
2176
2177         There are a handful of placed where the use of CFNetwork-specific
2178         calls are protected by PLATFORM(CF).  Revise to use the more specific
2179         USE(CFNETWORK) macro.  (See http://bugs.webkit.org/show_bug.cgi?id=17783) 
2180
2181         * platform/network/ProtectionSpace.cpp:  Change PLATFORM(CF) to USE(CFNETWORK)
2182         * platform/network/ResourceHandle.cpp: Change PLATFORM(CF) to USE(CFNETWORK)
2183         * platform/network/win/CookieJarWin.cpp:  Correct error in
2184           InternetGetCookie call.  Conditionalize 'cookiesEnabled' the same
2185           as all other implementations in this file.
2186
2187 2008-03-11  Xan Lopez  <xan@gnome.org>
2188
2189         Reviewed by Alp Toker.
2190
2191         http://bugs.webkit.org/show_bug.cgi?id=16476
2192
2193         Add libsoup HTTP backend.
2194         
2195         * GNUmakefile.am:
2196         * platform/network/ResourceHandleInternal.h:
2197         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2198         * platform/network/soup/AuthenticationChallenge.h: Added.
2199         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2200         * platform/network/soup/ResourceError.h: Added.
2201         (WebCore::ResourceError::ResourceError):
2202         * platform/network/soup/ResourceHandleSoup.cpp: Added.
2203         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2204         (WebCore::ResourceHandle::~ResourceHandle):
2205         (WebCore::dataCallback):
2206         (WebCore::parseDataUrl):
2207         (WebCore::ResourceHandle::start):
2208         (WebCore::ResourceHandle::cancel):
2209         (WebCore::ResourceHandle::bufferedData):
2210         (WebCore::ResourceHandle::supportsBufferedData):
2211         (WebCore::ResourceHandle::setDefersLoading):
2212         (WebCore::ResourceHandle::loadsBlocked):
2213         (WebCore::ResourceHandle::willLoadFromCache):
2214         * platform/network/soup/ResourceRequest.h: Copied from WebCore/platform/network/curl/ResourceRequest.h.
2215         (WebCore::ResourceRequest::ResourceRequest):
2216         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2217         * platform/network/soup/ResourceResponse.h: Added.
2218         (WebCore::ResourceResponse::ResourceResponse):
2219         (WebCore::ResourceResponse::setResponseFired):
2220         (WebCore::ResourceResponse::responseFired):
2221         (WebCore::ResourceResponse::doUpdateResourceResponse):
2222
2223 2008-03-11  Rodney Dawes  <dobey@wayofthemonkey.com>
2224
2225         Fix Qt build.
2226
2227         * plugins/qt/PluginDataQt.cpp:
2228         (PluginData::initPlugins)
2229
2230 2008-03-11  Adam Roben  <aroben@apple.com>
2231
2232         Make attribute quoting in DOM view more consistent with source view
2233
2234         Two changes which make the DOM view more consistent with source view:
2235          1) We now quote all attribute values, including URLs
2236          2) The quotes around the values are now purple, matching the left and
2237             right angle brackets that surround the tag
2238
2239         One bug fixed by these changes:
2240          1) The entire URL is selected for editing when you double-click a URL
2241             that is an attribute value. Previously, the first and last
2242             characters were not included in the selection.
2243
2244         Reviewed by Darin.
2245
2246         * page/inspector/DocumentPanel.js:
2247         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't need
2248         to account for the quotes around attribute values anymore because the
2249         quotes are now outside the webkit-html-attribute-value span.
2250         * page/inspector/utilities.js:
2251         (nodeTitleInfo): Quote all attribute values, including URLs, and place
2252         the quotes outside the webkit-html-attribute-value span.
2253
2254 2008-03-11  Adam Roben  <aroben@apple.com>
2255
2256         Stop including pthread.h in WebCore on Windows
2257
2258         Reviewed by Darin.
2259
2260         * WebCore.vcproj/WebCore.vcproj:
2261           - Changed the include path to not contain pthreads/
2262           - Let VS remove a duplicate FileConfiguration element
2263           - Let VS have its way with the file ordering
2264         * WebCorePrefix.h: Made the #include of pthread.h be compiled out on
2265         Windows.
2266         * loader/FTPDirectoryDocument.cpp: Added a Windows-specific #define of
2267         localtime_r (pthread.h was providing a macro that substituted plain
2268         old localtime before, but localtime_s is "more secure", so I went with
2269         that).
2270         * loader/FTPDirectoryParser.cpp: Ditto for gmtime_r.
2271
2272 2008-03-11  Adam Roben  <aroben@apple.com>
2273
2274         Roll out r30961 since it broke the default site icon on Windows
2275
2276         * loader/icon/IconDatabase.cpp:
2277         (WebCore::IconDatabase::defaultIcon):
2278
2279 2008-03-11  Dan Bernstein  <mitz@apple.com>
2280
2281         Reviewed by Darin Adler.
2282
2283         - clean up line layout code
2284
2285         * platform/graphics/GraphicsContext.cpp:
2286         (WebCore::TextRunIterator::increment): Removed the resolver parameter.
2287         (WebCore::GraphicsContext::drawBidiText): Adjusted for changes to
2288         createBidiRunsForLine(), which no longer takes a start parameter.
2289         * platform/text/BidiResolver.h:
2290         (WebCore::BidiResolver::): Made Noncopyable and removed the
2291         m_adjustEmbedding member variable.
2292         (WebCore::BidiResolver::position): Added. Returns the resolver's current
2293         position.
2294         (WebCore::BidiResolver::setPosition): Added. Sets the resolver's current
2295         position without changing any other state.
2296         (WebCore::BidiResolver::increment): Added. Advances the resolver to the
2297         next position, allowing the iterator to push and pop embedding.
2298         (WebCore::BidiResolver::appendRun): Removed the resolver parameter in
2299         the call to increment().
2300         (WebCore::BidiResolver::embed): Removed code to save, set and restore
2301         m_adjustEmbedding.
2302         (WebCore::BidiResolver::createBidiRunsForLine): Changed to not take a
2303         'start' iterator. Instead, start at the current position. Removed code
2304         to set m_adjustEmbedding. Changed for noncopyability.
2305         * rendering/RenderBlock.h:
2306         * rendering/bidi.cpp:
2307         (WebCore::bidiNext): Made the resolver parameter optional. Changed to
2308         null-check the 'end of inline' pointer only twice.
2309         (WebCore::bidiFirst): Made the resolver parameter optional.
2310         (WebCore::BidiIterator::increment): Ditto.
2311         (WebCore::BidiState::increment): Added. Overrides the default
2312         BidiResolver::increment() method by passing the resolver to
2313         BidiIterator::increment().
2314         (WebCore::checkMidpoints): Removed the resolver parameter.
2315         (WebCore::BidiState::appendRun): Removed code to save, set and restore
2316         m_adjustEmbedding. Adjusted for change to increment().
2317         (WebCore::RenderBlock::bidiReorderLine): Removed the 'start' parameter
2318         and unreachable code.
2319         (WebCore::buildCompactRuns): Adjusted for changes to BidiResolver/
2320         (WebCore::RenderBlock::layoutInlineChildren): Moved code to initialize
2321         the resolver from this method to determineStartPosition(). Unified the
2322         resolver with the 'start' iterator. Removed unreachable code. Moved one
2323         statement from the beginning of the while loop to the end.
2324         (WebCore::RenderBlock::determineStartPosition): Moved code to initialize
2325         the resolver from layoutInlineChildren() into this method.
2326         (WebCore::RenderBlock::matchedEndLine): Adjusted for the resolver and
2327         the 'start' iterator being one object.
2328         (WebCore::skipNonBreakingSpace): Made the parameter const.
2329         (WebCore::requiresLineBox): Ditto.
2330         (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Adjusted for
2331         the change to BidiIterator::increment().
2332         (WebCore::RenderBlock::skipWhitespace): Made two versions of this
2333         method, one for BidiIterator and one for BidiState.
2334         (WebCore::shouldSkipWhitespaceAfterStartObject): Removed the resolver
2335         parameter.
2336         (WebCore::RenderBlock::findNextLineBreak): Removed the resolver
2337         parameter. Removed calls to setAdjustEmbedding(). Removed the 'previous'
2338         variable and changed the 'last' variable to do its job.
2339         * rendering/bidi.h:
2340
2341 2008-03-10  Adam Roben  <aroben@apple.com>
2342
2343         Part of Bug 17224: DOM nodes/attributes should be editable
2344
2345         <http://bugs.webkit.org/show_bug.cgi?id=17224>
2346         <rdar://problem/5732825>
2347
2348         This patch makes text nodes editable via double-click.
2349
2350         Reviewed by Tim.
2351
2352         * page/inspector/DocumentPanel.js:
2353         (WebInspector.DOMNodeTreeElement._startEditing):
2354           - Moved most of this code to _startEditingAttribute
2355           - Calls _startEditingTextNode or _startEditingAttribute as
2356             appropriate
2357         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Added. Code
2358         came from _startEditing.
2359         (WebInspector.DOMNodeTreeElement._startEditingTextNode): Added.
2360         (WebInspector.DOMNodeTreeElement._textNodeEditingCommitted): Added.
2361         (WebInspector.DOMNodeTreeElement._editingCancelled): Renamed from
2362         _attributeEditingCancelled.
2363         * page/inspector/utilities.js:
2364         (nodeTitleInfo): Wrap text nodes in a webkit-html-text-node span so
2365         that we can easily recognize/edit them.
2366
2367 2008-03-11  Holger Hans Peter Freyther  <zecke@selfish.org>
2368
2369         Reviewed by Darin.
2370
2371         r25512 inlined the urlIcon to improve the startup time of Safari on Mac. Inlining is
2372         not suitable for platforms where this icon is themable. E.g. the Qt platform is allowing
2373         to theme this icon and the Gtk+ platform will probably end up with themable icons
2374         as well.
2375         
2376         Remove dead code from the windows port and move the urlIcon from the windows
2377         directory to the Resource directory to be used by Qt and other ports.
2378         
2379         Ifdef the usage of the built-in icon in IconDatabase.cpp and for Qt do not use
2380         it. Gtk+ currently has no proper implementation of Image::loadPlatformResource but
2381         once it does it wants to use this for getting the urlIcon as well.
2382
2383         * Resources/urlIcon.png: Renamed from WebKit/win/WebKit.vcproj/urlIcon.png.
2384         * loader/icon/IconDatabase.cpp:
2385         (WebCore::IconDatabase::defaultIcon):
2386
2387 2008-03-11  Tor Arne Vestbø  <tavestbo@trolltech.com>
2388
2389         Reviewed by Darin.
2390
2391         Implemented HTML media element support for QtWebKit, using Phonon.
2392
2393         http://bugs.webkit.org/show_bug.cgi?id=17766
2394
2395         * WebCore.pro:
2396         * platform/graphics/MediaPlayer.cpp:
2397         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Added.
2398         (debugMediaObject):
2399         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2400         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2401         (WebCore::MediaPlayerPrivate::getSupportedTypes):
2402         (WebCore::MediaPlayerPrivate::hasVideo):
2403         (WebCore::MediaPlayerPrivate::load):
2404         (WebCore::MediaPlayerPrivate::cancelLoad):
2405         (WebCore::MediaPlayerPrivate::play):
2406         (WebCore::MediaPlayerPrivate::pause):
2407         (WebCore::MediaPlayerPrivate::paused):
2408         (WebCore::MediaPlayerPrivate::seek):
2409         (WebCore::MediaPlayerPrivate::seeking):
2410         (WebCore::MediaPlayerPrivate::duration):
2411         (WebCore::MediaPlayerPrivate::currentTime):
2412         (WebCore::MediaPlayerPrivate::setEndTime):
2413         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2414         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2415         (WebCore::MediaPlayerPrivate::bytesLoaded):
2416         (WebCore::MediaPlayerPrivate::totalBytesKnown):
2417         (WebCore::MediaPlayerPrivate::totalBytes):
2418         (WebCore::MediaPlayerPrivate::setRate):
2419         (WebCore::MediaPlayerPrivate::setVolume):
2420         (WebCore::MediaPlayerPrivate::setMuted):
2421         (WebCore::MediaPlayerPrivate::dataRate):
2422         (WebCore::MediaPlayerPrivate::networkState):
2423         (WebCore::MediaPlayerPrivate::readyState):
2424         (WebCore::MediaPlayerPrivate::updateStates):
2425         (WebCore::MediaPlayerPrivate::setVisible):
2426         (WebCore::MediaPlayerPrivate::setRect):
2427         (WebCore::MediaPlayerPrivate::loadStateChanged):
2428         (WebCore::MediaPlayerPrivate::rateChanged):
2429         (WebCore::MediaPlayerPrivate::sizeChanged):
2430         (WebCore::MediaPlayerPrivate::timeChanged):
2431         (WebCore::MediaPlayerPrivate::volumeChanged):
2432         (WebCore::MediaPlayerPrivate::didEnd):
2433         (WebCore::MediaPlayerPrivate::loadingFailed):
2434         (WebCore::MediaPlayerPrivate::naturalSize):
2435         (WebCore::MediaPlayerPrivate::eventFilter):
2436         (WebCore::MediaPlayerPrivate::repaint):
2437         (WebCore::MediaPlayerPrivate::paint):
2438         (WebCore::MediaPlayerPrivate::stateChanged):
2439         (WebCore::MediaPlayerPrivate::tick):
2440         (WebCore::MediaPlayerPrivate::metaDataChanged):
2441         (WebCore::MediaPlayerPrivate::seekableChanged):
2442         (WebCore::MediaPlayerPrivate::hasVideoChanged):
2443         (WebCore::MediaPlayerPrivate::bufferStatus):
2444         (WebCore::MediaPlayerPrivate::finished):
2445         (WebCore::MediaPlayerPrivate::currentSourceChanged):
2446         (WebCore::MediaPlayerPrivate::aboutToFinish):
2447         (WebCore::MediaPlayerPrivate::prefinishMarkReached):
2448         (WebCore::MediaPlayerPrivate::totalTimeChanged):
2449         * platform/graphics/qt/MediaPlayerPrivatePhonon.h: Added.
2450         (WebCore::MediaPlayerPrivate::):
2451         (WebCore::MediaPlayerPrivate::isAvailable):
2452
2453 2008-03-10  Sam Weinig  <sam@webkit.org>
2454
2455         Reviewed by Beth Dakin.
2456
2457         Throw a SECURITY_ERR when accessing a tainted canvas
2458         by CanvasRenderingContext2D::getImageData() and
2459         HTMLCanvasElement::toDataURL().
2460
2461         * html/CanvasRenderingContext2D.cpp:
2462         (WebCore::CanvasRenderingContext2D::getImageData):
2463         * html/CanvasRenderingContext2D.h:
2464         * html/CanvasRenderingContext2D.idl:
2465         * html/HTMLCanvasElement.cpp:
2466         (WebCore::HTMLCanvasElement::toDataURL):
2467         * html/HTMLCanvasElement.h:
2468         * html/HTMLCanvasElement.idl:
2469
2470 2008-03-10  Justin Garcia  <justin.garcia@apple.com>
2471
2472         Reviewed by Sam.
2473
2474         <rdar://problem/5779984> REGRESSION (r30391): GMail: Safari won't display the Edit Link dialog
2475
2476         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2477         (WebCore::hasCSSPropertyNamePrefix): Fixed a typo.  The code was only
2478         comparing the first character of the prefix to the first character
2479         of the property name.
2480
2481 2008-03-10  Andre Boule  <aboule@apple.com>
2482
2483         Reviewed by Beth.
2484
2485         Hold off on initializing the frame to avoid the RenderView getting 
2486         a null FrameView. This could potentially cause problems.
2487
2488         * svg/graphics/SVGImage.cpp:
2489         (WebCore::SVGImage::dataChanged):
2490
2491 2008-03-10  Darin Adler  <darin@apple.com>
2492
2493         - try to fix Qt build
2494
2495         * bridge/qt/qt_runtime.cpp:
2496         (KJS::Bindings::convertQVariantToValue): Change KJS::UChar to UChar.
2497
2498 2008-03-10  Darin Adler  <darin@apple.com>
2499
2500         Reviewed by Antti.
2501
2502         - fix <rdar://problem/3059610> VIP: links opened in new frame, window, or tab
2503           should be redrawn as visited immediately
2504         - fix <rdar://problem/4382809> Going "back" a page doesn't change the color of
2505           the visited URL at directory.umi
2506         - fix http://bugs.webkit.org/show_bug.cgi?id=4941
2507           Visited links should be marked as visited
2508         - fix http://bugs.webkit.org/show_bug.cgi?id=7960
2509           REGRESSION: Visited link color doesn't displayed after loading page from cache
2510
2511         We now mark all links on a page as "changed" at the appropriate times.
2512
2513         * WebCore.base.exp: Update since I made completeURL be a const member function.
2514
2515         * css/CSSStyleSelector.cpp: Got rid of some unneeded globals that could be turned
2516         into locals. Also changed some static data members to file-scoped globals with
2517         internal linkage. Renamed the globals to get rid of the m_ prefix. Changed the
2518         prefix on m_styleNotYetAvailable to s_styleNotYetAvailable.
2519         (WebCore::CSSStyleSelector::CSSStyleSelector): Updated for name changes.
2520         (WebCore::parseUASheet): Tweak the comment.
2521         (WebCore::CSSStyleSelector::loadDefaultStyle): Updated for name changes and to
2522         use local variables instead of globals where possible.
2523         (WebCore::CSSStyleSelector::checkPseudoState): Made this a member function so
2524         it can store the link in a hash. Also changed it to have a return value instead
2525         of having it modify a global variable. Added code to put the hash into a set so
2526         we can tell later if this is one of the links that affects this page.
2527         (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for the change to
2528         checkPseudoState.
2529         (WebCore::CSSStyleSelector::matchUARules): Updated for name changes.
2530         (WebCore::CSSStyleSelector::styleForElement): Ditto.
2531         (WebCore::CSSStyleSelector::adjustRenderStyle): Ditto.
2532         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Changed code to read
2533         the SVG style sheet to use a boolean global and put it right here in the function
2534         since this is the only code that needs to know about it.
2535         (WebCore::CSSStyleSelector::checkOneSelector): Updated for name changes.
2536         (WebCore::colorForCSSValue): Moved code inside the function that is not needed
2537         anywhere else.
2538         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Updaed for the change
2539         to checkPseudoState.
2540         (WebCore::CSSStyleSelector::allVisitedStateChanged): Added. Calls setChanged on
2541         all links if there were any in the set.
2542         (WebCore::CSSStyleSelector::visitedStateChanged): Added. Calls setChanged on all
2543         links if the one that changed is in the set.
2544
2545         * css/CSSStyleSelector.h: Removed unused StyleSelector class and State enum. Made
2546         CSSStyleSelector derive from Noncopyable. Made lots of member functions private that
2547         didn't need to be public, and removed others that could be made into non-member
2548         functions. Changed pseudoStyleRulesForElement to take a const String& instead of
2549         a StringImpl*. Added new allVisitedStateChanged and visitedStateChanged functions.
2550         Got rid of unneeded friend declarations.
2551
2552         * dom/Document.cpp:
2553         (WebCore::Document::completeURL): Made const.
2554         (WebCore::findSlashDotDotSlash): Moved here from PageGroup.
2555         (WebCore::findSlashSlash): Ditto.
2556         (WebCore::findSlashDotSlash): Ditto.
2557         (WebCore::containsColonSlashSlash):
2558         (WebCore::cleanPath): Ditto.
2559         (WebCore::matchLetter): Ditto.
2560         (WebCore::needsTrailingSlash): Ditto.
2561         (WebCore::Document::visitedLinkHash): Moved this here from PageGroup. This is
2562         the poor-man's completeURL function. The idea of putting it here is that this
2563         way it can be alongside the real completeURL function. Later we should figure out
2564         a way to make this function share more code with the real thing and match behavior.
2565
2566         * dom/Document.h: Marked completeURL function const. Added visitedLinkHash function.
2567
2568         * page/DOMWindow.cpp:
2569         (WebCore::DOMWindow::getMatchedCSSRules): Updated for change to CSSStyleSelector.
2570
2571         * page/Page.cpp:
2572         (WebCore::Page::allVisitedStateChanged): Added. Calls allVisitedStateChanged on all
2573         style selectors.
2574         (WebCore::Page::visitedStateChanged): Ditto.
2575         * page/Page.h: Added the above functions.
2576
2577         * page/PageGroup.cpp:
2578         (WebCore::PageGroup::isLinkVisited): Changed to take a visitedLinkHash parameter.
2579         The CSSStyleSelector now handles actually computing the hash, and it does so by
2580         calling code in Document.
2581         (WebCore::PageGroup::addVisitedLink): Refactored so the two overloaded copies share
2582         a bit more code. Added code that calls visitedStateChanged if a new link was added.
2583         (WebCore::PageGroup::removeVisitedLinks): Added code to call allVisitedStateChanged
2584         if any visited links are removed.
2585         * page/PageGroup.h: Include StringHash.h instead of having the AlreadyHashed struct
2586         definition here.
2587
2588         * platform/text/StringHash.h:
2589         (WebCore::CaseFoldingHash::hash): Tweaked to make this a bit more consistent with
2590         the StringImpl::computeHash function, using the same technique for avoiding 0.
2591         (WebCore::AlreadyHashed::hash): Added. Was formerly in PageGroup.h.
2592         (WebCore::AlreadyHashed::avoidDeletedValue): Added. Was formerly in PageGroup.cpp.
2593
2594         * rendering/RenderStyle.cpp:
2595         (WebCore::RenderStyle::isStyleAvailable): Changed to use an inline function instead
2596         of getting directly at a data member so the data member could be made private.
2597
2598         * loader/FrameLoader.cpp:
2599         (WebCore::FrameLoader::scrollToAnchor): Added call to updateHistoryForAnchorScroll.
2600         (WebCore::FrameLoader::updateHistoryForAnchorScroll): Added.
2601         * loader/FrameLoader.h: Added updateHistoryForAnchorScroll.
2602
2603 2008-03-10  Adam Roben  <aroben@apple.com>
2604
2605         Part of Bug 17224: DOM nodes/attributes should be editable
2606
2607         <http://bugs.webkit.org/show_bug.cgi?id=17224>
2608         <rdar://problem/5732825>
2609
2610         This patch makes DOM attributes editable via double-click.
2611
2612         Reviewed by Tim.
2613
2614         * page/inspector/DocumentPanel.js:
2615         (WebInspector.DOMNodeTreeElement.onmousedown): Don't do anything if
2616         we're being edited, since we want default editing behaviors to work.
2617         (WebInspector.DOMNodeTreeElement.ondblclick): Try to start editing
2618         before doing anything else.
2619         (WebInspector.DOMNodeTreeElement._startEditing): Added. Currently only
2620         lets you edit attributes.
2621         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added.
2622         Uses a scratch element to get the new attribute(s) parsed, then sets
2623         the attribute(s) on the node in the inspected document.
2624         (WebInspector.DOMNodeTreeElement._attributeEditingCancelled): Added.
2625         (WebInspector.DOMNodeTreeElement._updateTitle): Added. Refreshes the
2626         representation of the node in the Inspector's DOM tree to reflect
2627         the node's current state.
2628         * page/inspector/inspector.css: Made the .editing class apply
2629         everywhere.
2630         * page/inspector/utilities.js:
2631         (nodeTitleInfo): Changed to surround attribute name/value pairs in a
2632         webkit-html-attribute span so that we can easily edit the pair as a
2633         whole.
2634
2635 2008-03-10  David Kilzer  <ddkilzer@apple.com>
2636
2637         Fix 64-bit builds.
2638
2639         Reviewed by Stephanie.
2640
2641         WebCore.exp only gets generated once for both 32-bit and 64-bit builds,
2642         so we must exclude the _NPN symbols when creating WebCore.LP64.exp.
2643
2644         * WebCore.xcodeproj/project.pbxproj: Reverted build phase shell code to
2645         r30826 to remove _NPN symbols from 64-bit builds in WebCore.LP64.exp.
2646
2647 2008-03-10  Eric Seidel  <eric@webkit.org>
2648
2649         Reviewed by Darin.
2650
2651         Remove KJS::UChar, use ::UChar instead
2652         http://bugs.webkit.org/show_bug.cgi?id=17017
2653
2654         To functional changes, thus no tests.
2655
2656         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2657         (WebCore::hasCSSPropertyNamePrefix):
2658         (WebCore::cssPropertyName):
2659         * bindings/js/JSDOMWindowBase.cpp:
2660         (WebCore::windowProtoFuncAToB):
2661         (WebCore::windowProtoFuncBToA):
2662         * bindings/js/JSSVGPODTypeWrapper.h:
2663         * bindings/js/kjs_proxy.cpp:
2664         (WebCore::KJSProxy::evaluate):
2665         * bridge/objc/objc_utility.mm:
2666         (KJS::Bindings::throwError):
2667         * dom/Document.cpp:
2668         (WebCore::Document::parseQualifiedName):
2669         * platform/text/AtomicString.cpp:
2670         (WebCore::AtomicString::add):
2671         * platform/text/String.cpp:
2672         (WebCore::String::String):
2673         (WebCore::String::operator Identifier):
2674         (WebCore::String::operator UString):
2675         * platform/text/TextCodecICU.cpp:
2676         (WebCore::TextCodecICU::decode):
2677         * svg/SVGAnimatedTemplate.h:
2678
2679 2008-03-10  Darin Adler  <darin@apple.com>
2680
2681         Reviewed by Sam.
2682
2683         - eliminate keyboard UI mode method from WebCoreFrameBridge
2684
2685         * page/ChromeClient.h: Added keyboardUIMode function.
2686         (WebCore::ChromeClient::keyboardUIMode): Ditto.
2687         * page/mac/EventHandlerMac.mm:
2688         (WebCore::EventHandler::tabsToAllControls): Call chrome client function instead
2689         of bridge function.
2690         * page/mac/WebCoreFrameBridge.h: Removed keyboardUIMode method, and other unused
2691         ones.
2692
2693         * WebCore.xcodeproj/project.pbxproj: Allowed Xcode to change the project.
2694         Do not try to fight the Xcode.
2695
2696 2008-03-10  Darin Adler  <darin@apple.com>
2697
2698         - oops, forgot to save last couple changes from the editor
2699
2700         * bindings/js/JSDOMWindowCustom.cpp:
2701         (WebCore::markDOMObjectWrapper): Tweaked a tiny bit.
2702         (WebCore::JSDOMWindow::mark): Sorted alphabetically.
2703
2704 2008-03-10  Darin Adler  <darin@apple.com>
2705
2706         Reviewed by Geoff.
2707
2708         - fix failing regression test (window.navigator is getting garbage
2709           collected and thus losing its custom properties)
2710
2711         * bindings/js/JSDOMWindowCustom.cpp:
2712         (WebCore::markDOMObject): Added helper function.
2713         (WebCore::JSDOMWindow::mark): Added. Marks the wrappers for all the objects that hang
2714         off the window object.
2715
2716         * page/DOMWindow.h:
2717         (WebCore::DOMWindow::optionalScreen): Added so we can get the Screen object without
2718         creating it if it's already there.
2719         (WebCore::DOMWindow::optionalSelection): Ditto.
2720         (WebCore::DOMWindow::optionalHistory): Ditto.
2721         (WebCore::DOMWindow::optionalLocationbar): Ditto.
2722         (WebCore::DOMWindow::optionalMenubar): Ditto.
2723         (WebCore::DOMWindow::optionalPersonalbar): Ditto.
2724         (WebCore::DOMWindow::optionalScrollbars): Ditto.
2725         (WebCore::DOMWindow::optionalStatusbar): Ditto.
2726         (WebCore::DOMWindow::optionalToolbar): Ditto.
2727         (WebCore::DOMWindow::optionalConsole): Ditto.
2728         (WebCore::DOMWindow::optionalNavigator): Ditto.
2729
2730         * page/DOMWindow.idl: Added the CustomMarkFunction flag. Sorted the flags in
2731         alphabetical order since there are a lot of them.
2732
2733 2008-03-10  Darin Adler  <darin@apple.com>
2734
2735         Reviewed by Sam.
2736
2737         - eliminate Java applet methods from WebCoreFrameBridge
2738
2739         * loader/FrameLoaderClient.h: Added a javaApplet function.
2740         * page/mac/FrameMac.mm:
2741         (WebCore::Frame::createScriptInstanceForWidget): Streamlined the code.
2742         Use the loader client instead of the bridge to get the applet.
2743         * page/mac/WebCoreFrameBridge.h: Removed the getAppletInView and
2744         pollForAppletInView methods. Also removed other unused things.
2745
2746 2008-03-10  Marc-Antoine Ruel  <maruel@gmail.com>
2747
2748         Reviewed by Eric, landed by Darin.
2749
2750         http://bugs.webkit.org/show_bug.cgi?id=16095
2751         Move GraphicsContextPrivate to its own header file.
2752
2753         Moves GraphicsContextState and GraphicsContextPrivate to its
2754         own header
2755
2756         * WebCore.vcproj/WebCore.vcproj:
2757         * platform/graphics/GraphicsContext.cpp:
2758         * platform/graphics/GraphicsContextPrivate.h: Added.
2759         (WebCore::GraphicsContextState::GraphicsContextState):
2760         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
2761
2762 2008-03-10  Julien Chaffraix  <julien.chaffraix@gmail.com>
2763
2764         Reviewed and landed by Darin.
2765
2766         bug 12182 : XMLHttpRequest should raise SECURITY_ERR for same-origin policy violations
2767
2768         Removed reference to PERMISSION_DENIED (previous non standard exception) and replaced it
2769         by DOM exception SECURITY_ERR. Updated XMLHttpRequest::open to raise SECURITY_ERR.
2770
2771         * bindings/js/kjs_binding.cpp:
2772         (WebCore::setDOMException): Removed PERMISSION_DENIED code.
2773         * dom/ExceptionCode.cpp: Added SECURITY_ERR exception.
2774         * dom/ExceptionCode.h: Ditto.
2775         * xml/XMLHttpRequest.cpp:
2776         (WebCore::XMLHttpRequest::open): Returns SECURITY_ERR now.
2777         * xml/XMLHttpRequestException.h: Removed PERMISSION_DENIED.
2778
2779 2008-03-09  Adam Roben  <aroben@apple.com>
2780
2781         Refactor CSS editing code so we can share it with DOM editing
2782
2783         Add WebInspector.startEditing, which takes the element to be edited, a
2784         committedCallback, a cancelledCallback, and a context parameter. This
2785         function takes care of setting up the element for editing, and calls
2786         either the cancelledCallback or committedCallback when editing ends.
2787
2788         Reviewed by Tim.
2789
2790         * page/inspector/StylesSidebarPane.js:
2791         (WebInspector.StylePropertyTreeElement.startEditing):
2792           - Call WebInspector.isBeingEdited and WebInspector.startEditing
2793           - Removed code now handled by WebInspector.startEditing
2794         (WebInspector.StylePropertyTreeElement.editingEnded):
2795           - Renamed from endEditing
2796           - Removed code now handled by WebInspector.startEditing
2797         (WebInspector.StylePropertyTreeElement.editingCancelled):
2798           - Renamed from cancelEditing
2799           - Changed parameters to match WebInspector.startEditing's
2800             cancelledCallback
2801         (WebInspector.StylePropertyTreeElement.editingCommitted):
2802           - Renamed from commitEditing
2803           - Changed parameters to match WebInspector.startEditing's
2804             committedCallback
2805         * page/inspector/inspector.js:
2806         (WebInspector.changeFocus): Changed a call to firstParentWithClassName
2807         to firstParentOrSelfWithClassName so that if the focusable element
2808         itself is the target it will be recognized. I don't know why this
2809         change wasn't needed before this.
2810         (WebInspector.isBeingEdited): Added.
2811         (WebInspector.startEditing): Added.
2812
2813 2008-03-10  Adam Roben  <aroben@apple.com>
2814
2815         Windows build fix
2816
2817         * WebCore.vcproj/WebCore.vcproj: Pick up generated source files out of
2818         $(WebKitOutputDir) instead of hard-coding WebKitBuild.
2819
2820 2008-03-10  Darin Adler  <darin@apple.com>
2821
2822         * DerivedSources.make: Merge plug-in-related changes with the new way of handling
2823         autogenerated DOM classes.
2824
2825 2008-03-10  Johnny Ding  <johnnyding.webkit@gmail.com>
2826
2827         Reviewed, tweaked and landed by Alexey.
2828
2829         - fix http://bugs.webkit.org/show_bug.cgi?id=17732        
2830
2831         We didn't have a fallback to frame encoding in the case of loading a script via
2832         changing its src attribute.
2833
2834         Test: fast/dom/HTMLScriptElement/script-decoding-error-after-setting-src.html
2835
2836         * html/HTMLScriptElement.cpp:
2837         (WebCore::HTMLScriptElement::parseMappedAttribute): Use a helper function to get proper
2838         charset for correct decoding of script content.
2839         (WebCore::HTMLScriptElement::insertedIntoDocument):
2840         (WebCore::HTMLScriptElement::scriptCharset): A helper function for getting proper charset
2841         for the script (as much as can be determined prior to loading it).
2842         * html/HTMLScriptElement.h:
2843         * html/HTMLTokenizer.cpp:
2844         (WebCore::HTMLTokenizer::parseTag): Use a helper function to get proper charset for correct
2845         decoding of script content.
2846
2847 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2848
2849         Reviewed by Lars.
2850
2851         Fix reference counting of returned MimeType and Plugin objects
2852         created in the array wrappers.
2853
2854         * plugins/MimeTypeArray.cpp:
2855         * plugins/MimeTypeArray.h:
2856         * plugins/Plugin.cpp:
2857         * plugins/Plugin.h:
2858         * plugins/PluginArray.cpp:
2859         * plugins/PluginArray.h:
2860
2861 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2862
2863         Wx linking fix.
2864
2865         Added missing stubs for PluginData.
2866
2867         * platform/wx/TemporaryLinkStubs.cpp:
2868
2869 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2870
2871         Windows build fix that I forgot to merge earlier ;(
2872
2873         Forward declare Page as class, not struct.
2874
2875         * plugins/PluginData.h:
2876
2877 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2878
2879         Attempt to fix the Wx build.
2880
2881         * WebCoreSources.bkl:
2882
2883 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
2884
2885         Reviewed by Darin.
2886
2887         Done with Lars.
2888
2889         http://bugs.webkit.org/show_bug.cgi?id=16815
2890
2891         Ported the manually written JS bindings of window.navigator,
2892         window.navigator.plugins and window.navigator.mimeTypes to
2893         auto-generated bindings.
2894
2895         Moved the globally cached plugin and mimetype information to a
2896         per WebCore::Page shared PluginData structure.
2897
2898         Implemented window.navigator.plugins.refresh() in a
2899         platform-independent way.
2900
2901         * DerivedSources.make:
2902         * GNUmakefile.am:
2903         * WebCore.pro:
2904         * WebCore.vcproj/WebCore.vcproj:
2905         * WebCore.xcodeproj/project.pbxproj:
2906         * bindings/js/JSDOMWindowBase.cpp:
2907         (WebCore::JSDOMWindowBase::getValueProperty):
2908         * bindings/js/JSMimeTypeArrayCustom.cpp: Added.
2909         (WebCore::JSMimeTypeArray::canGetItemsForName):
2910         (WebCore::JSMimeTypeArray::nameGetter):
2911         * bindings/js/JSNavigatorCustom.cpp: Added.
2912         (WebCore::needsYouTubeQuirk):
2913         (WebCore::JSNavigator::appVersion):
2914         * bindings/js/JSPluginArrayCustom.cpp: Added.
2915         (WebCore::JSPluginArray::canGetItemsForName):
2916         (WebCore::JSPluginArray::nameGetter):
2917         * bindings/js/JSPluginCustom.cpp: Added.
2918         (WebCore::JSPlugin::canGetItemsForName):
2919         (WebCore::JSPlugin::nameGetter):
2920         * bindings/js/kjs_navigator.cpp: Removed.
2921         * bindings/js/kjs_navigator.h: Removed.
2922         * dom/Clipboard.cpp:
2923         * dom/DOMImplementation.cpp:
2924         (WebCore::DOMImplementation::createDocument):
2925         * loader/FrameLoader.cpp:
2926         (WebCore::FrameLoader::shouldUsePlugin):
2927         * page/DOMWindow.cpp:
2928         (WebCore::DOMWindow::clear):
2929         (WebCore::DOMWindow::navigator):
2930         * page/DOMWindow.h:
2931         * page/DOMWindow.idl:
2932         * page/DragController.cpp:
2933         * page/Frame.cpp:
2934         * page/Frame.h:
2935         * page/Navigator.cpp: Added.
2936         (WebCore::Navigator::Navigator):
2937         (WebCore::Navigator::~Navigator):
2938         (WebCore::Navigator::disconnectFrame):
2939         (WebCore::Navigator::appCodeName):
2940         (WebCore::Navigator::appName):
2941         (WebCore::Navigator::appVersion):
2942         (WebCore::Navigator::language):
2943         (WebCore::Navigator::userAgent):
2944         (WebCore::Navigator::platform):
2945         (WebCore::Navigator::plugins):
2946         (WebCore::Navigator::mimeTypes):
2947         (WebCore::Navigator::product):
2948         (WebCore::Navigator::productSub):
2949         (WebCore::Navigator::vendor):
2950         (WebCore::Navigator::vendorSub):
2951         (WebCore::Navigator::cookieEnabled):
2952         (WebCore::Navigator::javaEnabled):
2953         * page/Navigator.h: Added.
2954         (WebCore::Navigator::create):
2955         (WebCore::Navigator::frame):
2956         * page/Navigator.idl: Added.
2957         * page/Page.cpp:
2958         (WebCore::Page::refreshPlugins):
2959         (WebCore::Page::pluginData):
2960         * page/Page.h:
2961         * page/Plugin.h: Removed.
2962         * page/mac/FrameMac.mm:
2963         * page/mac/WebCoreFrameBridge.mm:
2964         (-[WebCoreFrameBridge canProvideDocumentSource]):
2965         * page/mac/WebCoreViewFactory.h:
2966         * page/qt/FrameQt.cpp:
2967         * page/win/FrameWin.cpp:
2968         * platform/gtk/TemporaryLinkStubs.cpp:
2969         * platform/mac/PlugInInfoStoreMac.mm: Removed.
2970         * platform/qt/MIMETypeRegistryQt.cpp:
2971         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2972         * plugins/MimeType.cpp: Added.
2973         (WebCore::MimeType::MimeType):
2974         (WebCore::MimeType::~MimeType):
2975         (WebCore::MimeType::type):
2976         (WebCore::MimeType::suffixes):
2977         (WebCore::MimeType::description):
2978         (WebCore::MimeType::enabledPlugin):
2979         * plugins/MimeType.h: Added.
2980         (WebCore::MimeType::create):
2981         * plugins/MimeType.idl: Added.
2982         * plugins/MimeTypeArray.cpp: Added.
2983         (WebCore::MimeTypeArray::MimeTypeArray):
2984         (WebCore::MimeTypeArray::~MimeTypeArray):
2985         (WebCore::MimeTypeArray::length):
2986         (WebCore::MimeTypeArray::item):
2987         (WebCore::MimeTypeArray::canGetItemsForName):
2988         (WebCore::MimeTypeArray::nameGetter):
2989         (WebCore::MimeTypeArray::getPluginData):
2990         * plugins/MimeTypeArray.h: Added.
2991         (WebCore::MimeTypeArray::create):
2992         (WebCore::MimeTypeArray::disconnectFrame):
2993         * plugins/MimeTypeArray.idl: Added.
2994         * plugins/Plugin.cpp: Added.
2995         (WebCore::Plugin::Plugin):
2996         (WebCore::Plugin::~Plugin):
2997         (WebCore::Plugin::name):
2998         (WebCore::Plugin::filename):
2999         (WebCore::Plugin::description):
3000         (WebCore::Plugin::length):
3001         (WebCore::Plugin::item):
3002         (WebCore::Plugin::canGetItemsForName):
3003         (WebCore::Plugin::nameGetter):
3004         * plugins/Plugin.h: Added.
3005         (WebCore::Plugin::create):
3006         * plugins/Plugin.idl: Added.
3007         * plugins/PluginArray.cpp: Added.
3008         (WebCore::PluginArray::PluginArray):
3009         (WebCore::PluginArray::~PluginArray):
3010         (WebCore::PluginArray::length):
3011         (WebCore::PluginArray::item):
3012         (WebCore::PluginArray::canGetItemsForName):
3013         (WebCore::PluginArray::nameGetter):
3014         (WebCore::PluginArray::refresh):
3015         (WebCore::PluginArray::getPluginData):
3016         * plugins/PluginArray.h: Added.
3017         (WebCore::PluginArray::create):
3018         (WebCore::PluginArray::disconnectFrame):
3019         * plugins/PluginArray.idl: Added.
3020         * plugins/PluginData.cpp: Added.
3021         (WebCore::PluginData::PluginData):
3022         (WebCore::PluginData::~PluginData):
3023         (WebCore::PluginData::supportsMimeType):
3024         (WebCore::PluginData::pluginNameForMimeType):
3025         * plugins/PluginData.h: Added.
3026         (WebCore::PluginData::create):
3027         (WebCore::PluginData::disconnectPage):
3028         (WebCore::PluginData::page):
3029         (WebCore::PluginData::plugins):
3030         (WebCore::PluginData::mimes):
3031         * plugins/mac/PluginDataMac.mm: Added.
3032         (WebCore::PluginData::initPlugins):
3033         (WebCore::PluginData::refresh):
3034         * plugins/qt/PluginDataQt.cpp: Added.
3035         (WebCore::PluginData::initPlugins):
3036         * plugins/win/PluginDataWin.cpp: Added.
3037         (WebCore::PluginData::initPlugins):
3038         (WebCore::PluginData::refresh):
3039
3040 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
3041
3042         Reviewed by Holger.
3043
3044         Replace two printfs() in the Qt port with notImplemented().
3045
3046         * html/CanvasRenderingContext2D.cpp:
3047         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
3048         (WebCore::CanvasRenderingContext2D::applyFillPattern):
3049
3050 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
3051
3052         Reviewed by Alp.
3053
3054         Compilation fix with gcc 4.3: Include stdio.h for printf.
3055
3056         * html/CanvasRenderingContext2D.cpp:
3057         * html/HTMLCanvasElement.cpp:
3058
3059 2008-03-09  Steve Falkenburg  <sfalken@apple.com>
3060
3061         Stop Windows build if an error occurs in a prior project.
3062
3063         Rubber stamped by Darin.
3064
3065         * WebCore.vcproj/WebCore.vcproj:
3066         * WebCore.vcproj/WebCoreGenerated.vcproj:
3067
3068 2008-03-09  Darin Adler  <darin@apple.com>
3069
3070         * DerivedSources.make: Third try at fixing the build.
3071         * bindings/js/JSRGBColor.cpp: And touching this file.
3072
3073 2008-03-09  Darin Adler  <darin@apple.com>
3074
3075         * DerivedSources.make: One *more* try at fixing the build.
3076
3077 2008-03-09  Darin Adler  <darin@apple.com>
3078
3079         * DerivedSources.make: One more try at fixing the build.
3080
3081 2008-03-09  Darin Adler  <darin@apple.com>
3082
3083         * DerivedSources.make: Re-land the change, fixed, and with an attempt to fix the
3084         bots by removing the incorrect file.
3085
3086 2008-03-09  Oliver Hunt  <oliver@apple.com>
3087
3088         RS=Mark Rowe
3089
3090         Roll out r30909 -- it breaks the build and is a non-trivial fix (according to weinig)
3091
3092         * DerivedSources.make:
3093
3094 2008-03-09  Darin Adler  <darin@apple.com>
3095
3096         Reviewed by Adam.
3097
3098         * DerivedSources.make: Put the list of DOM classes into its own
3099         variable, and generate the JavaScript bindings and Objective-C
3100         bindings dependencies from that. Added some separators to make it
3101         a little easier to see the sections of the file. Moved all the
3102         Mac-specific rules (except for the SVG conditional part) down
3103         to the bottom of the file in a separate section.
3104
3105 2008-03-09  Adam Roben  <aroben@apple.com>
3106
3107         Windows build fix
3108
3109         * WebCore.vcproj/WebCore.vcproj: Make sure all Cairo files are
3110         excluded from all three CG-based configurations: Debug, Release, and
3111         Debug_Internal.
3112
3113 2008-03-08  Mark Rowe  <mrowe@apple.com>
3114
3115         Attempt to fix the Qt build.
3116
3117         * platform/MIMETypeRegistry.cpp:  Add missing include.
3118
3119 2008-03-08  Oliver Hunt  <oliver@apple.com>
3120
3121         Reviewed by Sam W.
3122
3123         Bug 16516: canvas image patterns stop working with some transformations
3124
3125         Simple fix.  We used x/yStep of FLT_MAX to fake a no-repeat-x/y pattern
3126         with CG.  However any transforms involving FLT_MAX immediately get
3127         consumed by the introduced floating point error.  yStep had already been
3128         clamped to a much smaller arbitrary value, and this patch makes us use
3129         that clamp value for xStep as well.
3130
3131         * html/CanvasPattern.cpp:
3132         (WebCore::CanvasPattern::createPattern):
3133
3134 2008-03-08  Oliver Hunt  <oliver@apple.com>
3135
3136         Reviewed by Mitz.
3137
3138         Bug 17728: Canvas.createPattern with null repeat argument throws an exception
3139
3140         Trivial fix, we were calling toString on null which produces the string "null",
3141         we just needed to switch to using valueToStringWithNullCheck rather than 
3142         JSValue::toString directly
3143
3144         Test: fast/canvas/canvas-pattern-behaviour.html
3145
3146         * WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3147         (WebCore::JSCanvasRenderingContext2D::createPattern):
3148
3149 2008-03-08  Mark Rowe  <mrowe@apple.com>
3150
3151         Reviewed by Darin Adler.
3152
3153         Fix 64-bit build with GCC 4.2.
3154
3155         * bindings/objc/WebScriptObject.mm: Use NSUInteger in place of unsigned where required.
3156         * platform/mac/SharedBufferMac.mm: Ditto.
3157
3158 2008-03-08  Dan Bernstein  <mitz@apple.com>
3159
3160         Reviewed by Oliver Hunt.
3161
3162         - fix garbage in transparent areas in canvas.toDataURL results
3163
3164         * platform/graphics/cg/ImageBufferCG.cpp:
3165         (WebCore::ImageBuffer::toDataURL): Clear the bitmap context before
3166         painting the canvas image onto it.
3167
3168 2008-03-08  Darin Adler  <darin@apple.com>
3169
3170         Reviewed by Adele.
3171
3172         - eliminate custom highlight methods from WebCoreFrameBridge
3173
3174         * page/Chrome.cpp:
3175         (WebCore::ChromeClient::customHighlightRect): Added.
3176         (WebCore::ChromeClient::paintCustomHighlight): Added.
3177         * page/ChromeClient.h: Added custom highlight functions.
3178         * page/Frame.h: Removed custom highlight functions.
3179         * page/mac/FrameMac.mm: Ditto.
3180         * page/mac/WebCoreFrameBridge.h: Removed custom highlight methods.
3181         * rendering/InlineTextBox.cpp:
3182         (WebCore::InlineTextBox::paintCustomHighlight): Changed code to use
3183         the ChromeClient instead of WebCoreFrameBridge to do the custom highlight.
3184         * rendering/RenderBox.cpp:
3185         (WebCore::RenderBox::paintCustomHighlight): Ditto.
3186         * rendering/RootInlineBox.cpp:
3187         (WebCore::RootInlineBox::addHighlightOverflow): Ditto.
3188         (WebCore::RootInlineBox::paintCustomHighlight): Ditto.
3189
3190 2008-03-07  Stephanie Lewis  <slewis@apple.com>
3191
3192         Reviewed by Oliver.
3193
3194         Fix Windows build.
3195
3196         * platform/graphics/cg/ImageBufferCG.cpp:
3197         (WebCore::ImageBuffer::toDataURL):
3198
3199 2008-03-07  David D. Kilzer  <ddkilzer@apple.com>
3200
3201         Unify concept of enabling Netscape Plug-in API (NPAPI).
3202
3203         Reviewed by Darin.
3204
3205         No test cases since there is no change in functionality.
3206
3207         * DerivedSources.make: Added check for ENABLE_NETSCAPE_PLUGIN_API macro.
3208         If defined as "1", add WebCore.NPAPI.exp to WEBCORE_EXPORT_DEPENDENCIES.
3209         * WebCore.NPAPI.exp: Added.
3210         * WebCore.base.exp: Moved exported NPAPI methods to WebCore.NPAPI.exp.
3211         * WebCore.xcodeproj/project.pbxproj: Removed changes in r30826 (except
3212         comments) since we now handle exported NPAPI methods via DerivedSources.make.
3213
3214         * config.h: Removed USE(NPOBJECT) since we now use ENABLE(NETSCAPE_PLUGIN_API) as
3215         defined in Platform.h.
3216
3217         * bindings/objc/DOM.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3218         (-[DOMElement _NPObject]):
3219
3220         * bridge/NP_jsobject.cpp: Replaced !PLATFORM(DARWIN) || !defined(__LP64__) with
3221         ENABLE(NETSCAPE_PLUGIN_API).
3222         * bridge/NP_jsobject.h: Ditto.
3223         * bridge/c/c_class.cpp: Ditto.
3224         * bridge/c/c_class.h: Ditto.
3225         * bridge/c/c_instance.cpp: Ditto.
3226         * bridge/c/c_instance.h: Ditto.
3227         * bridge/c/c_runtime.cpp: Ditto.
3228         * bridge/c/c_runtime.h: Ditto.
3229         * bridge/c/c_utility.cpp: Ditto.
3230         * bridge/c/c_utility.h: Ditto.
3231         * bridge/npruntime.cpp: Ditto.
3232         * bridge/npruntime_impl.h: Ditto.
3233         * bridge/npruntime_priv.h: Ditto.
3234         * bridge/runtime.cpp: Ditto.
3235         (KJS::Bindings::Instance::createBindingForLanguageInstance):
3236
3237         * html/HTMLPlugInElement.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3238         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
3239         (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
3240         * html/HTMLPlugInElement.h: Ditto.
3241
3242         * page/Frame.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3243         (WebCore::Frame::clearScriptObjects):
3244         (WebCore::FramePrivate::FramePrivate): Also added #if ENABLE(NETSCAPE_PLUGIN_API)
3245         guard around m_windowScriptNPObject.
3246         * page/Frame.h: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3247         * page/FramePrivate.h: Added #if ENABLE(NETSCAPE_PLUGIN_API) guard around
3248         m_windowScriptNPObject.
3249         * page/mac/FrameMac.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3250         (WebCore::Frame::createScriptInstanceForWidget):
3251
3252 2008-03-07  Alexey Proskuryakov  <ap@webkit.org>
3253
3254         Reviewed by Darin.
3255
3256         REGRESSION: Korean decoding doesn't support extended EUC-KR.
3257
3258         Test: fast/encoding/char-decoding.html
3259
3260         * platform/text/TextCodecICU.cpp:
3261         (WebCore::TextCodecICU::registerExtendedEncodingNames): Untangle the system of duplicate ICU
3262         encoding names by manually registering windows-939-2000, and mapping all other related
3263         encodings to it.
3264
3265 2008-03-07  Dan Bernstein  <mitz@apple.com>
3266
3267         Reviewed by Stephanie.
3268
3269         - try to fix leaks seen on Tiger after r30840
3270
3271         * css/CSSStyleSelector.cpp:
3272         (WebCore::CSSStyleSelector::~CSSStyleSelector): Use the default operator
3273         delete, rather than arena delete, to deallocate the root default style.
3274
3275 2008-03-07  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
3276
3277         Reviewed by Alp Toker.
3278
3279         http://bugs.webkit.org/show_bug.cgi?id=17681
3280         GtkLauncher fails to render an element with position: fixed
3281
3282         Implement the required parts of PlatformScreenGtk.
3283
3284         * ChangeLog:
3285         * platform/gtk/PlatformScreenGtk.cpp:
3286         (WebCore::screenDepth):
3287         (WebCore::screenIsMonochrome):
3288         (WebCore::screenRect):
3289
3290 2008-03-07  Oliver Hunt  <oliver@apple.com>
3291
3292         Reviewed by Darin Adler.
3293
3294         Bug 16610: <canvas> restore() removes path segments created before it
3295
3296         The problem here is that WebKit stored the Path as part of the state, so
3297         restore would incorrectly lose changes made to the canvas path.  To match
3298         Firefox and HTML5 we make two real changes:
3299           * Move the context path from the state object directly onto the context.
3300             This is responsible for all the changes to the path manipulation functions
3301           * Add transform tracking to each state -- this is needed to correctly transform
3302             the current path when restore()-ing to a prior state.
3303
3304         Test: fast/canvas/canvas-save-restore-with-path.html
3305
3306         * html/CanvasRenderingContext2D.cpp:
3307         (WebCore::CanvasRenderingContext2D::restore):
3308         (WebCore::CanvasRenderingContext2D::scale):
3309         (WebCore::CanvasRenderingContext2D::rotate):
3310         (WebCore::CanvasRenderingContext2D::translate):
3311         (WebCore::CanvasRenderingContext2D::transform):
3312         (WebCore::CanvasRenderingContext2D::beginPath):
3313         (WebCore::CanvasRenderingContext2D::closePath):
3314         (WebCore::CanvasRenderingContext2D::moveTo):
3315         (WebCore::CanvasRenderingContext2D::lineTo):
3316         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
3317         (WebCore::CanvasRenderingContext2D::arcTo):
3318         (WebCore::CanvasRenderingContext2D::arc):
3319         (WebCore::CanvasRenderingContext2D::rect):
3320         (WebCore::CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode):
3321         (WebCore::CanvasRenderingContext2D::fill):
3322         (WebCore::CanvasRenderingContext2D::stroke):
3323         (WebCore::CanvasRenderingContext2D::clip):
3324         (WebCore::CanvasRenderingContext2D::isPointInPath):
3325         * html/CanvasRenderingContext2D.h:
3326
3327 2008-03-07  Oliver Hunt  <oliver@apple.com>
3328
3329         Reviewed by Ada.
3330
3331         Fix for crash caused by FrameLoader incorrectly assuming it has
3332         a RenderWidget
3333
3334         In some circumstances an application embedding a WebView may 
3335         choose to prevent a webview from loading a resource.  If that
3336         resource was requested by an <object> element then we may 
3337         fallback to different content which may not produce a RenderWidget.
3338         Unfortunately FrameLoader::loadSubframe was assuming that if a
3339         renderer was produced it would always be a RenderWidget, and arbitrarily
3340         performed what could be an incorrect cast.  This could then lead to
3341         a crash.
3342
3343         We currently don't have anyway of making a test for this.
3344
3345         * loader/FrameLoader.cpp:
3346         (WebCore::FrameLoader::loadSubframe):
3347
3348 2008-03-07  Samuel Weinig  <sam@webkit.org>
3349
3350         Reviewed by Oliver Hunt.
3351
3352         Fix for http://bugs.webkit.org/show_bug.cgi?id=16673
3353         <canvas> lacks toDataURL()
3354
3355         Tests: fast/canvas/toDataURL-noData.html
3356                fast/canvas/toDataURL-supportedTypes.html
3357
3358         * html/CanvasRenderingContext2D.cpp:
3359         (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage): Make message non-global.
3360         * html/HTMLCanvasElement.cpp:
3361         (WebCore::HTMLCanvasElement::printSecurityExceptionMessage): Log error message indicating that toDataURL has
3362         been called on a tainted canvas. 
3363         (WebCore::HTMLCanvasElement::toDataURL): This does the tainted canvas check, ensures that the canvas has pixel
3364         data, checks to see if the MIME type is supported.  Unsupported MIME types and the null string (which is made
3365         by passing no argument/null/undefined in JavaScript) are treated as being PNG, as per the spec.  The actual 
3366         toDataURL logic is actually done in the ImageBuffer class.
3367         * html/HTMLCanvasElement.h: Add function declarations.
3368         * html/HTMLCanvasElement.idl: Add function declaration.
3369
3370         * platform/MIMETypeRegistry.cpp:
3371         (WebCore::initializeSupportedImageMIMETypes):
3372         (WebCore::initializeSupportedImageMIMETypesForEncoding):
3373         (WebCore::initializeSupportedJavaScriptMIMETypes):
3374         (WebCore::initializeSupportedNonImageMimeTypes):
3375         (WebCore::initializeSupportedMediaMIMETypes):
3376         (WebCore::initializeMIMETypeRegistry):
3377         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
3378         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
3379         (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
3380         (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
3381         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
3382         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
3383         (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
3384         (WebCore::MIMETypeRegistry::isJavaAppletMIMEType):
3385         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
3386         (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
3387         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypesForEncoding):
3388         (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
3389         (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
3390         * platform/MIMETypeRegistry.h:
3391         Clean up and add new supportedImageMIMETypesForEncoding set which contains the set of
3392         MIME types the platform knows how to encode. Currently only implemented for CG and Qt.
3393
3394         * platform/graphics/ImageBuffer.h: Add toDataURL method.
3395         * platform/graphics/cairo/ImageBufferCairo.cpp:
3396         (WebCore::ImageBuffer::toDataURL): Add stub.
3397         * platform/graphics/cg/ImageBufferCG.cpp:
3398         (WebCore::ImageBuffer::create):
3399         (WebCore::ImageBuffer::getImageData):
3400         (WebCore::ImageBuffer::putImageData):
3401         (WebCore::ImageBuffer::toDataURL):
3402         Converts the current context to a data: url of the specified MIME type.  This method
3403         unfortunately has to flip the context, resulting in less than optimal code.
3404
3405         * platform/graphics/qt/ImageBufferQt.cpp:
3406         (WebCore::ImageBuffer::toDataURL): Add stub.
3407         * platform/graphics/wx/ImageBufferWx.cpp:
3408         (WebCore::ImageBuffer::toDataURL): Add stub.
3409
3410 2008-03-07  Steve Falkenburg  <sfalken@apple.com>
3411
3412         Build fix.
3413
3414         * WebCore.vcproj/WebCore.vcproj:
3415
3416 2008-03-07  Brent Fulgham  <bfulgham@gmail.com>
3417
3418         Reviewed by Mark Rowe.
3419
3420         Correct build intermediary output
3421         (http://bugs.webkit.org/show_bug.cgi?id=17713)
3422
3423         * WebCore/WebCore.vcproj:  Correct intermediary paths
3424
3425 2008-03-07  Brent Fulgham  <bfulgham@gmail.com>
3426
3427         Reviewed by Steve Falkenburg.
3428
3429         Add Cairo build requirements to WebCore.vcproj under a new
3430         set of targets.  Exclude Cairo elements from normal CG build.
3431         Exclude CG elements from Cairo builds.
3432         (http://bugs.webkit.org/show_bug.cgi?id=17300)
3433
3434         * WebCore.vcproj/WebCore.vcproj:
3435         * WebCore.vcproj/webcore.vsprops: Added.
3436
3437 2008-03-07  Darin Adler  <darin@apple.com>
3438
3439         Reviewed by Adam.
3440
3441         - eliminated WebCoreFrameBridge runOpenPanel
3442
3443         * page/ChromeClient.h: Added runOpenPanel function.
3444         * page/mac/ChromeMac.mm:
3445         (WebCore::ChromeClient::runOpenPanel): Added.
3446         * platform/FileChooser.cpp:
3447         (WebCore::FileChooser::FileChooser): Moved this here. It's no longer platform-specific.
3448         Also start the refcount at 1.
3449         (WebCore::FileChooser::create): Added adoptRef since the refcount no starts at one.
3450         (WebCore::FileChooser::~FileChooser): Moved here. No longer platform-specific.
3451         * platform/FileChooser.h: Removed m_controller, which was Macintosh-specific.
3452         * platform/gtk/FileChooserGtk.cpp: Removed FileChooser constructor and destructor,
3453         since they are no longer platform-specific.
3454         * platform/qt/FileChooserQt.cpp: Ditto.
3455         * platform/win/FileChooserWin.cpp: Ditto.
3456         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
3457         * platform/mac/FileChooserMac.mm:
3458         (WebCore::FileChooser::openFileChooser): Call the chrome client instead of the
3459         bridge to run the open panel. Allows us to get rid of the WebCoreOpenPanelController
3460         class and m_controller data member and move the cosntrutor/destructor to platform-
3461         independent code.
3462
3463 2008-03-07  Adam Roben  <aroben@apple.com>
3464
3465         Add JavaScriptDebugServer
3466
3467         This class is a singleton which allows one or more
3468         JavaScriptDebugListeners to receive callbacks during JavaScript
3469         execution.
3470
3471         Right now all listeners receive callbacks for all Pages in the
3472         process. Eventually we will want to support listeners registering for
3473         callbacks for specific Pages (e.g., the Inspector will want to listen
3474         for execution in just the Page it's inspecting).
3475
3476         Pages notify the JavaScriptDebugServer when they are created so that
3477         it can install itself as the Page's debugger.
3478
3479         Reviewed by Darin.
3480
3481         * GNUMakefile.am: Added new files to project.
3482         * WebCore.pro: Ditto.
3483         * WebCore.vcproj/WebCore.vcproj: Ditto.
3484         * WebCore.xcodeproj/project.pbxproj: Ditto.
3485         * WebCoreSources.bkl: Ditto.
3486         * page/JavaScriptDebugListener.h: Added.
3487         * page/JavaScriptDebugServer.cpp: Added.
3488         (WebCore::toFrame):
3489         (WebCore::JavaScriptDebugServer::shared):
3490         (WebCore::JavaScriptDebugServer::JavaScriptDebugServer):
3491         (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer):
3492         (WebCore::JavaScriptDebugServer::addListener): Registers as the
3493         debugger for all Pages if we're adding our first listener.
3494         (WebCore::JavaScriptDebugServer::removeListener): Deregisters as the
3495         debugger for all Pages if we're removing our last listner.
3496         (WebCore::JavaScriptDebugServer::pageCreated): Registers as the
3497         debugger for the newly created Page if we have any listeners.
3498         (WebCore::dispatchDidParseSource): Helper function.
3499         (WebCore::dispatchFailedToParseSource): Ditto.
3500         (WebCore::JavaScriptDebugServer::sourceParsed): Call
3501         dispatchDidParseSource or dispatchFailedToParseSource depending on
3502         whether there was an error or not.
3503         (WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Calls
3504         the passed-in JavaScriptExecutionCallback on each listener, guarding
3505         against re-entry.
3506         (WebCore::JavaScriptDebugServer::callEvent): Dispatch didEnterCallFrame.
3507         (WebCore::JavaScriptDebugServer::atStatement): Dispatch willExecuteStatement.
3508         (WebCore::JavaScriptDebugServer::returnEvent): Dispatch willLeaveCallFrame.
3509         (WebCore::JavaScriptDebugServer::exception): Dispatch exceptionWasRaised.
3510         * page/JavaScriptDebugServer.h: Added.
3511         * page/Page.cpp:
3512         (WebCore::Page::Page): Tell the shared JavaScriptDebugServer we were
3513         created so it can register as our debugger if needed.
3514
3515 2008-03-07  Darin Adler  <darin@apple.com>
3516
3517         Reviewed by Brady.
3518
3519         - fix a theoretical problem with the visited-link hash table by avoiding collision
3520           with the special "deleted" value
3521         - improve efficiency of with the visited-link hash table by not hashing twice
3522
3523         * page/PageGroup.cpp:
3524         (WebCore::avoidDeletedValue): Added. Makes sure we never try to use the "all ones"
3525         value, since the hash table uses that for deleted hash table entries.
3526         (WebCore::PageGroup::isLinkVisited): Call avoidDeletedValue before using the hash
3527         value with the HashSet.
3528         (WebCore::PageGroup::addVisitedLink): Ditto.
3529
3530         * page/PageGroup.h: Added a new hash function, AlreadyHashed, for unsigned integer
3531         values. This assumes that the value is already a hash value, and doesn't try to
3532         hash it again. Used this for m_visitedLinkHashes.
3533
3534 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
3535
3536         Fix the Qt build.
3537
3538         * WebCore.pro:
3539
3540 2008-03-06  Sam Weinig  <sam@webkit.org> with a little help from Oliver Hunt  <oliver@apple.com>
3541
3542         Reviewed by Mitz.
3543
3544         Implement the HTML5 canvas tainting rules to prevent potential data leakage
3545
3546         Added originClean to HTMLCanvasElement and CanvasPattern
3547         to track whether a canvas (or pattern) is tainted by remote
3548         data.
3549         Use originClean flag to determine whether getImageData should
3550         return, well, image data.
3551
3552         Test: http/tests/security/canvas-remote-read-remote-image.html
3553
3554         * html/CanvasPattern.cpp:
3555         (WebCore::CanvasPattern::CanvasPattern):
3556         * html/CanvasPattern.h:
3557         * html/CanvasRenderingContext2D.cpp:
3558         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
3559         (WebCore::CanvasRenderingContext2D::setFillStyle):
3560         (WebCore::CanvasRenderingContext2D::checkOrigin):
3561         (WebCore::CanvasRenderingContext2D::drawImage):
3562         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
3563         (WebCore::CanvasRenderingContext2D::createPattern):
3564         (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage):
3565         (WebCore::CanvasRenderingContext2D::getImageData):
3566         * html/CanvasRenderingContext2D.h:
3567         * html/HTMLCanvasElement.cpp:
3568         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
3569         * html/HTMLCanvasElement.h:
3570         (WebCore::HTMLCanvasElement::setOriginTainted):
3571         (WebCore::HTMLCanvasElement::originClean):
3572
3573 2008-03-06  Anders Carlsson  <andersca@apple.com>
3574
3575         Reviewed by Jon.
3576
3577         Templatize the JNI call code to reduce the amount of code that has
3578         to be duplicated.
3579
3580         * bridge/jni/jni_class.cpp:
3581         (JavaClass::JavaClass):
3582         * bridge/jni/jni_instance.cpp:
3583         (JavaInstance::stringValue):
3584         (JavaInstance::numberValue):
3585         (JavaInstance::booleanValue):
3586         (JavaInstance::invokeMethod):
3587         * bridge/jni/jni_jsobject.cpp:
3588         (JavaJSObject::convertJObjectToValue):
3589         * bridge/jni/jni_runtime.cpp:
3590         (JavaField::JavaField):
3591         (JavaMethod::JavaMethod):
3592         * bridge/jni/jni_utility.cpp:
3593         * bridge/jni/jni_utility.h:
3594         (KJS::Bindings::):
3595         (KJS::Bindings::callJNIMethodIDA):
3596         (KJS::Bindings::callJNIMethodV):
3597         (KJS::Bindings::callJNIMethod):
3598         (KJS::Bindings::callJNIStaticMethod):
3599
3600 2008-03-06  Darin Adler  <darin@apple.com>
3601
3602         Reviewed by Mitz.
3603
3604         - fix regression test failures from the visited-link change
3605
3606         * WebCore.base.exp: Export PageGroup::setShouldTrackVisitedLinks.
3607         * page/PageGroup.cpp:
3608         (WebCore::PageGroup::addVisitedLink): Do nothing and return early
3609         if shouldTrackVisitedLinks is false.
3610         (WebCore::PageGroup::removeVisitedLinks): Reset m_visitedLinksPopulated
3611         so the next time a link is queried this will be populated from history.
3612         (WebCore::PageGroup::setShouldTrackVisitedLinks): Added.
3613         * page/PageGroup.h: Added setShouldTrackVisitedLinks. This is global
3614         for now, but it would be better if it was per-page-group instead.
3615
3616 2008-03-06  Adele Peterson  <adele@apple.com>
3617
3618         Reviewed by Darin.
3619
3620         Fixes for for <rdar://problem/5785892> Implement activeElement attribute for HTMLDocument (HTML5)
3621         and <rdar://problem/5785895> Implement hasFocus() for HTMLDocument (HTML5)
3622
3623         Tests: fast/dom/HTMLDocument/activeElement.html
3624                fast/dom/HTMLDocument/hasFocus.html
3625
3626         * html/HTMLDocument.cpp:
3627         (WebCore::HTMLDocument::activeElement): Added. Returns the focused element, or the body element if nothing's focused.
3628         (WebCore::HTMLDocument::hasFocus): Added. Returns whether or not the document has focus (inclusive of sub-frames).
3629         * html/HTMLDocument.h: Added methods for activeElement and hasFocus.
3630         * html/HTMLDocument.idl: Added definitions for activeElement and hasFocus.
3631
3632 2008-03-06  Dan Bernstein  <mitz@apple.com>
3633
3634         Reviewed by Darin Adler.
3635
3636         - fix <rdar://problem/5741981> 154008 WebKit: Some asian language font glyphs are not shown (in Mail and Entourage)
3637
3638         Test: fast/text/soft-hyphen-3.html
3639
3640         * rendering/bidi.cpp:
3641         (WebCore::checkMidpoints):
3642         (WebCore::RenderBlock::findNextLineBreak): Made 'pos' unsigned. Made the
3643         midpoint after a hyphen always be a valid iterator, not allowing an
3644         offset past the end of a text node. Changed the check for consecutive
3645         soft hyphens to account for that.
3646
3647 2008-03-06  Darin Adler  <darin@apple.com>
3648
3649         - try to fix Wx build
3650
3651         * WebCoreSources.bkl: Added PageGroup.cpp.
3652
3653 2008-03-06  Darin Adler  <darin@apple.com>
3654
3655         - fix some builds
3656
3657         * GNUmakefile.am: Added PageGroup.cpp.
3658         * WebCore.base.exp: Removed WebCoreHistory.
3659         * WebCore.pro: Added PageGroup.cpp.
3660
3661 2008-03-06  Alexey Proskuryakov  <ap@webkit.org>
3662
3663         Reviewed by Darin.
3664
3665         <rdar://problem/5687269> Need to create a Collator abstraction for WebCore and JavaScriptCore
3666         
3667         * ForwardingHeaders/wtf/unicode/Collator.h: Added.
3668         * xml/XSLTUnicodeSort.cpp:
3669         (WebCore::xsltUnicodeSortFunction):
3670         * xml/XSLTUnicodeSort.h:
3671
3672 2008-03-06  Darin Adler  <darin@apple.com>
3673
3674         Reviewed by Mitz.
3675
3676         - fix http://bugs.webkit.org/show_bug.cgi?id=17526
3677           REGRESSION: iframes are added to Safari's History menu
3678           by separating the visited link machinery from global history
3679
3680         This should also make page loading faster due to more efficient visited link coloring.
3681
3682         * WebCore.base.exp: Updated.
3683         * WebCore.vcproj/WebCore.vcproj: Added PageGroup.h/cpp, removed GlobalHistory.h/cpp.
3684         * WebCore.xcodeproj/project.pbxproj: Ditto. Also removed WebCoreHistory.h/m.
3685
3686         * css/CSSStyleSelector.cpp: Updated includes.
3687         (WebCore::CSSStyleSelector::initElementAndPseudoState): Eliminated code to set
3688         currentEncodedURL.
3689         (WebCore::checkPseudoState): Moved most of the code inside a new
3690         PageGroup::isLinkVisited function.
3691         (WebCore::CSSStyleSelector::canShareStyleWithElement): Tightened code a bit by using
3692         references and only getting colors when needed.
3693         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto.
3694         * css/CSSStyleSelector.h: Removed EncodedURL, m_encodedURL, and setEncodedURL.
3695
3696         * dom/Document.cpp:
3697         (WebCore::Document::attach): Removed call to setEncodedURL.
3698         (WebCore::Document::setURL): Ditto.
3699         (WebCore::Document::recalcStyleSelector): Ditto.
3700
3701         * loader/FrameLoader.cpp:
3702         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Changed code to use
3703         early exit idiom to be a little more readable.
3704         (WebCore::FrameLoader::urlsMatchItem): Change to use a reference for slightly
3705         better efficiency.
3706         (WebCore::FrameLoader::goToItem): Use early exit idiom to be a little more
3707         readable.
3708         (WebCore::FrameLoader::updateHistoryForStandardLoad): Moved history code back
3709         in here and got rid of the helper function updateGlobalHistory, restoring the
3710         logic before r30549. Also added a call to the new addVisitedLink function.
3711         (WebCore::FrameLoader::updateHistoryForClientRedirect): Added code to call
3712         addVisitedLink here.
3713         (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Removed comment.
3714         (WebCore::FrameLoader::updateHistoryForReload): Removed call to
3715         updateGlobalHistory; we can just go without updating global history or
3716         visited links here, at least for now, since it's not clear that a reload
3717         is a "history event".
3718         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Moved
3719         history code back where it was, and added the call to addVisitedLink, just
3720         as in updateHistoryForStandardLoad above.
3721         * loader/FrameLoader.h: Removed updateGlobalHistory function.
3722
3723         * page/Chrome.cpp:
3724         (WebCore::ChromeClient::populateVisitedLinks): Added. Empty placeholder so we
3725         don't have to implement this for every port all at once.
3726         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): Changed to use the
3727         new PageGroup class.
3728         * page/ChromeClient.h: Added populateVisitedLinks function, used to fill the
3729         visited links set from the global history at application startup time.
3730
3731         * page/FrameTree.cpp:
3732         (WebCore::FrameTree::find): Updated to use the new PageGroup class.
3733
3734         * page/GlobalHistory.h: Removed.
3735         * page/win/GlobalHistoryWin.cpp: Removed.
3736         * page/mac/GlobalHistoryMac.mm: Removed.
3737         * platform/mac/WebCoreHistory.h: Removed.
3738         * platform/mac/WebCoreHistory.m: Removed.
3739         * platform/win/WebCoreHistory.cpp: Removed.
3740         * platform/win/WebCoreHistory.h: Removed.
3741
3742         * page/Page.cpp:
3743         (WebCore::Page::Page): Set m_group to 0.
3744         (WebCore::Page::setGroupName): Set up m_group. If the page is not in any
3745         group, set it to 0 for now to postpone the cost of creating a group.
3746         (WebCore::Page::initGroup): Added. Sets m_group to point to a single-page
3747         group; used when getting a group.
3748         (WebCore::Page::removeAllVisitedLinks): Added. Calls removeVisitedLinks
3749         on all page groups.
3750         * page/Page.h: Moved enums inside the WebCore namespace. Removed the
3751         frameNamespace function and instead added the group and groupPtr functions.
3752
3753         * page/PageGroup.cpp: Added. Contains all the visited code from the
3754         CSSStyleSelector in the isVisitedLink function, but more efficient because
3755         we don't allocate memory for the buffer.
3756         * page/PageGroup.h: Added.
3757
3758         * platform/gtk/TemporaryLinkStubs.cpp: Removed historyContains.
3759         * platform/qt/TemporaryLinkStubs.cpp: Removed unneeded include.
3760         * platform/wx/TemporaryLinkStubs.cpp: Removed historyContains.
3761
3762 2008-03-06  Mark Rowe  <mrowe@apple.com>
3763
3764         Fix 64-bit Mac build.
3765
3766         * WebCore.xcodeproj/project.pbxproj:  Exclude _NPN symbols from the exports list as they
3767         are compiled out of 64-bit builds.
3768
3769 2008-03-06  Mark Rowe  <mrowe@apple.com>
3770
3771         Leopard build fix.
3772
3773         * WebCore.base.exp:
3774
3775 2008-03-05  Kevin Ollivier  <kevino@theolliviers.com>
3776
3777         Fix the wx build after the bindings move.
3778
3779         * WebCoreSources.bkl:
3780         * webcore-base.bkl:
3781         * webcore-wx.bkl:
3782
3783 2008-03-05  Dan Bernstein  <mitz@apple.com>
3784
3785         Reviewed by Adele Peterson.
3786
3787         - fix "background-position: inherit"
3788
3789         * css/CSSStyleSelector.cpp:
3790         Made HANDLE_MULTILAYER_INHERIT_AND_INITIAL fall through and added
3791         a return statement in HANDLE_MULTILAYER_VALUE. Also removed an unused
3792         macro.
3793
3794 2008-03-05  Alp Toker  <alp@atoker.com>
3795
3796         Add a missing make dependency for derived sources to improve
3797         autotools build dependency tracking.
3798
3799         Issue spotted by Ori Bernstein.
3800
3801         * GNUmakefile.am:
3802
3803 2008-03-05  Alp Toker  <alp@atoker.com>
3804
3805         GTK+ build fix for breakage introduced in r30800.
3806
3807         Track moved bridge sources from JavaScriptCore to WebCore.
3808
3809         * GNUmakefile.am:
3810
3811 2008-03-05  Justin Garcia  <justin.garcia@apple.com>
3812
3813         Reviewed by Darin.
3814
3815         One part of fix for:
3816         <rdar://problem/5780697> Copying content with percentage based rules in a style sheet will cause fidelity issues
3817
3818         * editing/markup.cpp:
3819         (WebCore::appendStartMarkup): Styles from matched rules should take precedence over those in
3820         inline style declarations, not the other way around. 
3821
3822 2008-03-05  Anders Carlsson  <andersca@apple.com>
3823
3824         Reviewed by Darin.
3825
3826         Move JNI specific code from runtime_root over to jni_jsobject, where it is used.
3827
3828         * bridge/jni/jni_jsobject.cpp:
3829         (completedJavaScriptAccess):
3830         (initializeJavaScriptAccessLock):
3831         (lockJavaScriptAccess):
3832         (unlockJavaScriptAccess):
3833         (dispatchToJavaScriptThread):
3834         (performJavaScriptAccess):
3835         (JavaJSObject::initializeJNIThreading):
3836         (isJavaScriptThread):
3837         (JavaJSObject::invoke):
3838         * bridge/jni/jni_jsobject.h:
3839         * bridge/runtime_root.cpp:
3840         * bridge/runtime_root.h:
3841         * page/mac/WebCoreFrameBridge.mm:
3842         (-[WebCoreFrameBridge init]):
3843
3844 2008-03-05  Darin Adler  <darin@apple.com>
3845
3846         Reviewed by Sam.
3847
3848         - add functions giving offsets within a KURL, slated to replace the
3849           EncodedURL object in CSSStyleSelector (in a future "visited link" change)
3850         - changed all KURL data members names to use the traditional m_ prefix
3851         - initialize all members to 0 in invalid KURLs rather than having all
3852           functions check m_isValid
3853
3854         * platform/KURL.cpp:
3855         (WebCore::KURL::invalidate): Added. Initializes all the fields except for
3856         m_string to the "invalid" values. For use in the empty constructor and
3857         in the init and parse functions.
3858         (WebCore::KURL::init): Tweaked comments. Changed all code paths that return
3859         early to use the invalidate() function. Updated for member variable name
3860         changes.
3861         (WebCore::KURL::hasPath): Updated for member variable name changes.
3862         Remove now-unneeded check of m_isValid.
3863         (WebCore::KURL::lastPathComponent): Ditto.
3864         (WebCore::KURL::protocol): Ditto.
3865         (WebCore::KURL::host): Ditto.
3866         (WebCore::KURL::port): Ditto.
3867         (WebCore::KURL::pass): Ditto.
3868         (WebCore::KURL::user): Ditto.
3869         (WebCore::KURL::ref): Ditto.
3870         (WebCore::KURL::hasRef): Ditto.
3871         (WebCore::KURL::protocolIs): Ditto.
3872         (WebCore::KURL::query): Ditto.
3873         (WebCore::KURL::path): Ditto.
3874         (WebCore::KURL::setProtocol): Ditto.
3875         (WebCore::KURL::setHost): Ditto.
3876         (WebCore::KURL::setPort): Ditto.
3877         (WebCore::KURL::setHostAndPort): Ditto.
3878         (WebCore::KURL::setUser): Ditto.
3879         (WebCore::KURL::setPass): Ditto.
3880         (WebCore::KURL::setRef): Ditto.
3881         (WebCore::KURL::setQuery): Ditto.
3882         (WebCore::KURL::setPath): Ditto.
3883         (WebCore::KURL::prettyURL): Ditto.
3884         (WebCore::copyPathRemovingDots): Removed braces to match our code style.
3885         (WebCore::KURL::parse): Changed all code paths that return early to use
3886         the invalidate function. Moved code to set m_isValid to true to the very
3887         end of the function. Removed braces to match our code style. Removed an
3888         extra copy of the path/query/fragment code (there were two identical copies
3889         in the two sides of an if statement). Removed some commented-out code.
3890         Reversed an if statment. Added code to set the new m_pathAfterLastSlash
3891         field. Updated for member variable name changes.
3892         (WebCore::equalIgnoringRef): Updated for member variable name changes.
3893         (WebCore::KURL::isHierarchical): Ditto.
3894
3895         * platform/KURL.h: Added a FIXME about ref vs. fragment. Made the empty
3896         constructor inline and called the new invalidate function. Added new
3897         pathStart, pathEnd, and pathAfterLastSlash functions, for use in the
3898         new visited link code. Added an invalidate function. Renamed all the
3899         data members to use the m_ prefix.
3900
3901         * WebCore.base.exp: Updated.
3902
3903 2008-03-05  Anders Carlsson  <andersca@apple.com>
3904
3905         Reviewed by Sam.
3906
3907         * WebCore.xcodeproj/project.pbxproj:
3908         Change jni_jsobject.cpp to be Obj-C++ for now. The plan is to merge 
3909         this with jni_objc.mm and create jni_jsobject.mm.
3910         
3911         * bridge/jni/jni_jsobject.cpp:
3912         (createRootObject):
3913         Move createRootObject here from WebCoreFrameBridge.
3914         
3915         (JavaJSObject::createNative):
3916         Call the newly added createRootObject function.
3917         
3918         * bridge/runtime_root.cpp:
3919         (KJS::Bindings::RootObject::initializeJNIThreading):
3920         * bridge/runtime_root.h:
3921         setCreateRootObject no longer takes a root object, rename it to initializeJNIThreading.
3922
3923         * page/mac/FrameMac.mm:
3924         (WebCore::Frame::createScriptInstanceForWidget):
3925         Just call Frame::createRootObject here.
3926         
3927         * page/mac/WebCoreFrameBridge.mm:
3928         (-[WebCoreFrameBridge init]):
3929         Call initializeJNIThreading.
3930
3931 2008-03-05  Anders Carlsson  <andersca@apple.com>
3932
3933         Reviewed by Sam.
3934
3935         Change some static class variables to be regular static variables,
3936         making it easier to move the chunk of mac-specific code out of runtime_root.[cpp|h]
3937
3938         * bridge/runtime_root.cpp:
3939         (KJS::Bindings::completedJavaScriptAccess):
3940         (KJS::Bindings::RootObject::dispatchToJavaScriptThread):
3941         (KJS::Bindings::performJavaScriptAccess):
3942         (KJS::Bindings::RootObject::createRootObject):
3943         (KJS::Bindings::RootObject::runLoop):
3944         (KJS::Bindings::RootObject::setCreateRootObject):
3945         * bridge/runtime_root.h:
3946
3947 2008-03-05  Brent Fulgham <bfulgham@gmail.com>
3948
3949         Reviewed by Adam Roben.
3950
3951         Modify source files to use the USE(SAFARI_THEME) macro, rather than
3952         USE_SAFARI_THEME.  (http://bugs.webkit.org/show_bug.cgi?id=17683)
3953
3954         * WebCore/platform/win/PlatformScrollBarSafari.cpp
3955         * WebCore/rendering/RenderThemeSafari.cpp
3956         * WebCore/rendering/RenderThemeSafari.h
3957         * config.h: Move definition of WTF_USE_SAFARI_THEME here 
3958
3959 2008-03-05  Brady Eidson  <beidson@apple.com>
3960
3961         Reviewed by Alexey and Mark Rowe
3962
3963         Fix for <rdar://problem/5778247> - Reproducible crash on storage/execute-sql-args.html
3964
3965         DatabaseThread::unscheduleDatabaseTasks() manually filters through a MessageQueue,
3966         removing particular items for Databases that were shutting down.
3967
3968         This filtering operation is not atomic, and therefore causes a race condition with the
3969         database thread waking up and reading from the message queue.  
3970
3971         The end result was an attempt to dereference a null DatabaseTask.  Timing-wise, this never
3972         seemed to happen in a debug build, otherwise an assertion would've caught it.  Replacing that
3973         assertion with a crash in a release build is what revealed this bug.
3974
3975         The fix for the above symptom was entirely in WTF::MessageQueue in JSCore.  With this fix in 
3976         place, another crash popped up in the layout tests that was related to dereferencing a 
3977         deallocated object - simply because SQLTransaction had a raw pointer to it's Database object 
3978         when it needed to be a ref pointer.
3979
3980         * storage/SQLTransaction.cpp:
3981         (WebCore::SQLTransaction::runCurrentStatement):
3982         * storage/SQLTransaction.h: Change m_database to be a RefPtr
3983         (WebCore::SQLTransaction::database):
3984
3985 2008-03-05  Mark Rowe  <mrowe@apple.com>
3986
3987         Build fix.
3988
3989         * WebCore.base.exp:  Remove symbol that no longer exists from the exports file.
3990
3991 2008-03-05  Adam Roben  <aroben@apple.com>
3992
3993         Export a header/symbol for WebKit
3994
3995         Reviewed by Kevin M.
3996
3997         * WebCore.base.exp:
3998         * WebCore.xcodeproj/project.pbxproj:
3999
4000 2008-03-05  Adam Roben  <aroben@apple.com>
4001
4002         Move WebCoreScriptDebugger up to WebKit
4003
4004         Reviewed by Darin.
4005
4006         * WebCore.base.exp: Exported some functions used by
4007         WebCoreScriptDebugger, and sorted the list.
4008         * WebCore.xcodeproj/project.pbxproj: Removed
4009         WebCoreScriptDebugger.{h,mm} from the project and marked
4010         a few headers private so that WebKit can use them.
4011         * page/mac/WebCoreScriptDebugger.h: Removed.
4012         * page/mac/WebCoreScriptDebugger.mm: Removed.
4013
4014 2008-03-05  Anders Carlsson  <andersca@apple.com>
4015
4016         Build bridge/. Copy some headers over to WebKit as part of the post-build step.
4017         
4018         * WebCore.vcproj/WebCore.vcproj:
4019
4020 2008-03-05  Anders Carlsson  <andersca@apple.com>
4021
4022         Reviewed by Geoff.
4023
4024         * WebCore.base.exp:
4025         Add the NPN and KJS methods.
4026         
4027         * WebCore.xcodeproj/project.pbxproj:
4028         Bring in bridge/
4029
4030         * config.h:
4031         Add HAVE_JNI define.
4032         
4033         * bindings/js/kjs_html.cpp:
4034         * bindings/objc/DOMInternal.mm:
4035         * bindings/objc/DOMUtility.mm:
4036         * bindings/objc/WebScriptObject.mm:
4037         * html/HTMLAppletElement.cpp:
4038         * html/HTMLEmbedElement.cpp:
4039         * html/HTMLObjectElement.cpp:
4040         * html/HTMLPlugInElement.cpp:
4041         * page/Frame.cpp:
4042         * page/mac/FrameMac.mm:
4043         * page/mac/WebCoreFrameBridge.mm:
4044         * page/mac/WebCoreScriptDebugger.mm:
4045         * plugins/win/PluginViewWin.cpp:
4046         Include file changes.
4047
4048 2008-03-04  Anders Carlsson  <andersca@apple.com>
4049
4050         Reviewed by Sam.
4051
4052         Rewrite NPRuntime string conversion routines to use WebCore::String
4053         
4054         * bridge/NP_jsobject.cpp:
4055         (_NPN_Evaluate):
4056         * bridge/c/c_utility.cpp:
4057         (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback):
4058         (KJS::Bindings::convertNPVariantToValue):
4059         (KJS::Bindings::convertNPStringToUTF16):
4060         (KJS::Bindings::identifierFromNPIdentifier):
4061         * bridge/c/c_utility.h:
4062
4063 2008-03-05  Oliver Hunt  <oliver@apple.com>
4064
4065         Reviewed by Alexey P.
4066
4067         Small performance improvement to putImageData (3-5% on assignment in my tests)
4068
4069         * html/CanvasPixelArray.h:
4070         (WebCore::CanvasPixelArray::set):
4071
4072 2008-03-04  Sam Weinig  <sam@webkit.org>
4073
4074         Reviewed by Adele.
4075
4076         * bindings/js/JSXMLHttpRequest.h: Remove unnecessary override of toBoolean.
4077
4078 2008-03-04  Maciej Stachowiak  <mjs@apple.com>
4079
4080         Reviewed by Sam and Oliver.
4081
4082         - fixed http://bugs.webkit.org/show_bug.cgi?id=16289
4083         - fixed Acid3 tests 26 and 27 (not exactly the same issue but related)
4084
4085         * bindings/js/JSNodeCustom.cpp:
4086         (WebCore::JSNode::mark): When marking a node that's in-document,
4087         mark the owner document if it hasn't been already. This means holding on
4088         to a single node from an unreferenced document now keeps the whole document alive.
4089         
4090         We are now at 90/100 on Acid3.
4091
4092 2008-03-04  Sam Weinig  <sam@webkit.org>
4093
4094         Qt build fix.
4095
4096         * page/qt/FrameQt.cpp:
4097
4098 2008-03-04  Sam Weinig  <sam@webkit.org>
4099
4100         Reviewed by Mark Rowe.
4101
4102         Rename kjs_window to JSDOMWindowBase.
4103
4104         - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
4105           JSDOMWindow.h
4106
4107         * ChangeLog:
4108         * DerivedSources.make:
4109         * GNUmakefile.am:
4110         * WebCore.pro:
4111         * WebCore.vcproj/WebCore.vcproj:
4112         * WebCore.xcodeproj/project.pbxproj:
4113         * WebCoreSources.bkl:
4114         * bindings/js/JSCustomVoidCallback.cpp:
4115         * bindings/js/JSCustomXPathNSResolver.cpp:
4116         * bindings/js/JSDOMWindowBase.cpp: Copied from bindings/js/kjs_window.cpp.
4117         * bindings/js/JSDOMWindowBase.h: Copied from bindings/js/kjs_window.h.
4118         * bindings/js/JSDOMWindowCustom.cpp:
4119         * bindings/js/JSDatabaseCustom.cpp:
4120         * bindings/js/JSEventTargetBase.cpp:
4121         * bindings/js/JSEventTargetBase.h:
4122         * bindings/js/JSEventTargetNode.cpp:
4123         * bindings/js/JSHTMLDocumentCustom.cpp:
4124         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
4125         * bindings/js/JSHistoryCustom.cpp:
4126         * bindings/js/JSLocation.cpp:
4127         * bindings/js/JSSQLTransactionCustom.cpp:
4128         * bindings/js/JSXMLHttpRequest.cpp:
4129         * bindings/js/ScheduledAction.cpp:
4130         * bindings/js/kjs_binding.cpp:
4131         * bindings/js/kjs_events.cpp:
4132         * bindings/js/kjs_navigator.cpp:
4133         * bindings/js/kjs_proxy.cpp:
4134         * bindings/js/kjs_window.cpp: Removed.
4135         * bindings/js/kjs_window.h: Removed.
4136         * bindings/scripts/CodeGeneratorJS.pm:
4137         * history/CachedPage.cpp:
4138         * loader/FrameLoader.cpp:
4139         * page/Chrome.cpp:
4140         * page/InspectorController.cpp:
4141         * page/mac/FrameMac.mm:
4142         * page/mac/WebCoreFrameBridge.mm:
4143         * page/qt/FrameQt.cpp:
4144         * page/win/FrameWin.cpp:
4145         * plugins/win/PluginViewWin.cpp:
4146
4147 2008-03-04  Mark Rowe  <mrowe@apple.com>
4148
4149         Speculative Qt build fix.
4150
4151         * platform/qt/PasteboardQt.cpp:
4152
4153 2008-03-04  Anders Carlsson  <andersca@apple.com>
4154
4155         Reviewed by Sam.
4156
4157         Update include paths. This code is not used yet.
4158
4159         * bridge/NP_jsobject.cpp:
4160         * bridge/c/c_class.cpp: