https://bugs.webkit.org/show_bug.cgi?id=69966
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-10-17  Antti Koivisto  <antti@apple.com>
2
3         https://bugs.webkit.org/show_bug.cgi?id=69966
4         Eliminate separate RenderStyle for visited link style
5
6         Reviewed by Dave Hyatt and Nikolas Zimmermann.
7
8         There are only a few properties that can apply to visited links and they can
9         be part of the regular style. Many things will get simpler when the separate 
10         RenderStyle for visited links is eliminated.
11         
12         - Add valid visited link properties as separate fields to RenderStyle. The  
13           visitedLinkColor goes to inherited, everything else goes to rare data structures.
14         - Make RenderStyle::visitedDependentColor() get the visited style from the new fields.
15         - As VISITED_LINK pseudo style doesn't exists anymore, remove all code dealing with it.
16         - Make CSSStyleSelector and ApplyPropertyColor apply the visited link style to the
17           newly added fields instead of a separate RenderStyle.
18         - Same thing with SVGRenderStyle, SVGCSSStyleSelector.
19         - Fixup the SVG visited link style code to use the new fields.
20
21         This is ~15% progression in styleForElement performance over the HTML5 spec load.
22
23         * css/CSSStyleApplyProperty.cpp:
24         (WebCore::ApplyPropertyColor::ApplyPropertyColor):
25         (WebCore::ApplyPropertyColor::applyInheritValue):
26         (WebCore::ApplyPropertyColor::applyInitialValue):
27         (WebCore::ApplyPropertyColor::applyValue):
28         (WebCore::ApplyPropertyColor::applyColorValue):
29         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
30         * css/CSSStyleSelector.cpp:
31         (WebCore::CSSStyleSelector::CSSStyleSelector):
32         (WebCore::CSSStyleSelector::styleForElement):
33         (WebCore::CSSStyleSelector::pseudoStyleForElement):
34         (WebCore::CSSStyleSelector::updateFont):
35         (WebCore::CSSStyleSelector::applyDeclaration):
36         (WebCore::CSSStyleSelector::applyDeclarations):
37         (WebCore::CSSStyleSelector::applyProperty):
38         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
39         * css/CSSStyleSelector.h:
40         (WebCore::CSSStyleSelector::applyPropertyToRegularStyle):
41         (WebCore::CSSStyleSelector::applyPropertyToVisitedLinkStyle):
42         * css/SVGCSSStyleSelector.cpp:
43         (WebCore::CSSStyleSelector::applySVGProperty):
44         * dom/Element.cpp:
45         (WebCore::Element::pseudoStyleCacheIsInvalid):
46         * rendering/style/RenderStyle.cpp:
47         (WebCore::RenderStyle::getCachedPseudoStyle):
48         (WebCore::RenderStyle::colorIncludingFallback):
49         (WebCore::RenderStyle::visitedDependentColor):
50         * rendering/style/RenderStyle.h:
51         (WebCore::InheritedFlags::setVisitedLinkColor):
52         (WebCore::InheritedFlags::setVisitedLinkBackgroundColor):
53         (WebCore::InheritedFlags::setVisitedLinkBorderLeftColor):
54         (WebCore::InheritedFlags::setVisitedLinkBorderRightColor):
55         (WebCore::InheritedFlags::setVisitedLinkBorderBottomColor):
56         (WebCore::InheritedFlags::setVisitedLinkBorderTopColor):
57         (WebCore::InheritedFlags::setVisitedLinkOutlineColor):
58         (WebCore::InheritedFlags::setVisitedLinkColumnRuleColor):
59         (WebCore::InheritedFlags::setVisitedLinkTextEmphasisColor):
60         (WebCore::InheritedFlags::setVisitedLinkTextFillColor):
61         (WebCore::InheritedFlags::setVisitedLinkTextStrokeColor):
62         * rendering/style/RenderStyleConstants.h:
63         * rendering/style/SVGRenderStyle.h:
64         (WebCore::SVGRenderStyle::setVisitedLinkFillPaint):
65         (WebCore::SVGRenderStyle::setVisitedLinkStrokePaint):
66         (WebCore::SVGRenderStyle::visitedLinkFillPaintType):
67         (WebCore::SVGRenderStyle::visitedLinkFillPaintColor):
68         (WebCore::SVGRenderStyle::visitedLinkStrokePaintType):
69         (WebCore::SVGRenderStyle::visitedLinkStrokePaintColor):
70         * rendering/style/SVGRenderStyleDefs.cpp:
71         (WebCore::StyleFillData::StyleFillData):
72         (WebCore::StyleFillData::operator==):
73         (WebCore::StyleStrokeData::StyleStrokeData):
74         (WebCore::StyleStrokeData::operator==):
75         * rendering/style/SVGRenderStyleDefs.h:
76         * rendering/style/StyleInheritedData.cpp:
77         (WebCore::StyleInheritedData::StyleInheritedData):
78         (WebCore::StyleInheritedData::operator==):
79         * rendering/style/StyleInheritedData.h:
80         * rendering/style/StyleMultiColData.cpp:
81         (WebCore::StyleMultiColData::StyleMultiColData):
82         (WebCore::StyleMultiColData::operator==):
83         * rendering/style/StyleMultiColData.h:
84         * rendering/style/StyleRareInheritedData.cpp:
85         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
86         (WebCore::StyleRareInheritedData::operator==):
87         * rendering/style/StyleRareInheritedData.h:
88         * rendering/style/StyleRareNonInheritedData.cpp:
89         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
90         (WebCore::StyleRareNonInheritedData::operator==):
91         * rendering/style/StyleRareNonInheritedData.h:
92         * rendering/svg/RenderSVGResource.cpp:
93         (WebCore::requestPaintingResource):
94
95 2011-10-17  Eric Carlson  <eric.carlson@apple.com>
96
97         Cues should be loaded by the cached resource loader
98         https://bugs.webkit.org/show_bug.cgi?id=70134
99
100         Reviewed by Darin Adler.
101
102         No new tests, changes covered by existing tests.
103
104         * CMakeLists.txt: Add CachedCues.cpp/h.
105         * GNUmakefile.list.am: Ditto.
106         * WebCore.gypi: Ditto.
107         * WebCore.xcodeproj/project.pbxproj: Ditto.
108
109         * loader/cache/CachedCues.cpp: Added.
110         (WebCore::CachedCues::CachedCues):
111         (WebCore::CachedCues::~CachedCues):
112         (WebCore::CachedCues::data): Called when new data has been loaded, pass it to all registered
113             clients.
114         * loader/cache/CachedCues.h: Added.
115
116         * loader/cache/CachedResource.cpp:
117         (WebCore::defaultPriorityForResourceType): Cues have low loader priority.
118         * loader/cache/CachedResource.h:
119
120         * loader/cache/CachedResourceClient.h:
121         (WebCore::CachedResourceClient::didReceiveData): New client interface.
122
123         * loader/cache/CachedResourceLoader.cpp:
124         (WebCore::createResource): Create and return a new cue loader.
125         (WebCore::CachedResourceLoader::requestCues):
126         (WebCore::CachedResourceLoader::checkInsecureContent): Cues aren't mentioned in the CPS spec
127             yet, but they only work with a media element so use the mdia policy.
128         (WebCore::CachedResourceLoader::canRequest): Allow cues to be loaded from any origin like media.
129         * loader/cache/CachedResourceLoader.h:
130
131         * loader/cache/CachedResourceRequest.cpp:
132         (WebCore::cachedResourceTypeToTargetType):
133         * platform/network/chromium/ResourceRequest.h:
134
135 2011-10-17  Dan Bernstein  <mitz@apple.com>
136
137         <rdar://problem/10293929> REGRESSION (r97525): iChat transcript has horizontal scroll bar when the conversation includes a wide image
138         https://bugs.webkit.org/show_bug.cgi?id=70204
139
140         Reviewed by Darin Adler.
141
142         Reverted r97525, which was supposed to fix <http://webkit.org/b/29447>.
143
144         * rendering/RenderBox.cpp:
145         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
146         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
147         * rendering/RenderBox.h:
148
149 2011-10-17  Ada Chan  <adachan@apple.com>
150
151         Export KURL::baseAsString() so it can be called in WebProcessProxy::assumeReadAccessToBaseURL() in WebKit2.
152         https://bugs.webkit.org/show_bug.cgi?id=70168
153
154         Reviewed by Alexey Proskuryakov.
155
156         No new tests. There is no change in functionality.
157
158         * WebCore.exp.in: Export KURL::baseAsString().
159
160 2011-10-17  Ryosuke Niwa  <rniwa@webkit.org>
161
162         Touch Internals.cpp to make 64-bit GTK+ build happy.
163
164         * testing/Internals.cpp:
165
166 2011-10-17  Chris Fleizach  <cfleizach@apple.com>
167
168         AX: children() method should be consolidated in AccessibilityObject
169         https://bugs.webkit.org/show_bug.cgi?id=70243
170
171         Code cleanup, no new tests.
172
173         Reviewed by Darin Adler.
174
175         * accessibility/AccessibilityObject.cpp:
176         (WebCore::AccessibilityObject::children):
177         * accessibility/AccessibilityObject.h:
178         * accessibility/AccessibilityRenderObject.cpp:
179         (WebCore::AccessibilityRenderObject::updateChildrenIfNecessary):
180         * accessibility/AccessibilityRenderObject.h:
181         * accessibility/AccessibilityScrollView.cpp:
182         (WebCore::AccessibilityScrollView::updateChildrenIfNecessary):
183         (WebCore::AccessibilityScrollView::updateScrollbars):
184         (WebCore::AccessibilityScrollView::addChildren):
185         * accessibility/AccessibilityScrollView.h:
186         * accessibility/AccessibilitySlider.cpp:
187         * accessibility/AccessibilitySlider.h:
188         * accessibility/AccessibilityTableColumn.cpp:
189         * accessibility/AccessibilityTableColumn.h:
190         * accessibility/AccessibilityTableHeaderContainer.cpp:
191         * accessibility/AccessibilityTableHeaderContainer.h:
192
193 2011-10-17  Vsevolod Vlasov  <vsevik@chromium.org>
194
195         Web Inspector: Search matches highlighting in text does not work correctly.
196         https://bugs.webkit.org/show_bug.cgi?id=70244
197
198         Reviewed by Pavel Feldman.
199
200         Test: inspector/utilities-highlight-results.html
201
202         * inspector/front-end/utilities.js:
203         ():
204
205 2011-10-17  Chris Fleizach  <cfleizach@apple.com>
206
207         AX: webkit won't always send live region notifications
208         https://bugs.webkit.org/show_bug.cgi?id=70030
209
210         Webkit purposefully does not send live region notifications if some AT client has not accessed the AX tree in between 
211         the last live region update (ostensibly to improve performance).
212         However, this is problematic if a screen reader misses one notification... it has no idea what happened and the only 
213         recourse is to rescan the page for changes. The correct thing to do is to always send notifications.
214
215         Reviewed by Darin Adler.
216
217         Test: platform/mac/accessibility/aria-liveregions-notifications-always-sent.html
218
219         * accessibility/AccessibilityRenderObject.cpp:
220         (WebCore::AccessibilityRenderObject::childrenChanged):
221
222 2011-10-12  Pavel Podivilov  <podivilov@chromium.org>
223
224         Web Inspector: fix handling of source mapping entries with no mapping.
225         https://bugs.webkit.org/show_bug.cgi?id=69941
226
227         Reviewed by Pavel Feldman.
228
229         * inspector/front-end/CompilerSourceMapping.js:
230         (WebInspector.ClosureCompilerSourceMapping.prototype._parseMappings):
231
232 2011-10-17  Mikhail Naganov  <mnaganov@chromium.org>
233
234         Web Inspector: [Chromium] Add an ability to look up and explore an object from a heap profile.
235         https://bugs.webkit.org/show_bug.cgi?id=61179
236
237         This is exteremely helpful when dealing with DOM wrappers, as
238         their properties are mostly implemented with getters and thus not
239         stored in heap snapshots.
240
241         Reviewed by Pavel Feldman.
242
243         * English.lproj/localizedStrings.js:
244         * bindings/js/ScriptProfiler.cpp:
245         (WebCore::ScriptProfiler::objectByHeapObjectId):
246         * bindings/js/ScriptProfiler.h:
247         * bindings/v8/ScriptProfiler.cpp:
248         (WebCore::ScriptProfiler::objectByHeapObjectId):
249         * bindings/v8/ScriptProfiler.h:
250         * inspector/Inspector.json:
251         * inspector/InspectorController.cpp:
252         (WebCore::InspectorController::InspectorController):
253         * inspector/InspectorProfilerAgent.cpp:
254         (WebCore::InspectorProfilerAgent::create):
255         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
256         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
257         * inspector/InspectorProfilerAgent.h:
258         * inspector/front-end/DetailedHeapshotGridNodes.js:
259         (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.queryObjectContent):
260         (WebInspector.HeapSnapshotGenericObjectNode):
261         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
262         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent.else.formatResult):
263         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent):
264         (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
265         * inspector/front-end/DetailedHeapshotView.js:
266         (WebInspector.DetailedHeapshotView.prototype._showObjectPopover):
267         * inspector/front-end/HeapSnapshot.js:
268         (WebInspector.HeapSnapshotNode.prototype.get canBeQueried):
269         (WebInspector.HeapSnapshotNode.prototype.get flags):
270         (WebInspector.HeapSnapshotNode.prototype.get isDOMWindow):
271         (WebInspector.HeapSnapshot.prototype._init):
272         (WebInspector.HeapSnapshot.prototype.dispose):
273         (WebInspector.HeapSnapshot.prototype._flagsOfNode):
274         (WebInspector.HeapSnapshot.prototype._calculateFlags):
275         (WebInspector.HeapSnapshot.prototype.updateStaticData):
276         (WebInspector.HeapSnapshotNodesProvider.prototype._serialize):
277         * inspector/front-end/HeapSnapshotProxy.js:
278         (WebInspector.HeapSnapshotProxy.prototype.get nodeFlags):
279         * inspector/front-end/RemoteObject.js:
280         (WebInspector.RemoteObject.fromError):
281         * inspector/front-end/heapProfiler.css:
282         (.detailed-heapshot-view tr:not(.selected) td.object-column span.highlight):
283
284 2011-10-17  Alexander Pavlov  <apavlov@chromium.org>
285
286         Web Inspector: Editing CSS selector doesn't fire onResourceContentCommitted
287         https://bugs.webkit.org/show_bug.cgi?id=70018
288
289         Reviewed by Yury Semikhatsky.
290
291         Test: inspector/styles/commit-selector.html
292
293         * inspector/front-end/CSSStyleModel.js:
294         (WebInspector.CSSStyleModel.prototype.setRuleSelector.callback):
295         (WebInspector.CSSStyleModel.prototype.setRuleSelector):
296
297 2011-10-17  Andreas Kling  <kling@webkit.org>
298
299         CSS/XSLStyleSheet: Remove insert() and remove().
300         https://bugs.webkit.org/show_bug.cgi?id=70226
301
302         Reviewed by Antti Koivisto.
303
304         Remove insert() and remove() from XSLStyleSheet. CSSStyleSheet retains remove()
305         since it's used by InspectorStyleSheet as well as SVGFontFaceElement.
306
307         * css/CSSStyleSheet.cpp:
308         (WebCore::CSSStyleSheet::remove):
309
310             Remove range check. This method is internal to WebKit and the call sites
311             already take care of it.
312
313         (WebCore::CSSStyleSheet::insertRule):
314         (WebCore::CSSStyleSheet::deleteRule):
315         * css/CSSStyleSheet.h:
316         * xml/XSLStyleSheet.h:
317
318 2011-10-17  Rosen Dash  <rosen.dash@motorola.com>
319
320         when CSS pseudo selectors are applied (:before and :after) the *-of-line keyboard navigation does not work
321         https://bugs.webkit.org/show_bug.cgi?id=10123
322
323         Reviewed by Ryosuke Niwa.
324
325         This patch addresses folllowing two issues:
326         1. When CSS pseudo elements are before or after is used with content attribute containing single character
327            at the start/end of text and we try to move cursor by right navigation key, the page freezes falling
328            into an infinite loop.
329         2. When these elements try to insert some text between a text line, navigation by right/left arrow key is prohibited.
330
331         Tests: editing/selection/css-pseudo-element-hang.html
332                editing/selection/css-pseudo-element.html
333
334         * editing/VisiblePosition.cpp:
335         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
336         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
337
338 2011-10-15  Antti Koivisto  <antti@apple.com>
339
340         Test :visited pseudo class
341         https://bugs.webkit.org/show_bug.cgi?id=70219
342
343         Reviewed by Andreas Kling.
344         
345         Currently DRT doesn't support :visited. All tests where it should match have wrong checked in results.
346         
347         - Make <a href=""> to match :visited in DRT. It already does on browsers. A number of existing tests 
348           for :visited use it already, the rest can be modified to use it.
349         - Make render tree dumps correctly dump the visited state dependent color.
350
351         * css/SelectorChecker.cpp:
352         (WebCore::SelectorChecker::determineLinkStateSlowCase):
353         * rendering/RenderTreeAsText.cpp:
354         (WebCore::RenderTreeAsText::writeRenderObject):
355
356 2011-10-17  Satish Sampath  <satish@chromium.org>
357
358         Avoid leaking document when leaving google.com due to geolocation
359         permission request.
360         https://bugs.webkit.org/show_bug.cgi?id=58027
361
362         Reviewed by Kenneth Rohde Christiansen.
363
364         * page/Geolocation.cpp:
365         (WebCore::Geolocation::Watchers::find): added
366         (WebCore::Geolocation::reset): cleared all pending notifiers.
367         (WebCore::Geolocation::clearWatch): removed from pending notifier set.
368         * page/Geolocation.h:
369         (WebCore::Geolocation::Watchers::find): added
370
371 2011-10-17  Andrei Lavreniyuk  <andy.lavr@gmail.com>
372
373         Fix clang WebKitGTK+ build.
374
375         Reviewed by Martin Robinson.
376
377         * plugins/gtk/PluginViewGtk.cpp:
378
379 2011-10-16  Adam Barth  <abarth@webkit.org>
380
381         Always disable ENABLE(ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL) and delete associated code
382         https://bugs.webkit.org/show_bug.cgi?id=70216
383
384         Reviewed by Eric Seidel.
385
386         No port enables this feature.  It was added for the previous Android
387         port (and should have been an editing behavior in any case).
388
389         * html/HTMLTextAreaElement.cpp:
390         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
391
392 2011-10-16  Ryosuke Niwa  <rniwa@webkit.org>
393
394         Expose rangeFromLocationAndLength and locationAndLengthFromRange via internals object
395         https://bugs.webkit.org/show_bug.cgi?id=68330
396
397         Reviewed by Hajime Morita.
398
399         Add rangeFromLocationAndLength, locationFromRange, and lengthFromRange to window.internals.
400
401         Test: editing/text-iterator/range-to-from-location-and-length.html
402
403         * WebCore.exp.in:
404         * testing/Internals.cpp:
405         (WebCore::Internals::scrollElementToRect):
406         (WebCore::Internals::rangeFromLocationAndLength):
407         (WebCore::Internals::locationFromRange):
408         (WebCore::Internals::lengthFromRange):
409         * testing/Internals.h:
410         * testing/Internals.idl:
411
412 2011-10-16  Kentaro Hara  <haraken@chromium.org>
413
414         Generate MessageChannel constructor by [Constructor] IDL
415         https://bugs.webkit.org/show_bug.cgi?id=70214
416
417         Reviewed by Adam Barth.
418
419         This patch generates an MessageChannel constructor for JSC by [Constructor] IDL,
420         but V8 is still using a custom constructor since the V8 constructor requires special logic.
421
422         Tests: fast/dom/global-constructors.html
423                fast/events/message-port.html
424                fast/events/message-port-no-wrapper.html
425                fast/dom/Window/window-postmessage-args.html
426
427         * bindings/js/JSMessageChannelCustom.cpp: Removed the MessageChannel constructor.
428         * dom/MessageChannel.idl: Generates the MessageChannel constructor for JSC.
429
430 2011-10-16  Ryosuke Niwa  <rniwa@webkit.org>
431
432         [Mac] fontForSelection and styleForSelectionStart should be moved to EditorMac
433         https://bugs.webkit.org/show_bug.cgi?id=70114
434
435         Reviewed by Hajime Morita.
436
437         Moved fontForSelection and styleForSelectionStart from Editor to EditorMac
438         and made styleForSelectionStart static local.
439
440         * editing/Editor.cpp:
441         * editing/Editor.h:
442         * editing/mac/EditorMac.mm:
443         (WebCore::styleForSelectionStart):
444         (WebCore::Editor::fontForSelection):
445         (WebCore::Editor::fontAttributesForSelectionStart):
446
447 2011-10-16  Kentaro Hara  <haraken@chromium.org>
448
449         Generate EventSource constructor for JSC by [Constructor] IDL
450         https://bugs.webkit.org/show_bug.cgi?id=70212
451
452         Reviewed by Adam Barth.
453
454         Removed JSEventSourceCustom.cpp.
455
456         Tests: fast/dom/global-constructors.html
457                fast/eventsource/eventsource-constructor.html
458                fast/eventsource/eventsource-attribute-listeners.html
459
460         * GNUmakefile.list.am: Removed JSEventSourceCustom.cpp.
461         * UseJSC.cmake: Ditto.
462         * WebCore.gypi: Ditto.
463         * WebCore.pro: Ditto.
464         * WebCore.xcodeproj/project.pbxproj: Ditto.
465         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
466         * bindings/js/JSEventSourceCustom.cpp: Removed this file.
467         * page/EventSource.idl: Removed 'JSCustomConstructor' IDL.
468
469 2011-10-16  David Barr  <davidbarr@chromium.org>
470
471         Inline CSSPrimitiveValue::isQuirkValue() as non-virtual function
472         https://bugs.webkit.org/show_bug.cgi?id=64865
473
474         Reviewed by Darin Adler.
475
476         Based on profiling and patch from:
477         Tamas Czene <Czene.Tamas@stud.u-szeged.hu>
478
479         This is expected to produce a small performance progression.
480         Additional memory overhead is avoided by using spare bits.
481         CSSQuirkPrimitiveValue is removed as it becomes just a factory.
482
483         * GNUmakefile.list.am:
484         * WebCore.gypi:
485         * WebCore.order:
486         * WebCore.vcproj/WebCore.vcproj:
487         * WebCore.xcodeproj/project.pbxproj:
488         * css/CSSParser.cpp:
489         (WebCore::CSSParser::parseValidPrimitive):
490         * css/CSSParserValues.cpp:
491         (WebCore::CSSParserValue::createCSSValue):
492         * css/CSSPrimitiveValue.cpp:
493         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
494         * css/CSSPrimitiveValue.h:
495         (WebCore::CSSPrimitiveValue::createAllowingMarginQuirk):
496         Moved from CSSQuirkPrimitiveValue::create.
497         (WebCore::CSSPrimitiveValue::isQuirkValue):
498         * css/CSSQuirkPrimitiveValue.h: Removed.
499         * css/SVGCSSParser.cpp:
500         (WebCore::CSSParser::parseSVGValue):
501
502 2011-10-16  Kentaro Hara  <haraken@chromium.org>
503
504         Generate XMLHttpRequest constructor for JSC by [Constructor] IDL
505         https://bugs.webkit.org/show_bug.cgi?id=70208
506
507         Reviewed by Adam Barth.
508
509         This patch generates an XMLHttpRequest constructor for JSC by [Constructor] IDL,
510         but V8 is still using a custom constructor since the V8 constructor requires a special logic.
511
512         Tests: fast/dom/global-constructors.html
513                fast/dom/XMLHttpRequest-constants.html
514                fast/dom/xmlhttprequest-constructor-in-detached-document.html
515                http/tests/security/cookies/xmlhttprequest.html
516
517         * bindings/js/JSXMLHttpRequestCustom.cpp: Removed an XMLHttpRequest custom constructor.
518         * bindings/scripts/CodeGeneratorV8.pm: Currently, CodeGeneratorV8.pm generates constructor code whenever [Constructor] is specified, even if [V8CustomConstructor] is specified. This is wrong. This patch fixes the condition where the constructor code is generated.
519         * bindings/scripts/test/V8/V8TestObj.cpp: Updated a run-binding-tests result.
520         * xml/XMLHttpRequest.h: Added a necessary header.
521         * xml/XMLHttpRequest.idl: V8 is still using a custom constructor.
522
523 2011-10-16  Kentaro Hara  <haraken@chromium.org>
524
525         Generate XSLTProcessor constructor for JSC by [Constructor] IDL.
526         https://bugs.webkit.org/show_bug.cgi?id=70206
527
528         Reviewed by Adam Barth.
529
530         Tests: fast/xsl/xslt-processor.html
531                fast/xsl/default-html.html
532                fast/dom/global-constructors.html
533
534         * bindings/js/JSXSLTProcessorCustom.cpp: Removed a custom constructor.
535         * xml/XSLTProcessor.idl: Removed 'JSCustomConstructor'.
536
537 2011-10-16  Kentaro Hara  <haraken@chromium.org>
538
539         Support [Constructor] IDL for JSC.
540         https://bugs.webkit.org/show_bug.cgi?id=70101
541
542         Reviewed by Adam Barth.
543
544         The spec for [Constructor] IDL is here: http://www.w3.org/TR/WebIDL/#Constructor
545         This patch introduced [Constructor] IDL for JSC. This patch also added
546         [ConstructorRaisesException] for JSC. If [ConstructorRaisesException] is specified,
547         a placeholder for ExceptionCode is passed to XXX::create(), like XXX::create(..., ec).
548
549         Notes:
550         - We do not yet support constructor overloading.
551         - We do not yet support [Optional] without CallWithDefaultValue for constructor arguments.
552
553         Tests: Source/WebCore/bindings/scripts/test/TestInterface.idl
554                Source/WebCore/bindings/scripts/test/TestObj.idl
555
556         * bindings/scripts/CodeGeneratorJS.pm:
557         (GenerateHeader): Generates constructor declaration code to a header file, if a given DOM object has constructor.
558         (GenerateImplementation): Uses GenerateArgumentsCountCheck() and GenerateParametersCheck().
559         (GenerateArgumentsCountCheck): Splits out of GenerateImplementation() for reuse.
560         (GenerateParametersCheck): Splits out of GenerateImplementation() for reuse.
561         (GenerateConstructorDefinition): Generates constructor definition code.
562         * bindings/scripts/test/JS/JSTestInterface.cpp: Updated the run-binding-tests results.
563         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
564         * bindings/scripts/test/JS/JSTestInterface.h: Ditto.
565         (WebCore::JSTestInterfaceConstructor::create):
566         (WebCore::JSTestInterfaceConstructor::createStructure):
567         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
568         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
569         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: Ditto.
570         (WebCore::JSTestMediaQueryListListenerConstructor::create):
571         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
572         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
573         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
574         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
575         (WebCore::jsTestObjPrototypeFunctionIntMethod):
576         (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
577         (WebCore::jsTestObjPrototypeFunctionObjMethod):
578         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
579         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgs):
580         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
581         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
582         (WebCore::jsTestObjPrototypeFunctionIdbKey):
583         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
584         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
585         (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
586         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
587         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
588         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrame):
589         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg):
590         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg):
591         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture):
592         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD):
593         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
594         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
595         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
596         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
597         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
598         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
599         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
600         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
601         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
602         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
603         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
604         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
605         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
606         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
607         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
608         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
609         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
610         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
611         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
612         (WebCore::jsTestObjPrototypeFunctionClassMethod):
613         (WebCore::jsTestObjPrototypeFunctionClassMethodWithOptional):
614         * bindings/scripts/test/JS/JSTestObj.h: Ditto.
615         (WebCore::JSTestObjConstructor::create):
616         (WebCore::JSTestObjConstructor::createStructure):
617         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
618         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: Ditto.
619         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
620         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
621
622 2011-10-16  Dmitry Lomov  <dslomov@google.com>
623
624         https://bugs.webkit.org/show_bug.cgi?id=70186
625         Pass MessagePortArray to JSC's SerializedScriptValue::serialize/deserialize.
626
627         Reviewed by Oliver Hunt.
628
629         * bindings/js/JSDOMWindowCustom.cpp:
630         (WebCore::handlePostMessage):
631         (WebCore::JSDOMWindow::postMessage):
632         (WebCore::JSDOMWindow::webkitPostMessage):
633         * bindings/js/JSDictionary.cpp:
634         (WebCore::JSDictionary::convertValue):
635         * bindings/js/JSHistoryCustom.cpp:
636         (WebCore::JSHistory::pushState):
637         (WebCore::JSHistory::replaceState):
638         * bindings/js/JSMessageEventCustom.cpp:
639         (WebCore::JSMessageEvent::data):
640         (WebCore::handleInitMessageEvent):
641         (WebCore::JSMessageEvent::initMessageEvent):
642         (WebCore::JSMessageEvent::webkitInitMessageEvent):
643         * bindings/js/JSMessagePortCustom.h:
644         (WebCore::handlePostMessage):
645         * bindings/js/JSPopStateEventCustom.cpp:
646         (WebCore::JSPopStateEvent::state):
647         * bindings/js/ScriptValue.cpp:
648         (WebCore::ScriptValue::serialize):
649         (WebCore::ScriptValue::deserialize):
650         * bindings/js/SerializedScriptValue.cpp:
651         (WebCore::SerializedScriptValue::create):
652         (WebCore::SerializedScriptValue::deserialize):
653         * bindings/js/SerializedScriptValue.h:
654
655 2011-10-16  Dan Bernstein  <mitz@apple.com>
656
657         REGRESSION (r96620): Float-avoiding block positioned incorrectly in right-to-left block
658         https://bugs.webkit.org/show_bug.cgi?id=70197
659
660         Reviewed by Dave Kilzer.
661
662         Test: fast/block/float/avoidance-rtl.html
663
664         * rendering/RenderBlock.cpp:
665         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats): Changed
666         logicalLeftOffsetForContent() to startOffsetForContent() to get the right value in the
667         right-to-left case.
668
669 2011-10-16  Adam Barth  <abarth@webkit.org>
670
671         Always enable ENABLE(DOM_STORAGE)
672         https://bugs.webkit.org/show_bug.cgi?id=70189
673
674         Reviewed by Eric Seidel.
675
676         As discussed on webkit-dev, we are reducing the complexity of WebKit by
677         removing unnecessary configuration options.  DOMStorage is not a core
678         part of the web platform.  It should always be enabled.
679
680         * CMakeLists.txt:
681         * Configurations/FeatureDefines.xcconfig:
682         * GNUmakefile.am:
683         * GNUmakefile.list.am:
684         * UseJSC.cmake:
685         * WebCore.exp.in:
686         * WebCore.pro:
687         * bindings/js/JSEventCustom.cpp:
688         * bindings/js/JSInjectedScriptHostCustom.cpp:
689         * bindings/js/JSStorageCustom.cpp:
690         * bindings/v8/custom/V8EventCustom.cpp:
691         (WebCore::toV8):
692         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
693         (WebCore::V8InjectedScriptHost::storageIdCallback):
694         * bindings/v8/custom/V8StorageCustom.cpp:
695         * dom/Document.cpp:
696         (WebCore::Document::createEvent):
697         * dom/Event.cpp:
698         (WebCore::Event::isStorageEvent):
699         * dom/Event.h:
700         * dom/Node.cpp:
701         * features.pri:
702         * inspector/InjectedScriptHost.cpp:
703         (WebCore::InjectedScriptHost::InjectedScriptHost):
704         (WebCore::InjectedScriptHost::disconnect):
705         (WebCore::InjectedScriptHost::storageIdImpl):
706         * inspector/InjectedScriptHost.h:
707         (WebCore::InjectedScriptHost::init):
708         * inspector/InspectorController.cpp:
709         (WebCore::InspectorController::InspectorController):
710         (WebCore::InspectorController::connectFrontend):
711         (WebCore::InspectorController::disconnectFrontend):
712         (WebCore::InspectorController::restoreInspectorStateFromCookie):
713         * inspector/InspectorController.h:
714         * inspector/InspectorDOMStorageAgent.cpp:
715         * inspector/InspectorDOMStorageResource.cpp:
716         * inspector/InspectorDOMStorageResource.h:
717         * inspector/InspectorInstrumentation.cpp:
718         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
719         (WebCore::InspectorInstrumentation::didUseDOMStorageImpl):
720         * inspector/InspectorInstrumentation.h:
721         (WebCore::InspectorInstrumentation::didUseDOMStorage):
722         * inspector/InstrumentingAgents.h:
723         (WebCore::InstrumentingAgents::InstrumentingAgents):
724         * inspector/WorkerInspectorController.cpp:
725         (WebCore::WorkerInspectorController::WorkerInspectorController):
726         (WebCore::WorkerInspectorController::connectFrontend):
727         * inspector/generate-inspector-idl:
728         * page/Chrome.cpp:
729         * page/DOMWindow.cpp:
730         (WebCore::DOMWindow::~DOMWindow):
731         (WebCore::DOMWindow::clear):
732         (WebCore::DOMWindow::localStorage):
733         * page/DOMWindow.h:
734         * page/DOMWindow.idl:
735         * page/Navigator.cpp:
736         (WebCore::Navigator::getStorageUpdates):
737         * page/Navigator.h:
738         * page/Navigator.idl:
739         * page/Page.cpp:
740         * page/Page.h:
741         * page/PageGroup.cpp:
742         (WebCore::PageGroup::closeLocalStorage):
743         * page/PageGroup.h:
744         * page/Settings.cpp:
745         (WebCore::Settings::Settings):
746         (WebCore::Settings::setSessionStorageQuota):
747         * page/Settings.h:
748         (WebCore::Settings::sessionStorageQuota):
749         * storage/LocalStorageTask.cpp:
750         * storage/LocalStorageTask.h:
751         * storage/LocalStorageThread.cpp:
752         * storage/LocalStorageThread.h:
753         * storage/Storage.cpp:
754         * storage/Storage.h:
755         * storage/Storage.idl:
756         * storage/StorageArea.h:
757         * storage/StorageAreaImpl.cpp:
758         * storage/StorageAreaImpl.h:
759         * storage/StorageAreaSync.cpp:
760         (WebCore::StorageAreaSync::scheduleSync):
761         * storage/StorageAreaSync.h:
762         * storage/StorageEvent.cpp:
763         * storage/StorageEvent.h:
764         * storage/StorageEvent.idl:
765         * storage/StorageEventDispatcher.cpp:
766         * storage/StorageEventDispatcher.h:
767         * storage/StorageMap.cpp:
768         * storage/StorageMap.h:
769         * storage/StorageNamespace.cpp:
770         * storage/StorageNamespace.h:
771         * storage/StorageNamespaceImpl.cpp:
772         * storage/StorageNamespaceImpl.h:
773         * storage/StorageSyncManager.cpp:
774         (WebCore::StorageSyncManager::scheduleDeleteEmptyDatabase):
775         * storage/StorageSyncManager.h:
776         * storage/StorageTracker.cpp:
777         * storage/StorageTracker.h:
778
779 2011-10-15  Adam Barth  <abarth@webkit.org>
780
781         Rename ENABLE(SKIA_TEXT) to USE(SKIA_TEXT)
782         https://bugs.webkit.org/show_bug.cgi?id=70191
783
784         Reviewed by Daniel Bates.
785
786         SKIA_TEXT is not a WebKit feature.  It's a macro that determines
787         whether we use a feature of the underly library (Skia).
788
789         * platform/graphics/chromium/FontChromiumWin.cpp:
790         (WebCore::Font::drawComplexText):
791         * platform/graphics/chromium/UniscribeHelper.cpp:
792         (WebCore::UniscribeHelper::draw):
793         * platform/graphics/skia/PlatformContextSkia.cpp:
794         (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed):
795         * platform/graphics/skia/PlatformContextSkia.h:
796         * platform/graphics/skia/SkiaFontWin.cpp:
797         * platform/graphics/skia/SkiaFontWin.h:
798
799 2011-10-15  Eric Carlson  <eric.carlson@apple.com>
800
801         Make VIDEO_TRACK compile with warnings as errors enabled
802         https://bugs.webkit.org/show_bug.cgi?id=70188
803
804         Reviewed by Filip Pizlo.
805
806         No new tests, no functionality changed.
807
808         * html/TextTrackCueList.h: Fix an include.
809         * html/track/CueParser.cpp:
810         (WebCore::CueParser::supportsType): Remove unused param.
811         * html/track/CueParser.h:
812         (WebCore::CueParserClient::~CueParserClient): Add virtual destructor.
813         * html/track/CueParserPrivate.h:
814         (WebCore::CueParserPrivateClient::~CueParserPrivateClient): Ditto.
815         * loader/CueLoader.h:
816         (WebCore::CueLoaderClient::~CueLoaderClient): Ditto.
817         (WebCore::CueLoader::~CueLoader): Ditto.
818
819 2011-10-15  Adam Barth  <abarth@webkit.org>
820
821         Rename ENABLE(TILED_BACKING_STORE) to USE(TILED_BACKING_STORE)
822         https://bugs.webkit.org/show_bug.cgi?id=70194
823
824         Reviewed by Daniel Bates.
825
826         TILED_BACKING_STORE isn't a web platform feature.  It's an
827         implementation strategy for WebKit that's used by some ports
828         and not by others.
829
830         * features.pri:
831         * loader/EmptyClients.h:
832         * page/Chrome.cpp:
833         * page/Chrome.h:
834         * page/ChromeClient.h:
835         * page/Frame.cpp:
836         (WebCore::Frame::Frame):
837         (WebCore::Frame::setView):
838         * page/Frame.h:
839         * page/FrameView.cpp:
840         (WebCore::FrameView::repaintContentRectangle):
841         (WebCore::FrameView::doDeferredRepaints):
842         * page/Settings.cpp:
843         (WebCore::Settings::setTiledBackingStoreEnabled):
844         * platform/HostWindow.h:
845         * platform/ScrollView.cpp:
846         (WebCore::ScrollView::setScrollPosition):
847         * platform/graphics/Tile.h:
848         * platform/graphics/TiledBackingStore.cpp:
849         * platform/graphics/TiledBackingStore.h:
850         * platform/graphics/TiledBackingStoreBackend.h:
851         * platform/graphics/TiledBackingStoreClient.h:
852         * platform/graphics/qt/GraphicsLayerQt.cpp:
853         (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl):
854         (WebCore::GraphicsLayerQtImpl::~GraphicsLayerQtImpl):
855         (WebCore::GraphicsLayerQtImpl::recache):
856         (WebCore::GraphicsLayerQtImpl::paint):
857         * platform/graphics/qt/TileQt.cpp:
858         * platform/graphics/qt/TileQt.h:
859         * platform/graphics/texmap/TextureMapperNode.cpp:
860         (WebCore::TextureMapperNode::computeTiles):
861         (WebCore::TextureMapperNode::renderContent):
862         (WebCore::TextureMapperNode::paintSelf):
863         (WebCore::TextureMapperNode::syncCompositingStateSelf):
864         * platform/graphics/texmap/TextureMapperNode.h:
865         (WebCore::TextureMapperNode::State::State):
866
867 2011-10-15  Adam Barth  <abarth@webkit.org>
868
869         Remove the last remnant of WBXML
870         https://bugs.webkit.org/show_bug.cgi?id=70187
871
872         Reviewed by Daniel Bates.
873
874         The bulk of the WBXML code was removed in 2009, but we missed one block.
875
876         * platform/wince/MIMETypeRegistryWinCE.cpp:
877         (WebCore::initMIMETypeEntensionMap):
878
879 2011-10-15  Darin Adler  <darin@apple.com>
880
881         REGRESSION(r97533): fast/forms/select-script-onchange.html failed after
882         https://bugs.webkit.org/show_bug.cgi?id=70173
883
884         Reviewed by Ryosuke Niwa.
885
886         * html/HTMLSelectElement.cpp:
887         (WebCore::HTMLSelectElement::setValue): Removed unneeded boolean argument
888         [true for deselect].
889         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Added explicit
890         boolean arguments for all calls to setSelectedIndex to restore pre-r97533
891         behavior.
892         (WebCore::HTMLSelectElement::typeAheadFind): Ditto.
893         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): Ditto.
894
895         * html/HTMLSelectElement.h:
896         Removed default of true for userDrivenChange. Each caller should pass it
897         explicitly. Longer term we should use an enum instead of a boolean or find
898         some other way of avoiding the argument.
899         (WebCore::HTMLSelectElement::setSelectedIndex):
900         Pass false for userDrivenChange as the old code did pre-r97533.
901
902 2011-10-15  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
903
904         [Qt] [Symbian] Remove support for the Symbian platform for the QtWebKit port
905         https://bugs.webkit.org/show_bug.cgi?id=69920
906
907         Reviewed by Kenneth Rohde Christiansen.
908
909         No new tests as there is no new functionality.
910
911         * WebCore.gypi:
912         * WebCore.pri:
913         * WebCore.pro:
914         * bindings/v8/V8GCController.cpp:
915         (WebCore::V8GCController::checkMemoryUsage):
916         * config.h:
917         * css/CSSPrimitiveValueMappings.h:
918         (WebCore::CSSPrimitiveValue::operator int):
919         * features.pri:
920         * page/NavigatorBase.cpp:
921         * platform/graphics/qt/GraphicsContextQt.cpp:
922         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
923         * platform/network/qt/ResourceRequestQt.cpp:
924         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
925         * platform/text/qt/TextCodecQt.cpp:
926         (WebCore::TextCodecQt::decode):
927         * plugins/PluginDatabase.cpp:
928         * plugins/PluginPackage.cpp:
929         (WebCore::PluginPackage::unload):
930         * plugins/PluginPackage.h:
931         (WebCore::PluginPackage::version):
932         * plugins/PluginView.cpp:
933         (WebCore::PluginView::setFrameRect):
934         * plugins/PluginView.h:
935         * plugins/npapi.h:
936         * plugins/symbian: Removed.
937         * plugins/symbian/PluginContainerSymbian.cpp: Removed.
938         * plugins/symbian/PluginContainerSymbian.h: Removed.
939         * plugins/symbian/PluginDatabaseSymbian.cpp: Removed.
940         * plugins/symbian/PluginPackageSymbian.cpp: Removed.
941         * plugins/symbian/PluginViewSymbian.cpp: Removed.
942         * plugins/symbian/npinterface.h: Removed.
943
944 2011-10-08  Robert Hogan  <robert@webkit.org>
945
946         CSS 2.1 failure: height-width-table-001.htm
947         https://bugs.webkit.org/show_bug.cgi?id=69709
948
949         Reviewed by Simon Fraser.
950
951         CSS 2.1 expects CSS table elements to treat fixed height/width as
952         excluding table borders, but HTML table elements to treat fixed height/width as
953         including them.
954         
955         See http://lists.w3.org/Archives/Public/www-style/2011Jan/0178.html
956             http://lists.w3.org/Archives/Public/public-css-testsuite/2011Oct/0005.html
957             
958         It looks like some clarification is pending in the specs, but the new behaviour
959         lets WebKit pass the following tests in the suite CSS and also match FF:
960           height-width-table-001.htm
961           height-width-inline-table-001.htm
962           abspos-containing-block-initial-004d.htm
963
964         * rendering/RenderTable.cpp:
965         (WebCore::RenderTable::computeLogicalWidth):
966         (WebCore::RenderTable::layout):
967
968 2011-10-15  Darin Adler  <darin@apple.com>
969
970         Make toHTMLElement fail to compile if you try to use it on an HTMLElement*
971         https://bugs.webkit.org/show_bug.cgi?id=70164
972
973         Reviewed by Adam Barth.
974
975         Refactoring covered by existing tests.
976
977         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
978         (WebCore::JSHTMLFrameSetElement::nameGetter): Removed unneeded casts and
979         some unneeded local variables as well. Changed the name of the local variable
980         for the HTMLFrameElement to frameElement to avoid confusion with the Frame.
981         * dom/Document.cpp:
982         (WebCore::Document::openSearchDescriptionURL): Removed unneeded HTMLElement
983         check; we can call hasTagName directly on a Node and that takes care of
984         checking both that it's an HTMLElement and checking the tag name.
985         * dom/MicroDataItemList.cpp:
986         (WebCore::MicroDataItemList::nodeMatches): Use toHTMLElement instead of
987         a cast. Also changed hasAttribute calls to fastHasAttribute and getAttribute
988         calls to fastGetAttribute since these are neither style attributes nor SVG
989         animatables.
990         * editing/ApplyStyleCommand.cpp:
991         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Use toHTMLElement.
992         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Ditto.
993         * editing/DeleteButtonController.cpp:
994         (WebCore::DeleteButtonController::show): Removed unneeded toHTMLElement call.
995         * html/HTMLElement.cpp:
996         (WebCore::HTMLElement::setOuterHTML): Use toHTMLElement.
997         * html/HTMLElement.h: Added toHTMLElement overload to catch calls when the
998         pointer is already HTMLElement* or a pointer to a class derived from it.
999         * html/HTMLSelectElement.cpp:
1000         (WebCore::HTMLSelectElement::recalcListItems): Use toHTMLElement.
1001         * html/HTMLTextAreaElement.cpp:
1002         (WebCore::HTMLTextAreaElement::innerTextElement): Use toHTMLElement.
1003
1004 2011-10-15  Antoine Labour  <piman@chromium.org>
1005
1006         Add WebAcceleratedContentLayer backed by a texture to support accelerated content hosting
1007         https://bugs.webkit.org/show_bug.cgi?id=70084
1008
1009         Reviewed by James Robinson.
1010
1011         Covered by existing compositing/ tests
1012
1013         * platform/graphics/chromium/LayerChromium.h:
1014         * platform/graphics/chromium/LayerRendererChromium.cpp:
1015         (WebCore::LayerRendererChromium::pluginLayerProgramFlip):
1016         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1017         * platform/graphics/chromium/LayerRendererChromium.h:
1018         * platform/graphics/chromium/PluginLayerChromium.cpp:
1019         (WebCore::PluginLayerChromium::PluginLayerChromium):
1020         (WebCore::PluginLayerChromium::setTextureId):
1021         (WebCore::PluginLayerChromium::setFlipped):
1022         (WebCore::PluginLayerChromium::pushPropertiesTo):
1023         * platform/graphics/chromium/PluginLayerChromium.h:
1024         (WebCore::PluginLayerChromium::flipped):
1025         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
1026         (WebCore::CCPluginLayerImpl::CCPluginLayerImpl):
1027         (WebCore::CCPluginLayerImpl::draw):
1028         * platform/graphics/chromium/cc/CCPluginLayerImpl.h:
1029         (WebCore::CCPluginLayerImpl::setFlipped):
1030
1031 2011-10-15  Michael Nordman  <michaeln@google.com>
1032
1033         [Chromium] Some WebSQLDatabase in worker bug fixes.
1034         https://bugs.webkit.org/show_bug.cgi?id=70071
1035
1036         - Test for a NULL webView WebWorkerClientImpl.
1037         - Avoid altering Database instance lifetimes during WorkerThread::stop().
1038
1039         Existing tests coverage applies.
1040
1041         Reviewed by David Levin.
1042
1043         * storage/chromium/DatabaseTrackerChromium.cpp:
1044         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
1045
1046 2011-10-14  Adam Barth  <abarth@webkit.org>
1047
1048         Update expected results.
1049
1050         * bindings/scripts/test/V8/V8TestObj.cpp:
1051         (WebCore::TestObjInternal::serializedValueCallback):
1052
1053 2011-10-14  Ryosuke Niwa  <rniwa@webkit.org>
1054
1055         GTK build fix after r97533.
1056
1057         * accessibility/gtk/AXObjectCacheAtk.cpp:
1058         (WebCore::notifyChildrenSelectionChange):
1059         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1060         (optionFromSelection):
1061         (webkit_accessible_selection_get_selection_count):
1062
1063 2011-10-14  David Kilzer  <ddkilzer@apple.com>
1064
1065         <http://webkit.org/b/70158> Fix clang compiler warnings
1066
1067         Reviewed by Darin Adler.
1068
1069         * dom/ViewportArguments.cpp:
1070         (WebCore::computeViewportAttributes): Use std::max<float>()
1071         instead of std::max().
1072
1073 2011-10-14  Mark Hahnenberg  <mhahnenberg@apple.com>
1074
1075         Rename getOwnPropertySlot to getOwnPropertySlotVirtual
1076         https://bugs.webkit.org/show_bug.cgi?id=69810
1077
1078         Reviewed by Geoffrey Garen.
1079
1080         No new tests.
1081
1082         Renamed the virtual version of getOwnPropertySlot to getOwnPropertySlotVirtual
1083         in preparation for when we add the static getOwnPropertySlot to the MethodTable 
1084         in ClassInfo.
1085
1086         Also added a few static getOwnPropertySlot functions where they had been overlooked 
1087         before (especially in CodeGeneratorJS.pm).
1088
1089         * WebCore.exp.in:
1090         * bindings/js/JSDOMWindowCustom.cpp:
1091         (WebCore::JSDOMWindow::getOwnPropertySlotVirtual):
1092         (WebCore::JSDOMWindow::getOwnPropertySlot):
1093         (WebCore::DialogHandler::returnValue):
1094         * bindings/js/JSDOMWindowShell.cpp:
1095         (WebCore::JSDOMWindowShell::getOwnPropertySlotVirtual):
1096         (WebCore::JSDOMWindowShell::getOwnPropertySlot):
1097         * bindings/js/JSDOMWindowShell.h:
1098         * bindings/js/JSWorkerContextCustom.cpp:
1099         (WebCore::JSWorkerContext::getOwnPropertySlotDelegate):
1100         * bindings/js/SerializedScriptValue.cpp:
1101         (WebCore::CloneSerializer::getSparseIndex):
1102         (WebCore::CloneSerializer::getProperty):
1103         * bindings/scripts/CodeGeneratorJS.pm:
1104         (GenerateGetOwnPropertySlotBody):
1105         (GenerateHeader):
1106         (GenerateImplementation):
1107         (GenerateConstructorDeclaration):
1108         (GenerateConstructorDefinition):
1109         * bindings/scripts/test/JS/JSTestInterface.cpp:
1110         (WebCore::JSTestInterfaceConstructor::getOwnPropertySlotVirtual):
1111         (WebCore::JSTestInterfaceConstructor::getOwnPropertySlot):
1112         (WebCore::JSTestInterface::getOwnPropertySlotVirtual):
1113         (WebCore::JSTestInterface::getOwnPropertySlot):
1114         * bindings/scripts/test/JS/JSTestInterface.h:
1115         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1116         (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlotVirtual):
1117         (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlot):
1118         (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlotVirtual):
1119         (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlot):
1120         (WebCore::JSTestMediaQueryListListener::getOwnPropertySlotVirtual):
1121         (WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
1122         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1123         * bindings/scripts/test/JS/JSTestObj.cpp:
1124         (WebCore::JSTestObjConstructor::getOwnPropertySlotVirtual):
1125         (WebCore::JSTestObjConstructor::getOwnPropertySlot):
1126         (WebCore::JSTestObjPrototype::getOwnPropertySlotVirtual):
1127         (WebCore::JSTestObjPrototype::getOwnPropertySlot):
1128         (WebCore::JSTestObj::getOwnPropertySlotVirtual):
1129         (WebCore::JSTestObj::getOwnPropertySlot):
1130         * bindings/scripts/test/JS/JSTestObj.h:
1131         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1132         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlotVirtual):
1133         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlot):
1134         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlotVirtual):
1135         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
1136         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1137         * bridge/objc/objc_runtime.h:
1138         * bridge/objc/objc_runtime.mm:
1139         (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlotVirtual):
1140         * bridge/qt/qt_instance.cpp:
1141         (JSC::Bindings::QtInstance::getOwnPropertySlot):
1142         * bridge/qt/qt_runtime.cpp:
1143         (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertySlotVirtual):
1144         (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertySlotVirtual):
1145         * bridge/qt/qt_runtime.h:
1146         * bridge/runtime_array.cpp:
1147         (JSC::RuntimeArray::getOwnPropertySlotVirtual):
1148         * bridge/runtime_array.h:
1149         * bridge/runtime_method.cpp:
1150         (JSC::RuntimeMethod::getOwnPropertySlotVirtual):
1151         * bridge/runtime_method.h:
1152         * bridge/runtime_object.cpp:
1153         (JSC::Bindings::RuntimeObject::getOwnPropertySlotVirtual):
1154         * bridge/runtime_object.h:
1155
1156 2011-10-14  Ryosuke Niwa  <rniwa@webkit.org>
1157
1158         Windows build fix attempt after r97533.
1159
1160         * html/HTMLSelectElementWin.cpp:
1161         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
1162
1163 2011-10-14  Darin Adler  <darin@apple.com>
1164
1165         Follow up the recent HTMLSelectElement improvements with a little bit more
1166         https://bugs.webkit.org/show_bug.cgi?id=70139
1167
1168         Reviewed by Ryosuke Niwa.
1169
1170         Refactoring, covered by existing tests.
1171
1172         Mostly, this adds a toHTMLSelectElement and uses it wherever possible.
1173
1174         * accessibility/AccessibilityListBox.cpp:
1175         (WebCore::AccessibilityListBox::canSetSelectedChildrenAttribute): Use toHTMLSelectElement.
1176         (WebCore::AccessibilityListBox::addChildren): Ditto. Also removed unneeded toHTMLElement.
1177         * accessibility/AccessibilityMenuListPopup.cpp:
1178         (WebCore::AccessibilityMenuListPopup::addChildren): Ditto.
1179         * accessibility/AccessibilityRenderObject.cpp:
1180         (WebCore::AccessibilityRenderObject::isMultiSelectable): Ditto.
1181         (WebCore::AccessibilityRenderObject::stringValue): Removed checks on the type of the
1182         underlying node, since other code already assumes that a menu list renderer is only
1183         created for a select element. Streamlined the code a bit and removed some unneeded
1184         local variables.
1185         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1186         (WebCore::JSHTMLOptionsCollection::indexSetter): Use toHTMLSelectElement.
1187         * bindings/js/JSHTMLSelectElementCustom.cpp:
1188         (WebCore::JSHTMLSelectElement::remove): Ditto.
1189         (WebCore::JSHTMLSelectElement::indexSetter): Ditto.
1190         * editing/FrameSelection.cpp:
1191         (WebCore::FrameSelection::selectAll): Ditto.
1192         * html/HTMLKeygenElement.cpp:
1193         (WebCore::HTMLKeygenElement::shadowSelect): Ditto.
1194         * html/HTMLOptGroupElement.cpp:
1195         (WebCore::HTMLOptGroupElement::recalcSelectOptions): Ditto.
1196         (WebCore::HTMLOptGroupElement::ownerSelectElement): Ditto.
1197         * html/HTMLOptionElement.cpp:
1198         (WebCore::HTMLOptionElement::selected): Changed code to call renamed
1199         updateListItemSelectedStates rather than the confusing old name
1200         recalcListItemsIfNeeded.
1201         (WebCore::HTMLOptionElement::childrenChanged): Changed to call
1202         optionElementChildrenChanged rather than calling childrenChanged,
1203         because the children of the select element did not change!
1204         (WebCore::HTMLOptionElement::ownerSelectElement): Use toHTMLSelectElement.
1205         * html/HTMLOptionsCollection.cpp:
1206         (WebCore::HTMLOptionsCollection::add): Use toHTMLSelectElement.
1207         (WebCore::HTMLOptionsCollection::remove): Use toHTMLSelectElement.
1208         (WebCore::HTMLOptionsCollection::selectedIndex): Use toHTMLSelectElement.
1209         (WebCore::HTMLOptionsCollection::setSelectedIndex): Use toHTMLSelectElement.
1210         (WebCore::HTMLOptionsCollection::setLength): Use toHTMLSelectElement.
1211         * html/HTMLSelectElement.cpp:
1212         (WebCore::HTMLSelectElement::setSelectedIndexByUser): Call setSelectedIndex
1213         without the now-unneeded internal suffix.
1214         (WebCore::HTMLSelectElement::parseMappedAttribute): When the code says that
1215         we should "determine selectedness of the items", call updateListItemSelectedStates
1216         rather than the confusingly named recalcListItemsIfNeeded.
1217         (WebCore::HTMLSelectElement::updateListItemSelectedStates): Renamed
1218         recalcListItemsIfNeeded to this, since that's what this function is for.
1219         (WebCore::HTMLSelectElement::optionElementChildrenChanged): Added. Does
1220         the same work as childrenChanged, although it does not call up to the
1221         base class childrenChanged function. Later we might find we can remove
1222         some of the work here, for example it's not clear we should call the
1223         accessibility childrenChanged function.
1224         (WebCore::HTMLSelectElement::nextValidIndex): Changed this to a member function
1225         and made it get the list items itself rather than requiring they be passed in.
1226         (WebCore::HTMLSelectElement::nextSelectableListIndex): Updated for change to
1227         nextValidIndex.
1228         (WebCore::HTMLSelectElement::previousSelectableListIndex): Ditto.
1229         (WebCore::HTMLSelectElement::firstSelectableListIndex): Ditto.
1230         (WebCore::HTMLSelectElement::lastSelectableListIndex): Ditto.
1231         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway): Ditto.
1232         (WebCore::HTMLSelectElement::listItems): Removed unneeded const_cast, since
1233         recalcListItems is now a const member function. Call recalcListItems by that
1234         name instead of recalcListItemsInternal.
1235         (WebCore::HTMLSelectElement::recalcListItems): Renamed from recalcListItemsInternal
1236         and made this a const member function. The data members that this needs to modify
1237         are now mutable.
1238         (WebCore::HTMLSelectElement::setSelectedIndex): Renamed from setSelectedIndexInternal.
1239         Changed call to updateValidity to instead call setNeedsValidityCheck, since both
1240         do the same thing.
1241         (WebCore::HTMLSelectElement::parseMultipleAttribute): Ditto.
1242         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Updated for change to
1243         nextValidIndex, removed unneeded comparison with zero that's already handled by
1244         casting to an unsigned type, and use setSelectedIndex instead of using
1245         setSelectedIndexInternal since they are both the same thing.
1246         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Removed another unneeded
1247         comparision with zero that's handled by casting to an unsigned type.
1248         (WebCore::HTMLSelectElement::lastSelectedListIndex): Use size_t instead of unsigned
1249         for a vector index.
1250         (WebCore::HTMLSelectElement::typeAheadFind): Use setSelectedIndex instead of
1251         setSelectedIndexInternal.
1252         (WebCore::HTMLSelectElement::insertedIntoTree): Removed unneeded explicit boolean
1253         when calling a function that already has a default value of true.
1254         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): Use setSelectedIndex
1255         instead of setSelectedIndexInternal.
1256
1257         * html/HTMLSelectElement.h: Made childrenChanged private. Added
1258         optionElementChildrenChanged. Renamed recalcListItemsIfNeeded to the clearer
1259         updateListItemSelectedStates. Removed unused listBoxSelectItem. Removed
1260         updateValidity after changing all callers to instead call setNeedsValidityCheck.
1261         Made canSelectAll and selectAll non-virtual. Removed recalcListItemsInternal
1262         since it's the same thing as recalcListItems now. Renamed setSelectedIndexInternal
1263         to setSelectedIndex since it's the same function, just with a few arguments we
1264         don't want to allow outside callers to pass. Changed nextValidIndex into a
1265         non-static member function. Made m_listItems and m_shouldRecalcListItems mutable.
1266         Added a toHTMLSelectElement function, modeled on the toElement function.
1267
1268         * html/ValidityState.cpp:
1269         (WebCore::ValidityState::valueMissing): Use toHTMLSelectElement.
1270         * rendering/RenderListBox.cpp:
1271         (WebCore::RenderListBox::updateFromElement): Ditto.
1272         (WebCore::RenderListBox::scrollToRevealSelection): Ditto.
1273         (WebCore::RenderListBox::size): Ditto.
1274         (WebCore::RenderListBox::numItems): Ditto.
1275         (WebCore::RenderListBox::addFocusRingRects): Ditto.
1276         (WebCore::RenderListBox::paintItemForeground): Ditto.
1277         (WebCore::RenderListBox::paintItemBackground): Ditto.
1278         (WebCore::RenderListBox::panScroll): Ditto.
1279         (WebCore::RenderListBox::autoscroll): Ditto.
1280         (WebCore::RenderListBox::stopAutoscroll): Ditto.
1281         (WebCore::RenderListBox::valueChanged): Ditto.
1282         (WebCore::RenderListBox::nodeAtPoint): Ditto.
1283         * rendering/RenderMenuList.cpp:
1284         (WebCore::RenderMenuList::updateOptionsWidth): Ditto.
1285         (WebCore::RenderMenuList::updateFromElement): Ditto.
1286         (WebCore::RenderMenuList::setTextFromOption): Ditto.
1287         (WebCore::RenderMenuList::showPopup): Ditto.
1288         (WebCore::RenderMenuList::valueChanged): Ditto.
1289         (WebCore::RenderMenuList::listBoxSelectItem): Ditto.
1290         (WebCore::RenderMenuList::multiple): Ditto.
1291         (WebCore::RenderMenuList::didSetSelectedIndex): Ditto.
1292         (WebCore::RenderMenuList::didUpdateActiveOption): Ditto.
1293         (WebCore::RenderMenuList::itemText): Ditto.
1294         (WebCore::RenderMenuList::itemAccessibilityText): Ditto.
1295         (WebCore::RenderMenuList::itemToolTip): Ditto.
1296         (WebCore::RenderMenuList::itemIsEnabled): Ditto. Also use the
1297         disabled function instead of the virtual isEnabledFormControl
1298         function to check if the optgroup is enabled.
1299         (WebCore::RenderMenuList::itemStyle): Ditto.
1300         (WebCore::RenderMenuList::itemBackgroundColor): Ditto.
1301         (WebCore::RenderMenuList::listSize): Ditto.
1302         (WebCore::RenderMenuList::selectedIndex): Ditto.
1303         (WebCore::RenderMenuList::itemIsSeparator): Ditto.
1304         (WebCore::RenderMenuList::itemIsLabel): Ditto.
1305         (WebCore::RenderMenuList::itemIsSelected): Ditto.
1306         (WebCore::RenderMenuList::setTextFromItem): Ditto.
1307
1308 2011-10-14  Mark Hahnenberg  <mhahnenberg@apple.com>
1309
1310         Rename virtual put to putVirtual
1311         https://bugs.webkit.org/show_bug.cgi?id=69851
1312
1313         Reviewed by Darin Adler.
1314
1315         No new tests.
1316
1317         Renamed virtual versions of put to putVirtual in prepration for 
1318         adding the static put to the MethodTable in ClassInfo since the 
1319         compiler gets mad if the virtual and static versions have the same 
1320         name.
1321
1322         * WebCore.exp.in:
1323         * bindings/js/JSDOMWindowCustom.cpp:
1324         (WebCore::JSDOMWindow::putVirtual):
1325         * bindings/js/JSDOMWindowShell.cpp:
1326         (WebCore::JSDOMWindowShell::putVirtual):
1327         * bindings/js/JSDOMWindowShell.h:
1328         * bindings/js/JSLocationCustom.cpp:
1329         (WebCore::JSLocation::putDelegate):
1330         * bindings/js/JSPluginElementFunctions.cpp:
1331         (WebCore::runtimeObjectCustomPut):
1332         * bindings/js/SerializedScriptValue.cpp:
1333         (WebCore::CloneDeserializer::putProperty):
1334         * bindings/objc/WebScriptObject.mm:
1335         (-[WebScriptObject setValue:forKey:]):
1336         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
1337         * bindings/scripts/CodeGeneratorJS.pm:
1338         (GenerateHeader):
1339         (GenerateImplementation):
1340         * bindings/scripts/test/JS/JSTestObj.cpp:
1341         (WebCore::JSTestObj::putVirtual):
1342         * bindings/scripts/test/JS/JSTestObj.h:
1343         * bridge/NP_jsobject.cpp:
1344         (_NPN_SetProperty):
1345         * bridge/jni/jni_jsobject.mm:
1346         (JavaJSObject::setMember):
1347         (JavaJSObject::setSlot):
1348         * bridge/objc/objc_runtime.h:
1349         * bridge/objc/objc_runtime.mm:
1350         (JSC::Bindings::ObjcFallbackObjectImp::putVirtual):
1351         * bridge/qt/qt_instance.cpp:
1352         (JSC::Bindings::QtInstance::put):
1353         * bridge/qt/qt_runtime.cpp:
1354         (JSC::Bindings::convertQVariantToValue):
1355         * bridge/runtime_array.cpp:
1356         (JSC::RuntimeArray::putVirtual):
1357         * bridge/runtime_array.h:
1358         * bridge/runtime_object.cpp:
1359         (JSC::Bindings::RuntimeObject::putVirtual):
1360         * bridge/runtime_object.h:
1361         * bridge/testqtbindings.cpp:
1362         (main):
1363
1364 2011-10-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1365
1366         Unreviewed, rolling out r97519.
1367         http://trac.webkit.org/changeset/97519
1368         https://bugs.webkit.org/show_bug.cgi?id=70156
1369
1370         Broke 79+ tests on bots (Requested by dglazkov on #webkit).
1371
1372         * platform/graphics/skia/GraphicsContextSkia.cpp:
1373         (WebCore::getFocusRingOutset):
1374         (WebCore::GraphicsContext::drawFocusRing):
1375
1376 2011-09-28  Robert Hogan  <robert@webkit.org>
1377
1378         Replaced elements squeezed when width is specified as percentage inside a table with Auto layout
1379         https://bugs.webkit.org/show_bug.cgi?id=29447
1380
1381         If inserting a 'replaced' element (e.g. image, plugin) in a table cell that is not descendant from
1382         a block with fixed layout then do not squeeze the element, let it use its intrinsic width and height.
1383
1384         Reviewed by David Hyatt.
1385
1386         Test: fast/replaced/table-percent-width.html
1387
1388         * rendering/RenderBox.cpp:
1389         (WebCore::shouldExpandToIntrinsicDimension):
1390         (WebCore::RenderBox::containingBlockReplacedLogicalWidthForContent):
1391         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1392         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1393         * rendering/RenderBox.h:
1394
1395 2011-10-14  Cary Clark  <caryclark@google.com>
1396
1397         [Chromium Skia on Mac] Improve focus ring
1398         https://bugs.webkit.org/show_bug.cgi?id=70124
1399
1400         Reviewed by Eric Seidel.
1401         
1402         The focus ring code formerly outset the bounds of
1403         the component rectangles by fractional amounts. Because
1404         the rectangles are SkIRect (integer based), the fractional
1405         outset had no effect.
1406
1407         The equivalent code in GraphicsContextMac.mm computes
1408         the curve radius and rectangle outset with integers, so
1409         the use of floats in Skia's case, besides not working,
1410         is unnecessary.
1411
1412         The Skia code also failed to take the offset into account.
1413         In LayoutTests, the focus rings either have an offset of
1414         0 or 2. The CoreGraphics code increases the ring's rectangles
1415         by the offset, then passes the result to wkDrawFocusRing.
1416
1417         I did not find any documentation about how wkDrawFocusRing
1418         further inflates the focus ring, but empirically I determined
1419         that adding 2 to the offset generated rings with identical
1420         outer diameters.
1421  
1422         With these adjustments, the layout tests generate focus rings
1423         in the Skia on Mac case that match the coverage of the
1424         Chromium CG-based platform, in particular, matching:
1425         
1426         editing/inserting/editable-inline-element.html
1427         editing/selection/3690703-2.html
1428
1429         * platform/graphics/skia/GraphicsContextSkia.cpp:
1430         (WebCore::getFocusRingOutset):
1431         (WebCore::GraphicsContext::drawFocusRing):
1432
1433 2011-10-14  Chang Shu  <cshu@webkit.org>
1434
1435         [Qt] Enable fullscreen api on Qt
1436         https://bugs.webkit.org/show_bug.cgi?id=70131
1437
1438         As a result, we have 3 passed tests.
1439
1440         Reviewed by Noam Rosenthal.
1441
1442         * features.pri:
1443
1444 2011-10-14  Beth Dakin  <bdakin@apple.com>
1445
1446         https://bugs.webkit.org/show_bug.cgi?id=70148
1447         Should switch to CoreUI version of CorrectionDot, GrammarDot, and SpellingDot
1448         -and corresponding-
1449         <rdar://problem/10208281>
1450
1451         Reviewed by Anders Carlsson.
1452
1453         Use NS*Dot whenever it's available, and fallback to *Dot only when it is not.
1454         * platform/graphics/mac/GraphicsContextMac.mm:
1455         (WebCore::createPatternColor):
1456         (WebCore::GraphicsContext::drawLineForTextChecking):
1457
1458 2011-10-14  Dmitry Lomov  <dslomov@google.com>
1459
1460         https://bugs.webkit.org/show_bug.cgi?id=70120
1461         [Chromium] Pass MessagePortArray to SerializedScriptValue::serialize/deserialize.
1462         This patch augments SerializedScriptValue with MessagePortArray* parameter to implement MessagePort 
1463         transfer within the message in the future.
1464
1465         Reviewed by David Levin.
1466
1467         * bindings/scripts/CodeGeneratorV8.pm:
1468         (GenerateParametersCheck):
1469         * bindings/v8/SerializedScriptValue.cpp:
1470         (WebCore::SerializedScriptValue::create):
1471         (WebCore::SerializedScriptValue::SerializedScriptValue):
1472         (WebCore::SerializedScriptValue::deserialize):
1473         * bindings/v8/SerializedScriptValue.h:
1474         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1475         (WebCore::handlePostMessageCallback):
1476         (WebCore::V8DOMWindow::postMessageCallback):
1477         (WebCore::V8DOMWindow::webkitPostMessageCallback):
1478         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
1479         (WebCore::handlePostMessageCallback):
1480         (WebCore::V8DedicatedWorkerContext::postMessageCallback):
1481         (WebCore::V8DedicatedWorkerContext::webkitPostMessageCallback):
1482         * bindings/v8/custom/V8HistoryCustom.cpp:
1483         (WebCore::V8History::pushStateCallback):
1484         (WebCore::V8History::replaceStateCallback):
1485         * bindings/v8/custom/V8MessageEventCustom.cpp:
1486         (WebCore::V8MessageEvent::dataAccessorGetter):
1487         * bindings/v8/custom/V8MessagePortCustom.cpp:
1488         (WebCore::handlePostMessageCallback):
1489         (WebCore::V8MessagePort::postMessageCallback):
1490         (WebCore::V8MessagePort::webkitPostMessageCallback):
1491         * bindings/v8/custom/V8WorkerCustom.cpp:
1492         (WebCore::handlePostMessageCallback):
1493         (WebCore::V8Worker::postMessageCallback):
1494         (WebCore::V8Worker::webkitPostMessageCallback):
1495         * workers/Worker.idl:
1496
1497 2011-10-14  Jeff Miller  <jeffm@apple.com>
1498
1499         InjectedBundleHitTestResult::imageRect() should return rect in WKView coordinates
1500         https://bugs.webkit.org/show_bug.cgi?id=69963
1501         
1502         Add infrastructure to convert from any frame view's coordinate system to the
1503         root view's coordinate system.
1504
1505         Reviewed by Simon Fraser.
1506
1507         No new tests (yet), this is covered by <https://bugs.webkit.org/show_bug.cgi?id=70136>.
1508
1509         * WebCore.exp.in: Exported WebCore::ScrollView::contentsToRootView(), used by InjectedBundleHitTestResult.cpp.
1510         
1511         * platform/ScrollView.cpp:
1512         (WebCore::ScrollView::rootViewToContents): Added (both point and rect versions).
1513         (WebCore::ScrollView::contentsToRootView): Ditto.
1514         
1515         * platform/ScrollView.h: Added member functions to convert to/from root view coordinates.
1516         
1517         * platform/Widget.cpp:
1518         (WebCore::Widget::convertFromRootView): Added (both point and rect versions).
1519         (WebCore::Widget::convertToRootView): Ditto.
1520         
1521         * platform/Widget.h: Added member functions to convert to/from root view coordinates.
1522
1523 2011-10-14  Andreas Kling  <kling@webkit.org>
1524
1525         CSSParser: Remove StyleBase usage.
1526         https://bugs.webkit.org/show_bug.cgi?id=70150
1527
1528         Reviewed by Darin Adler.
1529
1530         Split CSSParser::m_parsedStyleObjects into two vectors of
1531         CSSRules and MediaLists.
1532
1533         * css/CSSParser.cpp:
1534         (WebCore::CSSParser::createMediaList):
1535         (WebCore::CSSParser::createCharsetRule):
1536         (WebCore::CSSParser::createImportRule):
1537         (WebCore::CSSParser::createMediaRule):
1538         (WebCore::CSSParser::createKeyframesRule):
1539         (WebCore::CSSParser::createStyleRule):
1540         (WebCore::CSSParser::createFontFaceRule):
1541         (WebCore::CSSParser::createPageRule):
1542         (WebCore::CSSParser::createKeyframeRule):
1543         * css/CSSParser.h:
1544
1545 2011-10-14  Adam Barth  <abarth@webkit.org>
1546
1547         canvas getImageData should explain why it throws SECURITY_ERR
1548         https://bugs.webkit.org/show_bug.cgi?id=70088
1549
1550         Reviewed by Darin Adler.
1551
1552         Log as message to the console when getImageData fails because the
1553         canvas is tainted.
1554
1555         * html/canvas/CanvasRenderingContext2D.cpp:
1556         (WebCore::CanvasRenderingContext2D::getImageData):
1557
1558 2011-10-14  Andreas Kling  <kling@webkit.org>
1559
1560         Inspector: Remove StyleBase usage.
1561         https://bugs.webkit.org/show_bug.cgi?id=70138
1562
1563         Reviewed by Antti Koivisto.
1564
1565         Be fully specific about whether we're operating on a CSSRule or
1566         a CSSStyleSheet.
1567
1568         No behavior change expected, this merely is a cleanup.
1569
1570         * inspector/InspectorCSSAgent.cpp:
1571         (WebCore::InspectorCSSAgent::parentStyleSheet):
1572         (WebCore::InspectorCSSAgent::asCSSStyleRule):
1573         * inspector/InspectorCSSAgent.h:
1574         * inspector/InspectorStyleSheet.cpp:
1575         (WebCore::asCSSRuleList):
1576
1577 2011-10-14  Mark Hahnenberg  <mhahnenberg@apple.com>
1578
1579         Rename virtual deleteProperty to deletePropertyVirtual
1580         https://bugs.webkit.org/show_bug.cgi?id=69884
1581
1582         Reviewed by Darin Adler.
1583
1584         No new tests.
1585
1586         Renamed virtual versions of deleteProperty to deletePropertyVirtual in prepration for 
1587         adding the static deleteProperty to the MethodTable in ClassInfo since the 
1588         compiler gets mad if the virtual and static versions have the same name.
1589
1590         * WebCore.exp.in:
1591         * bindings/js/JSDOMStringMapCustom.cpp:
1592         (WebCore::JSDOMStringMap::deletePropertyVirtual):
1593         * bindings/js/JSDOMWindowCustom.cpp:
1594         (WebCore::JSDOMWindow::deletePropertyVirtual):
1595         * bindings/js/JSDOMWindowShell.cpp:
1596         (WebCore::JSDOMWindowShell::deletePropertyVirtual):
1597         * bindings/js/JSDOMWindowShell.h:
1598         * bindings/js/JSHistoryCustom.cpp:
1599         (WebCore::JSHistory::deletePropertyVirtual):
1600         * bindings/js/JSLocationCustom.cpp:
1601         (WebCore::JSLocation::deletePropertyVirtual):
1602         * bindings/js/JSStorageCustom.cpp:
1603         (WebCore::JSStorage::deletePropertyVirtual):
1604         * bindings/js/ScriptObject.cpp:
1605         (WebCore::ScriptGlobalObject::remove):
1606         * bindings/objc/WebScriptObject.mm:
1607         (-[WebScriptObject removeWebScriptKey:]):
1608         * bindings/scripts/CodeGeneratorJS.pm:
1609         (GenerateHeader):
1610         * bridge/NP_jsobject.cpp:
1611         (_NPN_RemoveProperty):
1612         * bridge/jni/jni_jsobject.mm:
1613         (JavaJSObject::removeMember):
1614         * bridge/objc/objc_runtime.h:
1615         * bridge/objc/objc_runtime.mm:
1616         (JSC::Bindings::ObjcFallbackObjectImp::deletePropertyVirtual):
1617         * bridge/runtime_array.cpp:
1618         (JSC::RuntimeArray::deletePropertyVirtual):
1619         * bridge/runtime_array.h:
1620         * bridge/runtime_object.cpp:
1621         (JSC::Bindings::RuntimeObject::deletePropertyVirtual):
1622         * bridge/runtime_object.h:
1623
1624 2011-10-14  Simon Fraser  <simon.fraser@apple.com>
1625
1626         Web Inspector: WebProcess crashes hard when inspecting elements with border-images applied
1627         https://bugs.webkit.org/show_bug.cgi?id=70105
1628
1629         Reviewed by Dave Hyatt.
1630         
1631         Fix three different crashes related to getting computed style for border-image.
1632         In both valueForNinePieceImageSlice() and valueForNinePieceImageQuad(),
1633         assign 'right' to 'left' because we've computed a value for 'right' already.
1634         Otherwise this would leave 'right' as null, causing later crashes in cssText().
1635         
1636         In mapNinePieceImage(), borderImage->imageValue() can be null for a border-image
1637         shorthand that is missing the image value.
1638
1639         Test: fast/css/getComputedStyle/computed-style-border-image.html
1640
1641         * css/CSSComputedStyleDeclaration.cpp:
1642         (WebCore::valueForNinePieceImageSlice):
1643         (WebCore::valueForNinePieceImageQuad):
1644         * css/CSSStyleSelector.cpp:
1645         (WebCore::CSSStyleSelector::mapNinePieceImage):
1646
1647 2011-10-14  Ryosuke Niwa  <rniwa@webkit.org>
1648
1649         Mac build fix after r97497.
1650
1651         * editing/markup.cpp:
1652         (WebCore::isNonTableCellHTMLBlockElement):
1653
1654 2011-10-14  Daniel Cheng  <dcheng@chromium.org>
1655
1656         Context-aware HTML paste for Chromium
1657         https://bugs.webkit.org/show_bug.cgi?id=62112
1658
1659         Reviewed by Ryosuke Niwa.
1660
1661         Add createFragmentFromMarkupWithContext which understands enough about DOM structure to
1662         retain necessary elements to preserve structure and appearance when extracting a subset of
1663         a DOM tree.
1664
1665         Covered by existing layout tests.
1666
1667         * editing/MarkupAccumulator.h:
1668         * editing/markup.cpp:
1669         (WebCore::isNonTableCellHTMLBlockElement):
1670         (WebCore::isHTMLBlockElement):
1671         (WebCore::ancestorToRetainStructureAndAppearanceForBlock):
1672         (WebCore::ancestorToRetainStructureAndAppearance):
1673         (WebCore::ancestorToRetainStructureAndAppearanceWithNoRenderer):
1674         (WebCore::findNodesSurroundingContext):
1675         (WebCore::trimFragment):
1676         (WebCore::createFragmentFromMarkupWithContext):
1677         * editing/markup.h:
1678         * platform/chromium/ChromiumDataObject.cpp:
1679         (WebCore::ChromiumDataObject::getData):
1680         * platform/chromium/DataTransferItemChromium.cpp:
1681         (WebCore::DataTransferItemChromium::getAsString):
1682         * platform/chromium/PasteboardChromium.cpp:
1683         (WebCore::Pasteboard::documentFragment):
1684         * platform/chromium/PlatformSupport.h:
1685
1686 2011-10-14  Peter Beverloo  <peter@chromium.org>
1687
1688         [Chromium] Inherit settings from Chromium's envsetup.sh, address a NDK todo
1689         https://bugs.webkit.org/show_bug.cgi?id=70028
1690
1691         Reviewed by Adam Barth.
1692
1693         * WebCore.gyp/WebCore.gyp:
1694
1695 2011-10-14  Nate Chapin  <japhet@chromium.org>
1696
1697         Check CachedResourceClient types with ASSERTs rather
1698         than if statements.
1699         https://bugs.webkit.org/show_bug.cgi?id=70113
1700
1701         Reviewed by Adam Barth.
1702
1703         No new tests, no functionality change.
1704
1705         * loader/cache/CachedCSSStyleSheet.cpp:
1706         * loader/cache/CachedFont.cpp:
1707         * loader/cache/CachedImage.cpp:
1708         * loader/cache/CachedResourceClientWalker.h:
1709         * loader/cache/CachedXSLStyleSheet.cpp:
1710
1711 2011-10-14  Andreas Kling  <kling@webkit.org>
1712
1713         Don't assert that CSSRules are CSSRules.
1714
1715         Rubber-stamped by Antti Koivisto.
1716
1717         * css/CSSRule.h:
1718         (WebCore::CSSRule::isRule):
1719         * css/CSSStyleSheet.cpp:
1720         (WebCore::CSSStyleSheet::append):
1721         (WebCore::CSSStyleSheet::insert):
1722
1723 2011-10-14  Beth Dakin  <bdakin@apple.com>
1724
1725         Attempted Leopard build fix.
1726
1727         * platform/graphics/GraphicsContext.cpp:
1728         (WebCore::GraphicsContext::createCompatibleBuffer):
1729
1730 2011-10-14  Andreas Kling  <kling@webkit.org>
1731
1732         CSSStyleSheet should only ever contain CSSRules.
1733         https://bugs.webkit.org/show_bug.cgi?id=70116
1734
1735         Reviewed by Antti Koivisto.
1736
1737         Move child management from the StyleSheet class down into
1738         CSSStyleSheet and XSLStyleSheet. XSLStyleSheet continues to
1739         manage StyleBase objects, while CSSStyleSheet now only contains
1740         CSSRule.
1741
1742         This is enforced at both compile time and runtime with explicit
1743         types and assertions.
1744
1745         * css/CSSRule.h:
1746         (WebCore::CSSRule::isRule):
1747
1748             Promoted to a public method so we can use it in assertions.
1749
1750         * css/CSSRuleList.h:
1751         (WebCore::CSSRuleList::create):
1752         (WebCore::CSSRuleList::styleSheet):
1753         * css/CSSRuleList.cpp:
1754         (WebCore::CSSRuleList::CSSRuleList):
1755         * bindings/js/JSCSSRuleListCustom.cpp:
1756         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
1757
1758             Change backing to a CSSStyleSheet instead of a StyleSheet.
1759
1760         * css/CSSRuleList.cpp:
1761         (WebCore::CSSRuleList::item):
1762
1763             Remove redundant assertions.
1764
1765         * css/CSSStyleSheet.cpp:
1766         (WebCore::CSSStyleSheet::isLoading):
1767         (WebCore::CSSStyleSheet::addSubresourceStyleURLs):
1768         * css/CSSStyleSelector.cpp:
1769         (WebCore::RuleSet::addRulesFromSheet):
1770         * inspector/InspectorCSSAgent.cpp:
1771         (WebCore::InspectorCSSAgent::collectStyleSheets):
1772         * page/PageSerializer.cpp:
1773         (WebCore::PageSerializer::serializeCSSStyleSheet):
1774
1775             Use more specific CSSRule* since that's what we get from
1776             CSSStyleSheet::item() now.
1777
1778         * css/StyleSheet.cpp:
1779         (WebCore::StyleSheet::~StyleSheet):
1780         * css/CSSStyleSheet.cpp:
1781         (WebCore::CSSStyleSheet::~CSSStyleSheet):
1782         * xml/XSLStyleSheetLibxslt.cpp:
1783         (WebCore::XSLStyleSheet::~XSLStyleSheet):
1784         * xml/XSLStyleSheetQt.cpp:
1785         (WebCore::XSLStyleSheet::~XSLStyleSheet):
1786
1787             Orphaning logic from ~StyleSheet() moved to subclass dtors.
1788
1789         * css/StyleSheet.h:
1790         * css/CSSStyleSheet.h:
1791         (WebCore::CSSStyleSheet::length):
1792         (WebCore::CSSStyleSheet::item):
1793         * css/CSSStyleSheet.cpp:
1794         (WebCore::CSSStyleSheet::append):
1795         (WebCore::CSSStyleSheet::insert):
1796         (WebCore::CSSStyleSheet::remove):
1797
1798             Moved from StyleSheet and changed to only accept CSSRules.
1799
1800         * css/StyleSheet.h:
1801         * xml/XSLStyleSheet.h:
1802         (WebCore::XSLStyleSheet::length):
1803         (WebCore::XSLStyleSheet::item):
1804         (WebCore::XSLStyleSheet::append):
1805         (WebCore::XSLStyleSheet::insert):
1806         (WebCore::XSLStyleSheet::remove):
1807
1808             Moved from StyleSheet though still uses StyleBase.
1809
1810 2011-10-14 Yuji Sanachan <sanachan.y@gmail.com>
1811
1812         Include dom/ExceptionCode.h instead of Filesystem APIs headers
1813         to fix compile error when ENABLE_WORKERS=1 and ENABLE_FILE_SYSTEM=0
1814         https://bugs.webkit.org/show_bug.cgi?id=70036
1815
1816         Reviewed by Darin Adler.
1817
1818         * workers/WorkerContext.cpp:
1819         (WebCore::WorkerContext::importScript):
1820
1821 2011-10-14  Darin Adler  <darin@apple.com>
1822
1823         Text drawn via -webkit-background-clip:text should be non-blurry with all scaling 
1824         techniques
1825         https://bugs.webkit.org/show_bug.cgi?id=68641
1826
1827         Reviewed by Simon Fraser. Committed by Beth Dakin.
1828
1829         * platform/graphics/GraphicsContext.cpp:
1830         (WebCore::GraphicsContext::createCompatibleBuffer): Allocate a buffer based on the 
1831         scale
1832         factor of the context.
1833         * platform/graphics/GraphicsContext.h: Added createCompatibleBuffer.
1834
1835         * rendering/RenderBoxModelObject.cpp:
1836         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Use 
1837         createCompatibleBuffer.
1838
1839 2011-10-14  Ryosuke Niwa  <rniwa@webkit.org>
1840
1841         Move selectionStartStyle and selectionHasStyle to EditingStyle
1842         https://bugs.webkit.org/show_bug.cgi?id=69882
1843
1844         Reviewed by Enrica Casucci.
1845
1846         Moved selectionHasStyle and selectionStartStyle from Editor to EditingStyle.
1847         Also moved much of code in Editor::selectionStartCSSPropertyValue to method of EditingStyle.
1848
1849         In addition, moved Range::editingStartPosition to htmlediting where it belongs
1850         and renamed it to adjustedSelectionStartForStyleComputation.
1851
1852         * dom/Range.cpp:
1853         * dom/Range.h:
1854         * editing/EditingStyle.cpp:
1855         (WebCore::EditingStyle::triStateOfStyle): Extracted from selectionHasStyle.
1856         (WebCore::EditingStyle::legacyFontSize): Extracted from selectionStartCSSPropertyValue.
1857         (WebCore::EditingStyle::styleAtSelectionStart): Moved from Editor::selectionStartStyle.
1858         * editing/EditingStyle.h:
1859         * editing/Editor.cpp:
1860         (WebCore::Editor::fontForSelection):
1861         (WebCore::Editor::selectionStartHasStyle):
1862         (WebCore::Editor::selectionHasStyle):
1863         (WebCore::Editor::selectionStartCSSPropertyValue):
1864         * editing/Editor.h:
1865         * editing/EditorCommand.cpp:
1866         (WebCore::executeToggleStyleInList):
1867         * editing/htmlediting.cpp:
1868         (WebCore::adjustedSelectionStartForStyleComputation): Moved from Range::editingStartPosition.
1869         * editing/htmlediting.h:
1870
1871 2011-10-14  Ryosuke Niwa  <rniwa@webkit.org>
1872
1873         Redundant comparison in AccessibilityObject.cpp updateAXLineStartForVisiblePosition
1874         https://bugs.webkit.org/show_bug.cgi?id=70074
1875
1876         Reviewed by Chris Fleizach.
1877
1878         Removed redundant code.
1879
1880         * accessibility/AccessibilityObject.cpp:
1881         (WebCore::updateAXLineStartForVisiblePosition):
1882
1883 2011-10-12  Ryosuke Niwa  <rniwa@webkit.org>
1884
1885         Make the interface of locationAndLengthFromRange and rangeFromLocationAndLength consistent
1886         https://bugs.webkit.org/show_bug.cgi?id=69964
1887
1888         Reviewed by Enrica Casucci.
1889
1890         Extracted the logic to determine the scope element as FrameSelection::rootEditableElementOrDocumentElement
1891         and deployed it in WebKit layer. Made locationAndLengthFromRange take a scope element and renamed it to
1892         getLocationAndLengthFromRange.
1893
1894         * WebCore.exp.in:
1895         * editing/FrameSelection.cpp:
1896         (WebCore::FrameSelection::rootEditableElementOrDocumentElement):
1897         * editing/FrameSelection.h:
1898         * editing/TextIterator.cpp:
1899         (WebCore::TextIterator::getLocationAndLengthFromRange):
1900         * editing/TextIterator.h:
1901
1902 2011-10-13  Arko Saha  <arko@motorola.com>
1903
1904         Microdata: Basic implementation of document.getItems() method.
1905         https://bugs.webkit.org/show_bug.cgi?id=68610
1906
1907         Reviewed by Ryosuke Niwa.
1908
1909         Added ENABLE(MICRODATA) feature flag. Implement document.getItems() DOM API.
1910         Spec: http://www.whatwg.org/specs/web-apps/current-work/complete/microdata.html
1911
1912         Tests: fast/dom/MicroData/001.html
1913                fast/dom/MicroData/002.html
1914                fast/dom/MicroData/003.html
1915                fast/dom/MicroData/004.html
1916                fast/dom/MicroData/005.html
1917                fast/dom/MicroData/006.html
1918                fast/dom/MicroData/007.html
1919                fast/dom/MicroData/008.html
1920                fast/dom/MicroData/009.html
1921
1922         * CMakeLists.txt:
1923         * DerivedSources.make:
1924         * GNUmakefile.am:
1925         * GNUmakefile.list.am:
1926         * WebCore.gypi:
1927         * WebCore.pro:
1928         * WebCore.vcproj/WebCore.vcproj:
1929         * dom/Document.cpp:
1930         (WebCore::Document::getItems): Returns NodeList of the element in the Document that
1931         create items, that are not part of other items, and that are of one of the types
1932         given in the argument. If no tokens specified/undefined in the argument, then
1933         return a NodeList containing all top level microdata items.
1934         (WebCore::Document::removeCachedMicroDataItemList): Remove Microdata item node list
1935         from cache.
1936         * dom/Document.h:
1937         * dom/Document.idl: Added getItems() microdata DOM API.
1938         * dom/MicroDataItemList.cpp: Added.
1939         (WebCore::MicroDataItemList::MicroDataItemList):
1940         (WebCore::MicroDataItemList::~MicroDataItemList):
1941         (WebCore::MicroDataItemList::nodeMatches):
1942         * dom/MicroDataItemList.h: Added.
1943         (WebCore::MicroDataItemList::create):
1944         * dom/Node.cpp:
1945         (WebCore::Node::itemTypeAttributeChanged): It is responsible to invalidate the Microdata
1946         item node cache when itemType attribute changes.
1947         (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes):
1948         (WebCore::NodeListsNodeData::invalidateMicrodataItemListCaches): Invalidate Microdata item
1949         list cache.
1950         (WebCore::NodeListsNodeData::isEmpty):
1951         * dom/Node.h:
1952         * dom/NodeRareData.h:
1953         * features.pri:
1954         * html/HTMLAttributeNames.in: Added itemid, itemprop, itemscope, itemtype attributes.
1955         * html/HTMLElement.cpp:
1956         (WebCore::HTMLElement::parseMappedAttribute): Handle itemtype attribute change.
1957         * html/HTMLElement.idl: Added itemid, itemprop, itemscope, itemtypes microdata attributes.
1958
1959 2011-10-14  Andreas Kling  <kling@webkit.org>
1960
1961         Stricter management of WebKitCSSKeyframeRules.
1962         https://bugs.webkit.org/show_bug.cgi?id=70109
1963
1964         Reviewed by Antti Koivisto.
1965
1966         Covered by existing tests.
1967
1968         * css/CSSParser.h:
1969         * css/CSSParser.cpp:
1970         (WebCore::CSSParser::parseKeyframeRule):
1971
1972             Return a WebKitCSSKeyframeRule instead of a CSSRule.
1973
1974         * css/CSSRuleList.cpp:
1975         (WebCore::CSSRuleList::deleteRule):
1976         * css/WebKitCSSKeyframesRule.cpp:
1977         (WebCore::WebKitCSSKeyframesRule::deleteRule):
1978
1979             Moved style sheet orphaning logic for @-webkit-keyframe
1980             from CSSRuleList into WebKitCSSKeyframesRule::deleteRule()
1981             since that's the only caller operating on those rules.
1982
1983         * css/WebKitCSSKeyframesRule.cpp:
1984         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
1985         (WebCore::WebKitCSSKeyframesRule::length):
1986         (WebCore::WebKitCSSKeyframesRule::item):
1987         (WebCore::WebKitCSSKeyframesRule::insertRule):
1988
1989             Change isKeyframeRule() checks to assertions since we know
1990             our rules are always WebKitCSSKeyframeRules. Also tidied up.
1991
1992 2011-10-14  Andreas Kling  <kling@webkit.org>
1993
1994         Unreviewed, actually remove StyleList.* after r97640.
1995
1996         * css/StyleList.cpp: Removed.
1997         * css/StyleList.h: Removed.
1998
1999 2011-10-14  Andreas Kling  <kling@webkit.org>
2000
2001         Merge StyleList into StyleSheet.
2002         https://bugs.webkit.org/show_bug.cgi?id=70100
2003
2004         Reviewed by Antti "printf" Koivisto.
2005
2006         Merge all functionality from StyleList into StyleSheet,
2007         since StyleSheet was the only subclass of StyleList anyway.
2008
2009         Also removed FIXME's about throwing exceptions in CSSRuleList
2010         since they were incorrect. The call sites already handle the
2011         relevant cases.
2012
2013         * CMakeLists.txt:
2014         * GNUmakefile.list.am:
2015         * WebCore.gypi:
2016         * WebCore.pro:
2017         * WebCore.vcproj/WebCore.vcproj:
2018         * WebCore.xcodeproj/project.pbxproj:
2019         * bindings/js/JSCSSRuleListCustom.cpp:
2020         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
2021         * css/CSSRuleList.cpp:
2022         (WebCore::CSSRuleList::CSSRuleList):
2023         (WebCore::CSSRuleList::length):
2024         (WebCore::CSSRuleList::item):
2025         (WebCore::CSSRuleList::deleteRule):
2026         (WebCore::CSSRuleList::append):
2027         (WebCore::CSSRuleList::insertRule):
2028         * css/CSSRuleList.h:
2029         (WebCore::CSSRuleList::create):
2030         (WebCore::CSSRuleList::styleSheet):
2031         * css/StyleList.cpp: Removed.
2032         * css/StyleList.h: Removed.
2033         * css/StyleSheet.cpp:
2034         (WebCore::StyleSheet::StyleSheet):
2035         (WebCore::StyleSheet::append):
2036         (WebCore::StyleSheet::insert):
2037         (WebCore::StyleSheet::remove):
2038         * css/StyleSheet.h:
2039         (WebCore::StyleSheet::length):
2040         (WebCore::StyleSheet::item):
2041
2042 2011-10-14  Mihnea Ovidenie  <mihnea@adobe.com>
2043
2044         [CSS Regions] Change -webkit-flow to -webkit-flow-into
2045         https://bugs.webkit.org/show_bug.cgi?id=70014
2046
2047         Reviewed by David Hyatt.
2048
2049         1. -webkit-flow is renamed to -webkit-flow-into
2050         2. -webkit-flow-into takes <ident> instead of strings
2051
2052         * css/CSSComputedStyleDeclaration.cpp:
2053         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2054         * css/CSSParser.cpp:
2055         (WebCore::CSSParser::parseValue):
2056         (WebCore::validFlowName):
2057         (WebCore::CSSParser::parseFlowThread):
2058         * css/CSSPropertyNames.in:
2059         * css/CSSStyleSelector.cpp:
2060         (WebCore::CSSStyleSelector::applyProperty):
2061
2062 2011-10-12  Hans Wennborg  <hans@chromium.org>
2063
2064         IndexedDB: Remove SQLite backing store
2065         https://bugs.webkit.org/show_bug.cgi?id=69620
2066
2067         Reviewed by Darin Fisher.
2068
2069         Remove the SQLite backing store implementation; it is not used anymore.
2070         Also remove the maximumSize parameter, it is not used either.
2071
2072         No new functionality, so no new tests.
2073
2074         * GNUmakefile.list.am:
2075         * WebCore.gypi:
2076         * storage/IDBBackingStore.h:
2077         * storage/IDBFactory.cpp:
2078         (WebCore::IDBFactory::getDatabaseNames):
2079         (WebCore::IDBFactory::open):
2080         * storage/IDBFactoryBackendImpl.cpp:
2081         (WebCore::computeFileIdentifier):
2082         (WebCore::computeUniqueIdentifier):
2083         (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
2084         (WebCore::IDBFactoryBackendImpl::open):
2085         (WebCore::IDBFactoryBackendImpl::openBackingStore):
2086         * storage/IDBFactoryBackendImpl.h:
2087         * storage/IDBFactoryBackendInterface.h:
2088         * storage/IDBLevelDBBackingStore.cpp:
2089         (WebCore::IDBLevelDBBackingStore::open):
2090         * storage/IDBLevelDBBackingStore.h:
2091         * storage/IDBSQLiteBackingStore.cpp: Removed.
2092         * storage/IDBSQLiteBackingStore.h: Removed.
2093
2094 2011-10-14  Nikolas Zimmermann  <nzimmermann@rim.com>
2095
2096         Not reviewed. Fix mac builds. r97448 broke them.
2097
2098         * WebCore.xcodeproj/project.pbxproj: Set ImageBySizeCache.h role to private.
2099
2100 2011-10-14  Justin Schuh  <jschuh@chromium.org>
2101
2102         Clear WebMediaPlayerClientImpl back pointer on destruction
2103         https://bugs.webkit.org/show_bug.cgi?id=69973
2104
2105         Reviewed by James Robinson.
2106
2107         Clear the backpointer and remove the unused m_currentFrame
2108
2109         * platform/graphics/chromium/VideoLayerChromium.cpp:
2110         (WebCore::VideoLayerChromium::VideoLayerChromium):
2111         (WebCore::VideoLayerChromium::cleanupResources):
2112         (WebCore::VideoLayerChromium::updateCompositorResources):
2113         (WebCore::VideoLayerChromium::releaseProvider):
2114         * platform/graphics/chromium/VideoLayerChromium.h:
2115
2116 2011-10-13  Hans Wennborg  <hans@chromium.org>
2117
2118         IndexedDB: Make IDBCursor.value() return an IDBAny object
2119         https://bugs.webkit.org/show_bug.cgi?id=70024
2120
2121         Reviewed by Tony Chang.
2122
2123         This is to work around the fact that the V8 bindings mechanism does
2124         eager deserialization of SerializedScriptValue attributes. This means
2125         that the value is fetched from the back-end only once, when the
2126         IDBCursor is first wrapped. When the cursor's value changes, this is
2127         not reflected.
2128
2129         We work around this by making IDBCursor.value() return the
2130         SerializedScriptValue wrapped in an IDBAny object.
2131
2132         * storage/IDBCursor.cpp:
2133         (WebCore::IDBCursor::value):
2134         * storage/IDBCursor.h:
2135         * storage/IDBCursorWithValue.idl:
2136
2137 2011-10-14  Rémi Duraffort  <remi.duraffort@st.com>
2138
2139         Fix compilation when the JS Debugger is disabled.
2140         https://bugs.webkit.org/show_bug.cgi?id=70007
2141
2142         Reviewed by Antti Koivisto.
2143
2144         * inspector/InspectorInstrumentation.cpp:
2145         (WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
2146         * inspector/InspectorRuntimeAgent.cpp:
2147         * inspector/InspectorRuntimeAgent.h:
2148         * inspector/WorkerInspectorController.cpp:
2149         * inspector/WorkerInspectorController.h:
2150         * workers/WorkerMessagingProxy.cpp:
2151         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
2152         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
2153
2154 2011-10-13  Nikolas Zimmermann  <nzimmermann@rim.com>
2155
2156         Prepare SVGImage intrinsic size negotiation: Introduce an IntSize <-> SVGImage cache in CachedImage
2157         https://bugs.webkit.org/show_bug.cgi?id=69416
2158
2159         Reviewed by Antti Koivisto.
2160
2161         Refactor ImageBySizeCache out of CSSImageGeneratorValue as CachedImage wants to use the same type of cache for its purposes.
2162         When introducing the SVGImage intrinsic size negotiation the container size of an SVGImage is dependant on the place where
2163         it gets embedded (eg width/height attributes of host documents <img> force a certain size).
2164
2165         Currently CachedImage only contains a single RefPtr<Image>, which it constructs out of the decoded data.
2166         Multiple RenderObjects share the same CachedImages, when embedding eg. a SVG document in a <html:img> or using it in a background-image for a <div>.
2167         Consider the case where two RenderObjects use the same CachedImage, each with a different container size (200x100 vs 100x200) and the embedded
2168         document contains a viewBox and some arbitary preserveAspectRatio settings. To honour these we have to relayout the document with the desired
2169         size (percentual unit resolving etc, all depend on the RenderSVGRoots size).
2170
2171         With the current design this is hard to realize, w/o requring to relayout the embedded document for each embedder that uses an SVGImage.
2172         This patch introduces a cache right within CachedImage, which manages a map of images to certain sizes, by utilizing the new ImageBySizeCache.
2173
2174         CachedImage::imageForRenderer() takes a RenderObject* parameter, which it uses to look up the last set image container size for a renderer.
2175         Using that size it queries the cache whether it already has an SVGImage for that size, if not it gets created, by creating a whole
2176         new instance of SVGImage, filling it with the already decoded data, and passing on a fixed image container size, which overrides the
2177         size that RenderSVGRoot reports, when computeReplacedLogicalWidth/Height is called and thus laying out the document at the desired size.
2178         This image is then put in the cache for further reusability.
2179
2180         Likewise CachedImage::setContainerSizeForRenderer() now takes a RenderObject* parameter and stores that in the cache with an associated container size.
2181         It requires to touch several files which use CachedImage throughout WebCore/WebKit/WebKit2.
2182
2183         The actual cache is not yet turned on yet, so this is not a functional change so far, as it needs some other changes to SVGImage,
2184         which will come with the master patch in bug 47156.
2185
2186         No new tests yet, as the new cache isn't turned on yet.
2187
2188         * CMakeLists.txt: Add rendering/ImageBySizeCache.* to build.
2189         * GNUmakefile.list.am: Ditto.
2190         * WebCore.gypi: Ditto.
2191         * WebCore.pro: Ditto.
2192         * WebCore.vcproj/WebCore.vcproj: Ditto.
2193         * WebCore.xcodeproj/project.pbxproj: Ditto.
2194         * accessibility/AccessibilityRenderObject.cpp:
2195         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Use new CachedImage::imageSizeForRenderer(RenderObject*) method.
2196         * bindings/objc/DOM.mm: Ditto (for CachedImage::image()).
2197         (-[DOMElement image]):
2198         (-[DOMElement _imageTIFFRepresentation]):
2199         * bridge/qt/qt_pixmapruntime.cpp:
2200         (JSC::Bindings::QtPixmapInstance::variantFromObject): Ditto (for CachedImage::image()).
2201         * css/CSSCanvasValue.cpp: s/m_clients/clients()/, which now live in the ImageBySizeCache instead of CSSImageGeneratorValue.
2202         (WebCore::CSSCanvasValue::canvasChanged):
2203         (WebCore::CSSCanvasValue::canvasResized):
2204         (WebCore::CSSCanvasValue::image):
2205         * css/CSSGradientValue.cpp: Ditto.
2206         (WebCore::CSSGradientValue::image):
2207         * css/CSSImageGeneratorValue.cpp: Move the sizes/clients/images cache into a new ImageBySizeCache class, to make it usable for CachedImage as well.
2208         (WebCore::CSSImageGeneratorValue::addClient): Adapt to move.
2209         (WebCore::CSSImageGeneratorValue::removeClient): Ditto.
2210         (WebCore::CSSImageGeneratorValue::getImage): Ditto.
2211         (WebCore::CSSImageGeneratorValue::putImage): Ditto.
2212         * css/CSSImageGeneratorValue.h:
2213         (WebCore::CSSImageGeneratorValue::clients): Forwarded to the ImageBySizeCache.
2214         * editing/DeleteButtonController.cpp: 
2215         (WebCore::isDeletableElement): CachedImage::canRender() now takes a RenderObject* parameter.
2216         * html/HTMLImageElement.cpp:
2217         (WebCore::HTMLImageElement::width): Use new CachedImage::imageSizeForRenderer(RenderObject*) method.
2218         (WebCore::HTMLImageElement::height): Ditto.
2219         (WebCore::HTMLImageElement::naturalWidth): Ditto.
2220         (WebCore::HTMLImageElement::naturalHeight): Ditto.
2221         * html/ImageDocument.cpp:
2222         (WebCore::ImageDocumentParser::finish): Ditto.
2223         (WebCore::ImageDocument::scale): Ditto.
2224         (WebCore::ImageDocument::resizeImageToFit): Ditto.
2225         (WebCore::ImageDocument::imageUpdated): Ditto.
2226         (WebCore::ImageDocument::restoreImageSize): Ditto.
2227         (WebCore::ImageDocument::imageFitsInWindow): Ditto.
2228         * html/canvas/CanvasRenderingContext.cpp:
2229         (WebCore::CanvasRenderingContext::wouldTaintOrigin): Use new CachedImage::imageForRenderer(RenderObject*) method.
2230         * html/canvas/CanvasRenderingContext2D.cpp:
2231         (WebCore::isOriginClean): Ditto.
2232         (WebCore::size): Ditto (for CachedImage::imageSizeForRenderer()).
2233         (WebCore::CanvasRenderingContext2D::drawImage): Ditto.
2234         (WebCore::CanvasRenderingContext2D::createPattern): Ditto.
2235         * html/canvas/WebGLRenderingContext.cpp:
2236         (WebCore::WebGLRenderingContext::texImage2D): Ditto.
2237         (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
2238         * loader/cache/CachedImage.cpp: Add currently _disabled_ cache for SVGImages. The intrinsic size negotiation will need to use multiple SVGImages
2239         for each requested size (equal to the size of the embedding place for the image) - make it possible to cache these SVGImages, and maintain a cache
2240         for them. The hash code is a 1:1 refactoring from the already present code in CSSImageGeneratorValue, now named 'ImageBySizeCache'.
2241         (WebCore::CachedImage::lookupImageForSize): Looks up an Image from the cache for a given IntSize. Currently turned off.
2242         (WebCore::CachedImage::lookupImageForRenderer): Looks up an Image from the cache for a given renderer. Currently turned off.
2243         (WebCore::CachedImage::lookupOrCreateImageForRenderer): Looks up an Image from the cache or creates a new SVGImage for a given size and caches it, if possible. Currently turned off.
2244         All following changes share this: Don't operate on m_image directly, instead always look up one from the cache for a given size or renderer - if that's not present fallback to m_image.
2245         When an SVGImage is first created by CachedImage::createImage() and stored in m_image, the cache remains empty.
2246
2247         If eg. <img width="30" height="70" src="foo.svg"> is used which implies a container size of 30x70 a new SVGImage is created with the additional information of a 30x70 container size
2248         which is immediately passed to the SVGImage after its creation. This SVGImage is put in the ImageBySizeCache associated with a container size of 30x70.
2249         We now have two SVGImage objects present, one living in CachedImage::m_image, created by createImage() during data decoding, and one living in the ImageBySizeCache
2250         created by lookupOrCreateImageForRenderer() associated with the 30x70 container. The first SVGImage::size() will return a value as defined in the referenced foo.svg,
2251         whereas the SVGImage::size() call of the new SVGImage living in the cache reports 30x70 and renders according to that.
2252
2253         Whenever any method of CachedImage is called with a RenderObject* or IntSize, we can't just operate on m_image anymore but instead have to lookup the right
2254         images for a certain renderer/size from the cache and operate on these. When calling eg. CachedImage::image() with a null renderer, m_image is returned.
2255         When passing with a valid renderer only cache lookups are done if the m_image is actually a SVGImage, otherwhise lookupImageForSize/Renderer will just return the m_image.
2256         There is no logical change induced for non-SVGImage derived images.
2257
2258         CachedImage::image() of course needs a RenderObject* parameter now, to identify which of the images from the cache to use, if the underlying image is a SVGImage.
2259         Luckily these information are already present in StyleCachedImage/StyleImage & friends and only need to be added for some additional methods.
2260         (WebCore::CachedImage::image): FIXME
2261         (WebCore::CachedImage::imageForRenderer): Call lookupOrCreateImageForRenderer() instead of returning m_image, if it's not null. Its a no-op for non SVGImage derived objects.
2262         (WebCore::CachedImage::setContainerSizeForRenderer): For non-SVGImages, just pass on the size to the m_image. For SVGImages, associate the passed in renderer with the IntSize in the cache.
2263                                                              This does NOT create the SVGImage yet, this is delayed until imageForRenderer() is called for a given renderer that wants this size.
2264         (WebCore::CachedImage::imageSize): Don't operate on m_image, ask lookupImageForRenderer() with the incoming renderer.
2265         (WebCore::CachedImage::imageRect): Ditto.
2266         (WebCore::CachedImage::clear): Force clearing the m_svgImageCache.
2267         (WebCore::CachedImage::data): Call m_image->size() instead of imageSize(), to avoid having to pass a null renderer to imageSize() as here no renderer is available yet.
2268         (WebCore::CachedImage::destroyDecodedData): Don't destroy decoded data for SVG images, as m_data needs to be accessable at any time to construct a cloned SVGImage.
2269                                                     In future we don't need this anymore if we make sure multiple SVGImages share the same trees, but that's for a follow-up patch.
2270         (WebCore::CachedImage::decodedSizeChanged): Don't operate on m_image, ask lookupImageForRenderer() with the incoming renderer.
2271         (WebCore::CachedImage::didDraw): Ditto.
2272         (WebCore::CachedImage::shouldPauseAnimation): Ditto.
2273         (WebCore::CachedImage::animationAdvanced): Ditto.
2274         (WebCore::CachedImage::changedInRect): Ditto. (eg. when leaving out this change animated SVG images wouldn't update anymore, as the animation didn't happen on m_image!)
2275         * loader/cache/CachedImage.h: imageForRenderer/canRender/setContainerSizeForRenderer/imageSizeForRenderer now all take a RenderObject* parameter to identifiy the current user of the image.
2276         (WebCore::CachedImage::canRender): Pass on the incoming renderer to imageSizeForRenderer().
2277         * page/DragController.cpp:
2278         (WebCore::getImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
2279         * page/EventHandler.cpp:
2280         (WebCore::EventHandler::selectCursor): Ditto.
2281         * page/PageSerializer.cpp:
2282         (WebCore::PageSerializer::serializeFrame): Ditto.
2283         (WebCore::PageSerializer::addImageToResources): Ditto.
2284         (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration): Ditto.
2285         * page/PageSerializer.h:
2286         * platform/chromium/ClipboardChromium.cpp:
2287         (WebCore::writeImageToDataObject): Ditto.
2288         * platform/chromium/PasteboardChromium.cpp:
2289         (WebCore::Pasteboard::writeImage): Ditto.
2290         * platform/graphics/Image.h:
2291         (WebCore::Image::isSVGImage): Add boolean helper to identify SVGImages, just like isBitmapImage().
2292         * platform/gtk/ClipboardGtk.cpp:
2293         (WebCore::ClipboardGtk::declareAndWriteDragImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
2294         * platform/gtk/PasteboardGtk.cpp:
2295         (WebCore::Pasteboard::writeImage): Ditto.
2296         * platform/mac/HTMLConverter.mm:
2297         (fileWrapperForElement): Ditto.
2298         * platform/mac/PasteboardMac.mm:
2299         (WebCore::Pasteboard::writeImage): Ditto.
2300         * platform/qt/ClipboardQt.cpp:
2301         (WebCore::ClipboardQt::declareAndWriteDragImage): Ditto.
2302         * platform/qt/PasteboardQt.cpp:
2303         (WebCore::Pasteboard::writeImage): Ditto.
2304         * platform/win/ClipboardWin.cpp:
2305         (WebCore::writeImageToDataObject): Ditto.
2306         * platform/win/PasteboardWin.cpp:
2307         (WebCore::Pasteboard::writeImage): Ditto.
2308         * platform/wince/PasteboardWinCE.cpp:
2309         (WebCore::Pasteboard::writeImage): Ditto.
2310         * rendering/HitTestResult.cpp:
2311         (WebCore::HitTestResult::image): Ditto.
2312         * rendering/ImageBySizeCache.cpp: Copied from WebCore/css/CSSImageGeneratorValue.cpp, to preserve history for the original cache code.
2313         (WebCore::ImageBySizeCache::ImageBySizeCache): Straight copy from CSSImageGeneratorValue, renamed to ImageBySizeCache, removing all but the cache relevant code.
2314         (WebCore::ImageBySizeCache::addClient): Ditto.
2315         (WebCore::ImageBySizeCache::removeClient): Ditto.
2316         (WebCore::ImageBySizeCache::getImage): Ditto.
2317         (WebCore::ImageBySizeCache::putImage): Ditto.
2318         (WebCore::ImageBySizeCache::clear): New function, that clears the cache, introduced for the needs of CachedImage.
2319         (WebCore::ImageBySizeCache::imageForSize): New function to query an Image* for a given IntSize, introduced for the needs of CachedImage.
2320         (WebCore::ImageBySizeCache::sizeForClient): New function to query an IntSize for a given renderer.
2321         * rendering/ImageBySizeCache.h: Copied from WebCore/css/CSSImageGeneratorValue.h.
2322         (WebCore::ImageBySizeCache::clients):
2323         * rendering/InlineFlowBox.cpp:
2324         (WebCore::InlineFlowBox::paintFillLayer): CachedImage::canRender() now takes a RenderObject* parameter.
2325         (WebCore::InlineFlowBox::paintBoxDecorations): Ditto.
2326         (WebCore::InlineFlowBox::paintMask): Ditto.
2327         * rendering/RenderBox.cpp:
2328         (WebCore::RenderBox::paintMaskImages): Ditto.
2329         (WebCore::RenderBox::repaintLayerRectsForImage): Ditto.
2330         * rendering/RenderBoxModelObject.cpp:
2331         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Ditto.
2332         (WebCore::RenderBoxModelObject::calculateFillTileSize): Ditto (for CachedImage::setContainerSizeForRenderer()).
2333         (WebCore::RenderBoxModelObject::paintNinePieceImage): Ditto.
2334         * rendering/RenderImage.cpp:
2335         (WebCore::RenderImage::imageSizeForError): Use new CachedImage::imageForRenderer(RenderObject*) method.
2336         (WebCore::RenderImage::setImageSizeForAltText): Ditto.
2337         (WebCore::RenderImage::computeReplacedLogicalWidth): FIXME
2338         * rendering/RenderImageResource.cpp:
2339         (WebCore::RenderImageResource::setContainerSizeForRenderer): Pass on m_renderer to CachedImage::setContainerSizeForRenderer().
2340         * rendering/RenderImageResource.h: Remove constness from setContainerSizeForRenderer.
2341         (WebCore::RenderImageResource::image): Pass on m_renderer to CachedImage::image().
2342         (WebCore::RenderImageResource::imageSize): Pass on m_renderer to CachedImage::imageSizeForRenderer().
2343         * rendering/RenderImageResourceStyleImage.h:
2344         (WebCore::RenderImageResourceStyleImage::setContainerSizeForRenderer): Remove constness, pass on m_renderer to StyleImage::setContainerSizeForRenderer().
2345         * rendering/RenderLayerBacking.cpp:
2346         (WebCore::RenderLayerBacking::isDirectlyCompositedImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
2347         (WebCore::RenderLayerBacking::updateImageContents): Ditto.
2348         * rendering/RenderListMarker.cpp:
2349         (WebCore::RenderListMarker::computePreferredLogicalWidths): CachedImage::setContainerSizeForRenderer() now takes a RenderObject* parameter.
2350         * rendering/RenderObject.cpp:
2351         (WebCore::mustRepaintFillLayers): CachedImage::canRender() now takes a RenderObject* parameter.
2352         (WebCore::RenderObject::borderImageIsLoadedAndCanBeRendered): Ditto.
2353         * rendering/style/StyleCachedImage.cpp:
2354         (WebCore::StyleCachedImage::canRender): Pass on incoming renderer to CachedImage::canRender().
2355         (WebCore::StyleCachedImage::imageSize): Pass on incoming renderer to CachedImage::imageSizeForRenderer().
2356         (WebCore::StyleCachedImage::setContainerSizeForRenderer): Pass on incoming renderer to CachedImage::setContainerSizeForRenderer().
2357         (WebCore::StyleCachedImage::addClient): Remove unneeded return statment in void method.
2358         (WebCore::StyleCachedImage::removeClient): Ditto.
2359         (WebCore::StyleCachedImage::image): Pass on incoming renderer to CachedImage::image().
2360         * rendering/style/StyleCachedImage.h: Add RenderObject* parameter to canRender()/setContainerSizeForRenderer(). image() already has one, that was unused so far.
2361         * rendering/style/StyleGeneratedImage.cpp: Inlined setContainerSizeForRenderer.
2362         * rendering/style/StyleGeneratedImage.h: 
2363         (WebCore::StyleGeneratedImage::setContainerSizeForRenderer): Add RenderObject* parameter.
2364         * rendering/style/StyleImage.h:
2365         (WebCore::StyleImage::canRender): Ditto.
2366         * rendering/style/StylePendingImage.h:
2367         (WebCore::StylePendingImage::setContainerSizeForRenderer): Ditto.
2368         * svg/SVGFEImageElement.cpp:
2369         (WebCore::SVGFEImageElement::build): Use new CachedImage::imageForRenderer(RenderObject*) method.
2370         * svg/graphics/SVGImage.cpp: Cleanup file, the include hack seems not needed anymore.
2371         (WebCore::SVGImage::setContainerSize): s/LayoutSize/IntSize/ to match the code in platform/.
2372         * svg/graphics/SVGImage.h: Ditto.
2373         (WebCore::SVGImage::isSVGImage): Return true.
2374
2375 2011-10-13  Kenichi Ishibashi  <bashi@chromium.org>
2376
2377         [Chromium] Uninitialized read in WebCore::*Font* / HB_GSUB_Select_Feature
2378         https://bugs.webkit.org/show_bug.cgi?id=70087
2379
2380         Reviewed by Kent Tamura.
2381
2382         Initialize local variables in ComplexTextControllerLinux::setupfontFeatures.
2383
2384         No new tests because there is no behavior change. Manually tested with valgrind.
2385
2386         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
2387         (WebCore::setupFontFeatures):
2388
2389 2011-10-13  Csaba Osztrogonác  <ossy@webkit.org>
2390
2391         [Qt][Win] Unreviewed buildfix after r97433.
2392
2393         * platform/MemoryPressureHandler.h: Add a missing include.
2394
2395 2011-10-13  Adam Barth  <abarth@webkit.org>
2396
2397         Spelling error in v8WebSocket::constructorCallback error
2398         https://bugs.webkit.org/show_bug.cgi?id=63943
2399
2400         Reviewed by Kent Tamura.
2401
2402         Fix typo.
2403
2404         * bindings/v8/custom/V8WebSocketCustom.cpp:
2405         (WebCore::V8WebSocket::constructorCallback):
2406
2407 2011-10-13  Mark Hahnenberg  <mhahnenberg@apple.com>
2408
2409         Rename virtual getConstructData to getConstructDataVirtual
2410         https://bugs.webkit.org/show_bug.cgi?id=69872
2411
2412         Reviewed by Geoffrey Garen.
2413
2414         No new tests.
2415
2416         Renamed virtual getConstructData functions to getConstructDataVirtual to 
2417         avoid conflicts when we add static getConstructData to the MethodTable.
2418
2419         * WebCore.exp.in:
2420         * bindings/js/JSAudioConstructor.cpp:
2421         (WebCore::JSAudioConstructor::getConstructDataVirtual):
2422         * bindings/js/JSAudioConstructor.h:
2423         * bindings/js/JSImageConstructor.cpp:
2424         (WebCore::JSImageConstructor::getConstructDataVirtual):
2425         * bindings/js/JSImageConstructor.h:
2426         * bindings/js/JSOptionConstructor.cpp:
2427         (WebCore::JSOptionConstructor::getConstructDataVirtual):
2428         * bindings/js/JSOptionConstructor.h:
2429         * bindings/js/ScriptFunctionCall.cpp:
2430         (WebCore::ScriptFunctionCall::construct):
2431         * bindings/scripts/CodeGeneratorJS.pm:
2432         (GenerateConstructorDeclaration):
2433         (GenerateConstructorDefinition):
2434         * bindings/scripts/test/JS/JSTestInterface.cpp:
2435         (WebCore::JSTestInterfaceConstructor::getConstructDataVirtual):
2436         * bridge/runtime_object.cpp:
2437         (JSC::Bindings::RuntimeObject::getConstructDataVirtual):
2438         * bridge/runtime_object.h:
2439
2440 2011-10-13  Simon Fraser  <simon.fraser@apple.com>
2441
2442         Remove #include of <QuartzCore/QuartzCore.h> in a widely-used header.
2443
2444         Reviewed by Sam Weinig.
2445
2446         * platform/PlatformScreen.h: Typedef PlatformDisplayID to a uint32_t.
2447         * platform/graphics/DisplayRefreshMonitor.h: Typedef CVDisplayLinkRef as
2448         an opaque type to avoid bringing in QuartzCore.h, and move displayLinkCallback
2449         to the .cpp file since it uses Core Video types.
2450         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
2451         (WebCore::displayLinkCallback): Make this a local static function, that
2452         calls a member fuction on the object.
2453         (WebCore::DisplayRefreshMonitor::requestRefreshCallback):
2454         (WebCore::DisplayRefreshMonitor::displayLinkFired):
2455
2456 2011-10-13  Michael Saboff  <msaboff@apple.com>
2457
2458         REGRESSION: High frequency memory warnings cause Safari to hog the CPU doing useless garbage collection
2459         https://bugs.webkit.org/show_bug.cgi?id=69774
2460
2461         Throttle the processing of memory pressure events to no more often than once every 5 seconds.
2462
2463         Reviewed by Geoffrey Garen.
2464
2465         No new tests.
2466
2467         * platform/MemoryPressureHandler.cpp:
2468         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
2469         * platform/MemoryPressureHandler.h:
2470         * platform/mac/MemoryPressureHandlerMac.mm:
2471         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
2472
2473 2011-10-13  Kentaro Hara  <haraken@chromium.org>
2474
2475         Implement an OverflowEvent constructor for V8
2476         https://bugs.webkit.org/show_bug.cgi?id=70017
2477
2478         Reviewed by Adam Barth.
2479
2480         Test: fast/events/constructors/overflow-event-constructor.html
2481
2482         * bindings/v8/custom/V8EventConstructors.cpp: Added an OverflowEvent constructor.
2483         * dom/OverflowEvent.idl: Replaced 'JSCustomConstructor' with 'CustomConstructor'.
2484
2485 2011-10-13  Anantanarayanan G Iyengar  <ananta@chromium.org>
2486
2487         https://bugs.webkit.org/show_bug.cgi?id=70064
2488         
2489         The NPObjectWrapper class used by V8 bindings in Chromium to wrap the window
2490         script object was allocating an instance of itself in the NPAllocate
2491         implementation and returning this pointer. It should be returning a pointer
2492         to the wrapped NPObject structure (NPProxyObject). The member function
2493         getUnderlyingNPObject should return 0 if we fail to find the underlying NPObject
2494         for the call. It was incorrectly returning a pointer to the same NPObject in
2495         this case which could cause recursion. 
2496
2497         Reviewed by Nate Chapin.
2498
2499         No new tests as there is no change in functionality.
2500
2501         * bindings/v8/NPObjectWrapper.cpp:
2502         (WebCore::NPObjectWrapper::getObjectForCall):
2503         (WebCore::NPObjectWrapper::NPAllocate):
2504         * bindings/v8/NPObjectWrapper.h:
2505
2506 2011-10-13  Arthur Hsu  <arthurhsu@chromium.org>
2507
2508         Ensure font loaded before calling Skia to drawPosText in Chrome sandbox
2509         https://bugs.webkit.org/show_bug.cgi?id=69370
2510
2511         Reviewed by James Robinson.
2512
2513         * platform/graphics/chromium/FontChromiumWin.cpp:
2514         (WebCore::Font::drawGlyphs):
2515
2516 2011-10-13  Kentaro Hara  <haraken@chromium.org>
2517
2518         Regarding constructor, replace [ConstructorWith=...] IDL with [CallWith=...] IDL
2519         https://bugs.webkit.org/show_bug.cgi?id=69801
2520
2521         As for constructors, [ConstructorWith=...] has the same meaning as [CallWith=...].
2522         We should deprecate [ConstructorWith=...]. This is a clean-up bug for the bug 65839.
2523
2524         Reviewed by Adam Barth.
2525
2526         No new tests, since no change in behavior.
2527
2528         * bindings/scripts/CodeGeneratorV8.pm: Replaced [ConstructorWith=...] IDL with [CallWith=...] IDL.
2529         (GenerateConstructorCallback):
2530         * bindings/scripts/test/TestInterface.idl: Ditto.
2531         * fileapi/FileReader.idl: Ditto.
2532         * p2p/PeerConnection.idl: Ditto.
2533         * page/EventSource.idl: Ditto.
2534         * workers/Worker.idl: Ditto.
2535
2536 2011-10-13  Kentaro Hara  <haraken@chromium.org>
2537
2538         Constructor should not be called if the object is being constructed inside WebCore
2539         https://bugs.webkit.org/show_bug.cgi?id=70015
2540
2541         Reviewed by Adam Barth.
2542
2543         Summary: A DOM object can be created from the JS context and from the WebCore context.
2544         Constructor should be called if the object is created from the JS context,
2545         but should not be called if the object is created from the WebCore context.
2546
2547         Details:
2548         - Expected behavior when the object is created from the JS context (e.g. "new Event()"):
2549         (1) V8XXXX::constructorCallback() is called.
2550         (2) V8XXXX::constructorCallback() calls XXXX::create().
2551         (3) XXXX::create() creates a C++ object.
2552         (4) V8XXXX::constructorCallback() calls toV8() for the C++ object.
2553         (5) toV8() wraps the C++ object and returns the wrapped JS object.
2554
2555         - Actual behavior when the object is created from the JS context (e.g. "new Event()"):
2556         As described above (1) - (5). That's fine!!
2557
2558         - Expected behavior when the object is created from the WebCore context.
2559         (e.g. "window.addEventListener("load", function (event) { ... });". In this case,
2560         the Event object is created inside the WebCore context):
2561         (1) WebCore calls XXXX::create().
2562         (2) XXXX::create() creates a C++ object.
2563         (3) WebCore calls toV8() for the C++ object.
2564         (4) toV8() wraps the C++ object and returns the wrapped JS object.
2565
2566         - Actual behavior when the object is created from the WebCore context.
2567         (e.g. "window.addEventListener("load", function (event) { ... });"):
2568         (1) WebCore calls XXXX::create().
2569         (2) XXXX::create() creates a C++ object.
2570         (3) WebCore calls toV8() for the C++ object.
2571         (4) toV8() can call XXXX::constructorCallback(). (Whether or not toV8() calls
2572         XXXX::constructorCallback() depends on the implementation of toV8().)
2573         (5) V8XXXX::constructorCallback() calls XXXX::create().
2574         (6) XXXX::create() creates __another__ C++ object.
2575         (7) V8XXXX::constructorCallback() calls toV8() for the C++ object.
2576         (8) toV8() wraps the C++ object and returns the wrapped JS object.
2577
2578         This actual behavior definitely causes the following problems:
2579
2580         - Problem1: The object returned to JS is not the object created in (2)
2581         but the object created in (6). However, I do not yet know a test case that causes
2582         some visible bug because of this problem.
2583
2584         - Problem2: In (4), XXXX::constructorCallback() can be called with no argument.
2585         If XXXX::constructorCallback() expects at least one argument, XXXX::constructorCallback()
2586         throws TypeError, resulting in crash. For example, Event caused this problem
2587         when I implemented constructor for Event. Based on the discussion with Dominicc,
2588         we solved this problem by adding the following two lines of code to Event::constructorCallback()
2589         (See here: http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/bindings/v8/custom/V8EventConstructors.cpp&exact_package=chromium&q=allowallocation&type=cs):
2590
2591         XXXX::constructorCallback(...) {
2592             ...;
2593             if (AllowAllocation::current())
2594                 return args.Holder();
2595             ...;
2596         }
2597
2598         This if check means "XXXX::constructorCallback() returns immediately if it is called
2599         from the WebCore context".
2600
2601         With these observations, we think that all constructorCallback() should have the above
2602         if check. This patch adds the if check to CodeGeneratorV8.pm. After this patch is landed,
2603         I would like to add the if check to all existing custom V8 constructors.
2604
2605         No new tests, since we could not find a test case that causes some visible bug without the if check.
2606
2607         * bindings/scripts/CodeGeneratorV8.pm:
2608         (GenerateConstructorCallback): Generates a constructor so that it returns immediately without doing anything if the constructor is called from the WebCore context.
2609         * bindings/scripts/test/V8/V8TestInterface.cpp: Updated the result.
2610         (WebCore::V8TestInterface::constructorCallback):
2611         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
2612         (WebCore::V8TestObj::constructorCallback):
2613
2614 2011-10-13  Kentaro Hara  <haraken@chromium.org>
2615
2616         Implement a BeforeLoadEvent constructor for V8
2617         https://bugs.webkit.org/show_bug.cgi?id=69980
2618
2619         Reviewed by Adam Barth.
2620
2621         Test: fast/events/constructors/before-load-event-constructor.html
2622
2623         * bindings/v8/custom/V8EventConstructors.cpp: Added a BeforeLoadEvent constructor.
2624         * dom/BeforeLoadEvent.idl: Replaced 'JSCustomConstructor' with 'CustomConstructor'.
2625
2626 2011-10-13  Joshua Bell  <jsbell@chromium.org>
2627
2628         make IDBFactory.open wait for pending setVersion transactions to complete
2629         https://bugs.webkit.org/show_bug.cgi?id=69307
2630
2631         Reviewed by Tony Chang.
2632
2633         Added a queue of pending open calls, similar to the queue of pending
2634         setVersion calls. Ensure pending calls are processed in the correct
2635         order when transactions complete.
2636
2637         Tests: storage/indexeddb/open-close-version.html
2638                storage/indexeddb/two-version-changes.html
2639                storage/indexeddb/version-change-exclusive.html
2640
2641         * storage/IDBDatabaseBackendImpl.cpp:
2642         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create):
2643         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::callbacks):
2644         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall):
2645         (WebCore::IDBDatabaseBackendImpl::setVersion):
2646         (WebCore::IDBDatabaseBackendImpl::transactionStarted):
2647         (WebCore::IDBDatabaseBackendImpl::transactionFinished):
2648         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
2649         (WebCore::IDBDatabaseBackendImpl::openConnection):
2650         (WebCore::IDBDatabaseBackendImpl::close):
2651         * storage/IDBDatabaseBackendImpl.h:
2652         * storage/IDBFactoryBackendImpl.cpp:
2653         (WebCore::IDBFactoryBackendImpl::open):
2654         * storage/IDBTransactionBackendImpl.cpp:
2655         (WebCore::IDBTransactionBackendImpl::abort):
2656         (WebCore::IDBTransactionBackendImpl::start):
2657         (WebCore::IDBTransactionBackendImpl::commit):
2658
2659 2011-10-13  Chris Marrin  <cmarrin@apple.com>
2660
2661         Fix Leopard build
2662
2663         Unreviewed.
2664
2665         * platform/graphics/DisplayRefreshMonitor.h: Added.
2666
2667 2011-10-12  Chris Marrin  <cmarrin@apple.com>
2668
2669         Sync requestAnimationFrame callback to CVDisplayLink on Mac
2670         https://bugs.webkit.org/show_bug.cgi?id=68911
2671
2672         Reviewed by Simon Fraser.
2673
2674         Test: fast/animation/request-animation-frame-iframe.html
2675
2676         Implement CVDisplayLink which checks to see if any scheduleAnimation requests
2677         have come in. If so, remember the timestamp and do a callOnMainThread to fire
2678         the callbacks. A DisplayRefreshMonitorManager is a singleton which has a list
2679         of DisplayRefreshMonitors, one for each display. Each monitor has one or more
2680         DisplayRefreshMonitorClients, which is a abstract virtual class implemented
2681         by ScriptAnimationController. When an animation is scheduled, the
2682         displayRefreshFired method is called on the client, which in turn calls the
2683         requestAnimationFrame callbacks. 
2684
2685         DisplayRefreshMonitor and therefore the CVDisplayLink it owns is discarded
2686         when it no longer has any clients. This minimizes the number of concurrent
2687         CVDisplayLink threads.
2688
2689         * WebCore.exp.in:
2690         * WebCore.xcodeproj/project.pbxproj:
2691         * dom/Document.cpp:
2692         (WebCore::Document::windowScreenDidChange):
2693         (WebCore::Document::webkitRequestAnimationFrame):
2694         * dom/Document.h:
2695         * dom/ScriptedAnimationController.cpp:
2696         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
2697         (WebCore::ScriptedAnimationController::windowScreenDidChange):
2698         (WebCore::ScriptedAnimationController::scheduleAnimation):
2699         * dom/ScriptedAnimationController.h:
2700         (WebCore::ScriptedAnimationController::displayRefreshFired):
2701         * page/Page.cpp:
2702         (WebCore::Page::Page):
2703         (WebCore::Page::windowScreenDidChange):
2704         * page/Page.h:
2705         (WebCore::Page::displayID):
2706         * platform/PlatformScreen.h:
2707         * platform/graphics/DisplayRefreshMonitor.cpp: Added.
2708         (WebCore::DisplayRefreshMonitorClient::DisplayRefreshMonitorClient):
2709         (WebCore::DisplayRefreshMonitorClient::~DisplayRefreshMonitorClient):
2710         (WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded):
2711         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
2712         (WebCore::DisplayRefreshMonitor::refreshDisplayOnMainThread):
2713         (WebCore::DisplayRefreshMonitorManager::sharedManager):
2714         (WebCore::DisplayRefreshMonitorManager::findMonitor):
2715         (WebCore::DisplayRefreshMonitorManager::registerClient):
2716         (WebCore::DisplayRefreshMonitorManager::unregisterClient):
2717         (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
2718         (WebCore::DisplayRefreshMonitorManager::windowScreenDidChange):
2719         * platform/graphics/DisplayRefreshMonitor.h: Added.
2720         (WebCore::DisplayRefreshMonitorClient::scheduleAnimation):
2721         (WebCore::DisplayRefreshMonitor::hasClients):
2722         (WebCore::DisplayRefreshMonitor::addClient):
2723         (WebCore::DisplayRefreshMonitor::removeClient):
2724         (WebCore::DisplayRefreshMonitor::displayID):
2725         (WebCore::DisplayRefreshMonitorManager::DisplayRefreshMonitorManager):
2726         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp: Added.
2727         (WebCore::DisplayRefreshMonitor::displayLinkCallback):
2728         (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor):
2729         (WebCore::DisplayRefreshMonitor::scheduleAnimation):
2730
2731 2011-10-13  Abhishek Arya  <inferno@chromium.org>
2732
2733         Unreviewed. Qt compile fix.
2734
2735         * css/CSSFontFaceSource.cpp: include Document.h.
2736
2737 2011-10-12  Abhishek Arya  <inferno@chromium.org>
2738
2739         Register custom fonts at their creation time,  
2740         rather than at retirement time.
2741         https://bugs.webkit.org/show_bug.cgi?id=68929
2742
2743         Reviewed by Dan Bernstein.
2744
2745         Test: fast/text/custom-font-data-crash2.html
2746
2747         * css/CSSFontFace.cpp:
2748         * css/CSSFontFace.h: remove function added in r94508,
2749         which is no longer needed. We now register custom fonts
2750         at creation time.
2751         * css/CSSFontFaceSource.cpp:
2752         (WebCore::CSSFontFaceSource::pruneTable): no longer need
2753         to delete/retire font data here, it will be handled in ~Document.
2754         (WebCore::CSSFontFaceSource::getFontData): register custom
2755         font to document's m_customFonts.
2756         * css/CSSFontSelector.cpp:
2757         * css/CSSFontSelector.h: remove function added in r94508,
2758         which is no longer needed. We now register custom fonts
2759         at creation time.
2760         * css/CSSSegmentedFontFace.cpp:
2761         (WebCore::CSSSegmentedFontFace::pruneTable): no longer need
2762         to delete/retire font data here, it will be handled in ~Document.
2763         (WebCore::CSSSegmentedFontFace::getFontData): register custom
2764         font to document's m_customFonts.
2765         * dom/Document.cpp: Change function names to registerCustomFont
2766         , deleteCustomFonts and local to m_customFont.
2767         (WebCore::Document::~Document):
2768         (WebCore::Document::recalcStyle): yanking out the comment. We
2769         no longer keep retired custom fonts. We clear all custom fonts
2770         on Document destruction.
2771         (WebCore::Document::registerCustomFont): 
2772         (WebCore::Document::deleteCustomFonts):
2773         * dom/Document.h:
2774
2775 2011-10-13  Ryosuke Niwa  <rniwa@webkit.org>
2776
2777         Crash in DeleteSelectionCommand::handleGeneralDelete
2778         https://bugs.webkit.org/show_bug.cgi?id=70045
2779
2780         Reviewed by Darin Adler.
2781
2782         Exit early when m_upstreamStart is null.
2783
2784         No new tests because we don't have a reduction.
2785
2786         * editing/DeleteSelectionCommand.cpp:
2787         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2788
2789 2011-10-13  David Hyatt  <hyatt@apple.com>
2790
2791         https://bugs.webkit.org/show_bug.cgi?id=70049
2792         
2793         [CSS Regions] Add a test of a float being pushed down because it can't fit
2794         next to another float and make sure it re-evaluates its position when it changes
2795         regions as a result of the push.
2796
2797         Reviewed by Sam Weinig.
2798
2799         Added new test in fast/regions.
2800
2801         * rendering/RenderBlock.cpp:
2802         (WebCore::RenderBlock::computeLogicalLocationForFloat):
2803
2804 2011-10-13  Adam Barth  <abarth@webkit.org>
2805
2806         Move XSTL to script-src in Content-Security-Policy
2807         https://bugs.webkit.org/show_bug.cgi?id=63637
2808
2809         Reviewed by Eric Seidel.
2810
2811         The spec was unclear about how to treat XSLT.  My reading was that they
2812         should fall under style-src, but further discussion on the mailing list
2813         settled on using script-src because an XSLT can inject arbitrary DOM
2814         and script into a page, which is more risky than including style.
2815
2816         Tests: http/tests/security/contentSecurityPolicy/xsl-unaffected-by-style-src-1.php
2817                http/tests/security/contentSecurityPolicy/xsl-unaffected-by-style-src-2.php
2818
2819         * loader/cache/CachedResourceLoader.cpp:
2820         (WebCore::CachedResourceLoader::canRequest):
2821
2822 2011-10-13  Zeno Albisser  <zeno.albisser@nokia.com>
2823
2824         [Qt] QtWebKit build error for Mac 32bit
2825         https://bugs.webkit.org/show_bug.cgi?id=69914
2826
2827         In WebCore.pro and QtWebKit.pro we define NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
2828         when compiling with ENABLE_VIDEO and with WTF_USE_QTKIT.
2829         But this is meant to be defined in NSGeometry.h under certain preconditions.
2830         Without setting NS_BUILD_32_LIKE_64 none of these preconditions is
2831         met and therefore NSGeometry.h will create several conflicting type definitions.
2832
2833         With this patch we create consistent definitions again.
2834         Due to the order of include files we cannot remove
2835         NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES from WebCore.pro.
2836
2837         Reviewed by Andreas Kling.
2838
2839         * WebCore.pro:
2840
2841 2011-10-13  Tom Hudson  <tomhudson@google.com>
2842
2843         Revert border radius clips (r95239) for Chromium due to performance issues. Update test expectations to skip border radius clip layout tests.
2844         https://bugs.webkit.org/show_bug.cgi?id=69844
2845
2846         Reviewed by Simon Fraser.
2847
2848         * rendering/RenderLayer.cpp:
2849         (WebCore::RenderLayer::clipToRect): Only process border radius clips #if !PLATFORM(CHROMIUM)
2850
2851 2011-10-13  Julien Chaffraix  <jchaffraix@webkit.org>
2852
2853         Deprecate event.layerX and event.layerY in WebKit
2854         https://bugs.webkit.org/show_bug.cgi?id=69951
2855
2856         Reviewed by Darin Adler.
2857
2858         layerX and layerY were concepts of the old Netscape code that stayed
2859         in WebKit for a long time without changes. Now the code is completely
2860         wrong and Mozilla has expressed some interest in removing it from their
2861         API too.
2862
2863         This is a first step in the removal as layerX and layerY are exposed
2864         in some APIs. Chromium and Win are fine with removing the property
2865         directly, but ObjC needs to deprecate them first.
2866
2867         * bindings/objc/PublicDOMInterfaces.h: Mark the API as deprecated.
2868
2869         * dom/MouseRelatedEvent.cpp:
2870         (WebCore::MouseRelatedEvent::layerX):
2871         (WebCore::MouseRelatedEvent::layerY):
2872         * dom/UIEvent.cpp:
2873         (WebCore::UIEvent::layerX):
2874         (WebCore::UIEvent::layerY):
2875         Added a call to warnDeprecatedLayerXYUsage in the previous functions.
2876
2877         (WebCore::UIEvent::warnDeprecatedLayerXYUsage): Print a warning in the
2878         console about the removal of event.layerX and event.layerY in the near future.
2879
2880         * dom/UIEvent.h: Added warnDeprecatedLayerXYUsage.
2881
2882 2011-10-03  Robert Hogan  <robert@webkit.org>
2883
2884         CSS 2.1 failure: inline-replaced-height-008.htm
2885         https://bugs.webkit.org/show_bug.cgi?id=69273
2886
2887         Reviewed by Simon Fraser.
2888
2889         Test: css2.1/20110323/inline-block-replaced-height-008.html
2890
2891         Per http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height,  if 'height' has computed value of 
2892         'auto', the replaced element has an intrinsic ratio and its used width is known or resolved, then 
2893         the used value of 'height' is determined by the equation (used width) / (intrinsic ratio).
2894
2895         * rendering/RenderImage.cpp:
2896         (WebCore::RenderImage::computeReplacedLogicalHeight):
2897         * rendering/RenderReplaced.h:
2898
2899 2011-10-13  Sheriff Bot  <webkit.review.bot@gmail.com>
2900
2901         Unreviewed, rolling out r97362.
2902         http://trac.webkit.org/changeset/97362
2903         https://bugs.webkit.org/show_bug.cgi?id=70039
2904
2905         Relies on V8 APIs that have been reverted upstream. (Requested
2906         by dglazkov on #webkit).
2907
2908         * English.lproj/localizedStrings.js:
2909         * bindings/js/ScriptProfiler.cpp:
2910         * bindings/js/ScriptProfiler.h:
2911         * bindings/v8/ScriptProfiler.cpp:
2912         * bindings/v8/ScriptProfiler.h:
2913         * inspector/Inspector.json:
2914         * inspector/InspectorController.cpp:
2915         (WebCore::InspectorController::InspectorController):
2916         * inspector/InspectorProfilerAgent.cpp:
2917         (WebCore::InspectorProfilerAgent::create):
2918         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
2919         * inspector/InspectorProfilerAgent.h:
2920         * inspector/front-end/DetailedHeapshotGridNodes.js:
2921         (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.hoverMessage):
2922         (WebInspector.HeapSnapshotGenericObjectNode):
2923         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
2924         (WebInspector.HeapSnapshotGenericObjectNode.prototype.hoverMessage):
2925         (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
2926         * inspector/front-end/DetailedHeapshotView.js:
2927         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopover):
2928         * inspector/front-end/HeapSnapshot.js:
2929         (WebInspector.HeapSnapshot.prototype._init):
2930         (WebInspector.HeapSnapshot.prototype.dispose):
2931         (WebInspector.HeapSnapshot.prototype.updateStaticData):
2932         (WebInspector.HeapSnapshotNodesProvider.prototype._serialize):
2933         * inspector/front-end/HeapSnapshotProxy.js:
2934         * inspector/front-end/RemoteObject.js:
2935         * inspector/front-end/heapProfiler.css:
2936
2937 2011-10-13  David Hyatt  <hyatt@apple.com>
2938
2939         https://bugs.webkit.org/show_bug.cgi?id=69932
2940         
2941         Layout repainting messed up for objects in regions. There were two bugs here.
2942         The first is that the regionOverflowRect needs to at least be the size of the 
2943         region's rect. When you're in the middle of layout, you haven't computed the
2944         overflow rect for the flow thread yet (the flow thread's height could even be 0),
2945         and so you just need to enforce a minimum size. Also removed the region-overflow:break
2946         clipping behavior, since it was established that was wrong.
2947         
2948         The second bug is that when you tell a region to repaint, you need to disable layout state,
2949         since applying layout deltas from the flow thread makes no sense. The region is in a totally
2950         different place in the render tree, so the current flow thread layout state can't be used
2951         to determine your coordinate offset.
2952
2953         Reviewed by Dan Bernstein.
2954
2955         Added fast/repaint test.
2956
2957         * rendering/RenderFlowThread.cpp:
2958         (WebCore::RenderFlowThread::repaintRectangleInRegions):
2959         * rendering/RenderRegion.cpp:
2960         (WebCore::RenderRegion::regionOverflowRect):
2961
2962 2011-10-13  Renata Hodovan  <reni@webkit.org>
2963
2964         FEComponentTransfer element doesn't support dynamic invalidation
2965         https://bugs.webkit.org/show_bug.cgi?id=69747
2966
2967         The dynamic changes are captured by the svgAttributeChange() function, and
2968         invalidate the filter primitive if necessary.
2969         invalidateFilterPrimitiveParent() is a new free function in
2970         SVGFilterPrimitiveStanardAttributes what makes the invalidation possible
2971         by objects not inherited from SVGFilterPrimitiveStanardAttributes too.
2972         This solution was used in SVGFEMergeNodeElement::svgAttributeChanged()
2973         previously and now it can use this new function too.
2974
2975         Reviewed by Nikolas Zimmermann.
2976
2977         Tests: svg/dynamic-updates/SVGFEComponentTransferElement-dom-amplitude-attr.html
2978                svg/dynamic-updates/SVGFEComponentTransferElement-dom-exponent-attr.html
2979                svg/dynamic-updates/SVGFEComponentTransferElement-dom-intercept-attr.html
2980                svg/dynamic-updates/SVGFEComponentTransferElement-dom-offset-attr.html
2981                svg/dynamic-updates/SVGFEComponentTransferElement-dom-slope-attr.html
2982                svg/dynamic-updates/SVGFEComponentTransferElement-dom-tableValues-attr.html
2983                svg/dynamic-updates/SVGFEComponentTransferElement-dom-type-attr.html
2984                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-amplitude-prop.html
2985                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-exponent-prop.html
2986                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-intercept-prop.html
2987                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-offset-prop.html
2988                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-slope-prop.html
2989                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-tableValues-prop.html
2990                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-type-prop.html
2991
2992         * svg/SVGComponentTransferFunctionElement.cpp:
2993         (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged):
2994         * svg/SVGComponentTransferFunctionElement.h:
2995         * svg/SVGFEComponentTransferElement.cpp:
2996         (WebCore::SVGFEComponentTransferElement::build):
2997         * svg/SVGFEMergeNodeElement.cpp:
2998         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged):
2999         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3000         (WebCore::invalidateFilterPrimitiveParent):
3001         * svg/SVGFilterPrimitiveStandardAttributes.h:
3002
3003 2011-10-13  Deepak Sherveghar  <bpwv64@motorola.com>
3004
3005         REGRESSION (r95381): Standalone video can be focused and draws a focus ring.
3006         https://bugs.webkit.org/show_bug.cgi?id=69097
3007
3008         Reviewed by Eric Carlson.
3009
3010         We don't want to focus a media element in a standalone document.
3011
3012         Test: fast/events/media-focus-in-standalone-media-document.html
3013
3014         * html/HTMLMediaElement.cpp:
3015         (WebCore::HTMLMediaElement::supportsFocus): return false if media element is in a standalone media document.
3016
3017 2011-10-13  Mikhail Naganov  <mnaganov@chromium.org>
3018
3019         Web Inspector: [Chromium] Add an ability to look up and explore an object from a heap profile.
3020         https://bugs.webkit.org/show_bug.cgi?id=61179
3021
3022         This is exteremely helpful when dealing with DOM wrappers, as
3023         their properties are mostly implemented with getters and thus not
3024         stored in heap snapshots.
3025
3026         Reviewed by Pavel Feldman.
3027
3028         * English.lproj/localizedStrings.js:
3029         * bindings/js/ScriptProfiler.cpp:
3030         (WebCore::ScriptProfiler::objectByHeapObjectId):
3031         * bindings/js/ScriptProfiler.h:
3032         * bindings/v8/ScriptProfiler.cpp:
3033         (WebCore::ScriptProfiler::objectByHeapObjectId):
3034         * bindings/v8/ScriptProfiler.h:
3035         * inspector/Inspector.json:
3036         * inspector/InspectorController.cpp:
3037         (WebCore::InspectorController::InspectorController):
3038         * inspector/InspectorProfilerAgent.cpp:
3039         (WebCore::InspectorProfilerAgent::create):
3040         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
3041         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
3042         * inspector/InspectorProfilerAgent.h:
3043         * inspector/front-end/DetailedHeapshotGridNodes.js:
3044         (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.queryObjectContent):
3045         (WebInspector.HeapSnapshotGenericObjectNode):
3046         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
3047         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent.else.formatResult):
3048         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent):
3049         (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
3050         * inspector/front-end/DetailedHeapshotView.js:
3051         (WebInspector.DetailedHeapshotView.prototype._showObjectPopover):
3052         * inspector/front-end/HeapSnapshot.js:
3053         (WebInspector.HeapSnapshotNode.prototype.get canBeQueried):
3054         (WebInspector.HeapSnapshotNode.prototype.get flags):
3055         (WebInspector.HeapSnapshotNode.prototype.get isDOMWindow):
3056         (WebInspector.HeapSnapshot.prototype._init):
3057         (WebInspector.HeapSnapshot.prototype.dispose):
3058         (WebInspector.HeapSnapshot.prototype._flagsOfNode):
3059         (WebInspector.HeapSnapshot.prototype._calculateFlags):
3060         (WebInspector.HeapSnapshot.prototype.updateStaticData):
3061         (WebInspector.HeapSnapshotNodesProvider.prototype._serialize):
3062         * inspector/front-end/HeapSnapshotProxy.js:
3063         (WebInspector.HeapSnapshotProxy.prototype.get nodeFlags):
3064         * inspector/front-end/RemoteObject.js:
3065         (WebInspector.RemoteObject.fromError):
3066         * inspector/front-end/heapProfiler.css:
3067         (.detailed-heapshot-view tr:not(.selected) td.object-column span.highlight):
3068
3069 2011-10-13  Adam Barth  <abarth@webkit.org>
3070
3071         script-src * should allow all URLs
3072         https://bugs.webkit.org/show_bug.cgi?id=70011
3073
3074         Reviewed by Eric Seidel.
3075
3076         This patch gets us slightly ahead of the spec.  Technically, script-src
3077         means "any host" and inherits the current scheme.  However, that's not
3078         what developers expect and it's even contradicted by examples in the
3079         spec itself.  After this patch, * matches all URLs.
3080
3081         Test: http/tests/security/contentSecurityPolicy/script-src-star-cross-scheme.html
3082
3083         * page/ContentSecurityPolicy.cpp:
3084         (WebCore::CSPSourceList::CSPSourceList):
3085         (WebCore::CSPSourceList::matches):
3086         (WebCore::CSPSourceList::parseSource):
3087         (WebCore::CSPSourceList::addSourceStar):
3088
3089 2011-10-13  Kentaro Hara  <haraken@chromium.org>
3090
3091         Implement an OverflowEvent constructor for JSC
3092         https://bugs.webkit.org/show_bug.cgi?id=69907
3093
3094         Reviewed by Adam Barth.
3095
3096         There is no spec for the OverflowEvent constructor
3097         since it is WebKit-specific. However, judging from the current
3098         IDL of initOverflowEvent(), the constructor IDL should be as follows.
3099
3100         [Constructor(DOMString type, optional OverflowEventInit eventInitDict)]
3101         interface OverflowEvent : Event {
3102             ...;
3103         }
3104
3105         dictionary OverflowEventInit : EventInit {
3106             unsigned short orient;
3107             boolean horizontalOverflow;
3108             boolean verticalOverflow;
3109         }
3110
3111         Note: In initOverflowEvent(), we cannot specify |bubbles| and |cancelable|.
3112         I do not know why, but we can find a comment in fast/events/script-tests/init-events.js
3113         that says "initOverflowEvent has an interface that has a design that's
3114         inconsistent with the init functions from other events".
3115         On the other hand, the above constructor enables to specify |bubbles| and |cancelable|,
3116         which is consistent with other constructors.
3117
3118         Test: fast/events/constructors/overflow-event-constructor.html
3119
3120         * bindings/generic/EventConstructors.h: Added a definition for the OverflowEvent constructor.
3121         * bindings/js/JSEventConstructors.cpp: Added #includes for OverflowEvent.
3122         * dom/OverflowEvent.cpp:
3123         (WebCore::OverflowEventInit::OverflowEventInit):
3124         (WebCore::OverflowEvent::OverflowEvent):
3125         (WebCore::OverflowEvent::initOverflowEvent):
3126         * dom/OverflowEvent.h: Added a definition for OverflowEventInit.
3127         (WebCore::OverflowEvent::create):
3128         (WebCore::OverflowEvent::orient):
3129         (WebCore::OverflowEvent::horizontalOverflow):
3130         (WebCore::OverflowEvent::verticalOverflow):
3131         * dom/OverflowEvent.idl: Makes OverflowEvent constructible.
3132
3133 2011-10-13  Kent Tamura  <tkent@chromium.org>
3134
3135         Cleanup of HTMLSelectElement
3136         https://bugs.webkit.org/show_bug.cgi?id=69908
3137
3138         Reviewed by Darin Adler.
3139
3140         - Change the m_listItems type: Vector<Element*> -> Vector<HTMLElement*>
3141         - Rename a member: m_recalcListItems -> m_shouldRecalcListItems
3142         - Fold checkListItems() into listItems()
3143         - Style fixes
3144
3145         No new tests, just a cleanup.
3146
3147         * accessibility/AccessibilityListBox.cpp:
3148         (WebCore::AccessibilityListBox::addChildren):
3149         * accessibility/AccessibilityListBoxOption.cpp:
3150         (WebCore::AccessibilityListBoxOption::listBoxOptionIndex):
3151         * accessibility/AccessibilityMenuListPopup.cpp:
3152         (WebCore::AccessibilityMenuListPopup::addChildren):
3153         * accessibility/AccessibilityRenderObject.cpp:
3154         (WebCore::AccessibilityRenderObject::stringValue):
3155         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
3156         (optionFromSelection):
3157         (webkit_accessible_selection_get_selection_count):
3158         * dom/OptionElement.cpp:
3159         (WebCore::OptionElement::optionIndex):
3160         * html/HTMLSelectElement.cpp:
3161         (WebCore::HTMLSelectElement::HTMLSelectElement):
3162         (WebCore::HTMLSelectElement::add):
3163         (WebCore::HTMLSelectElement::value):
3164         (WebCore::HTMLSelectElement::setValue):
3165         (WebCore::HTMLSelectElement::parseMappedAttribute):
3166         (WebCore::HTMLSelectElement::recalcListItemsIfNeeded):
3167         (WebCore::HTMLSelectElement::setOption):
3168         (WebCore::HTMLSelectElement::setLength):
3169         (WebCore::HTMLSelectElement::nextValidIndex):
3170         (WebCore::HTMLSelectElement::firstSelectableListIndex):
3171         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway):
3172         (WebCore::HTMLSelectElement::selectAll):
3173         (WebCore::HTMLSelectElement::saveLastSelection):
3174         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
3175         (WebCore::HTMLSelectElement::updateListBoxSelection):
3176         (WebCore::HTMLSelectElement::listBoxOnChange):
3177         (WebCore::HTMLSelectElement::listItems):
3178         (WebCore::HTMLSelectElement::setRecalcListItems):
3179         (WebCore::HTMLSelectElement::recalcListItemsInternal):
3180         (WebCore::HTMLSelectElement::selectedIndex):
3181         (WebCore::HTMLSelectElement::setSelectedIndexInternal):
3182         (WebCore::HTMLSelectElement::optionToListIndex):
3183         (WebCore::HTMLSelectElement::listToOptionIndex):
3184         (WebCore::HTMLSelectElement::dispatchFocusEvent):
3185         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
3186         (WebCore::HTMLSelectElement::saveFormControlState): Use StringBuilder.
3187         (WebCore::HTMLSelectElement::restoreFormControlState):
3188         (WebCore::HTMLSelectElement::appendFormData):
3189         (WebCore::HTMLSelectElement::reset):
3190         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
3191         (WebCore::HTMLSelectElement::updateSelectedState):
3192         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
3193         (WebCore::HTMLSelectElement::lastSelectedListIndex):
3194         Optimize the code by iterating in the reverse order.
3195         (WebCore::HTMLSelectElement::typeAheadFind):
3196         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
3197         (WebCore::HTMLSelectElement::length):
3198         (WebCore::toSelectElement):
3199         * html/HTMLSelectElement.h:
3200         * rendering/RenderListBox.cpp:
3201         (WebCore::RenderListBox::updateFromElement):
3202         (WebCore::RenderListBox::addFocusRingRects):
3203         (WebCore::RenderListBox::paintItemForeground):
3204         (WebCore::RenderListBox::paintItemBackground):
3205         (WebCore::RenderListBox::nodeAtPoint):
3206         * rendering/RenderMenuList.cpp:
3207         (WebCore::RenderMenuList::updateOptionsWidth):
3208         (WebCore::RenderMenuList::setTextFromOption):
3209         (WebCore::RenderMenuList::itemText):
3210         (WebCore::RenderMenuList::itemAccessibilityText):
3211         (WebCore::RenderMenuList::itemToolTip):
3212         (WebCore::RenderMenuList::itemIsEnabled):
3213         (WebCore::RenderMenuList::itemStyle):
3214         (WebCore::RenderMenuList::itemBackgroundColor):
3215         (WebCore::RenderMenuList::itemIsSeparator):
3216         (WebCore::RenderMenuList::itemIsLabel):
3217         (WebCore::RenderMenuList::itemIsSelected):
3218
3219 2011-10-13  Adam Barth  <abarth@webkit.org>
3220
3221         DOMWindow subobjects can be re-created after navigation
3222         https://bugs.webkit.org/show_bug.cgi?id=68849
3223
3224         Reviewed by Sam Weinig.
3225
3226         Test: http/tests/security/xss-DENIED-getSelection-from-inactive-domwindow.html
3227
3228         * page/DOMWindow.cpp:
3229         (WebCore::DOMWindow::~DOMWindow):
3230             - Add ASSERTs to show that we're not recreating these objects.
3231             - Add a call to clear() as defense in depth in case we have any of
3232               these objects hanging around.
3233         (WebCore::DOMWindow::clear):
3234             - Clear out a couple of objects that weren't getting cleared.
3235               These are actually not likely to cause problems, but clearing
3236               them out is the safe thing to do.
3237         (WebCore::DOMWindow::isActive):
3238             - Add a concept of whether the DOMWindow is "active" in its frame.
3239               We had this concept in a couple places already, but centralizing
3240               it into a helper function make it easier to use and talk about.
3241         (WebCore::DOMWindow::orientation):
3242             - Whitespace nit.
3243         (WebCore::DOMWindow::screen):
3244         (WebCore::DOMWindow::history):
3245         (WebCore::DOMWindow::crypto):
3246         (WebCore::DOMWindow::locationbar):
3247         (WebCore::DOMWindow::menubar):
3248         (WebCore::DOMWindow::personalbar):
3249         (WebCore::DOMWindow::scrollbars):
3250         (WebCore::DOMWindow::statusbar):
3251         (WebCore::DOMWindow::toolbar):
3252         (WebCore::DOMWindow::console):
3253         (WebCore::DOMWindow::applicationCache):
3254         (WebCore::DOMWindow::navigator):
3255         (WebCore::DOMWindow::performance):
3256         (WebCore::DOMWindow::location):
3257         (WebCore::DOMWindow::sessionStorage):
3258         (WebCore::DOMWindow::localStorage):
3259         (WebCore::DOMWindow::webkitNotifications):
3260         (WebCore::DOMWindow::webkitIndexedDB):
3261         (WebCore::DOMWindow::getSelection):
3262         (WebCore::DOMWindow::styleMedia):
3263         (WebCore::DOMWindow::webkitURL):
3264         (WebCore::DOMWindow::webkitStorageInfo):
3265             - Avoid creating these objects when we're not active.  That can
3266               only lead to sadness.
3267         (WebCore::DOMWindow::webkitRequestFileSystem):
3268         (WebCore::DOMWindow::webkitResolveLocalFileSystemURL):
3269         (WebCore::DOMWindow::openDatabase):
3270         (WebCore::DOMWindow::postMessage):
3271             - While not techincally creating subobjects, these functions also
3272               seem unwise when the DOMWindow is inactive.
3273         (WebCore::DOMWindow::find):
3274         (WebCore::DOMWindow::length):
3275         (WebCore::DOMWindow::getMatchedCSSRules):
3276             - These functions operate on the active Document.  When we're not
3277               active, that's not us!
3278         (WebCore::DOMWindow::document):
3279             - Update to use the new concept of being active rather than having
3280               this function roll its own implementation.
3281         (WebCore::DOMWindow::webkitConvertPointFromNodeToPage):
3282         (WebCore::DOMWindow::webkitConvertPointFromPageToNode):
3283         (WebCore::DOMWindow::scrollBy):
3284         (WebCore::DOMWindow::scrollTo):
3285             - These functions also look unwise to run when inactive because
3286               they're reading information from the active document.
3287             - I added a RefPtr for node because the call to
3288               updateLayoutIgnorePendingStylesheets() seems likely to be able to
3289               run script somehow.
3290         (WebCore::DOMWindow::addEventListener):
3291         (WebCore::DOMWindow::removeEventListener):
3292         (WebCore::DOMWindow::dispatchLoadEvent):
3293         (WebCore::DOMWindow::dispatchEvent):
3294             - I don't think these functions worked when inactive anyway, but
3295               explicitly blocking them seems wise.
3296         (WebCore::DOMWindow::setLocation):
3297         (WebCore::DOMWindow::isInsecureScriptAccess):
3298         (WebCore::DOMWindow::open):
3299         (WebCore::DOMWindow::showModalDialog):
3300             - These already have checks for being active, but it can't hurt to
3301               be explicit at the top of the function.
3302         * page/DOMWindow.h:
3303
3304 2011-10-13  Kent Tamura  <tkent@chromium.org>
3305
3306         REGRESSION(r89915): <input type=email multiple> don't show the default value
3307         https://bugs.webkit.org/show_bug.cgi?id=69895
3308
3309         Reviewed by Hajime Morita.
3310
3311         m_valueIfDirty became unexpectedly empty because
3312         EmailInputType::sanitizeValue() returned an empty string for a
3313         null input string.
3314
3315         To solve this issue, HTMLInputElement::sanitizeValue() checks
3316         nullness, and remove the null check of sanitizeValue() of
3317         InputType subclasses.
3318         Also, we make InputType::sanitizeValue() const.
3319
3320         * html/ColorInputType.cpp:
3321         (WebCore::ColorInputType::sanitizeValue):
3322         - Make this const.
3323         - Remove null check.
3324         * html/ColorInputType.h: Make sanitizeValue() const.
3325         * html/EmailInputType.cpp:
3326         (WebCore::EmailInputType::sanitizeValue): Make this const.
3327         * html/EmailInputType.h: Make sanitizeValue() const.
3328         * html/HTMLInputElement.cpp:
3329         (WebCore::HTMLInputElement::sanitizeValue):
3330         (WebCore::HTMLInputElement::updateValueIfNeeded):
3331         * html/InputType.cpp:
3332         (WebCore::InputType::sanitizeValue):
3333         Returns a null string if the input string is null, and
3334         don't call InputType::sanitizeValue() in this case.
3335         * html/InputType.h: Make sanitizeValue() const.
3336         * html/NumberInputType.cpp:
3337         (WebCore::NumberInputType::sanitizeValue): Make this const.
3338         * html/NumberInputType.h: Make sanitizeValue() const.
3339         * html/RangeInputType.cpp:
3340         (WebCore::RangeInputType::sanitizeValue):
3341         - Make this const.
3342         - Remove null check.
3343         * html/RangeInputType.h: Make sanitizeValue() const.
3344         * html/TextFieldInputType.cpp:
3345         (WebCore::TextFieldInputType::sanitizeValue): Make this const.
3346         * html/TextFieldInputType.h: Make sanitizeValue() const.
3347
3348 2011-10-12  Joseph Pecoraro  <joepeck@webkit.org>
3349
3350         Pass Parsed Accept Attribute MIME Types to WebKit Clients
3351         https://bugs.webkit.org/show_bug.cgi?id=69598
3352
3353         Reviewed by David Kilzer.
3354
3355         No new tests. No new functionality in WebCore, just
3356         exposing more information to the WebKit port.
3357
3358         * html/FileInputType.cpp:
3359         (WebCore::FileInputType::handleDOMActivateEvent):
3360         (WebCore::FileInputType::receiveDropForDirectoryUpload):
3361         Set the MIME type list on the FileChooser settings.
3362
3363         * html/HTMLInputElement.h:
3364         * html/HTMLInputElement.cpp:
3365         (WebCore::HTMLInputElement::acceptMIMETypes):
3366         Accessor for a parsed list of MIME types from the accept attribute.
3367         
3368         * platform/FileChooser.h:
3369         Add a slot for a MIME type list on the chooser settings.
3370
3371 2011-10-12  Joseph Pecoraro  <joepeck@webkit.org>
3372
3373         Pass Parsed Accept Attribute MIME Types to WebKit Clients
3374         https://bugs.webkit.org/show_bug.cgi?id=69598
3375
3376         Reviewed by Kent Tamura.
3377
3378         Deprecate the old String version of getting the "accept"
3379         mime type values. Instead we will change to include a
3380         list of MIME types.
3381
3382         * html/FileInputType.cpp:
3383         (WebCore::FileInputType::handleDOMActivateEvent):
3384         (WebCore::FileInputType::receiveDropForDirectoryUpload):
3385         * platform/FileChooser.h:
3386
3387 2011-10-12  Adam Barth  <abarth@webkit.org>
3388
3389         Remove ENABLE(XHTMLMP) and associated code
3390         https://bugs.webkit.org/show_bug.cgi?id=69729
3391
3392         Reviewed by David Levin.
3393
3394         As discussed on webkit-dev, we are removing this feature as part of our
3395         cleanup of unmaintained code in WebKit.
3396
3397         * Configurations/FeatureDefines.xcconfig:
3398         * GNUmakefile.am:
3399         * GNUmakefile.list.am:
3400         * WebCore.gypi:
3401         * WebCore.pro:
3402         * WebCore.vcproj/WebCore.vcproj:
3403         * WebCore.xcodeproj/project.pbxproj:
3404         * dom/DOMImplementation.cpp:
3405         (WebCore::DOMImplementation::createDocument):
3406         * dom/Document.cpp:
3407         (WebCore::Document::Document):
3408         * dom/Document.h:
3409         (WebCore::Document::isMediaDocument):