ChangeLog 2.22 MB
Newer Older
1
2
3
4
5
6
7
8
9
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Temporarily disable the ICO support for the Qt build on Windows.

        * WebCore.pro:
        * platform/graphics/qt/ImageDecoderQt.cpp:

10
11
12
13
14
15
16
17
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix evaluation with ActiveState Perl 5.6. Somehow it tried to treat nameEntries as array.

        * bindings/scripts/CodeGeneratorJS.pm:

18
19
20
21
22
23
24
25
26
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix compilation with MSVC in the Qt build (missing header files).

        * loader/icon/IconDatabaseNone.cpp:
        * platform/graphics/svg/SVGImage.cpp:

27
28
29
30
31
32
33
34
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Disable the favicon database on Windows for now, to eliminate the sqlite dependency.

        * WebCore.pro:

35
36
37
38
39
40
41
42
43
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Added custom preprocessor support to make_names.pl and use the moc for it in the Qt build.

        * WebCore.pro:
        * ksvg2/scripts/make_names.pl:

44
45
46
47
48
49
50
51
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Disable the batch mode for nmake to work around the clash of Node.c and Node.cpp both mapping to Node.obj

        * WebCore.pro:

52
53
54
55
56
57
58
59
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix compilation under Windows (removed sys/time.h dependency, use Qt instead).

        * platform/qt/SystemTimeQt.cpp:

hausmann's avatar
hausmann committed
60
61
62
63
64
65
66
67
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix compilation on Windows.

        * platform/graphics/qt/PathQt.cpp:

68
69
70
71
72
73
74
75
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix generation of ColorData.c on Windows.

        * WebCore.pro:

hausmann's avatar
hausmann committed
76
77
78
79
80
81
82
83
84
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix compilation under Qt/Windows.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::open):

85
86
87
88
89
90
91
92
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Changed extendedAttributes to be a variable instead of a hash directly. Required to work with ActiveState perl.

        * bindings/scripts/IDLStructure.pm:

93
94
95
96
97
98
99
100
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix header guard generation for CSSGrammar.h under Windows

        * WebCore.pro:

101
102
103
104
105
106
107
108
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix build with moc as preprocessor. Don't rely the preprocessor preserving whitespace at the beginning of lines.

        * bindings/scripts/IDLParser.pm:

109
110
111
112
113
114
115
116
117
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Make make-css-file-arrays.pl work on Windows by not calling /usr/bin/gcc as preprocessor for the Qt build.

        * WebCore.pro:
        * css/make-css-file-arrays.pl:

118
119
120
121
122
123
124
125
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        More gperf commandline fixes for Windows.

        * WebCore.pro:

126
127
128
129
130
131
132
133
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        More quoting fixes for perl under Windows.

        * WebCore.pro:

hausmann's avatar
hausmann committed
134
135
136
137
138
139
140
141
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix command quoting under Windows

        * WebCore.pro:

142
143
144
145
146
147
148
149
150
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix cssmakeprops and cssmakevalue scripts to work on Windows without cygwin perl. Avoid inplace substitutions and direct invocation of /bin/sh. Also call gperf with arguments that GnuWin32's gperf understands.

        * ksvg2/scripts/cssmakeprops:
        * ksvg2/scripts/cssmakevalues:

151
152
153
154
155
156
157
158
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Beautiful hacks to make more of the extra compiler magic work under Windows outside of cygwin.

        * WebCore.pro:

159
160
161
162
163
164
165
166
167
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Correctly propagate the custom preprocessor option through the idl parser and the codegenerator.

        * bindings/scripts/CodeGenerator.pm:
        * bindings/scripts/generate-bindings.pl:

168
169
170
171
172
173
174
175
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        When constructing the absolute path when searching for IDL files in the list of search paths don't prepend a slash if $SOURCEROOT as environment variable is not set. In the Qt build we pass absolute search paths already and we don't set SOURCEROOT. Under Unix that gives a double slash for the directory which works fine, under Windows we get /c:\webkit\foo which of course does not work.

        * bindings/scripts/CodeGenerator.pm:

176
177
178
179
180
181
182
183
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Relax the regular expression that tries to find constant declarations in the IDL source to not require leading whitespace. This makes it work with preprocessors that happen to eliminate leading whitespace.

        * bindings/scripts/IDLParser.pm:

184
185
186
187
188
189
190
191
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Try to use the moc as preprocessor for the IDL bindings generator

        * WebCore.pro:

192
193
194
195
196
197
198
199
200
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Make it possible to specify the preprocessor the bindings generator uses instead of hardcoding /usr/bin/gcc (which is of course no option on Windows). Also try to use a more portable and Windows friendly way of opening the reading pipe to the preprocessor.

        * bindings/scripts/IDLParser.pm:
        * bindings/scripts/generate-bindings.pl:

201
202
203
204
205
206
207
208
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Don't use stdout redirection for make_names.pl as it doesn't work under Windows perl (outside cygwin).

        * ksvg2/scripts/make_names.pl:

209
210
211
212
213
214
215
216
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix DocTypeStrings.cpp generation to work on Windows with cmd.exe

        * WebCore.pro:

217
218
219
220
221
222
223
224
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        Work around aliasing bugs in WebCore by compiling with -fno-strict-aliasing for gcc builds for now.

        * WebCore.pro:

225
226
227
228
229
230
231
232
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        Use -Wreturn-type only when compiling with g++

        * WebCore.pro:

233
234
235
236
237
238
239
240
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Zack.

        Don't use pkg-config on Windows for the Qt build

        * WebCore.pro:

hausmann's avatar
hausmann committed
241
242
243
244
245
246
247
248
2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Zack.

        Fix compilation with MSVC.

        * platform/graphics/qt/ImageDecoderQt.cpp:

tristan's avatar
tristan committed
249
250
251
252
253
254
255
256
257
258
2007-07-26  Tristan O'Tierney  <tristan@apple.com>

        Reviewed by Anders Carlsson.

        <rdar://problem/5350019> REGRESSION: Pages on milliyet.com are added to Back list when visited, causing Back button to just reload

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
        If the policy action is FrameLoadTypeRedirectLockHistory, don't add the frame load url to the history.

andersca's avatar
andersca committed
259
260
261
262
263
264
265
266
267
2007-07-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Add a FIXME about caching pages with plug-ins that have outstanding NPObjects.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::canCachePage):

268
269
270
271
272
273
274
275
276
277
278
279
2007-07-26  David Hyatt  <hyatt@apple.com>

        FIx for <rdar://problem/5289721> CrashTracer: [REGRESSION] 2658 crashes in Safari at com.apple.WebCore: WebCore::RenderInline::height const + 16

        Adding a null check for now and an assert.  We don't know how/why this
        bug happens, but hopefully the assert will help people to reproduce.

        Reviewed by kevin

        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::height):

andersca's avatar
andersca committed
280
281
282
283
284
285
286
287
288
289
290
291
2007-07-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5362783>
        In Mail, a crash occurs at WTF::fastMalloc() when attempting to create a new HTML message from http://nytimes.com/
        
        If the cache is disabled and there is already a resource with the given URL, return it instead of creating a new one.
        
        * loader/DocLoader.cpp:
        (WebCore::DocLoader::requestResource):

adele's avatar
adele committed
292
293
294
295
296
297
298
299
2007-07-26  Adele Peterson  <adele@apple.com>

        Reviewed by Geoff. 

        Build fix.

        * platform/network/cf/ResourceRequest.h:

andersca's avatar
andersca committed
300
301
302
303
304
305
306
307
308
309
310
311
312
313
2007-07-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by John Sullivan.

        <rdar://problem/5349389> 
        Some frame load delegate methods not called when loading a page from the BF cache
        
        These calls were moved to FrameLoader::begin, which is never called for pages loaded
        from the BF cache. This happened in revision 24490.
         
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::transitionToCommitted):
        Call delegate methods if the load is from the BF cache.

kmccullo's avatar
kmccullo committed
314
315
316
317
318
319
320
321
322
323
324
2007-07-26  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Darin, Geoff and Sam.

        - <rdar://problem/5150461> Resizing the window larger than the screen causes no resize.
        - We now better match the behavior of other browsers.

        * bindings/js/kjs_window.cpp:
        (KJS::constrainToVisible):
        (KJS::WindowFunc::callAsFunction):

tristan's avatar
tristan committed
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
2007-07-26  Tristan O'Tierney  <tristan@apple.com>

        Reviewed by Adele Peterson.
        
        <rdar://problem/5359921> WebCore should maintain a dirty flag for confirmation on unsaved changes

        * bindings/objc/DOMHTML.mm:
        (-[DOMHTMLInputElement _isUserEdited]):
        (-[DOMHTMLTextAreaElement _isUserEdited]):
        Renamed _isEdited to _isUserEdited since the functionality is now different
        
        * bindings/objc/DOMPrivate.h:
        Renamed _isEdited to _isUserEdited.
        
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::RenderTextControl):
        Defaulted m_userEdited to false
        
        (WebCore::RenderTextControl::updateFromElement):
        Set m_userEdited to false, since the change wasn't triggered first by an edit
        
        (WebCore::RenderTextControl::subtreeHasChanged):
        Set m_userEdited to true, since it has been touched by the user
        
        * rendering/RenderTextControl.h:
        (WebCore::RenderTextControl::isUserEdited):
        (WebCore::RenderTextControl::setUserEdited):
        Added two new methods to set/return the userEdited boolean value.
        
ggaren's avatar
ggaren committed
354
355
356
357
358
359
360
361
362
363
364
365
366
2007-07-26  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Beth Dakin.

        Fixed NULL-dereference crash seen on buildbot.
        
        No bug filed because this is a part of <rdar://problem/5241167>.

        * history/PageCache.h:
        (WebCore::PageCache::get): NULL-check HistoryItems passed to get()
        and remove(), to match the old semantics of HashMap. For clarity,
        ASSERT that add() is not called with NULL arguments.

andersca's avatar
andersca committed
367
368
369
370
371
372
373
374
375
376
377
2007-07-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver Hunt.

        <rdar://problem/5361106> Crash in user style sheet when loading webpage

        Null check m_frame.
        
        * dom/Document.cpp:
        (WebCore::Document::stylesheetLoaded):

378
379
380
381
382
383
384
2007-07-26  Geoffrey Garen  <ggaren@apple.com>

        Used `svn merge -r24646:24645' to revert project changes I accidentally
        checked in.

        * WebCore.xcodeproj/project.pbxproj:

ggaren's avatar
ggaren committed
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
2007-07-26  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        Fixed <rdar://problem/5241167> REGRESSION: PLT 1% slower due to r21793 
        (global page cache cap)
        
        I just measured a .1%-.2% regression in PLT average, but a .4% win in 
        PLT fastest run, so I think this regression is licked.

        Surprisingly, the combination of wtf data structures I originally used 
        for PageCache turned out to be too slow, so I reworked PageCache to use
        a hand-crafted linked list for LRU tracking (instead of ListHashSet), 
        to store its CachedPages in the HistoryItems to which they corresponded 
        (instead of using a HashMap), and to ref/deref HistoryItems manually
        (instead of using RefPtr, which would ref once for every reference in 
        the linked list).

        * history/HistoryItem.h: Added data members for PageCache data. Made
        PageCache a friend so it could access them. Ideally (from an 
        encapsulation perspective), we would store this data an independent 
        structure, but that's just too slow.

        * history/PageCache.cpp: Added a hand-crafted linked list for LRU 
        tracking.
        (WebCore::PageCache::PageCache):
        (WebCore::PageCache::add): Adopt the HistoryItem's ref when it's added.
        (WebCore::PageCache::remove): deref() the Historyitem when it's 
        removed.
        (WebCore::PageCache::prune):
        (WebCore::PageCache::addToLRUList):
        (WebCore::PageCache::removeFromLRUList):

        * history/PageCache.h:
        (WebCore::PageCache::get): Inlined just in case.

421
422
423
424
425
426
427
428
429
2007-07-26  Adam Treat  <treat@kde.org>

        Reviewed by George Staikos.

        Launch the context menu in the right place.

        * platform/qt/ContextMenuQt.cpp:
        (WebCore::ContextMenu::setPlatformDescription):

mjs's avatar
mjs committed
430
431
432
433
434
435
436
437
438
439
440
441
442
2007-07-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Mark.

        - follow-up to previous change to avoid assertion failures in debug
        
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::getResponseText): hold JSLock when needed
        (WebCore::XMLHttpRequest::open): ditto
        (WebCore::XMLHttpRequest::didFinishLoading): ditto
        (WebCore::XMLHttpRequest::didReceiveData): ditto
        * xml/XMLHttpRequest.h:

andersca's avatar
andersca committed
443
444
445
446
447
448
449
450
451
452
453
454
2007-07-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5327912> 
        iDisk: Web iDisk & main iDisk appear blank
        
        Prepend any remaining text that scripts might have written.
        
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::scriptExecution):

kmccullo's avatar
kmccullo committed
455
456
457
458
459
460
461
462
463
464
2007-07-25  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Tim, Darin, Oliver.

        - <rdar://problem/5329440> REGRESSION: Clicking links with the feed:// protocol in Safari 3 does nothing
        - Check for file:// urls when clicking links, not block all schemes that are treated as local.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::load):

mjs's avatar
mjs committed
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
2007-07-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        - fixed <rdar://problem/5300291> Optimize GC to reclaim big, temporary objects (like XMLHttpRequest.responseXML) quickly
        
        With this plus related JavaScriptCore changes, a number of XMLHttpRequest situations that
        result in huge data sets are addressed, including a single huge responseXML on an XMR done
        repeatedly, or accessing responseText repeatedly during loading of a single large XHR.
        
        In addition to the GC changes in JavaScriptCore, I changed responseText to be stored as a
        KJS::UString instead of a WebCore::String so that the JavaScript responseText value can
        share the buffer (indeed multiple intermediate responseTexts can share its buffer).

        
        First of all, here's some manual test cases that will each blow out the process VM without this fix,
        but will settle into decent steady state with.
        
        * manual-tests/memory: Added.
        * manual-tests/memory/MessageUidsAlreadyDownloaded2: Added.
        * manual-tests/memory/string-growth.html: Added.
        * manual-tests/memory/xhr-multiple-requests-responseText.html: Added.
        * manual-tests/memory/xhr-multiple-requests-responseXML.html: Added.
        * manual-tests/memory/xhr-multiple-requests.html: Added.
        * manual-tests/memory/xhr-repeated-string-access.xml: Added.

        And here's the actual code changes:
        
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSDocumentCustom.cpp:
        (WebCore::toJS): Record extra cost if the document is frameless (counting the nodes
        doesn't make a measurable performance difference here in any case I could find)
        * bindings/js/JSXMLHttpRequest.cpp:
        (KJS::JSXMLHttpRequest::getValueProperty): Adjust for the fact that ressponseText
        is now stored as a UString.
        * bindings/js/kjs_binding.cpp:
        (KJS::jsOwnedStringOrNull): New helper.
        * bindings/js/kjs_binding.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::getResponseText): It's a UString!
        (WebCore::XMLHttpRequest::getResponseXML): handle the fact that m_responseText
        is a UString.
        (WebCore::XMLHttpRequest::XMLHttpRequest): ditto.
        (WebCore::XMLHttpRequest::abort): call dropProtection
        (WebCore::XMLHttpRequest::didFinishLoading): call dropProtection
        (WebCore::XMLHttpRequest::dropProtection): after removing our GC protection,
        report extra cost of this XHR's responseText buffer.
        * xml/XMLHttpRequest.h:

thatcher's avatar
thatcher committed
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
2007-07-25  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Brady.

        <rdar://problem/4796657> table deletion outline does not always follow the table size as editing occurs inside

        Change the outline element to position itself automaticlly using the top, left, bottom and right CSS properties.
        This made the container element redundant, so it has been removed. Now the outline element and the delete button
        both get appended to the target element and positioned based on that container element. This removes the need
        to update the width and height when the target contents changed.

        * editing/DeleteButtonController.cpp:
        (WebCore::DeleteButtonController::show): Change the style properties and remove the container element.
        (WebCore::DeleteButtonController::hide): Remove the button and outline from the target element.
        * editing/DeleteButtonController.h: Removed updateOutlineStyle, respondToChangedContents and m_containerElement.
        * editing/Editor.cpp:
        (WebCore::Editor::respondToChangedContents): Remove the call to DeleteButtonController respondToChangedContents.

andersca's avatar
andersca committed
532
533
534
535
536
537
538
539
540
541
542
543
2007-07-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5344471>
        CrashTracer: [USER] 1 crash in Mail at WebCore::PluginTokenizer::writeRawData(char const*, int)
        
        Make sure to layout so we'll have a renderer. Also null-check the renderer for extra safety.
        
        * loader/PluginDocument.cpp:
        (WebCore::PluginTokenizer::writeRawData):

darin's avatar
darin committed
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
2007-07-25  Marvin Decker  <marv.decker@gmail.com>

        Reviewed by Maciej, Darin.

        - http://bugs.webkit.org/show_bug.cgi?id=14030

        Add ResourceHandle::setClient to resolve some messiness with handle
        releasing. Clear the client when ResourceLoader is going to release
        the handle to prevent crashes in the case where somebody still holds a
        reference (this doesn't seem to currently happen in practice). Add
        NULL-checking for ResourceHandle implementations using the client.

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::releaseResources):
        * platform/network/ResourceHandle.cpp:
        (WebCore::ResourceHandle::fireBlockedFailure):
        (WebCore::ResourceHandle::setClient):
        * platform/network/ResourceHandle.h:
        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::willSendRequest):
        (WebCore::didReceiveResponse):
        (WebCore::didReceiveData):
        (WebCore::didFinishLoading):
        (WebCore::didFail):
        (WebCore::willCacheResponse):
        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
        (WebCore::ResourceHandle::receivedCancellation):
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
        (WebCore::ResourceHandle::didCancelAuthenticationChallenge):
        (WebCore::ResourceHandle::receivedCancellation):
        (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
        (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
        (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
        (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
        (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
        (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
        (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):

darin's avatar
darin committed
583
584
585
586
587
588
589
590
591
592
593
2007-07-25  Maxime Britto  <mbritto@pleyo.com>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11756
          <rdar://problem/5286420>

        Fix a typo error to really compare the present domain to the domain of the parent of the targeted frame.

        * loader/FrameLoader.cpp: (WebCore::FrameLoader::canTarget):

darin's avatar
darin committed
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
2007-07-25  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14758
          REGRESSION: Repeated text after line break on facebook.com

        Test: fast/text/reset-emptyRun.html

        * platform/BidiResolver.h:
        (WebCore::::deleteRuns): Re-add a line that was removed for no reason at all
        during refactoring in r24485.
        * rendering/bidi.cpp:
        (WebCore::BidiState::deleteRuns): Ditto.

oliver's avatar
oliver committed
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
2007-07-24  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam and Justin.

        <rdar://problem/5141779> WebView editableDOMRangeForPoint: & moveDragCaretToPoint: returns last position in DOMText range

        Remove bridge implementation for editableDOMRangeForPoint: and moveDragCaretToPoint:. 
        Now use cross-platform code Editor::rangeForPoint and DragController::placeDragCaret instead.
        This required lifting local code from DragController.cpp into the shared methods
        Frame::visiblePositionForPoint and Frame::documentAtPoint.

        * WebCore.exp:
        * editing/Editor.cpp:
        (WebCore::Editor::rangeForPoint):
        * editing/Editor.h:
        * page/DragController.cpp:
        (WebCore::DragController::dragEnded):
        (WebCore::DragController::performDrag):
        (WebCore::DragController::dragEnteredOrUpdated):
        (WebCore::DragController::tryDocumentDrag):
        (WebCore::DragController::operationForLoad):
        (WebCore::setSelectionToDragCaret):
        (WebCore::DragController::concludeDrag):
        (WebCore::DragController::placeDragCaret):
        * page/DragController.h:
        * page/Frame.cpp:
        (WebCore::Frame::visiblePositionForPoint):
        (WebCore::Frame::documentAtPoint):
        * page/Frame.h:
        * page/mac/WebCoreFrameBridge.h:
        * page/mac/WebCoreFrameBridge.mm:

weinig's avatar
weinig committed
641
642
643
644
645
646
647
648
2007-07-24  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Adam Roben.

        Remove unused .strip files.

        * WebCore.xcodeproj/project.pbxproj:

adele's avatar
adele committed
649
650
651
652
653
654
655
656
657
658
659
2007-07-24  Adele Peterson  <adele@apple.com>

        Reviewed by Hyatt.

        Fix for <rdar://problem/5308492> Computed width for elements with box-sizing: border-box is not equal to the width set in the CSS

        Test: fast/css/getComputedStyle-border-box.html

        * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
          For the width and height properties, when you get the value from the renderer, use the renderer's box sizing value to determine the size.

andersca's avatar
andersca committed
660
661
662
663
664
665
666
667
668
669
670
671
2007-07-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by Kevin Decker.

        <rdar://problem/5355781>
        REGRESSION: reproducible crash in CoreFoundation!CFRunLoopFinished on Flash pages
        
        Null check the loader.
        
        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::start):

adele's avatar
adele committed
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
2007-07-24  Adele Peterson  <adele@apple.com>

        Reviewed by Hyatt and Adam.

        Fix for <rdar://problem/5130590> REGRESSION: style="width:1px" on <select> element no longer hides the element

        Removed hack that forced large padding on popup buttons.  Now we put that padding in the inner block, so that
        the specified width will be honored.

        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::adjustInnerStyle): Set the padding on the inner block based on the metrics provided by the theme.
        (WebCore::RenderMenuList::controlClipRect): Clip to the intersection of the inner content box and the outer content box.
         This will leave room for the arrows which sit in the inner box padding, and if the inner box ever spills out of the outer box, 
         that will get clipped too.
        (WebCore::RenderMenuList::calcPrefWidths):  Add in the inner box's padding and border to the pref widths.

        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintMenuList): Only inflate the rect for the shadow if the rect is big enough to fit the whole control.
         Also, on Leopard, the NSCell will draw outside of a small rect, so add a clip for that case.
        (WebCore::RenderThemeMac::paintMenuListButton): Restrict font scale to make sure the arrows will actually fit in the bounds vertically.
         Don't draw the arrows if they won't fit horizontally.  Reset padding.  Since WinIE doesn't honor padding for popups, its not critical to
         support padding at this time.
        (WebCore::RenderThemeMac::adjustMenuListStyle): Don't set the padding here.  Instead, we're going to set the padding on the inner block of the select.
        (WebCore::RenderThemeMac::adjustMenuListButtonStyle): ditto.
        (WebCore::RenderThemeMac::popupInternalPaddingLeft): Added.  Provides internal padding values for RenderMenuList.
        (WebCore::RenderThemeMac::popupInternalPaddingRight): ditto.
        (WebCore::RenderThemeMac::popupInternalPaddingTop): ditto.
        (WebCore::RenderThemeMac::popupInternalPaddingBottom): ditto.
        * rendering/RenderThemeMac.h:

        * rendering/RenderThemeSafari.cpp:  The same changes that were made to RenderThemeMac were made here, with variations for the arrow differences.
          This code should be refactored and shared, but now did not seem like the right time to do that refactoring.
        (WebCore::RenderThemeSafari::paintMenuList):
        (WebCore::RenderThemeSafari::paintMenuListButton):
        (WebCore::RenderThemeSafari::adjustMenuListStyle):
        (WebCore::RenderThemeSafari::popupInternalPaddingLeft):
        (WebCore::RenderThemeSafari::popupInternalPaddingRight):
        (WebCore::RenderThemeSafari::popupInternalPaddingTop):
        (WebCore::RenderThemeSafari::popupInternalPaddingBottom):
        (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
        * rendering/RenderThemeSafari.h:

        * rendering/RenderTheme.h: Added to provide internal padding values for RenderMenuList.
        (WebCore::RenderTheme::popupInternalPaddingLeft):
        (WebCore::RenderTheme::popupInternalPaddingRight):
        (WebCore::RenderTheme::popupInternalPaddingTop):
        (WebCore::RenderTheme::popupInternalPaddingBottom):

720
721
722
723
724
725
726
727
728
729
730
731
732
733
2007-07-24  Lars Knoll  <lars@trolltech.com>

        Reviewed by Adam Roben & David Kilzer.

        replace the makeprop and makevalues shell scripts by equivalent perl versions. This is required to remove the last shell dependency when building QtWebKit on Windows.

        * DerivedSources.make:
        * WebCore.pro:
        * WebCore.xcodeproj/project.pbxproj:
        * css/makeprop: Added.
        * css/makeprop.pl: Removed.
        * css/makevalues: Added.
        * css/makevalues.pl: Removed.

bdakin's avatar
bdakin committed
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
2007-07-24  Beth Dakin  <bdakin@apple.com>

        Reviewed by Darin.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14714 REGRESSION: 
        ASSERTION FAILED: i < size() in Vector.h:401 on negative -webkit-
        column-width
        - and -
        http://bugs.webkit.org/show_bug.cgi?id=14718 REGRESSION: ASSERTION 
        FAILED: i < size() in Vector.h:401 on zero -webkit-column-count

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::calcColumnWidth): Make 1 the minimum value 
        for column-width and column-count. Since the spec does not address 
        what to do with negative values for these properties, we are 
        patching the rendering code instead of the parser.

andersca's avatar
andersca committed
751
752
753
754
755
756
757
758
759
760
761
762
2007-07-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by Steve.
        
        <rdar://problem/5355403>
        REGRESSION: 303A2 does not display pdf files with AdobeReader 8.1
        
        Close the file before handing off the file name to the plug-in.
        
        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::destroyStream):

763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
2007-07-24  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by Adam.

        http://bugs.webkit.org/show_bug.cgi?id=14711
        RenderThemeGdk's buttons are state-agnostic (pressed, hovered)

        Remove unnecessary label from widget instances.
        Render check and radio widgets correctly.
        Determine the widget state and render it appropriately.

        * platform/gdk/RenderThemeGdk.cpp:
        (WebCore::RenderThemeGdk::determineState):
        (WebCore::RenderThemeGdk::paintCheckbox):
        (WebCore::RenderThemeGdk::paintRadio):
        (WebCore::RenderThemeGdk::paintButton):
        (WebCore::RenderThemeGdk::gtkButton):
        (WebCore::RenderThemeGdk::gtkCheckbox):
        (WebCore::RenderThemeGdk::gtkRadioButton):
        * platform/gdk/RenderThemeGdk.h:

bdash's avatar
bdash committed
784
785
786
787
788
789
790
791
792
793
794
795
796
797
2007-07-24  Mark Rowe  <mrowe@apple.com>

        Reviewed by Antti.

        <rdar://problem/5356666> NSMenuItem's seen leaking on buildbot

        * platform/mac/ContextMenuItemMac.mm:
        (WebCore::ContextMenuItem::releasePlatformDescription): Transfer ownership from the RetainPtr's CF-based retain
        count to the Foundation retain count so that callers of releasePlatformDescription can use -[NSObject release]
        to dispose of it in a manner that won't leak under Obj-C GC.
        * platform/mac/ContextMenuMac.mm:
        (WebCore::ContextMenu::appendItem): Release platformItem as we were transferred its ownership by releasePlatformDescription.
        (WebCore::ContextMenu::insertItem): ditto.

798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
2007-07-24  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14684
          Hebrew text in Safari chrome is reversed (LTR instead of RTL)

        Test: fast/text/drawBidiText.html

        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * manual-tests/chrome-bidi-text.html: Added.
        * manual-tests/resources/chrome-bidi-text-window.html: Added.
        * platform/BidiReorderCharacters.cpp: Removed.
        * platform/BidiReorderCharacters.h: Removed.
        * platform/BidiResolver.h:
        (WebCore::BidiCharacterRun::start): Added accessor method.
        (WebCore::BidiCharacterRun::stop): Ditto.
        (WebCore::BidiCharacterRun::level): Ditto.
        (WebCore::BidiCharacterRun::next): Ditto.
        (WebCore::::appendRun): Added default implementation.
        * platform/TextStyle.h:
        (WebCore::TextStyle::setDirectionalOverride): Added accessor method.
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::TextRunIterator::TextRunIterator): Added. A BidiResolver-
        compliant iterator over the characters in a TextRun.
        (WebCore::TextRunIterator::offset):
        (WebCore::TextRunIterator::increment):
        (WebCore::TextRunIterator::atEnd):
        (WebCore::TextRunIterator::current):
        (WebCore::TextRunIterator::direction):
        (WebCore::TextRunIterator::operator==):
        (WebCore::TextRunIterator::operator!=):
        (WebCore::GraphicsContext::drawBidiText): Added. Applies the Unicode
        Bidi Algorithm to the text and draws the resulting unidirectional runs
        in the right order and with the right directionality.
        * platform/graphics/GraphicsContext.h:
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::paint): Replaced the use of a character buffer
        and BidiReorderCharacters with calling to drawBidiText(). Removed special
        handling of '-webkit-rtl-ordering:visual' because that CSS property is an
        implementation detail of WebCore's visual Hebrew support, and the UA stylesheet
        sets it to 'logical' for this form control. Authors can specify the ordering
        using the 'direction' and 'unicode-bidi' properties.
        * platform/win/WebCoreTextRenderer.cpp:
        (WebCore::isOneLeftToRightRun): Added. Checks if the text consists of
        a single left-to-right run, in which case it requires no bidi processing.
        (WebCore::doDrawTextAtPoint): Changed to call drawBidiText if the text
        is not entirely left-to-right.
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::paintObject): Replaced the use of a
        character buffer in BidiReorderCharacters with calling to drawBidiText().
        Removed special handling of '-webkit-rtl-ordering:visual' for the same reason
        stated above.
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::paintItemForeground): Ditto. Also changed the
        run-rounding modes used when drawing to match those used when measuring.

oliver's avatar
oliver committed
858
859
860
861
862
863
864
865
866
2007-07-23  Oliver Hunt  <oliver@apple.com>

        Reviewed by Steve.

        Windows build fix, remove superfluous !

        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent):

867
868
869
870
871
872
873
874
875
876
2007-07-23  Adam Roben  <aroben@apple.com>

        Add an assignment operator for BString that takes a BSTR

        Reviewed by Geoff and Oliver.

        * platform/win/BString.cpp:
        (WebCore::BString::operator=):
        * platform/win/BString.h:

justing's avatar
justing committed
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
2007-07-23  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Geoff.
        
        <rdar://problem/5354455> Word selection when right-clicking can be confusing (14728)

        * page/EventHandler.cpp:
        (WebCore::EventHandler::sendContextMenuEvent): In non-editable content,
        only do word selection over text.  In editable content, we will continue
        to select images, line breaks and other elements on right-clicks, to match 
        TextEdit.  For now, in editable content, we'll live with the cases where 
        positionForPoint creates selections that aren't underneath the mouse.  These
        aren't regressions because we've always done word selection on right clicks
        in editable content.

andersca's avatar
andersca committed
892
893
894
895
896
897
898
899
900
901
902
903
904
2007-07-23  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5335354>
        REGRESSION(r21359-r21368): Can't edit inside RTEF editable region
        
        If Document::open is called and there's a pending load that has not yet started,
        that load should be cancelled.
        
        * dom/Document.cpp:
        (WebCore::Document::open):

thatcher's avatar
thatcher committed
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
2007-07-23  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Hyatt.

        <rdar://problem/5242145> REGRESSION: Clicking on symbol in documentation often doesn't scroll to symbol

        A renderer for the anchor wasn't always available at the time parsing finished. So we need
        to bail out of gotoAnchor if stylesheets are pending and remember to call gotoAnchor later
        once all of the pending stylesheets load.

        * dom/Document.cpp:
        (WebCore::Document::Document): Initialize m_gotoAnchorNeededAfterStylesheetsLoad to false.
        (WebCore::Document::stylesheetLoaded): If we have no more pending stylesheets, call gotoAnchor if needed.
        * dom/Document.h:
        (WebCore::Document::gotoAnchorNeededAfterStylesheetsLoad): New method.
        (WebCore::Document::setGotoAnchorNeededAfterStylesheetsLoad): Ditto.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::gotoAnchor): Bail early if the document still has pending stylesheets.
        * loader/FrameLoader.h: Make gotoAnchor() public.

sullivan's avatar
sullivan committed
925
926
927
928
929
930
931
932
933
934
935
2007-07-23  John Sullivan  <sullivan@apple.com>

        Reviewed by Darin
        
        - fixed <rdar://problem/5327887> Printing Mail note (or Safari page) with misspelled word prints red underline

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
        When printing, bail out without doing any work. Also moved a couple of lines down below another early
        bailout since they were pointless above it.

oliver's avatar
oliver committed
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
2007-07-23  Oliver Hunt  <oliver@apple.com>

        Reviewed by Darin.
        
        <rdar://problem/5353577> WebKit key event behaviour needs to better match other browsers keyevent behaviour
        <rdar://problem/5352152> REGRESSION (24399-24479): Pressing Enter in a search field at apple.com no longer starts a search with Korean IM
        <rdar://problem/5352649> WebKit should send keyDown event on autorepeat keyDowns
        http://bugs.webkit.org/show_bug.cgi?id=14690

        Perform Input Method call first so that our behaviour is determined by whether or not 
        the input method has actually handle the event, rather than by making guesses based 
        on the existences of marked text.  This fixes issues with IMs that have side effects
        even on events they do not handle.

        Refactored the code in order to improve clarity given the hoisting required by performing
        the IM call earlier.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent):

andersca's avatar
andersca committed
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
2007-07-23  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5045711> 
        http://bugs.webkit.org/show_bug.cgi?id=12938
        Google calendar settings page crashes
        
        Move handling of checked radio buttons to a new class, HTMLFormElement::CheckedRadioButtons. 
        Each <form> element has an instance of this class. For radio buttons without a containing 
        form, the document has an instance of HTMLFormElement::CheckedRadioButtons where the
        state of those radio buttons will be stored.
        be stored.
        
        This also fixes another bug where removing a checked radio button that does not have a
        containing form would not remove the radio button from the checked radio buttons map,
        which could lead to a crash due to a dangling pointer.
        
        * dom/Document.cpp:
        (WebCore::Document::~Document):
        * dom/Document.h:
        (WebCore::Document::checkedRadioButtons):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::registerFormElement):
        (WebCore::HTMLFormElement::removeFormElement):
        (WebCore::HTMLFormElement::CheckedRadioButtons::didCheckButton):
        (WebCore::HTMLFormElement::CheckedRadioButtons::checkedButtonForGroup):
        (WebCore::HTMLFormElement::CheckedRadioButtons::removeButtonIfChecked):
        * html/HTMLFormElement.h:
        (WebCore::HTMLFormElement::checkedRadioButtons):
        * html/HTMLGenericFormElement.cpp:
        (WebCore::HTMLGenericFormElement::insertedIntoTree):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::~HTMLInputElement):
        (WebCore::checkedRadioButtons):
        (WebCore::HTMLInputElement::isKeyboardFocusable):
        (WebCore::HTMLInputElement::setInputType):
        (WebCore::HTMLInputElement::parseMappedAttribute):
        (WebCore::HTMLInputElement::setChecked):
        (WebCore::HTMLInputElement::preDispatchEventHandler):
        (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
        * manual-tests/remove-form-node-with-radio-buttons-crash.html: Added.

999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
2007-07-23  David Hyatt  <hyatt@apple.com>

        Fix for 5350587, hang in iExploder text 8101.  The code that painted outlines for continuations was buggy
        in that it assumed the chain was always inline-block-inline, but this is only true for the innermost chained
        continuation.  To make this more robust, we always just use the inline's containing block's containing block,
        which should be guaranteed to enclose all renderers in the continuation chain.  In addition, there is now a
        null check (to guarantee no more hangs) and an assert (to check if we hit this situation again where the block
        used to paint does not properly enclose the continuation chain).

        Reviewed by beth

        fast/inline/outline-continuation.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintContinuationOutlines):
        * rendering/InlineFlowBox.cpp:
        (WebCore::RenderInline::paint):

1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
2007-07-22  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        WARNING: NO TEST CASES ADDED OR CHANGED

        Add the WebKit/Gtk API to the buildsystem, ask qmake to create a
        pkg-config file and install headers and libraries.

        Start to emit signals from FrameLoaderClientGdk, hide the kit Frame
        inside the the FrameLoaderClientGdk.

        Move ChromeClientGdk to WebKit/gtk/WebCoreSupport

        * WebCore.pro:
        * loader/gdk/FrameLoaderClientGdk.cpp:
        * loader/gdk/FrameLoaderClientGdk.h:
        * platform/gdk/ChromeClientGdk.h: Removed.
        * platform/gdk/FrameGdk.cpp: Remove code not belonging here
        * platform/gdk/FrameGdk.h:
        * platform/gdk/ScrollViewGdk.cpp: The gdkDrawable won't exist at that time and it is fine
        * platform/gdk/TemporaryLinkStubs.cpp: Removed ChromeClientGdk stubs

mjs's avatar
mjs committed
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
2007-07-22  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Adam.

        <rdar://problem/5353174> REGRESSION: 1% JavaScript performance regression fro Window refactoring (14717)
        http://bugs.webkit.org/show_bug.cgi?id=14717
        
        * bindings/js/kjs_window.cpp:
        * bindings/js/kjs_window.h:
        (KJS::Window::impl): inlined
        * page/DOMWindow.cpp:
        * page/DOMWindow.h:
        (WebCore::DOMWindow::frame): inlined

1054
1055
1056
1057
2007-07-22  Darin Adler  <darin@apple.com>

        * platform/ContextMenu.cpp: Added missing include.

weinig's avatar
weinig committed
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
2007-07-22  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14682
        REGRESSION(24285-24399): alerts do not appear at W3C RTL test page

        Test: fast/dom/Window/window-function-name-getter-precedence.html

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::customGetOwnPropertySlot): Make sure to return functions
        before the custom name getter.

darin's avatar
darin committed
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
2007-07-22  Darin Adler  <darin@apple.com>

        Reviewed by Adam.

        - fix <rdar://problem/5353263> ContextMenuItem and ContextMenu objects leaking (seen on buildbot)

        * platform/ContextMenu.cpp:
        (WebCore::separatorItem): Return an auto_ptr instead of a raw pointer, since this function
        creates an object that's the caller's responsibility to delete.
        (WebCore::createAndAppendFontSubMenu): Create the context menu on the stack, not the heap,
        since setSubMenu does not take ownership, and hence the objects were leaking.
        (WebCore::createAndAppendSpellingAndGrammarSubMenu): Ditto.
        (WebCore::createAndAppendSpellingSubMenu): Ditto.
        (WebCore::createAndAppendSpeechSubMenu): Ditto.
        (WebCore::createAndAppendWritingDirectionSubMenu): Ditto.

darin's avatar
darin committed
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
2007-07-22  Darin Adler  <darin@apple.com>

        Reviewed by Kevin Decker.

        - fix <rdar://problem/5126394> REGRESSION: Crash after clicking back button in test application (13250)
          http://bugs.webkit.org/show_bug.cgi?id=13250

        * bindings/objc/WebScriptObject.mm:
        (_didExecute): Removed unnecessary check for isValid() since the _rootObject method already
        takes care of that check.
        (-[WebScriptObject _imp]): Made this return 0 if there is not a valid rootObject.
        (-[WebScriptObject _isSafeScript]): Made this always return false if there is not a valid
        rootObject, eliminating the need to check _rootObject for nil if the code is checking _isSafeScript.
        (-[WebScriptObject callWebScriptMethod:withArguments:]): Removed check of _rootObject, since it's
        immediately followed by a check of _isSafeScript. Removed awkward conversion of name from NSString *
        to KJS::Identifier and did it using WebCore::String instead -- makes it clear that there's no
        arbitrary JavaScript execution after _isSafeScript and before _imp, so we don't need to null-check
        the _imp pointer. Added a second check of _isSafeScript after calling get to get the function
        object, since arbitrary changes could occur in there, including navigation to a new frame.
        This also takes care of null checking the second call to _imp.
        (-[WebScriptObject evaluateWebScript:]): Removed check of _rootObject, since it's
        immediately followed by a check of _isSafeScript. Removed awkward conversion of script from NSString *
        to KJS::Identifier and did it using WebCore::String instead -- makes it clear that there's no
        arbitrary JavaScript execution after _isSafeScript and before _imp, so we don't need to null-check
        the _imp pointer.
        (-[WebScriptObject setValue:forKey:]): Removed check of _rootObject, since it's
        immediately followed by a check of _isSafeScript. Removed awkward conversion of key from NSString *
        to KJS::Identifier and did it using WebCore::String instead -- makes it clear that there's no
        arbitrary JavaScript execution after _isSafeScript and before _imp, so we don't need to null-check
        the _imp pointer.
        (-[WebScriptObject valueForKey:]): Ditto.
        (-[WebScriptObject removeWebScriptKey:]): Ditto.
        (-[WebScriptObject stringRepresentation]): Removed check of _rootObject, since it's
        immediately followed by a check of _isSafeScript. Removed unnecessary local variable
        and const_cast from the call to the _imp method.
        (-[WebScriptObject webScriptValueAtIndex:]): Removed check of _rootObject, since it's
        immediately followed by a check of _isSafeScript.
        (-[WebScriptObject setWebScriptValueAtIndex:value:]): Ditto.
        (-[WebScriptObject JSObject]): Ditto.

darin's avatar
darin committed
1127
1128
2007-07-22  Darin Adler  <darin@apple.com>

darin's avatar
darin committed
1129
        Reviewed by Anders Carlsson and John Sullivan.
darin's avatar
darin committed
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140

        - speculative fix for <rdar://problem/5337500> CrashTracer: [USER] 4 crashes in Mail
          at WebCore::HTMLImageElement::isURLAttribute(WebCore::Attribute*) const

        * editing/markup.cpp: Added AttributeChange class.
        (WebCore::completeURLs): Changed function so that all the URL completion is done in
        a separate pass after finding all the URL attributes. This is safer, since actually
        applying an attribute change could have any arbitrary effect on the document; it's
        tricky to iterate a document while it's being modified and we don't have the checks
        here that would be needed to make that work in pathological cases.

darin's avatar
darin committed
1141
1142
1143
1144
1145
2007-07-18  Darin Adler  <darin@apple.com>

        Reviewed by Adam.

        - fix <rdar://problem/5350604> REGRESSION: Crash in inspector controller code after
1146
          clicking back button in test application (14337)
darin's avatar
darin committed
1147
1148
1149
1150

        * page/InspectorController.cpp: (WebCore::InspectorController::addScriptResource):
        Replace an assertion that was firing with some code that at least doesn't immediately crash.

darin's avatar
darin committed
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
2007-07-22  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - improve the fix for <rdar://problem/5298816> Crash redirecting message,
          in -[SharedBufferData initWithSharedBuffer:]; fixes a crash seen on the buildbot

        * loader/DocLoader.cpp: (WebCore::DocLoader::~DocLoader): Call setDocLoader(0) on all
        the resources so they don't try to use a stale DocLoader pointer later.

weinig's avatar
weinig committed
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
2007-07-21  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Sam Weinig.

        - fixed typos and markup in the following manual tests

        * manual-tests/accidental-strict-mode.html:
        * manual-tests/caretScrolling.html:
        * manual-tests/close-on-closedWindow.html:

weinig's avatar
weinig committed
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
2007-07-21  Sam Weinig  <sam@webkit.org>

        Reviewed by Mitz.

        Patch for <rdar://problem/5352013>
        The computed style for background-position is wrong for the initial value

        - Set the initial value for background-position-x and background-position-y (and
          therefore background-position) to 0% instead of 0px.

        * rendering/RenderStyle.cpp:
        (WebCore::BackgroundLayer::BackgroundLayer):
        * rendering/RenderStyle.h:
        (WebCore::RenderStyle::initialBackgroundXPosition):
        (WebCore::RenderStyle::initialBackgroundYPosition):

beidson's avatar
beidson committed
1187
1188
1189
1190
1191
1192
1193
1194
2007-07-20  Brady Eidson  <beidson@apple.com>

        Reviewed by Adele and Andersca

        <rdar://problem/5336105> - WebBackForwardList created from scratch is unusable (always leads to crash)

        * WebCore.exp: Export the BackForwardList c'tor so WebKit can create one explicitly

weinig's avatar
weinig committed
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
2007-07-20  Sam Weinig  <sam@webkit.org>

        Reviewed by Beth Dakin.

        Fix for <rdar://problem/5351901>
        Computed value of border-position should return a CSSValueList, not a CSSPrimitiveValue

        - Return a space separated CSSValueList for background-position
          instead of a CSSPrimitiveValue (string type).
        - Remove the "else if (renderer)" case as it never returns a different
          value than just calling length.value().
        - Make background-position-x and background-position-y behave like
          background-position.  Fix case of initial value return 'auto' instead
          of 0.

        Test: fast/css/getComputedStyle-background-position.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

ggaren's avatar
ggaren committed
1215
1216
1217
1218
1219
1220
2007-07-20  Geoffrey Garen  <ggaren@apple.com>

        Build fix for non-Mac platforms.
        
        * bindings/js/GCController.cpp:

andersca's avatar
andersca committed
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
2007-07-20  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        If the style sheet requested is a user style sheet, don't store it in the DocLoader's resource map;
        user style sheets can outlive their doc loaders.

        * loader/DocLoader.cpp:
        (WebCore::DocLoader::requestCSSStyleSheet):

justing's avatar
justing committed
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
2007-07-20  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin.

        <rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it
        
        * bridge/EditorClient.h: Removed a client method for enabling/disabling
        word selection on right clicks.
        * editing/Editor.cpp: Ditto.
        * editing/Editor.h:
        * page/EventHandler.cpp:
        (WebCore::EventHandler::sendContextMenuEvent): Select the
        word underneath the mouse regardless of whether its editable.

1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
2007-07-20  Ada Chan  <adachan@apple.com>

        Reviewed by Darin and Adam.

        <rdar://problem/5338385> Fixed infinite loop in ScrollView::scrollRectIntoViewRecursively().
        Also removed an unused local variable.

        * platform/win/ScrollViewWin.cpp:
        (WebCore::ScrollView::scrollRectIntoViewRecursively):

antti's avatar
antti committed
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
2007-07-21  Antti  <antti@apple.com>

        Reviewed by Darin.
        
        Fix <rdar://problem/5305788>
        REGRESSION: Safari sometimes loads IE-specific stylesheet on www.apaema.org
        
        Pick the preferred style sheet set based on document order even if the sheet is still loading. Previously 
        the set was chosen based on which stylesheet happened to arrive first. Just fix the problem at hand 
        and resist urge to start refactoring this function.

        * dom/Document.cpp:
        (WebCore::Document::recalcStyleSelector):

weinig's avatar
weinig committed
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
2007-07-20  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Fix for <rdar://problem/5351252>
        Computed value for -webkit-background-size and border-spacing
        should be space separated CSSValueLists.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

ggaren's avatar
ggaren committed
1280
1281
1282
1283
1284
1285
1286
2007-07-20  Geoffrey Garen  <ggaren@apple.com>

        Suggested by Darin Adler.
        
        Slight tweak to my last commit: changed gcController() to return a 
        reference instead of a pointer.

ggaren's avatar
ggaren committed
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
2007-07-20  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.
        
        Fixed http://bugs.webkit.org/show_bug.cgi?id=12900 Page tear-down 
        forces garbage collection once per frame

        Also fixed <rdar://problem/5286989> GC on window close does not always 
        bring the JS object count down to 0
        
        Implemented a 0-delay GC timer in WebCore. Instead of forcing GC
        immediately, code that thinks it has created a lot of garbage starts
        the timer. This has two advantages: 

        1) Multiple GCs can coalesce. In my pathological test case, this 
        improves performance by an order of magnitude. 
        
        2) Conservative marking is less likely to keep alive important dead
        objects, like the window object, because the stack is small and free of
        JS processing when the timer fires.

        Added GCController.h/.cpp, sometimes blindly:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:

        Added singleton that implements GC on a 0-delay timer:
        * bindings/js/GCController.h: Added.
        * bindings/js/GCController.cpp: Added.
        
        Changed Collector::collect() calls below to call to the singleton:
        * bindings/js/kjs_proxy.cpp:
        (WebCore::KJSProxy::~KJSProxy):
        * bindings/js/kjs_window.cpp:
        (KJS::Window::clear):
        * history/CachedPage.cpp:
        (WebCore::CachedPage::clear):
        
        * page/Frame.cpp:
        (WebCore::Frame::~Frame): Removed previous slightly hackish attempt to
        avoid conservative marking of the window object.

andersca's avatar
andersca committed
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
2007-07-20  Anders Carlsson  <andersca@apple.com>
    
        Reviewed by Darin.

        <rdar://problem/5298816> Crash redirecting message, in -[SharedBufferData initWithSharedBuffer:]
        
        Have cached resources keep track of what DocLoader they belong to. This is so that they can remove themselves
        from the DocLoader's resource map when they're destroyed when the cache is disabled.
        
        * html/HTMLImageLoader.cpp:
        (WebCore::HTMLImageLoader::updateFromElement):
        * loader/Cache.cpp:
        (WebCore::Cache::requestResource):
        * loader/CachedResource.cpp:
        (WebCore::CachedResource::CachedResource):
        (WebCore::CachedResource::~CachedResource):
        * loader/CachedResource.h:
        (WebCore::CachedResource::setDocLoader):

beidson's avatar
beidson committed
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
2007-07-20  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin

        <rdar://problem/5153021> and http://bugs.webkit.org/show_bug.cgi?id=13364

        The issue here was that if a document in a subframe was loaded from a URL, but then a script did 
        document.open or document.write during parsing, we would overwrite the document's url and baseurl 
        with the parent frame's url.  WRONG!

        * dom/Document.cpp:
        (WebCore::Document::open): Only set the url and baseURL in document.open if they are still empty or about:blank

mjs's avatar
mjs committed
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
2007-07-20  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5326303> REGRESSION: blur event fires upon navigating away from a page with focused element


        
        The proximate cause was the recent change to keep focus on the
        WebHTMLView when switching views. But the reason this happend was
        that didCommitLoadForFrame got called at a time when the new view
        was in place, but the old document was still there. This was a
        longstanding problem with the delegate, and fixing it cleans it
        up.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::begin): Don't send dispatchWindowObjectAvailable if
        caller asked not to (this is to allow order of delegates to be the same).
        (WebCore::FrameLoader::transitionToCommitted): Don't emit didCommitLoadForFrame here.
        (WebCore::FrameLoader::receivedFirstData): Instead do it here, after calling begin(),
        so the new document is set up.
        * loader/FrameLoader.h: Add new optional parameter to begin().

weinig's avatar
weinig committed
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
2007-07-20  Sam Weinig  <sam@webkit.org>

        Reviewed by Beth Dakin.

        Update for fix for http://bugs.webkit.org/show_bug.cgi?id=14646
        <rdar://problem/5340449>

        - Return a CSSValueList instead of CSSValue (with a Pair type) for
          computed values of border radii.
        - Add ability to CSSValueList to print out a space separated list
          instead of a comma.
        - Add border radii to list of computed styles that we create and can
          iterate over.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::):
        (WebCore::getBorderRadiusCornerValue):
        * css/CSSValueList.cpp:
        (WebCore::CSSValueList::CSSValueList):
        (WebCore::CSSValueList::cssText):
        * css/CSSValueList.h:

1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
2007-07-20  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - http://bugs.webkit.org/show_bug.cgi?id=14626
          Make bidiReorderCharacters independent of RenderBlock

        No layout test possible because there is no change in functionality.

        This patch generalizes RenderBlock's implementation of the Unicode Bidi Algorithm
        in the form of the BidiResolver class template. An instance of a BidiResolver class
        can generate a sequence of runs with corresponding level and override attributes,
        given a range specified by start and end iterators. The iterators can optionally
        call back to the BidiResolver instance to push or pop explicit embedding levels.

        The patch replaces BidiState with a specialization of BidiResolver that uses
        BidiIterators and generates BidiRuns. It also eliminates some of the file statics
        in bidi.cpp, instead relying on BidiResolver data members.

        The patch makes the BidiContext part of BidiStatus, thus making BidiStatus the
        entire state that needs to be saved and restored in order to restart the bidi
        algorithm at a given point. Previously, you had to keep and pass around two
        separate structures, namely the BidiContext and the BidiStatus.

        bidiReorderCharacters is implemented without relying on render objects, using
        a BidiResolver specialization that uses simple character buffer iterators and
        simple run structures.

        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * platform/BidiContext.cpp: Added.
        (WebCore::operator==):
        * platform/BidiContext.h: Added.
        (WebCore::BidiContext::BidiContext):
        (WebCore::BidiContext::ref):
        (WebCore::BidiContext::deref):
        (WebCore::BidiContext::parent):
        (WebCore::BidiContext::level):
        (WebCore::BidiContext::dir):
        (WebCore::BidiContext::override):
        * platform/BidiReorderCharacters.cpp: Added.
        (WebCore::CharacterBufferIterator::CharacterBufferIterator):
        (WebCore::CharacterBufferIterator::offset):
        (WebCore::CharacterBufferIterator::increment):
        (WebCore::CharacterBufferIterator::atEnd):
        (WebCore::CharacterBufferIterator::current):
        (WebCore::CharacterBufferIterator::direction):
        (WebCore::CharacterBufferIterator::operator==):
        (WebCore::CharacterBufferIterator::operator!=):
        (WebCore::::appendRun):
        (WebCore::bidiReorderCharacters):
        * platform/BidiReorderCharacters.h: Added.
        * platform/BidiResolver.h: Added.
        (WebCore::BidiStatus::BidiStatus):
        (WebCore::operator==):
        (WebCore::operator!=):
        (WebCore::BidiCharacterRun::BidiCharacterRun):
        (WebCore::BidiCharacterRun::reversed):
        (WebCore::BidiCharacterRun::dirOverride):
        (WebCore::BidiCharacterRun::next):
        (WebCore::BidiResolver::):
        (WebCore::BidiResolver::context):
        (WebCore::BidiResolver::setContext):
        (WebCore::BidiResolver::setLastDir):
        (WebCore::BidiResolver::setLastStrongDir):
        (WebCore::BidiResolver::setEorDir):
        (WebCore::BidiResolver::dir):
        (WebCore::BidiResolver::setDir):
        (WebCore::BidiResolver::status):
        (WebCore::BidiResolver::setStatus):
        (WebCore::BidiResolver::adjustEmbedding):
        (WebCore::BidiResolver::setAdjustEmbedding):
        (WebCore::BidiResolver::firstRun):
        (WebCore::BidiResolver::lastRun):
        (WebCore::BidiResolver::runCount):
        (WebCore::::embed):
        (WebCore::::deleteRuns):
        (WebCore::::reverseRuns):
        (WebCore::::createBidiRunsForLine):
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::paint):
        * rendering/RenderBlock.h:
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::paintObject):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::paintItemForeground):
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::childRemoved):
        (WebCore::RootInlineBox::lineBreakBidiStatus):
        (WebCore::RootInlineBox::setLineBreakInfo):
        * rendering/RootInlineBox.h:
        (WebCore::RootInlineBox::RootInlineBox):
        * rendering/bidi.cpp:
        (WebCore::BidiIterator::BidiIterator):
        (WebCore::BidiState::deleteRuns):
        (WebCore::operator==):
        (WebCore::operator!=):
        (WebCore::bidiNext):
        (WebCore::bidiFirst):
        (WebCore::BidiState::addRun):
        (WebCore::appendRunsForObject):
        (WebCore::BidiState::appendRun):
        (WebCore::RenderBlock::constructLine):
        (WebCore::RenderBlock::computeHorizontalPositionsForLine):
        (WebCore::RenderBlock::computeVerticalPositionsForLine):
        (WebCore::RenderBlock::bidiReorderLine):
        (WebCore::buildCompactRuns):
        (WebCore::RenderBlock::layoutInlineChildren):
        (WebCore::RenderBlock::determineStartPosition):
        (WebCore::RenderBlock::determineEndPosition):
        (WebCore::RenderBlock::matchedEndLine):
        (WebCore::RenderBlock::skipWhitespace):
        * rendering/bidi.h:
        (WebCore::BidiRun::BidiRun):
        (WebCore::BidiRun::next):

darin's avatar
darin committed
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
2007-07-20  Darin Adler  <darin@apple.com>

        Reviewed by John Sullivan.

        - fix for <rdar://problem/5331723> <rdar://problem/5331723> Safari gives error
          103 for URLs that Adobe Lightroom's Preview feature produces, with ":1" in the hostname

        Test: fast/loader/file-URL-with-port-number.html

        * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::portAllowed):
        Don't do any port blocking for file URLs.

1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
2007-07-20  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14689
          REGRESSION (3.0.2-TOT): <select> menu items have incorrect background color

        * manual-tests/item-background.html: Added.
        * platform/PopupMenuClient.h:
        * platform/graphics/Color.cpp:
        (WebCore::blendComponent): Renamed the static method blend() to this.
        (WebCore::Color::blend): Added. Compositing (in "normal" or "source over"
        blend mode) B.blend(C) over A is equivalent to compositing C over the
        result of compositing B over A.
        (WebCore::Color::blendWithWhite): Changed for the above rename.
        * platform/graphics/Color.h:
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::paint): Changed to use itemBackgroundColor().
        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::itemBackgroundColor): Added. Returns the color
        that would result from overlaying the item's background color over the
        menu's background color over solid white. Note that clientStyle() cannot
        be used for the menu's background color, since background color is not
        inherited by the inner block (the regression resulted from changing
        clientStyle() to return the inner block's style), and that the color
        returned from this method is guaranteed to be opaque.
        * rendering/RenderMenuList.h:
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::itemBackgroundColor): Added.
        * rendering/RenderTextControl.h:

rwlbuis's avatar
rwlbuis committed
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
2007-07-20  Rob Buis  <buis@kde.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14642
        REGRESSION(r24064-24096): Reflection type effect in canvas tag broke

        Do not stop the fill/stroke operation when encountering an empty path.

        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::fill):
        (WebCore::CanvasRenderingContext2D::stroke):

1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        Remove some files that are not used anymore.

        * platform/qt/FontCacheQt.cpp: Removed.
        * platform/qt/FontDataQt.cpp: Removed.
        * platform/qt/FontPlatformData.h: Removed.
        * platform/qt/FontPlatformDataQt.cpp: Removed.
        * platform/qt/GlyphPageTreeNodeQt.cpp: Removed.

lars's avatar
lars committed
1593
1594
1595
1596
1597
1598
1599
1600
1601
2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        use the correct font for spaces.

        * platform/qt/FontQt.cpp:
        (WebCore::generateComponents):

1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        spaces where not correctly taken into account for both offsetForPosition and selectionRectForText. Because of that selections sort of worked in LTR text, but completely failed in RTL.

        * platform/qt/FontQt.cpp:
        (WebCore::TextRunComponent::isSpace):
        (WebCore::TextRunComponent::TextRunComponent):
        (WebCore::generateComponents):
        (WebCore::Font::drawText):
        (WebCore::Font::offsetForPosition):
        (WebCore::Font::selectionRectForText):

1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        fix up some smaller issues in selection handling. It's still not perfect and selections in mixed rtl/ltr text are still broken, but it's getting there.

        * platform/qt/FontQt.cpp:
        (WebCore::Font::offsetForPosition):
        (WebCore::cursorToX):
        (WebCore::Font::selectionRectForText):

1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        make offsetForPosition and selectionRectForText work correctly with small caps.

        * platform/qt/FontQt.cpp:
        (WebCore::Font::offsetForPosition):
        (WebCore::cursorToX):
        (WebCore::Font::selectionRectForText):

1638
1639
1640
1641
1642
1643
1644
1645
1646
2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        clip the drawn text correctly when needed.

        * platform/qt/FontQt.cpp:
        (WebCore::Font::drawText):

1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        Fix offsetForPosition and selectionRectForText methods.

        * platform/qt/FontQt.cpp:
        (WebCore::Font::offsetForPosition):
        (WebCore::cursorToX):
        (WebCore::Font::selectionRectForText):

lars's avatar
lars committed
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        fix BiDi text rendering.

        * platform/qt/FontQt.cpp:
        (WebCore::TextRunComponent::TextRunComponent):
        (WebCore::generateComponents):
        (WebCore::Font::drawText):

bdash's avatar
bdash committed
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
2007-07-20  Mark Rowe  <mrowe@apple.com>

        Reviewed by Maciej.

        Move FTPDirectoryTokenizer::m_templateDocumentData to be a function-scoped static
        to avoid creating a global initializer.  This fixes the build for x86_64.

        * loader/FTPDirectoryDocument.cpp:
        (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate):

ggaren's avatar
ggaren committed
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
2007-07-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        Fixed <rdar://problem/5347849> Cache eviction of live decoded data is 
        thrash-y
        
        The solution here is to evict live decoded data based on a strict LRU
        model. This should work well as a "scrolling window."

        With this patch, I see a substantial reduction in CPU while scrolling
        through a page with large images on a low memory system. Layout tests
        pass.

        * loader/Cache.h: Changed from a size-based vector of LRU lists to a
        single LRU list in order to implement strict LRU.
        
        * loader/CachedResource.h: Removed tracking of access count, since that
        was the old cache eviction model.

oliver's avatar
oliver committed
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
2007-07-19  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        <rdar://problem/5076807> REGRESSION: Can't undo conversion of inline text (by hitting ESC)
        <rdar://problem/5346167> DOM key events triggered during IME composition differ in webkit/mac vs all windows browsers

        We now basically match the behaviour of IE/Windows. This means that during composition keydown and autorepeat
        keys generate keydown events with a keyCode of 229, which correlates to the windows VK_PROCESSKEY message.
        keyup events are generated with the keyCode of the actual key that was pressed.

        The only difference is on the first keydown of a composition, in which IE will use keyCode == 229, and we will
        send an event with the keyCode for the actual key that was pressed.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent):
        * platform/PlatformKeyboardEvent.h:
        (WebCore::PlatformKeyboardEvent::setWindowsKeyCode):

beidson's avatar
beidson committed
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
2007-07-19  Brady Eidson  <beidson@apple.com>

        Reviewed by Sam

        <rdar://problem/5134929> REGRESSION: Colon detected as delimiting an empty port is stripped

        The fix for this was in KURL::parse() which had a slightly changed rule that would strip the colon if there
        was no port.

        An additional canonicalization fix was made in window.location.host to match the expected behavior of leaving
        the colon in place - before this fix, if the colon was there but no port was there, we'd see the port as 0.

        * bindings/js/kjs_window.cpp:
        (KJS::Location::put): Call setHostAndPort instead of setHost and setPort seperately

        * manual-tests/location-host-canonicalization.html: Added.

        * platform/KURL.cpp:
        (WebCore::KURL::setHostAndPort): Set the host and port as one string component then reparse the URL
        (WebCore::KURL::parse): Change one line to consider the empty colon as part of the host name
        * platform/KURL.h:

andersca's avatar
andersca committed
1740
1741
1742
1743
2007-07-19  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

andersca's avatar
andersca committed
1744
1745
        <rdar://problem/5288617>
        Crash playing a very large QuickTime movie in Safari
andersca's avatar
andersca committed
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
        
        <rdar://problem/5271174>
        http://bugs.webkit.org/show_bug.cgi?id=14148
        LEAK: Serious memory consumption and leak when loading QT movies.
        
        Don't keep plugin stream data in memory since some plugin resources (like QT movies)
        can be really big. If a plug-in wants data in a file, create a file and write data to it 
        as it's coming from the wire, instead of using a big buffer.
        
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::ResourceLoader):
        (WebCore::ResourceLoader::addData):
        (WebCore::ResourceLoader::willStopBufferingData):
        * loader/ResourceLoader.h:
        (WebCore::ResourceLoader::setShouldBufferData):
        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::PluginStreamWin):
        (WebCore::PluginStreamWin::start):
        (WebCore::PluginStreamWin::startStream):
        (WebCore::PluginStreamWin::destroyStream):
        (WebCore::PluginStreamWin::didReceiveData):
        (WebCore::PluginStreamWin::didFinishLoading):
        * plugins/win/PluginStreamWin.h:

ggaren's avatar
ggaren committed
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
2007-07-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.
        
        Fixed <rdar://problem/5348384> Restore old return value behavior of 
        stringByEvaluatingJavaScriptFromString
        
        Return an empty string unless you have a string, boolean, or number
        result.

        * WebCore.xcodeproj/project.pbxproj:
        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):

darin's avatar
darin committed
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
2007-07-19  Darin Adler  <darin@apple.com>

        Reviewed by Alexey.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14666
          remove unused xxx-encodings.txt for all platforms other than Mac

        * platform/gdk/gdk-encodings.txt: Removed.
        * platform/win/win-encodings.txt: Removed.
        * platform/wx/wx-encodings.txt: Removed.

        * platform/character-sets.txt: Moved into mac subdirectory since it's only used for Mac; at some
        point I hope to remove it completely.
        * platform/make-charset-table.pl: Ditto.
        * platform/mac/character-sets.txt: Copied from platform/character-sets.txt.
        * platform/mac/make-charset-table.pl: Copied from platform/make-charset-table.pl.

        * DerivedSources.make: Moved CharsetData.cpp into the MACOS section.
        Changed the build rule to use Mac-specific paths for everything and got rid of
        make variables.

        * WebCore.vcproj/build-generated-files.sh: Removed code to set ENCODINGS_FILE and ENCODINGS_PREFIX.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * make-generated-sources.sh: Ditto.

        * Projects/gdk/webcore-gdk.bkl: Removed code to pass gdk-encodings.txt to make-generated-sources.sh.
        * Projects/wx/webcore-wx.bkl: Ditto, but for wx-encodings.txt.

antti's avatar
antti committed
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
2007-07-19  Antti  <antti@apple.com>

        Reviewed by Darin.

        Fix <rdar://problem/5257371>
        Dashcode Client crash when clicking on placemarks in Maps widget in WebCore::DeprecatedPtrListImpl::addIterator
        
        FlexibleBoxes should never have inline children. Don't move children out from last remaining anonymous block.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::removeChild): real fix
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::layoutVerticalBox): just to be sure, this is checked elsewhere too

andersca's avatar
andersca committed
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
2007-07-19  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5322268>
        Safari Crash at http://www.exlibrisgroup.com/sfx_openurl.htm
        
        Add a real copy constructor and assignment operator for CollectionInfo
        so that the vectors in the cache maps will be copied correctly.
        
        * html/HTMLCollection.cpp:
        (WebCore::HTMLCollection::CollectionInfo::CollectionInfo):
        (WebCore::HTMLCollection::CollectionInfo::swap):
        * html/HTMLCollection.h:
        (WebCore::HTMLCollection::CollectionInfo::operator=):
        (WebCore::HTMLCollection::CollectionInfo::copyCacheMap):

1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
2007-07-19  David Hyatt  <hyatt@apple.com>

        Fix for 5237574, Colloquy main view does not size correctly.  Make
        sure to reset the baseilne when calculating a row's height/baseline, so
        that old values don't stick around.

        Reviewed by Tim Hatcher

        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::calcRowHeight):

antti's avatar
antti committed
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
2007-07-19  Antti  <antti@apple.com>

        Reviewed by John.
        
        Fix <rdar://problem/5346697>
        REGRESSION(r23773): Visibile children on invisible layer are not painted (fast/layers/layer-visibility.html fails)
        
        Test m_hasVisibleContent instead of renderer()->style()->visibility(). 
        This takes children into account too.

        Regression spotted by Mitz.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayer):

oliver's avatar
oliver committed
1869
1870
1871
1872
2007-07-18  Oliver Hunt  <oliver@apple.com>

        Rubber stamped by maciej

oliver's avatar
oliver committed
1873
        Rollout patch from r24437.
oliver's avatar
oliver committed
1874
1875
1876
1877

        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent):

oliver's avatar
oliver committed
1878
1879
2007-07-18  Oliver Hunt  <oliver@apple.com>

1880
        Reviewed by Kevin M.
oliver's avatar
oliver committed
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890

        Fix for <rdar://problem/5346167> DOM key events triggered during
                IME composition differ in webkit/mac vs all windows browsers

        We no longer send DOM key events during IME composition.  This behaviour 
        matches the behaviour of WebKit/Win.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent):

weinig's avatar
weinig committed
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
2007-07-18  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14646
        WebKit border radius properties are unavailable via JavaScript

        Test: fast/dom/getComputedStyle-borderRadius.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::getBorderRadiusCornerValue): Helper function that returns a single value if
        width and the height of the corner radius are equal, and otherwise a pair.
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

andersca's avatar
andersca committed
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
2007-07-18  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5262136> Double form repost alert going forward on britishairways.com
        
        When checking if the request has changed and a new policy callback needs to be sent, 
        ignore the request headers. NSURLConnection in Leopard will always call willSendRequest,
        with a request that was different from the one passed to -[NSURLConnection connectionWithRequest:]
        (a few Accept headers are added).

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::checkNavigationPolicy):
        * platform/network/ResourceRequestBase.cpp:
        (WebCore::equalIgnoringHeaderFields):
        (WebCore::operator==):
        * platform/network/ResourceRequestBase.h:

andersca's avatar
andersca committed
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
2007-07-18  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5340098>
        http://bugs.webkit.org/show_bug.cgi?id=13366
        REGRESSION (r10935): AOL beta music player doesn't play

        The AOL beta music player has a typo, causing it to create an <embed"> element inside of
        an <object> element
        Because of this, it will not be treated as an embed tag, so its name will not be added
        to the document's named item map. Furthermore, since the <object> contains a child that
        is not a <param>, the object's name won't be added either.
        
        The (somewhat ugly) fix is to add <object> to the named map only if it has <param> or
        unknown elements as children.
        
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::updateDocNamedItem):

thatcher's avatar
thatcher committed
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2007-07-18  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Adam.

        <rdar://problem/5343767> Should have a way to disable the Web Inspector

        This change facilitates the ability to turn the Web Inspector on and off.

        Makes the InspectorClient be required to create a new Page. This also means that
        InspectorController will never be NULL. Adds a new function on Page to test
        if the inspector is enabled.

        * WebCore.exp: New symbol for the Page constructor.
        * WebCore.pro: Add InspectorClientGdk.cpp.
        * WebCoreSources.bkl: ditto.
        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::createTokenizer):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::detachFromParent): Don't null check the InspectorCOntroller.
        (WebCore::FrameLoader::dispatchDidCommitLoad): Ditto.
        (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest): Ditto.
        (WebCore::FrameLoader::dispatchWillSendRequest): Ditto.
        (WebCore::FrameLoader::dispatchDidReceiveResponse): Ditto.
        (WebCore::FrameLoader::dispatchDidReceiveContentLength): Ditto.
        (WebCore::FrameLoader::dispatchDidFinishLoading): Ditto.
        (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache): Ditto.
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::handleContextMenuEvent): Ask the InspectorController if it is enabled.
        (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
        * page/InspectorController.cpp:
        (WebCore::InspectorController::enabled): Ask the Page's settings if developer extras are enabled.
        (WebCore::InspectorController::inspect): Check if the InspectorController is enabled.
        (WebCore::InspectorController::focusNode): Ditto.
        (WebCore::InspectorController::highlight): Ditto.
        (WebCore::InspectorController::hideHighlight): Ditto.
        (WebCore::InspectorController::addMessageToConsole): Ditto.
        (WebCore::InspectorController::attachWindow): Ditto.
        (WebCore::InspectorController::detachWindow): Ditto.
        (WebCore::InspectorController::windowScriptObjectAvailable): Ditto.
        (WebCore::InspectorController::didCommitLoad): Ditto.
        (WebCore::InspectorController::frameDetachedFromParent): Ditto.
        (WebCore::InspectorController::didLoadResourceFromMemoryCache): Ditto.
        (WebCore::InspectorController::identifierForInitialRequest): Ditto.
        (WebCore::InspectorController::willSendRequest): Ditto.
        (WebCore::InspectorController::didReceiveResponse): Ditto.
        (WebCore::InspectorController::didReceiveContentLength): Ditto.
        (WebCore::InspectorController::didFinishLoading): Ditto.
        (WebCore::InspectorController::didFailLoading): Ditto.
        * page/InspectorController.h:
        * page/Page.cpp:
        (WebCore::Page::Page): Require an InspectorClient.
        (WebCore::Page::~Page): Always call pageDestroyed on the InspectorController.
        (WebCore::Page::inspectorEnabled): Check the WebCore settings if the developer extras are enabled.
        * page/Page.h:
        * page/gdk/InspectorClientGdk.cpp: Added.
        (WebCore::InspectorClientGdk::inspectorDestroyed): Empty stub calling notImplemented.
        (WebCore::InspectorClientGdk::createPage): Ditto.
        (WebCore::InspectorClientGdk::showWindow): Ditto.
        (WebCore::InspectorClientGdk::closeWindow): Ditto.
        (WebCore::InspectorClientGdk::attachWindow): Ditto.
        (WebCore::InspectorClientGdk::detachWindow): Ditto.
        (WebCore::InspectorClientGdk::highlight): Ditto.
        (WebCore::InspectorClientGdk::hideHighlight): Ditto.
        (WebCore::InspectorClientGdk::inspectedURLChanged): Ditto.
        * page/gdk/InspectorClientGdk.h: Added.
        * platform/graphics/svg/SVGImage.cpp:
        (WebCore::SVGImage::dataChanged): Pass in a dummy InspectorClient.
        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyInspectorClient::~SVGEmptyInspectorClient): Empty dummy implementation.
        (WebCore::SVGEmptyInspectorClient::inspectorDestroyed): Ditto.
        (WebCore::SVGEmptyInspectorClient::createPage): Ditto.
        (WebCore::SVGEmptyInspectorClient::showWindow): Ditto.
        (WebCore::SVGEmptyInspectorClient::closeWindow): Ditto.
        (WebCore::SVGEmptyInspectorClient::attachWindow): Ditto.
        (WebCore::SVGEmptyInspectorClient::detachWindow): Ditto.
        (WebCore::SVGEmptyInspectorClient::highlight): Ditto.
        (WebCore::SVGEmptyInspectorClient::hideHighlight): Ditto.
        (WebCore::SVGEmptyInspectorClient::inspectedURLChanged): Ditto.

andersca's avatar
andersca committed
2022
2023
2024
2025
2026
2027
2007-07-18  Anders Carlsson  <andersca@apple.com>

        Make some headers private instead of project.
        
        * WebCore.xcodeproj/project.pbxproj:

2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2007-07-18  John Sullivan  <sullivan@apple.com>

        Reviewed by Maciej and Kevin Decker

        - fixed <rdar://problem/5315926> REGRESSION: ~.4% PLT regression from r23949 (canonicalization change)

        * loader/mac/LoaderNSURLExtras.m:
        (canonicalURL):
        Rolled out the fix for 5249730 that caused this regression. 5249730 is addressed a different way now.

weinig's avatar
weinig committed
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2007-07-18  Sam Weinig  <sam@webkit.org>

        Build fix.

        * WebCore.xcodeproj/project.pbxproj:
        * loader/gdk/FrameLoaderClientGdk.cpp:
        (WebCore::FrameLoaderClientGdk::objectContentType):
        * platform/graphics/win/ImageWin.cpp:
        * platform/network/cf/ResourceResponseCFNet.cpp:
        * platform/win/ClipboardWin.cpp:
        (WebCore::createGlobalImageFileDescriptor):

weinig's avatar
weinig committed
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2007-07-18  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Adam Roben.

        Rename MimeTypeRegistry to MIMETypeRegistry and xmlhttprequest to XMLHttpRequest

        * WebCore.exp:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * bindings/js/JSXMLHttpRequest.cpp:
        * bindings/js/kjs_binding.cpp:
        * bindings/js/kjs_dom.cpp:
        * dom/Document.cpp:
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::formData):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::containsJavaApplet):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::requestObject):
        * loader/mac/LoaderNSURLExtras.m:
        (suggestedFilenameWithMIMEType):
        * platform/MIMETypeRegistry.cpp: Copied from platform/MimeTypeRegistry.cpp.
        (WebCore::initialiseSupportedImageMIMETypes):
        (WebCore::initialiseMIMETypeRegistry):
        (WebCore::MIMETypeRegistry::getMIMETypeForPath):
        (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
        (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
        (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
        (WebCore::MIMETypeRegistry::isJavaAppletMIMEType):
        (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
        (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
        (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
        * platform/MIMETypeRegistry.h: Copied from platform/MimeTypeRegistry.h.
        * platform/MimeTypeRegistry.cpp: Removed.
        * platform/MimeTypeRegistry.h: Removed.
        * platform/gdk/MIMETypeRegistryGdk.cpp: Copied from platform/gdk/MimeTypeRegistryGdk.cpp.
        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
        * platform/gdk/MimeTypeRegistryGdk.cpp: Removed.
        * platform/graphics/BitmapImage.cpp:
        * platform/graphics/Image.cpp:
        (WebCore::Image::supportsType):
        * platform/mac/DragDataMac.mm:
        * platform/mac/MIMETypeRegistryMac.mm: Copied from platform/mac/MimeTypeRegistryMac.mm.
        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
        (WebCore::MIMETypeRegistry::getExtensionsForMIMEType):
        (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
        * platform/mac/MimeTypeRegistryMac.mm: Removed.
        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::writeImage):
        * platform/qt/MIMETypeRegistryQt.cpp: Copied from platform/qt/MimeTypeRegistryQt.cpp.
        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
        * platform/qt/MimeTypeRegistryQt.cpp: Removed.
        * platform/win/MIMETypeRegistryWin.cpp: Copied from platform/win/MimeTypeRegistryWin.cpp.
        (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
        * platform/win/MimeTypeRegistryWin.cpp: Removed.
        * rendering/RenderPartObject.cpp:
        (WebCore::RenderPartObject::updateWidget):
        * xml/xmlhttprequest.cpp: Removed.
        * xml/xmlhttprequest.h: Removed.
        * xml/XMLHttpRequest.cpp: Copied from xml/xmlhttprequest.cpp.
        * xml/XMLHttpRequest.h: Copied from xml/xmlhttprequest.h.

weinig's avatar
weinig committed
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2007-07-18  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Adam Roben.

        Rename csshelper.h, csshelper.cpp, cssparser.h, cssparser.cpp,
        cssstyleselector.h, and cssstyleselector.cpp to be CamelCase.

        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * bindings/objc/DOM.mm:
        * bindings/objc/DOMHTML.mm:
        * css/CSSGrammar.y:
        * css/CSSMediaRule.cpp:
        * css/CSSMutableStyleDeclaration.cpp:
        * css/CSSPrimitiveValue.cpp:
        * css/CSSStyleSheet.cpp:
        * css/MediaList.cpp:
        * css/MediaQueryExp.cpp:
        * css/csshelper.cpp: Removed.
        * css/csshelper.h: Removed.
        * css/CSSHelper.cpp: Copied from css/csshelper.cpp.
        * css/CSSHelper.h: Copied from css/csshelper.h.
        * css/cssparser.cpp: Removed.
        * css/cssparser.h: Removed.
        * css/CSSParser.cpp: Copied from css/cssparser.cpp.
        * css/CSSParser.h: Copied from css/cssparser.h.
        * css/cssstyleselector.cpp: Removed.
        * css/cssstyleselector.h: Removed.
        * css/CSSStyleSelector.cpp: Copied from css/cssstyleselector.cpp.
        * css/CSSStyleSelector.h: Copied from css/cssstyleselector.h.
        * dom/Document.cpp:
        * dom/Element.cpp:
        * dom/StyledElement.cpp:
        * editing/ApplyStyleCommand.cpp:
        * editing/markup.cpp:
        * html/CanvasGradient.cpp:
        * html/CanvasRenderingContext2D.cpp:
        * html/CanvasStyle.cpp:
        * html/HTMLAnchorElement.cpp:
        * html/HTMLBaseElement.cpp:
        * html/HTMLBodyElement.cpp:
        * html/HTMLDocument.cpp:
        * html/HTMLEmbedElement.cpp:
        * html/HTMLFormElement.cpp:
        * html/HTMLFrameElementBase.cpp:
        * html/HTMLImageElement.cpp:
        * html/HTMLImageLoader.cpp:
        * html/HTMLLinkElement.cpp:
        * html/HTMLObjectElement.cpp:
        * html/HTMLOptGroupElement.cpp:
        * html/HTMLOptionElement.cpp:
        * html/HTMLSelectElement.cpp:
        * html/HTMLTableElement.cpp:
        * html/HTMLTablePartElement.cpp:
        * html/HTMLTokenizer.cpp:
        * ksvg2/css/SVGCSSParser.cpp:
        * ksvg2/css/SVGCSSStyleSelector.cpp:
        * ksvg2/svg/SVGAElement.cpp:
        * ksvg2/svg/SVGClipPathElement.cpp:
        * ksvg2/svg/SVGGradientElement.cpp:
        * ksvg2/svg/SVGLength.cpp:
        * ksvg2/svg/SVGMaskElement.cpp:
        * ksvg2/svg/SVGStyledElement.cpp:
        * ksvg2/svg/SVGUseElement.cpp:
        * page/DOMWindow.cpp:
        * page/mac/FrameMac.mm:
        * page/mac/WebCoreFrameBridge.mm:
        * rendering/HitTestResult.cpp:
        * rendering/RenderObject.cpp:
        * rendering/RenderStyle.cpp:
        * rendering/RenderThemeMac.mm:

beidson's avatar
beidson committed
2185
2186
2187
2188
2189
2190
2191
2007-07-18  Brady Eidson  <beidson@apple.com>

        Rubberstamped by Adam

        * platform/win/SharedBufferWin.cpp:
        (WebCore::SharedBuffer::createWithContentsOfFile): Correct license on this newly checked in file from yesterday

mjs's avatar
mjs committed
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2007-07-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.

        - fixed <rdar://problem/5340603> REGRESSION: javascript being written to the screen in Safari

        Test Case: fast/tokenizer/badscript.html
        
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::parseTag): Don't apply our self-closing
        <script> quirk in cases where the / appears in a mangled attribtue
        value.

weinig's avatar
weinig committed
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2007-07-17  Peter Kasting  <zerodpx@gmail.com>

        Reviewed by Hyatt.

        http://bugs.webkit.org/show_bug.cgi?id=13618
        Don't set link targets to "_blank" on middle-click; rely on the policy
        delegate to do the right thing.

        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::defaultEventHandler):

oliver's avatar
oliver committed
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2007-07-17  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        Fix for <rdar://problem/4799967> Safari and other WebKit 
        apps sometimes crash in WebCore::FontData::platformInit

        Always retain/release our font handle, instead of only retaining
        in the presence of GC.

        * platform/mac/FontPlatformData.h:
        (WebCore::FontPlatformData::FontPlatformData):
        (WebCore::FontPlatformData::~FontPlatformData):

weinig's avatar
weinig committed
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2007-07-17  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff Garen.

        Fix for <rdar://problem/5333957>
                http://bugs.webkit.org/show_bug.cgi?id=14610

        Original patch by Feng Qian.

        - Clear the selection object when disconnecting a frame.

        Test: http/tests/security/cross-frame-access-selection.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::clear):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::disconnectFrame):
        (WebCore::DOMWindow::clear):
        * page/DOMWindow.h:
        * page/Frame.cpp:
        (WebCore::Frame::clearScriptProxy):
        (WebCore::Frame::clearDOMWindow):
        * page/Frame.h:

oliver's avatar
oliver committed
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2007-07-17  Oliver Hunt  <oliver@apple.com>

        Reviewed by Sam.

        Fix for <rdar://problem/5154518> REGRESSION: Hitting return does
        nothing in ruby terminal at http://tryruby.hobix.com/

        Calling event.preventDefault() during a keydown event should not 
        prevent the keypress event from firing.

        * WebCore.xcodeproj/project.pbxproj:
        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent):
        (WebCore::EventHandler::defaultKeyboardEventHandler):

andersca's avatar
andersca committed
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2007-07-17  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        <rdar://problem/4993463> 
        http://bugs.webkit.org/show_bug.cgi?id=12732
        REGRESSION: Comments fields on ircimages not showing up in nightly

        Postpone setting the frame name to just right before we request the frame. Otherwise, 
        two calls to FrameTree::uniqueChildName will return the same frame name and in that case only
        one Frame object will actually be created and multiple iframe elements will refer to it.
        
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::openURL):
        (WebCore::HTMLFrameElementBase::setNameAndOpenURL):
        (WebCore::HTMLFrameElementBase::setNameAndOpenURLCallback):
        (WebCore::HTMLFrameElementBase::insertedIntoDocument):
        (WebCore::HTMLFrameElementBase::attach):
        * html/HTMLFrameElementBase.h:

2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2007-07-17  Brady Eidson  <beidson@apple.com>

        Reviewed by Steve

        Required for <rdar://problem/4516185> - FTP Directory Listings

        * WebCore.vcproj/WebCore.vcproj: Added SharedBufferWin
        
        * platform/SharedBuffer.cpp: Windows doesn't get the default empty resource anymore
        * platform/win/SharedBufferWin.cpp: Added.
        (WebCore::SharedBuffer::createWithContentsOfFile):

beidson's avatar
beidson committed
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2007-07-17  Brady Eidson  <beidson@apple.com>

        Reviewed by Tim Hatcher

        Tweak the class names we give to the icon table cell to make it easier to style

        * loader/FTPDirectoryDocument.cpp:
          (WebCore::FTPDirectoryTokenizer::appendEntry): The the table cell a "IconCell" class name and
          either a "FileType" or "DirectoryType" class name depending on the type

2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2007-07-17  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by NOBODY.

        Build fix after r24366 add an additional ResourceRequest parameter to
        the download method.

        * loader/gdk/FrameLoaderClientGdk.cpp:
        (WebCore::FrameLoaderClientGdk::download):
        * loader/gdk/FrameLoaderClientGdk.h:

2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2007-07-17  Adam Roben  <aroben@apple.com>

        Fix Bug 14324: Cannot remove/customize the "Inspect Element" contextual menu item
        http://bugs.webkit.org/show_bug.cgi?id=14324

        Reviewed by Tim.

        No regression test possible.

        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::handleContextMenuEvent): Add the
        Inspect Element item to the menu before passing it to the
        ContextMenuClient so that the UI delegate has a chance to
        modify/remove the item.

2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2007-07-17  Adam Roben  <aroben@apple.com>

        Remove ContextMenuClient::shouldIncludeInspectElementItem

        Reviewed by Tim.

        No regression test possible.

        * page/ContextMenuClient.h:
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::handleContextMenuEvent): Use Settings
        to determine whether to include the Inspect Element item.
        * page/gdk/ContextMenuClientGdk.cpp:
        * page/gdk/ContextMenuClientGdk.h:
        * platform/graphics/svg/SVGImageEmptyClients.h:

2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2007-07-17  Adam Roben  <aroben@apple.com>

        Initialize ContextMenuController::m_page

        Somehow this variable had never been initialized before.

        Reviewed by Tim.

        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::ContextMenuController):
        * page/ContextMenuController.h:
        * page/Page.cpp:
        (WebCore::Page::Page):

2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2007-07-17  Adam Roben  <aroben@apple.com>

        Add Settings::developerExtrasEnabled

        Reviewed by Tim.

        * WebCore.exp:
        * page/Settings.cpp:
        * page/Settings.h:

justing's avatar
justing committed
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2007-07-17  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Antti.

        <rdar://problem/5206311> 
        Whitespace can't be removed when editing text pasted into from web page
        
        The whitespace comes from table rows that aren't being removed after they are
        emptied out during a deletion.

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::isTableCell):
        (WebCore::isTableRow):
        (WebCore::isTableCellEmpty):
        (WebCore::isTableRowEmpty):
        (WebCore::DeleteSelectionCommand::initializePositionData): Remember the table
        rows that contained the start and end of the selection.
        (WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
        Remove table rows that come before the end of the selection
        that was removed (except for the row that contained the start of the selection
        and any before that).
        Remove table rows that are come after the start of the selection
        that was removed (except for the row that contained the end of the selection
        and any after that).
        (WebCore::DeleteSelectionCommand::doApply): Call the new function.
        * editing/DeleteSelectionCommand.h:

ggaren's avatar
ggaren committed
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2007-07-17  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Kevin Decker.

        Removed ASSERT that was breaking the pageout test. It's trivial to
        reproduce this ASSERT when navigating between pages that change their
        names, but nothing bad seems to happen.

        * page/Page.cpp:
        (WebCore::Page::goToItem):

ggaren's avatar
ggaren committed
2415
2416
2417
2418
2419
2420
2421
2007-07-17  Geoffrey Garen  <ggaren@apple.com>

        Build fix.
        
        * plugins/win/PluginViewWin.cpp: Pass false for lockHistory like we
        do elsewhere.

2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2007-07-17  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Maciej.

        Implement the callback responsible for handling HTTP headers. This
        callback gets called for every header.
        We will add these headers to our ResourceResponse and on the 'end-of-header'
        indicator we will update the ResourceResponse and dispatch it.

        This patch adds various set methods to ResourceResponse. This improves
        the readability of the headerCallback and avoids storing a CURL handle inside
        the ResourceResponse which would be needed to implement ResourceResponse::doUpdateResourceResponse

        Add a destructor for ResourceHandleManager which would free the resources and remove
        a unused variable.

        * platform/network/ResourceHandleInternal.h:
        (WebCore::ResourceHandleInternal::ResourceHandleInternal):
        * platform/network/ResourceResponse.cpp:
        (WebCore::ResourceResponse::setUrl):
        (WebCore::ResourceResponse::setMimeType):
        (WebCore::ResourceResponse::setExpectedContentLength):
        (WebCore::ResourceResponse::setTextEncodingName):
        (WebCore::ResourceResponse::setSuggestedFilename):
        * platform/network/ResourceResponse.h:
        * platform/network/curl/ResourceHandleCurl.cpp:
        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
        * platform/network/curl/ResourceHandleManager.cpp:
        (WebCore::ResourceHandleManager::~ResourceHandleManager):
        (WebCore::ResourceHandleManager::sharedInstance):
        (WebCore::headerCallback):
        * platform/network/curl/ResourceHandleManager.h:

weinig's avatar
weinig committed
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2007-07-17  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam Roben.

        Convert JS undefined to the empty string when calling alert, confirm, and prompt. 

        Test: fast/dom/Window/alert-undefined.html

        * page/DOMWindow.idl:

ggaren's avatar
ggaren committed
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2007-07-17  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Kevin McCulough.

        Fixed failing layout test.
        
        Renamed "FrameLoadTypeInternal" to "FrameLoadTypeRedirectWithLockedHistory".
        This is almost certainly not a correct name for the original intent
        of this load type, but it's a correct name for its current behavior.
        
        (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
        When history is supposed to be locked, and no current history item
        exists, only add a new history item if you're the top-level frame.
        
        This rule, combined with the rule that setting iframe.src should not
        create a history item, is pretty hackish. On the other hand, it
        matches WinIE and doesn't cause any test regressions. So I'm OK with
        it as a short-term solution until the solution described in 
        <rdar://problem/5339292> can be implemented.

tristan's avatar
tristan committed
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2007-07-17  Tristan O'Tierney  <tristan@apple.com>

        Reviewed by Maciej Stachowiak.

        <rdar://problem/5294691> Source of file is misrepresented if downloaded by typing in URL in Safari address bar

        * loader/FrameLoaderClient.h:
        * loader/MainResourceLoader.cpp:        
        (WebCore::MainResourceLoader::continueAfterContentPolicy):
        Added an extra request parameter, initialRequest, to the download() method
        by passing up the resource handle's request.
        
        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyFrameLoaderClient::download):
        Added an extra parameter to the empty SVG download method.
        
antti's avatar
antti committed
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2007-07-17  Antti  <antti@apple.com>

        Reviewed by home-bradee.

        <rdar://problem/5336372>
        Icon database uses too much memory
        
        XRaying Safari startup memory consumption revealed that icon database is eating quite
        a bit of RAM if Icon.db is large (which it probably is if it has been in use for a while, 
        mine used for getting figures below was 2.6MB). 
        
        Note that the wins are less impressive with smaller Icon.db.
        
        This patch addresses three separate issues
        
        - SQLite fails to free the memory used by temporary tables. Icon database uses a temporary table
          on startup for pruning unused page urls. This wastes around 1MB. Addressed by rewriting
          pruning so it does not need a temporary table. The new method is also quite a bit faster speeding
          up Safari launch time by around 100ms
        - SQLite has it's own memory cache limited by default to 3MB. Icon database does not really need that much.
          Dropped the cache size to 300kB saving ~1MB on startup. 
          Smaller cache slows down startup by ~30ms (more than compensated by faster pruning above)
        - Don't populate m_pageURLToIconURLMap with all urls from database on startup, instead let it get populated
          when urls are accessed (user opens history menu for example). This shouldn't have any real performance impact 
          as the accesses are icon loads that need to hit the database anyway. This saves ~700kB.
          
        All in all with this Icon.db these changes reduce allocated memory by around 2.7MB on startup. Release build
        Safari RPRVT (empty start page) goes from 12.4MB to 10.4MB (TCMalloc pooling probably explaining why the win 
        looks bit smaller here).

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::IconDatabase):
        (WebCore::IconDatabase::open):
        (WebCore::IconDatabase::deleteAllPreparedStatements):
        (WebCore::IconDatabase::retainIconForPageURL):
        (WebCore::IconDatabase::releaseIconForPageURL):
        (WebCore::IconDatabase::establishIconIDForIconURL):
        (WebCore::IconDatabase::pruneUnretainedIconsOnStartup):
        * loader/icon/IconDatabase.h:

darin's avatar
darin committed
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2007-07-17  Darin Adler  <darin@apple.com>

        Reviewed by Mitz.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14569
          Repro crash due to saved state not being cleared when select and textarea elements
          are adopted by another document

        Test: fast/forms/saved-state-adoptNode-crash.html

        * dom/Document.h:
        (WebCore::Document::registerFormElementWithState): Updated parameter type to be
        HTMLFormControlElementWithState.
        (WebCore::Document::unregisterFormElementWithState): Ditto.
        Also removed isFormElementRegistered function and changed the type of the
        m_formElementsWithState ListHashSet.
        * dom/Document.cpp: (WebCore::Document::formElementsState): Updated to use new type,
        for set contents and to use new saveState() function and only save state for elements
        that return true.

        * html/HTMLGenericFormElement.h: Added HTMLFormControlElementWithState class,
        derived from HTMLGenericFormElement, and moved down all the behavior related to
        saving form control element state. Also removed the unnecessary default parameter
        to the HTMLGenericFormElement constructor.
        * html/HTMLGenericFormElement.cpp:
        (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState): Added.
        Calls registerFormElementWithState.
        (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState): Added.
        Calls unregisterFormElementWithState.
        (WebCore::HTMLFormControlElementWithState::willMoveToNewOwnerDocument): Added.
        Calls unregisterFormElementWithState.
        (WebCore::HTMLFormControlElementWithState::didMoveToNewOwnerDocument): Added.
        Calls registerFormElementWithState.
        (WebCore::HTMLFormControlElementWithState::closeRenderer): Moved to this class from
        the base class.

        * html/HTMLInputElement.h: Updated the base class name and overrode saveState instead
        of stateValue.
        * html/HTMLInputElement.cpp: Updated the base class name.
        (WebCore::HTMLInputElement::init): Removed the call to registerFormElementWithState.
        (WebCore::HTMLInputElement::~HTMLInputElement): Removed the call to
        unregisterFormElementWithState. Also changed the code to only call the
        unregisterForDidRestoreFromCacheCallback function for type PASSWORD (consistency
        and efficiency).
        (WebCore::HTMLInputElement::setInputType): Removed calls to registerFormElementWithState
        and unregisterFormElementWithState; we now let the element stay registered and simply
        don't save or restore state for password fields.
        (WebCore::HTMLInputElement::saveState): Updated function name and signature to replace
        the old stateValue function. Returns false for password fields.
        (WebCore::HTMLInputElement::willMoveToNewOwnerDocument): Removed the call to
        unregisterFormElementWithState.
        (WebCore::HTMLInputElement::didMoveToNewOwnerDocument): Removed the call to
        registerFormElementWithState.

        * html/HTMLSelectElement.h: Updated the base class name and overrode saveState instead
        of stateValue.
        * html/HTMLSelectElement.cpp: Updated the base class name.
        (WebCore::HTMLSelectElement::HTMLSelectElement): Removed the call to
        registerFormElementWithState.
        (WebCore::HTMLSelectElement::~HTMLSelectElement): Removed the call to
        unregisterFormElementWithState.
        (WebCore::HTMLSelectElement::saveState): Updated function name and signature to
        replace the old stateValue function.
        (WebCore::HTMLSelectElement::setLength): Updated to use document() instead of
        ownerDocument(); the latter is just a slower virtual-function way of doing the
        same thing in all cases except for Document and XPathNamespace.

        * html/HTMLTextAreaElement.h: Update the base class name, overrode saveState instead
        of stateValue, and removed the now-unnecessary explicit destructor.
        * html/HTMLTextAreaElement.cpp: Updated the base class name.
        (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Removed the call to
        registerFormElementWithState.
        (WebCore::HTMLTextAreaElement::saveState): Updated function name and signature to replace
        the old stateValue function.

weinig's avatar
weinig committed
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2007-07-17  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        - Make HTMLFrameOwnerElement::contentWindow() return a DOMWindow instead of a Frame
        - Remove the unnecessary hack in HTMLFrameElement.idl and HTMLIFrameElement.idl that
          converted from Frame to Window now that it is not necessary.
        - Remove now unused [NullCheck] extended attribute from CodeGeneratorJS.pm.

        * bindings/scripts/CodeGeneratorJS.pm:
        * html/HTMLDocument.idl:
        * html/HTMLFrameElement.idl:
        * html/HTMLFrameOwnerElement.cpp:
        (WebCore::HTMLFrameOwnerElement::contentWindow):
        * html/HTMLFrameOwnerElement.h:
        * html/HTMLIFrameElement.idl:

weinig's avatar
weinig committed
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2007-07-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam Roben.

        Move self, opener, parent, top, window, and frames from kjs_window
        to DOMWindow and auto-generate the bindings for them.

        * bindings/js/kjs_window.cpp:
        (KJS::Window::getValueProperty):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::self):
        (WebCore::DOMWindow::opener):
        (WebCore::DOMWindow::parent):
        (WebCore::DOMWindow::top):
        * page/DOMWindow.h:
        (WebCore::DOMWindow::window):
        (WebCore::DOMWindow::frames):
        * page/DOMWindow.idl:

ggaren's avatar
ggaren committed
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2007-07-16  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.
        
        Fixed <rdar://problem/5334483> REGRESSION: JavaScript-induced 
        window.open loads not added to back/forward list
        
        I did an audit of our history rules in loading and tried to establish
        some sane uniformity.
        
        The uniform rule is:
            - HTTP redirects and HTTP redirects simulated by <meta http-equiv>
            add a history item if and only if the redirect takes > 1 second.
            - Other navigations, including JavaScript navigations, always
            add a history item, except for location.replace navigations.

        In the future, we'll want to refine the second case to be more like the
        first. I've filed <rdar://problem/5339292> about that.

        * bindings/js/JSHTMLDocumentCustom.cpp:
        (WebCore::JSHTMLDocument::setLocation): Don't pass 'true' for 
        userGesture unconditionally. userGesture is used to determine popup 
        blocking, not history item creation.

        * bindings/js/kjs_window.cpp: Pass 'false' for lockHistory in all loads
        except location.replace, which intends to lock history.

        * loader/FrameLoader.cpp: Distinguish between lockHistory and 
        userGesture. The former determines whether a new history item gets
        created. The latter determines whether JavaScript can open popup
        windows. Start passing these variables in functions that used to
        swallow or conflate them.
        
        (WebCore::FrameLoader::requestFrame): Pass 'true' for lockHistory here
        because that's usually correct when setting the 'src' attribute of a
        child frame, and we want to avoid regressing <rdar://problem/4921797>.

        (WebCore::FrameLoader::load): Use the lockHistory variable to determine
        whether to start a history-creating load. Using userGesture for this
        purpose is wrong, as explained above.

        * loader/FrameLoader.h: Renamed one variant of scheduleRedirection to
        scheduleHTTPRedirection because the behavior there of measuring elapsed
        time is specific to the HTTP redirection case.

        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::contextMenuItemSelected): lockHistory
        can always be false here because this navigation is never the result of
        a redirection.

weinig's avatar
weinig committed
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2007-07-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam and Maciej.

        Move the frameElement attribute from kjs_window to DOMWindow and
        auto-generate the bindings for it. 

        * bindings/js/kjs_window.cpp:
        (KJS::Window::getValueProperty):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * bindings/scripts/CodeGeneratorJS.pm:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::frameElement):
        (WebCore::DOMWindow::devicePixelRatio):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:

weinig's avatar
weinig committed
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2007-07-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam.

        Move more functions from kjs_window to DOMWindow and auto-generate
        the bindings for them.

        * bindings/js/kjs_window.cpp:
        (KJS::WindowFunc::callAsFunction):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::print):
        (WebCore::DOMWindow::stop):
        (WebCore::DOMWindow::alert):
        (WebCore::DOMWindow::confirm):
        (WebCore::DOMWindow::prompt):
        (WebCore::DOMWindow::find):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:

bdash's avatar
bdash committed
2743
2744
2745
2746
2747
2748
2007-07-17  Mark Rowe  <mrowe@apple.com>

        Gdk build fix.

        * platform/gdk/ChromeClientGdk.h:

beidson's avatar
beidson committed
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2007-07-16  Brady Eidson  <beidson@apple.com>

        Reviewed by Adam

        Begin the arduous task of localizing FTP directory listings while removing a global initializer!

        * loader/FTPDirectoryDocument.cpp:
        (WebCore::processFilesizeString):

        * page/mac/WebCoreViewFactory.h:

        * platform/LocalizedStrings.h:

        * platform/gdk/TemporaryLinkStubs.cpp:
        (WebCore::unknownFileSizeText):

        * platform/mac/LocalizedStringsMac.mm:
        (WebCore::unknownFileSizeText):

        * platform/qt/Localizations.cpp:
        (WebCore::unknownFileSizeText):

weinig's avatar
weinig committed
2771
2772
2773
2774
2775
2776
2777
2778
2779
2007-07-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver.

        Remove more redundant isSafeScript checks.

        * bindings/js/kjs_window.cpp:
        (KJS::Window::getOwnPropertySlot):

weinig's avatar
weinig committed
2780
2781
2782
2783
2007-07-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver.

weinig's avatar
weinig committed
2784
        Turn off -Wshorten-64-to-32 warning for 64-bit builds.
weinig's avatar
weinig committed
2785
2786
2787

        * Configurations/Base.xcconfig:

andersca's avatar
andersca committed
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2007-07-16  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5336276>
        ASSERT(cs->accessCount() > 0) when instantiating widget templates in DashCode

        If the cache is disabled, accessCount will always be 0. Account for this in the assert.
        
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::reset):
        (WebCore::HTMLTokenizer::notifyFinished):

beidson's avatar
beidson committed
2801
2802
2007-07-16  Brady Eidson  <beidson@apple.com>

andersca's avatar
andersca committed
2803
        Reviewed by Darin.
beidson's avatar
beidson committed
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814

        Append FTP row entries to the first TBODY instead of the TABLE element itself, 
        as many TABLE elements end up with an implicit TBODY and that's where most people would
        expect it to be added.

        * html/HTMLTableElement.h:
        (WebCore::HTMLTableElement::firstTBody): Added this accessor

        * loader/FTPDirectoryDocument.cpp:
        (WebCore::FTPDirectoryTokenizer::appendEntry): Add to the first tbody if it exists

justing's avatar
justing committed
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2007-07-16  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Adele.

        <rdar://problem/5240265> 
        REGRESSION: Clicking a <button> clears the selection in contenteditable areas

        * page/FocusController.cpp:
        (WebCore::clearSelectionIfNeeded): Don't clear the selection if
        the mouse press that caused the focus shift occurred in 
        a -webkit-user-select: ignore region.

weinig's avatar
weinig committed
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2007-07-16  David Hyatt  <hyatt@apple.com>

        Fix for 5335829, avoid creating a pathological # of FontData objects
        on Windows.  The MLang service actually caches and reuses HFONTs, which
        means it is safe to use our FontPlatformData -> FontData cache.

        Reviewed by olliej

        * platform/win/FontCacheWin.cpp:
        (WebCore::FontCache::getFontDataForCharacters):

2838
2839
2840
2841
2842
2843
2844
2845
2846
2007-07-16  Adam Roben  <aroben@apple.com>

        Added a manual test to test calling window.print on a subframe.

        Reviewed by Darin.

        * manual-tests/resources/print-subframe.html: Added.
        * manual-tests/window-print-subframe.html: Added.

2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859