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