6b5b96df3db1d789b2189bdb1fa90644b045cd3d
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-11-07  Dmitry Lomov  <dslomov@google.com>
2
3         https://bugs.webkit.org/show_bug.cgi?id=71534
4         [V8] On neutering TypedArrayViews, V8 should be notified to drain code generation cache.
5
6         Reviewed by David Levin.
7
8         * bindings/scripts/CodeGeneratorJS.pm:
9         (GenerateImplementation):
10         * bindings/scripts/CodeGeneratorV8.pm:
11         * html/canvas/DataView.cpp:
12         * html/canvas/DataView.h:
13         * html/canvas/Float32Array.h:
14         * html/canvas/Float64Array.h:
15         * html/canvas/Int16Array.h:
16         * html/canvas/Int32Array.h:
17         * html/canvas/Int8Array.h:
18         * html/canvas/TypedArrayBase.h:
19         * html/canvas/Uint16Array.h:
20         * html/canvas/Uint32Array.h:
21         * html/canvas/Uint8Array.h:
22
23 2011-11-07  Adam Barth  <abarth@webkit.org>
24
25         addMessage's last few arguments should be optional
26         https://bugs.webkit.org/show_bug.cgi?id=70946
27
28         Reviewed by Darin Adler.
29
30         As requested by Darin Adler.  I wanted to call this method addMessage,
31         but the compiler was unhappy locating the overload on
32         ScriptExecutionContext when Document had an override too.  Changing the
33         name to addConsoleMessage made all the code happier.
34
35         * dom/Document.cpp:
36         (WebCore::Document::processHttpEquiv):
37         * dom/ScriptExecutionContext.cpp:
38         (WebCore::ScriptExecutionContext::addMessage):
39         * dom/ScriptExecutionContext.h:
40         * html/canvas/CanvasRenderingContext2D.cpp:
41         (WebCore::CanvasRenderingContext2D::getImageData):
42         * html/parser/XSSAuditor.cpp:
43         (WebCore::XSSAuditor::filterToken):
44         * loader/ImageLoader.cpp:
45         (WebCore::ImageLoader::notifyFinished):
46         * page/ContentSecurityPolicy.cpp:
47         (WebCore::ContentSecurityPolicy::reportViolation):
48         (WebCore::ContentSecurityPolicy::logUnrecognizedDirective):
49         * page/EventSource.cpp:
50         (WebCore::EventSource::didReceiveResponse):
51         * webaudio/AudioBufferSourceNode.cpp:
52         (WebCore::AudioBufferSourceNode::looping):
53         (WebCore::AudioBufferSourceNode::setLooping):
54         * webaudio/AudioContext.cpp:
55         (WebCore::AudioContext::createLowPass2Filter):
56         (WebCore::AudioContext::createHighPass2Filter):
57         * xml/XMLHttpRequest.cpp:
58         (WebCore::reportUnsafeUsage):
59
60 2011-11-07  Adam Barth  <abarth@webkit.org>
61
62         WebWorkers fail with document.domain set when accessing from subdomain
63         https://bugs.webkit.org/show_bug.cgi?id=67978
64
65         Reviewed by Sam Weinig.
66
67         Workers should ignore document.domain when deciding which URLs a
68         document can request, just like XMLHttpRequest and every other API.
69
70         Test: http/tests/workers/worker-document-domain-security.html
71
72         * workers/AbstractWorker.cpp:
73         (WebCore::AbstractWorker::resolveURL):
74
75 2011-11-07  Scott Graham  <scottmg@chromium.org>
76
77         Allow gamepad API to be enabled at runtime
78         https://bugs.webkit.org/show_bug.cgi?id=71736
79
80         Part of full patch, found at
81         https://bugs.webkit.org/show_bug.cgi?id=69451
82
83         Reviewed by Adam Barth.
84
85         No new tests. No new functionality.
86
87         * bindings/generic/RuntimeEnabledFeatures.cpp:
88         * bindings/generic/RuntimeEnabledFeatures.h:
89         (WebCore::RuntimeEnabledFeatures::setGamepadsEnabled):
90         (WebCore::RuntimeEnabledFeatures::gamepadsEnabled):
91
92 2011-11-07  Kentaro Hara  <haraken@chromium.org>
93
94         Remove [CustomGetter] IDL for window.Option of V8
95         https://bugs.webkit.org/show_bug.cgi?id=71735
96
97         Reviewed by Nate Chapin.
98
99         Currently, window.Option uses a custom getter to get the template
100         of 'HTMLOptionElementConstructor'. However, this getter does not need to
101         be custom and can use a default getter
102         'DOMWindowInternal::DOMWindowConstructorGetter'.
103
104         Tests: fast/js/custom-constructors.html
105                fast/forms/option-index.html
106                fast/forms/add-and-remove-option.html
107                fast/dom/dom-add-optionelement.html
108
109         * bindings/v8/custom/V8DOMWindowCustom.cpp: Removed a custom getter.
110         * page/DOMWindow.idl: Removed [CustomGetter] IDL from window.Option of V8. Renamed 'HTMLOptionElementConstructor' to 'HTMLOptionElementConstructorConstructor' in order to make window.Option use the template of (not 'HTMLOptionElement' but) 'HTMLOptionElementConstructor'. Note that CodeGenerator*.pm strips /Constructor$/ from the IDL type.
111
112 2011-11-07  Mark Hahnenberg  <mhahnenberg@apple.com>
113
114         De-virtualize JSObject::putWithAttributes
115         https://bugs.webkit.org/show_bug.cgi?id=71716
116
117         Reviewed by Darin Adler.
118
119         No new tests.
120
121         Added putWithAttributes to the MethodTable, changed all the virtual 
122         implementations of putWithAttributes to static ones, and replaced 
123         all call sites with corresponding lookups in the MethodTable.
124
125         * bindings/js/JSDOMWindowShell.cpp:
126         (WebCore::JSDOMWindowShell::putWithAttributes):
127         * bindings/js/JSDOMWindowShell.h:
128
129 2011-11-07  Beth Dakin  <bdakin@apple.com>
130
131         https://bugs.webkit.org/show_bug.cgi?id=71490
132         Support uiStateTransitionProgress for scrollbars
133         -and corresponding-
134         <rdar://problem/9849612>
135
136         Reviewed by Sam Weinig.
137
138         Step 1 of supporting uiStateTransitionProgress is knowing when the mouse has 
139         entered or exited a scrollbar. These changes to Scrollbar pass that information 
140         on to the ScrollAnimator. Also, Scrollbar::mouseUp() now takes a 
141         PlatformMouseEvent as a parameter. This is necessary because m_hoveredNode is not 
142         always up to date on a mouseUp, so mouseUp must hitTest the scrollbar to see if 
143         the mouse has exited the scrollbar.
144         * platform/Scrollbar.cpp:
145         (WebCore::Scrollbar::mouseMoved):
146         (WebCore::Scrollbar::mouseExited):
147         (WebCore::Scrollbar::mouseUp):
148         * platform/Scrollbar.h:
149
150         These changes are required now that Scrollbar::mouseUp() takes a parameter.
151         * WebCore.exp.in:
152         * page/EventHandler.cpp:
153         (WebCore::EventHandler::handleMouseDoubleClickEvent):
154         (WebCore::EventHandler::handleMouseReleaseEvent):
155         * platform/chromium/PopupListBox.cpp:
156         (WebCore::PopupListBox::handleMouseReleaseEvent):
157         * platform/win/PopupMenuWin.cpp:
158         (WebCore::PopupMenuWin::wndProc):
159         
160         ScrollAnimator passes the information on to AppKit.
161         * platform/ScrollAnimator.h:
162         (WebCore::ScrollAnimator::mouseEnteredScrollbar):
163         (WebCore::ScrollAnimator::mouseExitedScrollbar):
164         * platform/mac/ScrollAnimatorMac.h:
165         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
166         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
167
168         There are several new pieces of AppKit api we must call into.
169         * platform/mac/NSScrollerImpDetails.h:
170
171         This is a temporary function that is needed for the time being since there is new 
172         AppKit api required for this to work.
173         * platform/mac/ScrollAnimatorMac.mm:
174         (supportsUIStateTransitionProgress):
175
176         I refactored WebScrollbarPartAnimation so that it can handle the 
177         uiStateTransitionProgress animation as well as the alpha animations it already 
178         handled. This mostly involved re-naming things and making use of a new enum called 
179         FeatureToAnimate which keeps track of what the instance of 
180         WebScrollbarPartAnimation is animating.
181         (-[WebScrollbarPartAnimation initWithScrollbarPainter:animate:scrollAnimator:animateFrom:animateTo:duration:]):
182         (-[WebScrollbarPartAnimation setScrollbarPainter:]):
183         (-[WebScrollbarPartAnimation setStartValue:]):
184         (-[WebScrollbarPartAnimation setEndValue:]):
185         (-[WebScrollbarPartAnimation setCurrentProgress:]):
186
187         WebScrollbarPainterDelegate has two new animations, 
188         _verticalUIStateTransitionAnimation, and _horizontalUIStateTransitionAnimation. It 
189         also responds to a few new delegate calls.
190         (-[WebScrollbarPainterDelegate cancelAnimations]):
191
192         This is a new delegate call needed for uiStateTransitionProgress.
193         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
194
195         I re-named setUpAnimation to setUpAlphaAnimation since it does a lot of things 
196         that are specific to the alpha animation and I chose not to re-use it for 
197         uiStateTransition.
198         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
199         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
200         (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
201
202         New delegate call for the uiStateTransition animation that sets up that animation 
203         and kicks it off.
204         (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
205         (-[WebScrollbarPainterDelegate scrollAnimatorDestroyed]):
206
207 2011-11-07  Alice Boxhall  <aboxhall@chromium.org>
208
209         Remove unnecessary use of function pointer in FrameSelection::modify()
210         https://bugs.webkit.org/show_bug.cgi?id=71646
211
212         Reviewed by Ryosuke Niwa.
213
214         * editing/FrameSelection.cpp:
215         (WebCore::FrameSelection::modify):
216
217 2011-11-07  Andreas Kling  <kling@webkit.org>
218
219         Unreviewed Windows build fix after r99468.
220
221         * css/CSSPrimitiveValue.h: Unmark single-argument constructors
222         as explicit, since this conflicts with the template constructors
223         in CSSPrimitiveValueMappings.h.
224
225 2011-11-07  Jer Noble  <jer.noble@apple.com>
226
227         Build fix due to a erroneous search-and-replace.
228
229         Unreviewed build fix.
230
231         Replace all instances of GenericClock with ClockGeneric.
232
233         * WebCore.xcodeproj/project.pbxproj:
234         * platform/ClockGeneric.cpp:
235         (ClockGeneric::ClockGeneric):
236
237 2011-11-07  Adam Barth  <abarth@webkit.org>
238
239         Move parseSandboxPolicy to SecurityContext
240         https://bugs.webkit.org/show_bug.cgi?id=71732
241
242         Reviewed by Eric Seidel.
243
244         As requested by Eric, this patch resolves a layering inversion.  Now
245         that we have SecurityContext to hold the sandbox bits and the origin,
246         it's a logical place to put the parser for sandbox policies.
247
248         * dom/SecurityContext.cpp:
249         (WebCore::SecurityContext::parseSandboxPolicy):
250         * dom/SecurityContext.h:
251         * html/HTMLIFrameElement.cpp:
252         (WebCore::HTMLIFrameElement::parseMappedAttribute):
253         * page/ContentSecurityPolicy.cpp:
254         (WebCore::ContentSecurityPolicy::applySandboxPolicy):
255         * page/SecurityOrigin.cpp:
256         * page/SecurityOrigin.h:
257
258 2011-11-07  Jer Noble  <jer.noble@apple.com>
259
260         Rename PlatformClockPOSIX -> ClockGeneric, and use WTF::currentTime() for its timing source.
261         https://bugs.webkit.org/show_bug.cgi?id=71702
262
263         Reviewed by Sam Weinig.
264
265         No new tests; covered by existing tests.
266
267         * platform/Clock.cpp:
268         (Clock::create):
269         * platform/ClockGeneric.cpp: Renamed from Source/WebCore/platform/posix/PlatformClockPOSIX.cpp.
270         (ClockGeneric::ClockGeneric):
271         (ClockGeneric::setCurrentTime):
272         (ClockGeneric::currentTime):
273         (ClockGeneric::setPlayRate):
274         (ClockGeneric::start):
275         (ClockGeneric::stop):
276         * platform/ClockGeneric.h: Renamed from Source/WebCore/platform/posix/PlatformClockPOSIX.h.
277         (WebCore::ClockGeneric::playRate):
278         (WebCore::ClockGeneric::isRunning):
279
280         Boilerplate project file changes:
281         * CMakeLists.txt:
282         * Target.pri:
283         * WebCore.gypi:
284         * WebCore.xcodeproj/project.pbxproj:
285
286 2011-11-07  Vangelis Kokkevis  <vangelis@chromium.org>
287
288         Create a separate setting for compositing of for scrollable [i]frames
289         that forceCompositingMode can be used without turning frames into composited layers.
290         https://bugs.webkit.org/show_bug.cgi?id=71714
291
292         Reviewed by James Robinson.
293
294         * page/Settings.cpp:
295         (WebCore::Settings::Settings):
296         * page/Settings.h:
297         (WebCore::Settings::setAcceleratedCompositingForScrollableFramesEnabled):
298         (WebCore::Settings::acceleratedCompositingForScrollableFramesEnabled):
299         * rendering/RenderLayerCompositor.cpp:
300         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
301         * testing/Internals.cpp:
302         (WebCore::Internals::setEnableCompositingForScrollableFrames):
303         * testing/Internals.h:
304         * testing/Internals.idl:
305
306 2011-11-07  Rafael Weinstein  <rafaelw@chromium.org>
307
308         [MutationObservers] Fix mac build (with mutation_observers enabled)
309         https://bugs.webkit.org/show_bug.cgi?id=71728
310
311         Reviewed by Tony Chang.
312
313         Errant forward declaration of MutationObserverRegistration removed from
314         Node.h this would have broken a port that tried to build with mutation_observers=1.
315
316         * dom/Node.h:
317
318 2011-11-07  Kentaro Hara  <haraken@chromium.org>
319
320         Remove [CustomGetter] IDL from 'HTMLAudioElementConstructor' of V8
321         https://bugs.webkit.org/show_bug.cgi?id=71660
322
323         Reviewed by Adam Barth.
324
325         Currently, "new Audio()" uses a custom getter to get the template
326         of 'HTMLAudioElementConstructor'. However, this getter does not need to
327         be custom and can use a default getter 'DOMWindowInternal::DOMWindowConstructorGetter'.
328
329         Tests: fast/js/custom-constructors.html
330                media/audio-constructor.html
331                media/audio-constructor-src.html
332                media/audio-constructor-preload.html
333                media/audio-controls-do-not-fade-out.html
334                media/audio-controls-rendering.html
335
336         * bindings/v8/custom/V8DOMWindowCustom.cpp: Removed a custom getter.
337         * page/DOMWindow.idl: Removed [CustomGetter] IDL from 'HTMLAudioElementConstructor' of V8. Renamed 'HTMLAudioElementConstructor' to 'HTMLAudioElementConstructorConstructor' in order to make 'new Audio()' use the template of (not 'HTMLAudioElement' but) 'HTMLAudioElementConstructor'. Note that CodeGenerator*.pm strips /Constructor$/ from an IDL type.
338         * bindings/scripts/CodeGeneratorJS.pm:
339         (GenerateImplementation): If an IDL type is 'XXXXConstructorConstructor', then we do not add a header file 'XXXXConstructor.h' to JSDOMWindow.cpp, because the NamedConstructor declaration is written in the header file of class XXXX 'XXXX.h'. Incidentally, the reason why CodeGeneratorV8.pm does not need a corresponding change is that V8 is still generating the NamedConstructor declaration in its dedicated header file 'XXXXConstructor.h'. This V8 issue will be fixed in the upcoming patch that implements [NamedConstructor] IDL in V8.
340
341 2011-11-07  Robert Sesek  <rsesek@chromium.org>
342
343         [chromium] Update WebCore.gyp to not use WebKitLibraries in include_dirs
344         https://bugs.webkit.org/show_bug.cgi?id=71694
345
346         Reviewed by Adam Barth.
347
348         * WebCore.gyp/WebCore.gyp:
349
350 2011-11-07  Dominic Cooney  <dominicc@chromium.org>
351
352         Remove initPopStateEvent method
353         https://bugs.webkit.org/show_bug.cgi?id=71691
354
355         Reviewed by Ojan Vafai.
356
357         * dom/PopStateEvent.cpp:
358         * dom/PopStateEvent.h:
359         * dom/PopStateEvent.idl:
360
361 2011-11-07  Andreas Kling  <kling@webkit.org>
362
363         CSSValue: Devirtualize isFooType().
364         <http://webkit.org/b/71668>
365
366         Reviewed by Darin Adler.
367
368         Add a member to CSSValue to determine which subclass a given
369         value object is, along with 5 bits to tell us whether the
370         value is primitive/mutable/initial/inherited/a list.
371
372         All non-private subclass constructors now take CSSValue::ClassType
373         as their first argument. A few constructors were duplicated as
374         private members to allow calling them from ::create() methods
375         without passing an explicit ClassType.
376
377         Furthermore, since CSSValue::cssValueType() can be inferred from
378         the subclass type, we compute it instead of storing it in a member.
379
380         * CMakeLists.txt:
381         * GNUmakefile.list.am:
382         * Target.pri:
383         * WebCore.gypi:
384         * WebCore.vcproj/WebCore.vcproj:
385         * WebCore.xcodeproj/project.pbxproj:
386
387             Adding CSSValue.cpp.
388
389         * css/CSSValue.cpp: Added.
390         (WebCore::CSSValue::cssValueType):
391
392             Out-of-line implementation of this method. Only used by CSSOM.
393
394         * css/CSSValue.h:
395         (WebCore::CSSValue::isMutableValue):
396         (WebCore::CSSValue::isPrimitiveValue):
397         (WebCore::CSSValue::isValueList):
398         (WebCore::CSSValue::isInitialValue):
399         (WebCore::CSSValue::isInheritedValue):
400         (WebCore::CSSValue::isBorderImageValue):
401         (WebCore::CSSValue::isBorderImageSliceValue):
402         (WebCore::CSSValue::isCursorImageValue):
403         (WebCore::CSSValue::isFontFamilyValue):
404         (WebCore::CSSValue::isFontFeatureValue):
405         (WebCore::CSSValue::isFontValue):
406         (WebCore::CSSValue::isImageGeneratorValue):
407         (WebCore::CSSValue::isImageValue):
408         (WebCore::CSSValue::isImplicitInitialValue):
409         (WebCore::CSSValue::isReflectValue):
410         (WebCore::CSSValue::isShadowValue):
411         (WebCore::CSSValue::isTimingFunctionValue):
412         (WebCore::CSSValue::isWebKitCSSTransformValue):
413         (WebCore::CSSValue::isCSSLineBoxContainValue):
414         (WebCore::CSSValue::isFlexValue):
415         (WebCore::CSSValue::isWebKitCSSFilterValue):
416         (WebCore::CSSValue::isSVGColor):
417         (WebCore::CSSValue::isSVGPaint):
418         (WebCore::CSSValue::classType):
419         (WebCore::CSSValue::CSSValue):
420         (WebCore::CSSValue::isPrimitiveType):
421         (WebCore::CSSValue::isListType):
422         (WebCore::CSSValue::isMutableType):
423         (WebCore::CSSValue::isInheritedType):
424         (WebCore::CSSValue::isInitialType):
425
426             Store subclass type information into a member variable and
427             made all the isFooValue() functions non-virtual and inline.
428             Some subclass type lookups (primitive values, notably) are
429             cached in a bool member on construction.
430
431         * css/CSSAspectRatioValue.h:
432         (WebCore::CSSAspectRatioValue::CSSAspectRatioValue):
433         * css/CSSBorderImageSliceValue.cpp:
434         (WebCore::CSSBorderImageSliceValue::CSSBorderImageSliceValue):
435         * css/CSSBorderImageSliceValue.h:
436         * css/CSSBorderImageValue.cpp:
437         (WebCore::CSSBorderImageValue::CSSBorderImageValue):
438         * css/CSSBorderImageValue.h:
439         * css/CSSCanvasValue.h:
440         (WebCore::CSSCanvasValue::CSSCanvasValue):
441         * css/CSSCrossfadeValue.h:
442         (WebCore::CSSCrossfadeValue::CSSCrossfadeValue):
443         * css/CSSCursorImageValue.cpp:
444         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
445         * css/CSSCursorImageValue.h:
446         * css/CSSFlexValue.h:
447         (WebCore::CSSFlexValue::CSSFlexValue):
448         * css/CSSFontFaceSrcValue.h:
449         (WebCore::CSSFontFaceSrcValue::CSSFontFaceSrcValue):
450         * css/CSSFunctionValue.cpp:
451         (WebCore::CSSFunctionValue::CSSFunctionValue):
452         * css/CSSGradientValue.h:
453         (WebCore::CSSGradientValue::isLinearGradient):
454         (WebCore::CSSGradientValue::isRadialGradient):
455         (WebCore::CSSGradientValue::CSSGradientValue):
456         (WebCore::CSSLinearGradientValue::CSSLinearGradientValue):
457         (WebCore::CSSRadialGradientValue::CSSRadialGradientValue):
458         * css/CSSImageGeneratorValue.cpp:
459         (WebCore::CSSImageGeneratorValue::CSSImageGeneratorValue):
460         * css/CSSImageGeneratorValue.h:
461         * css/CSSImageValue.cpp:
462         (WebCore::CSSImageValue::CSSImageValue):
463         * css/CSSImageValue.h:
464         * css/CSSInheritedValue.h:
465         (WebCore::CSSInheritedValue::CSSInheritedValue):
466         * css/CSSInitialValue.h:
467         (WebCore::CSSInitialValue::CSSInitialValue):
468         (WebCore::CSSInitialValue::create):
469         * css/CSSLineBoxContainValue.cpp:
470         (WebCore::CSSLineBoxContainValue::CSSLineBoxContainValue):
471         * css/CSSLineBoxContainValue.h:
472         * css/CSSMutableValue.h:
473         (WebCore::CSSMutableValue::CSSMutableValue):
474         * css/CSSPrimitiveValue.cpp:
475         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
476         * css/CSSPrimitiveValue.h:
477         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
478         * css/CSSPrimitiveValueMappings.h:
479         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
480         * css/CSSReflectValue.h:
481         (WebCore::CSSReflectValue::CSSReflectValue):
482         * css/CSSTimingFunctionValue.h:
483         (WebCore::CSSTimingFunctionValue::isLinearTimingFunctionValue):
484         (WebCore::CSSTimingFunctionValue::isCubicBezierTimingFunctionValue):
485         (WebCore::CSSTimingFunctionValue::isStepsTimingFunctionValue):
486         (WebCore::CSSTimingFunctionValue::CSSTimingFunctionValue):
487         (WebCore::CSSLinearTimingFunctionValue::CSSLinearTimingFunctionValue):
488         (WebCore::CSSCubicBezierTimingFunctionValue::CSSCubicBezierTimingFunctionValue):
489         (WebCore::CSSStepsTimingFunctionValue::CSSStepsTimingFunctionValue):
490         * css/CSSUnicodeRangeValue.h:
491         (WebCore::CSSUnicodeRangeValue::CSSUnicodeRangeValue):
492         * css/CSSValueList.cpp:
493         (WebCore::CSSValueList::CSSValueList):
494         * css/CSSValueList.h:
495         * css/FontFamilyValue.cpp:
496         (WebCore::FontFamilyValue::FontFamilyValue):
497         * css/FontFamilyValue.h:
498         * css/FontFeatureValue.cpp:
499         (WebCore::FontFeatureValue::FontFeatureValue):
500         * css/FontFeatureValue.h:
501         * css/FontValue.h:
502         (WebCore::FontValue::FontValue):
503         * css/ShadowValue.cpp:
504         (WebCore::ShadowValue::ShadowValue):
505         * css/ShadowValue.h:
506         * css/WebKitCSSFilterValue.cpp:
507         (WebCore::WebKitCSSFilterValue::WebKitCSSFilterValue):
508         * css/WebKitCSSFilterValue.h:
509         * css/WebKitCSSTransformValue.cpp:
510         (WebCore::WebKitCSSTransformValue::WebKitCSSTransformValue):
511         * css/WebKitCSSTransformValue.h:
512         * svg/SVGColor.cpp:
513         (WebCore::SVGColor::SVGColor):
514         * svg/SVGColor.h:
515         * svg/SVGPaint.cpp:
516         (WebCore::SVGPaint::SVGPaint):
517         * svg/SVGPaint.h:
518
519             Propagate subclass type information and kill isFooType() virtuals.
520
521 2011-11-07  Mihnea Ovidenie  <mihnea@adobe.com>
522
523         Leaks seen in RenderRegion::setRenderBoxRegionInfo on Leaks bot
524         https://bugs.webkit.org/show_bug.cgi?id=71259
525
526         Reviewed by Darin Adler.
527
528         Leak fixes covered by existing tests.
529
530         * rendering/RenderFlowThread.cpp:
531         (WebCore::RenderFlowThread::logicalWidthChangedInRegions):
532         The RenderBoxRegionInfo taken out of RenderRegion must be deleted on all code paths.
533         * rendering/RenderRegion.cpp:
534         (WebCore::RenderRegion::removeRenderBoxRegionInfo):
535         The RenderBoxRegionInfo map owns the values, therefore, when values are removed from map
536         they must also be deleted.
537
538 2011-11-07  Adam Barth  <abarth@webkit.org>
539
540         iframe sandbox treats vertical tab as a valid delimiter
541         https://bugs.webkit.org/show_bug.cgi?id=71704
542
543         Reviewed by Eric Seidel.
544
545         This patch adjusts our parser slightly to match the HTML5 spec.  The
546         only difference is in how we handle vertical tabs.  Previously, we
547         treated them as a delimiter, but we're not supposed to do that.
548
549         Test: fast/frames/sandboxed-iframe-parsing-space-characters.html
550
551         * page/SecurityOrigin.cpp:
552         (WebCore::SecurityOrigin::parseSandboxPolicy):
553
554 2011-11-07  Adam Barth  <abarth@webkit.org>
555
556         Factor SecurityContext out of ScriptExecutionContext
557         https://bugs.webkit.org/show_bug.cgi?id=71721
558
559         Reviewed by Eric Seidel.
560
561         The new SecurityContext object lets us tightly scope control of
562         the security-critical information in ScriptExecutionContext.
563         Originally I had hoped to put all this state on SecurityOrigin, but
564         SecurityOrigin gets shared between documents in some corner cases, so
565         it's not a good fit for state like the sandbox flags and the CSP policy
566         that really needs to be per-document.
567
568         * CMakeLists.txt:
569         * GNUmakefile.list.am:
570         * Target.pri:
571         * WebCore.gypi:
572         * WebCore.vcproj/WebCore.vcproj:
573         * WebCore.xcodeproj/project.pbxproj:
574         * dom/DOMAllInOne.cpp:
575         * dom/ScriptExecutionContext.cpp:
576         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
577         * dom/ScriptExecutionContext.h:
578         * loader/FrameLoader.h:
579         * loader/FrameLoaderTypes.h:
580         * page/SecurityOrigin.h:
581
582 2011-11-07  Kentaro Hara  <haraken@chromium.org>
583
584         Refactor CodeGeneratorV8.pm before making a core change for bug 71093.
585         https://bugs.webkit.org/show_bug.cgi?id=71659
586
587         Reviewed by Adam Barth.
588
589         Just refactor CodeGeneratorV8.pm without any change in behavior,
590         as the first step for fixing bug 71093.
591
592         Tests: WebCore/bindings/scripts/test/TestObj.idl
593                WebCore/bindings/scripts/test/TestInterface.idl
594
595         * bindings/scripts/CodeGeneratorV8.pm:
596         (GenerateHeader): Sort generated headers in alphabetical order. Removed unnecessary variable names from method signatures. These changes are for silencing style check errors when a new TestXXXX.idl is added.
597         (GenerateConstructorCallback): Renamed variables to clarify their roles.
598         (WriteData): Removed an unused array @implHeaderContent.
599         * bindings/scripts/test/V8/V8TestInterface.h: Updated a run-binding-tests result.
600         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: Ditto.
601         * bindings/scripts/test/V8/V8TestObj.h: Ditto.
602         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: Ditto.
603
604 2011-11-07  Ken Buchanan <kenrb@chromium.org>
605
606         Crash due to mixed direction text runs
607         https://bugs.webkit.org/show_bug.cgi?id=66015
608
609         Reviewed by David Hyatt.
610
611         Test for bug fix.
612
613         * fast/text/international/bidi-neutral-in-mixed-direction-run-crash.html: Added
614         * fast/text/international/bidi-neutral-in-mixed-direction-run-cras-expected.txt: Added
615
616 2011-11-07  Tim Horton  <timothy_horton@apple.com>
617
618         getBBox() on a SVGPathElement with curves incorrectly includes control points
619         https://bugs.webkit.org/show_bug.cgi?id=53512
620         <rdar://problem/9861154>
621
622         Reviewed by Oliver Hunt.
623
624         Split Path::boundingRect() into two, adding Path::fastBoundingRect()
625         for a rough estimate of the bounding rect (always equal to or larger
626         than boundingRect()). fastBoundingRect() currently falls back to
627         boundingRect() for all ports besides CG, though in most cases
628         (on a port-by-port basis) the current implementation of boundingRect()
629         will need to become fastBoundingRect(), and a new, more accurate method will
630         be implemented for boundingRect().
631
632         All previous callers of boundingRect() are transitioned to using fastBoundingRect()
633         except SVGPathElement::getBBox, which wants an accurate bounding box.
634
635         The CoreGraphics implementation of Path::boundingRect() called
636         CGPathGetBoundingBox, which includes the path's control points in its
637         calculations. Snow Leopard added CGPathGetPathBoundingBox, which
638         finds the bounding box of only points within the path, and does not
639         include control points. On Snow Leopard and above, we now use the latter.
640
641         Test: svg/custom/getBBox-path.svg
642
643         * html/HTMLAreaElement.cpp:
644         * html/canvas/CanvasRenderingContext2D.cpp:
645         * platform/graphics/Path.cpp:
646         * platform/graphics/Path.h:
647         * platform/graphics/cg/GraphicsContextCG.cpp:
648         * platform/graphics/cg/PathCG.cpp:
649         (WebCore::Path::boundingRect):
650         * rendering/RenderObject.h:
651         * rendering/svg/RenderSVGPath.cpp:
652         * svg/SVGPathElement.cpp:
653         * svg/SVGPathElement.h:
654
655 2011-11-07  Vsevolod Vlasov  <vsevik@chromium.org>
656
657         Web Inspector: Suggest box should be open immediately if forced by Ctrl+Space.
658         https://bugs.webkit.org/show_bug.cgi?id=71710
659
660         Reviewed by Pavel Feldman.
661
662         * inspector/front-end/TextPrompt.js:
663         (WebInspector.TextPrompt.prototype.clearAutoComplete):
664         (WebInspector.TextPrompt.prototype.autoCompleteSoon):
665
666 2011-11-07  vsevik@chromium.org  <vsevik@chromium.org>
667
668         Web Inspector: Suggest box should consume enter key pressed event.
669         https://bugs.webkit.org/show_bug.cgi?id=71700
670
671         Reviewed by Pavel Feldman.
672
673         * inspector/front-end/ConsoleView.js:
674         (WebInspector.ConsoleView):
675         * inspector/front-end/TextPrompt.js:
676         (WebInspector.TextPrompt.prototype._attachInternal):
677         (WebInspector.TextPrompt.SuggestBox.prototype.enterKeyPressed):
678
679 2011-11-07  David Barr  <davidbarr@chromium.org>
680
681         Optimize outline rendering to avoid transparency layers
682         https://bugs.webkit.org/show_bug.cgi?id=60750
683
684         Add fast path for solid block outlines with alpha.
685         Improve readability of piecewise path while at it.
686
687         Reviewed by Simon Fraser.
688
689         No intended change in behaviour, no new tests.
690
691         * rendering/RenderObject.cpp:
692         (WebCore::RenderObject::paintOutline):
693
694 2011-11-07  Vsevolod Vlasov  <vsevik@chromium.org>
695
696         Web Inspector: Suggest box should not accept suggestion on space key pressed.
697         https://bugs.webkit.org/show_bug.cgi?id=71706
698
699         Reviewed by Pavel Feldman.
700
701         * inspector/front-end/TextPrompt.js:
702         (WebInspector.TextPrompt.prototype.onKeyDown):
703         (WebInspector.TextPrompt.SuggestBox.prototype.tabKeyPressed):
704
705 2011-11-07  Andreas Kling  <kling@webkit.org>
706
707         Don't use CSSOM's CSSValue.cssValueType internally in WebCore.
708         <http://webkit.org/b/71679>
709
710         Reviewed by Darin Adler.
711
712         Swap out cssValueType() usage for isPrimitiveValue(), isInitialValue()
713         and isInheritedValue() to increase code clarity.
714
715         The plan is to turn cssValueType() into a computed value based on the
716         CSSValue subclass (coming soon to <http://webkit.org/b/71668>.)
717         This is a clean-up in preparation for that.
718
719         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
720         (WebCore::JSCSSStyleDeclaration::nameGetter):
721         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
722         (WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
723         * css/CSSInheritedValue.h:
724         (WebCore::CSSInheritedValue::isInheritedValue):
725         * css/CSSInitialValue.h:
726         (WebCore::CSSInitialValue::isInitialValue):
727         * css/CSSParser.cpp:
728         (WebCore::CSSParser::parseColor):
729         * css/CSSStyleSelector.cpp:
730         (WebCore::CSSStyleSelector::applyDeclaration):
731         (WebCore::CSSStyleSelector::applyProperty):
732         (WebCore::CSSStyleSelector::mapFillAttachment):
733         (WebCore::CSSStyleSelector::mapFillClip):
734         (WebCore::CSSStyleSelector::mapFillComposite):
735         (WebCore::CSSStyleSelector::mapFillOrigin):
736         (WebCore::CSSStyleSelector::mapFillImage):
737         (WebCore::CSSStyleSelector::mapFillRepeatX):
738         (WebCore::CSSStyleSelector::mapFillRepeatY):
739         (WebCore::CSSStyleSelector::mapFillSize):
740         (WebCore::CSSStyleSelector::mapFillXPosition):
741         (WebCore::CSSStyleSelector::mapFillYPosition):
742         (WebCore::CSSStyleSelector::mapAnimationDelay):
743         (WebCore::CSSStyleSelector::mapAnimationDirection):
744         (WebCore::CSSStyleSelector::mapAnimationDuration):
745         (WebCore::CSSStyleSelector::mapAnimationFillMode):
746         (WebCore::CSSStyleSelector::mapAnimationIterationCount):
747         (WebCore::CSSStyleSelector::mapAnimationName):
748         (WebCore::CSSStyleSelector::mapAnimationPlayState):
749         (WebCore::CSSStyleSelector::mapAnimationProperty):
750         (WebCore::CSSStyleSelector::mapAnimationTimingFunction):
751         * css/CSSValue.h:
752         (WebCore::CSSValue::isInheritedValue):
753         (WebCore::CSSValue::isInitialValue):
754         * css/SVGCSSStyleSelector.cpp:
755         (WebCore::CSSStyleSelector::applySVGProperty):
756         * editing/EditingStyle.cpp:
757         (WebCore::EditingStyle::extractFontSizeDelta):
758         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
759
760 2011-11-07  Sheriff Bot  <webkit.review.bot@gmail.com>
761
762         Unreviewed, rolling out r99432.
763         http://trac.webkit.org/changeset/99432
764         https://bugs.webkit.org/show_bug.cgi?id=71709
765
766         It made layout tests extra slow on all bots (Requested by
767         Ossy_night on #webkit).
768
769         * inspector/front-end/ConsoleView.js:
770         (WebInspector.ConsoleView):
771         * inspector/front-end/TextPrompt.js:
772         (WebInspector.TextPrompt.prototype._attachInternal):
773         (WebInspector.TextPrompt.SuggestBox.prototype.enterKeyPressed):
774
775 2011-11-07  Andreas Kling  <kling@webkit.org>
776
777         REGRESSION(r99409): Broke transitions/clip-transition.html
778         <http://webkit.org/b/71692>
779
780         Reviewed by Darin Adler.
781
782         Add missing base class initializers to CSSPrimitiveValue constructors.
783         This was causing some CSSPrimitiveValues to masquerade as CSS_CUSTOM values.
784
785         * css/CSSPrimitiveValue.h:
786         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
787         * css/CSSPrimitiveValueMappings.h:
788         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
789
790 2011-11-07  ChangSeok Oh  <shivamidow@gmail.com>
791
792         [EFL] Support requestAnimationFrame API
793         https://bugs.webkit.org/show_bug.cgi?id=67112
794
795         Reviewed by Andreas Kling.
796
797         Add some files to build-target when enabling requestAnimationFrame option.
798
799         fast/animation/request-animation-frame-cancel.html
800         fast/animation/request-animation-frame-cancel2.html
801         fast/animation/request-animation-frame-display.html
802         fast/animation/request-animation-frame-during-modal.html
803         fast/animation/request-animation-frame-timestamps.html
804         fast/animation/request-animation-frame-within-callback.html
805         fast/animation/request-animation-frame.html
806
807         * CMakeLists.txt:
808         * UseJSC.cmake:
809
810 2011-11-07  Sam Weinig  <sam@webkit.org>
811
812         Add missing .in and .pl files to the Xcode project for easy access.
813
814         Reviewed by Eric Carlson.
815
816         * WebCore.xcodeproj/project.pbxproj:
817         Add some missing files to the Xcode project.
818
819 2011-11-07  Jessie Berlin  <jberlin@apple.com>
820
821         Need a way to allow a scheme access to Local Storage and Databases while Private Browsing is
822         enabled.
823         https://bugs.webkit.org/show_bug.cgi?id=71631
824
825         Reviewed by Jon Honeycutt.
826
827         Check the SchemeRegistry before preventing read/write access to Local Storage and Databases
828         in Private Browsing.
829
830         * WebCore.exp.in:
831         Export the symbols for registering the schemes as allowing Local Storage and Database access
832         in Private Browsing.
833
834         * dom/Document.cpp:
835         (WebCore::Document::allowDatabaseAccess):
836         Check if the scheme allows Database access in Private Browsing.
837
838         * platform/SchemeRegistry.cpp:
839         (WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing):
840         (WebCore::schemesAllowingDatabaseAccessInPrivateBrowsing):
841         (WebCore::SchemeRegistry::registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing):
842         (WebCore::SchemeRegistry::allowsLocalStorageAccessInPrivateBrowsing):
843         (WebCore::SchemeRegistry::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing):
844         (WebCore::SchemeRegistry::allowsDatabaseAccessInPrivateBrowsing):
845         * platform/SchemeRegistry.h:
846
847         * storage/Storage.cpp:
848         (WebCore::Storage::length):
849         Ask the storage area if it is disabled by Private Browsing in the frame instead of just
850         checking if Private Browsing is enabled for that frame because the answer might depend on
851         what type of storage that storage area is.
852         (WebCore::Storage::key):
853         Ditto.
854         (WebCore::Storage::getItem):
855         Ditto.
856         (WebCore::Storage::contains):
857         Ditto.
858
859         * storage/StorageArea.h:
860         Make it possible to query a StorageArea for whether it is disabled by Private Browsing in a
861         Frame.
862         * storage/StorageAreaImpl.cpp:
863         (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame):
864         Renamed from privateBrowsingEnabled.
865         Check not only if Private Browsing is enabled for the Frame, but also if the storage type is
866         Local Storage and if there is an exception for the scheme of the resource currently loaded
867         into the Frame.
868         (WebCore::StorageAreaImpl::setItem):
869         Renamed privateBrowsingEnabled -> disabledByPrivateBrowsingInFrame.
870         (WebCore::StorageAreaImpl::removeItem):
871         Ditto.
872         (WebCore::StorageAreaImpl::clear):
873         Ditto.
874         * storage/StorageAreaImpl.h:
875
876 2011-11-07  Dominic Cooney  <dominicc@chromium.org>
877
878         Remove initCloseEvent method
879         https://bugs.webkit.org/show_bug.cgi?id=71374
880
881         Reviewed by Ojan Vafai.
882
883         Test: fast/dom/Window/window-properties.html
884
885         * websockets/CloseEvent.h:
886         (WebCore::CloseEvent::initCloseEvent):
887         * websockets/CloseEvent.idl:
888
889 2011-11-07  Anders Carlsson  <andersca@apple.com>
890
891         Simplify NetscapePlugin::convertPoint and make it work (in theory) with transformed plug-ins
892         https://bugs.webkit.org/show_bug.cgi?id=71699
893
894         Reviewed by Sam Weinig.
895
896         Export AffineTransform symbols used by WebKit2.
897
898         * WebCore.exp.in:
899
900 2011-11-07  Michael Saboff  <msaboff@apple.com>
901
902         Towards 8 Bit Strings: Templatize JSC::Lexer class by character type
903         https://bugs.webkit.org/show_bug.cgi?id=71331
904
905         Changed the SourceProvider::data() virtual method to return a
906         StringImpl* instead of a UChar*.
907         Changed Identifier() constructor to use JSGlobalData*.
908
909         Reviewed by Darin Adler.
910
911         No new tests - refactored SourceProvider class and sub-classes.
912
913         * bindings/js/CachedScriptSourceProvider.h:
914         (WebCore::CachedScriptSourceProvider::stringData):
915         * bindings/js/StringSourceProvider.h:
916         (WebCore::StringSourceProvider::stringData):
917         * bridge/qt/qt_runtime.cpp:
918         (JSC::Bindings::convertQVariantToValue):
919
920 2011-11-07  Dominic Cooney  <dominicc@chromium.org>
921
922         Remove initOverflowEvent from JavaScript bindings
923         https://bugs.webkit.org/show_bug.cgi?id=71687
924
925         Reviewed by Ojan Vafai.
926
927         Now that OverflowEvent has a constructor, we don't need the
928         initOverflowEvent method. It has to remain in the Objective C
929         binding because it is part of the Objective C public API.
930
931         * dom/OverflowEvent.idl:
932
933 2011-11-07  Noel Gordon  <noel.gordon@gmail.com>
934
935         Refactor canvas encoding mimeType validation
936         https://bugs.webkit.org/show_bug.cgi?id=71651
937
938         Reviewed by Andreas Kling.
939
940         No new tests, refactoring only, covered by existing canvas tests.
941
942         * html/HTMLCanvasElement.cpp:
943         (WebCore::HTMLCanvasElement::toEncodingMimeType): move encoder mimeType
944         validation logic into a helper routine.
945         (WebCore::HTMLCanvasElement::toDataURL):
946         * html/HTMLCanvasElement.h:
947
948 2011-11-07  Vsevolod Vlasov  <vsevik@chromium.org>
949
950         Web Inspector: Suggest box should consume enter key pressed event.
951         https://bugs.webkit.org/show_bug.cgi?id=71700
952
953         Reviewed by Pavel Feldman.
954
955         * inspector/front-end/ConsoleView.js:
956         (WebInspector.ConsoleView):
957         * inspector/front-end/TextPrompt.js:
958         (WebInspector.TextPrompt.prototype._attachInternal):
959         (WebInspector.TextPrompt.SuggestBox.prototype.enterKeyPressed):
960
961 2011-11-07  Dominic Cooney  <dominicc@chromium.org>
962
963         Remove initPageTransitionEvent method
964         https://bugs.webkit.org/show_bug.cgi?id=71689
965
966         Reviewed by Ojan Vafai.
967
968         initPageTransitionEvent was removed from the HTML spec; it has
969         been replaced by new PageTransitionEvent(...).
970
971         Removing a method, so no new tests.
972
973         * dom/PageTransitionEvent.cpp:
974         * dom/PageTransitionEvent.h:
975         * dom/PageTransitionEvent.idl:
976
977 2011-11-07  Alexander Pavlov  <apavlov@chromium.org>
978
979         Web Inspector: TextPrompt+SuggestBox should autocomplete on "Right" keydown and with a single suggestion in place
980         https://bugs.webkit.org/show_bug.cgi?id=71676
981
982         Reviewed by Pavel Feldman.
983
984         * inspector/front-end/TextPrompt.js:
985         (WebInspector.TextPrompt.prototype.onKeyDown):
986         (WebInspector.TextPrompt.SuggestBox.prototype._updateItems):
987         * inspector/front-end/inspectorCommon.css:
988         (body): Revert inadvertent style change from a preceding commit.
989
990 2011-11-07  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
991
992         Fix the Qt build on Mac OS X when using the QuickTime media backend
993
994         When QtWebKit is built on Mac OS X using the QuickTime media backend
995         we build both KURLCFNet.cpp and KURLMac, just like the Mac port, so
996         we have to guard the potentially duplicate symbol createCFURL with
997         more than just !PLATFORM(MAC).
998
999         Reviewed by Andreas Kling.
1000
1001         * platform/cf/KURLCFNet.cpp:
1002
1003 2011-11-07  Pavel Feldman  <pfeldman@google.com>
1004
1005         Not reviewed: follow up to r99407. Style the suggest box.
1006         https://bugs.webkit.org/show_bug.cgi?id=65511
1007
1008
1009         * inspector/front-end/TextPrompt.js:
1010         * inspector/front-end/inspector.css:
1011         * inspector/front-end/textPrompt.css:
1012
1013 2011-11-07  Roland Steiner  <rolandsteiner@chromium.org>
1014
1015         https://bugs.webkit.org/show_bug.cgi?id=70223
1016         CSSStyleSheet: finding the owner node should be in its own method
1017
1018         Add styleSheetOwnerNode() function that returns the owner Node of the style sheet, or 0.
1019
1020         Reviewed by Dimitri Glazkov.
1021
1022         No new tests. (refactoring)
1023
1024         * css/CSSStyleSheet.cpp:
1025         (WebCore::CSSStyleSheet::styleSheetOwnerNode):
1026         (WebCore::CSSStyleSheet::document):
1027         * css/CSSStyleSheet.h:
1028
1029 2011-11-07  Yury Semikhatsky  <yurys@chromium.org>
1030
1031         [Chromium] Web Inspector: use native worker inspector instead of fake workers
1032         https://bugs.webkit.org/show_bug.cgi?id=71670
1033
1034         Removed context menu option for switching between native and "fake" workers
1035         debugger. Native debugger is used by default on platforms that support it.
1036
1037         Reviewed by Pavel Feldman.
1038
1039         * English.lproj/localizedStrings.js:
1040         * inspector/front-end/ScriptsPanel.js:
1041         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
1042         * inspector/front-end/Settings.js:
1043         (WebInspector.Settings):
1044         * inspector/front-end/WorkersSidebarPane.js:
1045         (WebInspector.WorkerListSidebarPane):
1046         (WebInspector.WorkerListSidebarPane.prototype._autoattachToWorkersClicked):
1047         * inspector/front-end/scriptsPanel.css:
1048         (#shared-workers-list):
1049
1050 2011-11-07  Vsevolod Vlasov  <vsevik@chromium.org>
1051
1052         Web Inspector: Add advanced search shortcut to ShortcutsScreen.
1053         https://bugs.webkit.org/show_bug.cgi?id=71302
1054
1055         Reviewed by Pavel Feldman.
1056
1057         * English.lproj/localizedStrings.js:
1058         * inspector/front-end/AdvancedSearchController.js:
1059         (WebInspector.AdvancedSearchController.createShortcut):
1060         * inspector/front-end/inspector.js:
1061         (WebInspector._registerShortcuts):
1062
1063 2011-11-07  Andreas Kling  <kling@webkit.org>
1064
1065         CSSImageValue: Remove inheritance from CachedImageClient.
1066         <http://webkit.org/b/71675>
1067
1068         Reviewed by Antti Koivisto.
1069
1070         CSSImageValue doesn't actually use any of the CachedImageClient
1071         functionality, and holds a reference to the resource via the
1072         CachedResourceHandle in StyleCachedImage.
1073
1074         So we can safely remove the multiple inheritance and simplify
1075         the class.
1076
1077         * css/CSSImageValue.cpp:
1078         (WebCore::CSSImageValue::~CSSImageValue):
1079         (WebCore::CSSImageValue::cachedImage):
1080         (WebCore::CSSImageValue::clearCachedImage):
1081         * css/CSSImageValue.h:
1082
1083 2011-11-07  Andreas Kling  <kling@webkit.org>
1084
1085         CSSPrimitiveValue: Remove unused virtual function parseString().
1086         <http://webkit.org/b/71671>
1087
1088         Reviewed by Antti Koivisto.
1089
1090         * css/CSSPrimitiveValue.cpp:
1091         * css/CSSPrimitiveValue.h:
1092
1093 2011-11-07  Andrey Kosyakov  <caseq@chromium.org>
1094
1095         Web Inspector: use toString as the Date object description.
1096         https://bugs.webkit.org/show_bug.cgi?id=71605
1097
1098         Reviewed by Yury Semikhatsky.
1099
1100         Test: inspector/remote-object.html
1101
1102         * inspector/InjectedScriptSource.js:
1103         (.):
1104
1105 2011-10-26  Andrey Kosyakov  <caseq@chromium.org>
1106
1107         Web Inspector: [refactoring] get JS-specific methods out of SourceFrame
1108         https://bugs.webkit.org/show_bug.cgi?id=70885
1109
1110         Reviewed by Pavel Feldman.
1111
1112         No new tests, as there's no new functionality.
1113
1114         * inspector/front-end/JavaScriptSourceFrame.js:
1115         (WebInspector.JavaScriptSourceFrame):
1116         (WebInspector.JavaScriptSourceFrame.prototype.willHide):
1117         (WebInspector.JavaScriptSourceFrame.prototype.requestContent):
1118         (WebInspector.JavaScriptSourceFrame.prototype.canEditSource):
1119         (WebInspector.JavaScriptSourceFrame.prototype.suggestedFileName):
1120         (WebInspector.JavaScriptSourceFrame.prototype.editContent):
1121         (WebInspector.JavaScriptSourceFrame.prototype.contentChanged):
1122         (WebInspector.JavaScriptSourceFrame.prototype.setReadonly):
1123         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu.addConditionalBreakpoint.didEditBreakpointCondition):
1124         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu.):
1125         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu.else.editBreakpointCondition.didEditBreakpointCondition):
1126         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu.else):
1127         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu):
1128         (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
1129         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
1130         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
1131         (WebInspector.JavaScriptSourceFrame.prototype.cancelEditing):
1132         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
1133         (WebInspector.JavaScriptSourceFrame.prototype._getPopoverAnchor):
1134         (WebInspector.JavaScriptSourceFrame.prototype._onShowPopover.showObjectPopover):
1135         (WebInspector.JavaScriptSourceFrame.prototype._onShowPopover):
1136         (WebInspector.JavaScriptSourceFrame.prototype._onHidePopover):
1137         (WebInspector.JavaScriptSourceFrame.prototype.addBreakpoint):
1138         (WebInspector.JavaScriptSourceFrame.prototype.removeBreakpoint):
1139         (WebInspector.JavaScriptSourceFrame.prototype._mouseDown):
1140         (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition.finishEditing):
1141         (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition):
1142         (WebInspector.JavaScriptSourceFrame.prototype._createConditionElement):
1143         (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine):
1144         (WebInspector.JavaScriptSourceFrame.prototype.clearExecutionLine):
1145         (WebInspector.JavaScriptSourceFrame.prototype._lineNumberAfterEditing):
1146         (WebInspector.JavaScriptSourceFrame.prototype._onTextViewerContentLoaded):
1147         (WebInspector.JavaScriptSourceFrameDelegate):
1148         (WebInspector.JavaScriptSourceFrameDelegate.prototype.requestContent):
1149         (WebInspector.JavaScriptSourceFrameDelegate.prototype.setBreakpoint):
1150         (WebInspector.JavaScriptSourceFrameDelegate.prototype.removeBreakpoint):
1151         (WebInspector.JavaScriptSourceFrameDelegate.prototype.updateBreakpoint):
1152         (WebInspector.JavaScriptSourceFrameDelegate.prototype.findBreakpoint):
1153         (WebInspector.JavaScriptSourceFrameDelegate.prototype.continueToLine):
1154         (WebInspector.JavaScriptSourceFrameDelegate.prototype.canEditScriptSource):
1155         (WebInspector.JavaScriptSourceFrameDelegate.prototype.setScriptSource):
1156         (WebInspector.JavaScriptSourceFrameDelegate.prototype.setScriptSourceIsBeingEdited):
1157         (WebInspector.JavaScriptSourceFrameDelegate.prototype.suggestedFileName):
1158         (WebInspector.JavaScriptSourceFrameDelegate.prototype.addToWatch):
1159         * inspector/front-end/ResourceView.js:
1160         (WebInspector.ResourceSourceFrame):
1161         * inspector/front-end/ScriptsPanel.js:
1162         (WebInspector.SourceFrameDelegateForScriptsPanel):
1163         * inspector/front-end/SourceFrame.js:
1164         (WebInspector.SourceFrame):
1165         (WebInspector.SourceFrame.prototype.willHide):
1166         (WebInspector.SourceFrame.prototype.get textViewer):
1167         (WebInspector.SourceFrame.prototype.requestContent):
1168         (WebInspector.SourceFrame.prototype._saveViewerState):
1169         (WebInspector.SourceFrame.prototype._restoreViewerState):
1170         (WebInspector.SourceFrame.prototype.beforeTextChanged):
1171         (WebInspector.SourceFrame.prototype.afterTextChanged):
1172         (WebInspector.SourceFrame.prototype._initializeTextViewer):
1173         (WebInspector.SourceFrame.prototype.populateLineGutterContextMenu):
1174         (WebInspector.SourceFrame.prototype.suggestedFileName):
1175         (WebInspector.SourceFrame.prototype.canEditSource):
1176         (WebInspector.SourceFrame.prototype.startEditing):
1177         (WebInspector.SourceFrame.prototype.commitEditing):
1178         (WebInspector.SourceFrame.prototype.didEditContent):
1179         (WebInspector.SourceFrame.prototype.editContent):
1180         (WebInspector.SourceFrame.prototype.cancelEditing):
1181         (WebInspector.SourceFrame.prototype.setReadOnly):
1182         * inspector/front-end/inspector.html:
1183
1184 2011-11-06  Andreas Kling  <kling@webkit.org>
1185
1186         CSSValue: Devirtualize cssValueType().
1187         <http://webkit.org/b/71667>
1188
1189         Reviewed by Antti Koivisto.
1190
1191         Keep the cssValueType in a CSSValue member instead of using
1192         virtual functions.
1193
1194         This is part of a project to completely devirtualize CSSValue
1195         <http://webkit.org/b/71666> and will incur a temporary object
1196         size regression for CSSValue while the work is ongoing.
1197
1198         * css/CSSInheritedValue.cpp:
1199         * css/CSSInheritedValue.h:
1200         (WebCore::CSSInheritedValue::CSSInheritedValue):
1201         * css/CSSInitialValue.cpp:
1202         * css/CSSInitialValue.h:
1203         (WebCore::CSSInitialValue::CSSInitialValue):
1204         * css/CSSPrimitiveValue.cpp:
1205         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1206         * css/CSSPrimitiveValue.h:
1207         * css/CSSValue.h:
1208         (WebCore::CSSValue::cssValueType):
1209         (WebCore::CSSValue::CSSValue):
1210         * css/CSSValueList.cpp:
1211         (WebCore::CSSValueList::CSSValueList):
1212         * css/CSSValueList.h:
1213
1214 2011-11-07  Pavel Feldman  <pfeldman@chromium.org>
1215
1216         Web Inspector: introduce UserAgent override setting.
1217         https://bugs.webkit.org/show_bug.cgi?id=71627
1218
1219         Reviewed by Yury Semikhatsky.
1220
1221         * English.lproj/localizedStrings.js:
1222         * inspector/InspectorResourceAgent.cpp:
1223         (WebCore::InspectorResourceAgent::clearFrontend):
1224         (WebCore::InspectorResourceAgent::applyUserAgentOverride):
1225         (WebCore::InspectorResourceAgent::setUserAgentOverride):
1226         * inspector/front-end/HelpScreen.js:
1227         (WebInspector.HelpScreen):
1228         (WebInspector.HelpScreen.prototype.show):
1229         (WebInspector.HelpScreen.prototype._onBlur):
1230         * inspector/front-end/NetworkManager.js:
1231         (WebInspector.NetworkManager.prototype._cacheDisabledSettingChanged):
1232         (WebInspector.NetworkManager.prototype._userAgentSettingChanged):
1233         * inspector/front-end/Settings.js:
1234         (WebInspector.Settings):
1235         * inspector/front-end/SettingsScreen.js:
1236         (WebInspector.SettingsScreen):
1237         (WebInspector.SettingsScreen.prototype._createSelectSetting.get for):
1238         (WebInspector.SettingsScreen.prototype._createCustomSetting):
1239         (WebInspector.SettingsScreen.prototype._createUserActionControl.checkboxClicked):
1240         (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const):
1241         (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.textDoubleClicked):
1242         (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.textChanged):
1243         * inspector/front-end/helpScreen.css:
1244         (.help-table td):
1245         (.help-content fieldset label):
1246
1247 2011-11-07  Alexander Pavlov  <apavlov@chromium.org>
1248
1249         Web Inspector: autocomplete combobox for Styles sidebar and Console.
1250         https://bugs.webkit.org/show_bug.cgi?id=65511
1251
1252         Reviewed by Pavel Feldman.
1253
1254         * inspector/front-end/ConsoleView.js:
1255         (WebInspector.ConsoleView):
1256         * inspector/front-end/StylesSidebarPane.js:
1257         (WebInspector.StylePropertyTreeElement.prototype):
1258         ():
1259         * inspector/front-end/TextPrompt.js:
1260         (WebInspector.TextPrompt):
1261         (WebInspector.TextPrompt.prototype.setSuggestBoxEnabled):
1262         (WebInspector.TextPrompt.prototype._attachInternal):
1263         (WebInspector.TextPrompt.prototype.applySuggestion):
1264         (WebInspector.TextPrompt.prototype.acceptSuggestion):
1265         (WebInspector.TextPromptWithHistory):
1266         * inspector/front-end/inspector.css:
1267         (.suggest-box.generic-suggest):
1268         (.suggest-box.generic-suggest.above-anchor):
1269         (.suggest-box.generic-suggest .content):
1270
1271 2011-11-07  Pavel Feldman  <pfeldman@chromium.org>
1272
1273         Web Inspector: split script-formatter test into multiple tests.
1274         https://bugs.webkit.org/show_bug.cgi?id=71607
1275
1276         Reviewed by Yury Semikhatsky.
1277
1278         Tests: inspector/debugger/script-formatter-breakpoints.html
1279                inspector/debugger/script-formatter-console.html
1280
1281         * inspector/front-end/ScriptsPanel.js:
1282         (WebInspector.ScriptsPanel.prototype._removeSourceFrame):
1283
1284 2011-11-07  Keishi Hattori  <keishi@webkit.org>
1285
1286         Change ColorChooser from singleton to ordinary object
1287         https://bugs.webkit.org/show_bug.cgi?id=71644
1288
1289         Reviewed by Kent Tamura.
1290
1291         Changing WebCore::ColorChooser from a singleton to an ordinary object can broaden how browsers implement the color chooser interface.
1292
1293         * WebCore.exp.in:
1294         * html/ColorInputType.cpp:
1295         (WebCore::ColorInputType::~ColorInputType):
1296         (WebCore::ColorInputType::setValue): If a chooser exists, calls Chrome::setSelectedColorInColorChooser
1297         (WebCore::ColorInputType::handleDOMActivateEvent):
1298         (WebCore::ColorInputType::detach):
1299         (WebCore::ColorInputType::didCleanup): Called after cleanup is complete.
1300         (WebCore::ColorInputType::cleanupColorChooser): Renamed from cleanupColorChooserIfCurrentClient.
1301         * html/ColorInputType.h:
1302         * html/HTMLInputElement.cpp:
1303         (WebCore::HTMLInputElement::selectColorInColorChooser):
1304         * html/HTMLInputElement.h:
1305         * loader/EmptyClients.h:
1306         (WebCore::EmptyChromeClient::cleanupColorChooser): Added colorChooser argument because there are many WebCore::ColorChoosers now.
1307         (WebCore::EmptyChromeClient::setSelectedColorInColorChooser): Ditto.
1308         * page/Chrome.cpp:
1309         (WebCore::Chrome::cleanupColorChooser): Added colorChooser argument because there are many WebCore::ColorChoosers now.
1310         (WebCore::Chrome::setSelectedColorInColorChooser): Ditto.
1311         * page/Chrome.h:
1312         * page/ChromeClient.h:
1313         * platform/ColorChooser.cpp:
1314         (WebCore::ColorChooserClient::~ColorChooserClient):
1315         (WebCore::ColorChooserClient::newColorChooser): Creates a new color chooser that is connected to itself.
1316         (WebCore::ColorChooserClient::discardChooser): Discards the connected color chooser.
1317         (WebCore::ColorChooser::ColorChooser): ColorChooser is RefCounted.
1318         (WebCore::ColorChooser::create): Creates a ColorChooser that is connected to the given ColorChooserClient.
1319         (WebCore::ColorChooser::~ColorChooser):
1320         (WebCore::ColorChooser::didChooseColor): Called from WebKit side when user chose a color. Calls ColorChooserClient::didChooseColor
1321         (WebCore::ColorChooser::didCleanup): Called from WebKit side when user color chooser was cleaned up. Calls ColorChooserClient::didCleanup
1322         * platform/ColorChooser.h:
1323         (WebCore::ColorChooserClient::chooser): Returns the current ColorChooser.
1324         (WebCore::ColorChooser::disconnectClient): Disconnects the ColorChooserClient.
1325         * testing/Internals.cpp:
1326         (WebCore::Internals::selectColorInColorChooser): Added element argument. This calls didChooseColor on the ColorChooser of that element.
1327         * testing/Internals.h:
1328         * testing/Internals.idl: Removed connectColorChooserClient and updated selectColorInColorChooser.
1329
1330 2011-11-07  Alexander Pavlov  <apavlov@chromium.org>
1331
1332         Web Inspector: Cannot edit elements commented with <!--
1333         https://bugs.webkit.org/show_bug.cgi?id=71357
1334
1335         Reviewed by Pavel Feldman.
1336
1337         * inspector/InspectorDOMAgent.cpp:
1338         (WebCore::InspectorDOMAgent::getOuterHTML):
1339         (WebCore::InspectorDOMAgent::setOuterHTML):
1340         * inspector/front-end/ElementsTreeOutline.js:
1341         (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
1342         (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
1343         (WebInspector.ElementsTreeElement.prototype._populateTextContextMenu):
1344         (WebInspector.ElementsTreeElement.prototype._populateNodeContextMenu):
1345
1346 2011-11-06  Noel Gordon  <noel.gordon@gmail.com>
1347
1348         Fix some style issues in ImageBuffer.h
1349         https://bugs.webkit.org/show_bug.cgi?id=71649
1350
1351         Reviewed by Kent Tamura.
1352
1353         No new tests. Style change only.
1354
1355         * platform/graphics/ImageBuffer.h:
1356
1357 2011-11-06  Keishi Hattori  <keishi@webkit.org>
1358
1359         InputType::fallbackValue and defaultValue should be const
1360         https://bugs.webkit.org/show_bug.cgi?id=71641
1361
1362         Reviewed by Kent Tamura.
1363     
1364         Changing InputType::fallbackValue and defaultValue to const. Also adding OVERRIDE.
1365
1366         * html/BaseCheckableInputType.cpp:
1367         (WebCore::BaseCheckableInputType::fallbackValue):
1368         * html/BaseCheckableInputType.h:
1369         * html/ColorInputType.cpp:
1370         (WebCore::ColorInputType::fallbackValue):
1371         * html/ColorInputType.h:
1372         * html/InputType.cpp:
1373         (WebCore::InputType::fallbackValue):
1374         (WebCore::InputType::defaultValue):
1375         * html/InputType.h:
1376         * html/RangeInputType.cpp:
1377         (WebCore::RangeInputType::fallbackValue):
1378         * html/RangeInputType.h:
1379         * html/ResetInputType.cpp:
1380         (WebCore::ResetInputType::defaultValue):
1381         * html/ResetInputType.h:
1382         * html/SubmitInputType.cpp:
1383         (WebCore::SubmitInputType::defaultValue):
1384         * html/SubmitInputType.h:
1385
1386 2011-11-06  Keishi Hattori  <keishi@webkit.org>
1387
1388         Remove ColorInputType::handleClickEvent
1389         https://bugs.webkit.org/show_bug.cgi?id=71640
1390
1391         Reviewed by Kent Tamura.
1392
1393         When you click the input color element, both ColorInputType::handleClickEvent and
1394         ColorInputType::handleDOMActivateEvent are called, causing Chrome::openColorChooser
1395         to be called too many times.
1396
1397         * html/ColorInputType.cpp: Removed ColorInputType::handleClickEvent
1398         * html/ColorInputType.h: Removed ColorInputType::handleClickEvent
1399
1400 2011-11-06  Keishi Hattori  <keishi@webkit.org>
1401
1402         Remove extra semicolon in ColorInputType
1403         https://bugs.webkit.org/show_bug.cgi?id=71639
1404
1405         Reviewed by Kent Tamura.
1406
1407         * html/ColorInputType.cpp:
1408         (WebCore::ColorInputType::setValue):
1409
1410 2011-11-06  Dominic Cooney  <dominicc@chromium.org>
1411
1412         Remove initBeforeLoadEvent method
1413         https://bugs.webkit.org/show_bug.cgi?id=71636
1414
1415         Reviewed by Adam Barth.
1416
1417         Test: fast/dom/Window/window-properties.html
1418
1419         * dom/BeforeLoadEvent.h:
1420         * dom/BeforeLoadEvent.idl:
1421
1422 2011-11-06  Adam Barth  <abarth@webkit.org>
1423
1424         Don't crash when a context hasn't been created.  This fixed a
1425         testing-only crash on the bots in the Chromium port.
1426
1427         * testing/v8/WebCoreTestSupport.cpp:
1428         (WebCoreTestSupport::resetInternalsObject):
1429
1430 2011-11-06  Darin Adler  <darin@apple.com>
1431
1432         Leaks seen in RenderFlowThread::setRegionRangeForBox on Leaks bot
1433         https://bugs.webkit.org/show_bug.cgi?id=71260
1434
1435         Reviewed by Mark Rowe.
1436
1437         Memory leak fix covered by existing tests.
1438
1439         * rendering/RenderFlowThread.cpp:
1440         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
1441         Instead of calling remove, call take and then delete, since the
1442         values of the map are owned and need to be deleted when removed.
1443
1444 2011-11-06  Adam Barth  <abarth@webkit.org>
1445
1446         Implement the sandbox directive for CSP
1447         https://bugs.webkit.org/show_bug.cgi?id=71604
1448
1449         Reviewed by Sam Weinig.
1450
1451         At TPAC, Microsoft was pushing pretty hard to add the sandbox directive
1452         to CSP.  There's a question about whether it's going to be in CSP 1.0
1453         or CSP 1.1, but it seems to be clearly headed into the spec.
1454
1455         This patch implements the sandbox directive for CSP.  It's built on the
1456         same machinery we use for the sandbox attribute for iframe.  Now that
1457         I've done the implementation, I'm going to write up some concrete text
1458         for the spec.
1459
1460         Tests: http/tests/security/contentSecurityPolicy/sandbox-allow-scripts-subframe.html
1461                http/tests/security/contentSecurityPolicy/sandbox-allow-scripts.html
1462                http/tests/security/contentSecurityPolicy/sandbox-empty-subframe.html
1463                http/tests/security/contentSecurityPolicy/sandbox-empty.html
1464
1465         * page/ContentSecurityPolicy.cpp:
1466         (WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
1467         (WebCore::ContentSecurityPolicy::applySandboxPolicy):
1468         (WebCore::ContentSecurityPolicy::addDirective):
1469         * page/ContentSecurityPolicy.h:
1470
1471 2011-11-03  Filip Pizlo  <fpizlo@apple.com>
1472
1473         JSC should be able to sample itself in a more flexible way than just sampling flags
1474         https://bugs.webkit.org/show_bug.cgi?id=71522
1475
1476         Reviewed by Gavin Barraclough.
1477
1478         No new tests, since no functionality changed.
1479
1480         * ForwardingHeaders/wtf/Spectrum.h: Added.
1481
1482 2011-11-06  Nikita Vasilyev  <me@elv1s.ru>
1483
1484         Web Inspector: Unindent edited text by pressing Shift + Tab
1485         https://bugs.webkit.org/show_bug.cgi?id=70181
1486
1487         Indent and unindent text in all selected lines.
1488
1489         Reviewed by Pavel Feldman.
1490
1491         * inspector/front-end/TextViewer.js:
1492         (WebInspector.TextEditorMainPanel.prototype.unindentLines.get var):
1493         (WebInspector.TextEditorMainPanel.prototype.unindentLines):
1494
1495 2011-11-05  Martin Robinson  <mrobinson@igalia.com>
1496
1497         Remove ContextShadow
1498         https://bugs.webkit.org/show_bug.cgi?id=71617
1499
1500         Reviewed by Ariya Hidayat.
1501
1502         No new tests. This patch does not change behavior.
1503
1504         Completely remove ContextShadow. It's unused, unmaintained, and
1505         replaced by ShadowBlur.
1506
1507         * WebCore.gypi: Remove references to deleted files.
1508         * WebCore.vcproj/WebCore.vcproj: Remove references to deleted files.
1509         * platform/graphics/ContextShadow.cpp: Removed.
1510         * platform/graphics/ContextShadow.h: Removed.
1511         * platform/gtk/WidgetRenderingContext.cpp: Remove now-inaccurate TODO.
1512
1513 2011-11-04  Jon Lee  <jonlee@apple.com>
1514
1515         Dragging a file onto <input type="file"> should give distinct visual feedback
1516         https://bugs.webkit.org/show_bug.cgi?id=13897
1517         <rdar://problem/5232483>
1518
1519         Reviewed by Dan Bernstein.
1520
1521         When hovering over a file input element, we set the button's state to active
1522         to differentiate dragging one file over the input element (which populates that
1523         element) versus over the document (which would load the file into the view).
1524
1525         * html/HTMLInputElement.cpp:
1526         (WebCore::HTMLInputElement::HTMLInputElement):
1527         (WebCore::HTMLInputElement::canReceiveDroppedFiles):
1528         (WebCore::HTMLInputElement::setCanReceiveDroppedFiles): If set, the element
1529         is updated, which sets the active state on the button control.
1530         * html/HTMLInputElement.h: Add a boolean member representing whether the file
1531         input can receive dropped files.
1532         * page/DragController.cpp:
1533         (WebCore::DragController::DragController): Update/set the file input that
1534         can receive dropped files.
1535         (WebCore::DragController::dragExited):
1536         (WebCore::DragController::tryDocumentDrag):
1537         (WebCore::DragController::concludeEditDrag):
1538         * page/DragController.h:
1539         * rendering/RenderFileUploadControl.cpp:
1540         (WebCore::RenderFileUploadControl::updateFromElement): Sets the button active
1541         state if the input can receive dropped files.
1542
1543 2011-11-05  Darin Adler  <darin@apple.com>
1544
1545         Improve pending resource hash table code, including fixing a memory leak
1546         https://bugs.webkit.org/show_bug.cgi?id=71616
1547
1548         Reviewed by Adam Roben.
1549
1550         Memory leak fix and refactoring covered by existing tests.
1551
1552         * svg/SVGDocumentExtensions.cpp:
1553         (WebCore::SVGDocumentExtensions::addPendingResource): Replace the combination
1554         of contains, get, and add with just add, removing an extra unneeded hash table
1555         lookup each time this function is called.
1556         (WebCore::SVGDocumentExtensions::isElementInPendingResources): Added a comment
1557         about the performance of this function. Removed unnecessary check for an empty
1558         map; the code already efficiently exits doing nothing without the check.
1559         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources): Removed
1560         unnecessary check for an empty map; the code already efficiently does nothing
1561         without the check. Use removePendingResource rather than calling remove to
1562         avoid leaking the SVGPendingElements set.
1563         (WebCore::SVGDocumentExtensions::removePendingResource): Replace the
1564         combination of get and remove with a call to take, removing an extra
1565         unneeded hash table lookup each time this function is called
1566
1567 2011-11-05  Dan Winship  <danw@gnome.org>
1568
1569         [GTK] Actually use the user_data arguments to gio async functions
1570         instead of using g_object_set_data() to basically reinvent them.
1571         https://bugs.webkit.org/show_bug.cgi?id=71614
1572
1573         Reviewed by Martin Robinson.
1574
1575         No new tests; behavior is unchanged
1576
1577         * platform/network/soup/ResourceHandleSoup.cpp:
1578         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1579         (WebCore::cleanupSoupRequestOperation):
1580         (WebCore::sendRequestCallback):
1581         (WebCore::startHTTPRequest):
1582         (WebCore::ResourceHandle::platformSetDefersLoading):
1583         (WebCore::closeCallback):
1584         (WebCore::readCallback):
1585         (WebCore::startNonHTTPRequest):
1586
1587 2011-11-05  Dan Winship  <danw@gnome.org>
1588
1589         [GTK] Don't unnecessarily 0-initialize read buffers.
1590         https://bugs.webkit.org/show_bug.cgi?id=71612
1591
1592         Reviewed by Martin Robinson.
1593
1594         No new tests; behavior is unchanged
1595
1596         * platform/network/soup/ResourceHandleSoup.cpp:
1597         (WebCore::sendRequestCallback):
1598
1599 2011-11-05  Dan Winship  <danw@gnome.org>
1600
1601         [GTK] Remove a bit of dead code
1602         https://bugs.webkit.org/show_bug.cgi?id=71613
1603
1604         Reviewed by Martin Robinson.
1605
1606         No new tests; behavior is unchanged
1607
1608         * platform/network/soup/ResourceHandleSoup.cpp:
1609         (WebCore::readCallback): the caller that needed the convertToUTF16
1610         code was removed in r77408, but the code was accidentally left
1611         behind.
1612
1613 2011-11-05  Adam Barth  <abarth@webkit.org>
1614
1615         Refactor sandbox flag calculation to make implementing CSP sandbox directive easier
1616         https://bugs.webkit.org/show_bug.cgi?id=71603
1617
1618         Reviewed by Sam Weinig.
1619
1620         This patch changes the way we compute sandbox bits.  Instead of caching
1621         the result on Frame, we always compute the sandbox bits for a new
1622         document fresh from the inputs to the process (the sandbox attribute
1623         and the forced sandbox flags).
1624
1625         This patch is just refactoring.  It shouldn't have an observable
1626         effects.  This patch makes it easier to implement CSP's sandbox
1627         directive in a subsequent patch.
1628
1629         * dom/Document.cpp:
1630         (WebCore::Document::initSecurityContext):
1631         * html/HTMLFrameOwnerElement.cpp:
1632         (WebCore::HTMLFrameOwnerElement::setSandboxFlags):
1633         * loader/FrameLoader.cpp:
1634         (WebCore::FrameLoader::FrameLoader):
1635         (WebCore::FrameLoader::init):
1636         (WebCore::FrameLoader::effectiveSandboxFlags):
1637         (WebCore::createWindow):
1638         * loader/FrameLoader.h:
1639         (WebCore::FrameLoader::forceSandboxFlags):
1640
1641 2011-11-05  Andreas Kling  <kling@webkit.org>
1642
1643         CSSStyleDeclaration: Devirtualize isMutableStyleDeclaration().
1644         https://bugs.webkit.org/show_bug.cgi?id=71609
1645
1646         Reviewed by Anders Carlsson.
1647
1648         Add a bool member to CSSStyleDeclaration that determines whether
1649         it's a CSSMutableDeclaration.
1650
1651         * css/CSSMutableStyleDeclaration.cpp:
1652         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
1653         * css/CSSMutableStyleDeclaration.h:
1654         * css/CSSStyleDeclaration.cpp:
1655         (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
1656         * css/CSSStyleDeclaration.h:
1657         (WebCore::CSSStyleDeclaration::isMutableStyleDeclaration):
1658
1659 2011-11-05  Andreas Kling  <kling@webkit.org>
1660
1661         Web Inspector: Simplify InspectorCSSAgent::inlineStyleElement().
1662         https://bugs.webkit.org/show_bug.cgi?id=71608
1663
1664         Reviewed by Pavel Feldman.
1665
1666         Use CSSMutableStyleDeclaration::isInlineStyleDeclaration() instead
1667         of doing the same checks manually.
1668
1669         * inspector/InspectorCSSAgent.cpp:
1670         (WebCore::InspectorCSSAgent::inlineStyleElement):
1671
1672 2011-11-05  Simon Hausmann  <simon.hausmann@nokia.com>
1673
1674         Reviewed by Andreas Kling.
1675
1676         Removed duplicated npruntime_internal.h from bindings/v8
1677         in favour of the one from bridge/, which has a few more
1678         #undefs.
1679
1680         https://bugs.webkit.org/show_bug.cgi?id=45617
1681
1682         * bindings/v8/npruntime_internal.h: Removed.
1683         * Target.pri: Removed strange occurence here.
1684
1685 2011-11-05  Simon Hausmann  <simon.hausmann@nokia.com>
1686
1687         Remove empty and unused dom/PositionCreationFunctions.h header file
1688         https://bugs.webkit.org/show_bug.cgi?id=71552
1689
1690         Reviewed by Kenneth Rohde Christiansen.
1691
1692         The file is empty (0 bytes) and not used anywhere. It was added in
1693         2009 in r48234 but hasn't been touched since then.
1694
1695         * WebCore.gypi:
1696         * dom/PositionCreationFunctions.h: Removed.
1697
1698 2011-11-04  Adam Barth  <abarth@webkit.org>
1699
1700         Fix assert after running tests in dumpAsText folders.  See
1701         https://bugs.webkit.org/show_bug.cgi?id=71599 for discussion.  This
1702         patch reverts part of a slightly over-agressive refactoring in
1703         http://trac.webkit.org/changeset/99347.
1704
1705         * dom/Document.cpp:
1706         (WebCore::Document::setIsViewSource):
1707
1708 2011-11-04  Ben Wells  <benwells@chromium.org>
1709
1710         Canvas drawImage(canvas) with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors
1711         https://bugs.webkit.org/show_bug.cgi?id=71537
1712
1713         Reviewed by Stephen White.
1714
1715         drawImage(canvas) now uses the same approach as drawImage(image) to fix these errors.
1716
1717         Test: fast/canvas/canvas-composite-canvas.html
1718
1719         * html/canvas/CanvasRenderingContext2D.cpp:
1720         (WebCore::CanvasRenderingContext2D::drawImage):
1721         (WebCore::drawImageToContext):
1722         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
1723         * html/canvas/CanvasRenderingContext2D.h:
1724
1725 2011-11-04  Adam Barth  <abarth@webkit.org>
1726
1727         JavaScript URLs execute in sandboxed iframes
1728         https://bugs.webkit.org/show_bug.cgi?id=71599
1729
1730         Reviewed by Eric Seidel.
1731
1732         This patch fixes the intentional regression I introduced earlier today
1733         by moving the sandbox bits from SecurityOrigin to Document. In the
1734         process, I renamed SecurityOrigin::createEmpty to
1735         SecurityOrigin::createUnique to better align with HTML5 terminology.
1736
1737         * WebCore.exp.in:
1738         * bindings/ScriptControllerBase.cpp:
1739         (WebCore::ScriptController::canExecuteScripts):
1740         * dom/Document.cpp:
1741         (WebCore::Document::setIsViewSource):
1742         (WebCore::Document::initSecurityContext):
1743         * dom/ScriptExecutionContext.cpp:
1744         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
1745         * dom/ScriptExecutionContext.h:
1746         (WebCore::ScriptExecutionContext::sandboxFlags):
1747         (WebCore::ScriptExecutionContext::enforceSandboxFlags):
1748         (WebCore::ScriptExecutionContext::isSandboxed):
1749         * html/HTMLAppletElement.cpp:
1750         (WebCore::HTMLAppletElement::canEmbedJava):
1751         * loader/DocumentWriter.cpp:
1752         (WebCore::DocumentWriter::begin):
1753         * loader/FrameLoader.cpp:
1754         (WebCore::isDocumentSandboxed):
1755         (WebCore::FrameLoader::addHTTPOriginIfNeeded):
1756         * loader/PolicyChecker.cpp:
1757         (WebCore::PolicyChecker::checkNewWindowPolicy):
1758         * loader/SubframeLoader.cpp:
1759         (WebCore::SubframeLoader::requestPlugin):
1760         * page/SecurityOrigin.cpp:
1761         (WebCore::SecurityOrigin::SecurityOrigin):
1762         (WebCore::SecurityOrigin::create):
1763         (WebCore::SecurityOrigin::createUnique):
1764         * page/SecurityOrigin.h:
1765
1766 2011-11-04  Joseph Pecoraro  <pecoraro@apple.com>
1767
1768         Potential Unused Param Build Issue
1769         https://bugs.webkit.org/show_bug.cgi?id=71598
1770
1771         Reviewed by Kent Tamura.
1772
1773         * html/HTMLSelectElement.cpp:
1774         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
1775
1776 2011-11-04  Stephen Chenney  <schenney@chromium.org>
1777
1778         Crash in ScrollAnimator.cpp
1779         https://bugs.webkit.org/show_bug.cgi?id=69865
1780
1781         The code in ScrollAnimator assumes that horizontal per-page mouse
1782         wheel events cannot happen, which is not true. This patch adds layout
1783         tests for all paging wheel event situations and fixes the broken
1784         horizontal case.
1785
1786         Reviewed by Anders Carlsson
1787
1788         Tests: fast/events/platform-wheelevent-paging-x-in-non-scrolling-div.html
1789                fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html
1790                fast/events/platform-wheelevent-paging-x-in-scrolling-div.html
1791                fast/events/platform-wheelevent-paging-x-in-scrolling-page.html
1792                fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html
1793                fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html
1794                fast/events/platform-wheelevent-paging-y-in-non-scrolling-div.html
1795                fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html
1796                fast/events/platform-wheelevent-paging-y-in-scrolling-div.html
1797                fast/events/platform-wheelevent-paging-y-in-scrolling-page.html
1798
1799         * platform/PlatformWheelEvent.h: Modify the comment to reflect the new
1800         reality.
1801         * platform/ScrollAnimator.cpp:
1802         (WebCore::ScrollAnimator::handleWheelEvent): Modified the code to handle the
1803         horizontal per-page wheel event case.
1804
1805 2011-11-04  Rafael Weinstein  <rafaelw@chromium.org>
1806
1807         [MutationObservers] Refactor MutationObserverRegistration into its own class that is
1808         referenced by registration points
1809
1810         https://bugs.webkit.org/show_bug.cgi?id=71577
1811
1812         Reviewed by Ojan Vafai.
1813
1814         MutationObserverRegistration is now owned by the node which is observed. If transient
1815         registrations are created, they hold a reference to this object.
1816
1817         The ownership relationship between Node, MutationObserverRegistration &
1818         WebKitMutationObserver now goes like this: WebKitMutationObserver is RefCounted -
1819         and only script and MutationObserverRegistration take references to it. Exactly
1820         one MutationObserverRegistration can exist for any given tuple of
1821         <Node, WebKitMutationObserver>. This represents an observer observing at a given
1822         Node. Further observation by the same observer has the effect of *resetting*
1823         the existing observation. The Node owns the MutationObserverRegistration.
1824         Transient registrations are only pointers to the registration. The registration
1825         keeps a RefPtr to its registration node and all of its transient registration nodes
1826         as long as *any* transient registrations exist. This ensures the registration
1827         and all registration nodes stay alive at least until the end of the microtask.
1828
1829         No tests required - refactor only.
1830
1831         * GNUmakefile.list.am:
1832         * WebCore.gypi:
1833         * WebCore.pro:
1834         * WebCore.vcproj/WebCore.vcproj:
1835         * WebCore.xcodeproj/project.pbxproj:
1836         * dom/CharacterData.cpp:
1837         (WebCore::enqueueCharacterDataMutationRecord):
1838         * dom/ChildListMutationScope.cpp:
1839         (WebCore::MutationAccumulationRouter::MutationAccumulationRouter::incrementScopingLevel):
1840         * dom/Element.cpp:
1841         (WebCore::enqueueAttributesMutationRecord):
1842         * dom/MutationObserverRegistration.cpp: Added.
1843         (WebCore::MutationObserverRegistration::create):
1844         (WebCore::MutationObserverRegistration::MutationObserverRegistration):
1845         (WebCore::MutationObserverRegistration::~MutationObserverRegistration):
1846         (WebCore::MutationObserverRegistration::resetObservation):
1847         (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
1848         (WebCore::MutationObserverRegistration::clearTransientRegistrations):
1849         (WebCore::MutationObserverRegistration::unregister):
1850         (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom):
1851         * dom/MutationObserverRegistration.h: Copied from Source/WebCore/dom/WebKitMutationObserver.h.
1852         (WebCore::MutationObserverRegistration::observer):
1853         (WebCore::MutationObserverRegistration::deliveryOptions):
1854         * dom/Node.cpp:
1855         (WebCore::Node::clearRareData):
1856         (WebCore::Node::mutationObserverRegistry):
1857         (WebCore::Node::transientMutationObserverRegistry):
1858         (WebCore::addObserverToDeliverySet):
1859         (WebCore::Node::collectMatchingObserversForMutation):
1860         (WebCore::Node::getRegisteredMutationObserversOfType):
1861         (WebCore::Node::registerMutationObserver):
1862         (WebCore::Node::unregisterMutationObserver):
1863         (WebCore::Node::registerTransientMutationObserver):
1864         (WebCore::Node::unregisterTransientMutationObserver):
1865         (WebCore::Node::notifyMutationObserversNodeWillDetach):
1866         * dom/Node.h:
1867         * dom/NodeRareData.h:
1868         (WebCore::NodeRareData::mutationObserverRegistry):
1869         (WebCore::NodeRareData::ensureMutationObserverRegistry):
1870         (WebCore::NodeRareData::transientMutationObserverRegistry):
1871         (WebCore::NodeRareData::ensureTransientMutationObserverRegistry):
1872         * dom/WebKitMutationObserver.cpp:
1873         (WebCore::WebKitMutationObserver::~WebKitMutationObserver):
1874         (WebCore::WebKitMutationObserver::observe):
1875         (WebCore::WebKitMutationObserver::disconnect):
1876         (WebCore::WebKitMutationObserver::observationStarted):
1877         (WebCore::WebKitMutationObserver::observationEnded):
1878         (WebCore::WebKitMutationObserver::deliver):
1879         * dom/WebKitMutationObserver.h:
1880
1881 2011-11-04  Raymond Toy  <rtoy@google.com>
1882
1883        Add methods to compute magnitude and phase response for biquads
1884        https://bugs.webkit.org/show_bug.cgi?id=71055
1885
1886        Reviewed by Kenneth Russell.
1887
1888
1889         * platform/audio/Biquad.cpp:
1890         (WebCore::Biquad::getFrequencyResponse):
1891         Computes the magnitude and phase (radians) response for the given
1892         biquad at the specified set of (normalized) frequencies.
1893         * platform/audio/Biquad.h:
1894         Declare getFrequencyResponse.
1895         * webaudio/BiquadDSPKernel.cpp:
1896         (WebCore::BiquadDSPKernel::updateCoefficientsIfNecessary):
1897         Factor out the code that updates filter coefficients.  Allow the
1898         caller to specify whether the smoothed values are used or not and
1899         whether we do the update even if the coefficients are not dirty.
1900         (WebCore::BiquadDSPKernel::process):
1901         Use updateCoefficientsIfNecessary to update.
1902         (WebCore::BiquadDSPKernel::getFrequencyResponse):
1903         Implmentation of getFrequencyResponse.
1904         * webaudio/BiquadDSPKernel.h:
1905         Declare getFrequencyResponse.
1906         * webaudio/BiquadFilterNode.cpp:
1907         (WebCore::BiquadFilterNode::getFrequencyResponse):
1908         Implementation of getFrequencyResponse
1909         * webaudio/BiquadFilterNode.h:
1910         Declare getFrequencyResponse.
1911         * webaudio/BiquadFilterNode.idl:
1912         Define interface to getFrequencyResponse.
1913         * webaudio/BiquadProcessor.cpp:
1914         (WebCore::BiquadProcessor::checkForDirtyCoefficients):
1915         Factor out code for checking for dirty coefficients.
1916         (WebCore::BiquadProcessor::process):
1917         Use checkForDirtyCoefficients.
1918         (WebCore::BiquadProcessor::getFrequencyResponse):
1919         Implementation of getFrequencyResponse
1920         * webaudio/BiquadProcessor.h:
1921         Declare getFrequencyResponse.
1922
1923 2011-11-04  Benjamin Poulain  <bpoulain@apple.com>
1924
1925         [Mac] ResourceRequest's nsURLRequest() does not differentiate null and empty URLs with CFNetwork
1926         https://bugs.webkit.org/show_bug.cgi?id=71539
1927
1928         Reviewed by David Kilzer.
1929
1930         In order to have CFURL and NSURL to be consistent when both are used on Mac,
1931         KURL::createCFURL() is changed to support empty URL values.
1932
1933         * platform/cf/KURLCFNet.cpp:
1934         (WebCore::createCFURLFromBuffer):
1935         (WebCore::KURL::createCFURL):
1936         * platform/mac/KURLMac.mm:
1937         (WebCore::KURL::operator NSURL *):
1938         (WebCore::KURL::createCFURL):
1939
1940 2011-11-04  Fady Samuel  <fsamuel@chromium.org>
1941
1942         CSS Aspect Ratio Property Parsing Stage
1943         https://bugs.webkit.org/show_bug.cgi?id=70707
1944
1945         Reviewed by Ojan Vafai.
1946
1947         Added parsing support for -webkit-aspect-ratio CSS property.
1948         The spec can be found here: http://www.xanthir.com/blog/b4810
1949
1950         Test: fast/css/aspect-ratio-parsing-tests.html
1951
1952         * CMakeLists.txt:
1953         * GNUmakefile.list.am:
1954         * Target.pri:
1955         * WebCore.gypi:
1956         * WebCore.vcproj/WebCore.vcproj:
1957         * WebCore.xcodeproj/project.pbxproj:
1958         * css/CSSAspectRatioValue.cpp: Added.
1959         (WebCore::CSSAspectRatioValue::~CSSAspectRatioValue):
1960         (WebCore::CSSAspectRatioValue::cssText):
1961         * css/CSSAspectRatioValue.h: Added.
1962         (WebCore::CSSAspectRatioValue::create):
1963         (WebCore::CSSAspectRatioValue::numeratorValue):
1964         (WebCore::CSSAspectRatioValue::denominatorValue):
1965         (WebCore::CSSAspectRatioValue::CSSAspectRatioValue):
1966         * css/CSSComputedStyleDeclaration.cpp:
1967         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1968         * css/CSSMutableStyleDeclaration.cpp:
1969         * css/CSSParser.cpp:
1970         (WebCore::CSSParser::parseValue):
1971         (WebCore::CSSParser::parseAspectRatio):
1972         * css/CSSParser.h:
1973         * css/CSSProperty.cpp:
1974         (WebCore::CSSProperty::isInheritedProperty):
1975         * css/CSSPropertyNames.in:
1976         * css/CSSStyleSelector.cpp:
1977         (WebCore::CSSStyleSelector::applyProperty):
1978
1979 2011-11-04  Adam Barth  <abarth@webkit.org>
1980
1981         Delete FrameLoader::isSandboxed
1982         https://bugs.webkit.org/show_bug.cgi?id=71591
1983
1984         Reviewed by Eric Seidel.
1985
1986         We should always use document->securityOrigin()->isSandboxed because
1987         that picks up the sandbox bits that are frozen on the document rather
1988         than the ones that could change on the Frame.
1989
1990         This patch starts preparing us to implement the CSP sandbox directive,
1991         which will cause use to have document sandbox bits without any attribute.
1992
1993         * bindings/ScriptControllerBase.cpp:
1994         (WebCore::ScriptController::canExecuteScripts):
1995             - This call site was the only functional site left where these two
1996               could be different. This patch causes one progression and one
1997               regression. The progression is that we now correctly freeze the
1998               allow-scripts bit when a document is created, but the regression
1999               is we now allow the execution of JavaScript URLs, as noted in 
2000               fast/frames/sandboxed-iframe-scripting.html. That's even more of
2001               an edge case, so I think it's a win overall.
2002         * loader/DocumentWriter.cpp:
2003         (WebCore::DocumentWriter::begin):
2004             - I don't think this part of the change is testable. There's no
2005               time to execute script between when the bits get copied off the
2006               Frame and when they're checked, so there's no time to change them.
2007         * loader/FrameLoader.cpp:
2008             - Update FIXME comment that is now fixed.
2009         * loader/FrameLoader.h:
2010             - Remove wrong API.
2011
2012 2011-11-04  Adam Barth  <abarth@webkit.org>
2013
2014         When CSP blocks mixed content, we shouldn't also warn about mixed content
2015         https://bugs.webkit.org/show_bug.cgi?id=71588
2016
2017         Reviewed by Eric Seidel.
2018
2019         Getting both warnings confused some early adopters.  They thought the
2020         insecure loads were happening even though they blocked them with CSP.
2021         This patch restricts the mixed content warnings to show only when the
2022         load isn't already blocked by CSP or by the embedder.
2023
2024         Test: http/tests/security/contentSecurityPolicy/block-mixed-content-hides-warning.html
2025
2026         * loader/cache/CachedResourceLoader.cpp:
2027         (WebCore::CachedResourceLoader::canRequest):
2028
2029 2011-11-04  Michael Nordman  <michaeln@google.coom>
2030
2031         Allow ScriptExecutionContext::addMessage to be called from background threads.
2032         https://bugs.webkit.org/show_bug.cgi?id=71575
2033
2034         Reviewed by Nate Chapin.
2035
2036         No new tests.
2037
2038         * dom/Document.cpp:
2039         (WebCore::Document::addMessage):
2040         * dom/ScriptExecutionContext.cpp:
2041         * dom/ScriptExecutionContext.h:
2042         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::create):
2043         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::performTask):
2044         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
2045         * workers/WorkerContext.cpp:
2046         (WebCore::WorkerContext::addMessage):
2047
2048 2011-11-04  Shawn Singh  <shawnsingh@chromium.org>
2049
2050         [chromium] Re-named the original scissorRect to clipRect
2051         https://bugs.webkit.org/show_bug.cgi?id=71580
2052
2053         Reviewed by James Robinson.
2054
2055         Existing tests are updated appropriately; and no new behavior is
2056         introduced by this patch.
2057
2058         * platform/graphics/chromium/LayerChromium.cpp:
2059         (WebCore::LayerChromium::LayerChromium):
2060         * platform/graphics/chromium/LayerChromium.h:
2061         (WebCore::LayerChromium::setUsesLayerClipping):
2062         (WebCore::LayerChromium::usesLayerClipping):
2063         (WebCore::LayerChromium::clipRect):
2064         (WebCore::LayerChromium::setClipRect):
2065         * platform/graphics/chromium/LayerRendererChromium.cpp:
2066         (WebCore::LayerRendererChromium::drawLayersInternal):
2067         (WebCore::LayerRendererChromium::drawLayer):
2068         * platform/graphics/chromium/RenderSurfaceChromium.h:
2069         (WebCore::RenderSurfaceChromium::clipRect):
2070         (WebCore::RenderSurfaceChromium::setClipRect):
2071         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2072         (WebCore::CCLayerImpl::CCLayerImpl):
2073         * platform/graphics/chromium/cc/CCLayerImpl.h:
2074         (WebCore::CCLayerImpl::setUsesLayerClipping):
2075         (WebCore::CCLayerImpl::usesLayerClipping):
2076         (WebCore::CCLayerImpl::clipRect):
2077         (WebCore::CCLayerImpl::setClipRect):
2078         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2079         (WebCore::CCLayerTreeHost::updateLayers):
2080         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2081         (WebCore::layerShouldBeSkipped):
2082         (WebCore::calculateDrawTransformsAndVisibilityInternal):
2083         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
2084         (WebCore::CCLayerTreeHostCommon::calculateVisibleLayerRect):
2085         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2086         (WebCore::CCRenderSurface::draw):
2087         * platform/graphics/chromium/cc/CCRenderSurface.h:
2088         (WebCore::CCRenderSurface::setClipRect):
2089         (WebCore::CCRenderSurface::clipRect):
2090
2091 2011-11-04  Dmitry Lomov  <dslomov@google.com>
2092
2093         Add the ability to transfer ArrayBuffer and "neuter" it.
2094         https://bugs.webkit.org/show_bug.cgi?id=71535
2095
2096         Reviewed by David Levin.
2097
2098         * html/canvas/ArrayBuffer.cpp:
2099         (WebCore::ArrayBuffer::create):
2100         (WebCore::ArrayBuffer::ArrayBuffer):
2101         (WebCore::ArrayBuffer::data):
2102         (WebCore::ArrayBuffer::byteLength):
2103         (WebCore::ArrayBuffer::transfer):
2104         (WebCore::ArrayBufferContents::~ArrayBufferContents):
2105         (WebCore::ArrayBufferContents::tryAllocate):
2106         (WebCore::ArrayBuffer::addView):
2107         (WebCore::ArrayBuffer::removeView):
2108         * html/canvas/ArrayBuffer.h:
2109         (WebCore::ArrayBufferContents::ArrayBufferContents):
2110         (WebCore::ArrayBufferContents::data):
2111         (WebCore::ArrayBufferContents::sizeInBytes):
2112         (WebCore::ArrayBufferContents::release):
2113         (WebCore::ArrayBuffer::~ArrayBuffer):
2114         * html/canvas/ArrayBufferView.cpp:
2115         (WebCore::ArrayBufferView::ArrayBufferView):
2116         (WebCore::ArrayBufferView::~ArrayBufferView):
2117         (WebCore::ArrayBufferView::neuter):
2118         * html/canvas/ArrayBufferView.h:
2119         * html/canvas/DataView.cpp:
2120         (WebCore::DataView::neuter):
2121         (WebCore::DataView::neuterBinding):
2122         * html/canvas/DataView.h:
2123         * html/canvas/TypedArrayBase.h:
2124         (WebCore::TypedArrayBase::neuter):
2125         (WebCore::TypedArrayBase::neuterBinding):
2126
2127 2011-11-04  Noel Gordon  <noel.gordon@gmail.com>
2128
2129         [Chromium] Implement canvas.toDataURL("image/webp")
2130         https://bugs.webkit.org/show_bug.cgi?id=70172
2131
2132         Reviewed by Adam Barth.
2133
2134         Add a webp image encoder for the chromium skia ports, add it to the canvas
2135         element toDataURL() flow with support for an optional quality [0.0-1.0].
2136         Use a webp compression method (3) that provides good speed and compression
2137         performance for this image format, and works well for various input image
2138         types: line-art, screen-shots, and photographic images.
2139
2140         Test: fast/canvas/canvas-toDataURL-webp.html
2141
2142         * WebCore.gypi:
2143         * platform/chromium/MIMETypeRegistryChromium.cpp:
2144         (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
2145         * platform/graphics/skia/ImageBufferSkia.cpp:
2146         (WebCore::ImageToDataURL):
2147         * platform/image-encoders/skia/WEBPImageEncoder.cpp: Added.
2148         (WebCore::writeOutput):
2149         (WebCore::importPicture):
2150         (WebCore::importPictureBGRA):
2151         (WebCore::importPictureRGBA):
2152         (WebCore::encodePixels):
2153         (WebCore::WEBPImageEncoder::encode):
2154         * platform/image-encoders/skia/WEBPImageEncoder.h: Added.
2155
2156 2011-11-04  Patrick Gansterer  <paroga@webkit.org>
2157
2158         [Qt] Remove ENABLE_SQLITE from qmake files
2159         https://bugs.webkit.org/show_bug.cgi?id=71546
2160
2161         Reviewed by Simon Hausmann.
2162
2163         ENABLE_SQLITE is required to build WebCore, so remove conditions.
2164
2165         * Target.pri:
2166
2167 2011-11-04  Nate Chapin  <japhet@chromium.org>
2168
2169         [V8] Null out V8NPObject::rootObject when the owning
2170         Frame goes away.
2171         https://bugs.webkit.org/show_bug.cgi?id=71569
2172
2173         Reviewed by Adam Barth.
2174
2175         No new tests, this has only been successfully triggered
2176         using ppapi flash.
2177
2178         * bindings/v8/V8Helpers.cpp:
2179         (WebCore::toV8Context):
2180         * bindings/v8/npruntime.cpp:
2181
2182 2011-11-04  Vineet Chaudhary  <vineet.chaudhary@motorola.com>
2183
2184         Send the submissions character encoding in hidden _charset_ field.
2185         https://bugs.webkit.org/show_bug.cgi?id=19079
2186
2187         Reviewed by Darin Adler.
2188
2189         Spec reference http://dev.w3.org/html5/spec/Overview.html#attr-fe-name-charset
2190         If _charset_ used as the name of a hidden control it should send character encoding
2191         as value while submissions.
2192
2193         Tests: http/tests/misc/char-encoding-in-hidden-charset-field-default.html
2194                http/tests/misc/char-encoding-in-hidden-charset-field-with-Big5.html
2195                http/tests/misc/char-encoding-in-hidden-charset-field-with-EUC-JP.html
2196                http/tests/misc/char-encoding-in-hidden-charset-field-with-ISO-2022-JP.html
2197                http/tests/misc/char-encoding-in-hidden-charset-field-with-Shift_JIS.html
2198                http/tests/misc/char-encoding-in-hidden-charset-field-with-accept-charset.html
2199                http/tests/misc/char-encoding-in-hidden-charset-field-with-get-method.html
2200                http/tests/misc/char-encoding-in-hidden-charset-field-with-one-field.html
2201                http/tests/misc/char-encoding-in-text-charset-field-with-value.html
2202                http/tests/misc/char-encoding-without-charset-field.html
2203
2204         * html/HiddenInputType.cpp:
2205         (WebCore::HiddenInputType::isHiddenType):
2206         (WebCore::HiddenInputType::appendFormData): For _charset_ send value as respective encodingType.
2207         * html/HiddenInputType.h: Override appendFormData for hidden control types.
2208
2209 2011-11-04  Robert Sesek  <rsesek@chromium.org>
2210
2211         [chromium] Use Chromium's copy of libWebKitSystemInterfaceLeopard.a
2212         https://bugs.webkit.org/show_bug.cgi?id=71563
2213
2214         Reviewed by Adam Barth.
2215
2216         Use libWebKitSystemInterfaceLeopard.a that's in the Chromium port,
2217         rather in WebKitLibraries/.
2218
2219         * WebCore.gyp/WebCore.gyp:
2220
2221 2011-11-04  Julien Chaffraix  <jchaffraix@webkit.org>
2222
2223         RenderLayer::styleChanged invalidates the GraphicsLayer needlessly
2224         https://bugs.webkit.org/show_bug.cgi?id=71517
2225
2226         Reviewed by Simon Fraser.
2227
2228         Unused code removal covered by existing tests.
2229
2230         The current code is invalidating the whole RenderLayerBacking as part of
2231         a style change. However this is redundant with the repainting logic which
2232         would invalidate only the necessary bits.
2233
2234         * rendering/RenderLayer.cpp:
2235         (WebCore::RenderLayer::styleChanged):
2236         Remove the invalidation code as it duplicates and defeats the repaint logic.
2237
2238 2011-11-04  Mihnea Ovidenie  <mihnea@adobe.com>
2239
2240         Correct parsing of incomplete @-webkit-region rules.
2241         https://bugs.webkit.org/show_bug.cgi?id=71514
2242
2243         Reviewed by Adam Barth.
2244
2245         Test: fast/regions/parse-incomplete-region-rule.html
2246
2247         Make sure to set the region rule to 0 on the fail branch.
2248         * css/CSSGrammar.y:
2249
2250 2011-11-04  Adam Klein  <adamk@chromium.org>
2251
2252         Reduce refcount churn in ChildListMutationScope
2253         https://bugs.webkit.org/show_bug.cgi?id=71527
2254
2255         Reviewed by Ryosuke Niwa.
2256
2257         Only the ChildListMutationAccumulator needs to hold a reference to the
2258         target node, and the added/removed children only need be ref'd if a
2259         ChildListMutationAccumulator exists (i.e., if there are interested
2260         observers).
2261
2262         * dom/ChildListMutationScope.cpp:
2263         (WebCore::MutationAccumulationRouter::ChildListMutationAccumulator::enqueueMutationRecord):
2264         (WebCore::MutationAccumulationRouter::MutationAccumulationRouter::childAdded):
2265         (WebCore::MutationAccumulationRouter::MutationAccumulationRouter::willRemoveChild):
2266         (WebCore::ChildListMutationScope::ChildListMutationScope):
2267         (WebCore::ChildListMutationScope::~ChildListMutationScope):
2268         (WebCore::ChildListMutationScope::childAdded):
2269         (WebCore::ChildListMutationScope::willRemoveChild):
2270         * dom/ChildListMutationScope.h:
2271         * dom/ContainerNode.cpp:
2272         (WebCore::dispatchChildInsertionEvents):
2273         (WebCore::dispatchChildRemovalEvents):
2274
2275 2011-11-04  Levi Weintraub  <leviw@chromium.org>
2276
2277         Correct usage of LayoutUnits in RenderImage and SVGImage
2278         https://bugs.webkit.org/show_bug.cgi?id=71525
2279
2280         Reviewed by Darin Adler.
2281
2282         Correcting incorrect usage of LayoutUnits for image sizes that should be integers and fixing overloaded functions that
2283         should be using LayoutUnits.
2284
2285         No new tests -- no change in behavior.
2286
2287         * rendering/RenderImage.cpp:
2288         (WebCore::RenderImage::imageDimensionsChanged):
2289         (WebCore::RenderImage::paintIntoRect):
2290         (WebCore::RenderImage::nodeAtPoint):
2291         (WebCore::RenderImage::computeReplacedLogicalWidth):
2292         * rendering/RenderImage.h:
2293         * svg/graphics/SVGImage.cpp:
2294         (WebCore::SVGImageChromeClient::invalidateContentsAndWindow):
2295
2296 2011-11-04  Adam Barth  <abarth@webkit.org>
2297
2298         Implement allow-popups for iframe@sandbox
2299         https://bugs.webkit.org/show_bug.cgi?id=66505
2300
2301         Reviewed by Darin Adler.
2302
2303         Enable allow-popups sandbox bit.  My previous patch attempted to
2304         forward the sandbox bits during setOpener, but that interacted poorly
2305         with out (internal) sandboxing of the initial document.  This patch
2306         forwards the bits during createWindow, which is more targeted to the
2307         case when a sandbox frame actually creates a new window.
2308
2309         * loader/FrameLoader.cpp:
2310         (WebCore::createWindow):
2311         * loader/PolicyChecker.cpp:
2312         (WebCore::PolicyChecker::checkNewWindowPolicy):
2313
2314 2011-11-04  Kaustubh Atrawalkar  <kaustubh@motorola.com>
2315
2316         Remove initMediaStreamEvent method
2317         https://bugs.webkit.org/show_bug.cgi?id=71344
2318
2319         This method has been removed from the spec draft.
2320         http://www.whatwg.org/specs/web-apps/current-work/multipage/video-conferencing-and-peer-to-peer-communication.html#mediastreamevent
2321
2322         Reviewed by Adam Barth.
2323
2324         No new tests. Removed method.
2325
2326         * mediastream/MediaStreamEvent.cpp:
2327         * mediastream/MediaStreamEvent.h:
2328         * mediastream/MediaStreamEvent.idl:
2329
2330 2011-11-04  Adam Barth  <abarth@webkit.org>
2331
2332         Anonymous CORS fetch for WebGL texture fails when there is no appropriate server response even for the same origin requests
2333         https://bugs.webkit.org/show_bug.cgi?id=71053
2334
2335         Reviewed by Darin Adler.
2336
2337         The crossorigin attribute should behave like XMLHttpRequest:
2338         same-origin images pass without and CORS headers, but CORS checks are
2339         performed for cross-origin loads.  This patch better aligns our
2340         behavior with Firefox, as discussed in the bug.
2341
2342         Test: http/tests/security/img-crossorigin-loads-same-origin.html
2343
2344         * loader/ImageLoader.cpp:
2345         (WebCore::ImageLoader::notifyFinished):
2346
2347 2011-11-04  Gaurav Shah  <gauravsh@chromium.org>
2348
2349         HTMLKeygenElement: Fix "keytype" handling in appendFormData.
2350         https://bugs.webkit.org/show_bug.cgi?id=70617
2351
2352         This fixes a bug introduced by http://trac.webkit.org/changeset/97658
2353         which causes all HTML Keygen elements with a keytype optional attribute
2354         to be considered as unsupported.
2355
2356         A regression test is included.
2357
2358         Reviewed by Darin Adler.
2359
2360         Test: http/tests/misc/submit-post-keygen.html
2361
2362         * html/HTMLKeygenElement.cpp:
2363
2364 2011-11-03  Adrienne Walker  <enne@google.com>
2365
2366         [chromium] Implement checkerboarding for missing layer tiles
2367         https://bugs.webkit.org/show_bug.cgi?id=69585
2368
2369         Reviewed by James Robinson.
2370
2371         For tiles that have no texture or haven't even been created yet,
2372         draw using the background color of the layer.
2373
2374         The only background color set is currently the non-composited content,
2375         and all other layers use transparent black by default.
2376
2377         * platform/graphics/chromium/LayerChromium.cpp:
2378         (WebCore::LayerChromium::pushPropertiesTo):
2379         * platform/graphics/chromium/NonCompositedContentHost.cpp:
2380         (WebCore::NonCompositedContentHost::setBackgroundColor):
2381         * platform/graphics/chromium/NonCompositedContentHost.h:
2382         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2383         (WebCore::CCLayerImpl::setBackgroundColor):
2384         * platform/graphics/chromium/cc/CCLayerImpl.h:
2385         (WebCore::CCLayerImpl::backgroundColor):
2386         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2387         (WebCore::CCTiledLayerImpl::drawTiles):
2388
2389 2011-11-04  Nico Weber  <thakis@chromium.org>
2390
2391         [chromium] Remove most exit time destructors
2392         https://bugs.webkit.org/show_bug.cgi?id=71524
2393
2394         Do this by using the DEFINE_STATIC_LOCAL macro, which allocates things on the heaps and then leaks them.
2395
2396         Reviewed by Dimitri Glazkov.
2397
2398         No behavior change, so no new tests.
2399
2400         * platform/chromium/CursorChromium.cpp:
2401         (WebCore::pointerCursor):
2402         (WebCore::crossCursor):
2403         (WebCore::handCursor):
2404         (WebCore::iBeamCursor):
2405         (WebCore::waitCursor):
2406         (WebCore::helpCursor):
2407         (WebCore::eastResizeCursor):
2408         (WebCore::northResizeCursor):
2409         (WebCore::northEastResizeCursor):
2410         (WebCore::northWestResizeCursor):
2411         (WebCore::southResizeCursor):
2412         (WebCore::southEastResizeCursor):
2413         (WebCore::southWestResizeCursor):
2414         (WebCore::westResizeCursor):
2415         (WebCore::northSouthResizeCursor):
2416         (WebCore::eastWestResizeCursor):
2417         (WebCore::northEastSouthWestResizeCursor):
2418         (WebCore::northWestSouthEastResizeCursor):
2419         (WebCore::columnResizeCursor):
2420         (WebCore::rowResizeCursor):
2421         (WebCore::middlePanningCursor):
2422         (WebCore::eastPanningCursor):
2423         (WebCore::northPanningCursor):
2424         (WebCore::northEastPanningCursor):
2425         (WebCore::northWestPanningCursor):
2426         (WebCore::southPanningCursor):
2427         (WebCore::southEastPanningCursor):
2428         (WebCore::southWestPanningCursor):
2429         (WebCore::westPanningCursor):
2430         (WebCore::moveCursor):
2431         (WebCore::verticalTextCursor):
2432         (WebCore::cellCursor):
2433         (WebCore::contextMenuCursor):
2434         (WebCore::aliasCursor):
2435         (WebCore::progressCursor):
2436         (WebCore::noDropCursor):
2437         (WebCore::copyCursor):
2438         (WebCore::noneCursor):
2439         (WebCore::notAllowedCursor):
2440         (WebCore::zoomInCursor):
2441         (WebCore::zoomOutCursor):
2442         (WebCore::grabCursor):
2443         (WebCore::grabbingCursor):
2444         * platform/chromium/LanguageChromium.cpp:
2445         (WebCore::platformDefaultLanguage):
2446         * platform/chromium/MIMETypeRegistryChromium.cpp:
2447         (WebCore::dummyHashSet):
2448
2449 2011-11-03  Anders Carlsson  <andersca@apple.com>
2450
2451         Add NetscapePlugin::convertFromRootView
2452         https://bugs.webkit.org/show_bug.cgi?id=71526
2453
2454         Reviewed by Sam Weinig.
2455
2456         Export some symbols that WebKit2 needs.
2457
2458         * WebCore.exp.in:
2459
2460 2011-11-03  Adrienne Walker  <enne@google.com>
2461
2462         [chromium] Fix incorrect visibility/scissor rect for threaded compositing
2463         https://bugs.webkit.org/show_bug.cgi?id=70962
2464
2465         Reviewed by James Robinson.
2466
2467         In order to properly scroll independent of layout on the compositor
2468         thread, we have to apply the scroll to the right layer. Previously,
2469         the NonCompositedContentHost was the root of the graphics layer tree
2470         with all other layers underneath it. However, applying a scroll to
2471         that layer would also scroll the clip layer for the main frame
2472         underneath it, causing visibility issues.
2473
2474         This patch moves the NonCompositedHost to be a child of the
2475         RenderLayerCompositor's scroll layer. This was exposed on
2476         RenderLayerCompositor, because there's no other way to get to this
2477         layer in a way that doesn't make assumptions about the structure of
2478         the layers on a frame.
2479
2480         This also removes the hacks in calculateVisibleLayerRect and
2481         tilingTransform for scroll position.
2482
2483         Partially tested by existing compositor tests. Manually tested
2484         threaded compositing scrolling.
2485
2486         * platform/graphics/chromium/NonCompositedContentHost.cpp:
2487         (WebCore::NonCompositedContentHost::setScrollLayer):
2488         (WebCore::NonCompositedContentHost::setViewport):
2489         (WebCore::NonCompositedContentHost::scrollLayer):
2490         * platform/graphics/chromium/NonCompositedContentHost.h:
2491         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2492         (WebCore::CCLayerTreeHost::create):
2493         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2494         (WebCore::CCLayerTreeHost::applyScrollDeltas):
2495         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2496         (WebCore::CCLayerTreeHost::setRootLayer):
2497         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
2498         (WebCore::CCLayerTreeHostCommon::calculateVisibleLayerRect):
2499         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2500         (WebCore::findScrollLayer):
2501         (WebCore::CCLayerTreeHostImpl::setRootLayer):
2502         (WebCore::CCLayerTreeHostImpl::scrollRootLayer):
2503         (WebCore::CCLayerTreeHostImpl::processScrollDeltas):
2504         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2505         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2506         (WebCore::CCTiledLayerImpl::tilingTransform):
2507         * rendering/RenderLayerCompositor.cpp:
2508         (WebCore::RenderLayerCompositor::scrollLayer):
2509         * rendering/RenderLayerCompositor.h:
2510
2511 2011-11-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2512
2513         [Qt] Refactor and clean up the qmake build system
2514
2515         The qmake build system has accumulated a bit of cruft and redundancy
2516         over time. There's also a fairly tight coupling between how to build
2517         the various targets, and _what_ to build, making it harder to add new
2518         rules or sources. This patch aims to elevate these issues somewhat.
2519
2520         This is a short-list of the changes:
2521
2522           * The rules for how to build targets are now mostly contained as
2523             prf-files in Tools/qmake/mkspecs/features. Using mkspecs also
2524             allows us to do pre- and post-processing of each project file,
2525             which helps to clean up the actual project files.
2526
2527           * Derived sources are no longer generated as a separate make-step
2528             but is part of each target's project file as a subdir. Makefile
2529             rules are used to ensure that we run make on the derived sources
2530             before running qmake on the actual target makefile. This makes
2531             it easier to keep a proper dependency between derived sources
2532             and the target.
2533
2534           * We use GNU make and the compiler to generate dependencies on
2535             UNIX-based systems running Qt 5. This allows us to lessen the
2536             need to run qmake, which should reduce compile time.
2537
2538           * WebKit2 is now build by default if building with Qt 5. It can
2539             be disabled by passing --no-webkit2 to build-webkit.
2540
2541         The result of these changes are hopefully a cleaner and easier
2542         build system to modify, and faster build times due to no longer
2543         running qmake on every single build. It's also a first step
2544         towards possibly generating the list of sources using another
2545         build system.
2546
2547         https://bugs.webkit.org/show_bug.cgi?id=71222
2548
2549         Reviewed by Simon Hausmann.
2550
2551         * DerivedSources.pri: Renamed from Source/WebCore/CodeGenerators.pri.
2552         * DerivedSources.pro: Removed.
2553         * Target.pri: Copied from Source/WebCore/WebCore.pro.
2554         * WebCore.pro:
2555
2556 2011-11-04  Tommy Widenflycht  <tommyw@google.com>
2557
2558         [chromium] MediaStream API: Fixing wrong path for PeerConnectionHandler.h in WebCore.gyp
2559         https://bugs.webkit.org/show_bug.cgi?id=71548
2560
2561         Reviewed by Tony Gentilcore.
2562
2563         * WebCore.gypi:
2564
2565 2011-11-04  Patrick Gansterer  <paroga@webkit.org>
2566
2567         Unreviewed CMake build fix for !ENABLE(SQL_DATABASE).
2568
2569         * CMakeLists.txt: Always compile the SQLite source files, since they are required for build.
2570
2571 2011-11-03  Ryosuke Niwa  <rniwa@webkit.org>
2572
2573         REGRESSION (r99076): Pasting into password fields is broken
2574         https://bugs.webkit.org/show_bug.cgi?id=71483
2575
2576         Reviewed by Darin Adler.
2577
2578         The bug was caused by plainText serializing secured (instead of original) text.
2579         Fixed the bug by adding new TextIterator behavior that serializes the original text
2580         and using it in ReplacementFragment::ReplacementFragment.
2581
2582         * editing/ReplaceSelectionCommand.cpp:
2583         (WebCore::ReplacementFragment::ReplacementFragment):
2584         * editing/TextIterator.cpp:
2585         (WebCore::TextIterator::TextIterator):
2586         (WebCore::TextIterator::emitText):
2587         * editing/TextIterator.h:
2588
2589 2011-11-03  Eric Carlson  <eric.carlson@apple.com>
2590
2591         Add TrackEvent
2592         https://bugs.webkit.org/show_bug.cgi?id=71178
2593
2594         Reviewed by Sam Weinig.
2595
2596         Test: fast/events/constructors/track-event-constructor.html
2597
2598         * CMakeLists.txt: Add new files for TrackEvent.
2599         * CodeGenerators.pri: Ditto.
2600         * DerivedSources.cpp: Ditto.
2601         * DerivedSources.make: Ditto.
2602         * GNUmakefile.am: Ditto.
2603         * GNUmakefile.list.am: Ditto.
2604         * WebCore.gypi: Ditto.
2605         * WebCore.pro: Ditto.
2606         * WebCore.xcodeproj/project.pbxproj: Ditto.
2607         * bindings/generic/EventConstructors.h: Ditto.
2608         * bindings/gobject/GNUmakefile.am: Ditto.
2609         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: Ditto.
2610         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
2611
2612         * bindings/js/JSDictionary.cpp:
2613         (WebCore::JSDictionary::convertValue): Add method to convert to a Track.
2614         * bindings/js/JSDictionary.h:
2615
2616         * bindings/js/JSEventConstructors.cpp:  Add new files for TrackEvent.
2617
2618         * bindings/js/JSTrackCustom.cpp: Added. 
2619         (WebCore::toTrack): New, convert from a JSValue to a Track.
2620         (WebCore::toJS): New, return a JS wrapper for a Track.
2621         * bindings/js/JSTrackCustom.h: Added.
2622
2623         * bindings/js/JSTrackEventCustom.cpp: Added.
2624         (WebCore::JSTrackEvent::track): New, returns a TextEvent's 'track' attribute.
2625
2626         * bindings/v8/OptionsObject.cpp:
2627         (WebCore::OptionsObject::get): Returns RefPtr<TrackBase>.
2628
2629         * bindings/v8/custom/V8EventConstructors.cpp: Add Track initializing constructor.
2630
2631         * bindings/v8/custom/V8TrackEventCustom.cpp: Added.
2632         (WebCore::V8TrackEvent::trackAccessorGetter): New, returns a TextEvent's 'track' attribute.
2633
2634         * dom/EventFactory.in: Add TrackEvent.
2635
2636         * dom/EventNames.h: Add 'addtrack' event.
2637
2638         * html/TextTrack.cpp:
2639         (WebCore::TextTrack::TextTrack): Call new base class constructor.
2640         * html/TextTrack.h: Now derive from BaseTrack for the day we implement VideoTrack and AudioTrack.
2641
2642         * html/track/TrackBase.cpp: Added.
2643         (WebCore::TrackBase::TrackBase):
2644         (WebCore::TrackBase::~TrackBase):
2645         * html/track/TrackBase.h: Added.
2646         (WebCore::TrackBase::type): Return the track type.
2647
2648         * html/track/TrackEvent.cpp: Added.
2649         (WebCore::TrackEventInit::TrackEventInit):
2650         (WebCore::TrackEvent::TrackEvent):
2651         (WebCore::TrackEvent::~TrackEvent):
2652         (WebCore::TrackEvent::interfaceName):
2653         * html/track/TrackEvent.h: Added.
2654         (WebCore::TrackEvent::create):
2655         (WebCore::TrackEvent::isTrackEvent):
2656         (WebCore::TrackEvent::track):
2657         * html/track/TrackEvent.idl: Added.
2658
2659         * page/DOMWindow.idl: Add TrackEvent.
2660
2661 2011-11-03  Ben Wells  <benwells@chromium.org>
2662
2663         Optimize canvas fills / drawImage when covering entire canvas
2664         https://bugs.webkit.org/show_bug.cgi?id=70789
2665
2666         Reviewed by Stephen White.
2667
2668         If we're filling a rect or drawing an image, and it covers the entire canvas, we don't
2669         need to worry about clearing outside the area updated by the operation if we're in
2670         a composite mode that requires this (such as source-in, copy, etc.). In this case we
2671         can take the simple path through the code and save a clear (for copy) or a temporary
2672         image buffer (for the other modes).
2673
2674         No new tests - optimization, behaviour is unchanged and covered by existing tests.
2675
2676         * html/canvas/CanvasRenderingContext2D.cpp:
2677         (WebCore::CanvasRenderingContext2D::fillRect):
2678         (WebCore::CanvasRenderingContext2D::drawImage):
2679         (WebCore::CanvasRenderingContext2D::rectContainsCanvas):
2680         * html/canvas/CanvasRenderingContext2D.h:
2681
2682 2011-11-03  Mark Hahnenberg  <mhahnenberg@apple.com>
2683
2684         De-virtualize JSObject::getPropertyNames
2685         https://bugs.webkit.org/show_bug.cgi?id=71306
2686
2687         Reviewed by Darin Adler.
2688
2689         No new tests.
2690
2691         Added getPropertyNames to the MethodTable, changed all the virtual 
2692         implementations of getPropertyNames to static ones, and replaced 
2693         all call sites with corresponding lookups in the MethodTable.
2694
2695         * bindings/js/JSDOMWindowCustom.cpp:
2696         (WebCore::JSDOMWindow::getPropertyNames):
2697         * bindings/js/JSDOMWindowShell.cpp:
2698         (WebCore::JSDOMWindowShell::getPropertyNames):
2699         * bindings/js/JSDOMWindowShell.h:
2700         * bindings/scripts/CodeGeneratorJS.pm:
2701         (GenerateHeader):
2702         * bridge/NP_jsobject.cpp:
2703         (_NPN_Enumerate):
2704         * bridge/qt/qt_runtime.cpp:
2705         (JSC::Bindings::convertValueToQVariantMap):
2706
2707 2011-11-02  Xiaomei Ji  <xji@chromium.org>
2708
2709         Enable ctrl-arrow move cursor by word in visual order in cr-win by command line flag.
2710         https://bugs.webkit.org/show_bug.cgi?id=71163
2711
2712         Reviewed by Ryosuke Niwa.
2713
2714         Add m_visualWordMovementEnabled page setting, trigger visual word movement
2715         function (instead of logical one) when it is set as true.
2716
2717         right|leftWordPosition() are tested in editing/selection/move-by-word-visually*
2718         by using --webkit-visual-word flag.
2719
2720         * editing/FrameSelection.cpp:
2721         (WebCore::FrameSelection::modifyMovingRight):
2722         (WebCore::FrameSelection::modifyMovingLeft):
2723         (WebCore::FrameSelection::visualWordMovementEnabled):
2724         * editing/FrameSelection.h:
2725         * page/Settings.cpp:
2726         (WebCore::Settings::Settings):
2727         * page/Settings.h:
2728         (WebCore::Settings::setVisualWordMovementEnabled):
2729         (WebCore::Settings::visualWordMovementEnabled):
2730
2731 2011-11-03  Levi Weintraub  <leviw@chromium.org>
2732
2733         Correct usage of LayoutUnits and integers in Table rendering classes
2734         https://bugs.webkit.org/show_bug.cgi?id=71500
2735
2736         Reviewed by Darin Adler.
2737
2738         Fixing the Table layout classes to operate on integers -- sub-pixel table layout breaks
2739         the spec. Meanwhile correcting the Table rendering classes themselves to still use
2740         LayoutUnits.
2741
2742         No new tests -- no change in behavior.
2743
2744         * rendering/AutoTableLayout.cpp: Reverting to operating on integers.
2745         (WebCore::AutoTableLayout::recalcColumn):
2746         (WebCore::AutoTableLayout::computePreferredLogicalWidths):
2747         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
2748         (WebCore::AutoTableLayout::layout):
2749         * rendering/AutoTableLayout.h: Reverting to operating on integers.
2750         * rendering/FixedTableLayout.cpp: Ditto.
2751         (WebCore::FixedTableLayout::computePreferredLogicalWidths):
2752         (WebCore::FixedTableLayout::layout):
2753         * rendering/RenderTable.h: Switching to LayoutUnits.
2754         (WebCore::RenderTable::getColumnPos):
2755         (WebCore::RenderTable::bordersPaddingAndSpacingInRowDirection):
2756         * rendering/RenderTableCell.cpp: Switching to LayoutUnits.
2757         (WebCore::RenderTableCell::updateLogicalWidth):
2758         (WebCore::RenderTableCell::setOverrideHeightFromRowHeight):
2759         (WebCore::RenderTableCell::computeRectForRepaint):
2760         (WebCore::RenderTableCell::cellBaselinePosition):
2761         (WebCore::RenderTableCell::scrollbarsChanged):
2762         * rendering/RenderTableCell.h: Switching to LayoutUnits
2763         * rendering/RenderTableSection.cpp: Ditto.
2764         (WebCore::RenderTableSection::setCellLogicalWidths):
2765         (WebCore::RenderTableSection::layoutRows):
2766
2767 2011-11-03  James Robinson  <jamesr@chromium.org>
2768
2769         [chromium] Notify scheduler on SwapBuffers in threaded compositor mode
2770         https://bugs.webkit.org/show_bug.cgi?id=71381
2771
2772         Reviewed by Kenneth Russell.
2773
2774         * platform/graphics/chromium/cc/CCScheduler.cpp:
2775         (WebCore::CCScheduler::didSwapBuffers):
2776         * platform/graphics/chromium/cc/CCScheduler.h:
2777         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2778         (WebCore::CCThreadProxy::drawLayersAndSwapOnImplThread):
2779
2780 2011-11-03  Daniel Bates  <dbates@rim.com>
2781
2782         CMake: Add missing WebGL IDL file html/canvas/WebGLContextEvent.idl
2783
2784         Rubber-stamped by Martin Robinson
2785
2786         * CMakeLists.txt:
2787
2788 2011-11-03  Daniel Bates  <dbates@rim.com>
2789
2790         CMake: Only generate from WebGL IDLs when building with WebGL
2791         https://bugs.webkit.org/show_bug.cgi?id=71516
2792
2793         Reviewed by Martin Robinson.
2794
2795         * CMakeLists.txt:
2796
2797 2011-11-03  Erik Arvidsson  <arv@chromium.org>
2798
2799         Remove support for LegacyDefaultOptionalArguments
2800         https://bugs.webkit.org/show_bug.cgi?id=71489
2801
2802         Reviewed by Darin Adler.
2803
2804         This removes support for LegacyDefaultOptionalArguments and [RequiresAllArguments=Raise].
2805         [RequiresAllArguments=Raise] is now the standard behavior so it would be a no op.
2806
2807         No new tests. Covered by existing tests.
2808
2809         * bindings/scripts/CodeGeneratorJS.pm:
2810         (GenerateArgumentsCountCheck): Check the "RequiresAllArguments" extended attribute and generate code
2811                                        that returns undefined if there are missing arguments.
2812         * bindings/scripts/CodeGeneratorV8.pm:
2813         (GenerateArgumentsCountCheck): Ditto.
2814         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2815         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): Add generated argument count checks.
2816         * bindings/scripts/test/JS/JSTestObj.cpp:
2817         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): Ditto.
2818         (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs): Ditto.
2819         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): Ditto.
2820         (WebCore::jsTestObjPrototypeFunctionSerializedValue): Ditto.
2821         (WebCore::jsTestObjPrototypeFunctionIdbKey): Ditto.
2822         (WebCore::jsTestObjPrototypeFunctionOptionsObject): Ditto.
2823         (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): Ditto.
2824         (WebCore::jsTestObjPrototypeFunctionAddEventListener): Ditto.
2825         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener): Ditto.
2826         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg): Ditto.
2827         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg): Ditto.
2828         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture): Ditto.
2829         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD): Ditto.
2830         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): Ditto.
2831         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): Ditto.
2832         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg): Ditto.
2833         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): Ditto.
2834         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): Ditto.
2835         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): Ditto.
2836         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): Ditto.
2837         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): Ditto.
2838         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): Ditto.
2839         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): Ditto.
2840         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): Ditto.
2841         * bindings/scripts/test/TestCallback.idl: Remove LegacyDefaultOptionalArguments.
2842         * bindings/scripts/test/TestMediaQueryListListener.idl: Ditto.
2843         * bindings/scripts/test/TestObj.idl: Remove LegacyDefaultOptionalArguments and [RequiresAllArguments=Raise]
2844         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: Remove LegacyDefaultOptionalArguments.
2845         (WebCore::TestMediaQueryListListenerInternal::methodCallback): Add generated argument count checks.
2846         * bindings/scripts/test/V8/V8TestObj.cpp:
2847         (WebCore::TestObjInternal::voidMethodWithArgsCallback): Ditto.
2848         (WebCore::TestObjInternal::intMethodWithArgsCallback): Ditto.
2849         (WebCore::TestObjInternal::objMethodWithArgsCallback): Ditto.
2850         (WebCore::TestObjInternal::serializedValueCallback): Ditto.
2851         (WebCore::TestObjInternal::idbKeyCallback): Ditto.
2852         (WebCore::TestObjInternal::optionsObjectCallback): Ditto.
2853         (WebCore::TestObjInternal::customArgsAndExceptionCallback): Ditto.
2854         (WebCore::TestObjInternal::withDynamicFrameAndArgCallback): Ditto.
2855         (WebCore::TestObjInternal::withDynamicFrameAndOptionalArgCallback): Ditto.
2856         (WebCore::TestObjInternal::withDynamicFrameAndUserGestureCallback): Ditto.
2857         (WebCore::TestObjInternal::withDynamicFrameAndUserGestureASADCallback): Ditto.
2858         (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback): Ditto.
2859         (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback): Ditto.
2860         (WebCore::TestObjInternal::methodWithCallbackArgCallback): Ditto.
2861         (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback): Ditto.
2862         (WebCore::TestObjInternal::overloadedMethod1Callback): Ditto.
2863         (WebCore::TestObjInternal::overloadedMethod2Callback): Ditto.
2864         (WebCore::TestObjInternal::overloadedMethod3Callback): Ditto.
2865         (WebCore::TestObjInternal::overloadedMethod4Callback): Ditto.
2866         (WebCore::TestObjInternal::overloadedMethod5Callback): Ditto.
2867         (WebCore::TestObjInternal::overloadedMethod6Callback): Ditto.
2868         (WebCore::TestObjInternal::overloadedMethod7Callback): Ditto.
2869         (WebCore::TestObjInternal::enabledAtRuntimeMethod1Callback): Ditto.
2870         (WebCore::TestObjInternal::enabledAtRuntimeMethod2Callback): Ditto.
2871
2872 2011-11-03  Darin Adler  <darin@apple.com>
2873
2874         Change remaining callers of releaseRef to call leakRef
2875         https://bugs.webkit.org/show_bug.cgi?id=71422
2876
2877         Reviewed by Darin Fisher.
2878
2879         * bindings/objc/WebScriptObject.mm:
2880         (-[WebScriptObject _setImp:originRootObject:rootObject:]):
2881         (-[WebScriptObject _setOriginRootObject:andRootObject:]):
2882         * bridge/NP_jsobject.cpp:
2883         (_NPN_CreateScriptObject):
2884         * dom/QualifiedName.cpp:
2885         (WebCore::QNameComponentsTranslator::translate):
2886         * history/PageCache.cpp:
2887         (WebCore::PageCache::add):
2888         * html/HTMLTableElement.cpp:
2889         (WebCore::HTMLTableElement::additionalAttributeStyleDecls):
2890         (WebCore::HTMLTableElement::addSharedCellBordersDecl):
2891         (WebCore::HTMLTableElement::addSharedGroupDecls):
2892         * platform/graphics/cg/ImageSourceCG.cpp:
2893         (WebCore::ImageSource::createFrameAtIndex):
2894         * platform/graphics/mac/FontCustomPlatformData.cpp:
2895         (WebCore::createFontCustomPlatformData):
2896         * platform/mac/ContextMenuMac.mm:
2897         (WebCore::ContextMenu::releasePlatformDescription):
2898         * platform/mac/SharedBufferMac.mm:
2899         (WebCore::SharedBuffer::createCFData):
2900         * rendering/RenderMediaControlsChromium.cpp:
2901         (WebCore::platformResource):
2902         Use leakRef.
2903
2904 2011-11-02  Darin Adler  <darin@apple.com>
2905
2906         Change remaining callers of releaseRef to call leakRef
2907         https://bugs.webkit.org/show_bug.cgi?id=71422
2908
2909         Reviewed by Darin Fisher.
2910
2911         * bindings/objc/WebScriptObject.mm:
2912         (-[WebScriptObject _setImp:originRootObject:rootObject:]):
2913         (-[WebScriptObject _setOriginRootObject:andRootObject:]):
2914         * bridge/NP_jsobject.cpp:
2915         (_NPN_CreateScriptObject):
2916         * dom/QualifiedName.cpp:
2917         (WebCore::QNameComponentsTranslator::translate):
2918         * history/PageCache.cpp:
2919         (WebCore::PageCache::add):
2920         * html/HTMLTableElement.cpp:
2921         (WebCore::HTMLTableElement::additionalAttributeStyleDecls):
2922         (WebCore::HTMLTableElement::addSharedCellBordersDecl):
2923         (WebCore::HTMLTableElement::addSharedGroupDecls):
2924         * platform/graphics/cg/ImageSourceCG.cpp:
2925         (WebCore::ImageSource::createFrameAtIndex):
2926         * platform/graphics/mac/FontCustomPlatformData.cpp:
2927         (WebCore::createFontCustomPlatformData):
2928         * platform/mac/ContextMenuMac.mm:
2929         (WebCore::ContextMenu::releasePlatformDescription):
2930         * platform/mac/SharedBufferMac.mm:
2931         (WebCore::SharedBuffer::createCFData):
2932         * rendering/RenderMediaControlsChromium.cpp:
2933         (WebCore::platformResource):
2934         Use leakRef.
2935
2936 2011-11-03  Daniel Cheng  <dcheng@chromium.org>
2937
2938         [chromium] Remove unused clipboard methods
2939         https://bugs.webkit.org/show_bug.cgi?id=71512
2940
2941         Reviewed by Tony Chang.
2942
2943         * platform/chromium/PlatformSupport.h:
2944
2945 2011-11-03  Anna Cavender  <annacc@chromium.org>
2946
2947         Implement TextTrackCueList.
2948         https://bugs.webkit.org/show_bug.cgi?id=70451
2949
2950         Reviewed by Eric Carlson.
2951
2952         Test: media/track/track-text-track-cue-list.html
2953
2954         * html/LoadableTextTrack.cpp:
2955         (WebCore::LoadableTextTrack::newCuesAvailable):
2956             Update TextTrack's TextTrackCueList (m_cues) when new cues are discovered.
2957         * html/TextTrack.cpp:
2958         (WebCore::TextTrack::TextTrack):
2959             Create an empty TextTrackCueList upon TextTrack creation.
2960         (WebCore::TextTrack::cues):
2961             Return this TextTrack's list of cues.
2962
2963         Implement TextTrackCueList functionality:
2964         * html/TextTrackCueList.cpp:
2965         (WebCore::TextTrackCueList::TextTrackCueList):
2966         (WebCore::TextTrackCueList::length):
2967         (WebCore::TextTrackCueList::item):
2968         (WebCore::TextTrackCueList::getCueById):
2969         (WebCore::TextTrackCueList::add):
2970         (WebCore::TextTrackCueList::remove):
2971         (WebCore::TextTrackCueList::contains):
2972         * html/TextTrackCueList.h:
2973         (WebCore::TextTrackCueList::~TextTrackCueList):
2974
2975 2011-11-03  Joshua Bell  <jsbell@chromium.org>
2976
2977         IndexedDB result of deleting a record should be true or false
2978         https://bugs.webkit.org/show_bug.cgi?id=60197
2979
2980         Reviewed by David Levin.
2981
2982         IDBObjectStore.delete() was incorrectly firing an error if there
2983         was no record to remove. Match the spec, and return true/false
2984         as success values instead. Bring JSC binding implementation of
2985         SerializedScriptValue more in line with V8 version for methods
2986         called from IDB code.
2987
2988         Test: storage/indexeddb/mozilla/delete-result.html
2989
2990         * bindings/js/SerializedScriptValue.cpp:
2991         (WebCore::SerializedScriptValue::createFromWire):
2992         (WebCore::SerializedScriptValue::undefinedValue):
2993         (WebCore::SerializedScriptValue::booleanValue):
2994         * bindings/js/SerializedScriptValue.h:
2995         * bindings/v8/SerializedScriptValue.cpp:
2996         (WebCore::SerializedScriptValue::nullValue):
2997         (WebCore::SerializedScriptValue::undefinedValue):
2998         (WebCore::SerializedScriptValue::booleanValue):
2999         * bindings/v8/SerializedScriptValue.h:
3000         * storage/IDBObjectStoreBackendImpl.cpp:
3001         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
3002
3003 2011-11-03  Adam Barth  <abarth@webkit.org>
3004
3005         Implement allow-popups for iframe@sandbox
3006         https://bugs.webkit.org/show_bug.cgi?id=66505
3007
3008         Reviewed by Eric Seidel.
3009
3010         There's been some discussion in the HTML working group about adding an
3011         allow-popups directive to the iframe sandbox.  Microsoft has added it
3012         to IE10 platform preview and is fairly adamant about this feature
3013         because it's needed by one or their products that's planning to use
3014         iframe sandbox.  Hixie says he'll add it to the spec once we implement
3015         it, so here's our implementation.  (See discussion in the W3C linked in
3016         the bug for more details.)
3017
3018         This patch lands most of the infrastructure for this feature, but it
3019         doesn't actually enable the feature.  I'll enable it in a follow-up
3020         patch.
3021
3022         Tests: http/tests/security/popup-allowed-by-sandbox-is-sandboxed-control.html
3023                http/tests/security/popup-allowed-by-sandbox-is-sandboxed.html
3024                http/tests/security/popup-allowed-by-sandbox-when-allowed.html
3025
3026         * html/HTMLIFrameElement.cpp:
3027         (WebCore::HTMLIFrameElement::parseMappedAttribute):
3028         * loader/FrameLoader.h:
3029         (WebCore::FrameLoader::forceSandboxFlags):
3030         * loader/FrameLoaderTypes.h:
3031         * page/SecurityOrigin.cpp:
3032         (WebCore::SecurityOrigin::parseSandboxPolicy):
3033         * page/SecurityOrigin.h:
3034         (WebCore::SecurityOrigin::sandboxFlags):
3035         * svg/graphics/SVGImage.cpp:
3036         (WebCore::SVGImage::dataChanged):
3037
3038 2011-11-03  Mark Hahnenberg  <mhahnenberg@apple.com>
3039
3040         De-virtualize JSObject::className
3041         https://bugs.webkit.org/show_bug.cgi?id=71428
3042
3043         Reviewed by Sam Weinig.
3044
3045         No new tests.
3046
3047         Added className to the MethodTable, changed all the virtual 
3048         implementations of className to static ones, and replaced 
3049         all call sites with corresponding lookups in the MethodTable.
3050
3051         * bindings/js/JSDOMWindowShell.cpp:
3052         (WebCore::JSDOMWindowShell::className):
3053         * bindings/js/JSDOMWindowShell.h:
3054         * bindings/js/JSInjectedScriptHostCustom.cpp:
3055         (WebCore::JSInjectedScriptHost::internalConstructorName):
3056         * bridge/testqtbindings.cpp:
3057         (Global::className):
3058
3059 2011-11-02  Jer Noble  <jer.noble@apple.com>
3060
3061         Add Clock class and platform-specific implementations.
3062         https://bugs.webkit.org/show_bug.cgi?id=71341
3063
3064         Reviewed by Sam Weinig.
3065
3066         No new tests; these classes will be used and tested by the MediaController feature.
3067
3068         Adds a abstract Clock class and two concrete, platform-specific subclasses.
3069
3070         Clock provides a basic interface for starting, stopping, and querying a generic timeline.
3071         PlatformClockCA implements this interface using a CoreAudio CAClock object, which uses
3072         the default audio device's hardware clock as a timing source. PlatformClockPOSIX 
3073         implements this interface using gettimeofday() as its timing source.
3074
3075         * WebCore.xcodeproj/project.pbxproj:
3076         * platform/Clock.cpp: Added.
3077         (Clock::create): Creates a platform-specific clock.
3078         * platform/Clock.h: Added.
3079         (WebCore::Clock::~Clock):
3080         (WebCore::Clock::Clock):
3081         * platform/mac/PlatformClockCA.cpp: Added.
3082         (PlatformClockCA::PlatformClockCA):
3083         (PlatformClockCA::~PlatformClockCA):
3084         (PlatformClockCA::setCurrentTime):
3085         (PlatformClockCA::currentTime):
3086         (PlatformClockCA::setPlayRate):
3087         (PlatformClockCA::PlatformClockCA::playRate):
3088         (PlatformClockCA::start):
3089         (PlatformClockCA::stop):
3090         * platform/mac/PlatformClockCA.h: Added.
3091         (WebCore::PlatformClockCA::isRunning):
3092         * platform/posix/PlatformClockPOSIX.cpp: Added.
3093         (timevalToFloat):
3094         (timevalDelta):
3095         (PlatformClockPOSIX::PlatformClockPOSIX):
3096         (PlatformClockPOSIX::setCurrentTime):
3097         (PlatformClockPOSIX::currentTime):
3098         (PlatformClockPOSIX::setPlayRate):
3099         (PlatformClockPOSIX::PlatformClockPOSIX::playRate):
3100         (PlatformClockPOSIX::start):
3101         (PlatformClockPOSIX::stop):
3102         (PlatformClockPOSIX::now):
3103         * platform/posix/PlatformClockPOSIX.h: Added.
3104         (WebCore::PlatformClockPOSIX::isRunning):
3105
3106 2011-11-03  Joshua Bell  <jsbell@chromium.org>
3107
3108         IndexedDB: Object stores not persisting between sessions
3109         https://bugs.webkit.org/show_bug.cgi?id=71313
3110
3111         Reviewed by Tony Chang.
3112
3113         Logic flaw introduced with r98806 skipped the loading of object stores
3114         during subsequent sessions.
3115
3116         * storage/IDBDatabaseBackendImpl.cpp:
3117         (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
3118         (WebCore::IDBDatabaseBackendImpl::openInternal):
3119
3120 2011-11-03  Pavel Feldman  <pfeldman@google.com>
3121
3122         Web Inspector: fix heap profiler rendering and resize.
3123         https://bugs.webkit.org/show_bug.cgi?id=71484
3124
3125         Reviewed by Yury Semikhatsky.
3126
3127         * inspector/front-end/DetailedHeapshotView.js:
3128         (WebInspector.DetailedHeapshotView.prototype.wasShown.profileCallback2):
3129         (WebInspector.DetailedHeapshotView.prototype.wasShown):
3130         (WebInspector.DetailedHeapshotView.prototype._changeView):
3131         (WebInspector.DetailedHeapshotView.prototype._startRetainersHeaderDragging):
3132
3133 2011-11-03  Julien Chaffraix  <jchaffraix@webkit.org>
3134
3135         Stop abusing RenderTableSection::needsRecalcCells logic
3136         https://bugs.webkit.org/show_bug.cgi?id=71420
3137
3138         Reviewed by Darin Adler.
3139
3140         Change covered by existing tests like fast/repaint/table-extra-bottom-grow.html
3141         and fast/table/row-height-recalc* (among others).
3142
3143         Cell recalculation is very expensive and should only be called when the section's structure
3144         changed in a way that requires a safe update to its structure (like removing a row as our
3145         column split may not be appropriate anymore).
3146
3147         The current code would abuse cell recalculation to actually reset the logical height on the
3148         RowStruct. This change makes it do the right thing.
3149
3150         * rendering/RenderTableCell.h:
3151         * rendering/RenderTableRow.h:
3152         Removed styleWillChange override as it was unneeded.
3153
3154         * rendering/RenderTableCell.cpp:
3155         (WebCore::RenderTableCell::styleDidChange):
3156         * rendering/RenderTableRow.cpp:
3157         (WebCore::RenderTableRow::styleDidChange):
3158         Move the code from styleWillChange to styleDidChange.
3159
3160         * rendering/RenderTableSection.cpp:
3161         (WebCore::RenderTableSection::rowLogicalHeightChanged):
3162         This function just reset the height on the |RowStruct| which is the
3163         only part of recalcCells that we would need.
3164
3165         (WebCore::RenderTableSection::rowIndexForRenderer):
3166         Added this function to find out which index a column has (strangely
3167         RenderTableRow does not have this information).
3168
3169         * rendering/RenderTableSection.h: Added the 2 previous functions.
3170
3171 2011-11-03  Andreas Kling  <kling@webkit.org>
3172
3173         CSSRuleList: Move rule orphaning from deleteRule() out to callers.
3174         https://bugs.webkit.org/show_bug.cgi?id=71470
3175
3176         Reviewed by Antti Koivisto.
3177
3178         Rule parenting is the responsibility of the owner rule (the rule containing
3179         the rule list), so move parent clearing out of CSSRuleList::deleteRule() and
3180         into the (two) call sites.
3181
3182         * css/CSSMediaRule.cpp:
3183         (WebCore::CSSMediaRule::deleteRule):
3184         * css/CSSRuleList.cpp:
3185         (WebCore::CSSRuleList::deleteRule):
3186         * css/WebKitCSSKeyframesRule.cpp:
3187         (WebCore::WebKitCSSKeyframesRule::deleteRule):
3188
3189 2011-11-03  Pavel Feldman  <pfeldman@google.com>
3190
3191         Web Inspector: do not map scripts generated with document.write to the document resources.
3192         https://bugs.webkit.org/show_bug.cgi?id=71114
3193
3194         Reviewed by Yury Semikhatsky.
3195
3196         * inspector/front-end/DebuggerPresentationModel.js:
3197         (WebInspector.DebuggerPresentationModel):
3198         (WebInspector.DebuggerPresentationModel.prototype._addScript):
3199         (WebInspector.DebuggerPresentationModel.prototype._bindScriptToRawSourceCode):
3200         (WebInspector.DebuggerPresentationModel.prototype.uiSourceCodes):
3201         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
3202         (WebInspector.DebuggerPresentationModel.prototype._consoleCleared):
3203         (WebInspector.DebuggerPresentationModel.prototype._rawSourceCodeForScriptWithURL):
3204         (WebInspector.DebuggerPresentationModel.prototype._rawSourceCodeForScript):
3205         (WebInspector.DebuggerPresentationModel.prototype._scriptForRawSourceCode):
3206         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
3207         (WebInspector.DebuggerPresentationModel.Linkifier.prototype.reset):
3208         * inspector/front-end/RawSourceCode.js:
3209         (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent):
3210         (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent):
3211         (WebInspector.RawSourceCode.prototype._createSourceMapping):
3212         * inspector/front-end/Script.js:
3213         (WebInspector.Script.prototype.editSource):
3214         (WebInspector.Script.prototype.isInlineScript):
3215
3216 2011-11-03  Simon Hausmann  <simon.hausmann@nokia.com>
3217
3218         [Qt] Remove Maemo specific code paths
3219         https://bugs.webkit.org/show_bug.cgi?id=71476
3220
3221         Reviewed by Kenneth Rohde Christiansen.
3222
3223         * WebCore.pri:
3224         * features.pri:
3225         * plugins/PluginPackage.cpp:
3226         (WebCore::PluginPackage::determineQuirks):
3227         * plugins/PluginView.cpp:
3228         (WebCore::PluginView::setValue):
3229         * plugins/PluginView.h:
3230         * plugins/qt/PluginViewQt.cpp:
3231         (WebCore::PluginView::updatePluginWidget):
3232         (WebCore::PluginView::paint):
3233         (WebCore::PluginView::platformGetValueStatic):
3234
3235 2011-11-03  Fady Samuel  <fsamuel@chromium.org>
3236
3237         Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
3238         https://bugs.webkit.org/show_bug.cgi?id=70609
3239
3240         Reviewed by Kenneth Rohde Christiansen.
3241
3242         Operations in computeViewportAttributes that are not a part of the spec: 
3243
3244         http://www.w3.org/TR/2011/WD-css-device-adapt-20110915/#constraining-viewport-property-values
3245
3246         were moved into the functions restrictMinimumScaleFactorToViewportSize and
3247         restrictScaleFactorToInitialScaleIfNotUserScalable.
3248
3249         * WebCore.exp.in:
3250         * dom/ViewportArguments.cpp:
3251         (WebCore::computeViewportAttributes):
3252         (WebCore::restrictMinimumScaleFactorToViewportSize):
3253         (WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable):
3254         * dom/ViewportArguments.h:
3255
3256 2011-11-03  Andreas Kling  <kling@webkit.org>
3257
3258         CSSRuleList: Move rule orphaning from deleteRule() out to callers.
3259         https://bugs.webkit.org/show_bug.cgi?id=71470
3260
3261         Reviewed by Antti Koivisto.
3262
3263         Rule parenting is the responsibility of the owner rule (the rule containing
3264         the rule list), so move parent clearing out of CSSRuleList::deleteRule() and
3265         into the (two) call sites.
3266
3267         * css/CSSMediaRule.cpp:
3268         (WebCore::CSSMediaRule::deleteRule):
3269         * css/CSSRuleList.cpp:
3270         (WebCore::CSSRuleList::deleteRule):
3271         * css/WebKitCSSKeyframesRule.cpp:
3272         (WebCore::WebKitCSSKeyframesRule::deleteRule):
3273
3274 2011-11-03  Andreas Kling  <kling@webkit.org>
3275
3276         Unreviewed build fix, sigh.
3277
3278         * css/CSSFontFaceRule.h:
3279         * css/CSSMutableStyleDeclaration.h:
3280
3281 2011-11-03  Andreas Kling  <kling@webkit.org>
3282
3283         Unreviewed build fix, out-of-line StyleSheet::parentStyleSheet()
3284         again since there's a cycle in the includes between CSSRule/StyleSheet.
3285
3286         * css/StyleSheet.cpp:
3287         (WebCore::StyleSheet::parentStyleSheet):
3288         * css/StyleSheet.h:
3289
3290 2011-11-03  Andreas Kling  <kling@webkit.org>
3291
3292         Unreviewed build fix after r99185, removing forward-declaration
3293         of CSSRule since CSSRule.h is already included.
3294
3295         * css/StyleSheet.h:
3296
3297 2011-11-03  Andreas Kling  <kling@webkit.org>
3298
3299         CSSOM: Inline some trivial methods.
3300         https://bugs.webkit.org/show_bug.cgi?id=71468
3301
3302         Reviewed by Antti Koivisto.
3303
3304         * css/CSSFontFaceRule.cpp:
3305         * css/CSSFontFaceRule.h:
3306         (WebCore::CSSFontFaceRule::setDeclaration):
3307         * css/CSSStyleRule.cpp:
3308         * css/CSSStyleRule.h:
3309         (WebCore::CSSStyleRule::setDeclaration):
3310         * css/CSSStyleSheet.cpp:
3311         * css/CSSStyleSheet.h:
3312         (WebCore::CSSStyleSheet::ownerRule):
3313         * css/StyleSheet.cpp:
3314         * css/StyleSheet.h:
3315         (WebCore::StyleSheet::parentStyleSheet):
3316         * css/WebKitCSSKeyframesRule.cpp:
3317         * css/WebKitCSSKeyframesRule.h:
3318         (WebCore::WebKitCSSKeyframesRule::name):
3319         (WebCore::WebKitCSSKeyframesRule::length):
3320
3321 2011-11-03  Andreas Kling  <kling@webkit.org>
3322
3323         Devirtualize MediaList.
3324         https://bugs.webkit.org/show_bug.cgi?id=71464
3325
3326         Reviewed by Antti Koivisto.
3327
3328         * css/MediaList.h: Make the destructor non-virtual.
3329
3330 2011-11-03  Zoltan Herczeg  <zherczeg@webkit.org>
3331
3332         Optimizing arithmetic composite filter to ARM-neon SIMD instruction set
3333         https://bugs.webkit.org/show_bug.cgi?id=65522
3334
3335         Reviewed by Dirk Schulze.
3336
3337         This patch continues the work of Felician Marton.
3338
3339         The arithmetic operation of feComposite SVG filter can be greatly enhanced
3340         by the ARM-NEON instruction set since we are able to calculate the pixel data
3341         for all four RGBA channels at the same time.
3342
3343         It won't affect the general behavior and existing tests will cover the changes.
3344
3345         * CMakeLists.txt:
3346         * GNUmakefile.list.am:
3347         * WebCore.gypi:
3348         * WebCore.pro:
3349         * WebCore.vcproj/WebCore.vcproj:
3350         * platform/graphics/filters/FEComposite.cpp:
3351         (WebCore::computeArithmeticPixels):
3352         (WebCore::arithmeticSoftware):
3353         (WebCore::FEComposite::platformArithmeticSoftware):
3354         (WebCore::FEComposite::platformApplySoftware):
3355         * platform/graphics/filters/FEComposite.h:
3356         * platform/graphics/filters/arm/FECompositeArithmeticNEON.cpp: Added.
3357         * platform/graphics/filters/arm/FECompositeArithmeticNEON.h: Added.
3358         (WebCore::FEComposite::platformArithmeticNeon):
3359
3360 2011-11-03  Simon Hausmann  <simon.hausmann@nokia.com>
3361
3362         [Qt] Add pageScaleFactor to the serialized history item
3363         https://bugs.webkit.org/show_bug.cgi?id=71463
3364
3365         Reviewed by Tor Arne Vestbø.
3366
3367         r75758 added the pageScaleFactor member, which we need to
3368         serialize.
3369
3370         * history/qt/HistoryItemQt.cpp:
3371         (WebCore::HistoryItem::restoreState):
3372         (WebCore::HistoryItem::saveState):
3373
3374 2011-11-03  Mike Lawther  <mikelawther@chromium.org>
3375
3376         Use createPrimitiveNumericValue function
3377         https://bugs.webkit.org/show_bug.cgi?id=71432
3378
3379         Reviewed by Andreas Kling.
3380
3381         No new tests - no change in functionality.
3382
3383         * css/CSSParser.cpp:
3384         (WebCore::CSSParser::parseWrapShapeRect):
3385         (WebCore::CSSParser::parseWrapShapeCircle):
3386         (WebCore::CSSParser::parseWrapShapeEllipse):
3387         (WebCore::CSSParser::parseWrapShapePolygon):
3388
3389 2011-11-03  Pavel Feldman  <pfeldman@google.com>
3390
3391         Not reviewed: win build fix. Assign autoDPI at all cases (breakage introduced in r99173).
3392
3393         * dom/ViewportArguments.cpp:
3394         (WebCore::computeViewportAttributes):
3395
3396 2011-11-03  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3397
3398         Differentiate implicit viewport from that of the meta tag
3399         https://bugs.webkit.org/show_bug.cgi?id=71453
3400
3401         Reviewed by Simon Hausmann.
3402
3403         This is needed because of DPI adjustment taking place with the meta
3404         tag. This is to be avoided when no viewport meta tag is present.
3405
3406         * dom/Document.cpp:
3407         (WebCore::Document::processViewport):
3408         * dom/ViewportArguments.cpp:
3409         (WebCore::computeViewportAttributes):
3410         * dom/ViewportArguments.h:
3411         (WebCore::ViewportArguments::ViewportArguments):
3412         (WebCore::ViewportArguments::operator==):
3413
3414 2011-11-03  Andreas Kling  <kling@webkit.org>
3415
3416         Devirtualize CSSRule.
3417         https://bugs.webkit.org/show_bug.cgi?id=71382
3418
3419         Reviewed by Antti Koivisto.
3420
3421         Remove the virtual destructor from CSSRule, and reimplement RefCounted's deref()
3422         to invoke operator delete on the appropriate subclass type.
3423
3424         This removes the CSSRule vtable and shrinks each instance by one CPU word.
3425
3426         * css/CSSCharsetRule.h:
3427         * css/CSSFontFaceRule.h:
3428         * css/CSSMediaRule.h:
3429         * css/CSSPageRule.h:
3430         * css/CSSRegionStyleRule.h:
3431         * css/CSSRule.cpp:
3432         * css/CSSRule.h:
3433         (WebCore::CSSRule::deref):
3434         (WebCore::CSSRule::~CSSRule):
3435         * css/CSSStyleRule.h:
3436         * css/WebKitCSSKeyframeRule.h:
3437
3438             Devirtualize!
3439
3440         * css/CSSRule.cpp:
3441         (WebCore::CSSRule::destroy):
3442
3443             Added, invokes operator delete on the right subclass type.
3444
3445         * css/CSSImportRule.cpp:
3446         (WebCore::CSSImportRule::CSSImportRule):
3447         (WebCore::CSSImportRule::~CSSImportRule):
3448         (WebCore::CSSImportRule::requestStyleSheet):
3449         * css/CSSImportRule.h:
3450         (WebCore::CSSImportRule::ImportedStyleSheetClient::ImportedStyleSheetClient):
3451         (WebCore::CSSImportRule::ImportedStyleSheetClient::~ImportedStyleSheetClient):
3452         (WebCore::CSSImportRule::ImportedStyleSheetClient::setCSSStyleSheet):
3453
3454             Break out the inheritance from CachedStyleSheetClient into a member variable
3455             that simply redirects the setCSSStyleSheet() callback to the CSSImportRule.
3456
3457 2011-10-31  Hans Wennborg  <hans@chromium.org>
3458
3459         IndexedDB: Recycle cursor objects when calling continue()
3460         https://bugs.webkit.org/show_bug.cgi?id=71115
3461
3462         Reviewed by Darin Fisher.
3463
3464         The IndexedDB spec says that cursors should be recycled when calling
3465         continue(). Let the IDBRequest keep track of which cursor to return
3466         upon success, and have the cursor use a new callback:
3467         onSuccessWithContinuation() to signal that the continue was successful.
3468
3469         When we start using the new callback, the
3470         storage/indexeddb/cursor-inconsistency.html layout test will start
3471         passing.
3472
3473         * storage/IDBCallbacks.h:
3474         * storage/IDBCursorBackendImpl.cpp:
3475         (WebCore::IDBCursorBackendImpl::continueFunctionInternal):
3476         * storage/IDBRequest.cpp:
3477         (WebCore::IDBRequest::IDBRequest):
3478         (WebCore::IDBRequest::setCursor):
3479         (WebCore::IDBRequest::onSuccess):
3480         (WebCore::IDBRequest::onSuccessWithContinuation):
3481         * storage/IDBRequest.h:
3482
3483 2011-11-03  Pavel Feldman  <pfeldman@google.com>
3484
3485         Web Inspector: preserve script location for inline handlers.
3486         https://bugs.webkit.org/show_bug.cgi?id=71367
3487
3488         Makes eventHandler report position, not line number;
3489
3490         Reviewed by Yury Semikhatsky.
3491
3492         * bindings/js/CachedScriptSourceProvider.h:
3493         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
3494         * bindings/js/JSLazyEventListener.cpp:
3495         (WebCore::JSLazyEventListener::JSLazyEventListener):
3496         (WebCore::JSLazyEventListener::initializeJSFunction):
3497         * bindings/js/JSLazyEventListener.h:
3498         (WebCore::JSLazyEventListener::create):
3499         * bindings/js/ScriptController.cpp:
3500         (WebCore::ScriptController::eventHandlerPosition):
3501         * bindings/js/ScriptController.h:
3502         * bindings/js/ScriptEventListener.cpp:
3503         (WebCore::createAttributeEventListener):
3504         * bindings/js/ScriptSourceProvider.h:
3505         (WebCore::ScriptSourceProvider::ScriptSourceProvider):
3506         * bindings/js/StringSourceProvider.h: