f0daa397cdf21cf6fb581df24f3ace5a4257a555
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-10-14  Jeff Miller  <jeffm@apple.com>
2
3         InjectedBundleHitTestResult::imageRect() should return rect in WKView coordinates
4         https://bugs.webkit.org/show_bug.cgi?id=69963
5         
6         Add infrastructure to convert from any frame view's coordinate system to the
7         root view's coordinate system.
8
9         Reviewed by Simon Fraser.
10
11         No new tests (yet), this is covered by <https://bugs.webkit.org/show_bug.cgi?id=70136>.
12
13         * WebCore.exp.in: Exported WebCore::ScrollView::contentsToRootView(), used by InjectedBundleHitTestResult.cpp.
14         
15         * platform/ScrollView.cpp:
16         (WebCore::ScrollView::rootViewToContents): Added (both point and rect versions).
17         (WebCore::ScrollView::contentsToRootView): Ditto.
18         
19         * platform/ScrollView.h: Added member functions to convert to/from root view coordinates.
20         
21         * platform/Widget.cpp:
22         (WebCore::Widget::convertFromRootView): Added (both point and rect versions).
23         (WebCore::Widget::convertToRootView): Ditto.
24         
25         * platform/Widget.h: Added member functions to convert to/from root view coordinates.
26
27 2011-10-14  Andreas Kling  <kling@webkit.org>
28
29         CSSParser: Remove StyleBase usage.
30         https://bugs.webkit.org/show_bug.cgi?id=70150
31
32         Reviewed by Darin Adler.
33
34         Split CSSParser::m_parsedStyleObjects into two vectors of
35         CSSRules and MediaLists.
36
37         * css/CSSParser.cpp:
38         (WebCore::CSSParser::createMediaList):
39         (WebCore::CSSParser::createCharsetRule):
40         (WebCore::CSSParser::createImportRule):
41         (WebCore::CSSParser::createMediaRule):
42         (WebCore::CSSParser::createKeyframesRule):
43         (WebCore::CSSParser::createStyleRule):
44         (WebCore::CSSParser::createFontFaceRule):
45         (WebCore::CSSParser::createPageRule):
46         (WebCore::CSSParser::createKeyframeRule):
47         * css/CSSParser.h:
48
49 2011-10-14  Adam Barth  <abarth@webkit.org>
50
51         canvas getImageData should explain why it throws SECURITY_ERR
52         https://bugs.webkit.org/show_bug.cgi?id=70088
53
54         Reviewed by Darin Adler.
55
56         Log as message to the console when getImageData fails because the
57         canvas is tainted.
58
59         * html/canvas/CanvasRenderingContext2D.cpp:
60         (WebCore::CanvasRenderingContext2D::getImageData):
61
62 2011-10-14  Andreas Kling  <kling@webkit.org>
63
64         Inspector: Remove StyleBase usage.
65         https://bugs.webkit.org/show_bug.cgi?id=70138
66
67         Reviewed by Antti Koivisto.
68
69         Be fully specific about whether we're operating on a CSSRule or
70         a CSSStyleSheet.
71
72         No behavior change expected, this merely is a cleanup.
73
74         * inspector/InspectorCSSAgent.cpp:
75         (WebCore::InspectorCSSAgent::parentStyleSheet):
76         (WebCore::InspectorCSSAgent::asCSSStyleRule):
77         * inspector/InspectorCSSAgent.h:
78         * inspector/InspectorStyleSheet.cpp:
79         (WebCore::asCSSRuleList):
80
81 2011-10-14  Mark Hahnenberg  <mhahnenberg@apple.com>
82
83         Rename virtual deleteProperty to deletePropertyVirtual
84         https://bugs.webkit.org/show_bug.cgi?id=69884
85
86         Reviewed by Darin Adler.
87
88         No new tests.
89
90         Renamed virtual versions of deleteProperty to deletePropertyVirtual in prepration for 
91         adding the static deleteProperty to the MethodTable in ClassInfo since the 
92         compiler gets mad if the virtual and static versions have the same name.
93
94         * WebCore.exp.in:
95         * bindings/js/JSDOMStringMapCustom.cpp:
96         (WebCore::JSDOMStringMap::deletePropertyVirtual):
97         * bindings/js/JSDOMWindowCustom.cpp:
98         (WebCore::JSDOMWindow::deletePropertyVirtual):
99         * bindings/js/JSDOMWindowShell.cpp:
100         (WebCore::JSDOMWindowShell::deletePropertyVirtual):
101         * bindings/js/JSDOMWindowShell.h:
102         * bindings/js/JSHistoryCustom.cpp:
103         (WebCore::JSHistory::deletePropertyVirtual):
104         * bindings/js/JSLocationCustom.cpp:
105         (WebCore::JSLocation::deletePropertyVirtual):
106         * bindings/js/JSStorageCustom.cpp:
107         (WebCore::JSStorage::deletePropertyVirtual):
108         * bindings/js/ScriptObject.cpp:
109         (WebCore::ScriptGlobalObject::remove):
110         * bindings/objc/WebScriptObject.mm:
111         (-[WebScriptObject removeWebScriptKey:]):
112         * bindings/scripts/CodeGeneratorJS.pm:
113         (GenerateHeader):
114         * bridge/NP_jsobject.cpp:
115         (_NPN_RemoveProperty):
116         * bridge/jni/jni_jsobject.mm:
117         (JavaJSObject::removeMember):
118         * bridge/objc/objc_runtime.h:
119         * bridge/objc/objc_runtime.mm:
120         (JSC::Bindings::ObjcFallbackObjectImp::deletePropertyVirtual):
121         * bridge/runtime_array.cpp:
122         (JSC::RuntimeArray::deletePropertyVirtual):
123         * bridge/runtime_array.h:
124         * bridge/runtime_object.cpp:
125         (JSC::Bindings::RuntimeObject::deletePropertyVirtual):
126         * bridge/runtime_object.h:
127
128 2011-10-14  Simon Fraser  <simon.fraser@apple.com>
129
130         Web Inspector: WebProcess crashes hard when inspecting elements with border-images applied
131         https://bugs.webkit.org/show_bug.cgi?id=70105
132
133         Reviewed by Dave Hyatt.
134         
135         Fix three different crashes related to getting computed style for border-image.
136         In both valueForNinePieceImageSlice() and valueForNinePieceImageQuad(),
137         assign 'right' to 'left' because we've computed a value for 'right' already.
138         Otherwise this would leave 'right' as null, causing later crashes in cssText().
139         
140         In mapNinePieceImage(), borderImage->imageValue() can be null for a border-image
141         shorthand that is missing the image value.
142
143         Test: fast/css/getComputedStyle/computed-style-border-image.html
144
145         * css/CSSComputedStyleDeclaration.cpp:
146         (WebCore::valueForNinePieceImageSlice):
147         (WebCore::valueForNinePieceImageQuad):
148         * css/CSSStyleSelector.cpp:
149         (WebCore::CSSStyleSelector::mapNinePieceImage):
150
151 2011-10-14  Ryosuke Niwa  <rniwa@webkit.org>
152
153         Mac build fix after r97497.
154
155         * editing/markup.cpp:
156         (WebCore::isNonTableCellHTMLBlockElement):
157
158 2011-10-14  Daniel Cheng  <dcheng@chromium.org>
159
160         Context-aware HTML paste for Chromium
161         https://bugs.webkit.org/show_bug.cgi?id=62112
162
163         Reviewed by Ryosuke Niwa.
164
165         Add createFragmentFromMarkupWithContext which understands enough about DOM structure to
166         retain necessary elements to preserve structure and appearance when extracting a subset of
167         a DOM tree.
168
169         Covered by existing layout tests.
170
171         * editing/MarkupAccumulator.h:
172         * editing/markup.cpp:
173         (WebCore::isNonTableCellHTMLBlockElement):
174         (WebCore::isHTMLBlockElement):
175         (WebCore::ancestorToRetainStructureAndAppearanceForBlock):
176         (WebCore::ancestorToRetainStructureAndAppearance):
177         (WebCore::ancestorToRetainStructureAndAppearanceWithNoRenderer):
178         (WebCore::findNodesSurroundingContext):
179         (WebCore::trimFragment):
180         (WebCore::createFragmentFromMarkupWithContext):
181         * editing/markup.h:
182         * platform/chromium/ChromiumDataObject.cpp:
183         (WebCore::ChromiumDataObject::getData):
184         * platform/chromium/DataTransferItemChromium.cpp:
185         (WebCore::DataTransferItemChromium::getAsString):
186         * platform/chromium/PasteboardChromium.cpp:
187         (WebCore::Pasteboard::documentFragment):
188         * platform/chromium/PlatformSupport.h:
189
190 2011-10-14  Peter Beverloo  <peter@chromium.org>
191
192         [Chromium] Inherit settings from Chromium's envsetup.sh, address a NDK todo
193         https://bugs.webkit.org/show_bug.cgi?id=70028
194
195         Reviewed by Adam Barth.
196
197         * WebCore.gyp/WebCore.gyp:
198
199 2011-10-14  Nate Chapin  <japhet@chromium.org>
200
201         Check CachedResourceClient types with ASSERTs rather
202         than if statements.
203         https://bugs.webkit.org/show_bug.cgi?id=70113
204
205         Reviewed by Adam Barth.
206
207         No new tests, no functionality change.
208
209         * loader/cache/CachedCSSStyleSheet.cpp:
210         * loader/cache/CachedFont.cpp:
211         * loader/cache/CachedImage.cpp:
212         * loader/cache/CachedResourceClientWalker.h:
213         * loader/cache/CachedXSLStyleSheet.cpp:
214
215 2011-10-14  Andreas Kling  <kling@webkit.org>
216
217         Don't assert that CSSRules are CSSRules.
218
219         Rubber-stamped by Antti Koivisto.
220
221         * css/CSSRule.h:
222         (WebCore::CSSRule::isRule):
223         * css/CSSStyleSheet.cpp:
224         (WebCore::CSSStyleSheet::append):
225         (WebCore::CSSStyleSheet::insert):
226
227 2011-10-14  Beth Dakin  <bdakin@apple.com>
228
229         Attempted Leopard build fix.
230
231         * platform/graphics/GraphicsContext.cpp:
232         (WebCore::GraphicsContext::createCompatibleBuffer):
233
234 2011-10-14  Andreas Kling  <kling@webkit.org>
235
236         CSSStyleSheet should only ever contain CSSRules.
237         https://bugs.webkit.org/show_bug.cgi?id=70116
238
239         Reviewed by Antti Koivisto.
240
241         Move child management from the StyleSheet class down into
242         CSSStyleSheet and XSLStyleSheet. XSLStyleSheet continues to
243         manage StyleBase objects, while CSSStyleSheet now only contains
244         CSSRule.
245
246         This is enforced at both compile time and runtime with explicit
247         types and assertions.
248
249         * css/CSSRule.h:
250         (WebCore::CSSRule::isRule):
251
252             Promoted to a public method so we can use it in assertions.
253
254         * css/CSSRuleList.h:
255         (WebCore::CSSRuleList::create):
256         (WebCore::CSSRuleList::styleSheet):
257         * css/CSSRuleList.cpp:
258         (WebCore::CSSRuleList::CSSRuleList):
259         * bindings/js/JSCSSRuleListCustom.cpp:
260         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
261
262             Change backing to a CSSStyleSheet instead of a StyleSheet.
263
264         * css/CSSRuleList.cpp:
265         (WebCore::CSSRuleList::item):
266
267             Remove redundant assertions.
268
269         * css/CSSStyleSheet.cpp:
270         (WebCore::CSSStyleSheet::isLoading):
271         (WebCore::CSSStyleSheet::addSubresourceStyleURLs):
272         * css/CSSStyleSelector.cpp:
273         (WebCore::RuleSet::addRulesFromSheet):
274         * inspector/InspectorCSSAgent.cpp:
275         (WebCore::InspectorCSSAgent::collectStyleSheets):
276         * page/PageSerializer.cpp:
277         (WebCore::PageSerializer::serializeCSSStyleSheet):
278
279             Use more specific CSSRule* since that's what we get from
280             CSSStyleSheet::item() now.
281
282         * css/StyleSheet.cpp:
283         (WebCore::StyleSheet::~StyleSheet):
284         * css/CSSStyleSheet.cpp:
285         (WebCore::CSSStyleSheet::~CSSStyleSheet):
286         * xml/XSLStyleSheetLibxslt.cpp:
287         (WebCore::XSLStyleSheet::~XSLStyleSheet):
288         * xml/XSLStyleSheetQt.cpp:
289         (WebCore::XSLStyleSheet::~XSLStyleSheet):
290
291             Orphaning logic from ~StyleSheet() moved to subclass dtors.
292
293         * css/StyleSheet.h:
294         * css/CSSStyleSheet.h:
295         (WebCore::CSSStyleSheet::length):
296         (WebCore::CSSStyleSheet::item):
297         * css/CSSStyleSheet.cpp:
298         (WebCore::CSSStyleSheet::append):
299         (WebCore::CSSStyleSheet::insert):
300         (WebCore::CSSStyleSheet::remove):
301
302             Moved from StyleSheet and changed to only accept CSSRules.
303
304         * css/StyleSheet.h:
305         * xml/XSLStyleSheet.h:
306         (WebCore::XSLStyleSheet::length):
307         (WebCore::XSLStyleSheet::item):
308         (WebCore::XSLStyleSheet::append):
309         (WebCore::XSLStyleSheet::insert):
310         (WebCore::XSLStyleSheet::remove):
311
312             Moved from StyleSheet though still uses StyleBase.
313
314 2011-10-14 Yuji Sanachan <sanachan.y@gmail.com>
315
316         Include dom/ExceptionCode.h instead of Filesystem APIs headers
317         to fix compile error when ENABLE_WORKERS=1 and ENABLE_FILE_SYSTEM=0
318         https://bugs.webkit.org/show_bug.cgi?id=70036
319
320         Reviewed by Darin Adler.
321
322         * workers/WorkerContext.cpp:
323         (WebCore::WorkerContext::importScript):
324
325 2011-10-14  Darin Adler  <darin@apple.com>
326
327         Text drawn via -webkit-background-clip:text should be non-blurry with all scaling 
328         techniques
329         https://bugs.webkit.org/show_bug.cgi?id=68641
330
331         Reviewed by Simon Fraser. Committed by Beth Dakin.
332
333         * platform/graphics/GraphicsContext.cpp:
334         (WebCore::GraphicsContext::createCompatibleBuffer): Allocate a buffer based on the 
335         scale
336         factor of the context.
337         * platform/graphics/GraphicsContext.h: Added createCompatibleBuffer.
338
339         * rendering/RenderBoxModelObject.cpp:
340         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Use 
341         createCompatibleBuffer.
342
343 2011-10-14  Ryosuke Niwa  <rniwa@webkit.org>
344
345         Move selectionStartStyle and selectionHasStyle to EditingStyle
346         https://bugs.webkit.org/show_bug.cgi?id=69882
347
348         Reviewed by Enrica Casucci.
349
350         Moved selectionHasStyle and selectionStartStyle from Editor to EditingStyle.
351         Also moved much of code in Editor::selectionStartCSSPropertyValue to method of EditingStyle.
352
353         In addition, moved Range::editingStartPosition to htmlediting where it belongs
354         and renamed it to adjustedSelectionStartForStyleComputation.
355
356         * dom/Range.cpp:
357         * dom/Range.h:
358         * editing/EditingStyle.cpp:
359         (WebCore::EditingStyle::triStateOfStyle): Extracted from selectionHasStyle.
360         (WebCore::EditingStyle::legacyFontSize): Extracted from selectionStartCSSPropertyValue.
361         (WebCore::EditingStyle::styleAtSelectionStart): Moved from Editor::selectionStartStyle.
362         * editing/EditingStyle.h:
363         * editing/Editor.cpp:
364         (WebCore::Editor::fontForSelection):
365         (WebCore::Editor::selectionStartHasStyle):
366         (WebCore::Editor::selectionHasStyle):
367         (WebCore::Editor::selectionStartCSSPropertyValue):
368         * editing/Editor.h:
369         * editing/EditorCommand.cpp:
370         (WebCore::executeToggleStyleInList):
371         * editing/htmlediting.cpp:
372         (WebCore::adjustedSelectionStartForStyleComputation): Moved from Range::editingStartPosition.
373         * editing/htmlediting.h:
374
375 2011-10-14  Ryosuke Niwa  <rniwa@webkit.org>
376
377         Redundant comparison in AccessibilityObject.cpp updateAXLineStartForVisiblePosition
378         https://bugs.webkit.org/show_bug.cgi?id=70074
379
380         Reviewed by Chris Fleizach.
381
382         Removed redundant code.
383
384         * accessibility/AccessibilityObject.cpp:
385         (WebCore::updateAXLineStartForVisiblePosition):
386
387 2011-10-12  Ryosuke Niwa  <rniwa@webkit.org>
388
389         Make the interface of locationAndLengthFromRange and rangeFromLocationAndLength consistent
390         https://bugs.webkit.org/show_bug.cgi?id=69964
391
392         Reviewed by Enrica Casucci.
393
394         Extracted the logic to determine the scope element as FrameSelection::rootEditableElementOrDocumentElement
395         and deployed it in WebKit layer. Made locationAndLengthFromRange take a scope element and renamed it to
396         getLocationAndLengthFromRange.
397
398         * WebCore.exp.in:
399         * editing/FrameSelection.cpp:
400         (WebCore::FrameSelection::rootEditableElementOrDocumentElement):
401         * editing/FrameSelection.h:
402         * editing/TextIterator.cpp:
403         (WebCore::TextIterator::getLocationAndLengthFromRange):
404         * editing/TextIterator.h:
405
406 2011-10-13  Arko Saha  <arko@motorola.com>
407
408         Microdata: Basic implementation of document.getItems() method.
409         https://bugs.webkit.org/show_bug.cgi?id=68610
410
411         Reviewed by Ryosuke Niwa.
412
413         Added ENABLE(MICRODATA) feature flag. Implement document.getItems() DOM API.
414         Spec: http://www.whatwg.org/specs/web-apps/current-work/complete/microdata.html
415
416         Tests: fast/dom/MicroData/001.html
417                fast/dom/MicroData/002.html
418                fast/dom/MicroData/003.html
419                fast/dom/MicroData/004.html
420                fast/dom/MicroData/005.html
421                fast/dom/MicroData/006.html
422                fast/dom/MicroData/007.html
423                fast/dom/MicroData/008.html
424                fast/dom/MicroData/009.html
425
426         * CMakeLists.txt:
427         * DerivedSources.make:
428         * GNUmakefile.am:
429         * GNUmakefile.list.am:
430         * WebCore.gypi:
431         * WebCore.pro:
432         * WebCore.vcproj/WebCore.vcproj:
433         * dom/Document.cpp:
434         (WebCore::Document::getItems): Returns NodeList of the element in the Document that
435         create items, that are not part of other items, and that are of one of the types
436         given in the argument. If no tokens specified/undefined in the argument, then
437         return a NodeList containing all top level microdata items.
438         (WebCore::Document::removeCachedMicroDataItemList): Remove Microdata item node list
439         from cache.
440         * dom/Document.h:
441         * dom/Document.idl: Added getItems() microdata DOM API.
442         * dom/MicroDataItemList.cpp: Added.
443         (WebCore::MicroDataItemList::MicroDataItemList):
444         (WebCore::MicroDataItemList::~MicroDataItemList):
445         (WebCore::MicroDataItemList::nodeMatches):
446         * dom/MicroDataItemList.h: Added.
447         (WebCore::MicroDataItemList::create):
448         * dom/Node.cpp:
449         (WebCore::Node::itemTypeAttributeChanged): It is responsible to invalidate the Microdata
450         item node cache when itemType attribute changes.
451         (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes):
452         (WebCore::NodeListsNodeData::invalidateMicrodataItemListCaches): Invalidate Microdata item
453         list cache.
454         (WebCore::NodeListsNodeData::isEmpty):
455         * dom/Node.h:
456         * dom/NodeRareData.h:
457         * features.pri:
458         * html/HTMLAttributeNames.in: Added itemid, itemprop, itemscope, itemtype attributes.
459         * html/HTMLElement.cpp:
460         (WebCore::HTMLElement::parseMappedAttribute): Handle itemtype attribute change.
461         * html/HTMLElement.idl: Added itemid, itemprop, itemscope, itemtypes microdata attributes.
462
463 2011-10-14  Andreas Kling  <kling@webkit.org>
464
465         Stricter management of WebKitCSSKeyframeRules.
466         https://bugs.webkit.org/show_bug.cgi?id=70109
467
468         Reviewed by Antti Koivisto.
469
470         Covered by existing tests.
471
472         * css/CSSParser.h:
473         * css/CSSParser.cpp:
474         (WebCore::CSSParser::parseKeyframeRule):
475
476             Return a WebKitCSSKeyframeRule instead of a CSSRule.
477
478         * css/CSSRuleList.cpp:
479         (WebCore::CSSRuleList::deleteRule):
480         * css/WebKitCSSKeyframesRule.cpp:
481         (WebCore::WebKitCSSKeyframesRule::deleteRule):
482
483             Moved style sheet orphaning logic for @-webkit-keyframe
484             from CSSRuleList into WebKitCSSKeyframesRule::deleteRule()
485             since that's the only caller operating on those rules.
486
487         * css/WebKitCSSKeyframesRule.cpp:
488         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
489         (WebCore::WebKitCSSKeyframesRule::length):
490         (WebCore::WebKitCSSKeyframesRule::item):
491         (WebCore::WebKitCSSKeyframesRule::insertRule):
492
493             Change isKeyframeRule() checks to assertions since we know
494             our rules are always WebKitCSSKeyframeRules. Also tidied up.
495
496 2011-10-14  Andreas Kling  <kling@webkit.org>
497
498         Unreviewed, actually remove StyleList.* after r97640.
499
500         * css/StyleList.cpp: Removed.
501         * css/StyleList.h: Removed.
502
503 2011-10-14  Andreas Kling  <kling@webkit.org>
504
505         Merge StyleList into StyleSheet.
506         https://bugs.webkit.org/show_bug.cgi?id=70100
507
508         Reviewed by Antti "printf" Koivisto.
509
510         Merge all functionality from StyleList into StyleSheet,
511         since StyleSheet was the only subclass of StyleList anyway.
512
513         Also removed FIXME's about throwing exceptions in CSSRuleList
514         since they were incorrect. The call sites already handle the
515         relevant cases.
516
517         * CMakeLists.txt:
518         * GNUmakefile.list.am:
519         * WebCore.gypi:
520         * WebCore.pro:
521         * WebCore.vcproj/WebCore.vcproj:
522         * WebCore.xcodeproj/project.pbxproj:
523         * bindings/js/JSCSSRuleListCustom.cpp:
524         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
525         * css/CSSRuleList.cpp:
526         (WebCore::CSSRuleList::CSSRuleList):
527         (WebCore::CSSRuleList::length):
528         (WebCore::CSSRuleList::item):
529         (WebCore::CSSRuleList::deleteRule):
530         (WebCore::CSSRuleList::append):
531         (WebCore::CSSRuleList::insertRule):
532         * css/CSSRuleList.h:
533         (WebCore::CSSRuleList::create):
534         (WebCore::CSSRuleList::styleSheet):
535         * css/StyleList.cpp: Removed.
536         * css/StyleList.h: Removed.
537         * css/StyleSheet.cpp:
538         (WebCore::StyleSheet::StyleSheet):
539         (WebCore::StyleSheet::append):
540         (WebCore::StyleSheet::insert):
541         (WebCore::StyleSheet::remove):
542         * css/StyleSheet.h:
543         (WebCore::StyleSheet::length):
544         (WebCore::StyleSheet::item):
545
546 2011-10-14  Mihnea Ovidenie  <mihnea@adobe.com>
547
548         [CSS Regions] Change -webkit-flow to -webkit-flow-into
549         https://bugs.webkit.org/show_bug.cgi?id=70014
550
551         Reviewed by David Hyatt.
552
553         1. -webkit-flow is renamed to -webkit-flow-into
554         2. -webkit-flow-into takes <ident> instead of strings
555
556         * css/CSSComputedStyleDeclaration.cpp:
557         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
558         * css/CSSParser.cpp:
559         (WebCore::CSSParser::parseValue):
560         (WebCore::validFlowName):
561         (WebCore::CSSParser::parseFlowThread):
562         * css/CSSPropertyNames.in:
563         * css/CSSStyleSelector.cpp:
564         (WebCore::CSSStyleSelector::applyProperty):
565
566 2011-10-12  Hans Wennborg  <hans@chromium.org>
567
568         IndexedDB: Remove SQLite backing store
569         https://bugs.webkit.org/show_bug.cgi?id=69620
570
571         Reviewed by Darin Fisher.
572
573         Remove the SQLite backing store implementation; it is not used anymore.
574         Also remove the maximumSize parameter, it is not used either.
575
576         No new functionality, so no new tests.
577
578         * GNUmakefile.list.am:
579         * WebCore.gypi:
580         * storage/IDBBackingStore.h:
581         * storage/IDBFactory.cpp:
582         (WebCore::IDBFactory::getDatabaseNames):
583         (WebCore::IDBFactory::open):
584         * storage/IDBFactoryBackendImpl.cpp:
585         (WebCore::computeFileIdentifier):
586         (WebCore::computeUniqueIdentifier):
587         (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
588         (WebCore::IDBFactoryBackendImpl::open):
589         (WebCore::IDBFactoryBackendImpl::openBackingStore):
590         * storage/IDBFactoryBackendImpl.h:
591         * storage/IDBFactoryBackendInterface.h:
592         * storage/IDBLevelDBBackingStore.cpp:
593         (WebCore::IDBLevelDBBackingStore::open):
594         * storage/IDBLevelDBBackingStore.h:
595         * storage/IDBSQLiteBackingStore.cpp: Removed.
596         * storage/IDBSQLiteBackingStore.h: Removed.
597
598 2011-10-14  Nikolas Zimmermann  <nzimmermann@rim.com>
599
600         Not reviewed. Fix mac builds. r97448 broke them.
601
602         * WebCore.xcodeproj/project.pbxproj: Set ImageBySizeCache.h role to private.
603
604 2011-10-14  Justin Schuh  <jschuh@chromium.org>
605
606         Clear WebMediaPlayerClientImpl back pointer on destruction
607         https://bugs.webkit.org/show_bug.cgi?id=69973
608
609         Reviewed by James Robinson.
610
611         Clear the backpointer and remove the unused m_currentFrame
612
613         * platform/graphics/chromium/VideoLayerChromium.cpp:
614         (WebCore::VideoLayerChromium::VideoLayerChromium):
615         (WebCore::VideoLayerChromium::cleanupResources):
616         (WebCore::VideoLayerChromium::updateCompositorResources):
617         (WebCore::VideoLayerChromium::releaseProvider):
618         * platform/graphics/chromium/VideoLayerChromium.h:
619
620 2011-10-13  Hans Wennborg  <hans@chromium.org>
621
622         IndexedDB: Make IDBCursor.value() return an IDBAny object
623         https://bugs.webkit.org/show_bug.cgi?id=70024
624
625         Reviewed by Tony Chang.
626
627         This is to work around the fact that the V8 bindings mechanism does
628         eager deserialization of SerializedScriptValue attributes. This means
629         that the value is fetched from the back-end only once, when the
630         IDBCursor is first wrapped. When the cursor's value changes, this is
631         not reflected.
632
633         We work around this by making IDBCursor.value() return the
634         SerializedScriptValue wrapped in an IDBAny object.
635
636         * storage/IDBCursor.cpp:
637         (WebCore::IDBCursor::value):
638         * storage/IDBCursor.h:
639         * storage/IDBCursorWithValue.idl:
640
641 2011-10-14  Rémi Duraffort  <remi.duraffort@st.com>
642
643         Fix compilation when the JS Debugger is disabled.
644         https://bugs.webkit.org/show_bug.cgi?id=70007
645
646         Reviewed by Antti Koivisto.
647
648         * inspector/InspectorInstrumentation.cpp:
649         (WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
650         * inspector/InspectorRuntimeAgent.cpp:
651         * inspector/InspectorRuntimeAgent.h:
652         * inspector/WorkerInspectorController.cpp:
653         * inspector/WorkerInspectorController.h:
654         * workers/WorkerMessagingProxy.cpp:
655         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
656         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
657
658 2011-10-13  Nikolas Zimmermann  <nzimmermann@rim.com>
659
660         Prepare SVGImage intrinsic size negotiation: Introduce an IntSize <-> SVGImage cache in CachedImage
661         https://bugs.webkit.org/show_bug.cgi?id=69416
662
663         Reviewed by Antti Koivisto.
664
665         Refactor ImageBySizeCache out of CSSImageGeneratorValue as CachedImage wants to use the same type of cache for its purposes.
666         When introducing the SVGImage intrinsic size negotiation the container size of an SVGImage is dependant on the place where
667         it gets embedded (eg width/height attributes of host documents <img> force a certain size).
668
669         Currently CachedImage only contains a single RefPtr<Image>, which it constructs out of the decoded data.
670         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>.
671         Consider the case where two RenderObjects use the same CachedImage, each with a different container size (200x100 vs 100x200) and the embedded
672         document contains a viewBox and some arbitary preserveAspectRatio settings. To honour these we have to relayout the document with the desired
673         size (percentual unit resolving etc, all depend on the RenderSVGRoots size).
674
675         With the current design this is hard to realize, w/o requring to relayout the embedded document for each embedder that uses an SVGImage.
676         This patch introduces a cache right within CachedImage, which manages a map of images to certain sizes, by utilizing the new ImageBySizeCache.
677
678         CachedImage::imageForRenderer() takes a RenderObject* parameter, which it uses to look up the last set image container size for a renderer.
679         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
680         new instance of SVGImage, filling it with the already decoded data, and passing on a fixed image container size, which overrides the
681         size that RenderSVGRoot reports, when computeReplacedLogicalWidth/Height is called and thus laying out the document at the desired size.
682         This image is then put in the cache for further reusability.
683
684         Likewise CachedImage::setContainerSizeForRenderer() now takes a RenderObject* parameter and stores that in the cache with an associated container size.
685         It requires to touch several files which use CachedImage throughout WebCore/WebKit/WebKit2.
686
687         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,
688         which will come with the master patch in bug 47156.
689
690         No new tests yet, as the new cache isn't turned on yet.
691
692         * CMakeLists.txt: Add rendering/ImageBySizeCache.* to build.
693         * GNUmakefile.list.am: Ditto.
694         * WebCore.gypi: Ditto.
695         * WebCore.pro: Ditto.
696         * WebCore.vcproj/WebCore.vcproj: Ditto.
697         * WebCore.xcodeproj/project.pbxproj: Ditto.
698         * accessibility/AccessibilityRenderObject.cpp:
699         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Use new CachedImage::imageSizeForRenderer(RenderObject*) method.
700         * bindings/objc/DOM.mm: Ditto (for CachedImage::image()).
701         (-[DOMElement image]):
702         (-[DOMElement _imageTIFFRepresentation]):
703         * bridge/qt/qt_pixmapruntime.cpp:
704         (JSC::Bindings::QtPixmapInstance::variantFromObject): Ditto (for CachedImage::image()).
705         * css/CSSCanvasValue.cpp: s/m_clients/clients()/, which now live in the ImageBySizeCache instead of CSSImageGeneratorValue.
706         (WebCore::CSSCanvasValue::canvasChanged):
707         (WebCore::CSSCanvasValue::canvasResized):
708         (WebCore::CSSCanvasValue::image):
709         * css/CSSGradientValue.cpp: Ditto.
710         (WebCore::CSSGradientValue::image):
711         * css/CSSImageGeneratorValue.cpp: Move the sizes/clients/images cache into a new ImageBySizeCache class, to make it usable for CachedImage as well.
712         (WebCore::CSSImageGeneratorValue::addClient): Adapt to move.
713         (WebCore::CSSImageGeneratorValue::removeClient): Ditto.
714         (WebCore::CSSImageGeneratorValue::getImage): Ditto.
715         (WebCore::CSSImageGeneratorValue::putImage): Ditto.
716         * css/CSSImageGeneratorValue.h:
717         (WebCore::CSSImageGeneratorValue::clients): Forwarded to the ImageBySizeCache.
718         * editing/DeleteButtonController.cpp: 
719         (WebCore::isDeletableElement): CachedImage::canRender() now takes a RenderObject* parameter.
720         * html/HTMLImageElement.cpp:
721         (WebCore::HTMLImageElement::width): Use new CachedImage::imageSizeForRenderer(RenderObject*) method.
722         (WebCore::HTMLImageElement::height): Ditto.
723         (WebCore::HTMLImageElement::naturalWidth): Ditto.
724         (WebCore::HTMLImageElement::naturalHeight): Ditto.
725         * html/ImageDocument.cpp:
726         (WebCore::ImageDocumentParser::finish): Ditto.
727         (WebCore::ImageDocument::scale): Ditto.
728         (WebCore::ImageDocument::resizeImageToFit): Ditto.
729         (WebCore::ImageDocument::imageUpdated): Ditto.
730         (WebCore::ImageDocument::restoreImageSize): Ditto.
731         (WebCore::ImageDocument::imageFitsInWindow): Ditto.
732         * html/canvas/CanvasRenderingContext.cpp:
733         (WebCore::CanvasRenderingContext::wouldTaintOrigin): Use new CachedImage::imageForRenderer(RenderObject*) method.
734         * html/canvas/CanvasRenderingContext2D.cpp:
735         (WebCore::isOriginClean): Ditto.
736         (WebCore::size): Ditto (for CachedImage::imageSizeForRenderer()).
737         (WebCore::CanvasRenderingContext2D::drawImage): Ditto.
738         (WebCore::CanvasRenderingContext2D::createPattern): Ditto.
739         * html/canvas/WebGLRenderingContext.cpp:
740         (WebCore::WebGLRenderingContext::texImage2D): Ditto.
741         (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
742         * loader/cache/CachedImage.cpp: Add currently _disabled_ cache for SVGImages. The intrinsic size negotiation will need to use multiple SVGImages
743         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
744         for them. The hash code is a 1:1 refactoring from the already present code in CSSImageGeneratorValue, now named 'ImageBySizeCache'.
745         (WebCore::CachedImage::lookupImageForSize): Looks up an Image from the cache for a given IntSize. Currently turned off.
746         (WebCore::CachedImage::lookupImageForRenderer): Looks up an Image from the cache for a given renderer. Currently turned off.
747         (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.
748         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.
749         When an SVGImage is first created by CachedImage::createImage() and stored in m_image, the cache remains empty.
750
751         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
752         which is immediately passed to the SVGImage after its creation. This SVGImage is put in the ImageBySizeCache associated with a container size of 30x70.
753         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
754         created by lookupOrCreateImageForRenderer() associated with the 30x70 container. The first SVGImage::size() will return a value as defined in the referenced foo.svg,
755         whereas the SVGImage::size() call of the new SVGImage living in the cache reports 30x70 and renders according to that.
756
757         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
758         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.
759         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.
760         There is no logical change induced for non-SVGImage derived images.
761
762         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.
763         Luckily these information are already present in StyleCachedImage/StyleImage & friends and only need to be added for some additional methods.
764         (WebCore::CachedImage::image): FIXME
765         (WebCore::CachedImage::imageForRenderer): Call lookupOrCreateImageForRenderer() instead of returning m_image, if it's not null. Its a no-op for non SVGImage derived objects.
766         (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.
767                                                              This does NOT create the SVGImage yet, this is delayed until imageForRenderer() is called for a given renderer that wants this size.
768         (WebCore::CachedImage::imageSize): Don't operate on m_image, ask lookupImageForRenderer() with the incoming renderer.
769         (WebCore::CachedImage::imageRect): Ditto.
770         (WebCore::CachedImage::clear): Force clearing the m_svgImageCache.
771         (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.
772         (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.
773                                                     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.
774         (WebCore::CachedImage::decodedSizeChanged): Don't operate on m_image, ask lookupImageForRenderer() with the incoming renderer.
775         (WebCore::CachedImage::didDraw): Ditto.
776         (WebCore::CachedImage::shouldPauseAnimation): Ditto.
777         (WebCore::CachedImage::animationAdvanced): Ditto.
778         (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!)
779         * loader/cache/CachedImage.h: imageForRenderer/canRender/setContainerSizeForRenderer/imageSizeForRenderer now all take a RenderObject* parameter to identifiy the current user of the image.
780         (WebCore::CachedImage::canRender): Pass on the incoming renderer to imageSizeForRenderer().
781         * page/DragController.cpp:
782         (WebCore::getImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
783         * page/EventHandler.cpp:
784         (WebCore::EventHandler::selectCursor): Ditto.
785         * page/PageSerializer.cpp:
786         (WebCore::PageSerializer::serializeFrame): Ditto.
787         (WebCore::PageSerializer::addImageToResources): Ditto.
788         (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration): Ditto.
789         * page/PageSerializer.h:
790         * platform/chromium/ClipboardChromium.cpp:
791         (WebCore::writeImageToDataObject): Ditto.
792         * platform/chromium/PasteboardChromium.cpp:
793         (WebCore::Pasteboard::writeImage): Ditto.
794         * platform/graphics/Image.h:
795         (WebCore::Image::isSVGImage): Add boolean helper to identify SVGImages, just like isBitmapImage().
796         * platform/gtk/ClipboardGtk.cpp:
797         (WebCore::ClipboardGtk::declareAndWriteDragImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
798         * platform/gtk/PasteboardGtk.cpp:
799         (WebCore::Pasteboard::writeImage): Ditto.
800         * platform/mac/HTMLConverter.mm:
801         (fileWrapperForElement): Ditto.
802         * platform/mac/PasteboardMac.mm:
803         (WebCore::Pasteboard::writeImage): Ditto.
804         * platform/qt/ClipboardQt.cpp:
805         (WebCore::ClipboardQt::declareAndWriteDragImage): Ditto.
806         * platform/qt/PasteboardQt.cpp:
807         (WebCore::Pasteboard::writeImage): Ditto.
808         * platform/win/ClipboardWin.cpp:
809         (WebCore::writeImageToDataObject): Ditto.
810         * platform/win/PasteboardWin.cpp:
811         (WebCore::Pasteboard::writeImage): Ditto.
812         * platform/wince/PasteboardWinCE.cpp:
813         (WebCore::Pasteboard::writeImage): Ditto.
814         * rendering/HitTestResult.cpp:
815         (WebCore::HitTestResult::image): Ditto.
816         * rendering/ImageBySizeCache.cpp: Copied from WebCore/css/CSSImageGeneratorValue.cpp, to preserve history for the original cache code.
817         (WebCore::ImageBySizeCache::ImageBySizeCache): Straight copy from CSSImageGeneratorValue, renamed to ImageBySizeCache, removing all but the cache relevant code.
818         (WebCore::ImageBySizeCache::addClient): Ditto.
819         (WebCore::ImageBySizeCache::removeClient): Ditto.
820         (WebCore::ImageBySizeCache::getImage): Ditto.
821         (WebCore::ImageBySizeCache::putImage): Ditto.
822         (WebCore::ImageBySizeCache::clear): New function, that clears the cache, introduced for the needs of CachedImage.
823         (WebCore::ImageBySizeCache::imageForSize): New function to query an Image* for a given IntSize, introduced for the needs of CachedImage.
824         (WebCore::ImageBySizeCache::sizeForClient): New function to query an IntSize for a given renderer.
825         * rendering/ImageBySizeCache.h: Copied from WebCore/css/CSSImageGeneratorValue.h.
826         (WebCore::ImageBySizeCache::clients):
827         * rendering/InlineFlowBox.cpp:
828         (WebCore::InlineFlowBox::paintFillLayer): CachedImage::canRender() now takes a RenderObject* parameter.
829         (WebCore::InlineFlowBox::paintBoxDecorations): Ditto.
830         (WebCore::InlineFlowBox::paintMask): Ditto.
831         * rendering/RenderBox.cpp:
832         (WebCore::RenderBox::paintMaskImages): Ditto.
833         (WebCore::RenderBox::repaintLayerRectsForImage): Ditto.
834         * rendering/RenderBoxModelObject.cpp:
835         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Ditto.
836         (WebCore::RenderBoxModelObject::calculateFillTileSize): Ditto (for CachedImage::setContainerSizeForRenderer()).
837         (WebCore::RenderBoxModelObject::paintNinePieceImage): Ditto.
838         * rendering/RenderImage.cpp:
839         (WebCore::RenderImage::imageSizeForError): Use new CachedImage::imageForRenderer(RenderObject*) method.
840         (WebCore::RenderImage::setImageSizeForAltText): Ditto.
841         (WebCore::RenderImage::computeReplacedLogicalWidth): FIXME
842         * rendering/RenderImageResource.cpp:
843         (WebCore::RenderImageResource::setContainerSizeForRenderer): Pass on m_renderer to CachedImage::setContainerSizeForRenderer().
844         * rendering/RenderImageResource.h: Remove constness from setContainerSizeForRenderer.
845         (WebCore::RenderImageResource::image): Pass on m_renderer to CachedImage::image().
846         (WebCore::RenderImageResource::imageSize): Pass on m_renderer to CachedImage::imageSizeForRenderer().
847         * rendering/RenderImageResourceStyleImage.h:
848         (WebCore::RenderImageResourceStyleImage::setContainerSizeForRenderer): Remove constness, pass on m_renderer to StyleImage::setContainerSizeForRenderer().
849         * rendering/RenderLayerBacking.cpp:
850         (WebCore::RenderLayerBacking::isDirectlyCompositedImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
851         (WebCore::RenderLayerBacking::updateImageContents): Ditto.
852         * rendering/RenderListMarker.cpp:
853         (WebCore::RenderListMarker::computePreferredLogicalWidths): CachedImage::setContainerSizeForRenderer() now takes a RenderObject* parameter.
854         * rendering/RenderObject.cpp:
855         (WebCore::mustRepaintFillLayers): CachedImage::canRender() now takes a RenderObject* parameter.
856         (WebCore::RenderObject::borderImageIsLoadedAndCanBeRendered): Ditto.
857         * rendering/style/StyleCachedImage.cpp:
858         (WebCore::StyleCachedImage::canRender): Pass on incoming renderer to CachedImage::canRender().
859         (WebCore::StyleCachedImage::imageSize): Pass on incoming renderer to CachedImage::imageSizeForRenderer().
860         (WebCore::StyleCachedImage::setContainerSizeForRenderer): Pass on incoming renderer to CachedImage::setContainerSizeForRenderer().
861         (WebCore::StyleCachedImage::addClient): Remove unneeded return statment in void method.
862         (WebCore::StyleCachedImage::removeClient): Ditto.
863         (WebCore::StyleCachedImage::image): Pass on incoming renderer to CachedImage::image().
864         * rendering/style/StyleCachedImage.h: Add RenderObject* parameter to canRender()/setContainerSizeForRenderer(). image() already has one, that was unused so far.
865         * rendering/style/StyleGeneratedImage.cpp: Inlined setContainerSizeForRenderer.
866         * rendering/style/StyleGeneratedImage.h: 
867         (WebCore::StyleGeneratedImage::setContainerSizeForRenderer): Add RenderObject* parameter.
868         * rendering/style/StyleImage.h:
869         (WebCore::StyleImage::canRender): Ditto.
870         * rendering/style/StylePendingImage.h:
871         (WebCore::StylePendingImage::setContainerSizeForRenderer): Ditto.
872         * svg/SVGFEImageElement.cpp:
873         (WebCore::SVGFEImageElement::build): Use new CachedImage::imageForRenderer(RenderObject*) method.
874         * svg/graphics/SVGImage.cpp: Cleanup file, the include hack seems not needed anymore.
875         (WebCore::SVGImage::setContainerSize): s/LayoutSize/IntSize/ to match the code in platform/.
876         * svg/graphics/SVGImage.h: Ditto.
877         (WebCore::SVGImage::isSVGImage): Return true.
878
879 2011-10-13  Kenichi Ishibashi  <bashi@chromium.org>
880
881         [Chromium] Uninitialized read in WebCore::*Font* / HB_GSUB_Select_Feature
882         https://bugs.webkit.org/show_bug.cgi?id=70087
883
884         Reviewed by Kent Tamura.
885
886         Initialize local variables in ComplexTextControllerLinux::setupfontFeatures.
887
888         No new tests because there is no behavior change. Manually tested with valgrind.
889
890         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
891         (WebCore::setupFontFeatures):
892
893 2011-10-13  Csaba Osztrogonác  <ossy@webkit.org>
894
895         [Qt][Win] Unreviewed buildfix after r97433.
896
897         * platform/MemoryPressureHandler.h: Add a missing include.
898
899 2011-10-13  Adam Barth  <abarth@webkit.org>
900
901         Spelling error in v8WebSocket::constructorCallback error
902         https://bugs.webkit.org/show_bug.cgi?id=63943
903
904         Reviewed by Kent Tamura.
905
906         Fix typo.
907
908         * bindings/v8/custom/V8WebSocketCustom.cpp:
909         (WebCore::V8WebSocket::constructorCallback):
910
911 2011-10-13  Mark Hahnenberg  <mhahnenberg@apple.com>
912
913         Rename virtual getConstructData to getConstructDataVirtual
914         https://bugs.webkit.org/show_bug.cgi?id=69872
915
916         Reviewed by Geoffrey Garen.
917
918         No new tests.
919
920         Renamed virtual getConstructData functions to getConstructDataVirtual to 
921         avoid conflicts when we add static getConstructData to the MethodTable.
922
923         * WebCore.exp.in:
924         * bindings/js/JSAudioConstructor.cpp:
925         (WebCore::JSAudioConstructor::getConstructDataVirtual):
926         * bindings/js/JSAudioConstructor.h:
927         * bindings/js/JSImageConstructor.cpp:
928         (WebCore::JSImageConstructor::getConstructDataVirtual):
929         * bindings/js/JSImageConstructor.h:
930         * bindings/js/JSOptionConstructor.cpp:
931         (WebCore::JSOptionConstructor::getConstructDataVirtual):
932         * bindings/js/JSOptionConstructor.h:
933         * bindings/js/ScriptFunctionCall.cpp:
934         (WebCore::ScriptFunctionCall::construct):
935         * bindings/scripts/CodeGeneratorJS.pm:
936         (GenerateConstructorDeclaration):
937         (GenerateConstructorDefinition):
938         * bindings/scripts/test/JS/JSTestInterface.cpp:
939         (WebCore::JSTestInterfaceConstructor::getConstructDataVirtual):
940         * bridge/runtime_object.cpp:
941         (JSC::Bindings::RuntimeObject::getConstructDataVirtual):
942         * bridge/runtime_object.h:
943
944 2011-10-13  Simon Fraser  <simon.fraser@apple.com>
945
946         Remove #include of <QuartzCore/QuartzCore.h> in a widely-used header.
947
948         Reviewed by Sam Weinig.
949
950         * platform/PlatformScreen.h: Typedef PlatformDisplayID to a uint32_t.
951         * platform/graphics/DisplayRefreshMonitor.h: Typedef CVDisplayLinkRef as
952         an opaque type to avoid bringing in QuartzCore.h, and move displayLinkCallback
953         to the .cpp file since it uses Core Video types.
954         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
955         (WebCore::displayLinkCallback): Make this a local static function, that
956         calls a member fuction on the object.
957         (WebCore::DisplayRefreshMonitor::requestRefreshCallback):
958         (WebCore::DisplayRefreshMonitor::displayLinkFired):
959
960 2011-10-13  Michael Saboff  <msaboff@apple.com>
961
962         REGRESSION: High frequency memory warnings cause Safari to hog the CPU doing useless garbage collection
963         https://bugs.webkit.org/show_bug.cgi?id=69774
964
965         Throttle the processing of memory pressure events to no more often than once every 5 seconds.
966
967         Reviewed by Geoffrey Garen.
968
969         No new tests.
970
971         * platform/MemoryPressureHandler.cpp:
972         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
973         * platform/MemoryPressureHandler.h:
974         * platform/mac/MemoryPressureHandlerMac.mm:
975         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
976
977 2011-10-13  Kentaro Hara  <haraken@chromium.org>
978
979         Implement an OverflowEvent constructor for V8
980         https://bugs.webkit.org/show_bug.cgi?id=70017
981
982         Reviewed by Adam Barth.
983
984         Test: fast/events/constructors/overflow-event-constructor.html
985
986         * bindings/v8/custom/V8EventConstructors.cpp: Added an OverflowEvent constructor.
987         * dom/OverflowEvent.idl: Replaced 'JSCustomConstructor' with 'CustomConstructor'.
988
989 2011-10-13  Anantanarayanan G Iyengar  <ananta@chromium.org>
990
991         https://bugs.webkit.org/show_bug.cgi?id=70064
992         
993         The NPObjectWrapper class used by V8 bindings in Chromium to wrap the window
994         script object was allocating an instance of itself in the NPAllocate
995         implementation and returning this pointer. It should be returning a pointer
996         to the wrapped NPObject structure (NPProxyObject). The member function
997         getUnderlyingNPObject should return 0 if we fail to find the underlying NPObject
998         for the call. It was incorrectly returning a pointer to the same NPObject in
999         this case which could cause recursion. 
1000
1001         Reviewed by Nate Chapin.
1002
1003         No new tests as there is no change in functionality.
1004
1005         * bindings/v8/NPObjectWrapper.cpp:
1006         (WebCore::NPObjectWrapper::getObjectForCall):
1007         (WebCore::NPObjectWrapper::NPAllocate):
1008         * bindings/v8/NPObjectWrapper.h:
1009
1010 2011-10-13  Arthur Hsu  <arthurhsu@chromium.org>
1011
1012         Ensure font loaded before calling Skia to drawPosText in Chrome sandbox
1013         https://bugs.webkit.org/show_bug.cgi?id=69370
1014
1015         Reviewed by James Robinson.
1016
1017         * platform/graphics/chromium/FontChromiumWin.cpp:
1018         (WebCore::Font::drawGlyphs):
1019
1020 2011-10-13  Kentaro Hara  <haraken@chromium.org>
1021
1022         Regarding constructor, replace [ConstructorWith=...] IDL with [CallWith=...] IDL
1023         https://bugs.webkit.org/show_bug.cgi?id=69801
1024
1025         As for constructors, [ConstructorWith=...] has the same meaning as [CallWith=...].
1026         We should deprecate [ConstructorWith=...]. This is a clean-up bug for the bug 65839.
1027
1028         Reviewed by Adam Barth.
1029
1030         No new tests, since no change in behavior.
1031
1032         * bindings/scripts/CodeGeneratorV8.pm: Replaced [ConstructorWith=...] IDL with [CallWith=...] IDL.
1033         (GenerateConstructorCallback):
1034         * bindings/scripts/test/TestInterface.idl: Ditto.
1035         * fileapi/FileReader.idl: Ditto.
1036         * p2p/PeerConnection.idl: Ditto.
1037         * page/EventSource.idl: Ditto.
1038         * workers/Worker.idl: Ditto.
1039
1040 2011-10-13  Kentaro Hara  <haraken@chromium.org>
1041
1042         Constructor should not be called if the object is being constructed inside WebCore
1043         https://bugs.webkit.org/show_bug.cgi?id=70015
1044
1045         Reviewed by Adam Barth.
1046
1047         Summary: A DOM object can be created from the JS context and from the WebCore context.
1048         Constructor should be called if the object is created from the JS context,
1049         but should not be called if the object is created from the WebCore context.
1050
1051         Details:
1052         - Expected behavior when the object is created from the JS context (e.g. "new Event()"):
1053         (1) V8XXXX::constructorCallback() is called.
1054         (2) V8XXXX::constructorCallback() calls XXXX::create().
1055         (3) XXXX::create() creates a C++ object.
1056         (4) V8XXXX::constructorCallback() calls toV8() for the C++ object.
1057         (5) toV8() wraps the C++ object and returns the wrapped JS object.
1058
1059         - Actual behavior when the object is created from the JS context (e.g. "new Event()"):
1060         As described above (1) - (5). That's fine!!
1061
1062         - Expected behavior when the object is created from the WebCore context.
1063         (e.g. "window.addEventListener("load", function (event) { ... });". In this case,
1064         the Event object is created inside the WebCore context):
1065         (1) WebCore calls XXXX::create().
1066         (2) XXXX::create() creates a C++ object.
1067         (3) WebCore calls toV8() for the C++ object.
1068         (4) toV8() wraps the C++ object and returns the wrapped JS object.
1069
1070         - Actual behavior when the object is created from the WebCore context.
1071         (e.g. "window.addEventListener("load", function (event) { ... });"):
1072         (1) WebCore calls XXXX::create().
1073         (2) XXXX::create() creates a C++ object.
1074         (3) WebCore calls toV8() for the C++ object.
1075         (4) toV8() can call XXXX::constructorCallback(). (Whether or not toV8() calls
1076         XXXX::constructorCallback() depends on the implementation of toV8().)
1077         (5) V8XXXX::constructorCallback() calls XXXX::create().
1078         (6) XXXX::create() creates __another__ C++ object.
1079         (7) V8XXXX::constructorCallback() calls toV8() for the C++ object.
1080         (8) toV8() wraps the C++ object and returns the wrapped JS object.
1081
1082         This actual behavior definitely causes the following problems:
1083
1084         - Problem1: The object returned to JS is not the object created in (2)
1085         but the object created in (6). However, I do not yet know a test case that causes
1086         some visible bug because of this problem.
1087
1088         - Problem2: In (4), XXXX::constructorCallback() can be called with no argument.
1089         If XXXX::constructorCallback() expects at least one argument, XXXX::constructorCallback()
1090         throws TypeError, resulting in crash. For example, Event caused this problem
1091         when I implemented constructor for Event. Based on the discussion with Dominicc,
1092         we solved this problem by adding the following two lines of code to Event::constructorCallback()
1093         (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):
1094
1095         XXXX::constructorCallback(...) {
1096             ...;
1097             if (AllowAllocation::current())
1098                 return args.Holder();
1099             ...;
1100         }
1101
1102         This if check means "XXXX::constructorCallback() returns immediately if it is called
1103         from the WebCore context".
1104
1105         With these observations, we think that all constructorCallback() should have the above
1106         if check. This patch adds the if check to CodeGeneratorV8.pm. After this patch is landed,
1107         I would like to add the if check to all existing custom V8 constructors.
1108
1109         No new tests, since we could not find a test case that causes some visible bug without the if check.
1110
1111         * bindings/scripts/CodeGeneratorV8.pm:
1112         (GenerateConstructorCallback): Generates a constructor so that it returns immediately without doing anything if the constructor is called from the WebCore context.
1113         * bindings/scripts/test/V8/V8TestInterface.cpp: Updated the result.
1114         (WebCore::V8TestInterface::constructorCallback):
1115         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
1116         (WebCore::V8TestObj::constructorCallback):
1117
1118 2011-10-13  Kentaro Hara  <haraken@chromium.org>
1119
1120         Implement a BeforeLoadEvent constructor for V8
1121         https://bugs.webkit.org/show_bug.cgi?id=69980
1122
1123         Reviewed by Adam Barth.
1124
1125         Test: fast/events/constructors/before-load-event-constructor.html
1126
1127         * bindings/v8/custom/V8EventConstructors.cpp: Added a BeforeLoadEvent constructor.
1128         * dom/BeforeLoadEvent.idl: Replaced 'JSCustomConstructor' with 'CustomConstructor'.
1129
1130 2011-10-13  Joshua Bell  <jsbell@chromium.org>
1131
1132         make IDBFactory.open wait for pending setVersion transactions to complete
1133         https://bugs.webkit.org/show_bug.cgi?id=69307
1134
1135         Reviewed by Tony Chang.
1136
1137         Added a queue of pending open calls, similar to the queue of pending
1138         setVersion calls. Ensure pending calls are processed in the correct
1139         order when transactions complete.
1140
1141         Tests: storage/indexeddb/open-close-version.html
1142                storage/indexeddb/two-version-changes.html
1143                storage/indexeddb/version-change-exclusive.html
1144
1145         * storage/IDBDatabaseBackendImpl.cpp:
1146         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create):
1147         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::callbacks):
1148         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall):
1149         (WebCore::IDBDatabaseBackendImpl::setVersion):
1150         (WebCore::IDBDatabaseBackendImpl::transactionStarted):
1151         (WebCore::IDBDatabaseBackendImpl::transactionFinished):
1152         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
1153         (WebCore::IDBDatabaseBackendImpl::openConnection):
1154         (WebCore::IDBDatabaseBackendImpl::close):
1155         * storage/IDBDatabaseBackendImpl.h:
1156         * storage/IDBFactoryBackendImpl.cpp:
1157         (WebCore::IDBFactoryBackendImpl::open):
1158         * storage/IDBTransactionBackendImpl.cpp:
1159         (WebCore::IDBTransactionBackendImpl::abort):
1160         (WebCore::IDBTransactionBackendImpl::start):
1161         (WebCore::IDBTransactionBackendImpl::commit):
1162
1163 2011-10-13  Chris Marrin  <cmarrin@apple.com>
1164
1165         Fix Leopard build
1166
1167         Unreviewed.
1168
1169         * platform/graphics/DisplayRefreshMonitor.h: Added.
1170
1171 2011-10-12  Chris Marrin  <cmarrin@apple.com>
1172
1173         Sync requestAnimationFrame callback to CVDisplayLink on Mac
1174         https://bugs.webkit.org/show_bug.cgi?id=68911
1175
1176         Reviewed by Simon Fraser.
1177
1178         Test: fast/animation/request-animation-frame-iframe.html
1179
1180         Implement CVDisplayLink which checks to see if any scheduleAnimation requests
1181         have come in. If so, remember the timestamp and do a callOnMainThread to fire
1182         the callbacks. A DisplayRefreshMonitorManager is a singleton which has a list
1183         of DisplayRefreshMonitors, one for each display. Each monitor has one or more
1184         DisplayRefreshMonitorClients, which is a abstract virtual class implemented
1185         by ScriptAnimationController. When an animation is scheduled, the
1186         displayRefreshFired method is called on the client, which in turn calls the
1187         requestAnimationFrame callbacks. 
1188
1189         DisplayRefreshMonitor and therefore the CVDisplayLink it owns is discarded
1190         when it no longer has any clients. This minimizes the number of concurrent
1191         CVDisplayLink threads.
1192
1193         * WebCore.exp.in:
1194         * WebCore.xcodeproj/project.pbxproj:
1195         * dom/Document.cpp:
1196         (WebCore::Document::windowScreenDidChange):
1197         (WebCore::Document::webkitRequestAnimationFrame):
1198         * dom/Document.h:
1199         * dom/ScriptedAnimationController.cpp:
1200         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
1201         (WebCore::ScriptedAnimationController::windowScreenDidChange):
1202         (WebCore::ScriptedAnimationController::scheduleAnimation):
1203         * dom/ScriptedAnimationController.h:
1204         (WebCore::ScriptedAnimationController::displayRefreshFired):
1205         * page/Page.cpp:
1206         (WebCore::Page::Page):
1207         (WebCore::Page::windowScreenDidChange):
1208         * page/Page.h:
1209         (WebCore::Page::displayID):
1210         * platform/PlatformScreen.h:
1211         * platform/graphics/DisplayRefreshMonitor.cpp: Added.
1212         (WebCore::DisplayRefreshMonitorClient::DisplayRefreshMonitorClient):
1213         (WebCore::DisplayRefreshMonitorClient::~DisplayRefreshMonitorClient):
1214         (WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded):
1215         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
1216         (WebCore::DisplayRefreshMonitor::refreshDisplayOnMainThread):
1217         (WebCore::DisplayRefreshMonitorManager::sharedManager):
1218         (WebCore::DisplayRefreshMonitorManager::findMonitor):
1219         (WebCore::DisplayRefreshMonitorManager::registerClient):
1220         (WebCore::DisplayRefreshMonitorManager::unregisterClient):
1221         (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
1222         (WebCore::DisplayRefreshMonitorManager::windowScreenDidChange):
1223         * platform/graphics/DisplayRefreshMonitor.h: Added.
1224         (WebCore::DisplayRefreshMonitorClient::scheduleAnimation):
1225         (WebCore::DisplayRefreshMonitor::hasClients):
1226         (WebCore::DisplayRefreshMonitor::addClient):
1227         (WebCore::DisplayRefreshMonitor::removeClient):
1228         (WebCore::DisplayRefreshMonitor::displayID):
1229         (WebCore::DisplayRefreshMonitorManager::DisplayRefreshMonitorManager):
1230         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp: Added.
1231         (WebCore::DisplayRefreshMonitor::displayLinkCallback):
1232         (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor):
1233         (WebCore::DisplayRefreshMonitor::scheduleAnimation):
1234
1235 2011-10-13  Abhishek Arya  <inferno@chromium.org>
1236
1237         Unreviewed. Qt compile fix.
1238
1239         * css/CSSFontFaceSource.cpp: include Document.h.
1240
1241 2011-10-12  Abhishek Arya  <inferno@chromium.org>
1242
1243         Register custom fonts at their creation time,  
1244         rather than at retirement time.
1245         https://bugs.webkit.org/show_bug.cgi?id=68929
1246
1247         Reviewed by Dan Bernstein.
1248
1249         Test: fast/text/custom-font-data-crash2.html
1250
1251         * css/CSSFontFace.cpp:
1252         * css/CSSFontFace.h: remove function added in r94508,
1253         which is no longer needed. We now register custom fonts
1254         at creation time.
1255         * css/CSSFontFaceSource.cpp:
1256         (WebCore::CSSFontFaceSource::pruneTable): no longer need
1257         to delete/retire font data here, it will be handled in ~Document.
1258         (WebCore::CSSFontFaceSource::getFontData): register custom
1259         font to document's m_customFonts.
1260         * css/CSSFontSelector.cpp:
1261         * css/CSSFontSelector.h: remove function added in r94508,
1262         which is no longer needed. We now register custom fonts
1263         at creation time.
1264         * css/CSSSegmentedFontFace.cpp:
1265         (WebCore::CSSSegmentedFontFace::pruneTable): no longer need
1266         to delete/retire font data here, it will be handled in ~Document.
1267         (WebCore::CSSSegmentedFontFace::getFontData): register custom
1268         font to document's m_customFonts.
1269         * dom/Document.cpp: Change function names to registerCustomFont
1270         , deleteCustomFonts and local to m_customFont.
1271         (WebCore::Document::~Document):
1272         (WebCore::Document::recalcStyle): yanking out the comment. We
1273         no longer keep retired custom fonts. We clear all custom fonts
1274         on Document destruction.
1275         (WebCore::Document::registerCustomFont): 
1276         (WebCore::Document::deleteCustomFonts):
1277         * dom/Document.h:
1278
1279 2011-10-13  Ryosuke Niwa  <rniwa@webkit.org>
1280
1281         Crash in DeleteSelectionCommand::handleGeneralDelete
1282         https://bugs.webkit.org/show_bug.cgi?id=70045
1283
1284         Reviewed by Darin Adler.
1285
1286         Exit early when m_upstreamStart is null.
1287
1288         No new tests because we don't have a reduction.
1289
1290         * editing/DeleteSelectionCommand.cpp:
1291         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1292
1293 2011-10-13  David Hyatt  <hyatt@apple.com>
1294
1295         https://bugs.webkit.org/show_bug.cgi?id=70049
1296         
1297         [CSS Regions] Add a test of a float being pushed down because it can't fit
1298         next to another float and make sure it re-evaluates its position when it changes
1299         regions as a result of the push.
1300
1301         Reviewed by Sam Weinig.
1302
1303         Added new test in fast/regions.
1304
1305         * rendering/RenderBlock.cpp:
1306         (WebCore::RenderBlock::computeLogicalLocationForFloat):
1307
1308 2011-10-13  Adam Barth  <abarth@webkit.org>
1309
1310         Move XSTL to script-src in Content-Security-Policy
1311         https://bugs.webkit.org/show_bug.cgi?id=63637
1312
1313         Reviewed by Eric Seidel.
1314
1315         The spec was unclear about how to treat XSLT.  My reading was that they
1316         should fall under style-src, but further discussion on the mailing list
1317         settled on using script-src because an XSLT can inject arbitrary DOM
1318         and script into a page, which is more risky than including style.
1319
1320         Tests: http/tests/security/contentSecurityPolicy/xsl-unaffected-by-style-src-1.php
1321                http/tests/security/contentSecurityPolicy/xsl-unaffected-by-style-src-2.php
1322
1323         * loader/cache/CachedResourceLoader.cpp:
1324         (WebCore::CachedResourceLoader::canRequest):
1325
1326 2011-10-13  Zeno Albisser  <zeno.albisser@nokia.com>
1327
1328         [Qt] QtWebKit build error for Mac 32bit
1329         https://bugs.webkit.org/show_bug.cgi?id=69914
1330
1331         In WebCore.pro and QtWebKit.pro we define NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
1332         when compiling with ENABLE_VIDEO and with WTF_USE_QTKIT.
1333         But this is meant to be defined in NSGeometry.h under certain preconditions.
1334         Without setting NS_BUILD_32_LIKE_64 none of these preconditions is
1335         met and therefore NSGeometry.h will create several conflicting type definitions.
1336
1337         With this patch we create consistent definitions again.
1338         Due to the order of include files we cannot remove
1339         NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES from WebCore.pro.
1340
1341         Reviewed by Andreas Kling.
1342
1343         * WebCore.pro:
1344
1345 2011-10-13  Tom Hudson  <tomhudson@google.com>
1346
1347         Revert border radius clips (r95239) for Chromium due to performance issues. Update test expectations to skip border radius clip layout tests.
1348         https://bugs.webkit.org/show_bug.cgi?id=69844
1349
1350         Reviewed by Simon Fraser.
1351
1352         * rendering/RenderLayer.cpp:
1353         (WebCore::RenderLayer::clipToRect): Only process border radius clips #if !PLATFORM(CHROMIUM)
1354
1355 2011-10-13  Julien Chaffraix  <jchaffraix@webkit.org>
1356
1357         Deprecate event.layerX and event.layerY in WebKit
1358         https://bugs.webkit.org/show_bug.cgi?id=69951
1359
1360         Reviewed by Darin Adler.
1361
1362         layerX and layerY were concepts of the old Netscape code that stayed
1363         in WebKit for a long time without changes. Now the code is completely
1364         wrong and Mozilla has expressed some interest in removing it from their
1365         API too.
1366
1367         This is a first step in the removal as layerX and layerY are exposed
1368         in some APIs. Chromium and Win are fine with removing the property
1369         directly, but ObjC needs to deprecate them first.
1370
1371         * bindings/objc/PublicDOMInterfaces.h: Mark the API as deprecated.
1372
1373         * dom/MouseRelatedEvent.cpp:
1374         (WebCore::MouseRelatedEvent::layerX):
1375         (WebCore::MouseRelatedEvent::layerY):
1376         * dom/UIEvent.cpp:
1377         (WebCore::UIEvent::layerX):
1378         (WebCore::UIEvent::layerY):
1379         Added a call to warnDeprecatedLayerXYUsage in the previous functions.
1380
1381         (WebCore::UIEvent::warnDeprecatedLayerXYUsage): Print a warning in the
1382         console about the removal of event.layerX and event.layerY in the near future.
1383
1384         * dom/UIEvent.h: Added warnDeprecatedLayerXYUsage.
1385
1386 2011-10-03  Robert Hogan  <robert@webkit.org>
1387
1388         CSS 2.1 failure: inline-replaced-height-008.htm
1389         https://bugs.webkit.org/show_bug.cgi?id=69273
1390
1391         Reviewed by Simon Fraser.
1392
1393         Test: css2.1/20110323/inline-block-replaced-height-008.html
1394
1395         Per http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height,  if 'height' has computed value of 
1396         'auto', the replaced element has an intrinsic ratio and its used width is known or resolved, then 
1397         the used value of 'height' is determined by the equation (used width) / (intrinsic ratio).
1398
1399         * rendering/RenderImage.cpp:
1400         (WebCore::RenderImage::computeReplacedLogicalHeight):
1401         * rendering/RenderReplaced.h:
1402
1403 2011-10-13  Sheriff Bot  <webkit.review.bot@gmail.com>
1404
1405         Unreviewed, rolling out r97362.
1406         http://trac.webkit.org/changeset/97362
1407         https://bugs.webkit.org/show_bug.cgi?id=70039
1408
1409         Relies on V8 APIs that have been reverted upstream. (Requested
1410         by dglazkov on #webkit).
1411
1412         * English.lproj/localizedStrings.js:
1413         * bindings/js/ScriptProfiler.cpp:
1414         * bindings/js/ScriptProfiler.h:
1415         * bindings/v8/ScriptProfiler.cpp:
1416         * bindings/v8/ScriptProfiler.h:
1417         * inspector/Inspector.json:
1418         * inspector/InspectorController.cpp:
1419         (WebCore::InspectorController::InspectorController):
1420         * inspector/InspectorProfilerAgent.cpp:
1421         (WebCore::InspectorProfilerAgent::create):
1422         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
1423         * inspector/InspectorProfilerAgent.h:
1424         * inspector/front-end/DetailedHeapshotGridNodes.js:
1425         (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.hoverMessage):
1426         (WebInspector.HeapSnapshotGenericObjectNode):
1427         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
1428         (WebInspector.HeapSnapshotGenericObjectNode.prototype.hoverMessage):
1429         (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
1430         * inspector/front-end/DetailedHeapshotView.js:
1431         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopover):
1432         * inspector/front-end/HeapSnapshot.js:
1433         (WebInspector.HeapSnapshot.prototype._init):
1434         (WebInspector.HeapSnapshot.prototype.dispose):
1435         (WebInspector.HeapSnapshot.prototype.updateStaticData):
1436         (WebInspector.HeapSnapshotNodesProvider.prototype._serialize):
1437         * inspector/front-end/HeapSnapshotProxy.js:
1438         * inspector/front-end/RemoteObject.js:
1439         * inspector/front-end/heapProfiler.css:
1440
1441 2011-10-13  David Hyatt  <hyatt@apple.com>
1442
1443         https://bugs.webkit.org/show_bug.cgi?id=69932
1444         
1445         Layout repainting messed up for objects in regions. There were two bugs here.
1446         The first is that the regionOverflowRect needs to at least be the size of the 
1447         region's rect. When you're in the middle of layout, you haven't computed the
1448         overflow rect for the flow thread yet (the flow thread's height could even be 0),
1449         and so you just need to enforce a minimum size. Also removed the region-overflow:break
1450         clipping behavior, since it was established that was wrong.
1451         
1452         The second bug is that when you tell a region to repaint, you need to disable layout state,
1453         since applying layout deltas from the flow thread makes no sense. The region is in a totally
1454         different place in the render tree, so the current flow thread layout state can't be used
1455         to determine your coordinate offset.
1456
1457         Reviewed by Dan Bernstein.
1458
1459         Added fast/repaint test.
1460
1461         * rendering/RenderFlowThread.cpp:
1462         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1463         * rendering/RenderRegion.cpp:
1464         (WebCore::RenderRegion::regionOverflowRect):
1465
1466 2011-10-13  Renata Hodovan  <reni@webkit.org>
1467
1468         FEComponentTransfer element doesn't support dynamic invalidation
1469         https://bugs.webkit.org/show_bug.cgi?id=69747
1470
1471         The dynamic changes are captured by the svgAttributeChange() function, and
1472         invalidate the filter primitive if necessary.
1473         invalidateFilterPrimitiveParent() is a new free function in
1474         SVGFilterPrimitiveStanardAttributes what makes the invalidation possible
1475         by objects not inherited from SVGFilterPrimitiveStanardAttributes too.
1476         This solution was used in SVGFEMergeNodeElement::svgAttributeChanged()
1477         previously and now it can use this new function too.
1478
1479         Reviewed by Nikolas Zimmermann.
1480
1481         Tests: svg/dynamic-updates/SVGFEComponentTransferElement-dom-amplitude-attr.html
1482                svg/dynamic-updates/SVGFEComponentTransferElement-dom-exponent-attr.html
1483                svg/dynamic-updates/SVGFEComponentTransferElement-dom-intercept-attr.html
1484                svg/dynamic-updates/SVGFEComponentTransferElement-dom-offset-attr.html
1485                svg/dynamic-updates/SVGFEComponentTransferElement-dom-slope-attr.html
1486                svg/dynamic-updates/SVGFEComponentTransferElement-dom-tableValues-attr.html
1487                svg/dynamic-updates/SVGFEComponentTransferElement-dom-type-attr.html
1488                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-amplitude-prop.html
1489                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-exponent-prop.html
1490                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-intercept-prop.html
1491                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-offset-prop.html
1492                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-slope-prop.html
1493                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-tableValues-prop.html
1494                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-type-prop.html
1495
1496         * svg/SVGComponentTransferFunctionElement.cpp:
1497         (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged):
1498         * svg/SVGComponentTransferFunctionElement.h:
1499         * svg/SVGFEComponentTransferElement.cpp:
1500         (WebCore::SVGFEComponentTransferElement::build):
1501         * svg/SVGFEMergeNodeElement.cpp:
1502         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged):
1503         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1504         (WebCore::invalidateFilterPrimitiveParent):
1505         * svg/SVGFilterPrimitiveStandardAttributes.h:
1506
1507 2011-10-13  Deepak Sherveghar  <bpwv64@motorola.com>
1508
1509         REGRESSION (r95381): Standalone video can be focused and draws a focus ring.
1510         https://bugs.webkit.org/show_bug.cgi?id=69097
1511
1512         Reviewed by Eric Carlson.
1513
1514         We don't want to focus a media element in a standalone document.
1515
1516         Test: fast/events/media-focus-in-standalone-media-document.html
1517
1518         * html/HTMLMediaElement.cpp:
1519         (WebCore::HTMLMediaElement::supportsFocus): return false if media element is in a standalone media document.
1520
1521 2011-10-13  Mikhail Naganov  <mnaganov@chromium.org>
1522
1523         Web Inspector: [Chromium] Add an ability to look up and explore an object from a heap profile.
1524         https://bugs.webkit.org/show_bug.cgi?id=61179
1525
1526         This is exteremely helpful when dealing with DOM wrappers, as
1527         their properties are mostly implemented with getters and thus not
1528         stored in heap snapshots.
1529
1530         Reviewed by Pavel Feldman.
1531
1532         * English.lproj/localizedStrings.js:
1533         * bindings/js/ScriptProfiler.cpp:
1534         (WebCore::ScriptProfiler::objectByHeapObjectId):
1535         * bindings/js/ScriptProfiler.h:
1536         * bindings/v8/ScriptProfiler.cpp:
1537         (WebCore::ScriptProfiler::objectByHeapObjectId):
1538         * bindings/v8/ScriptProfiler.h:
1539         * inspector/Inspector.json:
1540         * inspector/InspectorController.cpp:
1541         (WebCore::InspectorController::InspectorController):
1542         * inspector/InspectorProfilerAgent.cpp:
1543         (WebCore::InspectorProfilerAgent::create):
1544         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
1545         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
1546         * inspector/InspectorProfilerAgent.h:
1547         * inspector/front-end/DetailedHeapshotGridNodes.js:
1548         (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.queryObjectContent):
1549         (WebInspector.HeapSnapshotGenericObjectNode):
1550         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
1551         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent.else.formatResult):
1552         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent):
1553         (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
1554         * inspector/front-end/DetailedHeapshotView.js:
1555         (WebInspector.DetailedHeapshotView.prototype._showObjectPopover):
1556         * inspector/front-end/HeapSnapshot.js:
1557         (WebInspector.HeapSnapshotNode.prototype.get canBeQueried):
1558         (WebInspector.HeapSnapshotNode.prototype.get flags):
1559         (WebInspector.HeapSnapshotNode.prototype.get isDOMWindow):
1560         (WebInspector.HeapSnapshot.prototype._init):
1561         (WebInspector.HeapSnapshot.prototype.dispose):
1562         (WebInspector.HeapSnapshot.prototype._flagsOfNode):
1563         (WebInspector.HeapSnapshot.prototype._calculateFlags):
1564         (WebInspector.HeapSnapshot.prototype.updateStaticData):
1565         (WebInspector.HeapSnapshotNodesProvider.prototype._serialize):
1566         * inspector/front-end/HeapSnapshotProxy.js:
1567         (WebInspector.HeapSnapshotProxy.prototype.get nodeFlags):
1568         * inspector/front-end/RemoteObject.js:
1569         (WebInspector.RemoteObject.fromError):
1570         * inspector/front-end/heapProfiler.css:
1571         (.detailed-heapshot-view tr:not(.selected) td.object-column span.highlight):
1572
1573 2011-10-13  Adam Barth  <abarth@webkit.org>
1574
1575         script-src * should allow all URLs
1576         https://bugs.webkit.org/show_bug.cgi?id=70011
1577
1578         Reviewed by Eric Seidel.
1579
1580         This patch gets us slightly ahead of the spec.  Technically, script-src
1581         means "any host" and inherits the current scheme.  However, that's not
1582         what developers expect and it's even contradicted by examples in the
1583         spec itself.  After this patch, * matches all URLs.
1584
1585         Test: http/tests/security/contentSecurityPolicy/script-src-star-cross-scheme.html
1586
1587         * page/ContentSecurityPolicy.cpp:
1588         (WebCore::CSPSourceList::CSPSourceList):
1589         (WebCore::CSPSourceList::matches):
1590         (WebCore::CSPSourceList::parseSource):
1591         (WebCore::CSPSourceList::addSourceStar):
1592
1593 2011-10-13  Kentaro Hara  <haraken@chromium.org>
1594
1595         Implement an OverflowEvent constructor for JSC
1596         https://bugs.webkit.org/show_bug.cgi?id=69907
1597
1598         Reviewed by Adam Barth.
1599
1600         There is no spec for the OverflowEvent constructor
1601         since it is WebKit-specific. However, judging from the current
1602         IDL of initOverflowEvent(), the constructor IDL should be as follows.
1603
1604         [Constructor(DOMString type, optional OverflowEventInit eventInitDict)]
1605         interface OverflowEvent : Event {
1606             ...;
1607         }
1608
1609         dictionary OverflowEventInit : EventInit {
1610             unsigned short orient;
1611             boolean horizontalOverflow;
1612             boolean verticalOverflow;
1613         }
1614
1615         Note: In initOverflowEvent(), we cannot specify |bubbles| and |cancelable|.
1616         I do not know why, but we can find a comment in fast/events/script-tests/init-events.js
1617         that says "initOverflowEvent has an interface that has a design that's
1618         inconsistent with the init functions from other events".
1619         On the other hand, the above constructor enables to specify |bubbles| and |cancelable|,
1620         which is consistent with other constructors.
1621
1622         Test: fast/events/constructors/overflow-event-constructor.html
1623
1624         * bindings/generic/EventConstructors.h: Added a definition for the OverflowEvent constructor.
1625         * bindings/js/JSEventConstructors.cpp: Added #includes for OverflowEvent.
1626         * dom/OverflowEvent.cpp:
1627         (WebCore::OverflowEventInit::OverflowEventInit):
1628         (WebCore::OverflowEvent::OverflowEvent):
1629         (WebCore::OverflowEvent::initOverflowEvent):
1630         * dom/OverflowEvent.h: Added a definition for OverflowEventInit.
1631         (WebCore::OverflowEvent::create):
1632         (WebCore::OverflowEvent::orient):
1633         (WebCore::OverflowEvent::horizontalOverflow):
1634         (WebCore::OverflowEvent::verticalOverflow):
1635         * dom/OverflowEvent.idl: Makes OverflowEvent constructible.
1636
1637 2011-10-13  Kent Tamura  <tkent@chromium.org>
1638
1639         Cleanup of HTMLSelectElement
1640         https://bugs.webkit.org/show_bug.cgi?id=69908
1641
1642         Reviewed by Darin Adler.
1643
1644         - Change the m_listItems type: Vector<Element*> -> Vector<HTMLElement*>
1645         - Rename a member: m_recalcListItems -> m_shouldRecalcListItems
1646         - Fold checkListItems() into listItems()
1647         - Style fixes
1648
1649         No new tests, just a cleanup.
1650
1651         * accessibility/AccessibilityListBox.cpp:
1652         (WebCore::AccessibilityListBox::addChildren):
1653         * accessibility/AccessibilityListBoxOption.cpp:
1654         (WebCore::AccessibilityListBoxOption::listBoxOptionIndex):
1655         * accessibility/AccessibilityMenuListPopup.cpp:
1656         (WebCore::AccessibilityMenuListPopup::addChildren):
1657         * accessibility/AccessibilityRenderObject.cpp:
1658         (WebCore::AccessibilityRenderObject::stringValue):
1659         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1660         (optionFromSelection):
1661         (webkit_accessible_selection_get_selection_count):
1662         * dom/OptionElement.cpp:
1663         (WebCore::OptionElement::optionIndex):
1664         * html/HTMLSelectElement.cpp:
1665         (WebCore::HTMLSelectElement::HTMLSelectElement):
1666         (WebCore::HTMLSelectElement::add):
1667         (WebCore::HTMLSelectElement::value):
1668         (WebCore::HTMLSelectElement::setValue):
1669         (WebCore::HTMLSelectElement::parseMappedAttribute):
1670         (WebCore::HTMLSelectElement::recalcListItemsIfNeeded):
1671         (WebCore::HTMLSelectElement::setOption):
1672         (WebCore::HTMLSelectElement::setLength):
1673         (WebCore::HTMLSelectElement::nextValidIndex):
1674         (WebCore::HTMLSelectElement::firstSelectableListIndex):
1675         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway):
1676         (WebCore::HTMLSelectElement::selectAll):
1677         (WebCore::HTMLSelectElement::saveLastSelection):
1678         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
1679         (WebCore::HTMLSelectElement::updateListBoxSelection):
1680         (WebCore::HTMLSelectElement::listBoxOnChange):
1681         (WebCore::HTMLSelectElement::listItems):
1682         (WebCore::HTMLSelectElement::setRecalcListItems):
1683         (WebCore::HTMLSelectElement::recalcListItemsInternal):
1684         (WebCore::HTMLSelectElement::selectedIndex):
1685         (WebCore::HTMLSelectElement::setSelectedIndexInternal):
1686         (WebCore::HTMLSelectElement::optionToListIndex):
1687         (WebCore::HTMLSelectElement::listToOptionIndex):
1688         (WebCore::HTMLSelectElement::dispatchFocusEvent):
1689         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
1690         (WebCore::HTMLSelectElement::saveFormControlState): Use StringBuilder.
1691         (WebCore::HTMLSelectElement::restoreFormControlState):
1692         (WebCore::HTMLSelectElement::appendFormData):
1693         (WebCore::HTMLSelectElement::reset):
1694         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
1695         (WebCore::HTMLSelectElement::updateSelectedState):
1696         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1697         (WebCore::HTMLSelectElement::lastSelectedListIndex):
1698         Optimize the code by iterating in the reverse order.
1699         (WebCore::HTMLSelectElement::typeAheadFind):
1700         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
1701         (WebCore::HTMLSelectElement::length):
1702         (WebCore::toSelectElement):
1703         * html/HTMLSelectElement.h:
1704         * rendering/RenderListBox.cpp:
1705         (WebCore::RenderListBox::updateFromElement):
1706         (WebCore::RenderListBox::addFocusRingRects):
1707         (WebCore::RenderListBox::paintItemForeground):
1708         (WebCore::RenderListBox::paintItemBackground):
1709         (WebCore::RenderListBox::nodeAtPoint):
1710         * rendering/RenderMenuList.cpp:
1711         (WebCore::RenderMenuList::updateOptionsWidth):
1712         (WebCore::RenderMenuList::setTextFromOption):
1713         (WebCore::RenderMenuList::itemText):
1714         (WebCore::RenderMenuList::itemAccessibilityText):
1715         (WebCore::RenderMenuList::itemToolTip):
1716         (WebCore::RenderMenuList::itemIsEnabled):
1717         (WebCore::RenderMenuList::itemStyle):
1718         (WebCore::RenderMenuList::itemBackgroundColor):
1719         (WebCore::RenderMenuList::itemIsSeparator):
1720         (WebCore::RenderMenuList::itemIsLabel):
1721         (WebCore::RenderMenuList::itemIsSelected):
1722
1723 2011-10-13  Adam Barth  <abarth@webkit.org>
1724
1725         DOMWindow subobjects can be re-created after navigation
1726         https://bugs.webkit.org/show_bug.cgi?id=68849
1727
1728         Reviewed by Sam Weinig.
1729
1730         Test: http/tests/security/xss-DENIED-getSelection-from-inactive-domwindow.html
1731
1732         * page/DOMWindow.cpp:
1733         (WebCore::DOMWindow::~DOMWindow):
1734             - Add ASSERTs to show that we're not recreating these objects.
1735             - Add a call to clear() as defense in depth in case we have any of
1736               these objects hanging around.
1737         (WebCore::DOMWindow::clear):
1738             - Clear out a couple of objects that weren't getting cleared.
1739               These are actually not likely to cause problems, but clearing
1740               them out is the safe thing to do.
1741         (WebCore::DOMWindow::isActive):
1742             - Add a concept of whether the DOMWindow is "active" in its frame.
1743               We had this concept in a couple places already, but centralizing
1744               it into a helper function make it easier to use and talk about.
1745         (WebCore::DOMWindow::orientation):
1746             - Whitespace nit.
1747         (WebCore::DOMWindow::screen):
1748         (WebCore::DOMWindow::history):
1749         (WebCore::DOMWindow::crypto):
1750         (WebCore::DOMWindow::locationbar):
1751         (WebCore::DOMWindow::menubar):
1752         (WebCore::DOMWindow::personalbar):
1753         (WebCore::DOMWindow::scrollbars):
1754         (WebCore::DOMWindow::statusbar):
1755         (WebCore::DOMWindow::toolbar):
1756         (WebCore::DOMWindow::console):
1757         (WebCore::DOMWindow::applicationCache):
1758         (WebCore::DOMWindow::navigator):
1759         (WebCore::DOMWindow::performance):
1760         (WebCore::DOMWindow::location):
1761         (WebCore::DOMWindow::sessionStorage):
1762         (WebCore::DOMWindow::localStorage):
1763         (WebCore::DOMWindow::webkitNotifications):
1764         (WebCore::DOMWindow::webkitIndexedDB):
1765         (WebCore::DOMWindow::getSelection):
1766         (WebCore::DOMWindow::styleMedia):
1767         (WebCore::DOMWindow::webkitURL):
1768         (WebCore::DOMWindow::webkitStorageInfo):
1769             - Avoid creating these objects when we're not active.  That can
1770               only lead to sadness.
1771         (WebCore::DOMWindow::webkitRequestFileSystem):
1772         (WebCore::DOMWindow::webkitResolveLocalFileSystemURL):
1773         (WebCore::DOMWindow::openDatabase):
1774         (WebCore::DOMWindow::postMessage):
1775             - While not techincally creating subobjects, these functions also
1776               seem unwise when the DOMWindow is inactive.
1777         (WebCore::DOMWindow::find):
1778         (WebCore::DOMWindow::length):
1779         (WebCore::DOMWindow::getMatchedCSSRules):
1780             - These functions operate on the active Document.  When we're not
1781               active, that's not us!
1782         (WebCore::DOMWindow::document):
1783             - Update to use the new concept of being active rather than having
1784               this function roll its own implementation.
1785         (WebCore::DOMWindow::webkitConvertPointFromNodeToPage):
1786         (WebCore::DOMWindow::webkitConvertPointFromPageToNode):
1787         (WebCore::DOMWindow::scrollBy):
1788         (WebCore::DOMWindow::scrollTo):
1789             - These functions also look unwise to run when inactive because
1790               they're reading information from the active document.
1791             - I added a RefPtr for node because the call to
1792               updateLayoutIgnorePendingStylesheets() seems likely to be able to
1793               run script somehow.
1794         (WebCore::DOMWindow::addEventListener):
1795         (WebCore::DOMWindow::removeEventListener):
1796         (WebCore::DOMWindow::dispatchLoadEvent):
1797         (WebCore::DOMWindow::dispatchEvent):
1798             - I don't think these functions worked when inactive anyway, but
1799               explicitly blocking them seems wise.
1800         (WebCore::DOMWindow::setLocation):
1801         (WebCore::DOMWindow::isInsecureScriptAccess):
1802         (WebCore::DOMWindow::open):
1803         (WebCore::DOMWindow::showModalDialog):
1804             - These already have checks for being active, but it can't hurt to
1805               be explicit at the top of the function.
1806         * page/DOMWindow.h:
1807
1808 2011-10-13  Kent Tamura  <tkent@chromium.org>
1809
1810         REGRESSION(r89915): <input type=email multiple> don't show the default value
1811         https://bugs.webkit.org/show_bug.cgi?id=69895
1812
1813         Reviewed by Hajime Morita.
1814
1815         m_valueIfDirty became unexpectedly empty because
1816         EmailInputType::sanitizeValue() returned an empty string for a
1817         null input string.
1818
1819         To solve this issue, HTMLInputElement::sanitizeValue() checks
1820         nullness, and remove the null check of sanitizeValue() of
1821         InputType subclasses.
1822         Also, we make InputType::sanitizeValue() const.
1823
1824         * html/ColorInputType.cpp:
1825         (WebCore::ColorInputType::sanitizeValue):
1826         - Make this const.
1827         - Remove null check.
1828         * html/ColorInputType.h: Make sanitizeValue() const.
1829         * html/EmailInputType.cpp:
1830         (WebCore::EmailInputType::sanitizeValue): Make this const.
1831         * html/EmailInputType.h: Make sanitizeValue() const.
1832         * html/HTMLInputElement.cpp:
1833         (WebCore::HTMLInputElement::sanitizeValue):
1834         (WebCore::HTMLInputElement::updateValueIfNeeded):
1835         * html/InputType.cpp:
1836         (WebCore::InputType::sanitizeValue):
1837         Returns a null string if the input string is null, and
1838         don't call InputType::sanitizeValue() in this case.
1839         * html/InputType.h: Make sanitizeValue() const.
1840         * html/NumberInputType.cpp:
1841         (WebCore::NumberInputType::sanitizeValue): Make this const.
1842         * html/NumberInputType.h: Make sanitizeValue() const.
1843         * html/RangeInputType.cpp:
1844         (WebCore::RangeInputType::sanitizeValue):
1845         - Make this const.
1846         - Remove null check.
1847         * html/RangeInputType.h: Make sanitizeValue() const.
1848         * html/TextFieldInputType.cpp:
1849         (WebCore::TextFieldInputType::sanitizeValue): Make this const.
1850         * html/TextFieldInputType.h: Make sanitizeValue() const.
1851
1852 2011-10-12  Joseph Pecoraro  <joepeck@webkit.org>
1853
1854         Pass Parsed Accept Attribute MIME Types to WebKit Clients
1855         https://bugs.webkit.org/show_bug.cgi?id=69598
1856
1857         Reviewed by David Kilzer.
1858
1859         No new tests. No new functionality in WebCore, just
1860         exposing more information to the WebKit port.
1861
1862         * html/FileInputType.cpp:
1863         (WebCore::FileInputType::handleDOMActivateEvent):
1864         (WebCore::FileInputType::receiveDropForDirectoryUpload):
1865         Set the MIME type list on the FileChooser settings.
1866
1867         * html/HTMLInputElement.h:
1868         * html/HTMLInputElement.cpp:
1869         (WebCore::HTMLInputElement::acceptMIMETypes):
1870         Accessor for a parsed list of MIME types from the accept attribute.
1871         
1872         * platform/FileChooser.h:
1873         Add a slot for a MIME type list on the chooser settings.
1874
1875 2011-10-12  Joseph Pecoraro  <joepeck@webkit.org>
1876
1877         Pass Parsed Accept Attribute MIME Types to WebKit Clients
1878         https://bugs.webkit.org/show_bug.cgi?id=69598
1879
1880         Reviewed by Kent Tamura.
1881
1882         Deprecate the old String version of getting the "accept"
1883         mime type values. Instead we will change to include a
1884         list of MIME types.
1885
1886         * html/FileInputType.cpp:
1887         (WebCore::FileInputType::handleDOMActivateEvent):
1888         (WebCore::FileInputType::receiveDropForDirectoryUpload):
1889         * platform/FileChooser.h:
1890
1891 2011-10-12  Adam Barth  <abarth@webkit.org>
1892
1893         Remove ENABLE(XHTMLMP) and associated code
1894         https://bugs.webkit.org/show_bug.cgi?id=69729
1895
1896         Reviewed by David Levin.
1897
1898         As discussed on webkit-dev, we are removing this feature as part of our
1899         cleanup of unmaintained code in WebKit.
1900
1901         * Configurations/FeatureDefines.xcconfig:
1902         * GNUmakefile.am:
1903         * GNUmakefile.list.am:
1904         * WebCore.gypi:
1905         * WebCore.pro:
1906         * WebCore.vcproj/WebCore.vcproj:
1907         * WebCore.xcodeproj/project.pbxproj:
1908         * dom/DOMImplementation.cpp:
1909         (WebCore::DOMImplementation::createDocument):
1910         * dom/Document.cpp:
1911         (WebCore::Document::Document):
1912         * dom/Document.h:
1913         (WebCore::Document::isMediaDocument):
1914         * dom/Node.cpp:
1915         * dom/make_names.pl:
1916         (usesDefaultJSWrapper):
1917         * features.pri:
1918         * html/HTMLElement.cpp:
1919         (WebCore::HTMLElement::rendererIsNeeded):
1920         * html/HTMLElementsAllInOne.cpp:
1921         * html/HTMLNoScriptElement.cpp: Removed.
1922         * html/HTMLNoScriptElement.h: Removed.
1923         * html/HTMLTagNames.in:
1924         * html/HTMLViewSourceDocument.cpp:
1925         (WebCore::HTMLViewSourceDocument::createParser):
1926         * loader/FrameLoader.cpp:
1927         * platform/wince/MIMETypeRegistryWinCE.cpp:
1928         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
1929         * xml/parser/XMLDocumentParser.h:
1930         (WebCore::XMLDocumentParser::isXHTMLDocument):
1931         * xml/parser/XMLDocumentParserLibxml2.cpp:
1932         (WebCore::XMLDocumentParser::XMLDocumentParser):
1933         (WebCore::XMLDocumentParser::startElementNs):
1934         (WebCore::XMLDocumentParser::endElementNs):
1935         (WebCore::XMLDocumentParser::endDocument):
1936         (WebCore::XMLDocumentParser::internalSubset):
1937         (WebCore::getEntityHandler):
1938         (WebCore::externalSubsetHandler):
1939         * xml/parser/XMLDocumentParserQt.cpp:
1940         (WebCore::XMLDocumentParser::XMLDocumentParser):
1941         (WebCore::XMLDocumentParser::parse):
1942         (WebCore::XMLDocumentParser::parseStartElement):
1943         (WebCore::XMLDocumentParser::parseEndElement):
1944         (WebCore::XMLDocumentParser::endDocument):
1945         (WebCore::XMLDocumentParser::parseDtd):
1946
1947 2011-10-12  Kentaro Hara  <haraken@chromium.org>
1948
1949         Implement a WebKitTransitionEvent constructor for V8
1950         https://bugs.webkit.org/show_bug.cgi?id=69911
1951
1952         Reviewed by Adam Barth.
1953
1954         Test: fast/events/constructors/webkit-transition-event-constructor.html
1955
1956         * bindings/v8/custom/V8EventConstructors.cpp: Added a WebKitTransitionEvent constructor.
1957         * dom/WebKitTransitionEvent.idl: Replaced 'JSCustomConstructor' with 'CustomConstructor'.
1958
1959 2011-10-12  Kentaro Hara  <haraken@chromium.org>
1960
1961         Implement a BeforeLoadEvent constructor for JSC
1962         https://bugs.webkit.org/show_bug.cgi?id=69893
1963
1964         Reviewed by Adam Barth.
1965
1966         There is no spec for the BeforeLoadEvent constructor
1967         since it is WebKit-specific. However, judging from the current
1968         IDL of initBeforeLoadEvent(), the constructor IDL
1969         should be as follows.
1970
1971         [Constructor(DOMString type, optional BeforeLoadEventInit eventInitDict)]
1972         interface BeforeLoadEvent : Event {
1973             ...;
1974         }
1975
1976         dictionary BeforeLoadEventInit : EventInit {
1977             DOMString url;
1978         }
1979
1980         Test: fast/events/constructors/before-load-event-constructor.html
1981
1982         * bindings/generic/EventConstructors.h: Added a definition for the BeforeLoadEvent constructor.
1983         * bindings/js/JSEventConstructors.cpp: Added #includes for BeforeLoadEvent.
1984         * dom/BeforeLoadEvent.h: Added a definition for BeforeLoadEventInit.
1985         (WebCore::BeforeLoadEventInit::BeforeLoadEventInit):
1986         (WebCore::BeforeLoadEvent::create):
1987         (WebCore::BeforeLoadEvent::initBeforeLoadEvent):
1988         (WebCore::BeforeLoadEvent::BeforeLoadEvent):
1989         * dom/BeforeLoadEvent.idl: Makes BeforeLoadEvent constructible.
1990
1991 2011-10-12  Ben Wells  <benwells@chromium.org>
1992
1993         [skia] Implement Path.currentPoint for skia
1994         https://bugs.webkit.org/show_bug.cgi?id=69817
1995
1996         Replace FIXME with implementation.
1997
1998         Reviewed by Kenneth Russell.
1999
2000         * platform/graphics/skia/PathSkia.cpp:
2001         (WebCore::Path::currentPoint):
2002
2003 2011-10-12  Ben Wells  <benwells@chromium.org>
2004
2005         Incorrect rendering with one-sided thick border and border-radius
2006         https://bugs.webkit.org/show_bug.cgi?id=38787
2007
2008         Reviewed by Simon Fraser.
2009
2010         Incorrect rendering resulted when the inner border could not be properly represented as a rounded
2011         rectangle. When this happens, and the inner border is clipped out, the clipping code clips out the
2012         enclosing rectangle instead.
2013
2014         This change addresses this by clipping in a different way in this case only. The inside is clipped
2015         out one side at a time with a rounded rect created by adjusting the unrenderable inner border
2016         rounded rectangle. The side polygon which is clipped to is also increased in this case to include
2017         the inside of the border so that no areas are missing.
2018
2019         Test: fast/borders/border-radius-complex-inner.html
2020
2021         * rendering/RenderBoxModelObject.cpp:
2022         (WebCore::RenderBoxModelObject::paintOneBorderSide):
2023         (WebCore::RenderBoxModelObject::paintBorder):
2024         (WebCore::calculateSideRectIncludingInner):
2025         (WebCore::calculateAdjustedInnerBorder):
2026         (WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath):
2027         * rendering/RenderBoxModelObject.h:
2028
2029 2011-10-12  Luke Macpherson   <macpherson@chromium.org>
2030
2031         Clean up CSSPropertyTextDecoration implementation and ETextDecoration usage.
2032         https://bugs.webkit.org/show_bug.cgi?id=67625
2033
2034         Reviewed by Eric Seidel.
2035
2036         No new tests - no functionality changed.
2037
2038         The implementation of CSSPropertyTextDecoration is simlified because
2039         1) CSSValueListIterator produces a valid iterator when no results available.
2040         2) CSSParser only allows CSSValueNone or a list of appropriate idents.
2041         3) CSSParser will treat a zero-length list as invalid at parse time.
2042
2043         * css/CSSPrimitiveValueMappings.h:
2044         (WebCore::CSSPrimitiveValue::operator ETextDecoration):
2045         Implement cast from CSSPrimitiveValue to ETextDecoration.
2046         * css/CSSStyleSelector.cpp:
2047         (WebCore::CSSStyleSelector::applyProperty):
2048         * rendering/style/RenderStyle.h:
2049         Use ETextDecoration enum instead of int throughout.
2050         (WebCore::InheritedFlags::textDecorationsInEffect):
2051         (WebCore::InheritedFlags::textDecoration):
2052         (WebCore::InheritedFlags::addToTextDecorationsInEffect):
2053         (WebCore::InheritedFlags::setTextDecorationsInEffect):
2054         (WebCore::InheritedFlags::setTextDecoration):
2055         * rendering/style/RenderStyleConstants.h:
2056         Introduce constant for number of bits required to represent enum.
2057         (WebCore::operator|):
2058         Implement | operator for bitfield enum.
2059         (WebCore::operator|=):
2060         Implement |= operator for bitfield enum.
2061         * rendering/style/StyleVisualData.h:
2062         Use ETextDecoration instead of int.
2063
2064 2011-10-12  Tony Chang  <tony@chromium.org>
2065
2066         Implement -webkit-flex-align for cross axis alignment in flex-flow: row
2067         https://bugs.webkit.org/show_bug.cgi?id=69808
2068
2069         Reviewed by David Hyatt.
2070
2071         Tests: css3/flexbox/flex-align-percent-height.html
2072                css3/flexbox/flex-align-vertical-writing-mode.html
2073                css3/flexbox/flex-align.html
2074
2075         * rendering/RenderFlexibleBox.cpp:
2076         (WebCore::RenderFlexibleBox::isFlowAwareLogicalHeightAuto):
2077         (WebCore::RenderFlexibleBox::flowAwareContentLogicalHeight):
2078         (WebCore::RenderFlexibleBox::flowAwareBorderAndPaddingLogicalHeight):
2079         (WebCore::RenderFlexibleBox::flowAwareMarginLogicalHeightForChild):
2080         (WebCore::RenderFlexibleBox::flowAwareLogicalLocationForChild):
2081         (WebCore::RenderFlexibleBox::layoutInlineDirection):
2082         (WebCore::RenderFlexibleBox::availableLogicalHeightForChild):
2083         (WebCore::RenderFlexibleBox::marginBoxAscent):
2084         (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection):
2085         (WebCore::RenderFlexibleBox::adjustLocationLogicalTopForChild):
2086         (WebCore::RenderFlexibleBox::alignChildrenBlockDirection):
2087         * rendering/RenderFlexibleBox.h:
2088
2089 2011-10-12  Mihnea Ovidenie  <mihnea@adobe.com>
2090
2091         [CSS Regions]Remove -webkit-content-order property
2092         https://bugs.webkit.org/show_bug.cgi?id=69848
2093
2094         Reviewed by Tony Chang.
2095
2096         -webkit-content-order property is removed from latest CSS Regions spec.
2097
2098         * css/CSSComputedStyleDeclaration.cpp:
2099         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2100         * css/CSSParser.cpp:
2101         (WebCore::CSSParser::parseValue):
2102         * css/CSSPropertyNames.in:
2103         * css/CSSStyleSelector.cpp:
2104         (WebCore::CSSStyleSelector::applyProperty):
2105         * dom/Node.cpp:
2106         (WebCore::Node::diff):
2107         * rendering/RenderFlowThread.cpp:
2108         (WebCore::compareRenderRegions):
2109         * rendering/RenderTreeAsText.cpp:
2110         (WebCore::writeRenderFlowThreads):
2111         * rendering/style/RenderStyle.h:
2112         * rendering/style/StyleRareNonInheritedData.cpp:
2113         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2114         (WebCore::StyleRareNonInheritedData::operator==):
2115         * rendering/style/StyleRareNonInheritedData.h:
2116
2117 2011-10-12  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2118
2119         Update PeerConnection to use WebCore platform interfaces
2120         https://bugs.webkit.org/show_bug.cgi?id=68462
2121
2122         Reviewed by Adam Barth.
2123
2124         Currently not testable.
2125
2126         * WebCore.gypi:
2127         * WebCore.pro:
2128         * bindings/js/JSPeerConnectionCustom.cpp:
2129         (WebCore::JSPeerConnectionConstructor::constructJSPeerConnection):
2130         * bindings/v8/custom/V8PeerConnectionCustom.cpp: Removed.
2131         * dom/MediaStreamList.cpp:
2132         (WebCore::MediaStreamList::item):
2133         (WebCore::MediaStreamList::append):
2134         (WebCore::MediaStreamList::remove):
2135         (WebCore::MediaStreamList::contains):
2136         * dom/MediaStreamList.h:
2137         * p2p/PeerConnection.cpp:
2138         (WebCore::PeerConnection::create):
2139         (WebCore::PeerConnection::PeerConnection):
2140         (WebCore::PeerConnection::processSignalingMessage):
2141         (WebCore::PeerConnection::readyState):
2142         (WebCore::PeerConnection::send):
2143         (WebCore::PeerConnection::addStream):
2144         (WebCore::PeerConnection::removeStream):
2145         (WebCore::PeerConnection::localStreams):
2146         (WebCore::PeerConnection::remoteStreams):
2147         (WebCore::PeerConnection::close):
2148         (WebCore::PeerConnection::iceProcessingCompleted):
2149         (WebCore::PeerConnection::sdpGenerated):
2150         (WebCore::PeerConnection::dataStreamMessageReceived):
2151         (WebCore::PeerConnection::remoteStreamAdded):
2152         (WebCore::PeerConnection::remoteStreamRemoved):
2153         (WebCore::PeerConnection::scriptExecutionContext):
2154         (WebCore::PeerConnection::stop):
2155         (WebCore::PeerConnection::scheduleInitialNegotiation):
2156         (WebCore::PeerConnection::initialNegotiationTimerFired):
2157         (WebCore::PeerConnection::ensureStreamChangeScheduled):
2158         (WebCore::PeerConnection::streamChangeTimerFired):
2159         (WebCore::PeerConnection::scheduleReadyStateChange):
2160         (WebCore::PeerConnection::readyStateChangeTimerFired):
2161         (WebCore::PeerConnection::changeReadyState):
2162         * p2p/PeerConnection.h:
2163         (WebCore::PeerConnection::refEventTarget):
2164         (WebCore::PeerConnection::derefEventTarget):
2165         * p2p/PeerConnection.idl:
2166         * page/MediaStreamClient.h:
2167         * page/MediaStreamController.cpp:
2168         (WebCore::MediaStreamController::MediaStreamController):
2169         * page/MediaStreamController.h:
2170         * page/MediaStreamFrameController.cpp:
2171         * page/MediaStreamFrameController.h:
2172
2173 2011-10-12  Chris Fleizach  <cfleizach@apple.com>
2174
2175         AX: CrashTracer: [USER] 296 crashes in WebProcess at com.apple.WebCore: WebCore::AccessibilityScrollbar::document const + 29
2176         https://bugs.webkit.org/show_bug.cgi?id=69936
2177
2178         AX Scrollbars have a weak pointer to their parent. They need to become AccessibilityMockObjects, so that they can
2179         participate in the detachFromParent() methods that happens when those parents go away.
2180         Could not reproduce the crash, but the backtrace is unequivocal.
2181
2182         Reviewed by Darin Adler.
2183
2184         * accessibility/AccessibilityScrollView.cpp:
2185         (WebCore::AccessibilityScrollView::removeChildScrollbar):
2186         * accessibility/AccessibilityScrollbar.cpp:
2187         (WebCore::AccessibilityScrollbar::AccessibilityScrollbar):
2188         * accessibility/AccessibilityScrollbar.h:
2189         (WebCore::AccessibilityScrollbar::scrollbar):
2190         (WebCore::AccessibilityScrollbar::isAccessibilityScrollbar):
2191
2192 2011-10-12  David Hyatt  <hyatt@apple.com>
2193
2194         https://bugs.webkit.org/show_bug.cgi?id=69950
2195         
2196         REGRESSION: Printing broken because of the isWritingModeRoot addition for unsplittable
2197         paginated content. Make sure not to include the RenderView when checking for writing mode
2198         roots. We only care about children that differ from their parents.
2199
2200         Reviewed by Dimitri Glazkov.
2201
2202         * rendering/LayoutState.cpp:
2203         (WebCore::LayoutState::LayoutState):
2204         * rendering/RenderBlock.cpp:
2205         (WebCore::RenderBlock::adjustForUnsplittableChild):
2206         * rendering/RenderBox.cpp:
2207         (WebCore::RenderBox::isUnsplittableForPagination):
2208         * rendering/RenderBox.h:
2209
2210 2011-10-12  Anna Cavender  <annacc@chromium.org>
2211
2212         Moving ScriptExecutionContext to the front of the argument list for
2213         IDL constructors that use ConstructorWith=ScriptExecutionContext.
2214         https://bugs.webkit.org/show_bug.cgi?id=69799
2215
2216         Reviewed by Adam Barth.
2217
2218         Tests:
2219         - http/tests/eventsource/* (for EventSource)
2220         - fast/filesystem/* (for Worker)
2221
2222         * bindings/js/JSEventSourceCustom.cpp:
2223         (WebCore::JSEventSourceConstructor::constructJSEventSource):
2224         * bindings/js/JSWorkerCustom.cpp:
2225         (WebCore::JSWorkerConstructor::constructJSWorker):
2226         * bindings/scripts/CodeGeneratorV8.pm:
2227         (GenerateConstructorCallback):
2228         * bindings/scripts/test/V8/V8TestInterface.cpp:
2229         (WebCore::V8TestInterface::constructorCallback):
2230         * page/EventSource.cpp:
2231         (WebCore::EventSource::create):
2232         * page/EventSource.h:
2233         * workers/Worker.cpp:
2234         (WebCore::Worker::create):
2235         * workers/Worker.h:
2236
2237 2011-10-11  David Hyatt  <hyatt@apple.com>
2238
2239         https://bugs.webkit.org/show_bug.cgi?id=69896
2240         
2241         [CSS Regions] Make positioned blocks work with variable width regions.
2242         
2243         Make positioned objects able to position and size independently in each region. This involves
2244         lifting the restriction in renderBoxRegionInfo for positioned objects and passing in region
2245         information to computeLogicalWidthForPositioned so that it can compute answers for a given
2246         region.
2247
2248         In order to make mixed writing modes work with positioned objects, this patch also takes some
2249         baby steps towards fixing differing writing modes in paginated environments.
2250
2251         Reviewed by Sam Weinig.
2252
2253         Added many new tests in fast/regions.
2254
2255         * rendering/LayoutState.cpp:
2256         (WebCore::LayoutState::LayoutState):
2257         Disable pagination whenever differing writing modes are encountered. The block effectively becomes
2258         unsplittable (as though it was an image).
2259
2260         * rendering/RenderBlock.cpp:
2261         (WebCore::RenderBlock::layoutBlock):
2262         Remove a FIXME that looks incorrect now.
2263
2264         (WebCore::RenderBlock::adjustPositionedBlock):
2265         Patch static inline position caching to call a new method that unshifts the position to put it back
2266         in the overall block's space rather than having it be per-region.
2267
2268         (WebCore::RenderBlock::layoutPositionedObjects):
2269         Make sure to attempt to set a logicalTop for positioned objects before they lay out so that they
2270         have a chance of paginating correctly the first time around. If for some reason the top estimate proves
2271         to be incorrect, we lay out again. Technically this bug exists for multi-column and printing as well, but
2272         for now just fixing it for regions.
2273
2274         (WebCore::RenderBlock::adjustForUnsplittableChild):
2275         Add writing mode roots to the set of objects we consider to be unsplittable.
2276
2277         (WebCore::RenderBlock::setStaticInlinePositionForChild):
2278         New helper function that handles shifting the inline static position back into the overall block's space
2279         rather than leaving it in a translated region-specific space.
2280
2281         * rendering/RenderBlock.h:
2282         (WebCore::RenderBlock::startOffsetForContent):
2283         New helper function for computing the start offset when no regions are involved.
2284
2285         * rendering/RenderBlockLineLayout.cpp:
2286         (WebCore::setStaticPositions):
2287         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
2288         Patched to call the new helper function, setStaticInlinePositionForChild.
2289
2290         * rendering/RenderBox.cpp:
2291         (WebCore::RenderBox::positionLineBox):
2292         Patched to call the new helper function, setStaticInlinePositionForChild.
2293
2294         (WebCore::RenderBox::computeLogicalWidthInRegion):
2295         Pass region information into the positioning logical width computation function.
2296
2297         (WebCore::RenderBox::renderBoxRegionInfo):
2298         Remove the positioning restriction and properly compute shifting and left/right offsets for positioned
2299         objects.
2300
2301         (WebCore::RenderBox::computeLogicalHeight):
2302         Add code for perpendicular flows that just positions the object within the first region it is encountered
2303         in. Since the object is unsplittable, this will work out. Should the object be so tall that it can't fit
2304         in any region, then the resulting rendering will potentially be terrible, but the expectation is that authors should
2305         avoid having perpendicular flows break across pages.
2306
2307         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2308         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
2309         Patched to handle regions when they are passed in. Also makes sure that the pagination direction axis computation uses
2310         the flow thread's first region when the flow thread is the positioned object's containing block.
2311
2312         (WebCore::computeInlineStaticDistance):
2313         Patched to examine regions and to modify the static distance computation accordingly so that it is per-region.
2314
2315         (WebCore::RenderBox::computePositionedLogicalWidth):
2316         Pass along the region information when computing the positioned logical width.
2317
2318         (WebCore::computeLogicalLeftPositionedOffset):
2319         Handle the adjustment of the logical left offset for differing writing modes (in this case when the writing mode
2320         is flipped relative to us).
2321
2322         (WebCore::RenderBox::computePositionedLogicalHeight):
2323         Deal with perpendicular writing modes and make sure the object is placed properly using the first region it 
2324         occurs in.
2325
2326         (WebCore::computeLogicalTopPositionedOffset):
2327         Remove code that is no longer needed.
2328
2329         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
2330         Patched to pass in 0 instead of a region since replaced elements aren't handled yet.
2331
2332         * rendering/RenderBox.h:
2333         Changing the computePositionedLogicalWidth method to take region information.
2334
2335         * rendering/RenderDeprecatedFlexibleBox.cpp:
2336         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2337         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2338         Didn't bother fixing deprecated flexible box, and the new flexbox still can't handle positioned objects. When it does,
2339         it will use the new method. Put in some FIXMEs to help the flexbox coders see the issue when they port the code over
2340         to the new flexbox.
2341
2342         * rendering/RenderLayer.h:
2343         (WebCore::RenderLayer::staticInlinePosition):
2344         (WebCore::RenderLayer::staticBlockPosition):
2345         (WebCore::RenderLayer::setStaticInlinePosition):
2346         (WebCore::RenderLayer::setStaticBlockPosition):
2347         Patched to take LayoutUnits instead of ints.
2348
2349 2011-10-12  Nate Chapin  <japhet@chromium.org>
2350
2351         Remove logging to determine how null v8::Contexts are happening,
2352         and check the return value of V8DOMWindowShell::initContextIfNeeded()
2353         before using the context it initialized.
2354         https://bugs.webkit.org/show_bug.cgi?id=68099
2355
2356         Reviewed by Adam Barth.
2357
2358         No new tests, the only symptom is a crash without a known repro.
2359
2360         * bindings/v8/ScriptController.cpp:
2361         * bindings/v8/V8DOMWindowShell.cpp:
2362         (WebCore::V8DOMWindowShell::initContextIfNeeded): Return true
2363             if a context already existed.
2364         (WebCore::V8DOMWindowShell::namedItemAdded): Remove logging.
2365         * bindings/v8/V8Proxy.cpp:
2366
2367 2011-10-06  Robert Hogan  <robert@webkit.org>
2368
2369         CSS 2.1 failure: border-conflict-style-079
2370         https://bugs.webkit.org/show_bug.cgi?id=69551
2371
2372         Reviewed by Antonio Gomes.
2373
2374         * css/CSSValueKeywords.in: ridge and outset were the wrong way round
2375         * rendering/style/RenderStyleConstants.h: ditto
2376
2377
2378 2011-10-12  Jian Li  <jianli@chromium.org>
2379
2380         Support passing optional filename when FormData.append() is used to
2381         append a blob
2382         https://bugs.webkit.org/show_bug.cgi?id=69885
2383
2384         Reviewed by David Levin.
2385
2386         Covered by existing test with new test case added:
2387         http/tests/local/formdata/send-form-data-with-sliced-file.html
2388
2389         * bindings/js/JSDOMFormDataCustom.cpp:
2390         (WebCore::JSDOMFormData::append):
2391         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
2392         (WebCore::V8DOMFormData::appendCallback):
2393         * html/DOMFormData.cpp:
2394         (WebCore::DOMFormData::append):
2395         * html/DOMFormData.h:
2396         * html/DOMFormData.idl:
2397         * html/FormDataList.cpp:
2398         (WebCore::FormDataList::appendBlob):
2399         * html/FormDataList.h:
2400         (WebCore::FormDataList::Item::Item):
2401         (WebCore::FormDataList::Item::filename):
2402         (WebCore::FormDataList::appendBlob):
2403         * platform/network/FormData.cpp:
2404         (WebCore::FormData::appendKeyValuePairItems):
2405
2406 2011-10-12  Sergey Glazunov  <serg.glazunov@gmail.com>
2407
2408         ScriptController::executeIfJavaScriptURL gets confused by synchronous frame loads
2409         https://bugs.webkit.org/show_bug.cgi?id=69777
2410
2411         Reviewed by Adam Barth.
2412
2413         Test: http/tests/security/xss-DENIED-synchronous-frame-load-in-javascript-url.html
2414
2415         * bindings/ScriptControllerBase.cpp:
2416         (WebCore::ScriptController::executeIfJavaScriptURL):
2417         * loader/DocumentWriter.cpp:
2418         (WebCore::DocumentWriter::replaceDocument):
2419         (WebCore::DocumentWriter::begin):
2420         * loader/DocumentWriter.h:
2421
2422 2011-10-12  Vsevolod Vlasov  <vsevik@chromium.org>
2423
2424         Web Inspector: Searching in multiple scripts in the scripts tab
2425         https://bugs.webkit.org/show_bug.cgi?id=38807
2426
2427         Reviewed by Pavel Feldman.
2428
2429         Added support for advanced search capabilities in inspector by means
2430         of showing the new SearchView in Drawer. Advanced search is activated
2431         with Ctrl+Shift+F (Cmd+Shift+F) shortcut.
2432
2433         * English.lproj/localizedStrings.js:
2434         * WebCore.gypi:
2435         * WebCore.vcproj/WebCore.vcproj:
2436         * inspector/compile-front-end.sh:
2437         * inspector/front-end/AdvancedSearchController.js: Added.
2438         * inspector/front-end/DebuggerPresentationModel.js:
2439         (WebInspector.DebuggerPresentationModel.prototype.uiSourceCodes):
2440         * inspector/front-end/ScriptsPanel.js:
2441         * inspector/front-end/ScriptsSearchScope.js: Added.
2442         * inspector/front-end/UISourceCode.js:
2443         (WebInspector.UISourceCode.prototype.searchInContent):
2444         * inspector/front-end/WebKit.qrc:
2445         * inspector/front-end/externs.js:
2446         (WebInspector.showViewInDrawer):
2447         * inspector/front-end/inspector.css:
2448         (.search-view):
2449         (.search-view .search-panel):
2450         (.search-view .search-results):
2451         (#search-results-pane-file-based .search-result):
2452         (#search-results-pane-file-based .search-result:first-child):
2453         (#search-results-pane-file-based .search-result .search-result-file-name):
2454         (#search-results-pane-file-based .search-result .search-result-matches-count):
2455         (#search-results-pane-file-based .search-match):
2456         (#search-results-pane-file-based .search-match .webkit-line-number.search-match-line-number):
2457         (#search-results-pane-file-based .search-match:not(:hover) .webkit-line-number.search-match-line-number):
2458         (#search-results-pane-file-based .search-match:hover):
2459         (#search-results-pane-file-based .search-match .highlighted-match):
2460         (#search-results-pane-file-based a):
2461         (#search-results-pane-file-based .search-match .search-match-content):
2462         * inspector/front-end/inspector.html:
2463         * inspector/front-end/inspector.js:
2464         (WebInspector.documentKeyDown):
2465         * inspector/front-end/utilities.js:
2466         ():
2467
2468 2011-10-12  Vsevolod Vlasov  <vsevik@chromium.org>
2469
2470         Web Inspector: Fix Drawer to make it possible to show views other than Console.
2471         https://bugs.webkit.org/show_bug.cgi?id=69831
2472
2473         Reviewed by Pavel Feldman.
2474
2475         Animation type extracted to distinguish between slow and normal
2476         animation and immediate show/hide.
2477         Implemented correct console toggle button behavior on showing views
2478         other than console in Drawer.
2479         View shown in Drawer is now shown in drawer-contents div with common
2480         styles moved there.
2481         Removed unused "_safelyRemoveChildren" method from Drawer.
2482
2483         * inspector/front-end/ConsolePanel.js:
2484         (WebInspector.ConsolePanel.prototype.show):
2485         (WebInspector.ConsolePanel.prototype.hide):
2486         * inspector/front-end/Drawer.js:
2487         (WebInspector.Drawer):
2488         (WebInspector.Drawer.prototype.show):
2489         (WebInspector.Drawer.prototype.hide):
2490         (WebInspector.Drawer.prototype._animationDuration):
2491         * inspector/front-end/inspector.css:
2492         (body.drawer-visible #drawer-contents):
2493         * inspector/front-end/inspector.js:
2494         (WebInspector._toggleConsoleButtonClicked):
2495         (WebInspector._escPressed):
2496         (WebInspector.showViewInDrawer):
2497         (WebInspector.documentKeyDown):
2498
2499 2011-10-12  Yury Semikhatsky  <yurys@chromium.org>
2500
2501         [v8] Use V8DOMWrapper::isWrapperOfType for determining global object type
2502         https://bugs.webkit.org/show_bug.cgi?id=69923
2503
2504         Get rid of globalObjectPrototypeIsDOMWindow, use V8DOMWrapper::isWrapperOfType instead.
2505
2506         Reviewed by Pavel Feldman.
2507
2508         * bindings/v8/V8DOMWrapper.cpp:
2509         (WebCore::V8DOMWrapper::instantiateV8Object):
2510         (WebCore::V8DOMWrapper::getEventListener):
2511
2512 2011-10-12  Yury Semikhatsky  <yurys@chromium.org>
2513
2514         [Chromium] Web Inspector: assertion failure when evaluating expression in worker inspector console
2515         https://bugs.webkit.org/show_bug.cgi?id=69922
2516
2517         Check that the global object is a DOMWindow wrapper befor casting it to V8DOMWindow.
2518
2519         Reviewed by Pavel Feldman.
2520
2521         * bindings/v8/ScriptState.cpp:
2522         (WebCore::ScriptState::domWindow):
2523
2524 2011-10-12  Yuta Kitamura  <yutak@chromium.org>
2525
2526         WebSocket: Update WebSocket protocol to hybi-17
2527         https://bugs.webkit.org/show_bug.cgi?id=69910
2528
2529         Reviewed by Kent Tamura.
2530
2531         Essential changes between hybi-10 and hybi-17 are:
2532         - Sec-WebSocket-Origin header has been renamed to "Origin".
2533         - Sec-WebSocket-Version header value has been bumped to 13.
2534
2535         No new tests are necessary. pywebsocket has already been updated to the latest version
2536         which understands the new protocol. Tests under http/tests/websocket/ should keep
2537         passing.
2538
2539         * websockets/WebSocketHandshake.cpp:
2540         (WebCore::WebSocketHandshake::clientHandshakeMessage):
2541         (WebCore::WebSocketHandshake::clientHandshakeRequest):
2542
2543 2011-10-11  Antti Koivisto  <antti@apple.com>
2544
2545         Resolve regular and visited link style in a single pass
2546         https://bugs.webkit.org/show_bug.cgi?id=69838
2547
2548         Reviewed by Darin Adler
2549         
2550         We can simplify and speed up selector matching by removing the recursive matching done
2551         to generate the style for the :visited pseudo selector. Both regular and visited link style
2552         can be generated in a single pass through the style selector.
2553         
2554         - Make SelectorChecker::checkSelector to return both :visited and :link matches for all links.
2555         - For each selector statically determine and cache the link states it may match.
2556         - When applying the matched style declarations, apply them to the right RenderStyle
2557           (regular, visited, or both).
2558
2559         Statically determining which link state will be matched works since we only support :visited matching
2560         based on the current element state (not ancestors or siblings).
2561         
2562         A later patch will eliminate the separate RenderStyle for visited style completely and include the
2563         few allowed properties to the regular RenderStyle.
2564
2565         * css/CSSStyleSelector.cpp:
2566         (WebCore::RuleData::linkMatchType):
2567         (WebCore::RuleSet::linkPseudoClassRules):
2568         (WebCore::CSSStyleSelector::addMatchedDeclaration):
2569         (WebCore::CSSStyleSelector::matchRules):
2570         (WebCore::CSSStyleSelector::styleForElement):
2571         (WebCore::CSSStyleSelector::pseudoStyleForElement):
2572         (WebCore::CSSStyleSelector::updateFont):
2573         (WebCore::CSSStyleSelector::checkSelector):
2574         (WebCore::RuleData::RuleData):
2575         (WebCore::RuleSet::addRule):
2576         (WebCore::RuleSet::collectFeatures):
2577         (WebCore::RuleSet::shrinkToFit):
2578         (WebCore::CSSStyleSelector::applyDeclaration):
2579         (WebCore::CSSStyleSelector::applyDeclarations):
2580         (WebCore::CSSStyleSelector::applyProperty):
2581         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
2582         * css/CSSStyleSelector.h:
2583         (WebCore::CSSStyleSelector::MatchedStyleDeclaration::MatchedStyleDeclaration):
2584         * css/SelectorChecker.cpp:
2585         (WebCore::SelectorChecker::SelectorChecker):
2586         (WebCore::SelectorChecker::checkSelector):
2587         (WebCore::SelectorChecker::fastCheckRightmostSelector):
2588         (WebCore::SelectorChecker::fastCheckSelector):
2589         (WebCore::SelectorChecker::checkOneSelector):
2590         (WebCore::SelectorChecker::commonPseudoClassSelectorMatches):
2591         (WebCore::SelectorChecker::determineLinkMatchType):
2592         * css/SelectorChecker.h:
2593         * rendering/style/RenderStyle.cpp:
2594         (WebCore::RenderStyle::addCachedPseudoStyle):
2595
2596 2011-10-12  Kent Tamura  <tkent@chromium.org>
2597
2598         REGRESSION(r94836): An assertion fails in HTMLFormControlElement::isValidFormControlElement
2599         when HTMLInputElement::setValue() is called while the element is focused.
2600         https://bugs.webkit.org/show_bug.cgi?id=69909
2601
2602         Reviewed by Ryosuke Niwa.
2603
2604         setNeedsValidityCheck() should be called after the value update
2605         and before any style recalculation. r94836 moved
2606         setSelectionRange() call, and it recalculates the element style.
2607
2608         * html/HTMLInputElement.cpp:
2609         (WebCore::HTMLInputElement::setValue): Move setNeedsValidityCheck() to setValueInternal().
2610         (WebCore::HTMLInputElement::setValueInternal): Move setNeedsValidityCheck() from setValue().
2611
2612 2011-10-12  Kent Tamura  <tkent@chromium.org>
2613
2614         Build fixes for r97238.
2615         https://bugs.webkit.org/show_bug.cgi?id=69828
2616
2617         * GNUmakefile.list.am: Remove SelectElement.{cpp,h}.
2618         * dom/DOMAllInOne.cpp: Remove SelectElement.cpp.
2619
2620 2011-10-12  Kent Tamura  <tkent@chromium.org>
2621
2622         Move the content of SelectElementData into HTMLSelectElement, and remove SelectElement.{cpp,h}
2623         https://bugs.webkit.org/show_bug.cgi?id=69828
2624
2625         Reviewed by Darin Adler.
2626
2627         - Move all of the data members of SelectElementData to
2628         HTMLSelectElement, and their accessor functions are not needed
2629         anymore.
2630         - Move SelectElementData::useMenuList() to HTMLSelectElement.
2631
2632         No new tests, just a refactoring.
2633
2634         * CMakeLists.txt: Remove SelectElement.cpp.
2635         * WebCore.gypi: Remove SelectElement.{cpp,h}.
2636         * WebCore.pro: ditto.
2637         * WebCore.vcproj/WebCore.vcproj: ditto.
2638         * WebCore.xcodeproj/project.pbxproj: ditto.
2639         * dom/OptionElement.cpp: Remove a reference to SelectElement.h.
2640         * dom/SelectElement.cpp: Removed.
2641         * dom/SelectElement.h: Removed.
2642         * html/HTMLSelectElement.cpp:
2643         (WebCore::HTMLSelectElement::HTMLSelectElement):
2644         Initializes the moved data members.
2645         (WebCore::HTMLSelectElement::formControlType):
2646         (WebCore::HTMLSelectElement::setSelectedIndexByUser):
2647         (WebCore::HTMLSelectElement::activeSelectionStartListIndex):
2648         (WebCore::HTMLSelectElement::activeSelectionEndListIndex):
2649         (WebCore::HTMLSelectElement::parseMappedAttribute):
2650         (WebCore::HTMLSelectElement::canSelectAll):
2651         (WebCore::HTMLSelectElement::createRenderer):
2652         (WebCore::HTMLSelectElement::setOption):
2653         (WebCore::HTMLSelectElement::selectAll):
2654         (WebCore::HTMLSelectElement::saveLastSelection):
2655         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
2656         (WebCore::HTMLSelectElement::setActiveSelectionEndIndex):
2657         (WebCore::HTMLSelectElement::updateListBoxSelection):
2658         (WebCore::HTMLSelectElement::listBoxOnChange):
2659         (WebCore::HTMLSelectElement::menuListOnChange):
2660         (WebCore::HTMLSelectElement::scrollToSelection):
2661         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
2662         (WebCore::HTMLSelectElement::setRecalcListItems):
2663         (WebCore::HTMLSelectElement::recalcListItemsInternal):
2664         (WebCore::HTMLSelectElement::setSelectedIndexInternal):
2665         (WebCore::HTMLSelectElement::dispatchFocusEvent):
2666         (WebCore::HTMLSelectElement::dispatchBlurEvent):
2667         (WebCore::HTMLSelectElement::parseMultipleAttribute):
2668         (WebCore::HTMLSelectElement::reset):
2669         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2670         (WebCore::HTMLSelectElement::updateSelectedState):
2671         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2672         (WebCore::HTMLSelectElement::defaultEventHandler):
2673         (WebCore::HTMLSelectElement::typeAheadFind):
2674         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
2675         * html/HTMLSelectElement.h:
2676         (WebCore::HTMLSelectElement::size):
2677         (WebCore::HTMLSelectElement::multiple):
2678         (WebCore::HTMLSelectElement::usesMenuList):
2679
2680 2011-10-12  Ryosuke Niwa  <rniwa@webkit.org>
2681
2682         Chromium Mac build fix after r97227.
2683
2684         * platform/chromium/ScrollbarThemeChromiumMac.mm:
2685         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
2686
2687 2011-10-11  Antoine Labour  <piman@chromium.org>
2688
2689         Separate compositor client thread from webkit's main thread.
2690         https://bugs.webkit.org/show_bug.cgi?id=69048
2691
2692         Reviewed by Darin Fisher.
2693
2694         Covered by compositing tests.
2695
2696         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2697         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2698         * platform/graphics/chromium/cc/CCMainThread.cpp:
2699         * platform/graphics/chromium/cc/CCMainThread.h:
2700         * platform/graphics/chromium/cc/CCProxy.cpp:
2701         (WebCore::CCProxy::isMainThread):
2702         (WebCore::CCProxy::setMainThread):
2703         (WebCore::CCProxy::CCProxy):
2704         * platform/graphics/chromium/cc/CCProxy.h:
2705
2706 2011-10-11  Simon Fraser  <simon.fraser@apple.com>
2707
2708         Fix Leopard and Snow Leopard builds, which don't use the scrollbar painter.
2709         
2710         * platform/mac/ScrollAnimatorMac.mm:
2711
2712 2011-10-11  Simon Fraser  <simon.fraser@apple.com>
2713
2714         Make custom scrollbar theme for use in DRT, to reduce pixel diffs between platforms
2715         https://bugs.webkit.org/show_bug.cgi?id=68134
2716
2717         Reviewed by Darin Adler.
2718
2719         Use ScrollbarThemeMock when the setting to use mock scrollbars is enabled.
2720         
2721         Make ScrollbarTheme::nativeTheme() private, and add a new static theme() method
2722         that reads the setting, and returns the mock theme if set. All callers now use
2723         theme() rther than nativeTheme(). Add the new ScrollbarTheme.cpp file to the build.
2724         
2725         Fix scroll animator code for Mac and Chromium that was casting the ScrollbarTheme
2726         without type-checking it to test whether it's the mock theme.
2727
2728         * CMakeLists.txt:
2729         * GNUmakefile.list.am:
2730         * WebCore.exp.in:
2731         * WebCore.gypi:
2732         * WebCore.pro:
2733         * WebCore.vcproj/WebCore.vcproj:
2734         * WebCore.xcodeproj/project.pbxproj:
2735         * html/shadow/TextControlInnerElements.cpp:
2736         (WebCore::SpinButtonElement::startRepeatingTimer):
2737         * platform/ScrollAnimatorWin.cpp:
2738         (WebCore::ScrollAnimatorWin::scroll):
2739         (WebCore::ScrollAnimatorWin::accelerationTime):
2740         (WebCore::ScrollAnimatorWin::animateScroll):
2741         * platform/ScrollView.cpp:
2742         (WebCore::ScrollView::wheelEvent):
2743         * platform/ScrollableArea.cpp:
2744         (WebCore::ScrollableArea::setScrollbarOverlayStyle):
2745         * platform/Scrollbar.cpp:
2746         (WebCore::Scrollbar::maxOverlapBetweenPages):
2747         (WebCore::Scrollbar::Scrollbar):
2748         * platform/ScrollbarTheme.cpp: Copied from Source/WebCore/platform/mock/ScrollbarThemeMock.h.
2749         (WebCore::ScrollbarTheme::theme):
2750         * platform/ScrollbarTheme.h:
2751         (WebCore::ScrollbarTheme::isMockTheme):
2752         * platform/chromium/PopupListBox.cpp:
2753         (WebCore::PopupListBox::layout):
2754         * platform/chromium/ScrollAnimatorChromiumMac.mm:
2755         (WebCore::chromiumScrollbarTheme):
2756         (WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar):
2757         (WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar):
2758         (WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar):
2759         (WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar):
2760         (WebCore::ScrollAnimatorChromiumMac::updateScrollerStyle):
2761         * platform/chromium/ScrollbarThemeChromiumMac.mm:
2762         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
2763         (+[ScrollbarPrefsObserver behaviorPrefsChanged:]):
2764         * platform/mac/ScrollAnimatorMac.mm:
2765         (WebCore::macScrollbarTheme):
2766         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2767         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
2768         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2769         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
2770         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
2771         * platform/mac/ScrollbarThemeMac.mm:
2772         (+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
2773         (+[WebScrollbarPrefsObserver behaviorPrefsChanged:]):
2774         * platform/mock/ScrollbarThemeMock.h:
2775         (WebCore::ScrollbarThemeMock::isMockTheme):
2776         * platform/qt/RenderThemeQt.cpp:
2777         (WebCore::RenderThemeQt::adjustInnerSpinButtonStyle):
2778         * platform/win/PopupMenuWin.cpp:
2779         (WebCore::PopupMenuWin::calculatePositionAndSize):
2780         * rendering/RenderLayer.cpp:
2781         (WebCore::cornerRect):
2782         * rendering/RenderScrollbarPart.cpp:
2783         (WebCore::calcScrollbarThicknessUsing):
2784         * rendering/RenderScrollbarTheme.h:
2785         (WebCore::RenderScrollbarTheme::scrollbarThickness):
2786         (WebCore::RenderScrollbarTheme::buttonsPlacement):
2787         (WebCore::RenderScrollbarTheme::shouldCenterOnThumb):
2788         (WebCore::RenderScrollbarTheme::initialAutoscrollTimerDelay):
2789         (WebCore::RenderScrollbarTheme::autoscrollTimerDelay):
2790         (WebCore::RenderScrollbarTheme::registerScrollbar):
2791         (WebCore::RenderScrollbarTheme::unregisterScrollbar):
2792         * rendering/RenderTextControl.cpp:
2793         (WebCore::RenderTextControl::scrollbarThickness):
2794         * rendering/RenderThemeChromiumSkia.cpp:
2795         (WebCore::RenderThemeChromiumSkia::menuListInternalPadding):
2796         * rendering/RenderThemeChromiumWin.cpp:
2797         (WebCore::RenderThemeChromiumWin::adjustInnerSpinButtonStyle):
2798
2799 2011-10-11  Kentaro Hara  <haraken@chromium.org>
2800
2801         Implement a WebKitTransitionEvent constructor for JSC
2802         https://bugs.webkit.org/show_bug.cgi?id=69829
2803
2804         Reviewed by Adam Barth.
2805
2806         There is no spec for the WebKitTransitionEvent constructor
2807         since it is WebKit-specific. However, judging from the current
2808         IDL of initWebKitTransitionEvent(), the constructor IDL
2809         should be as follows.
2810
2811         [Constructor(DOMString type, optional WebKitTransitionEventInit eventInitDict)]
2812         interface WebKitTransitionEvent : Event {
2813             ...;
2814         }
2815
2816         dictionary WebKitTransitionEventInit : EventInit {
2817             DOMString propertyName;
2818             double elapsedTime;
2819         }
2820
2821         Test: fast/events/constructors/webkit-transition-event-constructor.html
2822
2823         * bindings/generic/EventConstructors.h: Added a definition for the WebKitTransitionEvent constructor.
2824         * bindings/js/JSEventConstructors.cpp: Added #includes for WebKitTransitionEvent.
2825         * dom/WebKitTransitionEvent.cpp:
2826         (WebCore::WebKitTransitionEventInit::WebKitTransitionEventInit):
2827         (WebCore::WebKitTransitionEvent::WebKitTransitionEvent):
2828         (WebCore::WebKitTransitionEvent::initWebKitTransitionEvent):
2829         * dom/WebKitTransitionEvent.h: Added a definition for WebKitTransitionEventInit.
2830         (WebCore::WebKitTransitionEvent::create):
2831         (WebCore::WebKitTransitionEvent::isWebKitTransitionEvent):
2832         * dom/WebKitTransitionEvent.idl: Makes WebKitTransitionEvent constructible.
2833
2834 2011-10-11  Sameer Patil  <mkrp87@motorola.com>
2835
2836         :checked pseudo selector not matching selected option 
2837         https://bugs.webkit.org/show_bug.cgi?id=63192
2838
2839         Reviewed by Kent Tamura.
2840
2841         Test: fast/css/checked-pseudo-selector.html
2842
2843         Option element selected state need to be checked in checkOneSelector, 
2844         so that it can be considered as checked on querySelectorAll(':checked').
2845
2846         * css/SelectorChecker.cpp:
2847         (WebCore::SelectorChecker::checkOneSelector):
2848
2849 2011-10-11  Ryuan Choi  <ryuan.choi@samsung.com>
2850
2851         StorageAreaSync::sync needs a transaction for better performance.
2852         https://bugs.webkit.org/show_bug.cgi?id=57694
2853
2854         Reviewed by Darin Adler.
2855
2856         For now, StorageAreaSync::sync execute SQLite operations for all items outside
2857         a transaction.
2858         However, SQLite operations outside a transaction are all atomic and thus
2859         writes will block on I/O, which makes the process slow during heavy I/O.
2860         This wrapped them with BEGIN TRANSACTION and END TRANSACTION for the better
2861         performance.
2862
2863         No new tests required.
2864         No functional changes if transaction doesn't fail.
2865         And also, it is difficult to test the case of transaction fails.
2866
2867         * storage/StorageAreaSync.cpp:
2868         (WebCore::StorageAreaSync::sync):
2869
2870 2011-10-11  Ojan Vafai  <ojan@chromium.org>
2871
2872         margin-right is ignored with vertical writing mode
2873         https://bugs.webkit.org/show_bug.cgi?id=69686
2874
2875         Reviewed by Darin Adler.
2876
2877         We need to use the parent's writing mode when grabbing
2878         the margin start/end for the purposes of computing the parent's
2879         preferred widths.
2880
2881         Test: fast/writing-mode/margins.html
2882
2883         * rendering/RenderBlock.cpp:
2884         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
2885         * rendering/RenderBlock.h:
2886
2887 2011-10-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2888
2889         Unreviewed, rolling out r97202, r97207, and r97215.
2890         http://trac.webkit.org/changeset/97202
2891         http://trac.webkit.org/changeset/97207
2892         http://trac.webkit.org/changeset/97215
2893         https://bugs.webkit.org/show_bug.cgi?id=69894
2894
2895         Broke builds (Requested by rniwa on #webkit).
2896
2897         * platform/PopupMenuClient.h:
2898         * rendering/RenderMenuList.cpp:
2899         (WebCore::RenderMenuList::showPopup):
2900         * rendering/RenderMenuList.h:
2901         * rendering/RenderObject.h:
2902         * rendering/RenderTextControlSingleLine.cpp:
2903         (WebCore::RenderTextControlSingleLine::showPopup):
2904         * rendering/RenderTextControlSingleLine.h:
2905         * testing/Internals.cpp:
2906         * testing/Internals.h:
2907         * testing/Internals.idl:
2908
2909 2011-10-11  Martin Robinson  <mrobinson@igalia.com>
2910
2911         [Soup] ResourceHandleSoup does not handle encodedBlobData
2912         https://bugs.webkit.org/show_bug.cgi?id=52092
2913
2914         Reviewed by Gustavo Noronha Silva.
2915
2916         Add support for sending encoded blob data during requests.
2917
2918         * platform/network/soup/ResourceHandleSoup.cpp:
2919         (WebCore::addFileToSoupMessageBody): Added this helper.
2920         (WebCore::blobIsOutOfDate): Ditto.
2921         (WebCore::addEncodedBlobItemToSoupMessageBody): Ditto.
2922         (WebCore::addEncodedBlobToSoupMessageBody): Ditto.
2923         (WebCore::addFormElementsToSoupMessage): No longer flatten form data, as we
2924         cannot do this in the case where the form data contains blobs. Now handle
2925         the blob case.
2926         (WebCore::loadResourceSynchronously): Add blob support for synchronous loading.
2927
2928 2011-10-11  Chris Rogers  <crogers@google.com>
2929
2930         Heap buffer overflow in Webaudio FFTFrame::doFFT
2931         https://bugs.webkit.org/show_bug.cgi?id=69447
2932
2933         Reviewed by Kenneth Russell.
2934
2935         No new tests. This only changes internal implementation details.
2936
2937         * platform/audio/HRTFKernel.cpp:
2938         (WebCore::extractAverageGroupDelay):
2939         * platform/audio/HRTFPanner.cpp:
2940         (WebCore::HRTFPanner::fftSizeForSampleRate):
2941
2942 2011-10-11  Ryosuke Niwa  <rniwa@webkit.org>
2943
2944         Second Qt minimum release build fix attempt after r97163.
2945
2946         * platform/graphics/texmap/TextureMapperNode.cpp:
2947         (WebCore::TextureMapperNode::syncCompositingStateSelf):
2948
2949 2011-10-11  Ryosuke Niwa  <rniwa@webkit.org>
2950
2951         Qt minimum release build fix attempt after r97163.
2952
2953         * platform/graphics/texmap/TextureMapperNode.cpp:
2954         (WebCore::TextureMapperNode::syncCompositingStateSelf):
2955
2956 2011-10-11  Oliver Hunt  <oliver@apple.com>
2957
2958         Clang build broken
2959         https://bugs.webkit.org/show_bug.cgi?id=69891
2960
2961         Reviewed by Darin Adler.
2962
2963         Rename CachedResourceClient::type to CachedResourceClient::resourceClientType
2964         to avoid conflict in CSSImportRule.
2965
2966         * loader/cache/CachedCSSStyleSheet.cpp:
2967         (WebCore::CachedCSSStyleSheet::didAddClient):
2968         * loader/cache/CachedFont.cpp:
2969         (WebCore::CachedFont::didAddClient):
2970         * loader/cache/CachedFont.h:
2971         (WebCore::CachedFontClient::resourceClientType):
2972         * loader/cache/CachedImage.cpp:
2973         (WebCore::CachedImage::didAddClient):
2974         * loader/cache/CachedImage.h:
2975         (WebCore::CachedImageClient::resourceClientType):
2976         * loader/cache/CachedResourceClient.h:
2977         (WebCore::CachedResourceClient::resourceClientType):
2978         * loader/cache/CachedResourceClientWalker.h:
2979         (WebCore::CachedResourceClientWalker::next):
2980         * loader/cache/CachedStyleSheetClient.h:
2981         (WebCore::CachedStyleSheetClient::resourceClientType):
2982         * loader/cache/CachedXSLStyleSheet.cpp:
2983         (WebCore::CachedXSLStyleSheet::didAddClient):
2984
2985 2011-10-11  Ryosuke Niwa  <rniwa@webkit.org>
2986
2987         Dir attribute is converted into direction property when merging paragraphs
2988         https://bugs.webkit.org/show_bug.cgi?id=69680
2989
2990         Reviewed by Enrica Casucci.
2991
2992         Don't include direction and unicode-bidi properties in the wrapping style.
2993
2994         Tests: editing/deleting/merge-paragraph-into-h1-with-dir-2.html
2995                editing/deleting/merge-paragraph-into-h1-with-dir.html
2996
2997         * editing/EditingStyle.cpp:
2998         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement): Skip unicode-bidi and direction properties.
2999         (WebCore::EditingStyle::wrappingStyleForSerialization): Extracted from StyledMarkupAccumulator::serializeNodes.
3000         * editing/EditingStyle.h:
3001         * editing/markup.cpp:
3002         (WebCore::StyledMarkupAccumulator::serializeNodes): Calls wrappingStyleForSerialization.
3003
3004 2011-10-11  Nico Weber  <thakis@chromium.org>
3005
3006         [chromium] Let rule_binding use os.execvp() instead of subprocess.call() to spawn fewer processes.
3007         https://bugs.webkit.org/show_bug.cgi?id=69589
3008
3009         Reviewed by Dirk Pranke.
3010
3011         When building with `make -j40`, all the binding rules are built en bloc. Since this script currently
3012         uses subprocess.call(), that actually spawns 80 processes at once. OS X has a max process limit of
3013         255 by default, so the build used to fail with
3014         "open2: fork failed: Resource temporarily unavailable at ../bindings/scripts/preprocessor.pm line 60"
3015         As a fix, use execvp() instead, which replaces the current process instead of spawning a new one.
3016
3017         * WebCore.gyp/scripts/rule_binding.py:
3018
3019 2011-10-11  Fady Samuel  <fsamuel@chromium.org>
3020
3021         Towards making PopupMenuClient more testable
3022         https://bugs.webkit.org/show_bug.cgi?id=69631
3023
3024         Reviewed by Simon Fraser.
3025
3026         Added some functions to window.internals to allow testing of parts of PopupMenuClient.
3027
3028         Test: fast/dom/popup-menu-client-test.html
3029
3030         * platform/PopupMenuClient.h:
3031         * rendering/RenderMenuList.cpp:
3032         (WebCore::RenderMenuList::showPopup):
3033         (WebCore::RenderMenuList::boundingBoxRect):
3034         * rendering/RenderMenuList.h:
3035         (WebCore::RenderMenuList::RenderMenuList::isPopupMenuClient):
3036         * rendering/RenderObject.h:
3037         (WebCore::RenderObject::isPopupMenuClient):
3038         * rendering/RenderTextControlSingleLine.cpp:
3039         (WebCore::RenderTextControlSingleLine::showPopup):
3040         (WebCore::RenderTextControlSingleLine::boundingBoxRect):
3041         * rendering/RenderTextControlSingleLine.h:
3042         (WebCore::RenderTextControlSingleLine::isPopupMenuClient):
3043         * testing/Internals.cpp:
3044         (WebCore::Internals::toPopupMenuClient):
3045         (WebCore::Internals::popupClientPaddingLeft):
3046         (WebCore::Internals::popupClientPaddingRight):
3047         (WebCore::Internals::popupClientBoundingBoxRect):
3048         * testing/Internals.h:
3049         * testing/Internals.idl:
3050
3051 2011-10-11  Nate Chapin  <japhet@chromium.org>
3052
3053         Make CachedResourceClientWalker templates, and
3054         have it check and filter out bad casts when iterating
3055         (currently we rely on CachedResourceClients being careful
3056         to inherit from the right subclass for the type of resource
3057         they want to load).
3058         https://bugs.webkit.org/show_bug.cgi?id=69877
3059
3060         Reviewed by Adam Barth.
3061
3062         No new tests, no functionality change.
3063
3064         * CMakeLists.txt:
3065         * GNUmakefile.list.am:
3066         * WebCore.gypi:
3067         * WebCore.pro:
3068         * WebCore.vcproj/WebCore.vcproj:
3069         * WebCore.xcodeproj/project.pbxproj:
3070         * loader/cache/CachedCSSStyleSheet.cpp:
3071         * loader/cache/CachedFont.cpp:
3072         * loader/cache/CachedFont.h:
3073         * loader/cache/CachedImage.cpp:
3074         * loader/cache/CachedImage.h:
3075         * loader/cache/CachedResource.cpp:
3076         * loader/cache/CachedResourceClient.h:
3077         * loader/cache/CachedResourceClientWalker.cpp: Removed.
3078         * loader/cache/CachedResourceClientWalker.h:
3079         * loader/cache/CachedStyleSheetClient.h:
3080         * loader/cache/CachedXSLStyleSheet.cpp:
3081
3082 2011-10-11  W. James MacLean  <wjmaclean@chromium.org>
3083
3084         [chromium] Fix compilation guards in ScrollAnimatorNone (GESTURE_EVENTS).
3085         https://bugs.webkit.org/show_bug.cgi?id=69853
3086
3087         Reviewed by Kenneth Russell.
3088
3089         Adding missing guards ENABLE(GESTURE_EVENTS) in ScrollAnimatorNone. So
3090         far this hasn't been a problem since GESTURE_EVENTS are usually turned on
3091         whenever SMOOTH_SCROLLING is, but it could be a problem if this changes.
3092
3093         No new tests (compilation without errors is the test).
3094
3095         * platform/ScrollAnimatorNone.cpp:
3096         * platform/ScrollAnimatorNone.h:
3097
3098 2011-10-11  Kenneth Russell  <kbr@google.com>
3099
3100         [chromium] Check for lost context at beginning of compositor's execution
3101         https://bugs.webkit.org/show_bug.cgi?id=69776
3102
3103         Reviewed by James Robinson.
3104
3105         Test: platform/chromium/compositing/webgl-loses-compositor-context.html
3106
3107         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3108         (WebCore::CCSingleThreadProxy::recreateContextIfNeeded):
3109
3110 2011-10-11  W. James MacLean  <wjmaclean@chromium.org>
3111
3112         Loss of precision when converting from double to int and double to float in FrameView::zoomAnimatorTransformChanged()
3113         https://bugs.webkit.org/show_bug.cgi?id=69739
3114
3115         Reviewed by Simon Fraser.
3116
3117         Change 'double' parameters in FrameView:: & ScrollableArea::zoomAnimatorTransformChanged()
3118         to 'float' to avoid loss of precision warnings when invoking setPageScalefactor.
3119
3120         Test coverage provided by existing zoom-animator tests.
3121
3122         * page/FrameView.cpp:
3123         (WebCore::FrameView::zoomAnimatorTransformChanged):
3124         * page/FrameView.h:
3125         * platform/ScrollableArea.cpp:
3126         (WebCore::ScrollableArea::zoomAnimatorTransformChanged):
3127         * platform/ScrollableArea.h:
3128
3129 2011-10-11  No'am Rosenthal  <noam.rosenthal@nokia.com>
3130
3131         Unreviewed build fix, unbreaking the Qt minimal bot.
3132         Some #ifdef ENABLED(TILED_BACKING_STORE) clauses were missing.
3133
3134         * platform/graphics/texmap/TextureMapperNode.cpp:
3135         (WebCore::TextureMapperNode::computeTiles):
3136         (WebCore::TextureMapperNode::renderContent):
3137         (WebCore::TextureMapperNode::paintSelf):
3138
3139 2011-10-11  Abhishek Arya  <inferno@chromium.org>
3140
3141         Generalize r95461 change to include table-cell and 
3142         allow splitting between :before, :after content.
3143         https://bugs.webkit.org/show_bug.cgi?id=69854
3144
3145         Reviewed by Eric Seidel.
3146
3147         Test: fast/table/table-row-before-after-content-around-table-cell.html
3148
3149         * rendering/RenderObject.cpp:
3150         (WebCore::RenderObject::addChild):
3151
3152 2011-10-11  Dominic Mazzoni  <dmazzoni@google.com>
3153
3154         AccessibilityMenuList should fire change notification when popup is not open.
3155         https://bugs.webkit.org/show_bug.cgi?id=69440
3156
3157         Reviewed by Chris Fleizach.
3158
3159         Test: accessibility/menu-list-sends-change-notification.html
3160
3161         * accessibility/AccessibilityMenuList.cpp:
3162         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
3163
3164 2011-10-11  Joshua Bell  <jsbell@chromium.org>
3165
3166         IndexedDB: implement IDBFactory.cmp method
3167         https://bugs.webkit.org/show_bug.cgi?id=62293
3168
3169         Reviewed by Tony Chang.
3170
3171         * storage/IDBFactory.cpp:
3172         (WebCore::IDBFactory::cmp):
3173         * storage/IDBFactory.h:
3174         * storage/IDBFactory.idl:
3175         * storage/IDBKey.cpp:
3176         (WebCore::IDBKey::compare):
3177         (WebCore::IDBKey::isLessThan):
3178         (WebCore::IDBKey::isEqual):
3179         * storage/IDBKey.h:
3180
3181 2011-10-11  No'am Rosenthal  <noam.rosenthal@nokia.com>
3182
3183         [Texmap] TextureMapperGL leaves GL in a modified state.
3184         https://bugs.webkit.org/show_bug.cgi?id=68983
3185
3186         Reviewed by Andreas Kling.
3187
3188         Disable the vertexAttribArray after clipping.
3189
3190         No new functionality so no new tests.
3191
3192         * platform/graphics/opengl/TextureMapperGL.cpp:
3193         (WebCore::TextureMapperGL::beginClip):
3194
3195 2011-10-11  No'am Rosenthal  <noam.rosenthal@nokia.com>
3196
3197         [Qt][WK2] Synchronize tiling with accelerated compositing
3198         https://bugs.webkit.org/show_bug.cgi?id=69151
3199
3200         Reviewed by Kenneth Rohde Christiansen.
3201
3202         Enable "externally managed" tiles in TextureMapperNodes.
3203         Currently, TextureMapperNodes manage tiles themselves, the tiles being there only to
3204         overcome the 2k texture size limitation. For WebKit2, we want those tiles to be managed
3205         externally, namely through the web process via the remote tile backend for
3206         TiledBackingStore.
3207
3208         This patch adds a store for those externally managed tiles, and adds the necessary code to
3209         paint them instead of the owned tiles when appropriate.
3210
3211         In addition, in order to support externally managed remote tiles, we have to calculate per-
3212         layer visible rects and pass them to the web process. The new collectVisibleContentRects
3213         does this - and is directly tied to the externally-managed tile approach.
3214
3215         Code is disabled for now, but covered by existing compositing tests.
3216
3217         * platform/graphics/texmap/TextureMapperNode.cpp:
3218         (WebCore::TextureMapperNode::computeTiles):
3219         (WebCore::clampRect):
3220         (WebCore::TextureMapperNode::collectVisibleContentRects):
3221         (WebCore::TextureMapperNode::renderContent):
3222         (WebCore::TextureMapperNode::targetRectForTileRect):
3223         (WebCore::TextureMapperNode::paintSelf):
3224         (WebCore::TextureMapperNode::createContentsTile):
3225         (WebCore::TextureMapperNode::removeContentsTile):
3226         (WebCore::TextureMapperNode::setTileBackBufferTextureForDirectlyCompositedImage):
3227         (WebCore::TextureMapperNode::clearAllDirectlyCompositedImageTiles):
3228         (WebCore::TextureMapperNode::setContentsTileBackBuffer):
3229         (WebCore::TextureMapperNode::swapContentsBuffers):
3230         (WebCore::TextureMapperNode::syncCompositingStateSelf):
3231         (WebCore::TextureMapperNode::syncCompositingState):
3232         * platform/graphics/texmap/TextureMapperNode.h:
3233         (WebCore::TextureMapperNode::size):
3234         (WebCore::TextureMapperNode::setTileOwnership):
3235         (WebCore::TextureMapperNode::setID):
3236         (WebCore::TextureMapperNode::id):
3237         (WebCore::TextureMapperNode::texture):
3238         (WebCore::TextureMapperNode::ExternallyManagedTile::ExternallyManagedTile):
3239         (WebCore::TextureMapperNode::State::State):
3240
3241 2011-10-11  Claudio Saavedra  <csaavedra@igalia.com>
3242
3243         [GTK] GtkAuthenticationDialog: use GtkGrid instead of GtkTable
3244         https://bugs.webkit.org/show_bug.cgi?id=69749
3245
3246         Reviewed by Martin Robinson.
3247
3248         * platform/gtk/GtkAuthenticationDialog.cpp:
3249         (WebCore::addEntryToGrid): Migrate to GtkGrid when using GTK+ 3
3250         (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog):
3251         Ditto.
3252
3253 2011-10-11  Alexey Proskuryakov  <ap@apple.com>
3254
3255         Build fix.
3256
3257         * WebCore.exp.in: Export GraphicsContext::clearShadow().
3258
3259 2011-10-10  Adam Klein  <adamk@chromium.org>
3260
3261         [MutationObservers] Add stub implementation of WebKitMutationObserver
3262         https://bugs.webkit.org/show_bug.cgi?id=68949
3263
3264         Reviewed by Ryosuke Niwa, Oliver Hunt, and Dimitri Glazkov.
3265
3266         See https://bugs.webkit.org/show_bug.cgi?id=68729 for the metabug.
3267
3268         This patch adds a stub WebKitMutationObserver and its supporting classes
3269         MutationCallback and MutationObserverOptions.
3270         No implementation is provided for the all-important observe() and
3271         disconnect() methods.
3272
3273         Note that WebKitMutationObserver is vendor-prefixed since it has a
3274         constructor exposed on DOMWindow.  None of the rest of the API needs
3275         prefixing, as it's only available via a call through a MutationObserver
3276         callback (created by instantiating WebKitMutationObserver).
3277
3278         Given the number of files required to get just the stub up and running,
3279         it seems reasonable to leave the actual implementation for the next
3280         patch (or more likely several patches).  I've left FIXMEs in all the places
3281         that'll need augmentation.
3282
3283         Tests: fast/mutation/mutation-observer-constructor.html
3284                fast/mutation/observe-exceptions.html
3285
3286         * CMakeLists.txt:
3287         * DerivedSources.cpp:
3288         * DerivedSources.make:
3289         * GNUmakefile.list.am:
3290         * UseJSC.cmake:
3291         * WebCore.gypi:
3292         * WebCore.pro:
3293         * WebCore.vcproj/WebCore.vcproj:
3294         * WebCore.xcodeproj/project.pbxproj:
3295         * bindings/js/JSDictionary.h:
3296         (WebCore::JSDictionary::tryGetProperty):
3297         * bindings/js/JSMutationCallbackCustom.cpp: Added.
3298         (WebCore::JSMutationCallback::handleEvent):
3299         * bindings/js/JSWebKitMutationObserverCustom.cpp: Added.
3300         (WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver):
3301         (WebCore::JSWebKitMutationObserver::observe):
3302         * bindings/v8/custom/V8MutationCallbackCustom.cpp: Added.
3303         (WebCore::V8MutationCallback::handleEvent):
3304         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: Added.
3305         (WebCore::V8WebKitMutationObserver::constructorCallback):
3306         (WebCore::V8WebKitMutationObserver::observeCallback):
3307         * dom/MutationCallback.h: Added.
3308         (WebCore::MutationCallback::~MutationCallback):
3309         * dom/MutationCallback.idl: Added.
3310         * dom/MutationObserverOptions.h: Added.
3311         (WebCore::MutationObserverOptions::create):
3312         (WebCore::MutationObserverOptions::childList):
3313         (WebCore::MutationObserverOptions::setChildList):
3314         (WebCore::MutationObserverOptions::attributes):
3315         (WebCore::MutationObserverOptions::setAttributes):
3316         (WebCore::MutationObserverOptions::characterData):
3317         (WebCore::MutationObserverOptions::setCharacterData):
3318         (WebCore::MutationObserverOptions::subtree):
3319         (WebCore::MutationObserverOptions::setSubtree):
3320         (WebCore::MutationObserverOptions::attributeOldValue):
3321         (WebCore::MutationObserverOptions::setAttributeOldValue):
3322         (WebCore::MutationObserverOptions::characterDataOldValue):
3323         (WebCore::MutationObserverOptions::setCharacterDataOldValue):
3324         (WebCore::MutationObserverOptions::MutationObserverOptions):
3325         * dom/WebKitMutationObserver.cpp: Added.
3326         (WebCore::WebKitMutationObserver::create):
3327         (WebCore::WebKitMutationObserver::WebKitMutationObserver):
3328         (WebCore::WebKitMutationObserver::~WebKitMutationObserver):
3329         (WebCore::WebKitMutationObserver::observe):
3330         (WebCore::WebKitMutationObserver::disconnect):
3331         * dom/WebKitMutationObserver.h: Added.
3332         * dom/WebKitMutationObserver.idl: Added.
3333         * page/DOMWindow.idl:
3334
3335 2011-10-11  Arun Patole  <BMF834@motorola.com>
3336
3337         Need more efficient ways to set inline CSS styles
3338         https://bugs.webkit.org/show_bug.cgi?id=58157
3339
3340         Reviewed by Dimitri Glazkov.
3341
3342         No new tests added as this is just a code optimization.
3343
3344         Code optimization:
3345           -Used CSSPropertyNames, CSSValues and CSSPrimitiveValues instead of Strings.
3346           -Removed displayString(), webkitTransitionString(), opacityString() functions as they will no longer be needed after this change.
3347           -Moved makeOpaque and makeTransparent functionality to MediaControlPanelElement from MediaControlRootElement.
3348
3349         * html/HTMLMediaElement.cpp:
3350         (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
3351         * html/shadow/MediaControlElements.cpp:
3352         (WebCore::MediaControlElement::show):
3353         (WebCore::MediaControlElement::hide):
3354         (WebCore::MediaControlPanelElement::MediaControlPanelElement):
3355         (WebCore::MediaControlPanelElement::makeOpaque):
3356         (WebCore::MediaControlPanelElement::makeTransparent):
3357         (WebCore::MediaControlInputElement::show):
3358         (WebCore::MediaControlInputElement::hide):
3359         * html/shadow/MediaControlElements.h:
3360         * html/shadow/MediaControlRootElement.cpp:
3361         (WebCore::MediaControlRootElement::MediaControlRootElement):
3362         (WebCore::MediaControlRootElement::makeOpaque):
3363         (WebCore::MediaControlRootElement::makeTransparent):
3364         * html/shadow/MediaControlRootElement.h:
3365         * html/shadow/MediaControlRootElementChromium.cpp:
3366         (WebCore::MediaControlRootElementChromium::makeOpaque):
3367         (WebCore::MediaControlRootElementChromium::makeTransparent):
3368
3369 2011-10-11  Pavel Feldman  <pfeldman@google.com>
3370
3371         Web Inspector: make Extensions component compile.
3372         https://bugs.webkit.org/show_bug.cgi?id=69833
3373
3374         Reviewed by Yury Semikhatsky.
3375
3376         * inspector/compile-front-end.sh:
3377         * inspector/front-end/BinarySearch.js:
3378         * inspector/front-end/ConsoleModel.js:
3379         * inspector/front-end/ExtensionAPI.js:
3380         (injectedExtensionAPI.Network.prototype.addRequestHeaders):
3381         (injectedExtensionAPI.AuditResultImpl.prototype.addResult):
3382         (injectedExtensionAPI.AuditResultNode.prototype.addChild):
3383         * inspector/front-end/ExtensionAuditCategory.js:
3384         * inspector/front-end/ExtensionPanel.js:
3385         (WebInspector.ExtensionSidebarPane.prototype.setExpression):
3386         * inspector/front-end/ExtensionRegistryStub.js:
3387         * inspector/front-end/ExtensionServer.js:
3388         (WebInspector.ExtensionServer.prototype._postNotification):
3389         (WebInspector.ExtensionServer.prototype._onAddRequestHeaders):
3390         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
3391         (WebInspector.ExtensionServer.prototype._registerExtension):
3392         (WebInspector.ExtensionStatus):
3393         * inspector/front-end/NetworkLog.js:
3394         (WebInspector.NetworkLog.prototype._onResourceStarted):
3395         * inspector/front-end/Object.js:
3396         (WebInspector.Object.prototype.dispatchEventToListeners):
3397         * inspector/front-end/externs.js:
3398         (console.warn):
3399         (console.assert):
3400         (console.error):
3401         ():
3402         (AuditResult):
3403         (EventSink):
3404         (ExtensionSidebarPane):
3405         (Panel):
3406         (PanelWithSidebar):
3407         (Request):
3408         (Resource):
3409         (Timeline):
3410
3411 2011-10-05  Pavel Podivilov  <podivilov@chromium.org>
3412
3413         Web Inspector: implement CompilerSourceMappingProvider.
3414         https://bugs.webkit.org/show_bug.cgi?id=69423
3415
3416         Reviewed by Pavel Feldman.
3417
3418         CompilerSourceMappingProvider implements a cross-domain communication channel for loading source mappings and source files.
3419         Front-end page can't send XHRs to source mapping server directly due to SOP restrictions. Instead, we inject an invisible
3420         iframe that is loaded from source mapping server and use window.postMessage to communicate with it. iframe has a different
3421         origin and thus doesn't have access to front-end window.
3422
3423         Test: http/tests/inspector/compiler-source-mapping-provider.html
3424
3425         * inspector/front-end/CompilerSourceMappingProvider.js:
3426         (WebInspector.CompilerSourceMappingProvider):
3427         (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping.frameLoaded.didLoadData):
3428         (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping.frameLoaded):
3429         (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceMapping):
3430         (WebInspector.CompilerSourceMappingProvider.prototype.loadSourceCode):
3431         (WebInspector.CompilerSourceMappingProvider.prototype._sendRequest):
3432         (WebInspector.CompilerSourceMappingProvider.prototype._onMessage):
3433         (WebInspector.CompilerSourceMappingProvider.prototype._cancelRequest):
3434         * inspector/front-end/inspector.js:
3435         (WebInspector.installSourceMappingForTest):
3436
3437 2011-10-11  Mike Reed  <reed@google.com>
3438
3439         re-add support for GDI text behind a compile flag
3440         https://bugs.webkit.org/show_bug.cgi?id=69530
3441
3442         Reviewed by James Robinson.
3443
3444         Reverts back to using GDI for text (when possible)
3445         but keeps skia-text version behind a compile-flag. If/when we can
3446         resolve the outstanding soft-clip and intl-performance bugs with the
3447         skia version, we may change the compile-flag to reenable skia.
3448         
3449         Previous change http://trac.webkit.org/changeset/94589 removed the GDI code.
3450
3451         * platform/graphics/chromium/FontChromiumWin.cpp:
3452         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter):
3453         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::init):
3454         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
3455         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
3456         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter):
3457         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter):
3458         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::estimateTextBounds):
3459         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
3460         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::hdc):
3461         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter):
3462         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::~TransparencyAwareUniscribePainter):
3463         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds):
3464         (WebCore::drawGlyphsWin):
3465         (WebCore::Font::drawGlyphs):
3466         (WebCore::Font::drawComplexText):
3467         * platform/graphics/chromium/UniscribeHelper.cpp:
3468         (WebCore::UniscribeHelper::draw):
3469         * platform/graphics/skia/PlatformContextSkia.cpp:
3470         (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed):
3471         * platform/graphics/skia/PlatformContextSkia.h:
3472         * platform/graphics/skia/SkiaFontWin.cpp:
3473         (WebCore::windowsCanHandleDrawTextShadow):
3474         (WebCore::windowsCanHandleTextDrawing):
3475         (WebCore::windowsCanHandleTextDrawingWithoutShadow):
3476         * platform/graphics/skia/SkiaFontWin.h:
3477
3478 2011-10-11  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3479
3480         [Qt] Remove all references to QTDIR_build and standalone_package
3481
3482         Qt is now modularized, which means we no longer import WebKit into
3483         the Qt source tree. Instead we use git submodules, and building
3484         QtWebKit as "part of Qt" is really building QtWebKit as from trunk.
3485
3486         To decrease the number of buildsystem configurations we also remove
3487         the standalone_package code-path used when we were providing tarballs
3488         with the derived sources pre-generated.
3489
3490         Reviewed by Simon Hausmann.
3491
3492         * CodeGenerators.pri:
3493         * WebCore.pri:
3494         * features.pri:
3495
3496 2011-10-10  Andreas Kling  <kling@webkit.org>
3497
3498         Shrink WebCore::Node on 64-bit.
3499         https://bugs.webkit.org/show_bug.cgi?id=69768
3500
3501         Reviewed by Antti Koivisto.
3502
3503         Rearrange TreeShared and Node members so that the node flags fall
3504         into the padding at the end of TreeShared on 64-bit, reducing the
3505         size of Node (and all subclasses) by 8 bytes.
3506
3507         * dom/Document.h:
3508         (WebCore::Node::Node):
3509         * dom/Node.h:
3510         * platform/TreeShared.h:
3511         (WebCore::TreeShared::TreeShared):
3512
3513 2011-10-11  Kent Tamura  <tkent@chromium.org>
3514
3515         Move m_listItems and m_recalcListItems from SelectElementData to HTMLSelectElement
3516         https://bugs.webkit.org/show_bug.cgi?id=69812
3517
3518         Reviewed by Ryosuke Niwa.
3519
3520         Move SelectElementData::m_recalcListItems,
3521         SelectElementData::m_listItems, and related functions of
3522         SelectElementData class to HTMLSelectElement.
3523
3524         Non-const listItems() was removed because it is used only in
3525         recalcListItemsInternal() and it can access m_listItems diretly.
3526
3527         Static recalcListItems() is changed to non-static, and renamed to
3528         recalcListItemsInternal() in order to avoid confusion with the
3529         existing recalcListItems().
3530
3531         No new tests, just a refactoring.
3532
3533         * dom/SelectElement.cpp:
3534         Move checkListItems() and listItems() to HTMLSelectElement.
3535         (WebCore::SelectElementData::SelectElementData):
3536         Remove Initialization of m_recalcListItems.
3537         * dom/SelectElement.h:
3538         Move m_recalcListItems, m_listItems, and related functions to HTMLSelectElement.
3539         * html/HTMLSelectElement.cpp:
3540         (WebCore::HTMLSelectElement::HTMLSelectElement):
3541         Initializes m_recalcListItems.
3542         (WebCore::HTMLSelectElement::recalcListItems):
3543         Rename the static recalcListItems() to recalcListItemsInternal().
3544         (WebCore::HTMLSelectElement::recalcListItemsIfNeeded):
3545         Use m_recalcListItems directly.
3546         (WebCore::HTMLSelectElement::nextSelectableListIndex):
3547         Update a listItems() callsite.
3548         (WebCore::HTMLSelectElement::previousSelectableListIndex): ditto.
3549         (WebCore::HTMLSelectElement::firstSelectableListIndex): ditto.
3550         (WebCore::HTMLSelectElement::lastSelectableListIndex): ditto.
3551         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway): ditto.
3552         (WebCore::HTMLSelectElement::saveLastSelection): ditto.
3553         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex): ditto.
3554         (WebCore::HTMLSelectElement::updateListBoxSelection): ditto.
3555         (WebCore::HTMLSelectElement::listBoxOnChange): ditto.
3556         (WebCore::HTMLSelectElement::checkListItems):
3557         Moved from SelectElementData.
3558         (WebCore::HTMLSelectElement::listItems): ditto.
3559         (WebCore::HTMLSelectElement::setRecalcListItems):
3560         Use m_recalcListItems directly.
3561         (WebCore::HTMLSelectElement::recalcListItemsInternal):
3562         - Make this non-static.
3563         - Renamed from recalcListItems() to avoid confilct with another recalcListItems().
3564         - Use m_recalcListItems and m_listItems directly.
3565         (WebCore::HTMLSelectElement::selectedIndex):
3566         Update a listItems() callsite.
3567         (WebCore::HTMLSelectElement::setSelectedIndexInternal): ditto.
3568         (WebCore::HTMLSelectElement::optionToListIndex): ditto.
3569         (WebCore::HTMLSelectElement::listToOptionIndex): ditto.
3570         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation): ditto.
3571         (WebCore::HTMLSelectElement::saveFormControlState):
3572         Update callsites of listItems() and recalcListItems().
3573         (WebCore::HTMLSelectElement::restoreFormControlState):
3574         Update a listItems() callsite.
3575         (WebCore::HTMLSelectElement::appendFormData): ditto.
3576         (WebCore::HTMLSelectElement::reset): ditto.
3577         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): ditto.
3578         (WebCore::HTMLSelectElement::updateSelectedState): ditto.
3579         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): ditto.
3580         (WebCore::HTMLSelectElement::lastSelectedListIndex): ditto.
3581         (WebCore::HTMLSelectElement::typeAheadFind): ditto.
3582         (WebCore::HTMLSelectElement::insertedIntoTree):
3583         Update a recalcListItems() callsite.
3584         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
3585         Update a listItems() callsite.
3586         (WebCore::HTMLSelectElement::length): ditto.
3587         * html/HTMLSelectElement.h:
3588         Move m_recalcListItems, m_listItems, and related functions from SelectElementData.
3589         * html/HTMLSelectElementWin.cpp:
3590         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
3591         Update a listItems() callsite.
3592
3593 2011-10-11  Kenichi Ishibashi  <bashi@chromium.org>
3594
3595         [Chromium] Complex script code path breaks on Windows XP when a CFF font is used
3596         https://bugs.webkit.org/show_bug.cgi?id=69497
3597
3598         Reviewed by Kent Tamura.
3599
3600         Don't use CFF webfonts when ScriptShape() can't handle it.
3601         ScriptShape() indicates us the case by setting fNoGlyphIndex to TRUE.
3602         If it's TRUE, we don't use the font. This could happen with early
3603         version of Uniscribe on WinXP.
3604
3605         No new tests because the version of Uniscribe depends on environment.
3606         One can install newer version of Uniscribe on WinXP.
3607
3608         * platform/graphics/chromium/UniscribeHelper.cpp:
3609         (WebCore::canUseGlyphIndex): Added.
3610         (WebCore::UniscribeHelper::shape): Don't use the shape result when canUseGlyphIndex() returns false.
3611
3612 2011-10-11  John Bauman  <jbauman@chromium.org>
3613
3614         Fix crash with toDataURL to JPEG
3615         https://bugs.webkit.org/show_bug.cgi?id=69681
3616
3617         Reviewed by Kenneth Russell.
3618
3619         Move RefPtr declaration outside if to make sure image data still
3620         exists through CGImageToDataURL.
3621
3622         * platform/graphics/cg/ImageBufferCG.cpp:
3623         (WebCore::ImageBuffer::toDataURL):
3624
3625 2011-10-10  Adam Barth  <abarth@webkit.org>
3626
3627         Update test results.
3628
3629         * bindings/scripts/test/V8/V8TestInterface.h:
3630         (WebCore::V8TestInterface::existingWrapper):
3631         (WebCore::V8TestInterface::wrap):
3632         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
3633         (WebCore::V8TestMediaQueryListListener::existingWrapper):
3634         (WebCore::V8TestMediaQueryListListener::wrap):
3635         * bindings/scripts/test/V8/V8TestObj.cpp:
3636         (WebCore::TestObjInternal::readOnlyTestObjAttrAttrGetter):
3637         (WebCore::TestObjInternal::cachedAttribute1AttrGetter):
3638         (WebCore::TestObjInternal::cachedAttribute2AttrGetter):
3639         * bindings/scripts/test/V8/V8TestObj.h:
3640         (WebCore::V8TestObj::existingWrapper):
3641         (WebCore::V8TestObj::wrap):
3642         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
3643         (WebCore::V8TestSerializedScriptValueInterface::existingWrapper):
3644         (WebCore::V8TestSerializedScriptValueInterface::wrap):
3645
3646 2011-10-10  Abhishek Arya  <inferno@chromium.org>
3647
3648         Style not updated on text fragment in :first-letter
3649         nested in :before table.
3650         https://bugs.webkit.org/show_bug.cgi?id=69540
3651
3652         Reviewed by Dan Bernstein.
3653
3654         Test: fast/css-generated-content/first-letter-in-nested-before-table.html
3655
3656         * rendering/RenderObjectChildList.cpp:
3657         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
3658
3659 2011-10-10  Sheriff Bot  <webkit.review.bot@gmail.com>
3660
3661         Unreviewed, rolling out r97121.
3662         http://trac.webkit.org/changeset/97121
3663         https://bugs.webkit.org/show_bug.cgi?id=69815
3664
3665         Many layout tests failed (Requested by tkent on #webkit).
3666
3667         * dom/SelectElement.cpp:
3668         (WebCore::SelectElementData::SelectElementData):
3669         (WebCore::SelectElementData::checkListItems):
3670         (WebCore::SelectElementData::listItems):
3671         * dom/SelectElement.h:
3672         (WebCore::SelectElementData::shouldRecalcListItems):
3673         (WebCore::SelectElementData::setShouldRecalcListItems):
3674         (WebCore::SelectElementData::rawListItems):
3675         * html/HTMLSelectElement.cpp:
3676         (WebCore::HTMLSelectElement::HTMLSelectElement):
3677         (WebCore::HTMLSelectElement::recalcListItems):
3678         (WebCore::HTMLSelectElement::recalcListItemsIfNeeded):
3679         (WebCore::HTMLSelectElement::nextSelectableListIndex):
3680         (WebCore::HTMLSelectElement::previousSelectableListIndex):
3681         (WebCore::HTMLSelectElement::firstSelectableListIndex):
3682         (WebCore::HTMLSelectElement::lastSelectableListIndex):
3683         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway):
3684         (WebCore::HTMLSelectElement::saveLastSelection):
3685         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
3686         (WebCore::HTMLSelectElement::updateListBoxSelection):
3687         (WebCore::HTMLSelectElement::listBoxOnChange):
3688         (WebCore::HTMLSelectElement::setRecalcListItems):
3689         (WebCore::HTMLSelectElement::selectedIndex):
3690         (WebCore::HTMLSelectElement::setSelectedIndexInternal):
3691         (WebCore::HTMLSelectElement::optionToListIndex):
3692         (WebCore::HTMLSelectElement::listToOptionIndex):
3693         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
3694         (WebCore::HTMLSelectElement::saveFormControlState):
3695         (WebCore::HTMLSelectElement::restoreFormControlState):
3696         (WebCore::HTMLSelectElement::appendFormData):
3697         (WebCore::HTMLSelectElement::reset):
3698         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
3699         (WebCore::HTMLSelectElement::updateSelectedState):
3700         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
3701         (WebCore::HTMLSelectElement::lastSelectedListIndex):
3702         (WebCore::HTMLSelectElement::typeAheadFind):
3703         (WebCore::HTMLSelectElement::insertedIntoTree):
3704         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
3705         (WebCore::HTMLSelectElement::length):
3706         * html/HTMLSelectElement.h:
3707         (WebCore::HTMLSelectElement::listItems):
3708         * html/HTMLSelectElementWin.cpp:
3709         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
3710
3711 2011-10-10  Kent Tamura  <tkent@chromium.org>
3712
3713         Move m_listItems and m_recalcListItems from SelectElementData to HTMLSelectElement
3714         https://bugs.webkit.org/show_bug.cgi?id=69812
3715
3716         Reviewed by Ryosuke Niwa.
3717
3718         Move SelectElementData::m_recalcListItems,
3719         SelectElementData::m_listItems, and related functions of
3720         SelectElementData class to HTMLSelectElement.
3721
3722         Non-const listItems() was removed because it is used only in
3723         recalcListItemsInternal() and it can access m_listItems diretly.
3724
3725         Static recalcListItems() is changed to non-static, and renamed to
3726         recalcListItemsInternal() in order to avoid confusion with the
3727         existing recalcListItems().
3728
3729         No new tests, just a refactoring.
3730
3731         * dom/SelectElement.cpp:
3732         Move checkListItems() and listItems() to HTMLSelectElement.
3733         (WebCore::SelectElementData::SelectElementData):
3734         Remove Initialization of m_recalcListItems.
3735         * dom/SelectElement.h:
3736         Move m_recalcListItems, m_listItems, and related functions to HTMLSelectElement.
3737         * html/HTMLSelectElement.cpp:
3738         (WebCore::HTMLSelectElement::HTMLSelectElement):
3739         Initializes m_recalcListItems.
3740         (WebCore::HTMLSelectElement::recalcListItems):
3741         Rename the static recalcListItems() to recalcListItemsInternal().
3742         (WebCore::HTMLSelectElement::recalcListItemsIfNeeded):
3743         Use m_recalcListItems directly.
3744         (WebCore::HTMLSelectElement::nextSelectableListIndex):
3745         Update a listItems() callsite.
3746         (WebCore::HTMLSelectElement::previousSelectableListIndex): ditto.
3747         (WebCore::HTMLSelectElement::firstSelectableListIndex): ditto.
3748         (WebCore::HTMLSelectElement::lastSelectableListIndex): ditto.
3749         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway): ditto.
3750         (WebCore::HTMLSelectElement::saveLastSelection): ditto.
3751         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex): ditto.
3752         (WebCore::HTMLSelectElement::updateListBoxSelection): ditto.
3753         (WebCore::HTMLSelectElement::listBoxOnChange): ditto.
3754         (WebCore::HTMLSelectElement::checkListItems):
3755         Moved from SelectElementData.
3756         (WebCore::HTMLSelectElement::listItems): ditto.
3757         (WebCore::HTMLSelectElement::setRecalcListItems):
3758         Use m_recalcListItems directly.
3759         (WebCore::HTMLSelectElement::recalcListItemsInternal):
3760         - Make this non-static.
3761         - Renamed from recalcListItems() to avoid confilct with another recalcListItems().
3762         - Use m_recalcListItems and m_listItems directly.
3763         (WebCore::HTMLSelectElement::selectedIndex):
3764         Update a listItems() callsite.
3765         (WebCore::HTMLSelectElement::setSelectedIndexInternal): ditto.
3766         (WebCore::HTMLSelectElement::optionToListIndex): ditto.
3767         (WebCore::HTMLSelectElement::listToOptionIndex): ditto.
3768         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation): ditto.
3769         (WebCore::HTMLSelectElement::saveFormControlState):
3770         Update callsites of listItems() and recalcListItems().
3771         (WebCore::HTMLSelectElement::restoreFormControlState):
3772         Update a listItems() callsite.
3773         (WebCore::HTMLSelectElement::appendFormData): ditto.
3774         (WebCore::HTMLSelectElement::reset): ditto.
3775         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): ditto.
3776         (WebCore::HTMLSelectElement::updateSelectedState): ditto.
3777         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): ditto.
3778         (WebCore::HTMLSelectElement::lastSelectedListIndex): ditto.
3779         (WebCore::HTMLSelectElement::typeAheadFind): ditto.
3780         (WebCore::HTMLSelectElement::insertedIntoTree):
3781         Update a recalcListItems() callsite.
3782         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
3783         Update a listItems() callsite.
3784         (WebCore::HTMLSelectElement::length): ditto.
3785         * html/HTMLSelectElement.h:
3786         Move m_recalcListItems, m_listItems, and related functions from SelectElementData.
3787         * html/HTMLSelectElementWin.cpp:
3788         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
3789         Update a listItems() callsite.
3790
3791 2011-10-10  Dan Bernstein  <mitz@apple.com>
3792
3793         <rdar://problem/10246137> Duplicate ::after content when both ::before and ::after are styled as table parts
3794
3795         Reviewed by Sam Weinig.
3796
3797         Test: fast/css-generated-content/table-parts-before-and-after.html
3798
3799         * rendering/RenderObject.cpp:
3800         (WebCore::RenderObject::addChild): Prevented table part childern after a ::before table from being merged
3801         into it.
3802         * rendering/RenderTable.cpp:
3803         (WebCore::RenderTable::addChild): Prevented children after a ::before table section from being merged
3804         into it.
3805
3806 2011-10-10  Nate Chapin  <japhet@chromium.org>
3807
3808         Most of the functions in CachedResourceClient are specific
3809         to a single type of CachedResource. Move these callbacks into
3810         separate subclasses of CachedResourceClient, and leave only
3811         the common callback (notifyFinished) in the base class.
3812         https://bugs.webkit.org/show_bug.cgi?id=69790
3813
3814         Reviewed by Adam Barth.
3815
3816         No new tests, no functionality changed intended.
3817
3818         * css/CSSFontFaceSource.h:
3819         * css/CSSImageValue.h:
3820         * css/CSSImportRule.h:
3821         * dom/ProcessingInstruction.cpp:
3822         * dom/ProcessingInstruction.h:
3823         * html/HTMLLinkElement.h:
3824         * html/ImageDocument.h:
3825         * loader/ImageLoader.h:
3826         * loader/cache/CachedCSSStyleSheet.cpp:
3827         * loader/cache/CachedCSSStyleSheet.h:
3828         * loader/cache/CachedFont.cpp:
3829         * loader/cache/CachedFont.h:
3830         * loader/cache/CachedImage.cpp:
3831         * loader/cache/CachedImage.h:
3832         * loader/cache/CachedResourceClient.h:
3833         * loader/cache/CachedXSLStyleSheet.cpp:
3834         * loader/cache/CachedXSLStyleSheet.h:
3835         * platform/chromium/ClipboardChromium.h:
3836         * platform/gtk/ClipboardGtk.h:
3837         * platform/mac/ClipboardMac.h:
3838         * platform/qt/ClipboardQt.h:
3839         * platform/win/ClipboardWin.h:
3840         * rendering/RenderObject.cpp:
3841         * rendering/RenderObject.h:
3842         * svg/SVGFEImageElement.h:
3843         * svg/SVGFontFaceUriElement.h:
3844         * xml/XSLImportRule.h:
3845
3846 2011-10-10  Sheriff Bot  <webkit.review.bot@gmail.com>
3847
3848         Unreviewed, rolling out r97087.
3849         http://trac.webkit.org/changeset/97087
3850         https://bugs.webkit.org/show_bug.cgi?id=69805
3851
3852         failing assert on debug builds (Requested by simonjam on
3853         #webkit).
3854
3855         * bindings/ScriptControllerBase.cpp:
3856         (WebCore::ScriptController::executeIfJavaScriptURL):
3857         * loader/DocumentWriter.cpp:
3858         (WebCore::DocumentWriter::replaceDocument):
3859         (WebCore::DocumentWriter::begin):
3860         * loader/DocumentWriter.h:
3861
3862 2011-10-10  Adam Barth  <abarth@webkit.org>
3863
3864         [V8] CodeGeneratorV8 shouldn't hardcode the list of ActiveDOMObjects
3865         https://bugs.webkit.org/show_bug.cgi?id=69792
3866
3867         Reviewed by Nate Chapin.
3868
3869         We used to hard code the list of active DOM objects in the code
3870         generator, but now we have an IDL attribute.  This patch switches the
3871         code generator over to using the IDL attribute.
3872
3873         * bindings/scripts/CodeGeneratorV8.pm:
3874         (GenerateHeader):
3875         (GenerateNormalAttrGetter):
3876         (GenerateImplementation):
3877         (GetDomMapFunction):
3878
3879 2011-10-10  Nico Weber  <thakis@chromium.org>
3880
3881         PluginDocumentParser uses incorrect syntax for background color
3882         https://bugs.webkit.org/show_bug.cgi?id=69694
3883
3884         Reviewed by Adam Barth.
3885
3886         * html/PluginDocument.cpp:
3887         (WebCore::PluginDocumentParser::createDocumentStructure):
3888
3889 2011-10-10  Ryosuke Niwa  <rniwa@webkit.org>
3890
3891         REGRESSION(r96870): editing/pasteboard/smart-paste-008.html fails on non-Mac
3892         https://bugs.webkit.org/show_bug.cgi?id=69587
3893
3894         Reviewed by Enrica Casucci.
3895
3896         Insert a space at the correct offset when startNode is a text node.
3897
3898         * editing/ReplaceSelectionCommand.cpp:
3899         (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
3900
3901 2011-09-20  Jer Noble  <jer.noble@apple.com>
3902
3903         MediaControlSeekButtonElement should support seeking by changing the playback rate.
3904         https://bugs.webkit.org/show_bug.cgi?id=63595
3905
3906         Reviewed by Eric Carlson.
3907
3908         Test: media/video-controls-scanning.html
3909
3910         Add a new property to HTMLMediaElement, supportsScanning(), which returns whether the
3911         element is capable of playing its media at a rate greater than 1x. HTMLMediaElement passes
3912         this call through to MediaPlayer and MediaPlayerPrivate. If this property returns true, the
3913         built-in scanning controls can prefer to scan by changing the playbackRate, rather than by
3914         repeatedly seeking small amounts of time. Unless overridden by specific media engines, this
3915         property defaults to "false".
3916
3917         * html/HTMLMediaElement.h:
3918         * html/HTMLMediaElement.cpp:
3919         (WebCore::HTMLMediaElement::supportsScanning): Added.  Calls through to MediaPlayer.
3920         * platform/graphics/MediaPlayer.h:
3921         * platform/graphics/MediaPlayer.cpp:
3922         (WebCore::MediaPlayer::supportsScanning): Added. Calls through to MediaPlayerPrivate.
3923         * platform/graphics/MediaPlayerPrivate.h:
3924         (WebCore::MediaPlayerPrivateInterface::supportsScanning): Added. Defaults to "false".
3925         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3926         (WebCore::MediaPlayerPrivateAVFoundation::supportsScanning): Added.
3927         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3928         (WebCore::MediaPlayerPrivateQTKit::supportsScanning): Added.
3929
3930         MediaControlSeekButtonElement now queries HTMLMediaElement::supportsScanning() to see if the
3931         media element can implement its seeking behavior by scanning the media at greater than 1x
3932         rate. Note whether the media was playing or paused when the seek begins, so that the playing
3933         state can be restored when seeking ends.  Instead of capturing the mouse after mouseDown, 
3934         the seek button now responds to setActive() and begins seeking when the button is active
3935         and stops when it becomes inactive.
3936
3937         Some behaviors have changed: clicking on the seek button no longer causes the media element
3938         to pause; the media will end in the same state it began after the click.  cStepTime has been
3939         eliminated; Clicking the seek button will always skip by at least cSeekTime, or 0.2s.
3940
3941         * html/shadow/MediaControlElements.cpp:
3942         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Initialize new 
3943             ivars.
3944         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Mark mouseDown and mouseUp
3945             as defaultHandled, so as not to trigger drag start and drag end actions.
3946         (WebCore::MediaControlSeekButtonElement::setActive): Call startTimer or stopTimer based
3947             on whether the button is active or not.
3948         (WebCore::MediaControlSeekButtonElement::startTimer): Determine whether to scan or skip
3949             and start the seekTimer.
3950         (WebCore::MediaControlSeekButtonElement::stopTimer): Restore the playing state and
3951             stop the timer.
3952         (WebCore::MediaControlSeekButtonElement::seekTimerFired): Depending on whether we're 
3953             scanning or skipping, jump ahead or change the playback rate.
3954         * html/shadow/MediaControlElements.h:
3955
3956 2011-10-10  Mark Hahnenberg  <mhahnenberg@apple.com>
3957
3958         Remove getCallDataVirtual methods
3959         https://bugs.webkit.org/show_bug.cgi?id=69186
3960
3961         Reviewed by Geoffrey Garen.
3962
3963         No new tests.
3964
3965         Removed all getCallDataVirtual methods and replaced their call sites 
3966         with an explicit lookup in the MethodTable.
3967
3968         * WebCore.exp.in:
3969         * bindings/js/JSCallbackData.cpp:
3970         (WebCore::JSCallbackData::invokeCallback):
3971         * bindings/js/JSCustomXPathNSResolver.cpp:
3972         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
3973         * bindings/js/JSErrorHandler.cpp:
3974         (WebCore::JSErrorHandler::handleEvent):
3975         * bindings/js/JSEventListener.cpp:
3976         (WebCore::JSEventListener::handleEvent):
3977         * bindings/js/JSHTMLAllCollectionCustom.cpp:
3978         * bindings/js/JSHTMLAppletElementCustom.cpp:
3979         * bindings/js/JSHTMLEmbedElementCustom.cpp:
3980         * bindings/js/JSHTMLObjectElementCustom.cpp:
3981         * bindings/js/JSInjectedScriptHostCustom.cpp:
3982         (WebCore::JSInjectedScriptHost::evaluate):
3983         * bindings/js/JSPluginElementFunctions.cpp:
3984         (WebCore::runtimeObjectGetCallData):
3985         * bindings/scripts/CodeGeneratorJS.pm:
3986         (GenerateHeader):
3987         * bridge/objc/objc_runtime.h:
3988         * bridge/objc/objc_runtime.mm:
3989         * bridge/qt/qt_runtime.cpp:
3990         (JSC::Bindings::QtRuntimeConnectionMethod::call):
3991         (JSC::Bindings::isJavaScriptFunction):
3992         * bridge/qt/qt_runtime.h:
3993         (JSC::Bindings::QtRuntimeMetaMethod::create):
3994         (JSC::Bindings::QtRuntimeMetaMethod::createStructure):
3995         (JSC::Bindings::QtRuntimeConnectionMethod::create):
3996         (JSC::Bindings::QtRuntimeConnectionMethod::createStructure):
3997         * bridge/runtime_method.cpp:
3998         * bridge/runtime_method.h:
3999         * bridge/runtime_object.cpp:
4000         * bridge/runtime_object.h:
4001
4002 2011-10-06  Jer Noble  <jer.noble@apple.com>
4003
4004         media/video-loop.html is failing on Lion because of negative currentTime()