2009-03-12 Dmitry Titov <dimich@chromium.org>
[WebKit-https.git] / WebCore / ChangeLog
1 2009-03-12  Dmitry Titov  <dimich@chromium.org>
2
3         Reviewed by Dimitri Glazkov.
4
5         https://bugs.webkit.org/show_bug.cgi?id=24563
6         Change ResourceRequest to be a struct rather then a class to match other declarations.
7
8         * platform/network/chromium/ResourceRequest.h:
9
10 2009-03-12  David Levin  <levin@chromium.org>
11
12         Reviewed by  Darin Fisher.
13
14         Bug 24530: width100percent-searchfield.html should be fixed for chromium.
15         <https://bugs.webkit.org/show_bug.cgi?id=24530>
16
17         Compensate for r39924 in chromium, which broke LayoutTests/fast/replaced/width100percent-searchfield.html
18
19         * css/themeChromiumWin.css: Added.
20         Overrides the changes to start supporting input[type="search"] on Windows (since
21         Chromium doesn't do anything special for this).
22
23         * rendering/RenderThemeChromiumWin.cpp:
24         (WebCore::supportsFocus):
25         (WebCore::RenderThemeChromiumWin::extraDefaultStyleSheet):
26         (WebCore::RenderThemeChromiumWin::determineState):
27         (WebCore::RenderThemeChromiumWin::getThemeData):
28
29 2009-03-12  Greg Bolsinga  <bolsinga@apple.com>
30
31         Reviewed by Antti Koivisto.
32
33         https://bugs.webkit.org/show_bug.cgi?id=24506
34         Geolocation in Safari differs from the spec, no Coordinates attribute on Position
35         
36         Get up to date.
37
38         * DerivedSources.make:
39         * GNUmakefile.am:
40         * WebCore.pro:
41         * WebCore.scons:
42         * WebCore.vcproj/WebCore.vcproj:
43         * WebCore.xcodeproj/project.pbxproj:
44         * WebCoreSources.bkl:
45         * bindings/js/JSGeolocationCustom.cpp:
46         (WebCore::createPositionOptions):
47         * page/Coordinates.cpp: Added.
48         (WebCore::Coordinates::toString):
49         * page/Coordinates.h: Added.
50         (WebCore::Coordinates::create):
51         (WebCore::Coordinates::latitude):
52         (WebCore::Coordinates::longitude):
53         (WebCore::Coordinates::altitude):
54         (WebCore::Coordinates::accuracy):
55         (WebCore::Coordinates::altitudeAccuracy):
56         (WebCore::Coordinates::heading):
57         (WebCore::Coordinates::speed):
58         (WebCore::Coordinates::Coordinates):
59         * page/Coordinates.idl: Added.
60         * page/Geoposition.cpp:
61         (WebCore::Geoposition::toString):
62         * page/Geoposition.h:
63         (WebCore::Geoposition::create):
64         (WebCore::Geoposition::coords):
65         (WebCore::Geoposition::Geoposition):
66         * page/Geoposition.idl:
67         * page/PositionOptions.h:
68         (WebCore::PositionOptions::create):
69         (WebCore::PositionOptions::maximumAge):
70         (WebCore::PositionOptions::setMaximumAge):
71         (WebCore::PositionOptions::PositionOptions):
72         * platform/mac/GeolocationServiceMac.mm:
73         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
74
75 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
76
77         Reviewed by Darin Fisher.
78
79         https://bugs.webkit.org/show_bug.cgi?id=24496
80         Fix console logging of non-string values by coercing the argument to
81         a string, for V8 bindings.
82
83         Test: fast/js/console-non-string-values.html
84
85         * bindings/v8/ScriptValue.cpp: Added toString method.
86         (WebCore::ScriptValue::toString):
87         * bindings/v8/ScriptValue.h: Added PlatformString, ScriptState includes
88             and toString declaration.
89
90 2009-03-12  Darin Fisher  <darin@chromium.org>
91
92         Reviewed by Dimitri Glazkov.
93
94         Eliminate ChromiumBridge::uiResourceProtocol
95         https://bugs.webkit.org/show_bug.cgi?id=24558
96
97         * platform/chromium/ChromiumBridge.h:
98
99 2009-03-12  Greg Bolsinga  <bolsinga@apple.com>
100
101         Reviewed by Simon Fraser.
102
103         Missing breaks in switch statement
104         https://bugs.webkit.org/show_bug.cgi?id=24556
105
106         * platform/mac/GeolocationServiceMac.mm:
107         (-[WebCoreCoreLocationObserver locationManager:didFailWithError:]):
108
109 2009-03-12  Darin Fisher  <darin@chromium.org>
110
111         Reviewed by Dimitri Glazkov.
112
113         https://bugs.webkit.org/show_bug.cgi?id=24554
114         Remove some unused functions from ChromiumBridge.
115
116         * platform/chromium/ChromiumBridge.h:
117
118 2009-03-02  Eric Seidel  <eric@webkit.org>
119
120         Reviewed by Darin Fisher and Justin Garcia.
121
122         Safari crashes during drag and drop in Google presentations
123         due to mutation event handlers removing DOM content during insertNode
124         https://bugs.webkit.org/show_bug.cgi?id=22634
125
126         Added a bunch of "null" checks to make sure nodes are still
127         in the document before we operate on them.  This is an
128         inelegant solution, but it's the best we have for now.
129         
130         Test: editing/selection/crash-on-drag-with-mutation-events.html
131
132         * editing/CompositeEditCommand.cpp:
133         (WebCore::CompositeEditCommand::insertNodeAt):
134         * editing/ReplaceSelectionCommand.cpp:
135         (WebCore::ReplaceSelectionCommand::doApply):
136
137 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
138
139         Reviewed by Adam Treat.
140
141         https://bugs.webkit.org/show_bug.cgi?id=24525
142         REGRESSION: Inspector window doesn't close when inspected page is
143         destroyed. This is a revert of r41158, which became unnecessary when
144         InspectorController became ref-counted in r41462.
145
146         * inspector/InspectorController.cpp:
147         (WebCore::InspectorController::inspectedPageDestroyed): Reset m_inspectedPage
148             after calling close().
149         (WebCore::InspectorController::stopUserInitiatedProfiling): Remove
150             m_inspectedPage check guard around profile logic.
151
152 2009-03-12  Peter Kasting  <pkasting@google.com>
153
154         Reviewed by Darin Fisher.
155
156         https://bugs.webkit.org/show_bug.cgi?id=24502
157         Make horizontal scrolling on Windows always go the correct direction.
158
159         * platform/PlatformWheelEvent.h:
160         * platform/win/WheelEventWin.cpp:
161         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
162
163 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
164
165         Reviewed by Simon Fraser.
166
167         https://bugs.webkit.org/show_bug.cgi?id=24496
168         Fix console logging of non-string values by coercing the argument to
169         a string.
170
171         Test: fast/js/console-non-string-values.html
172
173         * bindings/js/ScriptValue.cpp: Removed PlatformString include.
174         * bindings/js/ScriptValue.h: Added toString method.
175         (WebCore::ScriptValue::toString):
176         * page/Console.cpp:
177         (WebCore::getFirstArgumentAsString): Changed firstArgumentAsString method to use
178             ScriptValue::toString.
179         (WebCore::Console::addMessage): added extra ScriptState argument to callsite.
180         (WebCore::Console::count): Ditto.
181
182 2009-03-12  Simon Fraser  <simon.fraser@apple.com>
183
184         Reviewed by Adele Peterson.
185         
186         https://bugs.webkit.org/show_bug.cgi?id=24508
187         
188         Fix updating of text field with placeholder text when value is set
189         by ensuring that updatePlaceholderVisibility() is called after
190         the value has been updated, not before.
191
192         Test: fast/forms/placeholder-set-value.html
193
194         * html/HTMLInputElement.cpp:
195         (WebCore::HTMLInputElement::setValue):
196
197 2009-03-12  Simon Fraser  <simon.fraser@apple.com>
198
199         Reviewed by Dave Hyatt
200         
201         https://bugs.webkit.org/show_bug.cgi?id=24552
202         
203         Hit testing involving normal flow, self-painting layers (e.g. reflections)
204         was broken because it was not null-testing the result of hitTestLayer(),
205         so bailing early with a nil hit layer.
206
207         Test: fast/layers/normal-flow-hit-test.html
208
209         * rendering/RenderLayer.cpp:
210         (WebCore::RenderLayer::hitTestLayer):
211
212 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
213
214         Reviewed by Cameron Zwarich.
215
216         Removed zero-sized files, left over from improperly applied patch.
217
218         * platform/graphics/chromium/ThemeHelperChromiumWin.cpp: Removed.
219         * platform/graphics/chromium/ThemeHelperChromiumWin.h: Removed.
220
221 2009-03-12  Adam Treat  <adam.treat@torchmobile.com>
222
223         Reviewed by George Staikos.
224
225         Do not ignore alpha color in optimization.  Hard to believe, but there
226         are websites that fill the entire page with a tiled image consisting of
227         nothing but a 100% transparent 1x1 image. <cough>orbitz.com</cough>
228
229         * platform/graphics/qt/ImageQt.cpp:
230         (WebCore::BitmapImage::checkForSolidColor):
231
232 2009-03-12  Julien Chaffraix  <jchaffraix@webkit.org>
233
234         Reviewed by Darin Adler.
235
236         Bug 24110: cloneNode should call cloneElement and not the reverse
237
238         - Splitted the code from cloneNode into cloneElementWithChildren and cloneElementWithChildren.
239           Now cloneNode calls one of the 2 previous methods.
240
241         - Renamed cloneElement to cloneElementWithoutChildren as it was the previous behaviour.
242
243         - Moved cloneNode to the Element private section so that WebCore callers cannot use it.
244
245         - Removed Element::cloneNode usage through WebCore.
246
247         * dom/Element.cpp:
248         (WebCore::Element::cloneNode): Moved to Element's private section and it
249         now calls the two next methods.
250         (WebCore::Element::cloneElementWithChildren): Added.
251         (WebCore::Element::cloneElementWithoutChildren): Renamed from cloneElement
252         to avoid ambiguity.
253         * dom/Element.h:
254
255         * editing/ApplyStyleCommand.cpp:
256         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Changed call to cloneElement
257         to call to cloneElementWithoutChildren.
258         * editing/BreakBlockquoteCommand.cpp:
259         (WebCore::BreakBlockquoteCommand::doApply): Ditto.
260         * editing/IndentOutdentCommand.cpp:
261         (WebCore::IndentOutdentCommand::indentRegion): Ditto.
262         * editing/InsertParagraphSeparatorCommand.cpp:
263         (WebCore::InsertParagraphSeparatorCommand::doApply): Ditto.
264         * editing/ModifySelectionListLevel.cpp:
265         (WebCore::IncreaseSelectionListLevelCommand::doApply): Ditto.
266         * editing/SplitElementCommand.cpp:
267         (WebCore::SplitElementCommand::doApply): Ditto.
268         * editing/markup.cpp:
269         (WebCore::createFragmentFromText): Ditto.
270         * svg/SVGUseElement.cpp:
271         (WebCore::SVGUseElement::buildShadowTree): Ditto.
272         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Ditto.
273
274 2009-03-12  Dirk Schulze  <krit@webkit.org>
275
276         Reviewed by Oliver Hunt.
277
278         Fixed a crash on the 1x1 pixel check for background image in gtk.
279         We need to load the image first and need to be sure that the image
280         is not null before checking the type. 
281
282         * platform/graphics/cairo/ImageCairo.cpp:
283         (WebCore::BitmapImage::checkForSolidColor):
284
285 2009-03-12  Xan Lopez  <xlopez@igalia.com>
286
287         Reviewed by Alexey Proskuryakov.
288
289         https://bugs.webkit.org/show_bug.cgi?id=24544
290         Rename setUrl to setURL
291
292         Use proper case for setUrl method, rename it to setURL.
293
294         * platform/network/ResourceResponseBase.cpp:
295         (WebCore::ResourceResponseBase::adopt):
296         * platform/network/ResourceResponseBase.h:
297         * platform/network/curl/ResourceHandleManager.cpp:
298         (WebCore::writeCallback):
299         (WebCore::headerCallback):
300         * platform/network/soup/ResourceHandleSoup.cpp:
301         (WebCore::fillResponseFromMessage):
302         (WebCore::queryInfoCallback):
303
304 2009-03-12  Xan Lopez  <xlopez@igalia.com>
305
306         Reviewed by Alexey Proskuryakov.
307
308         https://bugs.webkit.org/show_bug.cgi?id=24519
309         [GTK] Use two argument KURL ctor in ResourceHandleSoup
310
311         Use two argument KURL ctor, the single argument ctor expects its
312         input to be the output of a previous KURL::parse call, which is
313         not the case here.
314
315         * platform/network/soup/ResourceHandleSoup.cpp:
316         (WebCore::fillResponseFromMessage):
317         (WebCore::queryInfoCallback):
318
319 2009-03-11  Jon Honeycutt  <jhoneycutt@apple.com>
320
321         Fix for <rdar://6418681>
322         https://bugs.webkit.org/show_bug.cgi?id=22644
323
324         Reviewed by Steve Falkenburg.
325
326         * plugins/win/PluginPackageWin.cpp:
327         (WebCore::PluginPackage::isPluginBlacklisted): Add the Citrix ICA
328         Client plug-in to the blacklist; it requires a Mozilla-based browser.
329
330 2009-03-12  Oliver Hunt  <oliver@apple.com>
331
332         Reviewed by NOBODY (build fix).
333
334         build fix.
335
336         * html/CanvasRenderingContext2D.h:
337
338 2009-03-11  Oliver Hunt  <oliver@apple.com>
339
340         Reviewed by Adele Peterson.
341
342         <rdar://problem/6673852> Widget "Simple World Clock" does not display with Safari 4
343
344         A number of dashboard widgets rely on canvas failing silently when given invalid
345         colors for gradient stops, but both the spec and firefox throw exceptions here.
346         So we work around this by creating a dashboard quirk that will only suppress the
347         exception in dashboard compatibility mode.
348
349         Test: fast/canvas/canvas-gradient-addStop-error.html
350
351         * html/CanvasGradient.cpp:
352         (WebCore::CanvasGradient::CanvasGradient):
353         (WebCore::CanvasGradient::addColorStop):
354         * html/CanvasGradient.h:
355         (WebCore::CanvasGradient::setDashboardCompatibilityMode):
356         * html/CanvasRenderingContext2D.cpp:
357         (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard):
358         (WebCore::CanvasRenderingContext2D::createLinearGradient):
359         (WebCore::CanvasRenderingContext2D::createRadialGradient):
360         * html/CanvasRenderingContext2D.h:
361
362 2009-03-11  David Kilzer  <ddkilzer@apple.com>
363
364         Clarify comments regarding order of FEATURE_DEFINES
365
366         Rubber-stamped by Mark Rowe.
367
368         * Configurations/WebCore.xcconfig: Added warning about the
369         consequences when FEATURE_DEFINES are not kept in sync.
370
371 2009-03-11  Gustavo Noronha Silva  <gns@gnome.org>
372
373         Reviewed by Holger Freyther.
374
375         https://bugs.webkit.org/show_bug.cgi?id=24515
376         [GTK] soup backend should use GMappedFile instead of mmap directly
377
378         Rewrite mmap code used to upload files to use GMappedFile, so that
379         it is platform-independent.
380
381         * platform/network/soup/ResourceHandleSoup.cpp:
382         (WebCore::ResourceHandle::startHttp):
383
384 2009-03-11  Dan Bernstein  <mitz@apple.com>
385
386         Reviewed by Darin Adler.
387
388         - WebCore part of fixing <rdar://problem/3919124> Thai text selection
389           in Safari is incorrect
390
391         Test: platform/mac/editing/selection/word-thai.html
392
393         Tested on Mac, but should work on all ICU platforms (or more precisely
394         on all platforms that implement
395         WTF::Unicode::hasLineBreakingPropertyComplexContext() correctly).
396
397         * editing/TextIterator.cpp:
398         (WebCore::BackwardsCharacterIterator::BackwardsCharacterIterator):
399         Added.
400         (WebCore::BackwardsCharacterIterator::range): Added.
401         (WebCore::BackwardsCharacterIterator::advance): Added.
402
403         * editing/TextIterator.h: Added BackwardsCharacterIterator with the
404         minimal functionality required for this patch.
405         (WebCore::BackwardsCharacterIterator::atEnd): Added.
406
407         * editing/visible_units.cpp:
408         (WebCore::firstNonComplexContextLineBreak): Added this helper function
409         that returns the index of the first character in the string whose
410         Unicode line breaking property value is not SA ("Complex Context"), or
411         the length of the string if there is no such character.
412         (WebCore::lastNonComplexContextLineBreak): Added this helper function
413         that returns the index of the last character in the string whose
414         Unicode line breaking property value is not SA ("Complex Context"), or
415         -1 if there is no such character.
416         (WebCore::previousBoundary): Changed the signature of the search
417         function to include an offset parameter. Renamed the 'exception' local
418         variable to 'ec' and changed its type to ExceptionCode. Extend the
419         string forwards until the first character with Unicode line breaking
420         property value other than SA. This gives the boundary search function
421         enough context in the forward direction. Changed to use a
422         BackwardsCharacterIterator for translating the backwards offset into
423         a position.
424         (WebCore::nextBoundary): Changed the signature of the search
425         function to include an offset parameter. Extend the string backwards
426         until the first character with Unicode line breaking property value
427         other than SA. This gives the boundary search function enough context in
428         the backwards direction. Restricted the workaround for <rdar://5192593>
429         only to the line break case, because it was causing an extra character
430         to be selected following a word that ended with a combining mark.
431         (WebCore::startWordBoundary): Added an offset parameter. Check that
432         going backwards from the given offset, there is a character with Unicode
433         line breaking property value other than SA, and otherwise return 0 to
434         request more context.
435         (WebCore::endWordBoundary): Similar, but in reverse.
436         (WebCore::previousWordPositionBoundary): Similar.
437         (WebCore::nextWordPositionBoundary): Similar.
438         (WebCore::startSentenceBoundary): Updated for the new search function
439         signature.
440         (WebCore::endSentenceBoundary): Ditto.
441         (WebCore::previousSentencePositionBoundary): Ditto.
442         (WebCore::nextSentencePositionBoundary): Ditto.
443
444 2009-03-11  Darin Adler  <darin@apple.com>
445
446         Reviewed by Mark Rowe.
447
448         Don't use "::" in thread names because it is ugly!
449
450         * loader/icon/IconDatabase.cpp:
451         (WebCore::IconDatabase::open): Use "WebCore: " instead of "WebCore::".
452         * platform/network/cf/ResourceHandleCFNet.cpp:
453         (WebCore::ResourceHandle::loaderRunLoop): Call this "WebCore: CFNetwork Loader" to make
454         it clear this is a WebCore-created thread.
455         * storage/DatabaseThread.cpp:
456         (WebCore::DatabaseThread::start): Use "WebCore: " instead of "WebCore::".
457         * storage/LocalStorageThread.cpp:
458         (WebCore::LocalStorageThread::start): Use "WebCore: " instead of "WebCore::".
459         * workers/WorkerThread.cpp:
460         (WebCore::WorkerThread::start): Use "WebCore: " instead of "WebCore::".
461
462 2009-03-11  Mark Rowe  <mrowe@apple.com>
463
464         Rubber-stamped by Darin Adler.
465
466         <rdar://problem/6653286> WebCore's implementation of screenIsMonochrome is needlessly complex
467
468         * platform/mac/PlatformScreenMac.mm:
469         (WebCore::screenIsMonochrome): Return false.
470
471 2009-03-11  Beth Dakin  <bdakin@apple.com>
472
473         Reviewed by Dan Bernstein.
474
475         Fix for https://bugs.webkit.org/show_bug.cgi?id=14749 percentage 
476         top value on position:relative child not calculated correctly if 
477         parent has percentage height
478         - and corresponding -
479         <rdar://problem/6172925>
480
481         * rendering/RenderBoxModelObject.cpp:
482         (WebCore::RenderBoxModelObject::relativePositionOffsetY):
483
484 2009-03-11  Jian Li  <jianli@chromium.org>
485
486         Reviewed by Dimitri Glazkov.
487
488         Implement ScriptValue::hasNoValue for V8.
489         https://bugs.webkit.org/show_bug.cgi?id=24507
490
491         * bindings/v8/ScriptValue.h:
492         (WebCore::ScriptValue::hasNoValue):
493
494 2009-03-11  David Levin  <levin@chromium.org>
495
496         Reviewed by Dimitri Glazkov.
497
498         Bug 24459: Add v8 bindings for event.
499         <https://bugs.webkit.org/show_bug.cgi?id=24459>
500
501         Adding custom event bindings.
502
503         * bindings/v8/custom/V8AbstractEventListener.cpp: Added.
504         * bindings/v8/custom/V8AbstractEventListener.h: Added.
505         * bindings/v8/custom/V8AttrCustom.cpp:
506         Fixed messed up copyright header.
507         * bindings/v8/custom/V8CustomEventListener.cpp: Added.
508         * bindings/v8/custom/V8CustomEventListener.h:
509         Replaced forwarding header with the real implementation.
510         * bindings/v8/custom/V8ElementCustom.cpp:
511         * bindings/v8/custom/V8LazyEventListener.cpp: Added.
512         * bindings/v8/custom/V8LazyEventListener.h: Added.
513         * bindings/v8/custom/V8ObjectEventListener.cpp: Added.
514         * bindings/v8/custom/V8ObjectEventListener.h: Added.
515         * bindings/v8/custom/V8WorkerContextEventListener.cpp: Added.
516         * bindings/v8/custom/V8WorkerContextEventListener.h: Added.
517
518 2009-03-11  Darin Fisher  <darin@chromium.org>
519
520         Reviewed by Dimitri Glazkov.
521
522         https://bugs.webkit.org/show_bug.cgi?id=24521
523         Add some missing includes for the non-JSC build.
524
525         * platform/text/PlatformString.h: added OwnPtr.h
526         * xml/XMLHttpRequest.cpp: added SecurityOrigin.h
527
528 2009-03-11  Simon Fraser  <simon.fraser@apple.com>
529
530         Reviewed by Darin Adler
531
532         https://bugs.webkit.org/show_bug.cgi?id=24531
533         
534         Make sure that AnimationControllerPrivate::getAnimatedStyleForRenderer() never
535         returns a null style if it has a valid renderer, which could happen if a
536         CompositeAnimation existed, but wasn't running any animations or transitions.
537
538         * page/animation/AnimationController.cpp:
539         (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
540
541 2009-03-11  Simon Fraser  <simon.fraser@apple.com>
542
543         Fix Scons build. Patch from Alexander Guy.
544
545         * WebCore.scons:
546
547 2009-03-11  Simon Fraser  <simon.fraser@apple.com>
548
549         Reviewed by Dan Bernstein
550        
551         https://bugs.webkit.org/show_bug.cgi?id=23093
552         
553         When the cancel button in the search field is shown or hidden,
554         we need to explicitly setStyle() on the cancel button's renderer,
555         to ensure that repaint happens. Changing the style without telling
556         the renderer won't work.
557
558         Test: fast/repaint/search-field-cancel.html
559
560         * rendering/RenderTextControlSingleLine.cpp:
561         (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
562         (WebCore::RenderTextControlSingleLine::updateFromElement):
563         (WebCore::RenderTextControlSingleLine::createCancelButtonStyle):
564         (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility):
565         (WebCore::RenderTextControlSingleLine::visibilityForCancelButton):
566         * rendering/RenderTextControlSingleLine.h:
567
568 2009-03-11  Hironori Bono  <hbono@chromium.org>
569
570         Reviewed by Alexey Proskuryakov.
571
572         https://bugs.webkit.org/show_bug.cgi?id=15790
573         Ligatures aren't accounted for when manipulating VisiblePositions
574
575         Changed cursorMovementIterator rules to prevent a cursor from moving in the middle of an
576         Indic ligature which uses a virama sign.
577         
578         Test: editing/deleting/skip-virama-001.html
579
580         * platform/text/TextBreakIteratorICU.cpp:
581         (WebCore::cursorMovementIterator):
582
583 2009-03-11  Alexey Proskuryakov  <ap@webkit.org>
584
585         Reviewed by George Staikos.
586
587         https://bugs.webkit.org/show_bug.cgi?id=24513
588         REGRESSION: Cursor movement doesn't work on Tiger (ICU 3.2)
589
590         Fixes existing tests on Tiger.
591
592         * platform/text/TextBreakIteratorICU.cpp: (WebCore::cursorMovementIterator):
593         Use characterBreakIterator on Tiger (like we used to do).
594
595 2009-03-11  Alexey Proskuryakov  <ap@webkit.org>
596
597         Reviewed by Oliver Hunt.
598
599         <rdar://problem/4072827> Downloaded non-ASCII file name becomes garbled
600
601         * platform/network/mac/ResourceRequestMac.mm:
602         (WebCore::ResourceRequest::doUpdatePlatformRequest): Correct selector name
603         in instancesRespondToSelector.
604
605 2009-03-11  Jan Michael Alonzo  <jmalonzo@webkit.org>
606
607         Reviewed by Holger Freyther.
608
609         [GTK]DumpRenderTree doesn't compile for non-X11 GTK ports anymore
610         https://bugs.webkit.org/show_bug.cgi?id=2260
611
612         Add missing stdio.h include to get the build going
613
614         * plugins/gtk/PluginPackageGtk.cpp:
615
616 2009-03-10  Justin Garcia  <justin.garcia@apple.com>
617
618         Reviewed by Ken Kocienda.
619
620         * dom/Range.cpp:
621         (WebCore::Range::addLineBoxRects): If the range ended at [div, 0], addLineBoxRects
622         would include rects for the divs contents.  Set the correct RenderObject to stop at.
623
624 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
625
626         Reviewed by Sam Weinig.
627
628         <rdar://problem/6123770> Restrict access to document.cookie when making a cross-site XHR
629
630         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseXML): Removed an incorrect
631         comment about cookie support. Firefox doesn't expose cookies on responseXML at all, and
632         there are security concerns with exposing them for cross-origin requests, so it's not clear
633         if we want to change anything here.
634
635 2009-03-10  Simon Fraser  <simon.fraser@apple.com>
636
637         Reviewed by Darin Adler
638
639         https://bugs.webkit.org/show_bug.cgi?id=24503
640         
641         Fix hit testing of absolutely positioned single line text controls by
642         ensuring that we set result.innerNode() correctly. If the hit node is
643         a descendant of the inner text element or if it is the <input> itself,
644         then we say we hit the innerTextElement.
645         
646         Rename hitInnerTextBlock() to hitInnerTextElement() to match the
647         'innerTextElement' terminology used elsewhere.
648         
649         Assert that if renderer()->hitTest() returns false, no-one set
650         result.innerNode().
651
652         Test: fast/forms/search-abs-pos-cancel-button.html
653
654         * rendering/RenderLayer.cpp:
655         (WebCore::RenderLayer::hitTestContents):
656         * rendering/RenderTextControl.cpp:
657         (WebCore::RenderTextControl::hitInnerTextElement):
658         * rendering/RenderTextControl.h:
659         * rendering/RenderTextControlMultiLine.cpp:
660         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
661         * rendering/RenderTextControlSingleLine.cpp:
662         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
663
664 2009-03-10  Antti Koivisto  <antti@apple.com>
665
666         Reviewed by Mark Rowe.
667
668         <rdar://problem/6668238> WebCore is registering text encodings needlessly from KURL constructor.
669         
670         Another case where we would trigger extended encoding loading needlessly.
671
672         * platform/text/TextEncoding.cpp:
673         (WebCore::TextEncoding::isNonByteBasedEncoding):
674
675 2009-03-10  Beth Dakin  <bdakin@apple.com>
676
677         Reviewed by Darin Adler.
678
679         Fix for <rdar://problem/6624769> REGRESSION (Safari 4 PB): No 
680         scroll bar appears for long line of text with NOWRAP set
681
682         This is a regression from http://trac.webkit.org/changeset/32226
683         I talked with Dan about the original change, and we decided that 
684         the best fix was to remove his small potential-optimization that 
685         only created a separate line box for whitespace under certain 
686         circumstances. This new code will always create a separate line 
687         box.
688
689         * rendering/bidi.cpp:
690         (WebCore::RenderBlock::layoutInlineChildren):
691
692 2009-03-10  Sam Weinig  <sam@webkit.org>
693
694         Reviewed by Geoffrey Garen.
695
696         Fix for <rdar://problem/6166844>
697         https://bugs.webkit.org/show_bug.cgi?id=24495
698
699         Use same rule for loading java applets as we do for images.
700
701         * html/HTMLAppletElement.cpp:
702         (WebCore::HTMLAppletElement::createRenderer):
703         * loader/FrameLoader.cpp:
704         (WebCore::FrameLoader::loadItem):
705
706 2009-03-10  Justin Garcia  <justin.garcia@apple.com>
707
708         Reviewed by David Kilzer.
709
710         Get rid of revealCaret and use revealSelection instead.
711
712         * WebCore.base.exp:
713         * editing/SelectionController.cpp:
714         (WebCore::SelectionController::setSelection):
715         * page/Frame.cpp:
716         (WebCore::Frame::revealSelection):
717         * page/Frame.h:
718
719 2009-03-10  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
720
721         Reviewed by Geoff Garen.
722
723         Bug 23736: WebKit Crashes on http://g-conquest.fr/~server2
724         <https://bugs.webkit.org/show_bug.cgi?id=23736>
725         <rdar://problem/6560278>
726
727         Before replacing the document, FrameLoader::executeIfJavaScriptURL()
728         should call stopAllLoaders(), just like continueLoadAfterNavigationPolicy().
729
730         * loader/FrameLoader.cpp:
731         (WebCore::FrameLoader::executeIfJavaScriptURL):
732
733 2009-03-10  Darin Adler  <darin@apple.com>
734
735         Reviewed by Alexey Proskuryakov.
736
737         Bug 24494: crash when deleting at end of document and merging paragraphs
738         https://bugs.webkit.org/show_bug.cgi?id=24494
739         rdar://problem/6571537
740
741         Test: editing/deleting/merge-at-end-of-document.html
742
743         * dom/Range.cpp:
744         (WebCore::Range::compareBoundaryPoints): Split out assertion. It's better not to
745         use && in assertions since we'd like to know which condition is failing.
746
747         * editing/ApplyStyleCommand.cpp:
748         (WebCore::ApplyStyleCommand::applyInlineStyleToRange): Added a null check before
749         calling compareBoundaryPoints, since a 0 for the node is ambiguous and so the
750         function doesn't know which value to return.
751
752 2009-03-10  Dirk Schulze  <krit@webkit.org>
753
754         Reviewed by Eric Seidel. Math checked by Oliver Hunt.
755
756         Implement the Cairo version of the checkForSolidColor() method. This halfes the
757         time to draw on 1x1 px background images.
758         I added two new calls to Color for the pixel manipulation on cairo_surface's.
759         They are neede to premultiply/unpremultiply the colors of the surface.
760
761         [CAIRO] Introduce single-pixel image optimizations
762         https://bugs.webkit.org/show_bug.cgi?id=17284
763
764         * platform/graphics/Color.cpp:
765         (WebCore::colorFromPremultipliedARGB):
766         (WebCore::premultipliedARGBFromColor):
767         * platform/graphics/Color.h:
768         * platform/graphics/cairo/ImageBufferCairo.cpp:
769         (WebCore::ImageBuffer::getImageData):
770         (WebCore::ImageBuffer::putImageData):
771         * platform/graphics/cairo/ImageCairo.cpp:
772         (WebCore::BitmapImage::checkForSolidColor):
773
774 2009-03-06  Darin Fisher  <darin@chromium.org>
775
776         Reviewed by Sam Weinig.
777
778         https://bugs.webkit.org/show_bug.cgi?id=24437
779
780         Add support for registering noAccess URL schemes:
781         1-  Add FrameLoader::registerURLSchemeAsNoAccess, and have SecurityOrigin check
782         that list upon construction (similar to how isLocal is implemented).
783         2-  Make InspectorController call grantUniversalAccess on its Document's
784         SecurityOrigin at the time when windowScriptObjectAvailable is called.
785
786         This enables content such as the inspector to be loaded from a custom (non-file)
787         URL, which is how Chromium loads the inspector.  It also allows other URL schemes
788         to be treated like data: URLs, which Chromium utilizes for its various HTML-based
789         UI panels.
790
791         * inspector/InspectorController.cpp:
792         (WebCore::InspectorController::windowScriptObjectAvailable):
793         * loader/FrameLoader.cpp:
794         (WebCore::localSchemes):
795         (WebCore::noAccessSchemes):
796         (WebCore::FrameLoader::loadItem):
797         * loader/FrameLoader.h:
798         * page/SecurityOrigin.cpp:
799         (WebCore::SecurityOrigin::SecurityOrigin):
800         (WebCore::SecurityOrigin::isLocal):
801
802 2009-03-10  Xan Lopez  <xlopez@igalia.com>
803
804         Build fix, no review
805
806         * page/mac/AccessibilityObjectWrapper.mm:
807         (textMarkerForVisiblePosition):
808         (visiblePositionForTextMarker):
809
810 2009-03-10  Xan Lopez  <xlopez@igalia.com>
811
812         Reviewed by Darin Adler.
813
814         https://bugs.webkit.org/show_bug.cgi?id=24491
815         Rename posOffset to m_offset, get rid of accessor
816
817         As suggested in dom/Position.h, this patch gets rid of the
818         'offset()' accessor and renames posOffset to m_offset. I've used
819         m_offset instead of offset to follow the style guide lines, since
820         Position is still a class and not a structure. If the long term
821         plan is still to make it a structure it would be pretty easy to
822         just s/m_offset/offset/ globally when that is achieved.
823
824         * dom/Position.cpp:
825         (WebCore::Position::previous):
826         (WebCore::Position::next):
827         (WebCore::Position::atStart):
828         (WebCore::Position::atEnd):
829         (WebCore::Position::renderedOffset):
830         (WebCore::Position::isCandidate):
831         (WebCore::Position::inRenderedText):
832         (WebCore::Position::isRenderedCharacter):
833         (WebCore::Position::rendersInDifferentPosition):
834         (WebCore::Position::leadingWhitespacePosition):
835         (WebCore::Position::debugPosition):
836         (WebCore::Position::formatForDebugger):
837         * dom/Position.h:
838         (WebCore::Position::Position):
839         * dom/PositionIterator.h:
840         (WebCore::PositionIterator::PositionIterator):
841         * dom/Range.cpp:
842         * dom/RangeBoundaryPoint.h:
843         (WebCore::RangeBoundaryPoint::position):
844         (WebCore::RangeBoundaryPoint::set):
845         (WebCore::RangeBoundaryPoint::setOffset):
846         (WebCore::RangeBoundaryPoint::setToChild):
847         (WebCore::RangeBoundaryPoint::setToStart):
848         (WebCore::RangeBoundaryPoint::setToEnd):
849         (WebCore::RangeBoundaryPoint::childBeforeWillBeRemoved):
850         * editing/ApplyStyleCommand.cpp:
851         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
852         (WebCore::ApplyStyleCommand::applyInlineStyleToRange):
853         (WebCore::ApplyStyleCommand::removeInlineStyle):
854         (WebCore::ApplyStyleCommand::nodeFullySelected):
855         (WebCore::ApplyStyleCommand::nodeFullyUnselected):
856         (WebCore::ApplyStyleCommand::splitTextAtStartIfNeeded):
857         (WebCore::ApplyStyleCommand::splitTextAtEndIfNeeded):
858         (WebCore::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
859         (WebCore::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
860         (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
861         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
862         (WebCore::ApplyStyleCommand::joinChildTextNodes):
863         * editing/BreakBlockquoteCommand.cpp:
864         (WebCore::BreakBlockquoteCommand::doApply):
865         * editing/CompositeEditCommand.cpp:
866         (WebCore::CompositeEditCommand::insertNodeAt):
867         (WebCore::CompositeEditCommand::positionOutsideTabSpan):
868         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
869         (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
870         (WebCore::CompositeEditCommand::deleteInsignificantText):
871         (WebCore::CompositeEditCommand::removePlaceholderAt):
872         (WebCore::CompositeEditCommand::moveParagraphs):
873         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
874         * editing/DeleteSelectionCommand.cpp:
875         (WebCore::updatePositionForNodeRemoval):
876         (WebCore::updatePositionForTextRemoval):
877         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
878         (WebCore::DeleteSelectionCommand::fixupWhitespace):
879         * editing/Editor.cpp:
880         (WebCore::Editor::setComposition):
881         (WebCore::Editor::advanceToNextMisspelling):
882         (WebCore::Editor::getCompositionSelection):
883         * editing/InsertLineBreakCommand.cpp:
884         (WebCore::InsertLineBreakCommand::doApply):
885         * editing/InsertParagraphSeparatorCommand.cpp:
886         (WebCore::InsertParagraphSeparatorCommand::doApply):
887         * editing/InsertTextCommand.cpp:
888         (WebCore::InsertTextCommand::performTrivialReplace):
889         (WebCore::InsertTextCommand::input):
890         (WebCore::InsertTextCommand::insertTab):
891         * editing/MoveSelectionCommand.cpp:
892         (WebCore::MoveSelectionCommand::doApply):
893         * editing/ReplaceSelectionCommand.cpp:
894         (WebCore::ReplaceSelectionCommand::doApply):
895         * editing/SelectionController.cpp:
896         (WebCore::SelectionController::debugRenderer):
897         * editing/TextIterator.cpp:
898         (WebCore::TextIterator::rangeFromLocationAndLength):
899         * editing/TypingCommand.cpp:
900         (WebCore::TypingCommand::deleteKeyPressed):
901         (WebCore::TypingCommand::forwardDeleteKeyPressed):
902         * editing/VisiblePosition.cpp:
903         (WebCore::VisiblePosition::characterAfter):
904         (WebCore::VisiblePosition::debugPosition):
905         (WebCore::makeRange):
906         (WebCore::setStart):
907         (WebCore::setEnd):
908         * editing/VisibleSelection.cpp:
909         (WebCore::VisibleSelection::toNormalizedRange):
910         (WebCore::makeSearchRange):
911         (WebCore::VisibleSelection::debugPosition):
912         (WebCore::VisibleSelection::showTreeForThis):
913         * editing/htmlediting.cpp:
914         (WebCore::comparePositions):
915         (WebCore::rangeCompliantEquivalent):
916         (WebCore::isFirstPositionAfterTable):
917         (WebCore::isLastPositionBeforeTable):
918         * editing/visible_units.cpp:
919         (WebCore::previousBoundary):
920         (WebCore::nextBoundary):
921         (WebCore::startPositionForLine):
922         (WebCore::startOfLine):
923         (WebCore::endPositionForLine):
924         (WebCore::nextLinePosition):
925         (WebCore::startOfParagraph):
926         (WebCore::endOfParagraph):
927         * page/AccessibilityObject.cpp:
928         (WebCore::updateAXLineStartForVisiblePosition):
929         * page/AccessibilityRenderObject.cpp:
930         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
931         * page/DOMSelection.cpp:
932         (WebCore::DOMSelection::anchorOffset):
933         (WebCore::DOMSelection::baseOffset):
934         (WebCore::DOMSelection::focusOffset):
935         (WebCore::DOMSelection::extentOffset):
936         * page/EventHandler.cpp:
937         (WebCore::EventHandler::handleMousePressEventSingleClick):
938         * page/Frame.cpp:
939         (WebCore::Frame::selectionLayoutChanged):
940         * rendering/RenderTextControl.cpp:
941         (WebCore::RenderTextControl::indexForVisiblePosition):
942         * rendering/RenderTreeAsText.cpp:
943         (WebCore::writeSelection):
944
945 2009-03-10  Darin Adler  <darin@apple.com>
946
947         Reviewed by Dan Bernstein.
948
949         Bug 23564: REGRESSION (r39230-39286): crash loading page that changes <input> display type and then calls innerHTML
950         https://bugs.webkit.org/show_bug.cgi?id=23564
951         rdar://problem/6537238
952
953         Test: fast/dom/HTMLElement/innerHTML-selection-crash.html
954
955         * editing/markup.cpp: (WebCore::createMarkup): Added updateLayoutIgnorePendingStylesheets
956         call to the one of the two overloads of this function that wasn't calling it. This fixes
957         this crash and other possible crashes inside innerHTML.
958
959 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
960
961         Reviewed by Darin Adler.
962
963         https://bugs.webkit.org/show_bug.cgi?id=24285
964         Text resource loading checks for BOM twice
965
966         This removes TextDecoder class, since its only purpose was to check for BOM, which is
967         already done in TextResourceDecoder. Callers that use TextEncoding::decode() won't get
968         BOM checked, but I didn't find any cases where it would significantly change behavior.
969
970         * GNUmakefile.am:
971         * WebCore.pro:
972         * WebCore.scons:
973         * WebCore.vcproj/WebCore.vcproj:
974         * WebCore.xcodeproj/project.pbxproj:
975         * WebCoreSources.bkl:
976         Remove TextDecoder.{h,cpp}.
977
978         * platform/text/TextDecoder.cpp: Removed.
979         * platform/text/TextDecoder.h: Removed.
980
981         * loader/TextResourceDecoder.h: Instead of a TextDecoder object, keep TextEncoding and
982         TextCodec separately.
983
984         * loader/TextResourceDecoder.cpp:
985         (WebCore::TextResourceDecoder::TextResourceDecoder): Updated for m_encoding being a member.
986         (WebCore::TextResourceDecoder::setEncoding): Ditto.
987         (WebCore::TextResourceDecoder::checkForBOM): Removed a FIXME saying that a BOM could override
988         even a user-chosen encoding - this is how it already worked due to TextDecoder checking for
989         BOM again. Made this function return the detected BOM length.
990         (WebCore::TextResourceDecoder::decode): Skip the BOM if it was found at the beginning of
991         a text resource.
992         (WebCore::TextResourceDecoder::flush): Reset m_checkedForBOM, so that re-decoding the same
993         resource again (as frequently done by CachedResource subclasses) will skip the BOM correctly.
994
995         * platform/text/TextEncoding.cpp: (WebCore::TextEncoding::decode):
996         Use TextCodec directly without a TextDecoder wrapper. This means that this method no longer
997         checks for BOM, which was a counter-intuitive feature.
998
999         * loader/CachedScript.cpp:
1000         (WebCore::CachedScript::CachedScript):
1001         (WebCore::CachedScript::setEncoding):
1002         (WebCore::CachedScript::encoding):
1003         (WebCore::CachedScript::script):
1004         * loader/CachedScript.h:
1005         * loader/appcache/ManifestParser.cpp:
1006         (WebCore::parseManifest):
1007         Use TextResourceDecoder, as TextEncoding::decode() no longer checks for BOM.
1008         A side effect of this is that these resources will now be subject to encoding auto-detection.
1009
1010         * loader/CachedFont.cpp: (WebCore::CachedFont::ensureSVGFontData):
1011         * page/Page.cpp: (WebCore::Page::userStyleSheet):
1012         Be sure to flush TextResourceDecoder, pushing any remaining bytes out, and making the decoder
1013         re-usable (for repeated decoding of the same resource).
1014
1015         * platform/text/TextEncodingRegistry.h: Updated comments for newTextCodec().
1016
1017 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
1018
1019         Reviewed by Darin Adler.
1020
1021         https://bugs.webkit.org/show_bug.cgi?id=24488
1022         An assertion failure when updating an offline application cache after emptying caches
1023
1024         Emptying appcache cannot be performed automatically, so no test.
1025
1026         * loader/appcache/ApplicationCacheGroup.cpp:
1027         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Ensure that the cache is in disk
1028         storage, even if the application wasn't updated server side.
1029
1030 2009-03-10  Oliver Hunt  <oliver@apple.com>
1031
1032         Reviewed by Alexey Proskuryakov.
1033
1034         <rdar://problem/6425807> Implement WorkerUtils.importScripts()
1035         <https://bugs.webkit.org/show_bug.cgi?id=22721>
1036
1037         Implement importScripts, currently uses a series of synchronous loads
1038         to fetch the scripts, but this is simpler than a synchronous load of
1039         multiple loads in parallel.  In future we'll want to switch to parallel
1040         loading, but this will do for now.
1041         
1042         Test: http/tests/workers/worker-importScripts.html
1043
1044         * GNUmakefile.am:
1045         * WebCore.vcproj/WebCore.vcproj:
1046         * WebCore.xcodeproj/project.pbxproj:
1047         * bindings/js/JSWorkerContextCustom.cpp:
1048         (WebCore::JSWorkerContext::importScripts):
1049         * bindings/js/ScriptValue.h:
1050         (WebCore::ScriptValue::hasNoValue):
1051         * bindings/js/WorkerScriptController.cpp:
1052         (WebCore::WorkerScriptController::evaluate):
1053         (WebCore::WorkerScriptController::setException):
1054         * bindings/js/WorkerScriptController.h:
1055         * dom/Document.cpp:
1056         (WebCore::Document::scriptImported):
1057         * dom/Document.h:
1058         * dom/ScriptExecutionContext.h:
1059         * inspector/InspectorController.cpp:
1060         (WebCore::InspectorController::scriptImported):
1061         * inspector/InspectorController.h:
1062         * inspector/InspectorResource.cpp:
1063         (WebCore::InspectorResource::setScriptProperties):
1064         * inspector/InspectorResource.h:
1065         * workers/WorkerContext.cpp:
1066         (WebCore::WorkerContext::scriptImported):
1067         (WebCore::WorkerContext::importScripts):
1068         * workers/WorkerContext.h:
1069         * workers/WorkerContext.idl:
1070         * workers/WorkerImportScriptsClient.cpp: Added.
1071         (WebCore::WorkerImportScriptsClient::didReceiveResponse):
1072         (WebCore::WorkerImportScriptsClient::didReceiveData):
1073         (WebCore::WorkerImportScriptsClient::didFinishLoading):
1074         (WebCore::WorkerImportScriptsClient::didFail):
1075         (WebCore::WorkerImportScriptsClient::didFailRedirectCheck):
1076         (WebCore::WorkerImportScriptsClient::didReceiveAuthenticationCancellation):
1077         * workers/WorkerImportScriptsClient.h: Added.
1078         (WebCore::WorkerImportScriptsClient::WorkerImportScriptsClient):
1079         (WebCore::WorkerImportScriptsClient::script):
1080         (WebCore::WorkerImportScriptsClient::failed):
1081
1082 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
1083
1084         Reviewed by Darin Adler.
1085
1086         https://bugs.webkit.org/show_bug.cgi?id=24462
1087         Move cross-origin access control code out of XMLHttpRequest
1088
1089         Step 1: move preflight result cache and access control helper functions.
1090
1091         No change in behavior, so no test.
1092
1093         * GNUmakefile.am:
1094         * WebCore.pro:
1095         * WebCore.scons:
1096         * WebCore.vcproj/WebCore.vcproj:
1097         * WebCore.xcodeproj/project.pbxproj:
1098         * WebCoreSources.bkl:
1099         * loader/CrossOriginAccessControl.cpp: Added.
1100         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
1101         (WebCore::isSimpleCrossOriginAccessRequest):
1102         (WebCore::createAllowedCrossOriginResponseHeadersSet):
1103         (WebCore::isOnAccessControlResponseHeaderWhitelist):
1104         (WebCore::passesAccessControlCheck):
1105         * loader/CrossOriginAccessControl.h: Added.
1106         * loader/CrossOriginPreflightResultCache.cpp: Added.
1107         (WebCore::parseAccessControlMaxAge):
1108         (WebCore::addToAccessControlAllowList):
1109         (WebCore::parseAccessControlAllowList):
1110         (WebCore::CrossOriginPreflightResultCacheItem::parse):
1111         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod):
1112         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
1113         (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest):
1114         (WebCore::CrossOriginPreflightResultCache::shared):
1115         (WebCore::CrossOriginPreflightResultCache::appendEntry):
1116         (WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
1117         * loader/CrossOriginPreflightResultCache.h: Added.
1118         (WebCore::CrossOriginPreflightResultCacheItem::CrossOriginPreflightResultCacheItem):
1119         (WebCore::CrossOriginPreflightResultCache::CrossOriginPreflightResultCache):
1120         * xml/XMLHttpRequest.cpp:
1121         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData):
1122         (WebCore::XMLHttpRequest::createRequest):
1123         (WebCore::XMLHttpRequest::makeCrossOriginAccessRequest):
1124         (WebCore::XMLHttpRequest::makeSimpleCrossOriginAccessRequest):
1125         (WebCore::XMLHttpRequest::makeCrossOriginAccessRequestWithPreflight):
1126         (WebCore::XMLHttpRequest::didReceiveResponse):
1127         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
1128         * xml/XMLHttpRequest.h:
1129
1130 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
1131
1132         Reviewed by Darin Adler.
1133
1134         https://bugs.webkit.org/show_bug.cgi?id=19797
1135         Bring the list of forbidden headers in sync with XMLHttpRequest spec draft
1136
1137         Added new checks to http/tests/xmlhttprequest/set-dangerous-headers.html.
1138
1139         * xml/XMLHttpRequest.cpp:
1140         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData): Added all headers from
1141         XMLHttpRequest 2 draft.
1142
1143 2009-03-10  Dan Bernstein  <mitz@apple.com>
1144
1145         Reviewed by Adele Peterson.
1146
1147         - fix https://bugs.webkit.org/show_bug.cgi?id=23975
1148           <rdar://problem/6593610> REGRESSION: Scrollbar arrow not repainted
1149
1150         * rendering/RenderLayer.cpp:
1151         (WebCore::RenderLayer::invalidateScrollbarRect): Corrected the vertical
1152         scrollbar rect calculation.
1153
1154 2009-03-09  Simon Fraser  <simon.fraser@apple.com>
1155
1156         Reviewed by Dan Bernstein, Oliver Hunt
1157
1158         https://bugs.webkit.org/show_bug.cgi?id=24475
1159         
1160         When repainting replaced elements, need to union the selection
1161         and overflow rects because either may extend outside the other.
1162         
1163         Test: fast/repaint/transform-replaced-shadows.html
1164
1165         * rendering/RenderReplaced.cpp:
1166         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
1167
1168 2009-03-09  Stephanie Lewis  <slewis@apple.com>
1169
1170         Fix build.
1171
1172         * editing/Editor.cpp:
1173         (WebCore::Editor::advanceToNextMisspelling):
1174         (WebCore::markAllMisspellingsAndBadGrammarInRanges):
1175
1176 2009-03-09  Kim Christensen  <kimworking@gmail.com>
1177
1178         Reviewed by Darin Fisher.
1179
1180         https://bugs.webkit.org/show_bug.cgi?id=24276
1181         Dropdown / select boxes do not consider the windows task bar in Chromium.
1182
1183         * platform/chromium/PopupMenuChromium.cpp:
1184         (WebCore::PopupContainer::showPopup):
1185
1186 2009-03-09  Dan Bernstein  <mitz@apple.com>
1187
1188         Reviewed by Adele Peterson and Dave Hyatt.
1189
1190         - fix <rdar://problem/6654344> REGRESSION (r41041): Zillow.com has
1191           misaligned edit fields
1192
1193         Test: fast/forms/legend-display-none.html
1194
1195         * css/CSSStyleSelector.cpp:
1196         (WebCore::CSSStyleSelector::adjustRenderStyle): Change the display
1197         property of legend elements to 'block' unless it is 'none'.
1198         * css/html4.css: Do not force the display property of legend elements to
1199         'block' using CSS, because that prevents style rules from setting it to
1200         'none'.
1201
1202 2009-03-09  Alpha Lam  <hclam@chromium.org>
1203
1204         Reviewed by Dave Hyatt.
1205
1206         https://bugs.webkit.org/show_bug.cgi?id=23024
1207
1208         Fix an incorrect criteria in the if statement that leaves references to
1209         deleted floating objects in RenderBlock.
1210
1211         Test: fast/block/float/crash-on-absolute-positioning.html
1212
1213         * rendering/RenderBlock.cpp:
1214         (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
1215
1216 2009-03-09  Mike Belshe  <mike@belshe.com>
1217
1218         Reviewed by Eric Seidel.
1219
1220         Unify JSC/V8 idl file.
1221         https://bugs.webkit.org/show_bug.cgi?id=24424
1222
1223         * page/Location.idl:
1224
1225 2009-03-09  Mike Belshe  <mike@belshe.com>
1226
1227         Reviewed by Eric Seidel.
1228
1229         Unify JSC/V8 for History.idl.
1230
1231         * page/History.idl:
1232
1233 2009-03-09  Mike Belshe  <mike@belshe.com>
1234
1235         Reviewed by Eric Seidel.
1236
1237         Unify JSC/V8 implementations of DOMWindow.idl.
1238
1239         * page/DOMWindow.idl:
1240
1241 2009-03-09  Simon Fraser  <simon.fraser@apple.com>
1242
1243         Reviewed by Dave Hyatt
1244
1245         https://bugs.webkit.org/show_bug.cgi?id=24163
1246         
1247         Implement mapping of FloatQuads through 3D transforms.
1248         
1249         Removed the redundant localToContainerQuad() methods, which can now 
1250         shared code with the old mapLocalToAbsolutePoint(), which was
1251         renamed to mapLocalToContainer(). This can now convert a point,
1252         and optionally a FloatQuad, which are carried along in the TransformState.
1253         
1254         Optimized TransformState to reduce to simple FloatPoint.move()
1255         if there are no transforms, and to heap-allocate a transform only if
1256         necessary to accumulate transforms (when using preserve-3d).
1257         
1258         Tested by 3d point mapping tests, and the inspector highlight (which now shows
1259         the correct quads for 3d-transformed elements).
1260
1261         * platform/graphics/transforms/TransformationMatrix.cpp:
1262         (WebCore::TransformationMatrix::projectQuad):
1263         (WebCore::TransformationMatrix::translateRight):
1264         (WebCore::TransformationMatrix::translateRight3d):
1265         * platform/graphics/transforms/TransformationMatrix.h:
1266         * rendering/RenderBox.cpp:
1267         (WebCore::RenderBox::mapLocalToContainer):
1268         (WebCore::RenderBox::mapAbsoluteToLocalPoint):
1269         * rendering/RenderBox.h:
1270         * rendering/RenderObject.cpp:
1271         (WebCore::RenderObject::localToAbsolute):
1272         (WebCore::RenderObject::absoluteToLocal):
1273         (WebCore::RenderObject::mapLocalToContainer):
1274         (WebCore::RenderObject::localToContainerQuad):
1275         * rendering/RenderObject.h:
1276         * rendering/RenderTableCell.cpp:
1277         (WebCore::RenderTableCell::mapLocalToContainer):
1278         * rendering/RenderTableCell.h:
1279         * rendering/RenderView.cpp:
1280         (WebCore::RenderView::mapLocalToContainer):
1281         * rendering/RenderView.h:
1282         * rendering/TransformState.cpp:
1283         (WebCore::TransformState::move):
1284         (WebCore::TransformState::applyTransform):
1285         (WebCore::TransformState::flatten):
1286         (WebCore::TransformState::mappedPoint):
1287         (WebCore::TransformState::mappedQuad):
1288         (WebCore::TransformState::flattenWithTransform):
1289         (WebCore::HitTestingTransformState::mappedQuad):
1290         * rendering/TransformState.h:
1291         (WebCore::TransformState::TransformState):
1292         (WebCore::TransformState::move):
1293         (WebCore::TransformState::lastPlanarPoint):
1294         (WebCore::TransformState::lastPlanarQuad):
1295         * rendering/style/RenderStyle.h:
1296         (WebCore::InheritedFlags::preserves3D):
1297
1298 2009-03-09  Simon Fraser  <simon.fraser@apple.com>
1299
1300         Reviewed by Dave Hyatt
1301
1302         https://bugs.webkit.org/show_bug.cgi?id=24433
1303         
1304         During hit testing with transforms, if a layer has backface-visibility: hidden,
1305         we need to check for it whether or not the layer has a transform, because it
1306         might be an ancestor that is transformed.
1307
1308         Test: transforms/3d/hit-testing/backface-no-transform-hit-test.html
1309
1310         * rendering/RenderLayer.cpp:
1311         (WebCore::RenderLayer::hitTestLayer):
1312
1313 2009-03-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1314
1315         Reviewed by George Staikos.
1316
1317         https://bugs.webkit.org/show_bug.cgi?id=24353
1318         Allow to overrule default build options for Qt build.
1319
1320         * WebCore.pro: Allow to overrule ENABLE_VIDEO and ENABLE_NETSCAPE_PLUGIN_API
1321
1322 2009-03-09  Adam Treat  <adam.treat@torchmobile.com>
1323
1324         Reviewed by George Staikos.
1325
1326         https://bugs.webkit.org/show_bug.cgi?id=24463
1327         WebCore::qstring is detaching and copying twice for every single
1328         WebCore::TextRun that is processed and drawn.  This elevates this method
1329         to one of the top-ten most expensive methods in all of QtWebKit according
1330         to profiling.  This changes the method so that QString only detaches
1331         when absolutely necessary.
1332
1333         * platform/graphics/qt/FontQt.cpp:
1334         (WebCore::qstring):
1335         (WebCore::fixSpacing):
1336         (WebCore::Font::drawComplexText):
1337         (WebCore::Font::floatWidthForComplexText):
1338         (WebCore::Font::offsetForPositionForComplexText):
1339         (WebCore::Font::selectionRectForComplexText):
1340
1341 2009-03-08  Mark Rowe  <mrowe@apple.com>
1342
1343         Reviewed by Oliver Hunt.
1344
1345         Split ScrollAlignment and ScrollBehavior out of RenderLayer.h so that
1346         Frame.h no longer needs to include it.  This cuts the size of the symbols
1347         for a debug build by around 3%.
1348
1349         * dom/Element.cpp:
1350         (WebCore::Element::scrollIntoView):
1351         (WebCore::Element::scrollIntoViewIfNeeded):
1352         * editing/Editor.cpp:
1353         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1354         (WebCore::Editor::revealSelectionAfterEditingOperation):
1355         * editing/SelectionController.cpp:
1356         (WebCore::SelectionController::setSelection):
1357         * loader/FrameLoader.cpp:
1358         (WebCore::FrameLoader::gotoAnchor):
1359         * page/ContextMenuController.cpp:
1360         (WebCore::ContextMenuController::contextMenuItemSelected):
1361         * page/Frame.cpp:
1362         (WebCore::Frame::revealSelection):
1363         (WebCore::Frame::revealCaret):
1364         * page/Frame.h:
1365         * rendering/RenderLayer.cpp:
1366         (WebCore::RenderLayer::getRectToExpose):
1367         (WebCore::RenderLayer::autoscroll):
1368         * rendering/RenderLayer.h:
1369         * rendering/ScrollBehavior.cpp: Added.
1370         (WebCore::):
1371         * rendering/ScrollBehavior.h: Added.
1372         (WebCore::):
1373         (WebCore::ScrollAlignment::getVisibleBehavior):
1374         (WebCore::ScrollAlignment::getPartialBehavior):
1375         (WebCore::ScrollAlignment::getHiddenBehavior):
1376
1377         Add the new files to the build systems:
1378         * GNUmakefile.am:
1379         * WebCore.base.exp:
1380         * WebCore.pro:
1381         * WebCore.scons:
1382         * WebCore.vcproj/WebCore.vcproj:
1383         * WebCore.xcodeproj/project.pbxproj:
1384         * WebCoreSources.bkl:
1385
1386         Add includes that were previously pulled in by way of RenderLayer.h from Frame.h:
1387         * dom/Clipboard.cpp:
1388         * editing/EditorCommand.cpp:
1389         * editing/InsertLineBreakCommand.cpp:
1390         * editing/TypingCommand.cpp:
1391         * html/HTMLFormControlElement.cpp:
1392         * loader/archive/cf/LegacyWebArchive.cpp:
1393         * loader/icon/IconLoader.cpp:
1394         * page/animation/AnimationController.cpp:
1395         * rendering/RenderSlider.cpp:
1396         * rendering/RenderTextControl.cpp:
1397
1398
1399 2009-03-08  Mark Rowe  <mrowe@apple.com>
1400
1401         Reviewed Dan Bernstein.
1402
1403         Push the include of Frame.h out of RenderView.h and down to those files
1404         that need it.  This cuts the size of symbols for RenderFoo object files
1405         by around 15% in a debug build.
1406
1407         * bindings/objc/DOM.mm:
1408         * rendering/RenderFileUploadControl.cpp:
1409         * rendering/RenderInline.cpp:
1410         * rendering/RenderObject.cpp:
1411         * rendering/RenderReplaced.cpp:
1412         * rendering/RenderText.cpp:
1413         * rendering/RenderView.cpp:
1414         (WebCore::RenderView::zoomFactor):
1415         * rendering/RenderView.h:
1416
1417 2009-03-08  Mark Rowe  <mrowe@apple.com>
1418
1419         Rubber-stamped by Dan Bernstein.
1420
1421         Remove some unnecessary or redundant includes from files related to the JS bindings.
1422         This cuts the size of the symbols for a debug build by around 3%.
1423
1424         * bindings/js/JSCustomPositionCallback.cpp:
1425         * bindings/js/JSCustomPositionErrorCallback.cpp:
1426         * bindings/js/JSCustomSQLStatementCallback.cpp:
1427         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1428         * bindings/js/JSCustomSQLTransactionCallback.cpp:
1429         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
1430         * bindings/js/JSCustomVoidCallback.cpp:
1431         * bindings/js/JSCustomXPathNSResolver.cpp:
1432         * bindings/js/JSDocumentCustom.cpp:
1433         * bindings/js/JSPluginElementFunctions.cpp:
1434         * bindings/js/JSSVGPODTypeWrapper.h:
1435
1436 2009-03-08  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
1437
1438         Reviewed by Oliver Hunt.
1439
1440         Remove the unused methods previousHistoryItem(), setPreviousHistoryItem()
1441         and provisionalHistoryItem() from FrameLoader.
1442
1443         * WebCore.base.exp:
1444         * WebCore.order:
1445         * loader/FrameLoader.cpp:
1446         (WebCore::FrameLoader::frameLoadCompleted):
1447         (WebCore::FrameLoader::loadItem):
1448         * loader/FrameLoader.h:
1449
1450 2009-03-08  Gustavo Noronha Silva  <gns@gnome.org>
1451
1452         Reviewed by Holger Freyther.
1453
1454         Implement proper logging for the GTK+ port, inspired by the one in
1455         Qt. We use the WEBKIT_DEBUG environment variable which was already
1456         being used to decide whether to setup a logger for soup or not.
1457
1458         * platform/gtk/LoggingGtk.cpp:
1459         (WebCore::getChannelFromName):
1460         (WebCore::InitializeLoggingChannelsIfNecessary):
1461         * platform/network/soup/ResourceHandleSoup.cpp:
1462         (WebCore::ensureSessionIsInitialized):
1463
1464 2009-03-07  Dan Bernstein  <mitz@apple.com>
1465
1466         Reviewed by Mark Rowe.
1467
1468         - WebCore part of removing build-time and run-time support for legacy
1469           versions of CFNetwork and Core Graphics
1470
1471         * platform/graphics/win/FontCGWin.cpp:
1472         (WebCore::Font::drawGlyphs):
1473         * platform/graphics/win/FontCustomPlatformData.cpp:
1474         (WebCore::FontCustomPlatformData::fontPlatformData):
1475         * platform/graphics/win/FontPlatformDataCGWin.cpp:
1476         (WebCore::FontPlatformData::platformDataInit):
1477         * platform/network/cf/FormDataStreamCFNet.cpp:
1478         (WebCore::setHTTPBody):
1479         (WebCore::httpBodyFromRequest):
1480         * platform/network/cf/ResourceHandleCFNet.cpp:
1481         (WebCore::didSendBodyData):
1482         (WebCore::shouldUseCredentialStorageCallback):
1483         (WebCore::ResourceHandle::start):
1484         * platform/network/win/CookieJarCFNetWin.cpp:
1485         (WebCore::filterCookies):
1486
1487 2009-03-07  Adele Peterson  <adele@apple.com>
1488
1489         Reviewed by Dan Bernstein.
1490
1491         Fix for https://bugs.webkit.org/show_bug.cgi?id=24444
1492         No multiple JS property for <input type="file" multiple />
1493
1494         * html/HTMLInputElement.cpp:
1495         (WebCore::HTMLInputElement::multiple):
1496         (WebCore::HTMLInputElement::setMultiple):
1497         * html/HTMLInputElement.h:
1498         * html/HTMLInputElement.idl:
1499
1500 2009-03-07  Xan Lopez  <xan@gnome.org>
1501
1502         Reviewed by Holger Freyther.
1503
1504         https://bugs.webkit.org/show_bug.cgi?id=24358
1505         [GTK] Scrollbars not clipped correctly
1506
1507         ScrollView scrollbars in subframes are *not* native, so take that
1508         into account again.
1509
1510         * platform/gtk/ScrollbarGtk.cpp:
1511         (ScrollbarGtk::getLocationInParentWindow):
1512         (ScrollbarGtk::frameRectsChanged):
1513         (ScrollbarGtk::paint):
1514         * platform/gtk/ScrollbarGtk.h:
1515
1516 2009-03-06  Peter Kasting  <pkasting@google.com>
1517
1518         Reviewed by Darin Fisher.
1519
1520         https://bugs.webkit.org/show_bug.cgi?id=24405
1521         Horizontal scrolling on Windows was reversed from Mac (and intuition).
1522
1523         * platform/gtk/WheelEventGtk.cpp:
1524         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1525         * platform/win/WheelEventWin.cpp:
1526         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1527
1528 2009-03-06  Peter Kasting  <pkasting@google.com>
1529
1530         Reviewed by Sam Weinig.
1531
1532         Convert some C-style casts to static_cast<>()s.
1533
1534         * platform/gtk/WheelEventGtk.cpp:
1535         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1536         * platform/mac/WheelEventMac.mm:
1537         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1538         * platform/win/WheelEventWin.cpp:
1539         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1540         * platform/wx/MouseWheelEventWx.cpp:
1541         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1542
1543 2009-03-06  Adele Peterson  <adele@apple.com>
1544
1545         Reviewed by Oliver Hunt.
1546
1547         Fix for <rdar://problem/6607524> REGRESSION (Safari 3-4): I can't tab back to the URL field in an empty window (key loop is broken)
1548
1549         I haven't been able to make a test for this since the problem is not reproducible within an empty iframe.
1550
1551         * page/EventHandler.cpp: (WebCore::eventTargetNodeForDocument): We used to ensure that every html document had a body element.
1552           That is no longer true, so we should return the document element for a truly empty document.
1553
1554 2009-03-06  Jay Campan  <jcampan@google.com>
1555
1556         Reviewed by Darin Fisher.
1557
1558         https://bugs.webkit.org/show_bug.cgi?id=24306
1559
1560         Adding a flag to ResourceRequestBase to indicate whether or not upload
1561         progress notifications are needed for a resource. This is useful to
1562         avoid sending these notifications when there are no consumers
1563         (especially in the Chromium case where IPC is involved). 
1564
1565         * platform/network/ResourceRequestBase.h:
1566         (WebCore::ResourceRequestBase::reportUploadProgress):
1567         (WebCore::ResourceRequestBase::setReportUploadProgress):
1568         (WebCore::ResourceRequestBase::ResourceRequestBase):
1569         * xml/XMLHttpRequest.cpp:
1570         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
1571
1572 2009-03-06  Dmitry Titov  <dimich@chromium.org>
1573
1574         Reviewed by Alexey Proskuryakov.
1575
1576         https://bugs.webkit.org/show_bug.cgi?id=24150
1577         Add virtual ScriptExecutionContext::encoding()
1578
1579         Test: http/tests/workers/text-encoding.html
1580
1581         * dom/Document.cpp:
1582         (WebCore::Document::encoding):
1583         * dom/Document.h:
1584         (WebCore::Document::inputEncoding):
1585         (WebCore::Document::charset):
1586         (WebCore::Document::characterSet):
1587         Add new virtual method and route DOM synonym functions on Document through it.
1588
1589         * dom/ScriptExecutionContext.h:
1590         * workers/Worker.cpp:
1591         (WebCore::Worker::Worker):
1592         (WebCore::Worker::notifyFinished):
1593         * workers/WorkerContext.cpp:
1594         (WebCore::WorkerContext::WorkerContext):
1595         (WebCore::WorkerContext::encoding):
1596         (WebCore::WorkerContext::completeURL): Added comment on why this is different from Document::completeURL
1597         * workers/WorkerContext.h:
1598         (WebCore::WorkerContext::create):
1599         * workers/WorkerContextProxy.h:
1600         * workers/WorkerMessagingProxy.cpp:
1601         (WebCore::WorkerMessagingProxy::startWorkerContext):
1602         * workers/WorkerMessagingProxy.h:
1603         * workers/WorkerThread.cpp:
1604         (WebCore::WorkerThreadStartupData::create):
1605         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
1606         (WebCore::WorkerThread::create):
1607         (WebCore::WorkerThread::WorkerThread):
1608         (WebCore::WorkerThread::workerThread):
1609         * workers/WorkerThread.h:
1610         All of the above route the 'encoding' parameter of parent context to the new
1611         instance of WorkerContext - from Worker::notifyFinished() via WorkerMessagingProxy
1612         through WorkerThread through WorkerThreadStartupData and into constructor of WorkerContext.
1613
1614 2009-03-06  Peter Kasting  <pkasting@google.com>
1615
1616         Build bustage fix.
1617
1618         * dom/Node.cpp:
1619         (WebCore::Node::dispatchWheelEvent):
1620
1621 2009-03-06  Eric Carlson  <eric.carlson@apple.com>
1622
1623         Reviewed by Antti Koivisto.
1624
1625         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1626         (WebCore::MediaPlayerPrivate::createQTMovieView):  Delay callback while setting up movieview.
1627
1628 2009-03-06  Douglas R. Davidson  <ddavidso@apple.com>
1629
1630         Reviewed by Justin Garcia.
1631         
1632         https://bugs.webkit.org/show_bug.cgi?id=24108
1633
1634         Update spelling and grammar checking to use the new combined text 
1635         checking (with automatic language identification) on Snow Leopard. 
1636         Tested manually in Mail and Safari; automated tests to come later. 
1637         
1638         * editing/Editor.cpp:
1639         (WebCore::findFirstMisspellingOrBadGrammarInRange):
1640         (WebCore::Editor::advanceToNextMisspelling):
1641         (WebCore::guessesForMisspelledOrUngrammaticalRange):
1642         (WebCore::Editor::guessesForMisspelledOrUngrammaticalSelection):
1643         (WebCore::Editor::markMisspellingsAfterTypingToPosition):
1644         (WebCore::markAllMisspellingsAndBadGrammarInRanges):
1645         (WebCore::Editor::markMisspellingsAndBadGrammar):
1646         * editing/Editor.h:
1647         * loader/EmptyClients.h:
1648         (WebCore::EmptyEditorClient::checkSpellingAndGrammarOfParagraph):
1649         * page/EditorClient.h:
1650         * page/Frame.cpp:
1651         (WebCore::Frame::respondToChangedSelection):
1652         * platform/ContextMenu.cpp:
1653         (WebCore::ContextMenu::populate):
1654
1655 2009-03-06  Peter Kasting  <pkasting@google.com>
1656
1657         Reviewed by Darin Fisher.
1658
1659         https://bugs.webkit.org/show_bug.cgi?id=24407
1660         Windows scroll amount was too small, and wheel scroll distance
1661         conversion code was overly complex.
1662
1663         * page/EventHandler.cpp:
1664         (WebCore::scrollAndAcceptEvent):
1665         * platform/PlatformWheelEvent.h:
1666         (WebCore::):
1667         * platform/ScrollView.cpp:
1668         (WebCore::ScrollView::wheelEvent):
1669         * platform/Scrollbar.h:
1670         * platform/gtk/WheelEventGtk.cpp:
1671         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1672         * platform/mac/WheelEventMac.mm:
1673         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1674         * platform/qt/WheelEventQt.cpp:
1675         * platform/win/WheelEventWin.cpp:
1676         (WebCore::horizontalScrollChars):
1677         (WebCore::verticalScrollLines):
1678         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1679         * platform/wx/MouseWheelEventWx.cpp:
1680         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1681
1682 2009-03-06  Dimitri Glazkov  <dglazkov@chromium.org>
1683
1684         Reviewed by Adam Roben.
1685
1686         Generate valid bindings with HTML5 database support disabled. 
1687
1688         * inspector/InspectorController.idl: Added feature guard around 
1689         databaseTableNames definition.
1690
1691 2009-03-04  Xan Lopez  <xan@gnome.org>
1692
1693         Reviewed by Holger Freyther.
1694
1695         https://bugs.webkit.org/show_bug.cgi?id=24358
1696         [GTK] Scrollbars not clipped correctly
1697
1698         Do not take into account the case of being a ScrollView scrollbar,
1699         since those are native in our case.
1700
1701         * platform/gtk/ScrollbarGtk.cpp:
1702         (ScrollbarGtk::frameRectsChanged):
1703
1704 2009-03-04  Xan Lopez  <xan@gnome.org>
1705
1706         Reviewed by Holger Freyther.
1707
1708         https://bugs.webkit.org/show_bug.cgi?id=24358
1709         [GTK] Scrollbars not clipped correctly
1710
1711         Move Widget::paint to ScrollbarGtk::paint, since it's scrollbar
1712         specific and it's our only Widget anyway.
1713
1714         * platform/gtk/ScrollbarGtk.cpp:
1715         (ScrollbarGtk::paint):
1716         * platform/gtk/ScrollbarGtk.h:
1717         * platform/gtk/WidgetGtk.cpp:
1718
1719 2009-03-04  Xan Lopez  <xan@gnome.org>
1720
1721         Reviewed by Holger Freyther.
1722
1723         https://bugs.webkit.org/show_bug.cgi?id=24358
1724         [GTK] Scrollbars not clipped correctly
1725
1726         Use correct clip rectangle and apply coordinate translation needed
1727         for non-ScrollView scrollbars.
1728
1729         We were ignoring the clip rectangle passed as parameter, which is
1730         wrong in the case of non coalesced expose events. This, in turn,
1731         uncovers the fact that we were not applying coordinate translation
1732         to our position.
1733
1734         * platform/gtk/WidgetGtk.cpp:
1735         (WebCore::Widget::paint):
1736
1737 2009-03-06  Eric Carlson  <eric.carlson@apple.com>
1738
1739         Build fix, no review
1740
1741         * platform/graphics/chromium/MediaPlayerPrivateChromium.h: fix setSize declaration
1742
1743 2009-03-06  Eric Carlson  <eric.carlson@apple.com>
1744
1745         Reviewed by Simon Fraser.
1746
1747         https://bugs.webkit.org/show_bug.cgi?id=22790
1748         Bug 22790: [Transforms] MediaPlayer::setRect() makes no sense with transforms
1749         Replace media engine setRect with setSize since they don't use about the 
1750         position anyway.
1751
1752         * platform/graphics/MediaPlayer.cpp:
1753         (WebCore::NullMediaPlayerPrivate::setSize): Changed from setRect.
1754         (WebCore::MediaPlayer::setSize): Ditto.
1755         * platform/graphics/MediaPlayer.h:
1756         (WebCore::MediaPlayer::size): Changed from rect().
1757
1758         * platform/graphics/MediaPlayerPrivate.h: Changed setRect to setSize.
1759
1760         * platform/graphics/chromium/MediaPlayerPrivateChromium.h: Ditto.
1761
1762         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: 
1763         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Initialize m_size instead of m_rect
1764         (WebCore::MediaPlayerPrivate::setSize): Changed from setRect
1765         (WebCore::MediaPlayerPrivate::paint): update comment
1766         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h: m_rect -> m_size.
1767
1768         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:  m_rect
1769         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1770         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Initialize m_rect.
1771         (WebCore::MediaPlayerPrivate::createQTMovieView): setRect-> setSize.
1772         (WebCore::MediaPlayerPrivate::setSize): Changed from setRect
1773         (WebCore::MediaPlayerPrivate::paint): Call view:setFrame: when in a media document so 
1774         the movie is drawn in the correct location.
1775
1776         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
1777         (WebCore::MediaPlayerPrivate::setSize):  Changed from setRect
1778         * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
1779
1780         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
1781         (WebCore::MediaPlayerPrivate::setSize):  Changed from setRect
1782         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
1783
1784         * rendering/RenderVideo.cpp:
1785         (WebCore::RenderVideo::updatePlayer): Call setSize instead of setRect.
1786
1787 2009-03-06  Darin Adler  <darin@apple.com>
1788
1789         Reviewed by Darin Fisher.
1790
1791         Bug 24422: REGRESSION: null-URL crash in FrameLoader setting location.hash on new window
1792         https://bugs.webkit.org/show_bug.cgi?id=24422
1793         rdar://problem/6402208
1794
1795         Test: fast/dom/location-new-window-no-crash.html
1796
1797         The issue here is empty (or null) URLs. I picked the "schedule navigation" bottleneck
1798         to add some checks for empty URLs. We could also put the empty URL checks at some
1799         other bottleneck level and add more assertions over time. I tried adding a few more
1800         assertions to functions like loadURL and hit them while running the regression tests,
1801         so it's probably going to be a bit tricky to clean this up throughout the loader.
1802
1803         * loader/FrameLoader.cpp:
1804         (WebCore::ScheduledRedirection::ScheduledRedirection): Explicitly marked this struct
1805         immutable by making all its members const. Added assertions about the arguments,
1806         including that the URL is not empty. Initialized one uninitialized member in one of
1807         the constructors.
1808         (WebCore::FrameLoader::scheduleHTTPRedirection): Added an early exit to make this
1809         a no-op if passed an empty URL.
1810         (WebCore::FrameLoader::scheduleLocationChange): Ditto.
1811         (WebCore::FrameLoader::scheduleRefresh): Ditto.
1812
1813 2009-03-06  Gustavo Noronha Silva  <gns@gnome.org>
1814
1815         Reviewed by Holger Freyther.
1816
1817         https://bugs.webkit.org/show_bug.cgi?id=24423
1818         Use new soup_message_body_set_accumulate API in soup backend
1819
1820         Disable accumulating chunks for request_body on file uploads,
1821         using the new soup API.
1822
1823         * platform/network/soup/ResourceHandleSoup.cpp:
1824         (WebCore::ResourceHandle::startHttp):
1825
1826 2009-03-06  Gustavo Noronha Silva  <gns@gnome.org>
1827
1828         Reviewed by Holger Freyther.
1829
1830         Replace use of deprecated SOUP_MESSAGE_OVERWRITE_CHUNKS flag with
1831         the new soup_message_body_set_accumulate API in soup.
1832
1833         * platform/network/soup/ResourceHandleSoup.cpp:
1834         (WebCore::gotHeadersCallback):
1835         (WebCore::ResourceHandle::startHttp):
1836
1837 2009-03-06  Gustavo Noronha Silva  <gns@gnome.org>
1838
1839         Reviewed by Holger Freyther.
1840
1841         https://bugs.webkit.org/show_bug.cgi?id=24051
1842         Soup backend needs content sniffing capabilities
1843
1844         Perform content sniffing when using soup, so that we have a chance
1845         of figuring out the Content-Type of the file if it's not sent by
1846         the server.
1847
1848         * platform/network/ResourceHandleInternal.h:
1849         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1850         * platform/network/soup/ResourceHandleSoup.cpp:
1851         (WebCore::gotHeadersCallback):
1852         (WebCore::gotChunkCallback):
1853
1854 2009-03-06  Hironori Bono  <hbono@chromium.org>
1855
1856         Reviewed by Alexey Proskuryakov.
1857
1858         https://bugs.webkit.org/show_bug.cgi?id=24342
1859         Cannot insert a Thai character after a Thai prepend character when using ICU 4.0
1860
1861         This change creates a new break iterator "cursorMovementIterator" for
1862         moving cursors and use it when moving an input cursor.
1863         In "TextBreakIteratorICU.cpp", this break iterator uses custom ruleset
1864         based on the one of ICU 3.8.
1865         On the other hand, in "TextBreakIteratorQt.cpp", this break iterator
1866         just calls the characterBreakIterator() function.
1867
1868         Test: editing/inserting/insert-thai-characters-001.html
1869
1870         * platform/text/TextBreakIterator.h: Added a new function cursorMovementIterator().
1871         * platform/text/TextBreakIteratorICU.cpp: Implemented the cursorMovementIterator() function for ICU.
1872         (WebCore::setUpIteratorWithRules): Ditto.
1873         (WebCore::cursorMovementIterator): Ditto.
1874         * platform/text/qt/TextBreakIteratorQt.cpp: Implemented the cursorMovementIterator() function for Qt.
1875         (WebCore::cursorMovementIterator): Ditto.
1876         * rendering/RenderText.cpp: Call the cursorMovementIterator() function when moving an input cursor.
1877         (WebCore::RenderText::previousOffset): Ditto.
1878         (WebCore::RenderText::nextOffset): Ditto.
1879
1880 2009-03-05  Alexey Proskuryakov  <ap@webkit.org>
1881
1882         Reviewed by Oliver Hunt.
1883
1884         <rdar://problem/6621701> Safari 4 Beta Breaks XMLHttpRequest Response Text With Special
1885         Characters (a compatibility issue with widgets).
1886
1887         Test: http/tests/xmlhttprequest/broken-xml-encoding.html
1888
1889         Revert part of an Acid 3 fix - now we are no longer strict when decoding XMLHttpRequest XML
1890         responses.
1891
1892         * loader/TextResourceDecoder.cpp:
1893         (WebCore::TextResourceDecoder::TextResourceDecoder):
1894         (WebCore::TextResourceDecoder::decode):
1895         (WebCore::TextResourceDecoder::flush):
1896         * loader/TextResourceDecoder.h:
1897         (WebCore::TextResourceDecoder::useLenientXMLDecoding):
1898         Don't stop on XML decoding errors if useLenientXMLDecoding() was called.
1899
1900         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData): Don't stop on XML
1901         decoding errors. This behavior is now limited to other kinds of XML content.
1902
1903 2009-03-05  Simone Fiorentino  <simone.fiorentino@consulenti.fastweb.it>
1904
1905         Bug 24382: request to add SH4 platform
1906
1907         <https://bugs.webkit.org/show_bug.cgi?id=24382>
1908
1909         Reviewed by David Kilzer.
1910
1911         * platform/text/AtomicString.cpp:
1912         (WebCore::equal): Aligned memory access on SH4 platform.
1913
1914 2009-03-05  Jeremy Moskovich  <jeremy@chromium.org>
1915
1916         Reviewed by Simon Fraser.
1917
1918         Fix for https://bugs.webkit.org/show_bug.cgi?id=24215
1919
1920         Gears expects an object tag with display:none to instantiate the plugin,
1921         so we add a workaround to make this work and fix Gears on WebKit trunk.
1922
1923         * html/HTMLObjectElement.cpp:
1924         (WebCore::HTMLObjectElement::rendererIsNeeded):
1925
1926 2009-03-05  Avi Drissman  <avi@chromium.org>
1927
1928         Reviewed by Darin Fisher.
1929
1930         Need to have Chromium Mac match Safari Mac's accesskey handling
1931         https://bugs.webkit.org/show_bug.cgi?id=24404
1932
1933         * page/chromium/EventHandlerChromium.cpp:
1934         (WebCore::EventHandler::accessKeyModifiers): Share access key modifiers with Mac Safari when building for the Mac.
1935
1936 2009-03-05  Simon Fraser  <simon.fraser@apple.com>
1937
1938         Reviewed by Dave Hyatt
1939
1940         https://bugs.webkit.org/show_bug.cgi?id=24412
1941         
1942         Fix crash when hit-testing elements with -webkit-transform-style: preserve-3d
1943         but no transform. We need to make localTransformState if we see preserve-3d.
1944         Also need to call update3DTransformedDescendantStatus() before we test
1945         m_has3DTransformedDescendant.
1946
1947         Test: transforms/3d/hit-testing/hit-preserves-3d.html
1948
1949         * rendering/RenderLayer.cpp:
1950         (WebCore::RenderLayer::hitTestLayer):
1951
1952 2009-03-05  Eric Seidel  <eric@webkit.org>
1953
1954         Reviewed by David Hyatt.
1955
1956         Changes to RenderLayer destruction to hopefully help catch an elusive crasher
1957         https://bugs.webkit.org/show_bug.cgi?id=24409
1958         
1959         Added a new RenderBoxModelObject::destroyLayer() call which is
1960         now the only way which RenderLayers should ever be destroyed.
1961         This ensures that the pointer to the layer is cleared in the
1962         RenderObject after destruction, allowing us to ASSERT in the
1963         RenderBoxModelObject destructor.
1964
1965         * rendering/RenderBox.cpp:
1966         (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
1967         * rendering/RenderBoxModelObject.cpp:
1968         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
1969         (WebCore::RenderBoxModelObject::destroyLayer):
1970         (WebCore::RenderBoxModelObject::destroy):
1971         (WebCore::RenderBoxModelObject::styleDidChange):
1972         * rendering/RenderBoxModelObject.h:
1973         * rendering/RenderLayer.cpp:
1974         (WebCore::RenderLayer::stackingContext):
1975         (WebCore::RenderLayer::destroy):
1976         (WebCore::RenderLayer::removeOnlyThisLayer):
1977         * rendering/RenderLayer.h:
1978         * rendering/RenderObject.cpp:
1979         (WebCore::RenderObject::destroy):
1980         * rendering/RenderWidget.cpp:
1981         (WebCore::RenderWidget::destroy):
1982
1983 2009-03-05  Eric Seidel  <eric@webkit.org>
1984
1985         Reviewed by David Hyatt.
1986
1987         Remove old, unused IE 5.5 scrollbar-* CSS properties.
1988         Sort the unimplemented getComputedStyle properties so it's
1989         easier to see which ones actually need implementation.
1990
1991         * css/CSSComputedStyleDeclaration.cpp:
1992         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1993         * css/CSSParser.cpp:
1994         (WebCore::CSSParser::parseValue):
1995         * css/CSSPropertyNames.in:
1996         * css/CSSStyleSelector.cpp:
1997         (WebCore::CSSStyleSelector::applyProperty):
1998
1999 2009-03-05  Justin Garcia  <justin.garcia@apple.com>
2000
2001         Reviewed by Darin Adler.
2002         
2003         WebViewDidChangeSelectionNotifications weren't being sent for commands that change the selection's position
2004         within the document without changing its position in the DOM.  For example, pressing return in (caret marked by ^):
2005         <div contentEditable="true"><div>^Hello</div></div>
2006         Undo was being enabled, shouldDeleteDOMRange called, etc. when doing no-op deletes (a delete in an empty document 
2007         for example). 
2008
2009         Changes to layout tests demonstrate fix.
2010         
2011         * editing/EditCommand.cpp:
2012         (WebCore::EditCommand::apply): Don't call applyEditing for a TypingCommand.  The TypingCommand knows whether or
2013         not it did work that needs to be applied.
2014         * editing/Editor.cpp:
2015         (WebCore::Editor::appliedEditing): Moved code (but did not alter) to changeSelectionAfterCommand.
2016         (WebCore::Editor::unappliedEditing): Ditto.
2017         (WebCore::Editor::reappliedEditing): Ditto.
2018         (WebCore::Editor::changeSelectionAfterCommand): Moved code from *appliedEditing into here.  Also call out to
2019         EditorClient::respondToChangedSelection() for commands that changed the selection's position in the document
2020         even if they did not change it's position in the DOM.  Any TypingCommand that gets this far changed it's position
2021         in the document.
2022         * editing/Editor.h:
2023         * editing/TypingCommand.cpp:
2024         (WebCore::TypingCommand::TypingCommand): Removed unused m_appliedEditing.
2025         (WebCore::TypingCommand::typingAddedToOpenCommand): Always apply editing.  We won't get this far if we don't need to.
2026         (WebCore::TypingCommand::deleteKeyPressed): Don't do any of the things that only make sense for Range selections, like
2027         adding to the killring and responding to a change in selections if the delete was a no-op.
2028         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
2029         * editing/TypingCommand.h:
2030
2031 2009-03-05  Dimitri Glazkov  <dglazkov@chromium.org>
2032
2033         Reviewed by Adam Roben.
2034
2035         Eliminate a ref-counting leak in InspectorController.
2036
2037         * inspector/InspectorController.h: Made constructor private, added static create method.
2038         * page/Page.cpp:
2039         (WebCore::Page::Page): Change initializer to use static create method.
2040
2041 2009-03-05  Dimitri Glazkov  <dglazkov@chromium.org>
2042
2043         Reviewed by Timothy Hatcher.
2044
2045         https://bugs.webkit.org/show_bug.cgi?id=24355
2046         Add InspectorController.idl and convert InspectorController.cpp to use
2047         JSC bindings.
2048
2049         * DerivedSources.make: Added InspectorController.idl
2050         * WebCore.xcodeproj/project.pbxproj: Added idl, bindings files.
2051         * bindings/js/JSInspectorControllerCustom.cpp: Added.
2052         * bindings/scripts/CodeGeneratorJS.pm: Added Array to no-header types.
2053         * inspector/InspectorController.cpp: Removed hand-rolled bindings.
2054         * inspector/InspectorController.h: Added platform and addSourceToFrame methods.
2055         * inspector/InspectorController.idl: Added.
2056         * page/Page.h: Changed member to RefPtr since InspectorController is now ref-counted.
2057
2058 2009-03-05  Eric Carlson  <eric.carlson@apple.com>
2059
2060         Reviewed by Simon Fraser.
2061
2062         https://bugs.webkit.org/show_bug.cgi?id=24400
2063         Bug 24400: Remove "start", "end", "loopStart", "loopEnd", "currentLoop", and "playCount" 
2064         media element attributes
2065
2066         Test: media/video-loop.html
2067
2068         * html/HTMLMediaElement.cpp:
2069         (WebCore::HTMLMediaElement::HTMLMediaElement):
2070         (WebCore::HTMLMediaElement::loadInternal):
2071         (WebCore::HTMLMediaElement::setNetworkState):
2072         (WebCore::HTMLMediaElement::seek):
2073         (WebCore::HTMLMediaElement::playInternal):
2074         (WebCore::HTMLMediaElement::loop):
2075         (WebCore::HTMLMediaElement::setLoop):
2076         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2077         (WebCore::HTMLMediaElement::endedPlayback):
2078         (WebCore::HTMLMediaElement::updatePlayState):
2079         * html/HTMLMediaElement.h:
2080         * html/HTMLMediaElement.idl:
2081
2082 2009-03-05  Steve Falkenburg  <sfalken@apple.com>
2083
2084         <rdar://problem/6651112> Safari asks about re-posting a form even when page is cached
2085         
2086         Reviewed by Ada Chan.
2087
2088         * platform/network/cf/ResourceHandleCFNet.cpp:
2089         (WebCore::ResourceHandle::willLoadFromCache): Ported from Mac version.
2090
2091 2009-03-05  David Hyatt  <hyatt@apple.com>
2092
2093         Reviewed by Eric Seidel
2094
2095         https://bugs.webkit.org/show_bug.cgi?id=24248
2096
2097         Make sure painting of overflow controls checks that visibility:visible is set on the block before
2098         painting.  Pixel tests caught this regression.
2099
2100         Make sure resizer painting pushes a clip of the corner rect.  It was relying on the clip layers happened
2101         to do to their bounds (which had nothing to do with overflow).
2102
2103         * rendering/RenderBlock.cpp:
2104         (WebCore::RenderBlock::paint):
2105         * rendering/RenderLayer.cpp:
2106         (WebCore::RenderLayer::paintResizer):
2107
2108 2009-03-05  Yong Li  <yong.li@torchmobile.com>
2109
2110         Reviewed by Simon Fraser.
2111
2112         https://bugs.webkit.org/show_bug.cgi?id=24386
2113         A faster implementation of extractMIMETypeFromMediaType.
2114
2115         * platform/network/HTTPParsers.cpp:
2116         (WebCore::extractMIMETypeFromMediaType):
2117
2118 2009-03-05  Yong Li  <yong.li@torchmobile.com>
2119
2120         Reviewed by Antti Koivisto.
2121
2122         https://bugs.webkit.org/show_bug.cgi?id=24392
2123         Do not get the current time for unless we're doing PRELOAD_DEBUG as this
2124         can be unnecessarily expensive.
2125
2126         * html/PreloadScanner.cpp:
2127         (WebCore::PreloadScanner::write):
2128
2129 2009-03-04  Simon Fraser  <simon.fraser@apple.com>
2130
2131         Reviewed by Dave Hyatt
2132
2133         https://bugs.webkit.org/show_bug.cgi?id=24327
2134         
2135         When mapping points and hit testing through transforms, work
2136         correctly when acclerated animations of transforms are running.
2137         
2138         Tested by LayoutTests/animations/animation-hit-test-transform.html,
2139         which only failed when ACCELERATED_COMPOSITING was turned on.
2140
2141         * rendering/RenderLayer.cpp:
2142         (WebCore::RenderLayer::currentTransform):
2143         * rendering/RenderLayer.h:
2144         * rendering/RenderObject.cpp:
2145         (WebCore::RenderObject::transformFromContainer):
2146
2147 2009-03-05  Mike Belshe  <mike@belshe.com>
2148
2149         Reviewed by Darin Fisher.
2150
2151         https://bugs.webkit.org/show_bug.cgi?id=24391
2152         Frame.cpp uses JSC specific includes
2153
2154         * page/Frame.cpp:
2155
2156 2009-03-05  Gustavo Noronha Silva  <gns@gnome.org>
2157
2158         Reviewed by Alexey Proskuryakov.
2159
2160         https://bugs.webkit.org/show_bug.cgi?id=24389
2161         WebKitGTK+ crashes when cancelling plugin loads
2162
2163         Remove bogus calls to the client's didFinishLoading method from
2164         our ResourceHandle::cancel implementation. Calling
2165         didFinishLoading here is mostly inoffensive for most loads, but
2166         causes crashes when plugin loads are cancelled.
2167
2168         * platform/network/soup/ResourceHandleSoup.cpp:
2169         (WebCore::ResourceHandle::cancel):
2170
2171 2009-03-05  Steve Falkenburg  <sfalken@apple.com>
2172
2173         Windows build fix.
2174         
2175         * WebCore.vcproj/QTMovieWin.vcproj:
2176
2177 2009-03-05  Adam Treat  <adam.treat@torchmobile.com>
2178
2179         Build fix for when ENABLE_NETSCAPE_PLUGIN_API = 0.  The method
2180         ScriptController::jsObjectForPluginElement(HTMLPlugInElement*); is not
2181         protected by an #if and uses HTMLPlugInElement so it must be included.
2182
2183         * bindings/js/ScriptController.cpp:
2184
2185 2009-03-05  Dimitri Glazkov  <dglazkov@chromium.org>
2186
2187         GTK Build fix.
2188
2189         * inspector/ConsoleMessage.h: Use proper header.
2190
2191 2009-03-05  Dimitri Glazkov  <dglazkov@chromium.org>
2192
2193         Reviewed by Timothy Hatcher.
2194
2195         https://bugs.webkit.org/show_bug.cgi?id=24376
2196         Split InspectorController.cpp file into separate classes.
2197
2198         * GNUmakefile.am: Modified to include new files.
2199         * WebCore.pro: Ditto.
2200         * WebCore.scons: Ditto.
2201         * WebCore.vcproj/WebCore.vcproj: Ditto.
2202         * WebCore.xcodeproj/project.pbxproj: Ditto.
2203         * WebCoreSources.bkl: Ditto.
2204         * inspector/ConsoleMessage.cpp: Added.
2205         * inspector/ConsoleMessage.h: Added.
2206         * inspector/InspectorController.cpp:
2207         * inspector/InspectorDOMStorageResource.cpp: Added.
2208         * inspector/InspectorDOMStorageResource.h: Added.
2209         * inspector/InspectorDatabaseResource.cpp: Added.
2210         * inspector/InspectorDatabaseResource.h: Added.
2211         * inspector/InspectorResource.cpp: Added.
2212         * inspector/InspectorResource.h: Added.
2213
2214 2009-03-05  Eric Carlson  <eric.carlson@apple.com>
2215
2216         Reviewed by Darin Adler
2217
2218         https://bugs.webkit.org/show_bug.cgi?id=24387
2219         Remove media element bufferingRate attribute. No test necessary as there
2220         were none for this attribute.
2221
2222         * html/HTMLMediaElement.cpp:
2223         (WebCore::HTMLMediaElement::HTMLMediaElement): Don't initialize m_bufferingRate.
2224         (WebCore::HTMLMediaElement::loadInternal): Ditto.
2225         (WebCore::HTMLMediaElement::setNetworkState): Ditto.
2226         (WebCore::HTMLMediaElement::progressEventTimerFired): Don't calculate m_bufferingRate.
2227         * html/HTMLMediaElement.h: Remove m_bufferingRate.
2228         * html/HTMLMediaElement.idl: Ditto.
2229
2230 2009-03-05  Xan Lopez  <xan@gnome.org>
2231
2232         Reviewed by Mark Rowe.
2233
2234         https://bugs.webkit.org/show_bug.cgi?id=24377
2235         [GTK] Comply better with coding style guidelines in ResourceHandleSoup
2236
2237         Use C++ booleans, 0 instead of NULL, prefix boolean variables with
2238         'is', do not use 'else if' if the previous if had a return, delete
2239         trailing whitespace, etc.
2240
2241         * platform/network/ResourceHandleInternal.h:
2242         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2243         * platform/network/soup/ResourceHandleSoup.cpp:
2244         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
2245         (WebCore::fillResponseFromMessage):
2246         (WebCore::restartedCallback):
2247         (WebCore::finishedCallback):
2248         (WebCore::parseDataUrl):
2249         (WebCore::ensureSessionIsInitialized):
2250         (WebCore::ResourceHandle::startHttp):
2251         (WebCore::reportUnknownProtocolError):
2252         (WebCore::ResourceHandle::start):
2253         (WebCore::cleanupGioOperation):
2254         (WebCore::closeCallback):
2255         (WebCore::readCallback):
2256         (WebCore::openCallback):
2257         (WebCore::queryInfoCallback):
2258         (WebCore::ResourceHandle::startGio):
2259
2260 2009-03-04  Simon Fraser  <simon.fraser@apple.com>
2261
2262         Reviewed by Eric Seidel
2263
2264         https://bugs.webkit.org/show_bug.cgi?id=24328
2265         
2266         If an element has backface-visibility: hidden, hit testing should not
2267         hit the back sides of elements. Test for that by inverting the accumulated
2268         transform and looking at the z vector.
2269
2270         Tested by transforms/3d/hit-testing/backface-hit-test.html
2271         
2272         * rendering/RenderLayer.cpp:
2273         (WebCore::RenderLayer::hitTestLayer):
2274
2275 2009-03-04  Adam Langley  <agl@google.com>
2276
2277         Reviewed by Darin Fisher.
2278
2279         r41362 mistakenly added functions "RenderThemeWin::" into
2280         RenderThemeChromiumGtk.cpp. When correcting this, I somehow changed
2281         them to void return types. This patch switches them back to ints.
2282
2283         https://bugs.webkit.org/show_bug.cgi?id=24360
2284
2285         * rendering/RenderThemeChromiumLinux.cpp:
2286         (WebCore::RenderThemeChromiumLinux::buttonInternalPaddingLeft):
2287         (WebCore::RenderThemeChromiumLinux::buttonInternalPaddingRight):
2288         (WebCore::RenderThemeChromiumLinux::buttonInternalPaddingTop):
2289         (WebCore::RenderThemeChromiumLinux::buttonInternalPaddingBottom):
2290
2291 2009-03-04  Adam Langley  <agl@google.com>
2292
2293         Reviewed by Darin Fisher.
2294
2295         Chromium Linux: change some metrics to better match Windows after
2296         r41416. Aesthetically this may be worse, but web-compat is king.
2297
2298         Also, the previous code had an off by one error when drawing
2299         scrollbars which caused the scrollbar to overflow it's bounds by 1px
2300         at the right and bottom edges.
2301
2302         https://bugs.webkit.org/show_bug.cgi?id=24369
2303
2304         * rendering/RenderThemeChromiumLinux.cpp:
2305         (WebCore::):
2306         (WebCore::RenderThemeChromiumLinux::systemFont):
2307         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
2308         (WebCore::ScrollbarThemeChromium::paintTrackPiece):
2309
2310 2009-03-04  Eric Seidel  <eric@webkit.org>
2311
2312         Reviewed by Adam Roben.
2313
2314         Add an ASSERT to better demonstrate the cause of the crash in
2315         https://bugs.webkit.org/show_bug.cgi?id=23736
2316
2317         * loader/DocLoader.cpp:
2318         (WebCore::DocLoader::~DocLoader):
2319
2320 2009-03-04  David Levin  <levin@chromium.org>
2321
2322         Reviewed by Alexey Proskuryakov.
2323
2324         Bug 24337: Assert when doing sync XHR in a worker for a cacheable response.
2325         <https://bugs.webkit.org/show_bug.cgi?id=24337>
2326
2327         Tests: http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache.html
2328                http/tests/xmlhttprequest/workers/xmlhttprequest-file-not-found.html
2329
2330         * loader/mac/ResourceLoaderMac.mm:
2331         (WebCore::ResourceLoader::willCacheResponse):
2332         An identifier is only asssigned if resource load callbacks are done.  So don't send
2333         willCacheResponse which uses identifier if resource load callbacks aren't being sent.
2334
2335 2009-03-04  David Levin  <levin@chromium.org>
2336
2337         Reviewed by Alexey Proskuryakov.
2338
2339         Bug 24330: Sync xhr in workers should send an abort exception when the worker is terminated.
2340         <https://bugs.webkit.org/show_bug.cgi?id=24330>
2341
2342         Test: http/tests/xmlhttprequest/workers/abort-exception-assert.html
2343
2344         * dom/ExceptionCode.cpp:
2345         (WebCore::xmlHttpRequestExceptionNames):
2346         Added missing ABORT_ERR whose absence caused an assert.
2347
2348         * loader/WorkerThreadableLoader.cpp:
2349         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
2350         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
2351         Add more logic to handle the termination case for sync xhr.
2352
2353 2009-03-04  Eric Carlson  <eric.carlson@apple.com>
2354
2355         Reviewed by Antti Koivisto.
2356
2357         https://bugs.webkit.org/show_bug.cgi?id=24364
2358         Add support for HTMLMediaElement canPlayType method. Make
2359         MediaPlayer::supportsType take a ContentType instead of a
2360         separate mime type and codecs parameter.
2361
2362         Test: media/video-can-play-type.html
2363
2364         * dom/DOMImplementation.cpp:
2365         (WebCore::DOMImplementation::createDocument):
2366         * html/HTMLMediaElement.cpp:
2367         (WebCore::HTMLMediaElement::canPlayType): Add canPlayType method.
2368         (WebCore::HTMLMediaElement::loadInternal): selectMediaURL returns a ContentType.
2369         (WebCore::HTMLMediaElement::selectMediaURL): Return a ContentType instead of raw MIME type.
2370         (WebCore::HTMLMediaElement::initialURL): selectMediaURL returns a ContentType.
2371         * html/HTMLMediaElement.h: Add prototype.
2372         * html/HTMLMediaElement.idl: Ditto.
2373         * platform/graphics/MediaPlayer.cpp:
2374         (WebCore::MediaPlayer::load): Take a ContentType instead of raw MIME type.
2375         (WebCore::MediaPlayer::supportsType): Ditto.
2376         * platform/graphics/MediaPlayer.h:
2377
2378 2009-03-04  Antti Koivisto  <antti@apple.com>
2379
2380         Reviewed by Dave Hyatt.
2381
2382         https://bugs.webkit.org/show_bug.cgi?id=24359
2383         Repaint throttling mechanism
2384         
2385         Excessive repainting can slow down page loadind. This implements a timer
2386         based throttling mechanism. It is behind ENABLE(REPAINT_THROTTLING) and not 
2387         enabled by default.
2388
2389         * loader/FrameLoader.cpp:
2390         (WebCore::FrameLoader::checkCompleted):
2391         * page/EventHandler.cpp:
2392         (WebCore::EventHandler::dispatchDragEvent):
2393         (WebCore::EventHandler::dispatchMouseEvent):
2394         (WebCore::EventHandler::keyEvent):
2395         (WebCore::EventHandler::handleTextInputEvent):
2396         * page/FrameView.cpp:
2397         (WebCore::FrameView::FrameView):
2398         (WebCore::FrameView::reset):
2399         (WebCore::FrameView::repaintContentRectangle):
2400         (WebCore::FrameView::beginDeferredRepaints):
2401         (WebCore::FrameView::endDeferredRepaints):
2402         (WebCore::FrameView::checkStopDelayingDeferredRepaints):
2403         (WebCore::FrameView::doDeferredRepaints):
2404         (WebCore::FrameView::updateDeferredRepaintDelay):
2405         (WebCore::FrameView::resetDeferredRepaintDelay):
2406         (WebCore::FrameView::adjustedDeferredRepaintDelay):
2407         (WebCore::FrameView::deferredRepaintTimerFired):
2408         (WebCore::FrameView::paintContents):
2409         * page/FrameView.h:
2410
2411 2009-03-04  Sam Weinig  <sam@webkit.org>
2412
2413         Rubber-stamped by Antti Koivisto.
2414
2415         Remove LOW_BANDWIDTH_DISPLAY as it is not being used by any platforms.
2416
2417         * dom/Document.cpp:
2418         (WebCore::Document::Document):
2419         * dom/Document.h:
2420         (WebCore::Document::haveStylesheetsLoaded):
2421         * html/HTMLTokenizer.cpp:
2422         (WebCore::HTMLTokenizer::scriptHandler):
2423         * loader/Cache.cpp:
2424         (WebCore::Cache::requestResource):
2425         * loader/CachedCSSStyleSheet.cpp:
2426         (WebCore::CachedCSSStyleSheet::checkNotify):
2427         * loader/DocLoader.h:
2428         * loader/FrameLoader.cpp:
2429         (WebCore::FrameLoader::FrameLoader):
2430         (WebCore::FrameLoader::requestFrame):
2431         (WebCore::FrameLoader::stopLoading):
2432         (WebCore::FrameLoader::begin):
2433         (WebCore::FrameLoader::write):
2434         (WebCore::FrameLoader::endIfNotLoadingMainResource):
2435         (WebCore::FrameLoader::checkCompleted):
2436         (WebCore::FrameLoader::requestObject):
2437         (WebCore::FrameLoader::loadItem):
2438         * loader/FrameLoader.h:
2439
2440 2009-03-02  Xan Lopez  <xan@gnome.org>
2441
2442         Reviewed by Mark Rowe.
2443
2444         https://bugs.webkit.org/show_bug.cgi?id=24287
2445         [GTK] Move auth dialog feature to WebKit/
2446
2447         Remove WebKitSoupAuthDialog files from build and stop using it.
2448
2449         * GNUmakefile.am:
2450         * platform/network/soup/ResourceHandleSoup.cpp:
2451         (WebCore::ensureSessionIsInitialized):
2452         * platform/network/soup/webkit-soup-auth-dialog.c: Removed.
2453         * platform/network/soup/webkit-soup-auth-dialog.h: Removed.
2454
2455 2009-03-04  Simon Fraser  <simon.fraser@apple.com>
2456
2457         Reviewed by Dave Hyatt
2458         
2459         https://bugs.webkit.org/show_bug.cgi?id=24361
2460         
2461         Reinstate code that sets result.innerNode when hitTest() returns true,
2462         but never filled in the innerNode. Fixes hit testing of generated content.
2463
2464         Test: fast/css-generated-content/hit-test-generated-content.html
2465
2466         * rendering/RenderLayer.cpp:
2467         (WebCore::RenderLayer::hitTestContents):
2468
2469 2009-03-04  Adam Barth  <abath@webkit.org>
2470
2471         Reviewed by Alexey Proskuryakov.
2472
2473         https://bugs.webkit.org/show_bug.cgi?id=24356
2474
2475         Fix WebKit style for allowUniversalAccessFromFileURLs.
2476
2477         * WebCore.base.exp:
2478         * dom/Document.cpp:
2479         (WebCore::Document::initSecurityContext):
2480         * page/Settings.cpp:
2481         (WebCore::Settings::Settings):
2482         (WebCore::Settings::setAllowUniversalAccessFromFileURLs):
2483         * page/Settings.h:
2484         (WebCore::Settings::allowUniversalAccessFromFileURLs):
2485
2486 2009-03-04  Brady Eidson  <beidson@apple.com>
2487
2488         Reviewed by Darin Adler
2489
2490         <rdar://problem/6619630> Quick Look of vCards stuck on image of first card opened.
2491
2492         I narrowed this down to http://trac.webkit.org/changeset/39304 which, among other things,
2493         consolidated some of the various decision making pieces of the Cache into the new method
2494         FrameLoader::cachePolicy().
2495
2496         Before 39304, when deciding whether to use an existing CachedResource, we checked if the FrameLoader 
2497         is reloading.  If it is, we'd evict any existing resource then recreate it.  Quick looks uses the
2498         same URL for this image every time and expects it to be reloaded with each new card.
2499
2500         The FrameLoader::isReloading() check did one thing - Ask the DocumentLoader if it's cache policy
2501         is "ReloadIgnoringCacheData".  This check was lost in the consolidation to the new method.  
2502
2503         * loader/FrameLoader.cpp:
2504         (WebCore::FrameLoader::cachePolicy): Restore the DocumentLoader's cachePolicy check as a possible
2505           condition for returning CachePolicyReload.
2506
2507 2009-03-04  Timothy Hatcher  <timothy@apple.com>
2508
2509         * English.lproj/localizedStrings.js: Update strings to include "DATABASES",
2510         "LOCAL STORAGE" and "SESSION STORAGE".
2511
2512 2009-03-04  Timothy Hatcher  <timothy@apple.com>
2513
2514         Fix a regression where the Web Inspector console would not animate
2515         in or out correctly.
2516
2517         Reviewed by Anders Carlsson.
2518
2519         * inspector/front-end/inspector.css: Move a z-index to a child element
2520         to get the correct stacking order during the animation.
2521
2522 2009-03-03  David Hyatt  <hyatt@apple.com>
2523
2524         https://bugs.webkit.org/show_bug.cgi?id=24201, pathologically bad block layout.
2525
2526         Make sure to factor clear deltas into y position estimates.  Also avoid doing the comparison of
2527         the final position against the y position estimate until after the clear has happened.  This gets rid
2528         of some duplicated cut/pasted code and also ensures a layout delta only has to be put in once.
2529
2530         Reviewed by Dan Bernstein
2531
2532         Added fast/block/float/nested-clearance.html
2533
2534         * rendering/RenderBlock.cpp:
2535         (WebCore::RenderBlock::collapseMargins):
2536         (WebCore::RenderBlock::clearFloatsIfNeeded):
2537         (WebCore::RenderBlock::estimateVerticalPosition):
2538         (WebCore::RenderBlock::layoutBlockChildren):
2539         (WebCore::RenderBlock::getClearDelta):
2540         * rendering/RenderBlock.h:
2541
2542 2009-03-02  Kim Grönholm  <kim.gronholm@nomovok.com>
2543
2544         Reviewed by Simon Hausmann.
2545
2546         Improvement to 3d transformations rendering in QtWebKit. QTransform is used
2547         instead of QMatrix. This allows perspective transformations since QTransform is
2548         a true 3x3 matrix.
2549
2550         * platform/graphics/qt/GraphicsContextQt.cpp: Use QTransform instead of QMatrix everywhere.
2551         (WebCore::GraphicsContext::getCTM):
2552         (WebCore::GraphicsContext::restorePlatformState):
2553         (WebCore::GraphicsContext::fillPath):
2554         (WebCore::GraphicsContext::strokePath):
2555         (WebCore::GraphicsContext::fillRect):
2556         (WebCore::GraphicsContext::translate):
2557         (WebCore::GraphicsContext::rotate):
2558         (WebCore::GraphicsContext::scale):
2559         (WebCore::GraphicsContext::concatCTM):
2560         * platform/graphics/qt/ImageQt.cpp:
2561         (WebCore::Image::drawPattern):
2562         * platform/graphics/qt/PathQt.cpp:
2563         (WebCore::Path::translate):
2564         (WebCore::Path::transform):
2565         * platform/graphics/qt/PatternQt.cpp:
2566         (WebCore::Pattern::createPlatformPattern):
2567         * platform/graphics/qt/TransformationMatrixQt.cpp:
2568         (WebCore::TransformationMatrix::operator QTransform): Replace the conversion operator
2569         to QMatrix with one to QTransform.
2570         * platform/graphics/transforms/TransformationMatrix.h:
2571         * platform/graphics/qt/FontQt.cpp:
2572
2573 2009-02-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2574
2575         Reviewed by Simon Hausmann.
2576
2577         https://bugs.webkit.org/show_bug.cgi?id=24151
2578         Fix Qt/S60 build break
2579
2580         * platform/FileSystem.h: Create a default case for non-win and non-mac Qt builds
2581         * platform/qt/FileSystemQt.cpp: Ditto
2582         (WebCore::unloadModule):
2583
2584 2009-03-03  Mike Belshe  <mike@belshe.com>
2585
2586         Reviewed by Alexey Proskuryakov.
2587
2588         https://bugs.webkit.org/show_bug.cgi?id=21939
2589         Uninitialized ExceptionCode in DOMWindow::postMessage
2590
2591         * dom/MessagePort.cpp:
2592         (WebCore::MessagePort::postMessage):
2593
2594 2009-03-03  David Kilzer  <ddkilzer@apple.com>
2595
2596         <rdar://problem/6581203> WebCore and WebKit should install the same set of headers during installhdrs phase as build phase
2597
2598         Reviewed by Mark Rowe.
2599
2600         The fix is to add INSTALLHDRS_COPY_PHASE = YES and
2601         INSTALLHDRS_SCRIPT_PHASE = YES to WebCore.xcconfig, then to make
2602         sure various build phase scripts work with the installhdrs build
2603         phase.
2604
2605         * Configurations/Base.xcconfig: Defined REAL_PLATFORM_NAME
2606         based on PLATFORM_NAME to work around the missing definition on
2607         Tiger.
2608         * Configurations/WebCore.xcconfig: Added
2609         JAVASCRIPTCORE_PRIVATE_HEADERS_DIR variable to simplify logic in
2610         the "Generate Derived Sources" script.  Added
2611         INSTALLHDRS_COPY_PHASE = YES and INSTALLHDRS_SCRIPT_PHASE = YES.
2612
2613         * WebCore.xcodeproj/project.pbxproj:
2614         - Added shell code to prevent running "Check For Global
2615           Initializers", "Check For Exit Time Destructors" and "Check
2616           For Weak VTables" scripts during the installhdrs build phase.
2617         - Made "Generate Derived Sources" work for the installhdrs build
2618           phase.  Also simplified setting of CREATE_HASH_TABLE by using
2619           JAVASCRIPTCORE_PRIVATE_HEADERS_DIR.
2620
2621 2009-03-02  Adam Langley  <agl@google.com>
2622
2623         Reviewed by Darin Fisher.
2624
2625         Chromium Linux: Switch to using Skia to render widgets.
2626
2627         In order to sandbox the Chromium renderer on Linux we need to remove
2628         the X connection. GTK cannot render without an X connection so, for
2629         now, we render widgets ourselves.
2630
2631         Previously didn't use anti-alias fonts in order to match Windows font
2632         rendering exactly. This was helpful when bootstrapping our layout
2633         tests. Now, however, we are ready to enable it.
2634
2635         https://bugs.webkit.org/show_bug.cgi?id=24244
2636
2637         * platform/chromium/ScrollbarThemeChromium.cpp:
2638         (WebCore::ScrollbarThemeChromium::buttonSize):
2639         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
2640         (WebCore::ScrollbarThemeChromium::scrollbarThickness):
2641         (WebCore::ScrollbarThemeChromium::paintTrackPiece):
2642         (WebCore::ScrollbarThemeChromium::paintButton):
2643         (WebCore::ScrollbarThemeChromium::paintThumb):
2644         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
2645         (WebCore::FontPlatformData::setupPaint):
2646         * platform/graphics/skia/PlatformContextSkia.cpp:
2647         (PlatformContextSkia::PlatformContextSkia):
2648         (PlatformContextSkia::~PlatformContextSkia):
2649         * platform/graphics/skia/PlatformContextSkia.h:
2650         * rendering/RenderThemeChromiumGtk.cpp: Removed.
2651         * rendering/RenderThemeChromiumGtk.h: Removed.
2652         * rendering/RenderThemeChromiumLinux.cpp: Added.
2653         * rendering/RenderThemeChromiumLinux.h: Added.
2654
2655 2009-03-03  Dimitri Glazkov  <dglazkov@chromium.org>
2656
2657         Reviewed by Darin Fisher.
2658
2659         https://bugs.webkit.org/show_bug.cgi?id=24261
2660         Fix return types.
2661
2662         Test: LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.svg
2663
2664         * bindings/v8/V8Binding.h:
2665         (WebCore::toInt32): change return type to int
2666         (WebCore::toFloat): change return type to float.
2667
2668 2009-03-03  Anders Carlsson  <andersca@apple.com>
2669
2670         Reviewed by John Sullivan.
2671
2672         https://bugs.webkit.org/show_bug.cgi?id=22884
2673         <rdar://problem/6449783>
2674         modified layout test crashes Safari
2675
2676         Null check NPStream before dereferencing it.
2677         
2678         * plugins/PluginView.cpp:
2679         (WebCore::PluginView::destroyStream):
2680
2681 2009-03-03  Eric Carlson  <eric.carlson@apple.com>
2682
2683         Reviewed by Simon Fraser.
2684
2685         Fix for <rdar://problem/6641045>
2686         Don't call QTKit to get movie properties until movie metadata has been loaded.
2687
2688         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2689         (WebCore::MediaPlayerPrivate::metaDataAvailable): defined
2690         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2691         (WebCore::MediaPlayerPrivate::createQTTime): return default if !metaDataAvailable.
2692         (WebCore::MediaPlayerPrivate::play): Ditto.
2693         (WebCore::MediaPlayerPrivate::pause): Ditto.
2694         (WebCore::MediaPlayerPrivate::duration): Ditto.
2695         (WebCore::MediaPlayerPrivate::currentTime): Ditto.
2696         (WebCore::MediaPlayerPrivate::seek): Ditto.
2697         (WebCore::MediaPlayerPrivate::seekTimerFired): Ditto.
2698         (WebCore::MediaPlayerPrivate::paused): Ditto.
2699         (WebCore::MediaPlayerPrivate::seeking): Ditto.
2700         (WebCore::MediaPlayerPrivate::naturalSize): Ditto.
2701         (WebCore::MediaPlayerPrivate::hasVideo): Ditto.
2702         (WebCore::MediaPlayerPrivate::setVolume): Ditto.
2703         (WebCore::MediaPlayerPrivate::setRate): Ditto.
2704         (WebCore::MediaPlayerPrivate::dataRate): Ditto.
2705         (WebCore::MediaPlayerPrivate::maxTimeLoaded): Ditto.
2706         (WebCore::MediaPlayerPrivate::totalBytes): Ditto.
2707
2708 2009-03-03  Kevin McCullough  <kmccullough@apple.com>
2709
2710         - Spelling fix.
2711
2712         * page/Console.cpp:
2713         (WebCore::Console::profile):
2714
2715 2009-03-03  Dimitri Glazkov  <dglazkov@chromium.org>
2716
2717         Reviewed by Darin Fisher.
2718
2719         https://bugs.webkit.org/show_bug.cgi?id=23657
2720         Remove Database API callback IDLs from the project. 
2721         They were removed in r40633.
2722
2723         * WebCore.xcodeproj/project.pbxproj: Removed IDL files from the project.
2724
2725 2009-03-03  Kevin McCullough  <kmccullough@apple.com>
2726
2727         Reviewed by Oliver Hunt.
2728
2729         <rdar://problem/6639110> console.profile() doesn't work without a title
2730
2731         * page/Console.cpp:
2732         (WebCore::Console::profile): If there is no title assume this is a user
2733         initiated profile and give it the next incremented title name.
2734
2735 2009-03-03  Timothy Hatcher  <timothy@apple.com>
2736
2737         Fix a regression that broke dirxml and caused an ASSERT in debug builds. Also simplified
2738         the console code and refactored things to have fewer code paths and duplication.
2739
2740         rdar://problem/6367127
2741         https://bugs.webkit.org/show_bug.cgi?id=24329
2742
2743         Reviewed by Kevin McCullough.
2744
2745         Test: manual-tests/inspector/console-dir.html
2746
2747         * bindings/js/JSInspectedObjectWrapper.cpp:
2748         (WebCore::JSInspectedObjectWrapper::wrap): Use the lexicalGlobalObject instead of dynamicGlobalObject
2749         to fix an ASSERT about using a wrapper from the wrong ExecState.
2750         * bindings/js/JSQuarantinedObjectWrapper.cpp:
2751         (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper): Ditto.
2752         (WebCore::JSQuarantinedObjectWrapper::allowsUnwrappedAccessFrom): Ditto.
2753         * inspector/front-end/Console.js:
2754         (WebInspector.Console.prototype._format): Remove the inline argument and add forceObjectFormat.
2755         When forceObjectFormat is true, the only formatter used is _formatobject.
2756         (WebInspector.Console.prototype._formatvalue): Remove the inline argument.
2757         (WebInspector.Console.prototype._formatstring): Ditto.
2758         (WebInspector.Console.prototype._formatregexp): Ditto.
2759         (WebInspector.Console.prototype._formatarray): Ditto.
2760         (WebInspector.Console.prototype._formatnode): Remove the inline argument and make a DOM tree instead of an anchor.
2761         (WebInspector.Console.prototype._formatobject): Remove the inline argument and always make a property graph.
2762         (WebInspector.Console.prototype._formaterror): Remove the inline argument.
2763         (WebInspector.ConsoleMessage): Remove the case for MessageLevel.Node and
2764         simplify the case for MessageLevel.Object to use the normal _format code path with the %O formatter.
2765         (WebInspector.ConsoleMessage.prototype._format.formatForConsole): Don't pass an additional true argument for inline.
2766         (WebInspector.ConsoleMessage.prototype._format.formatAsObjectForConsole): Added. Pass a true argument for forceObjectFormat.
2767         (WebInspector.ConsoleMessage.prototype._format): Added support for the %O formatter. Use formatForConsole for all arguments.
2768         (WebInspector.ConsoleMessage.prototype.toString): Add the other message levels.
2769         * inspector/front-end/inspector.css: Tweak styles to look and work correctly.
2770         * inspector/front-end/utilities.js:
2771         (Object.type): Return "node" for Node objects.
2772         (Object.describe): Handle the "node" type.
2773         * page/Console.cpp:
2774         (WebCore::printMessageSourceAndLevelPrefix): Fix an assert by adding the other message level types.
2775         (WebCore::Console::dirxml): Use the standard log fuction since it prints a DOM tree for nodes by default.
2776         * page/Console.h:
2777         (WebCore::enum MessageLevel): Removed NodeMessageLevel. Added a FIXME.
2778
2779 2009-03-03  Scott Violet  <sky@google.com>
2780
2781         Reviewed by Eric Seidel.
2782
2783         https://bugs.webkit.org/show_bug.cgi?id=24325
2784         Crash on replacing document contents during drop.
2785
2786         Makes sure a node is in the document during a move before using it.
2787
2788         Test: fast/events/crash-on-mutate-during-drop.html
2789
2790         * editing/MoveSelectionCommand.cpp:
2791         (WebCore::MoveSelectionCommand::doApply):
2792
2793 2009-03-03  Jungshik Shin <jshin@chromium.org>
2794
2795         Reviewed by Eric Seidel.
2796
2797         https://bugs.webkit.org/show_bug.cgi?id=23028
2798         Enable dynamic web font support to Chromium on Windows.
2799         Files that were omitted by mistake in the latest patch
2800         that was landed.
2801
2802         * loader/CachedFont.cpp:
2803         (WebCore::CachedFont::~CachedFont):
2804         (WebCore::CachedFont::ensureCustomFontData):
2805         (WebCore::CachedFont::platformDataFromCustomData):
2806         (WebCore::CachedFont::allClientsRemoved):
2807         * platform/graphics/chromium/FontCustomPlatformData.cpp:
2808         (WebCore::EOTStream::EOTStream):
2809         (WebCore::createFontCustomPlatformData):
2810         * platform/graphics/win/FontCustomPlatformData.cpp:
2811         (WebCore::EOTStream::EOTStream):
2812         (WebCore::createFontCustomPlatformData):
2813
2814 2009-03-03  Gustavo Noronha Silva  <gns@gnome.org>
2815
2816         Reviewed by Alexey Proskuryakov.
2817
2818         https://bugs.webkit.org/show_bug.cgi?id=16826
2819         [Gtk] Implement WebKitDownload
2820
2821         Make the Soup backend able to handle requests without a frame,
2822         since we may have such things now that we support downloads.
2823
2824         * platform/network/ResourceHandleInternal.h:
2825         * platform/network/soup/ResourceHandleSoup.cpp:
2826         (WebCore::ResourceHandle::start):
2827
2828 2009-03-03  Dimitri Glazkov  <dglazkov@chromium.org>
2829
2830         Reviewed by Eric Seidel.
2831
2832         https://bugs.webkit.org/show_bug.cgi?id=24331
2833         Add custom V8 bindings for Element, Attr, HTMLFrame, and HTMLIFrame.
2834
2835         * bindings/v8/custom/V8AttrCustom.cpp: Added.
2836         * bindings/v8/custom/V8CustomBinding.cpp: Added.
2837         * bindings/v8/custom/V8CustomBinding.h: Added attribute-checking helpers.
2838         * bindings/v8/custom/V8ElementCustom.cpp: Added.
2839         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp: Added.
2840         * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp: Added.
2841
2842 2009-03-03  Brady Eidson  <beidson@apple.com>
2843
2844         Reviewed by Darin Adler
2845
2846         <rdar://problem/6616664> - Quick looks of various file types is broken
2847
2848         In http://trac.webkit.org/changeset/40553 there was an attempt to prevent NSURLRequest churn
2849         for non-HTTP loads when the underlying ResourceRequest changed.  Unfortunately it was a little
2850         overzealous as the mainDocumentURL is relevant for all loads, not only HTTP/HTTPS loads.
2851
2852         Partially reverted behavior to always set the mainDocumentURL in situations when we would've
2853         before that patch.
2854
2855         * loader/FrameLoader.cpp:
2856         (WebCore::FrameLoader::addExtraFieldsToRequest):
2857
2858         * platform/network/ResourceRequestBase.cpp:
2859         (WebCore::ResourceRequestBase::setMainDocumentURL):
2860
2861 2009-03-03  Chris Marrin  <cmarrin@apple.com>
2862
2863         Reviewed by Simon Fraser.
2864
2865         https://bugs.webkit.org/show_bug.cgi?id=24256
2866
2867         Added a WebCoreForceSoftwareAnimation flag.
2868
2869         * platform/graphics/mac/GraphicsLayerCA.mm:
2870         (WebCore::forceSoftwareAnimation):
2871         (WebCore::GraphicsLayerCA::setOpacity):
2872         (WebCore::GraphicsLayerCA::animateTransform):
2873         (WebCore::GraphicsLayerCA::animateFloat):
2874
2875 2009-03-02  Chris Marrin  <cmarrin@apple.com>
2876
2877         Reviewed by Sam Weinig.
2878
2879         https://bugs.webkit.org/show_bug.cgi?id=24257
2880
2881         Added prototype properties for several classes with constructors that
2882         were missing them, including the one mentioned in the bug.
2883
2884         Test: fast/dom/Window/custom-constructors.html
2885
2886         * bindings/js/JSAudioConstructor.cpp:
2887         (WebCore::JSAudioConstructor::JSAudioConstructor):
2888         * bindings/js/JSDOMWindowBase.cpp:
2889         (jsDOMWindowBaseWebKitCSSMatrix):
2890         * bindings/js/JSImageConstructor.cpp:
2891         (WebCore::JSImageConstructor::JSImageConstructor):
2892         * bindings/js/JSOptionConstructor.cpp:
2893         (WebCore::JSOptionConstructor::JSOptionConstructor):
2894         * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
2895         (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor):
2896         * bindings/js/JSWebKitCSSMatrixConstructor.h:
2897         * bindings/js/JSWebKitPointConstructor.cpp:
2898         (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor):
2899         * bindings/js/JSWorkerConstructor.cpp:
2900         (WebCore::JSWorkerConstructor::JSWorkerConstructor):
2901
2902 2009-03-03  Dimitri Glazkov  <dglazkov@chromium.org>
2903
2904         Reviewed by Darin Fisher.
2905
2906         https://bugs.webkit.org/show_bug.cgi?id=24321
2907         Add V8 bindings headers.
2908
2909         * bindings/v8/V8Binding.h: Added.
2910         * bindings/v8/V8Proxy.h: Added.
2911         * bindings/v8/custom/V8CustomBinding.h: Added.
2912         * bindings/v8/custom/V8CustomEventListener.h: Added.
2913
2914 2009-03-03  Jungshik Shin <jshin@chromium.org>
2915
2916         Reviewed by Eric Seidel.
2917
2918         https://bugs.webkit.org/show_bug.cgi?id=23803
2919         Fix an 'off-by-1' error in ChromiumWin's font fallback.
2920
2921         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2922         (WebCore::FontCache::getFontDataForCharacters):
2923
2924 2009-03-03  Jungshik Shin  <jshin@chromium.org>
2925
2926         Reviewed by Eric Seidel.
2927
2928         http://bugs.webkit.org/show_bug.cgi?id=23028
2929         Enable dynamic web font support to Chromium on Windows: Part 1
2930         - Move OpenTypeUtilities.{cpp,h} to platform/graphics/opentype
2931           from platform/graphics/win because both Windows port and Chromium Windows
2932           port will use them.
2933         - Adjust WebCore.vcproj accordingly.
2934
2935         * WebCore.vcproj/WebCore.vcproj:
2936         * platform/graphics/opentype: Added.
2937         * platform/graphics/opentype/OpenTypeUtilities.cpp: Copied from WebCore/platform/graphics/win/OpenTypeUtilities.cpp.
2938         * platform/graphics/opentype/OpenTypeUtilities.h: Copied from WebCore/platform/graphics/win/OpenTypeUtilities.h.
2939         * platform/graphics/win/OpenTypeUtilities.cpp: Removed.
2940         * platform/graphics/win/OpenTypeUtilities.h: Removed.
2941
2942 2009-03-03  Simon Fraser  <simon.fraser@apple.com>
2943
2944         Reviewed by Dave Hyatt
2945
2946         https://bugs.webkit.org/show_bug.cgi?id=24312
2947         
2948         Take 3D transforms into account when hit testing:
2949         
2950         1. Maintain a bit on each RenderLayer that is set when the layer
2951            has 3d descendants, so that we know when to fall into the slow
2952            hit testing path.
2953            
2954         2. Make a ref-counted HitTestingTransformState, which is used to store
2955            an accumulated transform, and the hit test point, and hitTestRect
2956            in the plane of the ancestor non-3d ('flattening') layer.
2957            
2958            It's ref-counted so we can heap allocate it (to avoid stack bloat),
2959            and avoid copying when hitTestLayer calls itself after applying the transform.
2960            
2961         3. Add logic to hitTestLayer to depth-test just direct descendants, if any have
2962            3D transforms, or to do deep depth-testing when traversing a preserves-3d
2963            hierarchy. When hit, layers compute a z-offset from the ancestor flattening
2964            layer, which allows for correct depth testing.
2965            
2966            The existing early-return codepath is unaffected when there are no 3d transforms
2967            and no preserve-3d.
2968
2969         * rendering/RenderLayer.cpp:
2970         (WebCore::RenderLayer::RenderLayer):
2971         (WebCore::RenderLayer::updateTransform):
2972         (WebCore::RenderLayer::dirty3DTransformedDescendantStatus):
2973         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
2974         (WebCore::RenderLayer::hitTest):
2975         (WebCore::computeZOffset):
2976         (WebCore::RenderLayer::createLocalTransformState):
2977         (WebCore::RenderLayer::hitTestLayer):
2978         (WebCore::RenderLayer::hitTestContents):
2979         * rendering/RenderLayer.h:
2980         (WebCore::RenderLayer::preserves3D):
2981         (WebCore::RenderLayer::has3DTransform):
2982         (WebCore::RenderLayer::setHas3DTransformedDescendant):
2983         (WebCore::RenderLayer::has3DTransformedDescendant):
2984         * rendering/RenderLayerBacking.cpp:
2985         * rendering/TransformState.cpp:
2986         (WebCore::TransformState::flatten):
2987         (WebCore::TransformState::mappedPoint):
2988         (WebCore::HitTestingTransformState::move):
2989         (WebCore::HitTestingTransformState::applyTransform):
2990         (WebCore::HitTestingTransformState::flatten):
2991         (WebCore::HitTestingTransformState::mappedPoint):
2992         (WebCore::HitTestingTransformState::mappedQuad):
2993         * rendering/TransformState.h:
2994         (WebCore::TransformState::TransformState):
2995         (WebCore::HitTestingTransformState::create):
2996         (WebCore::HitTestingTransformState::move):
2997         (WebCore::HitTestingTransformState::HitTestingTransformState):
2998
2999 2009-03-03  Brett Wilson  <brettw@chromium.org>
3000
3001         Fix uninitialized memory reads in the Chromium Windows transparency
3002         code that were identified by Purify,
3003
3004         Reviewed by Darin Fisher.
3005
3006         * platform/graphics/chromium/TransparencyWin.cpp:
3007         (WebCore::TransparencyWin::OwnedBuffers::OwnedBuffers):
3008         (WebCore::TransparencyWin::initializeNewContext):
3009
3010 2009-03-03  Simon Fraser  <simon.fraser@apple.com>
3011
3012         Reviewed by Dave Hyatt
3013
3014         https://bugs.webkit.org/show_bug.cgi?id=24312
3015         
3016         Factor the code that compute a transform relative to the container
3017         into RenderObject::transformFromContainer().
3018         
3019         * rendering/RenderBox.cpp:
3020         (WebCore::RenderBox::mapLocalToAbsolutePoint):
3021         (WebCore::RenderBox::mapAbsoluteToLocalPoint):
3022         * rendering/RenderObject.cpp:
3023         (WebCore::RenderObject::transformFromContainer):
3024         * rendering/RenderObject.h:
3025
3026 2009-03-03  Simon Fraser  <simon.fraser@apple.com>
3027
3028         Reviewed by Dave Hyatt
3029
3030         https://bugs.webkit.org/show_bug.cgi?id=24317
3031         
3032         Always return |true| from RenderTextControlMultiLine::nodeAtPoint() if
3033         the superclass found a node, otherwise we set the innerNode of the
3034         HitTestResult, but don't actually report that we found a hit.
3035
3036         * rendering/RenderTextControlMultiLine.cpp:
3037         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
3038
3039 2009-03-03  Onne Gorter  <onne.gorter@avinity.net>
3040
3041         Reviewed by Anders Carlsson.
3042
3043         https://bugs.webkit.org/show_bug.cgi?id=23707
3044         resizing plugins does not work, because the plugin never gets informed
3045
3046         Make gtk plugins resize correctly, by sending them the setwindow event
3047         correctly. Also ensure that all plugin eventing is done with correct
3048         locking/calling. Mostly copied from mac implementation.
3049
3050         manual test: manual-tests/gtk/plugin-resize-scroll.html
3051
3052         * plugins/PluginView.h:
3053         * plugins/gtk/PluginViewGtk.cpp:
3054         (WebCore::PluginView::dispatchNPEvent):
3055         ensure locking/calling for NPEvents
3056         (WebCore::PluginView::updatePluginWidget):
3057         if something changed, let setNPWindowIfNeeded handle it
3058         (WebCore::PluginView::paint):
3059         (WebCore::PluginView::handleKeyboardEvent):
3060         (WebCore::PluginView::handleMouseEvent):
3061         ensure calling conventions
3062         (WebCore::PluginView::setNPWindowRect):
3063         just pass control to setNPWindowIfNeeded
3064         (WebCore::PluginView::setNPWindowIfNeeded):
3065         event the plugin correctly of new window
3066         (WebCore::PluginView::init):
3067         init through the new setup
3068
3069 2009-03-03  Mike Belshe  <mike@belshe.com>
3070
3071         Reviewed by Darin Fisher.
3072
3073         https://bugs.webkit.org/show_bug.cgi?id=24311
3074         Make IDL returning DOMObject use [V8Custom]
3075
3076         * dom/Document.idl:
3077         * html/HTMLCanvasElement.idl:
3078
3079 2009-03-02  Simon Fraser  <simon.fraser@apple.com>
3080
3081         Reviewed by Adele Peterson
3082
3083         https://bugs.webkit.org/show_bug.cgi?id=24313
3084         
3085         If RenderTextControlSingleLine::nodeAtPoint() pokes a node into the
3086         HitTestResult, then it had better well return |true|. And m_innerBlock
3087         could never have been set as the hit node by the superclass, because
3088         the superclass knows nothing about m_innerBlock.
3089         
3090         Test: fast/forms/input-hit-test-border.html
3091
3092         * rendering/RenderTextControlSingleLine.cpp:
3093         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
3094
3095 2009-03-02  Sam Weinig  <sam@webkit.org>
3096
3097         Reviewed by Mark Rowe.
3098
3099         Enable Geolocation (except on Tiger and Leopard).
3100
3101         * Configurations/WebCore.xcconfig:
3102
3103 2009-03-02  Ojan Vafai  <ojan@chromium.org>
3104
3105         Reviewed by Adele Peterson.
3106
3107         Fix https://bugs.webkit.org/show_bug.cgi?id=24307
3108         Null out m_highlightedNode on hideHighlight().
3109         Ran WebCore/manual-tests/inspector/highlight-nodes.html.
3110
3111         * inspector/InspectorController.cpp:
3112         (WebCore::InspectorController::hideHighlight):
3113
3114 2009-03-02  Sam Weinig  <sam@webkit.org>
3115
3116         Reviewed by Geoffrey Garen.
3117
3118         Fix for <rdar://problem/6507404> Add Geolocation support.
3119
3120         This is not yet turned on for any Mac platform.
3121
3122         * WebCore.xcodeproj/project.pbxproj:
3123         * page/Chrome.cpp:
3124         (WebCore::Chrome::shouldAllowGeolocationForFrame):
3125         * page/Chrome.h:
3126         * page/ChromeClient.h:
3127         (WebCore::ChromeClient::shouldAllowGeolocationForFrame):
3128         * page/Geolocation.cpp:
3129         (WebCore::Geolocation::Geolocation):
3130         (WebCore::Geolocation::disconnectFrame): Remove call to setUsingGeolocation as the document
3131         will not be alive at this point.
3132         (WebCore::Geolocation::getCurrentPosition): Check if the embedding app allows geolocation and
3133         return a PERMISSION_DENIED if not.
3134         (WebCore::Geolocation::watchPosition): Ditto.
3135         (WebCore::Geolocation::shouldAllowGeolocation): Perform request to embedding layer of whether
3136         to allow geolocation and cache the result. 
3137         * page/Geolocation.h:
3138         (WebCore::Geolocation::):
3139         * platform/GeolocationService.cpp:
3140         * platform/GeolocationService.h:
3141         (WebCore::GeolocationService::~GeolocationService):
3142         (WebCore::GeolocationService::stopUpdating):
3143         * platform/mac/GeolocationServiceMac.h: Added.
3144         (WebCore::GeolocationServiceMac::lastPosition):
3145         (WebCore::GeolocationServiceMac::lastError):
3146         * platform/mac/GeolocationServiceMac.mm: Added.
3147         (WebCore::GeolocationService::create):
3148         (WebCore::GeolocationServiceMac::GeolocationServiceMac):
3149         (WebCore::GeolocationServiceMac::~GeolocationServiceMac):
3150         (WebCore::GeolocationServiceMac::startUpdating):
3151         (WebCore::GeolocationServiceMac::stopUpdating):
3152         (WebCore::GeolocationServiceMac::suspend):
3153         (WebCore::GeolocationServiceMac::resume):
3154         (WebCore::GeolocationServiceMac::positionChanged):
3155         (WebCore::GeolocationServiceMac::errorOccurred):
3156         (-[WebCoreCoreLocationObserver initWithCallback:]):
3157         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
3158         (-[WebCoreCoreLocationObserver locationManager:didFailWithError:]):
3159
3160 2009-03-02  Kevin Ollivier  <kevino@theolliviers.com>
3161
3162         Build fixes for wxWidgets Mac trunk build.
3163
3164         * platform/wx/wxcode/mac/carbon/fontprops.cpp:
3165         (wxFontProperties::wxFontProperties):
3166         (GetTextExtent):
3167         * webcore-wx.bkl:
3168
3169 2009-03-02  Kevin Ollivier  <kevino@theolliviers.com>
3170
3171         wxGTK missing header build fix.
3172
3173         * platform/wx/wxcode/gtk/fontprops.cpp:
3174
3175 2009-03-02  Dan Bernstein  <mitz@apple.com>
3176
3177         Reviewed by Adam Roben.
3178
3179         - fix https://bugs.webkit.org/show_bug.cgi?id=21811
3180           REGRESSION: Windows Build Not Selecting Proper Font
3181
3182         * platform/graphics/win/FontCacheWin.cpp:
3183         (WebCore::createGDIFont): Added back code to verify that the created
3184         HFONT has the requested face name.
3185
3186 2009-03-02  Timothy Hatcher  <timothy@apple.com>
3187
3188         Fixes a regression caused by splitting the input and output of console commands.
3189
3190         https://bugs.webkit.org/show_bug.cgi?id=24293
3191
3192         Reviewed by Kevin McCullough.
3193
3194         * inspector/front-end/Console.js:
3195         (WebInspector.Console.prototype.addMessage): Don't treat ConsoleCommandResult as a
3196         normal ConsoleMessage when appending. This prevents resetting repeatCounts incorrectly.
3197
3198 2009-03-02  Timothy Hatcher  <timothy@apple.com>
3199
3200         Make exception messages and logged Error objects display consistently.
3201
3202         https://bugs.webkit.org/show_bug.cgi?id=18983
3203
3204         Reviewed by Adam Roben.
3205
3206         * English.lproj/localizedStrings.js: Remove a string for line numbers.
3207         * inspector/front-end/Console.js:
3208         (WebInspector.Console.prototype._enterKeyPressed): Pass the exception
3209         boolean to the ConsoleCommandResult constructor and don't pass level.
3210         (WebInspector.Console.prototype._formatnode): Fix a className typo.
3211         (WebInspector.Console.prototype._formaterror): Add an error-message
3212         classed span around the message to show in red and remove the
3213         console-message-url class from the link so it doesn't float right.
3214         Instead enclose the link in parentheses and use displayNameForURL
3215         to shorten the URL in the link.
3216         (WebInspector.ConsoleMessage.prototype.toMessageElement): Simplify
3217         how line numbers are shown since link underlining a string with
3218         parentheses looks bad.
3219         (WebInspector.ConsoleCommandResult): Take an exception boolean flag
3220         instead of a level and get line and URL based on that flag.
3221         * inspector/front-end/inspector.css: Tweaks to the styles.
3222
3223 2009-03-02  Ojan Vafai  <ojan@chromium.org>
3224
3225         Reviewed by Adele Peterson.
3226
3227         Bug 24048: extra windows button padding doesn't apply when there's no appearance
3228         <https://bugs.webkit.org/show_bug.cgi?id=24048>
3229
3230         Replace adjustButtonInnerStyle with buttonInternalPaddingLeft/Right/Top/Bottom.
3231
3232         No tests added as existing tests already cover this behavior.
3233
3234         * rendering/RenderButton.cpp:
3235         (WebCore::RenderButton::setupInnerStyle):
3236         * rendering/RenderTheme.cpp:
3237         * rendering/RenderTheme.h:
3238         (WebCore::RenderTheme::buttonInternalPaddingLeft):
3239         (WebCore::RenderTheme::buttonInternalPaddingRight):
3240         (WebCore::RenderTheme::buttonInternalPaddingTop):
3241         * rendering/RenderThemeChromiumGtk.cpp:
3242         (WebCore::RenderThemeWin::buttonInternalPaddingLeft):
3243         (WebCore::RenderThemeWin::buttonInternalPaddingRight):
3244         (WebCore::RenderThemeWin::buttonInternalPaddingTop):
3245         (WebCore::RenderThemeWin::buttonInternalPaddingBottom):
3246         * rendering/RenderThemeChromiumGtk.h:
3247         * rendering/RenderThemeChromiumWin.cpp:
3248         (WebCore::RenderThemeChromiumWin::buttonInternalPaddingLeft):
3249         (WebCore::RenderThemeChromiumWin::buttonInternalPaddingRight):
3250         (WebCore::RenderThemeChromiumWin::buttonInternalPaddingTop):
3251         (WebCore::RenderThemeChromiumWin::buttonInternalPaddingBottom):
3252         * rendering/RenderThemeChromiumWin.h:
3253         * rendering/RenderThemeWin.cpp:
3254         (WebCore::RenderThemeWin::buttonInternalPaddingLeft):
3255         (WebCore::RenderThemeWin::buttonInternalPaddingRight):
3256         (WebCore::RenderThemeWin::buttonInternalPaddingTop):
3257         (WebCore::RenderThemeWin::buttonInternalPaddingBottom):
3258         * rendering/RenderThemeWin.h:
3259
3260 2009-03-02  Adam Treat  <adam.treat@torchmobile.com>
3261
3262         Build fix for Qt port.  Remove unnecessary assert.
3263
3264         * platform/graphics/qt/ImageBufferQt.cpp:
3265         (WebCore::ImageBuffer::putImageData):
3266
3267 2009-03-02  Adam Treat  <adam.treat@torchmobile.com>
3268
3269         Reviewed by Adam Roben and previously by Eric Seidel and Simon Fraser.
3270
3271         https://bugs.webkit.org/show_bug.cgi?id=24227
3272         Ensure that the checkForSolidColor() optimization is correctly triggered
3273         for all cases of drawPattern.  Currently, the optimization was not triggered
3274         when the check had not been previously performed via a request for the
3275         image's NativeImagePtr.
3276
3277         Implement the Qt version of the checkForSolidColor() method.  Combined with
3278         the bug fix this reduces the time it takes to draw a repeating background
3279         of a 1x1 image from ~50msecs to ~0msecs on my machine.
3280
3281         * platform/graphics/BitmapImage.cpp:
3282         (WebCore::BitmapImage::BitmapImage):
3283         * platform/graphics/BitmapImage.h:
3284         (WebCore::BitmapImage::mayFillWithSolidColor):
3285         * platform/graphics/Image.h:
3286         (WebCore::Image::mayFillWithSolidColor):
3287         * platform/graphics/cairo/ImageCairo.cpp:
3288         (WebCore::BitmapImage::BitmapImage):
3289         (WebCore::BitmapImage::checkForSolidColor):
3290         * platform/graphics/cg/ImageCG.cpp:
3291         (WebCore::BitmapImage::BitmapImage):
3292         (WebCore::BitmapImage::checkForSolidColor):
3293         * platform/graphics/qt/ImageQt.cpp:
3294         (WebCore::BitmapImage::checkForSolidColor):
3295         * platform/graphics/skia/ImageSkia.cpp:
3296         (WebCore::BitmapImage::checkForSolidColor):
3297         * platform/graphics/wx/ImageWx.cpp:
3298         (WebCore::BitmapImage::checkForSolidColor):
3299
3300 2009-03-02  Gustavo Noronha Silva  <gns@gnome.org>
3301
3302         Unreviewed build fix; adding missing files to EXTRA_DIST, so that
3303         they show up in the tarball.
3304
3305         * GNUmakefile.am:
3306
3307 2009-03-02  Dirk Schulze  <krit@webkit.org>
3308
3309         Reviewed by Holger Freyther.
3310
3311         Added putImageData to Qt. Discussed with Ariya Hidayat.
3312
3313         [Qt] lacks putImageData support in Canvas
3314         https://bugs.webkit.org/show_bug.cgi?id=22186
3315
3316         * platform/graphics/qt/ImageBufferQt.cpp:
3317         (WebCore::ImageBuffer::putImageData):
3318
3319 2009-03-02  Timothy Hatcher  <timothy@apple.com>
3320
3321         Show exception messages again when evaluating bad expressions in the
3322         Web Inspector's console.
3323
3324         https://bugs.webkit.org/show_bug.cgi?id=19890
3325
3326         Reviewed by Oliver Hunt.
3327
3328         * bindings/js/JSQuarantinedObjectWrapper.cpp:
3329         (WebCore::JSQuarantinedObjectWrapper::transferExceptionToExecState):
3330         Fix the order in which the exception is set and cleared now that the
3331         exception is stored in the shared GlobalData, not per ExecState.
3332
3333 2009-02-28  Timothy Hatcher  <timothy@apple.com>
3334
3335         Make input in the Web Inspector console print before any output
3336         that might be added by the called function.
3337
3338         https://bugs.webkit.org/show_bug.cgi?id=19931
3339
3340         Reviewed by Oliver Hunt.
3341
3342         * inspector/front-end/Console.js:
3343         (WebInspector.Console.prototype._enterKeyPressed): Add the command
3344         message before evaluating the result. Associate the originating
3345         command to the result, so if they are adjacent there is no divider.
3346         (WebInspector.ConsoleCommand): No longer take a result.
3347         (WebInspector.ConsoleCommand.prototype.toMessageElement): Result
3348         code removed since it isn't used now.
3349         (WebInspector.ConsoleCommandResult): Subclass ConsoleMessage.
3350         (WebInspector.ConsoleCommandResult.prototype.toMessageElement):
3351         Call the ConsoleMessage toMessageElement and add a style class.
3352         * inspector/front-end/inspector.css: Add a new style class for
3353         adjacent results to hide the divider. Also tweak the position of
3354         the disclosure triangle for objects to not use the left margin.
3355
3356 2009-03-01  Chris Fleizach  <cfleizach@apple.com>
3357
3358         Reviewed by Oliver Hunt.
3359
3360         Bug 24282: AX Palindrome error when asking for a specific index of the AXChildren array
3361         <https://bugs.webkit.org/show_bug.cgi?id=24282>
3362
3363         When fetching an array of elements with a range, attachment views need to be returned
3364         instead of the actual attachment.
3365
3366         * page/mac/AccessibilityObjectWrapper.mm:
3367         (-[AccessibilityObjectWrapper accessibilityIndexOfChild:]):
3368         (-[AccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
3369
3370 2009-03-01  Ojan Vafai  <ojan@chromium.org>
3371
3372         Reviewed by Eric Seidel.
3373
3374         Bug 24251: Cleanup: replace positionForCoordinates with positionForPoint
3375         <https://bugs.webkit.org/show_bug.cgi?id=24251>
3376         
3377         Make RenderObject::positionForCoordinate non-virtual and
3378         RenderObject::positionForPoint virtual in preparation for
3379         removing positionFor* from RenderObject/RenderText.
3380
3381         * page/Frame.cpp:
3382         (WebCore::Frame::visiblePositionForPoint):
3383         * rendering/RenderBR.cpp:
3384         (WebCore::RenderBR::positionForPoint):
3385         * rendering/RenderBR.h:
3386         * rendering/RenderBlock.cpp:
3387         (WebCore::RenderBlock::positionForPoint):
3388         * rendering/RenderBlock.h:
3389         * rendering/RenderBox.cpp:
3390         (WebCore::RenderBox::positionForPoint):
3391         * rendering/RenderBox.h:
3392         * rendering/RenderInline.cpp:
3393         (WebCore::RenderInline::positionForPoint):
3394         * rendering/RenderInline.h:
3395         * rendering/RenderObject.cpp:
3396         (WebCore::RenderObject::positionForCoordinates):
3397         (WebCore::RenderObject::positionForPoint):
3398         * rendering/RenderObject.h:
3399         * rendering/RenderReplaced.cpp:
3400         (WebCore::RenderReplaced::positionForPoint):
3401         * rendering/RenderReplaced.h:
3402         * rendering/RenderSVGInlineText.cpp:
3403         (WebCore::RenderSVGInlineText::positionForPoint):
3404         * rendering/RenderSVGInlineText.h:
3405         * rendering/RenderText.cpp:
3406         (WebCore::RenderText::positionForPoint):
3407         * rendering/RenderText.h:
3408
3409 2009-03-01  Larry Ewing  <lewing@novell.com>
3410
3411         Reviewed by Alexey Proskuryakov.
3412
3413         https://bugs.webkit.org/show_bug.cgi?id=24080
3414         NPN_GetValue casting to the wrong type and writing outside bounds
3415
3416         Make sure to cast the value to the correct type so that only
3417         memory owned by the value is written to.
3418
3419         * plugins/gtk/PluginViewGtk.cpp (PluginView::getValueStatic): 
3420         * plugins/qt/PluginViewQt.cpp (PluginView::getValueStatic):
3421         * plugins/mac/PluginViewMac.cpp (PluginView::getValueStatic): 
3422         (PluginView::getValue):
3423
3424 2009-03-01  Jeremy Moskovich  <jeremy@chromium.org>
3425
3426         Reviewed by Simon Fraser.
3427
3428         https://bugs.webkit.org/show_bug.cgi?id=24197 and
3429         https://bugs.webkit.org/show_bug.cgi?id=23512
3430
3431         The Windows version of cgColor() is conditionally compiled using
3432         !PLATFORM(MAC) change this to PLATFORM(WIN_OS) so that Chrome
3433         can use the OS X version instead of the Windows version.
3434
3435         Also rename cgColor() -> createCGColor()
3436
3437         No observable change in behavior, so no test.
3438
3439         * platform/graphics/Color.h:
3440         * platform/graphics/cg/ColorCG.cpp:
3441         (WebCore::createCGColor):
3442         * platform/graphics/cg/GraphicsContextCG.cpp:
3443         (WebCore::GraphicsContext::setPlatformShadow):
3444         * platform/graphics/mac/ColorMac.mm:
3445         (WebCore::createCGColor):
3446         * platform/graphics/mac/GraphicsContextMac.mm:
3447         (WebCore::GraphicsContext::drawFocusRing):
3448         * platform/graphics/mac/GraphicsLayerCA.mm:
3449         (WebCore::setLayerBorderColor):
3450         (WebCore::setLayerBackgroundColor):
3451         (WebCore::GraphicsLayerCA::setBackgroundColor):
3452         * platform/graphics/win/GraphicsContextCGWin.cpp:
3453         (WebCore::GraphicsContext::drawFocusRing):
3454         * svg/graphics/filters/cg/SVGFEHelpersCg.mm:
3455         (WebCore::ciColor):
3456
3457 2009-03-01  David Levin  <levin@chromium.org>
3458
3459         Reviewed by Alexey Proskuryakov.
3460
3461         Bug 24271: XMLHttpRequest needs js bindings for Workers.
3462         <https://bugs.webkit.org/show_bug.cgi?id=24271>
3463
3464         Tests: http/tests/xmlhttprequest/workers/methods-async.html
3465                http/tests/xmlhttprequest/workers/methods.html
3466
3467         * bindings/js/JSWorkerContextBase.cpp:
3468         (WebCore::JSWorkerContextBase::getOwnPropertySlot):
3469         (jsWorkerContextBaseXMLHttpRequest):
3470         (setJSWorkerContextBaseXMLHttpRequest):
3471         Expose XMLHttpRequest to Workers.
3472
3473         * bindings/js/JSWorkerContextBase.h:
3474
3475         * bindings/js/JSXMLHttpRequestConstructor.cpp:
3476         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
3477         (WebCore::constructXMLHttpRequest):
3478         (WebCore::JSXMLHttpRequestConstructor::mark):
3479         Removed the dependencies on Document.
3480
3481         * bindings/js/JSXMLHttpRequestConstructor.h:
3482         (WebCore::JSXMLHttpRequestConstructor::scriptExecutionContext):
3483         * dom/EventException.idl:
3484         * dom/EventListener.idl:
3485         Change to have the NoStaticTables attribute since they are used from XHR.
3486
3487         * loader/WorkerThreadableLoader.cpp:
3488         (WebCore::workerContextDidFinishLoading):
3489         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
3490         Fixed identifier to be unsigned long.
3491
3492         * loader/WorkerThreadableLoader.h:
3493         * workers/WorkerThread.cpp:
3494         (WebCore::WorkerThread::workerThread):
3495         Stop active objects when the thread is getting shutdown so that xhr gets properly shutdown.
3496
3497         * xml/XMLHttpRequestUpload.cpp:
3498
3499         * xml/XMLHttpRequest.idl:
3500         * xml/XMLHttpRequestException.idl:
3501         * xml/XMLHttpRequestProgressEvent.idl:
3502         * xml/XMLHttpRequestUpload.idl:
3503         Change to have the NoStaticTables attribute since they are used from XHR.
3504
3505 2009-03-01  Horia Olaru  <olaru@adobe.com>
3506
3507         Adding manual debugger test cases for bug.
3508
3509         https://bugs.webkit.org/show_bug.cgi?id=21073
3510
3511         Reviewed by Kevin McCullough.
3512
3513         * manual-tests/inspector/debugger-step-on-do-while-statements.html: Added.
3514         * manual-tests/inspector/debugger-step-on-for-in-statements.html: Added.
3515         * manual-tests/inspector/debugger-step-on-for-statements.html: Added.
3516         * manual-tests/inspector/debugger-step-on-while-statements.html: Added.
3517         * manual-tests/inspector/resources/loop-statements.js: Added.
3518
3519 2009-03-01  Dan Bernstein  <mitz@apple.com>
3520
3521         Reviewed by Darin Adler.
3522
3523         - fix <rdar://problem/6634768> Reproducible crash in RenderLayer::updateScrollCornerStyle() using full-page zoom at MobileMe Contacts
3524
3525         Test: fast/events/scroll-during-zoom-change.html
3526
3527         * dom/Document.cpp:
3528         (WebCore::Document::recalcStyle): Pause scheduled events during style
3529         reclaculation. Changes to the zoom property result in scroll events
3530         being generated during style recalc, and those events need to be
3531         deferred until the render tree is consistent.
3532         * page/FrameView.cpp:
3533         (WebCore::FrameView::layout): Changed to account for a case in which the
3534         post-layout tasks trigger a nested layout, which reactivates the
3535         post-layout task timer.
3536
3537 2009-03-01  Ross Boucher  <rboucher@gmail.com>
3538
3539         Alphabetically sort scripts in the Script's panel file popup menu.
3540
3541         https://bugs.webkit.org/show_bug.cgi?id=23395
3542
3543         Reviewed by Timothy Hatcher.
3544
3545         * inspector/front-end/ScriptsPanel.js:
3546         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu):
3547         * inspector/front-end/utilities.js:
3548         (insertionIndexForObjectInListSortedByFunction):
3549         (indexOfObjectInListSortedByFunction):
3550
3551 2009-03-01  Yael Aharon  <yael.aharon@nokia.com>
3552
3553         Pass securityOrigin->host() instead of securityOrigin->domain() to WebInspector
3554         when creating databases, localStorage or sessionStorage. Changing document.domain
3555         should have no affect on databases, localStorage and sessionStorage in Web Inspector.
3556
3557         https://bugs.webkit.org/show_bug.cgi?id=23844
3558
3559         Reviewed by Timothy Hatcher.
3560
3561         * inspector/InspectorController.cpp:
3562         (WebCore::InspectorController::addDOMStorageScriptResource):
3563         (WebCore::InspectorController::didUseDOMStorage):
3564         * storage/Database.cpp:
3565         (WebCore::Database::openDatabase):
3566
3567 2009-03-01  Gustavo Noronha Silva  <gns@gnome.org>
3568
3569         Reviewed by Holger Freyther.
3570
3571         Avoid leaking errors when reporting GIO errors.
3572
3573         * platform/network/soup/ResourceHandleSoup.cpp:
3574         (WebCore::readCallback):
3575         (WebCore::openCallback):
3576         (WebCore::queryInfoCallback):
3577
3578 2009-03-01  Gustavo Noronha Silva  <gns@gnome.org>
3579
3580         Reviewed by Holger Freyther.
3581
3582         Fixes crash when the GIO backend is given the URI for a directory.
3583
3584         * platform/network/soup/ResourceHandleSoup.cpp:
3585         (WebCore::networkErrorForFile):
3586
3587 2009-02-28  Dimitri Glazkov  <dglazkov@chromium.org>
3588
3589         Reviewed by Darin Fisher.
3590
3591         https://bugs.webkit.org/show_bug.cgi?id=24261
3592         Fix V8 custom binding scrubbing error.
3593
3594         Test: fast/dom/TreeWalker/TreeWalker-currentNode.html
3595         Test: traversal/exception-forwarding.html
3596         TesT: traversal/stay-within-root.html
3597
3598         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
3599         * bindings/v8/custom/V8NodeIteratorCustom.cpp:
3600         (WebCore::toV8): Replace v8::Undefined() return value with v8::Null().
3601         * bindings/v8/custom/V8TreeWalkerCustom.cpp:
3602         (WebCore::toV8): Ditto.
3603
3604 2009-02-28  Dimitri Glazkov  <dglazkov@chromium.org>
3605
3606         Reviewed by Darin Fisher.
3607
3608         https://bugs.webkit.org/show_bug.cgi?id=24261
3609         Fix V8 custom binding scrubbing error.
3610
3611         Test: fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html
3612
3613         * WebCore.xcodeproj/project.pbxproj:
3614         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: