<rdar://problem/11945102> REGRESSION (r109451): Overlay scrollbars always use the...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-24  Dan Bernstein  <mitz@apple.com>
2
3         <rdar://problem/11945102> REGRESSION (r109451): Overlay scrollbars always use the default style, regardless of background color
4         https://bugs.webkit.org/show_bug.cgi?id=92115
5
6         Reviewed by Mark Rowe.
7
8         * platform/Scrollbar.cpp:
9         (WebCore::Scrollbar::scrollbarOverlayStyle): Reversed an incorrect null check.
10
11 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
12
13         Another prospective build fix for Chromium. Unreviewed.
14
15         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
16
17 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
18
19         Unreviewed prospective build fix for Chromium. Changed include of hb.h in HarfBuzzNGFace.h
20
21         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
22
23 2012-07-24  Dominik Röttsches  <dominik.rottsches@intel.com>
24
25         HarfBuzzFaceNG.h forward declarations conflict with newer versions of Harfbuzz
26         https://bugs.webkit.org/show_bug.cgi?id=92103
27
28         Reviewed by Philippe Normand.
29
30         As preparation for enabling harfbuzz-ng for EFL, I would like to include the header
31         here since the forward declarations are conflicting with the harfbuzz version
32         we will use for EFL.
33
34         No new tests, no change in behavior.
35
36         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
37
38 2012-07-24  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
39
40         Fix blend filter for autovectorizing
41         https://bugs.webkit.org/show_bug.cgi?id=91398
42
43         Reviewed by Nikolas Zimmermann.
44
45         To support auto-vectorizing, the loop had to be unswitched, and regular arrays used that 
46         did not do boundary-checks in the inner loop. Finally the integer division by 255
47         was optimized not use integer division intrinsics.
48
49         On a X86-64 architechture using GCC -O3 on the file, this gives a speed-up of 2.9x.
50
51         * platform/graphics/filters/FEBlend.cpp:
52         (WebCore::fastDivideBy255):
53         (BlendNormal):
54         (WebCore::BlendNormal::apply):
55         (BlendMultiply):
56         (WebCore::BlendMultiply::apply):
57         (BlendScreen):
58         (WebCore::BlendScreen::apply):
59         (BlendDarken):
60         (WebCore::BlendDarken::apply):
61         (BlendLighten):
62         (WebCore::BlendLighten::apply):
63         (BlendUnknown):
64         (WebCore::BlendUnknown::apply):
65         (WebCore::platformApply):
66         (WebCore::FEBlend::platformApplyGeneric):
67         (WebCore::FEBlend::platformApplySoftware):
68         * platform/graphics/filters/FEBlend.h:
69         (FEBlend):
70
71 2012-07-23  Hans Wennborg  <hans@chromium.org>
72
73         Speech JavaScript API: Add the SpeechRecognitionResult.emma attribute
74         https://bugs.webkit.org/show_bug.cgi?id=91743
75
76         Reviewed by Adam Barth.
77
78         Implement the 'emma' attribute as described in the spec draft at
79         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
80
81         Test: fast/speech/scripted/emma.html
82
83         * Modules/speech/SpeechRecognitionResult.cpp:
84         (WebCore::SpeechRecognitionResult::~SpeechRecognitionResult):
85         (WebCore):
86         (WebCore::SpeechRecognitionResult::emma):
87         * Modules/speech/SpeechRecognitionResult.h:
88         (WebCore):
89         (SpeechRecognitionResult):
90         * Modules/speech/SpeechRecognitionResult.idl:
91         * WebCore.gypi:
92         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp:
93         (WebCore):
94         (WebCore::V8SpeechRecognitionResult::visitDOMWrapper):
95           We need to add an implicit reference from the result object to the
96           emma object to keep the latters DOM tree alive across
97           garbage-collection.
98
99 2012-07-24  Andrei Poenaru  <poenaru@adobe.com>
100
101         Web Inspector: Protocol Extension: add getFlowByName command
102         https://bugs.webkit.org/show_bug.cgi?id=91855
103
104         Reviewed by Pavel Feldman.
105
106         The "getFlowByName" command should return a NamedFlow for a given document and name.
107
108         Test: inspector/styles/protocol-css-regions-commands.html
109
110         * inspector/Inspector.json:
111         * inspector/InspectorCSSAgent.cpp:
112         (WebCore::InspectorCSSAgent::getFlowByName):
113         (WebCore):
114         * inspector/InspectorCSSAgent.h:
115         (InspectorCSSAgent):
116         * inspector/front-end/CSSStyleModel.js:
117         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
118         (WebInspector.CSSStyleModel.prototype.getFlowByNameAsync):
119         (WebInspector.NamedFlow):
120         (WebInspector.NamedFlow.parsePayload):
121
122 2012-07-23  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
123
124         [Qt] Fix compilation against namespaced Qt
125
126         Reviewed by Simon Hausmann.
127
128         * platform/graphics/Font.h:
129         * platform/network/ResourceHandleInternal.h:
130         * platform/qt/ThirdPartyCookiesQt.h:
131
132 2012-07-24  Anthony Scian  <ascian@rim.com>
133
134         Web Inspector [JSC]: Enable initiator column in network panel.
135         https://bugs.webkit.org/show_bug.cgi?id=65533
136
137         Reviewed by Vsevolod Vlasov.
138
139         With 40118 fixed for webkit, Preferences.displayInitiator should be set to true.
140         Removed references to it since the optionality is no longer required.
141
142         Test: http/tests/inspector/network/network-initiator.html
143
144         * inspector/front-end/NetworkPanel.js:
145         (WebInspector.NetworkLogView.prototype._createTable):
146         (WebInspector.NetworkLogView.prototype.switchToDetailedView):
147         (WebInspector.NetworkLogView.prototype.switchToBriefView):
148         (WebInspector.NetworkDataGridNode.prototype.createCells):
149         (WebInspector.NetworkDataGridNode.prototype.refreshRequest):
150         * inspector/front-end/Settings.js:
151
152 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
153
154         Missing *explicit* keyword in dom and page.
155         https://bugs.webkit.org/show_bug.cgi?id=92074
156
157         Reviewed by Kentaro Hara.
158
159         Some constructors missed to use *explicit* keyword. They need to be added
160         *explicit* keyword to contructor which has a parameter in order to avoid
161         implicit type conversion.
162
163         Some files in dom directory can't use explicit keyword because of build breaks.
164
165         No new tests. Covered by existing tests.
166
167         * dom/BeforeLoadEvent.h:
168         (WebCore::BeforeLoadEvent::BeforeLoadEvent):
169         * dom/BeforeTextInsertedEvent.h:
170         (BeforeTextInsertedEvent):
171         * dom/ChildListMutationScope.h:
172         (WebCore::ChildListMutationScope::ChildListMutationScope):
173         * dom/ChildNodeList.h:
174         (ChildNodeList):
175         * dom/ClientRect.h:
176         (ClientRect):
177         * dom/ClientRectList.h:
178         (ClientRectList):
179         * dom/ComposedShadowTreeWalker.h:
180         (ComposedShadowTreeParentWalker):
181         * dom/DOMCoreException.h:
182         (WebCore::DOMCoreException::DOMCoreException):
183         * dom/DOMImplementation.h:
184         (DOMImplementation):
185         * dom/DatasetDOMStringMap.h:
186         (WebCore::DatasetDOMStringMap::DatasetDOMStringMap):
187         * dom/DeviceMotionController.h:
188         (DeviceMotionController):
189         * dom/DeviceOrientationController.h:
190         (DeviceOrientationController):
191         * dom/DocumentParser.h:
192         (DocumentParser):
193         * dom/EventException.h:
194         (WebCore::EventException::EventException):
195         * dom/EventListener.h:
196         (WebCore::EventListener::EventListener):
197         * dom/ExceptionBase.h:
198         (ExceptionBase):
199         * dom/GenericEventQueue.h:
200         (GenericEventQueue):
201         * dom/KeyboardEvent.h:
202         (WebCore::KeypressCommand::KeypressCommand):
203         * dom/MemoryInstrumentation.h:
204         (WebCore::MemoryObjectInfo::MemoryObjectInfo):
205         * dom/MessageChannel.h:
206         (MessageChannel):
207         * dom/MessagePort.h:
208         (MessagePort):
209         * dom/MessagePortChannel.h:
210         (MessagePortChannel):
211         * dom/MutationObserver.h:
212         * dom/NamedNodeMap.h:
213         (WebCore::NamedNodeMap::NamedNodeMap):
214         * dom/NodeFilter.h:
215         (WebCore::NodeFilter::NodeFilter):
216         * dom/NodeWithIndex.h:
217         (WebCore::NodeWithIndex::NodeWithIndex):
218         * dom/Range.h:
219         * dom/RangeException.h:
220         (WebCore::RangeException::RangeException):
221         * dom/RawDataDocumentParser.h:
222         (WebCore::RawDataDocumentParser::RawDataDocumentParser):
223         * dom/ScriptRunner.h:
224         (ScriptRunner):
225         * dom/SelectorQuery.h:
226         (SelectorQuery):
227         * dom/ShadowRoot.h:
228         (ShadowRoot):
229         * dom/SpaceSplitString.h:
230         (SpaceSplitStringData):
231         * dom/StaticHashSetNodeList.h:
232         (StaticHashSetNodeList):
233         * dom/StaticNodeList.h:
234         (WebCore::StaticNodeList::StaticNodeList):
235         * dom/TransformSource.h:
236         (TransformSource):
237         * dom/TreeScope.h:
238         (TreeScope):
239         * dom/WebKitNamedFlowCollection.h:
240         (WebKitNamedFlowCollection):
241         * page/EventHandler.h:
242         (EventHandler):
243         * page/FocusController.h:
244         (FocusController):
245         * page/FrameView.h:
246         (FrameView):
247         * page/MemoryInfo.h:
248         (MemoryInfo):
249         * page/Page.h:
250         (Page):
251         * page/PageGroup.h:
252         (PageGroup):
253         * page/PrintContext.h:
254         (PrintContext):
255         * page/Settings.h:
256         (Settings):
257         * page/SpeechInput.h:
258         (SpeechInput):
259         * page/SpeechInputResultList.h:
260         (SpeechInputResultList):
261         * page/WebKitAnimation.h:
262         * page/WindowFeatures.h:
263         (WindowFeatures):
264         * page/WorkerNavigator.h:
265         (WorkerNavigator):
266
267 2012-07-24  Kent Tamura  <tkent@chromium.org>
268
269         Replace some callsites of shadowAncestorNode() with shadowHost()
270         https://bugs.webkit.org/show_bug.cgi?id=92060
271
272         Reviewed by Hajime Morita.
273
274         shadowAncestorNode() is deprecated.
275
276         No new tests. This shouldn't change behaviors.
277
278         * html/shadow/MediaControlElements.cpp:
279         (WebCore::toParentMediaElement):
280         * html/shadow/TextControlInnerElements.h:
281         (WebCore::SpinButtonElement::isEnabledFormControl):
282         (WebCore::SpinButtonElement::isReadOnlyFormControl):
283         * platform/efl/RenderThemeEfl.cpp:
284         (WebCore::RenderThemeEfl::paintMediaFullscreenButton):
285         (WebCore::RenderThemeEfl::paintMediaMuteButton):
286         * platform/gtk/RenderThemeGtk.cpp:
287         (WebCore::getMediaElementFromRenderObject):
288         (WebCore::centerRectVerticallyInParentInputElement):
289         * platform/qt/RenderThemeQt.cpp:
290         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
291         (WebCore::RenderThemeQt::paintMediaSliderThumb):
292         Removed an ASSERT() because nullness of o->node() is already asserted.
293         * rendering/RenderInputSpeech.cpp:
294         (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
295         * rendering/RenderMediaControlsChromium.cpp:
296         (WebCore::paintMediaSliderThumb):
297         Passing shadowHost() to toParentMediaElement(), which accepts 0 and will return 0.
298         (WebCore::paintMediaVolumeSliderThumb): ditto.
299         * rendering/RenderThemeChromiumSkia.cpp:
300         (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
301         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
302         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
303         * rendering/RenderThemeMac.mm:
304         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
305         Remove an ASSERT(input) because input never be null unless o->node() is
306         null. If o->node() is null, this function crashes.
307         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
308         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
309         (WebCore::RenderThemeMac::paintMediaMuteButton):
310         It's ok to ignore "node is a media element" case because this function
311         works only if node->isMediaControlElement().
312         (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
313         (WebCore::RenderThemeMac::paintMediaSliderTrack): ditto.
314         * rendering/RenderThemeSafari.cpp:
315         (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
316         Remove an ASSERT(input) because input never be null unless o->node() is
317         null. If o->node() is null, this function crashes.
318         (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): ditto.
319         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): ditto.
320         * rendering/RenderThemeWinCE.cpp:
321         (WebCore::mediaElementParent):
322
323 2012-07-24  Peter Beverloo  <peter@chromium.org>
324
325         [Chromium] Build fix for Android after r123424
326         https://bugs.webkit.org/show_bug.cgi?id=92082
327
328         Unreviewed build fix.
329
330         Mark removed the PlatformSupport.h header from ScrollbarThemeChromiumAndroid.cpp
331         in r123424, while there still are two references left to another method and a
332         constant. Re-add the include directive.
333
334         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
335
336 2012-07-24  Kentaro Hara  <haraken@chromium.org>
337
338         [JSC] REGRESSION(r122912): CodeGeneratorJS.pm generates wrong code
339         for static attributes in supplemental IDL files
340         https://bugs.webkit.org/show_bug.cgi?id=91925
341
342         Reviewed by Adam Barth.
343
344         r122912 implemented static attributes in CodeGeneratorJS.pm.
345         However, it generates wrong code for static attributes in supplemental
346         IDL files. This patch fixes it as shown in JSTestInterface.cpp.
347         This fix aligns with the fix in CodeGeneratorV8.pm (r123308).
348
349         Test: bindings/scripts/test/TestSupplemental.idl
350
351         * bindings/scripts/CodeGeneratorJS.pm:
352         (GenerateImplementation):
353         * bindings/scripts/test/JS/JSTestInterface.cpp:
354         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
355         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
356         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
357
358 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
359
360         Add *explicit* keyword to constructor which has a parameter in bridge, history, loader and plugins.
361         https://bugs.webkit.org/show_bug.cgi?id=92064
362
363         Reviewed by Kentaro Hara.
364
365         Some constructors missed to use *explicit* keyword. They need to be added
366         *explicit* keyword to contructor which has a parameter in order to avoid
367         implicit type conversion.
368
369         No new tests. Covered by existing tests.
370
371         * bridge/IdentifierRep.h:
372         (WebCore::IdentifierRep::IdentifierRep):
373         * history/BackForwardListImpl.h:
374         (BackForwardListImpl):
375         * history/CachedFrame.h:
376         (CachedFrame):
377         * history/HistoryItem.h:
378         (HistoryItem):
379         * loader/DocumentWriter.h:
380         (DocumentWriter):
381         * loader/FrameNetworkingContext.h:
382         (WebCore::FrameNetworkingContext::FrameNetworkingContext):
383         * loader/HistoryController.h:
384         * loader/ImageLoader.h:
385         (ImageLoader):
386         * loader/LinkLoader.h:
387         (LinkLoader):
388         * loader/MainResourceLoader.h:
389         (MainResourceLoader):
390         * loader/NavigationAction.h:
391         (NavigationAction):
392         * loader/NavigationScheduler.h:
393         (NavigationScheduler):
394         * loader/PolicyChecker.h:
395         (PolicyChecker):
396         * loader/SubframeLoader.h:
397         (SubframeLoader):
398         * loader/ThreadableLoaderClientWrapper.h:
399         (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
400         * plugins/PluginData.h:
401         (PluginData):
402         * plugins/PluginViewBase.h:
403         (WebCore::PluginViewBase::PluginViewBase):
404
405 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
406
407         [Qt] Fix conversion from GregorianDateTime to QTime
408         https://bugs.webkit.org/show_bug.cgi?id=92068
409
410         Reviewed by Simon Hausmann.
411
412         * bridge/qt/qt_runtime.cpp:
413         (JSC::Bindings::convertValueToQVariant):
414         * bridge/qt/qt_runtime_qt4.cpp:
415         (JSC::Bindings::convertValueToQVariant):
416
417 2012-07-24  Arko Saha  <arko@motorola.com>
418
419         Microdata: Implement PropertyNodeList interface.
420         https://bugs.webkit.org/show_bug.cgi?id=80269
421
422         Reviewed by Ryosuke Niwa.
423
424         Added support for PropertyNodeList interface. Currently HTMLPropertiesCollection.namedItem(name)
425         returns NodeList object. Made changes so that it will return PropertyNodeList object.
426
427         Implemented propertyNodeList.getValues() method. It returns an array of various values. Its
428         values are obtained from the "itemValue" DOM property of each of the elements represented by
429         the object, in tree order.
430
431         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#propertynodelist
432
433         Tests: fast/dom/MicroData/nameditem-returns-propertynodelist.html
434                fast/dom/MicroData/propertynodelist-getvalues-array-values-obtained-from-itemvalue-of-each-element.html
435                fast/dom/MicroData/propertynodelist-getvalues-test.html
436                fast/dom/MicroData/propertynodelist-test-add-remove-element.html
437
438         * CMakeLists.txt:
439         * DerivedSources.cpp:
440         * DerivedSources.make:
441         * DerivedSources.pri:
442         * GNUmakefile.list.am:
443         * Target.pri:
444         * UseJSC.cmake:
445         * UseV8.cmake:
446         * WebCore.gypi:
447         * WebCore.vcproj/WebCore.vcproj:
448         * WebCore.xcodeproj/project.pbxproj:
449         * bindings/gobject/GNUmakefile.am:
450         * bindings/js/JSBindingsAllInOne.cpp:
451         * bindings/js/JSMicroDataItemValueCustom.cpp: Added.
452         (WebCore):
453         (WebCore::toJS): Added toJS() custom method. Returns Node if itemValue is node else returns String.
454         * bindings/v8/custom/V8MicroDataItemValueCustom.cpp: Added.
455         (WebCore):
456         (WebCore::toV8): Added toV8 custom code.
457         * dom/DynamicNodeList.cpp:
458         (WebCore::DynamicNodeListCacheBase::rootNode): Return document if owner node has itemref attribute specified.
459         (WebCore):
460         (WebCore::DynamicNodeListCacheBase::ownerNodeHasItemRefAttribute): Returns true if owner node has itemref attribute
461         specified with root type NodeListRootedAtDocumentIfOwnerHasItemrefAttr.
462         (WebCore::DynamicNodeListCacheBase::invalidateCache):
463         (WebCore::DynamicNodeList::itemWithName): Update itemrefElements cache if root type is
464         NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
465         * dom/DynamicNodeList.h: Added m_hasItemRefElements in DynamicNodeListCacheBase to check if itemRefElmenets cache
466         is valid.
467         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
468         (WebCore::DynamicNodeListCacheBase::isRootedAtDocument):
469         (DynamicNodeListCacheBase):
470         (WebCore::DynamicNodeListCacheBase::isItemRefElementsCacheValid):
471         (WebCore::DynamicNodeListCacheBase::setItemRefElementsCacheValid):
472         (WebCore::DynamicNodeListCacheBase::rootType): Returns cached root type.
473         (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Invalidate NodeListCache on itemref
474         attribute change.
475         * dom/Node.cpp:
476         (WebCore::Node::propertyNodeList):
477         * dom/Node.h:
478         (WebCore):
479         (Node):
480         * dom/PropertyNodeList.cpp: Added.
481         (WebCore):
482         (WebCore::PropertyNodeList::PropertyNodeList):
483         (WebCore::PropertyNodeList::~PropertyNodeList):
484         (WebCore::PropertyNodeList::elementIsPropertyOfRefElement): Checks if the testElement is a property of Microdata
485         item.
486         (WebCore::PropertyNodeList::updateRefElements):
487         (WebCore::PropertyNodeList::nodeMatches):
488         (WebCore::PropertyNodeList::getValues): Returns PropertyValueArray whose values are obtained from the
489         itemValue DOM property of each of the elements represented by the object, in tree order.
490         * dom/PropertyNodeList.h: Added.
491         (WebCore):
492         (PropertyNodeList):
493         (WebCore::PropertyNodeList::create):
494         * dom/PropertyNodeList.idl: Added.
495         * html/HTMLCollection.cpp:
496         (WebCore::DynamicNodeListCacheBase::itemCommon): Update itemrefElements cache if its a NodeListCollectionType with
497         root type NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
498         * html/HTMLElement.cpp:
499         (WebCore::HTMLElement::properties):
500         (WebCore):
501         (WebCore::HTMLElement::getItemRefElements): Returns the ItemRefElements list of given element. Added this
502         method to share the code between HTMLPropertiesCollection and PropertyNodeList to update itemRefElements.
503         * html/HTMLElement.h:
504         (HTMLElement):
505         * html/HTMLPropertiesCollection.cpp:
506         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
507         (WebCore::HTMLPropertiesCollection::updateRefElements):
508         (WebCore::HTMLPropertiesCollection::updateNameCache):
509         (WebCore::HTMLPropertiesCollection::namedItem): Return PropertyNodeList object instead of NodeList.
510         (WebCore::HTMLPropertiesCollection::hasNamedItem): Return true if it finds an item with given
511         name in the properties collection.
512         * html/HTMLPropertiesCollection.h: Removed m_hasItemRefElements member variable, now DynamicNodeListCacheBase
513         has isItemRefElementsCacheValid. Also removed m_hasPropertyNameCache, as DynamicNodeListCacheBase already has
514         hasNameCache() and setHasNameCache().
515         (WebCore):
516         (HTMLPropertiesCollection):
517         (WebCore::HTMLPropertiesCollection::invalidateCache):
518         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
519         * html/HTMLPropertiesCollection.idl:
520         * html/MicroDataItemValue.idl: Added.
521         * page/DOMWindow.idl:
522
523 2012-07-24  Kentaro Hara  <haraken@chromium.org>
524
525         [JSC] REGRESSION(r122912): CodeGeneratorJS.pm should not
526         implicitly assume ScriptExecutionContext for static attributes
527         https://bugs.webkit.org/show_bug.cgi?id=91924
528
529         Reviewed by Adam Barth.
530
531         r122912 implemented static attributes in CodeGeneratorJS.pm.
532         However, the generated code assumes that static attributes
533         always require ScriptExecutionContext, which is wrong.
534         If we need a ScriptExecutionContext, we should specify
535         [CallWith=ScriptExecutionContext].
536
537         This patch fixes CodeGeneratorJS.pm so that static attributes
538         do not assume ScriptExecutionContext. This fix aligns with
539         the fix in CodeGeneratorV8.pm in r123308.
540
541         Test: bindings/scripts/test/TestObj.idl
542
543         * bindings/scripts/CodeGeneratorJS.pm:
544         (GenerateImplementation):
545         * bindings/scripts/test/JS/JSTestInterface.cpp:
546         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
547         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
548         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
549         * bindings/scripts/test/JS/JSTestObj.cpp:
550         (WebCore::jsTestObjConstructorStaticReadOnlyIntAttr):
551         (WebCore::jsTestObjConstructorStaticStringAttr):
552         (WebCore::setJSTestObjConstructorStaticStringAttr):
553
554 2012-07-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
555
556         Missing *explicit* keyword in editing.
557         https://bugs.webkit.org/show_bug.cgi?id=92055
558
559         Reviewed by Ryosuke Niwa.
560
561         Some constructors missed to use *explicit* keyword. They need to be added
562         *explicit* keyword to contructor which has a parameter in order to avoid
563         implicit type conversion.
564
565         No new tests. Covered by existing tests.
566
567         * editing/AlternativeTextController.h:
568         (WebCore::AlternativeTextController::UNLESS_ENABLED):
569         * editing/BreakBlockquoteCommand.h:
570         (BreakBlockquoteCommand):
571         * editing/DeleteButton.h:
572         (DeleteButton):
573         * editing/DeleteButtonController.h:
574         (DeleteButtonController):
575         * editing/EditCommand.h:
576         (EditCommand):
577         (WebCore::SimpleEditCommand::SimpleEditCommand):
578         * editing/EditingBehavior.h:
579         (WebCore::EditingBehavior::EditingBehavior):
580         * editing/EditingStyle.h:
581         (EditingStyle):
582         * editing/Editor.h:
583         (Editor):
584         * editing/FrameSelection.h:
585         (FrameSelection):
586         * editing/InsertLineBreakCommand.h:
587         (InsertLineBreakCommand):
588         * editing/ModifySelectionListLevel.h:
589         (ModifySelectionListLevelCommand):
590         (DecreaseSelectionListLevelCommand):
591         * editing/RemoveFormatCommand.h:
592         (RemoveFormatCommand):
593         * editing/RemoveNodeCommand.h:
594         (RemoveNodeCommand):
595         * editing/RemoveNodePreservingChildrenCommand.h:
596         (RemoveNodePreservingChildrenCommand):
597         * editing/ReplaceNodeWithSpanCommand.h:
598         (ReplaceNodeWithSpanCommand):
599         * editing/TextInsertionBaseCommand.h:
600         (TextInsertionBaseCommand):
601         * editing/UndoManager.h:
602         (UndoManager):
603         * editing/UnlinkCommand.h:
604         (UnlinkCommand):
605         * editing/WrapContentsInDummySpanCommand.h:
606         (WrapContentsInDummySpanCommand):
607
608 2012-07-23  Dominic Mazzoni  <dmazzoni@google.com>
609
610         AX: Need AccessibilityObjects for nodes without renderers in canvas subtree
611         https://bugs.webkit.org/show_bug.cgi?id=87899
612
613         Reviewed by Chris Fleizach.
614
615         Refactors AccessibilityRenderObject so that it inherits from a new class,
616         AccessibilityNodeObject, that can be constructed from a Node without a
617         renderer. Modifies AXObjectCache so that it automatically creates an
618         AccessibilityNodeObject for elements in a canvas subtree but not otherwise.
619         A new layout test verifies that this correctly exposes an accessibility
620         tree with appropriate roles for elements in a canvas subtree.
621
622         This patch does not try to complete the implementation of
623         AccessibilityNodeObject. Most AX methods are still unimplemented and need
624         to be migrated from AccessibilityRenderObject to AccessibilityNodeObject
625         in a future patch.
626         
627         This patch also doesn't change anything outside of WebCore/accessibility, so
628         the rest of WebCore only calls AXObjectCache when there are changes to a
629         RenderObject, not to a Node. Accessible notifications on nodes without
630         renderers need to be implemented in a future patch.
631
632         Test: accessibility/canvas-accessibilitynodeobject.html
633
634         * CMakeLists.txt:
635         * GNUmakefile.list.am:
636         * Target.pri:
637         * WebCore.gypi:
638         * accessibility/AXObjectCache.cpp:
639         (WebCore::AXObjectCache::get):
640         (WebCore):
641         (WebCore::createFromNode):
642         (WebCore::AXObjectCache::getOrCreate):
643         (WebCore::AXObjectCache::remove):
644         * accessibility/AXObjectCache.h:
645         (AXObjectCache):
646         (WebCore::AXObjectCache::get):
647         (WebCore::AXObjectCache::getOrCreate):
648         (WebCore::AXObjectCache::remove):
649         * accessibility/AccessibilityARIAGrid.cpp:
650         (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid):
651         (WebCore):
652         (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid):
653         (WebCore::AccessibilityARIAGrid::init):
654         (WebCore::AccessibilityARIAGrid::create):
655         * accessibility/AccessibilityARIAGrid.h:
656         (AccessibilityARIAGrid):
657         * accessibility/AccessibilityARIAGridCell.cpp:
658         (WebCore::AccessibilityARIAGridCell::create):
659         * accessibility/AccessibilityARIAGridRow.cpp:
660         (WebCore::AccessibilityARIAGridRow::create):
661         * accessibility/AccessibilityAllInOne.cpp:
662         * accessibility/AccessibilityList.cpp:
663         (WebCore::AccessibilityList::create):
664         * accessibility/AccessibilityListBox.cpp:
665         (WebCore::AccessibilityListBox::create):
666         * accessibility/AccessibilityMediaControls.cpp:
667         (WebCore::AccessibilityMediaControl::create):
668         (WebCore::AccessibilityMediaControlsContainer::create):
669         (WebCore::AccessibilityMediaTimeline::create):
670         (WebCore::AccessibilityMediaTimeDisplay::create):
671         * accessibility/AccessibilityMenuList.cpp:
672         (WebCore::AccessibilityMenuList::create):
673         (WebCore):
674         * accessibility/AccessibilityMenuList.h:
675         (AccessibilityMenuList):
676         * accessibility/AccessibilityNodeObject.cpp: Added.
677         (WebCore):
678         (WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
679         (WebCore::AccessibilityNodeObject::~AccessibilityNodeObject):
680         (WebCore::AccessibilityNodeObject::init):
681         (WebCore::AccessibilityNodeObject::create):
682         (WebCore::AccessibilityNodeObject::detach):
683         (WebCore::AccessibilityNodeObject::childrenChanged):
684         (WebCore::AccessibilityNodeObject::updateAccessibilityRole):
685         (WebCore::AccessibilityNodeObject::firstChild):
686         (WebCore::AccessibilityNodeObject::lastChild):
687         (WebCore::AccessibilityNodeObject::previousSibling):
688         (WebCore::AccessibilityNodeObject::nextSibling):
689         (WebCore::AccessibilityNodeObject::parentObjectIfExists):
690         (WebCore::AccessibilityNodeObject::parentObject):
691         (WebCore::AccessibilityNodeObject::elementRect):
692         (WebCore::AccessibilityNodeObject::setNode):
693         (WebCore::AccessibilityNodeObject::document):
694         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
695         (WebCore::AccessibilityNodeObject::addChildren):
696         (WebCore::AccessibilityNodeObject::accessibilityIsIgnored):
697         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
698         (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute):
699         (WebCore::AccessibilityNodeObject::ariaRoleAttribute):
700         (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent):
701         * accessibility/AccessibilityNodeObject.h: Added.
702         (WebCore):
703         (AccessibilityNodeObject):
704         (WebCore::AccessibilityNodeObject::isAccessibilityNodeObject):
705         (WebCore::AccessibilityNodeObject::node):
706         (WebCore::AccessibilityNodeObject::isDetached):
707         (WebCore::toAccessibilityNodeObject):
708         * accessibility/AccessibilityObject.h:
709         (WebCore::AccessibilityObject::isAccessibilityNodeObject):
710         * accessibility/AccessibilityProgressIndicator.cpp:
711         (WebCore::AccessibilityProgressIndicator::create):
712         * accessibility/AccessibilityRenderObject.cpp:
713         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
714         (WebCore::AccessibilityRenderObject::init):
715         (WebCore):
716         (WebCore::AccessibilityRenderObject::create):
717         (WebCore::AccessibilityRenderObject::detach):
718         (WebCore::AccessibilityRenderObject::setRenderer):
719         (WebCore::AccessibilityRenderObject::canHaveChildren):
720         (WebCore::AccessibilityRenderObject::addCanvasChildren):
721         (WebCore::AccessibilityRenderObject::addChildren):
722         * accessibility/AccessibilityRenderObject.h:
723         (AccessibilityRenderObject):
724         * accessibility/AccessibilitySlider.cpp:
725         (WebCore::AccessibilitySlider::create):
726         * accessibility/AccessibilityTable.cpp:
727         (WebCore::AccessibilityTable::AccessibilityTable):
728         (WebCore):
729         (WebCore::AccessibilityTable::~AccessibilityTable):
730         (WebCore::AccessibilityTable::init):
731         (WebCore::AccessibilityTable::create):
732         * accessibility/AccessibilityTable.h:
733         (AccessibilityTable):
734         * accessibility/AccessibilityTableCell.cpp:
735         (WebCore::AccessibilityTableCell::create):
736         * accessibility/AccessibilityTableRow.cpp:
737         (WebCore::AccessibilityTableRow::create):
738
739 2012-07-23  David Barr  <davidbarr@chromium.org>
740
741         Fix ENABLE_CSS_IMAGE_ORIENTATION compile flag
742         https://bugs.webkit.org/show_bug.cgi?id=91961
743
744         Reviewed by Tony Chang.
745
746         https://bugs.webkit.org/show_bug.cgi?id=89055
747         A rule was missed implementing the ENABLE_CSS_IMAGE_ORIENTATION compile flag.
748
749         https://bugs.webkit.org/show_bug.cgi?id=90046
750         Half of the missing rule was inadvertently added together with ENABLE_CSS_STICKY_POSITION.
751
752         No new tests; build configuration fix.
753
754         * Configurations/FeatureDefines.xcconfig:
755
756 2012-07-23  Douglas Stockwell  <dstockwell@chromium.org>
757
758         Null-pointer crash when a derived color like -webkit-activelink is set in a gradient stop
759         https://bugs.webkit.org/show_bug.cgi?id=89148
760
761         Reviewed by Simon Fraser.
762
763         CSSGradientValue attempted to resolve colors during paint, this crashed
764         when a derived color like -webkit-activelink was encountered because the
765         corresponding element was no longer available in the StyleResolver.
766         Instead, by adding a field to CSSGradientColorStop we can resolve and
767         then cache the resolved colors at the correct time. To avoid sharing
768         cached derived colors between elements we clone the gradient values when
769         needed.
770
771         Test: fast/css/crash-on-gradient-with-derived-color.html
772
773         * css/CSSGradientValue.cpp:
774         (WebCore::CSSGradientValue::gradientWithStylesResolved): Added. Resolve and cache
775         resolved colors, clone if colors are derived from the element.
776         (WebCore):
777         (WebCore::CSSGradientValue::addStops):
778         (WebCore::CSSGradientValue::isCacheable): Defer to new logic in
779         StyleResolver.
780         * css/CSSGradientValue.h:
781         (CSSGradientColorStop): Added cache of resolved color.
782         (CSSGradientValue):
783         (CSSLinearGradientValue):
784         (CSSRadialGradientValue):
785         * css/CSSImageGeneratorValue.h:
786         (WebCore):
787         * css/CSSValue.h:
788         (WebCore::CSSValue::isGradientValue):
789         * css/StyleResolver.cpp:
790         (WebCore::StyleResolver::collectMatchingRulesForList):
791         * css/StyleResolver.h:
792         (StyleResolver):
793         * rendering/style/StyleGeneratedImage.cpp:
794         (WebCore::StyleGeneratedImage::image): Revert change from r96449. This
795         is no longer necessary as the gradient colors are now resolved at a
796         time when the style is set on StyleResolver.
797
798 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
799
800         Move GregorianDateTime from JSC to WTF namespace
801         https://bugs.webkit.org/show_bug.cgi?id=91948
802
803         Reviewed by Geoffrey Garen.
804
805         Moving GregorianDateTime into the WTF namespace allows us to us to
806         use it in WebCore too. The new class has the same behaviour as the
807         old struct. Only the unused timeZone member has been removed.
808
809         * bridge/qt/qt_runtime.cpp:
810         (JSC::Bindings::convertValueToQVariant):
811         (JSC::Bindings::convertQVariantToValue):
812         * bridge/qt/qt_runtime_qt4.cpp:
813         (JSC::Bindings::convertValueToQVariant):
814         (JSC::Bindings::convertQVariantToValue):
815
816 2012-07-23  Mark Pilgrim  <pilgrim@chromium.org>
817
818         [Chromium] Move layoutTestMode to WebCore
819         https://bugs.webkit.org/show_bug.cgi?id=92010
820
821         Reviewed by Adam Barth.
822
823         Part of a refactoring series. See tracking bug 82948.
824
825         * CMakeLists.txt:
826         * GNUmakefile.list.am:
827         * Target.pri:
828         * WebCore.gypi:
829         * WebCore.vcproj/WebCore.vcproj:
830         * WebCore.xcodeproj/project.pbxproj:
831         * bindings/generic/RuntimeEnabledFeatures.h:
832         (RuntimeEnabledFeatures):
833         * platform/LayoutTestSupport.cpp: Added.
834         (WebCore):
835         (WebCore::isRunningLayoutTest):
836         (WebCore::setIsRunningLayoutTest):
837         * platform/LayoutTestSupport.h: Added.
838         (WebCore):
839         * platform/chromium/PlatformSupport.h:
840         (PlatformSupport):
841         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
842         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
843         (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
844         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
845         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
846         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
847         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
848         (WebCore):
849         (WebCore::LookupAltName):
850         (WebCore::fontContainsCharacter):
851         (WebCore::FillLogFont):
852         (WebCore::FontCache::getFontDataForCharacters):
853         (WebCore::FontCache::createFontPlatformData):
854         * platform/graphics/skia/FontCustomPlatformData.cpp:
855         (WebCore::FontCustomPlatformData::fontPlatformData):
856         * platform/graphics/skia/FontSkia.cpp:
857         (WebCore::Font::drawGlyphs):
858         * rendering/RenderThemeChromiumAndroid.cpp:
859         (WebCore::RenderThemeChromiumAndroid::systemColor):
860         (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle):
861         * rendering/RenderThemeChromiumMac.mm:
862         (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
863         * rendering/RenderThemeChromiumSkia.cpp:
864         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
865         * rendering/RenderThemeChromiumWin.cpp:
866         (WebCore):
867         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
868         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
869         (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
870         (WebCore::RenderThemeChromiumWin::systemColor):
871         (WebCore::menuListButtonWidth):
872         (WebCore::RenderThemeChromiumWin::determineClassicState):
873
874 2012-07-23  Dave Tu  <dtu@chromium.org>
875
876         [chromium] Add droppedFrameCount to renderingStats.
877         https://bugs.webkit.org/show_bug.cgi?id=91694
878
879         Reviewed by Adrienne Walker.
880
881         * platform/graphics/chromium/cc/CCFrameRateCounter.cpp:
882         (WebCore):
883         (WebCore::CCFrameRateCounter::frameInterval):
884         (WebCore::CCFrameRateCounter::frameIndex):
885         (WebCore::CCFrameRateCounter::CCFrameRateCounter):
886         (WebCore::CCFrameRateCounter::markBeginningOfFrame):
887         (WebCore::CCFrameRateCounter::isBadFrame):
888         * platform/graphics/chromium/cc/CCFrameRateCounter.h:
889         (WebCore::CCFrameRateCounter::droppedFrameCount):
890         (CCFrameRateCounter):
891         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
892         (WebCore::CCLayerTreeHost::renderingStats):
893         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
894         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
895         (WebCore::CCLayerTreeHostImpl::drawLayers):
896         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
897         (CCLayerTreeHostImpl):
898         * platform/graphics/chromium/cc/CCRenderingStats.h:
899         (CCRenderingStats):
900         (WebCore::CCRenderingStats::CCRenderingStats):
901         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
902         (WebCore::CCSingleThreadProxy::implSideRenderingStats):
903         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
904         (WebCore::CCThreadProxy::implSideRenderingStatsOnImplThread):
905
906 2012-07-23  Dan Bernstein  <mitz@apple.com>
907
908         Fixed the build after r123418.
909
910         * WebCore.exp.in: Added DocumentMarkerController::addTextMatchMarker.
911
912 2012-07-23  Mike Lawther  <mikelawther@chromium.org>
913
914         CSS3 calc: optimise blending expression
915         https://bugs.webkit.org/show_bug.cgi?id=90037
916
917         Reviewed by Tony Chang.
918
919         Introduce a new calc expression node - a BlendLength node. Given two Lengths and a progress
920         this blends them together when evaluated.
921
922         An alternative and more general approach of being able to blend two CalcExpressionNodes was
923         tested, but involves more memory allocations, was measurably slower, and nothing currently
924         would make use of the generality. 
925
926         No functional change. Covered by existing tests.
927
928         * platform/CalculationValue.h:
929         (CalcExpressionBlendLength):
930         (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
931         (WebCore::CalcExpressionBlendLength::operator==):
932         (WebCore::CalcExpressionBlendLength::evaluate):
933         (WebCore):
934         * platform/Length.cpp:
935         (WebCore::Length::blendCalculation):
936
937 2012-07-23  Nico Weber  <thakis@chromium.org>
938
939         [chromium] Show search tickmarks on css-styled scrollbars
940         https://bugs.webkit.org/show_bug.cgi?id=91949
941
942         Reviewed by Adrienne Walker.
943
944         This is done by letting RenderScrollbarTheme::paintTickmarks()
945         delegate to the native ScrollbarTheme. To make this possible,
946         move paintTickmarks() from ScrollbarThemeComposite to the
947         superclass ScrollbarTheme.
948
949         For testing, add internals.addTextMatchMarker() and add a pixel test.
950
951         * platform/ScrollbarTheme.h:
952         (WebCore::ScrollbarTheme::paintTickmarks):
953         Moved paintTickmarks() from ScrollbarThemeComposite to here.
954         * platform/ScrollbarThemeComposite.h:
955         Remove paintTickmarks().
956         * platform/chromium/ScrollbarThemeChromium.cpp:
957         (WebCore::ScrollbarThemeChromium::paintTickmarks):
958         Switch to drawing tickmarks as vectors, so they can be arbitrarily wide.
959         * platform/chromium/ScrollbarThemeChromiumMac.h:
960         (ScrollbarThemeChromiumMac):
961         Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
962         * platform/chromium/ScrollbarThemeChromiumMac.mm:
963         (WebCore::ScrollbarThemeChromiumMac::paint):
964         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
965         Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
966         * rendering/RenderScrollbarTheme.cpp:
967         (WebCore::RenderScrollbarTheme::paintTickmarks):
968         Delegate to the native ScrollbarTheme for tickmark drawing.
969         (WebCore):
970         * rendering/RenderScrollbarTheme.h:
971         (RenderScrollbarTheme):
972         Override paintTickmarks().
973
974 2012-07-23  Brian Anderson  <brianderson@chromium.org>
975
976         [chromium] Use shallow flushes that don't glFlush
977         https://bugs.webkit.org/show_bug.cgi?id=90325
978
979         Reviewed by Kenneth Russell.
980
981         Adds plumbing for the shallowFlushCHROMIUM extension and uses
982         shallow flushes instead of normal flushes when uploading textures.
983         Shallow flushes allow us to initiate command buffer flushes to
984         the GPU thread/process without the overhead of a true glFlush.
985
986         CCTextureUpdaterTest updated to recognize shallow flushes.
987
988         * platform/chromium/support/Extensions3DChromium.cpp:
989         (WebCore::Extensions3DChromium::shallowFlushCHROMIUM):
990         (WebCore):
991         * platform/graphics/chromium/Extensions3DChromium.h:
992         (Extensions3DChromium):
993         * platform/graphics/chromium/cc/CCGraphicsContext.h:
994         * platform/graphics/chromium/cc/CCResourceProvider.cpp:
995         (WebCore::CCResourceProvider::shallowFlushIfSupported):
996         (WebCore):
997         (WebCore::CCResourceProvider::CCResourceProvider):
998         (WebCore::CCResourceProvider::initialize):
999         * platform/graphics/chromium/cc/CCResourceProvider.h:
1000         (CCResourceProvider):
1001         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
1002         (WebCore::CCTextureUpdater::update):
1003
1004 2012-07-23  Hanyee Kim  <choco@company100.net>
1005
1006         When using TextureMapper, WebKit does not retain final value of opacity in animations, unless it is specified on the last key frame.
1007         https://bugs.webkit.org/show_bug.cgi?id=91322
1008
1009         Reviewed by Noam Rosenthal.
1010
1011         When -webkit-fill-mode is forwards, GraphicsLayerAnimation::apply does not apply
1012         the property values defined in the last executing keyframe after the final iteration of animation.
1013
1014         This patch does not return right after the end of animation, but it keeps applying
1015         the property values defined in the last executing keyframe.
1016         Add normalizedAnimationValueForFillsForwards function that returns a normalized value of the
1017         last executing keyframe.
1018
1019         Link to CSS Animations spec: http://www.w3.org/TR/css3-animations/#animation-fill-mode-property
1020
1021         Test: animations/fill-mode-forwards2.html
1022
1023         * platform/graphics/GraphicsLayerAnimation.cpp:
1024         (WebCore::normalizedAnimationValueForFillsForwards):
1025         (WebCore):
1026         (WebCore::GraphicsLayerAnimation::apply):
1027
1028 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1029
1030         Unreviewed, rolling out r123184, r123195, and r123197.
1031         http://trac.webkit.org/changeset/123184
1032         http://trac.webkit.org/changeset/123195
1033         http://trac.webkit.org/changeset/123197
1034         https://bugs.webkit.org/show_bug.cgi?id=92049
1035
1036         pagecycler regression (Requested by morrita on #webkit).
1037
1038         * WebCore.exp.in:
1039         * dom/Document.cpp:
1040         (WebCore::Document::Document):
1041         (WebCore::Document::~Document):
1042         (WebCore::Document::suggestedMIMEType):
1043         * dom/Document.h:
1044         (WebCore):
1045         (WebCore::Node::isDocumentNode):
1046         (WebCore::Node::Node):
1047         * dom/Node.cpp:
1048         (WebCore::Node::~Node):
1049         (WebCore::Node::setDocument):
1050         (WebCore):
1051         (WebCore::Node::setTreeScope):
1052         (WebCore::Node::treeScope):
1053         (WebCore::Node::isInShadowTree):
1054         (WebCore::Node::reportMemoryUsage):
1055         * dom/Node.h:
1056         (Node):
1057         (WebCore::Node::document):
1058         (WebCore::Node::inDocument):
1059         * dom/NodeRareData.h:
1060         (WebCore::NodeRareData::NodeRareData):
1061         (WebCore::NodeRareData::treeScope):
1062         (WebCore::NodeRareData::setTreeScope):
1063         (NodeRareData):
1064         * dom/ShadowRoot.cpp:
1065         (WebCore::ShadowRoot::ShadowRoot):
1066         * dom/TreeScope.cpp:
1067         (WebCore::TreeScope::TreeScope):
1068         (WebCore::TreeScope::setParentTreeScope):
1069         * dom/TreeScope.h:
1070         (WebCore):
1071         (WebCore::TreeScope::idTargetObserverRegistry):
1072         (TreeScope):
1073         * dom/TreeScopeAdopter.cpp:
1074         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1075         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
1076         * editing/MoveSelectionCommand.cpp:
1077         * editing/RemoveNodeCommand.cpp:
1078         * editing/RemoveNodePreservingChildrenCommand.cpp:
1079         * inspector/PageConsoleAgent.cpp:
1080
1081 2012-07-23  Roger Fong  <roger_fong@apple.com>
1082
1083         On Windows, if select element is off screen horizontally, 
1084         menu is either inappropriately resized or positioned offscreen.
1085         https://bugs.webkit.org/show_bug.cgi?id=91913
1086         <rdar://problem/7611229>
1087
1088         Reviewed by Tim Horton.
1089
1090         If the select element is positioned off the edge of the screen to the left, 
1091         the menu is resized. It should not be resized, just shifted to remain on the screen.
1092         If the select element is positioned off the edge of the screen to the right, 
1093         the menu goes off screen instead of being shifted over to appear on screen.
1094         This problem only occurs on Windows.
1095         
1096         Test: ManualTests/win/select-menu-off-screen.html
1097
1098         * platform/win/PopupMenuWin.cpp:
1099         (WebCore::PopupMenuWin::calculatePositionAndSize):
1100         Modified final horizontal position calculation code to position
1101         popup menu on screen if it would otherwise go off.
1102         
1103 2012-07-23  David Dorwin  <ddorwin@chromium.org>
1104
1105         Fixed crash in webkitAddKey() when key parameter is null.
1106         https://bugs.webkit.org/show_bug.cgi?id=85444
1107
1108         Reviewed by Kentaro Hara.
1109
1110         Reference: Step 1 of http://dvcs.w3.org/hg/html-media/raw-file/5f76a0b43836/encrypted-media/encrypted-media.html#dom-addkey
1111
1112         Tests: media/encrypted-media/encrypted-media-syntax.html 
1113
1114         * html/HTMLMediaElement.cpp:
1115         (WebCore::HTMLMediaElement::webkitAddKey):
1116
1117 2012-07-23  Hayato Ito  <hayato@chromium.org>
1118
1119         A FocusScope for a distributed node should not be its TreeScope.
1120         https://bugs.webkit.org/show_bug.cgi?id=91829
1121
1122         Reviewed by Dimitri Glazkov.
1123
1124         Current implementation of FocusScope::focusScopeOf(Node*) returns
1125         the given node's treeScope().  That does not apply if the node is
1126         a distributed node.  We should calculate a FocusScope for a
1127         distributed node by traversing ancestor nodes in Composed Shadow
1128         Tree.
1129
1130         Test: fast/dom/shadow/focus-navigation-with-distributed-nodes.html
1131
1132         * page/FocusController.cpp:
1133         (WebCore::FocusScope::focusScopeOf):
1134
1135 2012-07-23  Douglas Stockwell  <dstockwell@google.com>
1136
1137         Null-pointer crash when parsing border-image
1138         https://bugs.webkit.org/show_bug.cgi?id=91963
1139
1140         Reviewed by Darin Adler.
1141
1142         Test: fast/css/border-image-fill-crash.html
1143
1144         * css/CSSParser.cpp:
1145         (WebCore::CSSParser::parseBorderImageRepeat): Handle the case where
1146         parseBorderImageRepeat is called when the value list is empty.
1147
1148 2012-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
1149
1150         [CSS Exclusions] SVG shape errors should invalidate exclusion shapes
1151         https://bugs.webkit.org/show_bug.cgi?id=91761
1152
1153         Reviewed by Andreas Kling.
1154
1155         CSS exclusion shapes that are specified with negative radiuses or
1156         height/width are now considered invalid and ignored.
1157
1158         Tests added to
1159         LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html
1160
1161         * css/CSSParser.cpp:
1162         (WebCore::CSSParser::parseExclusionShapeRectangle):
1163         (WebCore::CSSParser::parseExclusionShapeCircle):
1164         (WebCore::CSSParser::parseExclusionShapeEllipse):
1165
1166 2012-07-23  Tien-Ren Chen  <trchen@chromium.org>
1167
1168         [chromium] Implement scrollbar theme for Android
1169         https://bugs.webkit.org/show_bug.cgi?id=91674
1170
1171         Reviewed by Adam Barth.
1172
1173         Previously the scrollbar for Android was implemented as an extra
1174         drawing pass in the compositor. Now we switch to use the standard
1175         ScrollbarTheme mechanism.
1176
1177         No new tests. We use mock scrollbars during layout test to share
1178         pixel results with Linux.
1179
1180         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
1181         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
1182         (WebCore::ScrollbarThemeChromiumAndroid::thumbPosition):
1183         (WebCore::ScrollbarThemeChromiumAndroid::thumbLength):
1184         (WebCore::ScrollbarThemeChromiumAndroid::backButtonRect):
1185         (WebCore::ScrollbarThemeChromiumAndroid::forwardButtonRect):
1186         (WebCore::ScrollbarThemeChromiumAndroid::trackRect):
1187         (WebCore):
1188         (WebCore::ScrollbarThemeChromiumAndroid::paintThumb):
1189         (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
1190         * platform/chromium/ScrollbarThemeChromiumAndroid.h:
1191         (WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars):
1192         (ScrollbarThemeChromiumAndroid):
1193         (WebCore::ScrollbarThemeChromiumAndroid::hasButtons):
1194         (WebCore::ScrollbarThemeChromiumAndroid::hasThumb):
1195
1196 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
1197
1198         Use the original token to create an element in "reconstruct the active formatting elements" and "call the adoption agency"
1199         https://bugs.webkit.org/show_bug.cgi?id=91703
1200
1201         Reviewed by Adam Barth.
1202
1203         The current WebKit HTML5 parser implementation does not hold the original token
1204         in the stack of open elements and the active formatting elements. This is
1205         problematic because the original token is used to create an element in
1206         "reconstruct the active formatting elements" and "call the adoption agency".
1207
1208         As a workaround, WebKit uses the saved element instead of the original token
1209         to create an element. But this causes us to fail examples like this:
1210         <b id="1"><p><script>document.getElementById("1").id = "2"</script></p>TEXT</b>
1211         reconstructTheActiveFormattingElements calls this method to open a second <b>
1212         tag to wrap TEXT, it will have id "2", even though the HTML5 spec implies it
1213         should be "1".
1214
1215         Created a ref-counted container class, HTMLStackItem to hold the original token
1216         and the namespace URI as well as the element. Changed HTMLElementStack and
1217         HTMLFormattingElementList to use HTMLStackItem.
1218         Changed HTMLConstructionSite::reconstructTheActiveFormattingElements and
1219         HTMLTreeBuilder::callTheAdoptionAgency to create an element from the saved token
1220         instead of the saved element.
1221
1222         Updated test expectation for html5lib/runner-expected.txt
1223         because now resources/scripted/adoption01.dat passes.
1224
1225         * html/parser/HTMLConstructionSite.cpp:
1226         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
1227         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
1228         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
1229         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
1230         (WebCore::HTMLConstructionSite::insertHTMLElement):
1231         (WebCore::HTMLConstructionSite::insertFormattingElement):
1232         (WebCore::HTMLConstructionSite::insertScriptElement):
1233         (WebCore::HTMLConstructionSite::insertForeignElement):
1234         (WebCore::HTMLConstructionSite::createElementFromSavedToken):
1235         (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
1236         * html/parser/HTMLConstructionSite.h:
1237         (HTMLConstructionSite):
1238         (WebCore::HTMLConstructionSite::currentElementRecord):
1239         * html/parser/HTMLElementStack.cpp:
1240         (WebCore::HTMLElementStack::ElementRecord::ElementRecord):
1241         (WebCore::HTMLElementStack::ElementRecord::replaceElement):
1242         (WebCore::HTMLElementStack::pushRootNode):
1243         (WebCore::HTMLElementStack::pushHTMLHtmlElement):
1244         (WebCore::HTMLElementStack::pushRootNodeCommon):
1245         (WebCore::HTMLElementStack::pushHTMLHeadElement):
1246         (WebCore::HTMLElementStack::pushHTMLBodyElement):
1247         (WebCore::HTMLElementStack::push):
1248         (WebCore::HTMLElementStack::insertAbove):
1249         (WebCore::HTMLElementStack::pushCommon):
1250         * html/parser/HTMLElementStack.h:
1251         (WebCore::HTMLElementStack::ElementRecord::element):
1252         (WebCore::HTMLElementStack::ElementRecord::node):
1253         (WebCore::HTMLElementStack::ElementRecord::stackItem):
1254         (ElementRecord):
1255         (HTMLElementStack):
1256         * html/parser/HTMLFormattingElementList.cpp:
1257         (WebCore::HTMLFormattingElementList::swapTo):
1258         (WebCore::HTMLFormattingElementList::append):
1259         * html/parser/HTMLFormattingElementList.h:
1260         (WebCore::HTMLFormattingElementList::Entry::Entry):
1261         (WebCore::HTMLFormattingElementList::Entry::isMarker):
1262         (WebCore::HTMLFormattingElementList::Entry::stackItem):
1263         (WebCore::HTMLFormattingElementList::Entry::element):
1264         (WebCore::HTMLFormattingElementList::Entry::replaceElement):
1265         (WebCore::HTMLFormattingElementList::Entry::operator==):
1266         (WebCore::HTMLFormattingElementList::Entry::operator!=):
1267         (Entry):
1268         (HTMLFormattingElementList):
1269         * html/parser/HTMLStackItem.h: Added.
1270         (WebCore):
1271         (HTMLStackItem):
1272         (WebCore::HTMLStackItem::create):
1273         (WebCore::HTMLStackItem::element):
1274         (WebCore::HTMLStackItem::node):
1275         (WebCore::HTMLStackItem::token):
1276         (WebCore::HTMLStackItem::namespaceURI):
1277         (WebCore::HTMLStackItem::HTMLStackItem):
1278         * html/parser/HTMLTreeBuilder.cpp:
1279         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
1280         (WebCore::HTMLTreeBuilder::processStartTag):
1281         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1282
1283 2012-07-23  Andreas Kling  <kling@webkit.org>
1284
1285         Report the extra memory used by immutable StylePropertySet objects.
1286         <http://webkit.org/b/92032>
1287
1288         Reviewed by Anders Carlsson.
1289
1290         Add an optional parameter to the MemoryClassInfo constructor for passing in additional base object
1291         size on top of sizeof(T).
1292
1293         Use this in StylePropertySet::reportMemoryUsage() to properly account for the CSSProperty array
1294         tacked onto the end of the object when m_isMutable == false.
1295
1296         * css/StylePropertySet.h:
1297         (WebCore::StylePropertySet::reportMemoryUsage):
1298         * dom/MemoryInstrumentation.h:
1299         (WebCore::MemoryObjectInfo::reportObjectInfo):
1300         (WebCore::MemoryClassInfo::MemoryClassInfo):
1301
1302 2012-07-23  Gregg Tavares  <gman@google.com>
1303
1304         Fix WebGL texSubImage2D for cube maps
1305         https://bugs.webkit.org/show_bug.cgi?id=91927
1306
1307         Reviewed by Kenneth Russell.
1308
1309         Fixes texSubImage2D so any size rectangle can be passed in
1310         for cube maps.
1311
1312         Test: fast/canvas/webgl/tex-sub-image-cube-maps.html
1313
1314         * html/canvas/WebGLRenderingContext.cpp:
1315         (WebCore):
1316         (WebCore::WebGLRenderingContext::copyTexImage2D):
1317         (WebCore::WebGLRenderingContext::texImage2DBase):
1318         (WebCore::WebGLRenderingContext::texSubImage2DBase):
1319         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
1320         * html/canvas/WebGLRenderingContext.h:
1321         (WebGLRenderingContext):
1322
1323 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1324
1325         Unreviewed, rolling out r123387.
1326         http://trac.webkit.org/changeset/123387
1327         https://bugs.webkit.org/show_bug.cgi?id=92036
1328
1329         Broke chromium win build (Requested by tony^work on #webkit).
1330
1331         * WebCore.gyp/WebCore.gyp:
1332         * WebCore.gyp/scripts/rule_bison.py:
1333         * bindings/scripts/preprocessor.pm:
1334         (applyPreprocessor):
1335         * make-hash-tools.pl:
1336
1337 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
1338
1339         Ref-count AtomicHTMLToken
1340         https://bugs.webkit.org/show_bug.cgi?id=91981
1341
1342         Reviewed by Adam Barth.
1343
1344         Ref-count AtomicHTMLToken to avoid copying AtomicHTMLToken in Bug 91703.
1345
1346         No new tests - no functional changes.
1347
1348         * html/parser/HTMLConstructionSite.cpp:
1349         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
1350         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
1351         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
1352         (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody):
1353         (WebCore::HTMLConstructionSite::insertDoctype):
1354         (WebCore::HTMLConstructionSite::insertComment):
1355         (WebCore::HTMLConstructionSite::insertCommentOnDocument):
1356         (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
1357         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
1358         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
1359         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
1360         (WebCore::HTMLConstructionSite::insertHTMLElement):
1361         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
1362         (WebCore::HTMLConstructionSite::insertFormattingElement):
1363         (WebCore::HTMLConstructionSite::insertScriptElement):
1364         (WebCore::HTMLConstructionSite::insertForeignElement):
1365         (WebCore::HTMLConstructionSite::createElement):
1366         (WebCore::HTMLConstructionSite::createHTMLElement):
1367         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
1368         * html/parser/HTMLConstructionSite.h:
1369         (HTMLConstructionSite):
1370         * html/parser/HTMLToken.h:
1371         (WebCore::AtomicHTMLToken::create):
1372         (AtomicHTMLToken):
1373         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1374         * html/parser/HTMLTreeBuilder.cpp:
1375         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
1376         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
1377         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
1378         (WebCore::HTMLTreeBuilder::processToken):
1379         (WebCore::HTMLTreeBuilder::processDoctypeToken):
1380         (WebCore::HTMLTreeBuilder::processFakeStartTag):
1381         (WebCore::HTMLTreeBuilder::processFakeEndTag):
1382         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
1383         (WebCore::HTMLTreeBuilder::attributesForIsindexInput):
1384         (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
1385         (WebCore):
1386         (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
1387         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1388         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
1389         (WebCore::HTMLTreeBuilder::processStartTag):
1390         (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
1391         (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
1392         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
1393         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1394         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
1395         (WebCore::HTMLTreeBuilder::processEndTagForInRow):
1396         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
1397         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
1398         (WebCore::HTMLTreeBuilder::processEndTagForInTable):
1399         (WebCore::HTMLTreeBuilder::processEndTag):
1400         (WebCore::HTMLTreeBuilder::processComment):
1401         (WebCore::HTMLTreeBuilder::processCharacter):
1402         (WebCore::HTMLTreeBuilder::processEndOfFile):
1403         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
1404         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
1405         (WebCore::HTMLTreeBuilder::defaultForInHead):
1406         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
1407         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
1408         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
1409         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
1410         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
1411         (WebCore::HTMLTreeBuilder::processScriptStartTag):
1412         (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
1413         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
1414         (WebCore::HTMLTreeBuilder::parseError):
1415         * html/parser/HTMLTreeBuilder.h:
1416         (HTMLTreeBuilder):
1417         * html/parser/TextDocumentParser.cpp:
1418         (WebCore::TextDocumentParser::insertFakePreElement):
1419
1420 2012-07-23  Scott Graham  <scottmg@google.com>
1421
1422         Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
1423         https://bugs.webkit.org/show_bug.cgi?id=91667
1424
1425         Reviewed by Tony Chang.
1426
1427         Using native tools instead of cygwin version improves build time
1428         performance by roughly 50% (on top of previous cl-instead-of-gcc
1429         change).
1430
1431         Also, use - instead of / for cl flags because a layer of project
1432         generator converts them to \ otherwise, which causes the preprocessing
1433         to fail (very slowly because of the cygwin-loop with a sleep 1).
1434
1435         No new tests.
1436
1437         * WebCore.gyp/WebCore.gyp:
1438         * WebCore.gyp/scripts/rule_bison.py:
1439         * bindings/scripts/preprocessor.pm:
1440         (applyPreprocessor):
1441         * make-hash-tools.pl:
1442
1443 2012-06-12  Jer Noble  <jer.noble@apple.com>
1444
1445         MediaController.currentTime should be kept stable during script execution.
1446         https://bugs.webkit.org/show_bug.cgi?id=88555
1447
1448         Reviewed by Eric Carlson.
1449
1450         Test: media/media-controller-time-constant.html
1451
1452         To keep MediaController.currentTime stable, add a new m_position variable and 
1453         a new m_clearPositionTimer timer.  Both must be mutable variables as they will
1454         be updated from within const functions.  Calls to currentTime() will result in
1455         stable values until the next runloop iteration.
1456
1457         * html/MediaController.cpp:
1458         (MediaController::MediaController):
1459         (MediaController::currentTime):
1460         (MediaController::setCurrentTime):
1461         (MediaController::clearPositionTimerFired):
1462         * html/MediaController.h:
1463
1464 2012-07-23  Huang Dongsung  <luxtella@company100.net>
1465
1466         Destroy CSS decoded data more eagerly once they become dead caches.
1467         https://bugs.webkit.org/show_bug.cgi?id=91733
1468
1469         Reviewed by Geoffrey Garen.
1470
1471         Internal review by Kwang Yul Seo.
1472
1473         There are three CachedResources with decoded data: CachedImage, CachedScript
1474         and CachedCSSStyleSheet. In the cases of CachedImage and CachedScript, we
1475         eagerly destroy the decoded data using Timer in CacehdResource::allClientsRemoved().
1476         We must apply the same policy here in CachedCSSStyleSheet because priority
1477         inversion can occur. For example, we can't destroy the decoded data of CachedImages
1478         when they are referenced by CachedCSSStyleSheet as background, mask or border
1479         images.
1480
1481         No new tests - no new testable functionality.
1482
1483         * loader/cache/CachedCSSStyleSheet.cpp:
1484         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
1485         (WebCore::CachedCSSStyleSheet::didAddClient):
1486         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
1487         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
1488         (WebCore):
1489         (WebCore::CachedCSSStyleSheet::decodedDataDeletionTimerFired):
1490         * loader/cache/CachedCSSStyleSheet.h:
1491         (CachedCSSStyleSheet):
1492
1493 2012-07-23  Simon Fraser  <simon.fraser@apple.com>
1494
1495         Part 2 of: Implement sticky positioning
1496         https://bugs.webkit.org/show_bug.cgi?id=90046
1497
1498         Reviewed by Ojan Vafai.
1499
1500         Turn on ENABLE_CSS_STICKY_POSITION. Add support for parsing the new '-webkit-sticky'
1501         value for position, returning it from getComputedStyle(), and storing it in RenderStyle.
1502
1503         Test: fast/css/sticky/parsing-position-sticky.html
1504
1505         * Configurations/FeatureDefines.xcconfig:
1506         * css/CSSComputedStyleDeclaration.cpp:
1507         (WebCore::getPositionOffsetValue):
1508         * css/CSSParser.cpp:
1509         (WebCore::isValidKeywordPropertyAndValue):
1510         * css/CSSPrimitiveValueMappings.h:
1511         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1512         (WebCore::CSSPrimitiveValue::operator EPosition):
1513         * css/CSSValueKeywords.in:
1514         * rendering/style/RenderStyle.h:
1515         * rendering/style/RenderStyleConstants.h:
1516
1517 2012-07-23  Stephen Chenney  <schenney@chromium.org>
1518
1519         Crash when setting empty class name on a new element
1520         https://bugs.webkit.org/show_bug.cgi?id=92024
1521
1522         Reviewed by Andreas Kling.
1523
1524         Add a check for null attributeData() when setting the className to an
1525         empty string on a newly created element. New SVG elements have null
1526         attributeData() on baseVal upon creation.
1527
1528         Test: svg/custom/empty-className-baseVal-crash.html
1529
1530         * dom/StyledElement.cpp:
1531         (WebCore::StyledElement::classAttributeChanged): Add check for null attributeData()
1532
1533 2012-07-23  Shawn Singh  <shawnsingh@chromium.org>
1534
1535         [chromium] Refactor CCLayerTreeHostCommon: clean up clipRect and drawableContentRect design
1536         https://bugs.webkit.org/show_bug.cgi?id=80622
1537
1538         Reviewed by Adrienne Walker.
1539
1540         clipRect(), usesLayerClipping(), and drawableContentRect() have been
1541         very confusing in CCLayerTreeHostCommon for a while. This patch
1542         refactors it so that (1) clipping is only done locally in
1543         calcDrawTransforms, and (2) the layer's drawableContentRect value
1544         is now meaningful value outside of calcDrawTransforms.
1545         Additionally, the layer is now always clipped to the root
1546         surface's contentBounds (which are set to the viewport bounds).
1547         This refactor not only makes calcDrawTransforms far more readable and intuitive, but
1548         this patch enables more upcoming beneficial refactors, including
1549         the pending refactor in https://bugs.webkit.org/show_bug.cgi?id=88953.
1550
1551         Tests are also significantly updated to keep up with this refactoring change.
1552
1553         * platform/graphics/chromium/LayerChromium.cpp:
1554         (WebCore::LayerChromium::LayerChromium):
1555         * platform/graphics/chromium/LayerChromium.h:
1556         (LayerChromium):
1557         Removed m_usesLayerClipping and m_clipRect and associated accessors.
1558
1559         * platform/graphics/chromium/RenderSurfaceChromium.h:
1560         (RenderSurfaceChromium):
1561         Updated comment
1562
1563         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1564         (WebCore::CCLayerImpl::CCLayerImpl):
1565         * platform/graphics/chromium/cc/CCLayerImpl.h:
1566         (CCLayerImpl):
1567         Removed m_usesLayerClipping and m_clipRect and associated accessors.
1568
1569         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1570         (WebCore::CCLayerTreeHost::updateLayers):
1571         removed setClipRect code that no longer applies
1572
1573         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1574         (WebCore::calculateLayerScissorRect):
1575         scissor rect is now a little bit tighter, the intersection between damage and layer's new drawableContentRect.
1576
1577         (WebCore::calculateSurfaceScissorRect):
1578         scissor rect is now a little bit tighter, except when filters are involved.
1579
1580         (WebCore::layerClipsSubtree):
1581         new helper function
1582
1583         (WebCore):
1584         (WebCore::calculateVisibleContentRect):
1585         (WebCore::subtreeShouldRenderToSeparateSurface):
1586         (WebCore::calculateDrawTransformsInternal):
1587            - added drawableContentRectOfSubtree to the function args, it is valid only after recursion returns,
1588            - added clipRectFromAncestor and bool ancestorClipsSubtree to function args, this replaces the layer's clipRect and usesLayerClipping.
1589            - removed the boolean return value, which was redundant with drawableContentRectOfSubtree.
1590            - replaced all the "setDrawableContentRect" logic with more intuitive, clear logic.
1591            - now, layer's drawableContentRect represents the clipped bounds of the layer expressed in the target surface space.
1592
1593         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
1594         (WebCore::pointIsClippedBySurfaceOrClipRect):
1595         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1596         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
1597         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1598         (WebCore::::layerScissorRectInTargetSurface):
1599         Updated this accessor.  It could be removed in the future, but not appropriate for this patch.
1600
1601         * platform/graphics/chromium/cc/CCRenderSurface.h:
1602
1603 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
1604
1605         [CMAKE] Added missing RenderLayerFilterInfo.cpp to build system.
1606
1607         * CMakeLists.txt:
1608
1609 2012-07-23  Ryosuke Niwa  <rniwa@webkit.org>
1610
1611         REGRESSION(r123281): childNodes sometimes returns wrong nodes
1612         https://bugs.webkit.org/show_bug.cgi?id=92014
1613
1614         Reviewed by Anders Carlsson.
1615
1616         The bug was caused by a typo in itemBeforeOrAfter. Namely, it should have been calling firstNode as
1617         firstNode(forward, rootNode(), shouldOnlyIncludeDirectChildren()),
1618         NOT firstNode(forward, rootNode(), previous)
1619         as evident from the argument list of the function.
1620
1621         Test: fast/dom/NodeList/childNodes-reverse-iteration.html
1622
1623         * html/HTMLCollection.cpp:
1624         (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfter):
1625
1626 2012-07-23  Steve VanDeBogart  <vandebo@chromium.org>
1627
1628         Chrome/Skia: PDF print output does not have clickable links.
1629         https://bugs.webkit.org/show_bug.cgi?id=91171
1630
1631         Reviewed by Stephen White.
1632
1633         Connect GraphicsContext::setURLForRect to Skia's new API for annotations.
1634
1635         Printing is not generally testable.
1636
1637         * platform/graphics/skia/GraphicsContextSkia.cpp:
1638         (WebCore::GraphicsContext::setURLForRect):
1639
1640 2012-07-23  Pierre Rossi  <pierre.rossi@gmail.com>
1641
1642         Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client
1643         https://bugs.webkit.org/show_bug.cgi?id=91006
1644
1645         Reviewed by Ryosuke Niwa.
1646
1647         The rationale here is that the client doesn't need to know about the touch
1648         event handler count. needTouchEvents was already used for that purpose.
1649
1650         Test: fast/events/touch/touch-handler-count.html
1651
1652         * dom/Document.cpp:
1653         (WebCore::Document::Document):
1654         (WebCore::Document::didAddTouchEventHandler): Only notify the client if needed.
1655         (WebCore::Document::didRemoveTouchEventHandler): Ditto. Also unset the TOUCH_LISTENER
1656         flag for the document if we reach a count of zero. The rationale being that
1657         hasListenerType() is relied upon in other places in combination with TOUCH_LISTENER for
1658         the same purpose.
1659         * dom/Document.h:
1660         (Document):
1661         (WebCore::Document::touchEventHandlerCount):
1662         * loader/EmptyClients.h:
1663         * page/ChromeClient.h:
1664         (ChromeClient):
1665         * page/Frame.cpp: Removed notifyChromeClientTouchEventHandlerCountChanged.
1666         (WebCore::Frame::setDocument): call needsTouchEvents directly.
1667         * page/Frame.h: Ditto.
1668         (Frame):
1669         * testing/Internals.cpp:
1670         (WebCore::Internals::hasTouchEventListener): expose Document::hasListenerType indirectly
1671         for additional testing.
1672         (WebCore):
1673         * testing/Internals.h:
1674         (Internals):
1675         * testing/Internals.idl:
1676
1677 2012-07-23  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1678
1679         [Qt] RenderThemeQtMobile highlight colors are not being used
1680         https://bugs.webkit.org/show_bug.cgi?id=92004
1681
1682         Reviewed by Noam Rosenthal.
1683
1684         The issue here is that setPaletteFromPageClientIfExists() is being used as a
1685         virtual function, but it isn't, so when platformActiveSelectionBackgroundColor()
1686         runs, it doesn't pick the right palette.
1687
1688         Besides fixing this virtual behavior, the patch changes the structure a bit,
1689         because setPaletteFromPageClientIfExists() was being "overriden" in mobile theme
1690         to set the palette, which isn't exactly what the function name says.
1691
1692         * platform/qt/RenderThemeQt.cpp:
1693         (WebCore::RenderThemeQt::platformActiveSelectionBackgroundColor):
1694         (WebCore::RenderThemeQt::platformInactiveSelectionBackgroundColor):
1695         (WebCore::RenderThemeQt::platformActiveSelectionForegroundColor):
1696         (WebCore::RenderThemeQt::platformInactiveSelectionForegroundColor):
1697         (WebCore::RenderThemeQt::platformFocusRingColor):
1698         (WebCore::RenderThemeQt::systemColor):
1699         (WebCore::RenderThemeQt::getMediaControlForegroundColor):
1700         (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
1701         Use the virtual colorPalette() to get the palette.
1702
1703         (WebCore::RenderThemeQt::colorPalette):
1704         (WebCore): Removed the code for getting the page client from here since it is
1705         used only by the QStyle variant.
1706
1707         * platform/qt/RenderThemeQt.h:
1708         (RenderThemeQt):
1709         * platform/qt/RenderThemeQtMobile.cpp:
1710         (WebCore::RenderThemeQtMobile::colorPalette):
1711         (WebCore):
1712         * platform/qt/RenderThemeQtMobile.h:
1713         (RenderThemeQtMobile):
1714
1715 2012-07-23  Simon Fraser  <simon.fraser@apple.com>
1716
1717         Part 1 of: Implement sticky positioning
1718         https://bugs.webkit.org/show_bug.cgi?id=90046
1719
1720         Reviewed by Ojan Vafai.
1721
1722         Add ENABLE_CSS_STICKY_POSITION, defaulting to off initially.
1723         
1724         Sort the ENABLE_CSS lines in the file. Make sure all the flags
1725         are in FEATURE_DEFINES.
1726
1727         * Configurations/FeatureDefines.xcconfig:
1728
1729 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1730
1731         Unreviewed, rolling out r123339.
1732         http://trac.webkit.org/changeset/123339
1733         https://bugs.webkit.org/show_bug.cgi?id=92006
1734
1735         massive media tests failure (Requested by philn on #webkit).
1736
1737         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
1738         (WTF::adoptGRef):
1739         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
1740         (setGstElementClassMetadata):
1741         * platform/graphics/gstreamer/GStreamerVersioning.h:
1742
1743 2012-07-21  Vincent Scheib  <scheib@chromium.org>
1744
1745         webkitFullscreenElement, webkitCurrentFullScreenElement, webkitPointerLockElement block cross origin access.
1746         https://bugs.webkit.org/show_bug.cgi?id=91892
1747
1748         Reviewed by Adam Barth.
1749
1750         PointerLockElement only returned when requested from the document that owns it.
1751
1752         Tests: http/tests/fullscreen/fullscreenelement-different-origin.html
1753                http/tests/fullscreen/fullscreenelement-same-origin.html
1754                http/tests/pointer-lock/pointerlockelement-different-origin.html
1755                http/tests/pointer-lock/pointerlockelement-same-origin.html
1756
1757         * dom/Document.cpp:
1758         (WebCore::Document::webkitPointerLockElement):
1759
1760 2012-07-23  Philippe Normand  <pnormand@igalia.com>
1761
1762         [GTK][jhbuild] Switch to GStreamer 0.11 build
1763         https://bugs.webkit.org/show_bug.cgi?id=91727
1764
1765         Reviewed by Gustavo Noronha Silva.
1766
1767         Add a new function to encapsulate the GStreamer API removal of
1768         GST_OBJECT_IS_FLOATING in the upcoming 1.0 release. Use of this
1769         macro can now be replaced by calling the g_object_is_floating
1770         function.
1771
1772         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
1773         (WTF::adoptGRef):
1774         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
1775         (gstObjectIsFloating):
1776         * platform/graphics/gstreamer/GStreamerVersioning.h:
1777
1778 2012-07-23  Christophe Dumez  <christophe.dumez@intel.com>
1779
1780         [EFL] media/controls-styling.html is failing
1781         https://bugs.webkit.org/show_bug.cgi?id=91984
1782
1783         Reviewed by Eric Carlson.
1784
1785         Make sure that the CSS properties letter-spacing, word-spacing,
1786         line-height, text-transform, text-indent, text-shadow,
1787         text-decoration and color do not affect the media element controls,
1788         that display text.
1789
1790         No new tests. Already tested by media/controls-styling.html and
1791         media/controls-styling-strict.html
1792
1793         * css/mediaControlsEfl.css:
1794         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
1795
1796 2012-07-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1797
1798         Unreviewed. Fix make distcheck.
1799
1800         * GNUmakefile.list.am: Add missing header files.
1801
1802 2012-07-23  Kent Tamura  <tkent@chromium.org>
1803
1804         Replace some instances of shadowAncestorNode() with shadowHost()
1805         https://bugs.webkit.org/show_bug.cgi?id=91966
1806
1807         Reviewed by Hajime Morita.
1808
1809         shadowAncestorNode() is deprecated. We should use shadowHost().
1810         No new tests. This doesn't change any behavior.
1811
1812         * css/SelectorChecker.cpp:
1813         (WebCore::SelectorChecker::checkSelector):
1814         * dom/TreeScope.cpp:
1815         (WebCore::listTreeScopes):
1816         * html/HTMLSummaryElement.cpp:
1817         (WebCore::isClickableControl):
1818         * html/shadow/DetailsMarkerControl.cpp:
1819         (WebCore::DetailsMarkerControl::summaryElement):
1820         * html/shadow/MeterShadowElement.cpp:
1821         (WebCore::MeterShadowElement::meterElement):
1822         * html/shadow/ProgressShadowElement.cpp:
1823         (WebCore::ProgressShadowElement::progressElement):
1824         * html/shadow/SliderThumbElement.cpp:
1825         (WebCore::RenderSliderThumb::layout):
1826         (WebCore::RenderSliderContainer::layout):
1827         (WebCore::SliderThumbElement::hostInput):
1828         (WebCore::TrackLimiterElement::shadowPseudoId):
1829         (WebCore::SliderContainerElement::shadowPseudoId):
1830         * html/shadow/TextControlInnerElements.cpp:
1831         (WebCore::TextControlInnerElement::customStyleForRenderer):
1832         (WebCore::TextControlInnerTextElement::defaultEventHandler):
1833         (WebCore::TextControlInnerTextElement::createRenderer):
1834         (WebCore::TextControlInnerTextElement::customStyleForRenderer):
1835         (WebCore::SearchFieldResultsButtonElement::shadowPseudoId):
1836         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
1837         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
1838         (WebCore::SpinButtonElement::defaultEventHandler):
1839         (WebCore::SpinButtonElement::step):
1840         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
1841         (WebCore::InputFieldSpeechButtonElement::setState):
1842         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
1843         (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
1844         * rendering/RenderTextControlSingleLine.cpp:
1845         (WebCore::RenderTextControlInnerBlock::positionForPoint):
1846
1847 2012-07-23  Pavel Feldman  <pfeldman@chromium.org>
1848
1849         [WK2] REGRESSION r122966: Crash when closing tab with Web Inspector open in WebKit::PageOverlay
1850         https://bugs.webkit.org/show_bug.cgi?id=91782
1851
1852         Reviewed by Yury Semikhatsky.
1853
1854         hideHighlight was never called once user hovered over a node.
1855
1856         * inspector/DOMNodeHighlighter.cpp:
1857         (WebCore::InspectorOverlay::update):
1858
1859 2012-07-23  Peter Beverloo  <peter@chromium.org>
1860
1861         [Chromium] Build fix for the Windows builder following r123311
1862         https://bugs.webkit.org/show_bug.cgi?id=91979
1863
1864         Unreviewed build fix.
1865
1866         Changeset r123311 moved the TextCodecWinCE.{cpp,h} files to the Windows
1867         directory. Update Chromium's references to these files to fix the build.
1868
1869         * WebCore.gypi:
1870
1871 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
1872
1873         [WIN] Remove ICU dependencies from UniscribeController
1874         https://bugs.webkit.org/show_bug.cgi?id=91921
1875
1876         Reviewed by Ryosuke Niwa.
1877
1878         Replace ICU specific functions and macros with the corresponding code from WTF::Unicode.
1879         This allows us to use UniscribeController with an other Unicode implementation too.
1880
1881         * platform/graphics/win/UniscribeController.cpp:
1882         (WebCore::UniscribeController::advance):
1883
1884 2012-07-23  Christophe Dumez  <christophe.dumez@intel.com>
1885
1886         [EFL] media/controls-styling-strict.html is failing
1887         https://bugs.webkit.org/show_bug.cgi?id=91960
1888
1889         Reviewed by Kenneth Rohde Christiansen.
1890
1891         Use "display: -webkit-box;" instead of inline-block
1892         for current-time control. This is needed because
1893         inline-block behaves differently in strict mode.
1894
1895         No new test, already tested by media/controls-styling-strict.html
1896
1897         * css/mediaControlsEfl.css:
1898         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
1899
1900 2012-07-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1901
1902         Unreviewed. Fix GTK+ build with ENABLE_DATALIST_ELEMENT.
1903
1904         Add an implementation for virtual pure methods sliderTickSize()
1905         and sliderTickOffsetFromTrackCenter() when HTML5 datalist element
1906         is enabled.
1907
1908         * platform/gtk/RenderThemeGtk.cpp:
1909         (WebCore):
1910         (WebCore::RenderThemeGtk::sliderTickSize):
1911         (WebCore::RenderThemeGtk::sliderTickOffsetFromTrackCenter):
1912         * platform/gtk/RenderThemeGtk.h:
1913
1914 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
1915
1916         Replace getCurrentLocalTime() with GetLocalTime() in LocaleWin.cpp
1917         https://bugs.webkit.org/show_bug.cgi?id=91937
1918
1919         Reviewed by Ryosuke Niwa.
1920
1921         The windows function returns the required year directly and
1922         removes one additonal dependecy on getCurrentLocalTime().
1923
1924         * platform/text/LocaleWin.cpp:
1925         (WebCore::LocaleWin::LocaleWin):
1926
1927 2012-07-23  Vsevolod Vlasov  <vsevik@chromium.org>
1928
1929         Web Inspector: Drag and drop should not be started on right mouse click.
1930         https://bugs.webkit.org/show_bug.cgi?id=91728
1931
1932         Reviewed by Pavel Feldman.
1933
1934         Introduced WebInspector.installDragHandle method to control drag and drop support, checking whichg mouse button is pressed.
1935         Simplified WebInspector._elementDragStart, removed "element" parameter.
1936         Simplified tab moving support in TabbedPane, removed "mousemove" handler.
1937         Removed while loop determining which element was dragged in TimelineOverviewPane, each drag support is now installed independently.
1938         Drive-by: fixed TimelineOverviewPane window moving on resources-dividers-label-bar drang-and-drop.
1939         Drive-by: fixed CSSStyleModel compilation.
1940
1941         * inspector/front-end/CSSStyleModel.js:
1942         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
1943         * inspector/front-end/DataGrid.js:
1944         (WebInspector.DataGrid.prototype._positionResizers):
1945         (WebInspector.DataGrid.prototype._startResizerDragging):
1946         (WebInspector.DataGrid.prototype._endResizerDragging):
1947         * inspector/front-end/Drawer.js:
1948         (WebInspector.Drawer):
1949         (WebInspector.Drawer.prototype._animationDuration):
1950         (WebInspector.Drawer.prototype._startStatusBarDragging):
1951         (WebInspector.Drawer.prototype._endStatusBarDragging):
1952         * inspector/front-end/HeapSnapshotView.js:
1953         (WebInspector.HeapSnapshotView.prototype._startRetainersHeaderDragging):
1954         (WebInspector.HeapSnapshotView.prototype._endRetainersHeaderDragging):
1955         * inspector/front-end/SidebarOverlay.js:
1956         (WebInspector.SidebarOverlay.prototype.set _startResizerDragging):
1957         (WebInspector.SidebarOverlay.prototype._endResizerDragging):
1958         (WebInspector.SidebarOverlay.prototype._installResizer):
1959         * inspector/front-end/Spectrum.js:
1960         * inspector/front-end/SplitView.js:
1961         (WebInspector.SplitView.prototype._startResizerDragging):
1962         (WebInspector.SplitView.prototype._endResizerDragging):
1963         (WebInspector.SplitView.prototype.installResizer):
1964         * inspector/front-end/TabbedPane.js:
1965         (WebInspector.TabbedPaneTab.prototype._createTabElement):
1966         (WebInspector.TabbedPaneTab.prototype._tabMouseDown):
1967         (WebInspector.TabbedPaneTab.prototype._startTabDragging):
1968         (WebInspector.TabbedPaneTab.prototype._endTabDragging):
1969         * inspector/front-end/TimelineOverviewPane.js:
1970         (WebInspector.TimelineOverviewPane):
1971         (WebInspector.TimelineOverviewWindow):
1972         (WebInspector.TimelineOverviewWindow.prototype._leftResizeElementDragging):
1973         (WebInspector.TimelineOverviewWindow.prototype._rightResizeElementDragging):
1974         (WebInspector.TimelineOverviewWindow.prototype._startWindowSelectorDragging):
1975         (WebInspector.TimelineOverviewWindow.prototype._endWindowSelectorDragging):
1976         (WebInspector.TimelineOverviewWindow.prototype._startWindowDragging):
1977         (WebInspector.TimelineOverviewWindow.prototype._windowDragging):
1978         (WebInspector.TimelineOverviewWindow.prototype._endWindowDragging):
1979         (WebInspector.TimelineOverviewWindow.prototype._moveWindow):
1980         (WebInspector.TimelineOverviewWindow.prototype._onMouseWheel):
1981         * inspector/front-end/TimelinePanel.js:
1982         (WebInspector.TimelinePanel):
1983         (WebInspector.TimelinePanel.prototype._startSplitterDragging):
1984         (WebInspector.TimelinePanel.prototype._endSplitterDragging):
1985         * inspector/front-end/Toolbar.js:
1986         (WebInspector.Toolbar):
1987         (WebInspector.Toolbar.prototype._toolbarDragStart):
1988         (WebInspector.Toolbar.prototype._toolbarDragEnd):
1989         * inspector/front-end/UIUtils.js:
1990         (WebInspector.installDragHandle):
1991         (WebInspector._elementDragStart):
1992         (WebInspector._elementDragEnd):
1993         * inspector/front-end/timelinePanel.css:
1994         (#timeline-overview-grid .resources-dividers-label-bar):
1995
1996 2012-07-23  Hayato Ito  <hayato@chromium.org>
1997
1998         ComposedShadowTreeWalker should skip an empty insertion points.
1999         https://bugs.webkit.org/show_bug.cgi?id=91826
2000
2001         Reviewed by Hajime Morita.
2002
2003         ComposedShadowTreeWalker wrongly returns 'null' if it encounters
2004         an insertion point into where no nodes are distributed.  We should
2005         skip such an insertion point and continue walking using the next
2006         possible node, which might be a next sibling or a next distributed
2007         node, and resolve the next node recursively.
2008
2009         Test: fast/dom/shadow/composed-shadow-tree-walker.html
2010
2011         * dom/ComposedShadowTreeWalker.cpp:
2012         (WebCore::ComposedShadowTreeWalker::traverseLightChildren):
2013         (WebCore):
2014         (WebCore::ComposedShadowTreeWalker::traverseSiblings):
2015         (WebCore::ComposedShadowTreeWalker::traverseNode):
2016         (WebCore::ComposedShadowTreeWalker::traverseDistributedeNodes):
2017         (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
2018         (WebCore::ComposedShadowTreeWalker::traverseSiblingInCurrentTree):
2019         (WebCore::ComposedShadowTreeWalker::traverseBackToYoungerShadowRoot):
2020         * dom/ComposedShadowTreeWalker.h:
2021         (ComposedShadowTreeWalker):
2022
2023 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
2024
2025         Rename TextCodecWinCE to TextCodecWin
2026         https://bugs.webkit.org/show_bug.cgi?id=91947
2027
2028         Reviewed by Ryosuke Niwa.
2029
2030         Since TextCodecWinCE is used by other (non-upstreamed) windows ports too,
2031         TextCodecWin is a better name for the implementation.
2032         Also remove the dependency on WinCE FontCache to make it more usable.
2033
2034         * PlatformWinCE.cmake:
2035         * platform/text/TextEncodingRegistry.cpp:
2036         (WebCore::extendTextCodecMaps):
2037         * platform/text/win/TextCodecWin.cpp: Renamed from Source/WebCore/platform/text/wince/TextCodecWinCE.cpp.
2038         * platform/text/win/TextCodecWin.h: Renamed from Source/WebCore/platform/text/wince/TextCodecWinCE.h.
2039
2040 2012-07-22  Kentaro Hara  <haraken@chromium.org>
2041
2042         [V8] CodeGeneratorV8.pm should support static attributes
2043         https://bugs.webkit.org/show_bug.cgi?id=91764
2044
2045         Reviewed by Adam Barth.
2046
2047         CodeGeneratorJS.pm already supports static attributes.
2048         CodeGeneratorV8.pm should also support them.
2049
2050         Tests: bindings/scripts/test/TestObj.idl
2051                bindings/scripts/test/TestSupplemental.idl
2052
2053         * bindings/scripts/CodeGeneratorV8.pm:
2054         (GenerateNormalAttrGetter):
2055         (GenerateNormalAttrSetter):
2056
2057         * bindings/scripts/test/TestObj.idl: Added defined(TESTING_V8).
2058         * bindings/scripts/test/TestSupplemental.idl: Added test cases for static attributes in supplemental IDL files.
2059
2060         * bindings/scripts/test/JS/JSTestInterface.cpp: Updated run-bindings-tests results.
2061         (WebCore):
2062         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
2063         The generated code is wrong since CodeGeneratorJS.pm does not support static attributes for
2064         supplemental IDL files. I will fix it in a follow-up patch.
2065         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
2066         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
2067         * bindings/scripts/test/JS/JSTestInterface.h:
2068         (WebCore):
2069         * bindings/scripts/test/V8/V8TestInterface.cpp: Updated run-bindings-tests results.
2070         (WebCore::TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetter):
2071         (TestInterfaceV8Internal):
2072         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetter):
2073         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetter):
2074         (WebCore):
2075         * bindings/scripts/test/V8/V8TestObj.cpp:
2076         (WebCore::TestObjV8Internal::staticReadOnlyIntAttrAttrGetter):
2077         (TestObjV8Internal):
2078         (WebCore::TestObjV8Internal::staticStringAttrAttrGetter):
2079         (WebCore::TestObjV8Internal::staticStringAttrAttrSetter):
2080         (WebCore):
2081
2082 2012-07-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2083
2084         Missing *explicit* keyword in storage and workers.
2085         https://bugs.webkit.org/show_bug.cgi?id=91934
2086
2087         Reviewed by Kentaro Hara.
2088
2089         Some constructors missed to use *explicit* keyword. They need to be added
2090         *explicit* keyword to contructor which has a parameter in order to avoid
2091         implicit type conversion.
2092
2093         No new tests. Convered by existing tests.
2094
2095         * storage/StorageAreaImpl.h:
2096         (StorageAreaImpl):
2097         * storage/StorageMap.h:
2098         (StorageMap):
2099         * storage/StorageSyncManager.h:
2100         (StorageSyncManager):
2101         * storage/StorageTask.h:
2102         (StorageTask):
2103         * storage/StorageTracker.h:
2104         (StorageTracker):
2105         * workers/SharedWorker.h:
2106         (SharedWorker):
2107         * workers/Worker.h:
2108         (Worker):
2109         * workers/WorkerLocation.h:
2110         (WebCore::WorkerLocation::WorkerLocation):
2111         * workers/WorkerMessagingProxy.h:
2112         (WorkerMessagingProxy):
2113
2114 2012-07-23  Kent Tamura  <tkent@chromium.org>
2115
2116         Rename ENABLE_METER_TAG and ENABLE_PROGRESS_TAG to ENABLE_METER_ELEMENT and ENABLE_PROGRESS_ELEMENT respectively
2117         https://bugs.webkit.org/show_bug.cgi?id=91941
2118
2119         Reviewed by Kentaro Hara.
2120
2121         A flag name for an elmement should be ENABLE_*_ELEMENT.
2122
2123         * Configurations/FeatureDefines.xcconfig:
2124         * DerivedSources.make:
2125         * GNUmakefile.am:
2126         * accessibility/AXObjectCache.cpp:
2127         (WebCore::createFromRenderer):
2128         * accessibility/AccessibilityProgressIndicator.cpp:
2129         * accessibility/AccessibilityProgressIndicator.h:
2130         * css/CSSPrimitiveValueMappings.h:
2131         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2132         * css/SelectorChecker.cpp:
2133         (WebCore::SelectorChecker::checkOneSelector):
2134         * css/StyleResolver.cpp:
2135         (WebCore::StyleResolver::collectMatchingRulesForList):
2136         * css/html.css:
2137         * html/HTMLMeterElement.cpp:
2138         * html/HTMLMeterElement.h:
2139         * html/HTMLMeterElement.idl:
2140         * html/HTMLProgressElement.cpp:
2141         * html/HTMLProgressElement.h:
2142         * html/HTMLProgressElement.idl:
2143         * html/HTMLTagNames.in:
2144         * html/shadow/MeterShadowElement.cpp:
2145         * html/shadow/MeterShadowElement.h: Wrap with #if ENABLE(METER_ELEMENT).
2146         * html/shadow/ProgressShadowElement.cpp:
2147         * html/shadow/ProgressShadowElement.h: Wrap with #if ENABLE(PROGRESS_ELEMENT).
2148         * page/DOMWindow.idl:
2149         * platform/efl/RenderThemeEfl.cpp:
2150         (WebCore::RenderThemeEfl::paintThemePart):
2151         (WebCore::RenderThemeEfl::edjeGroupFromFormType):
2152         (WebCore):
2153         * platform/efl/RenderThemeEfl.h:
2154         (RenderThemeEfl):
2155         * platform/gtk/RenderThemeGtk.cpp:
2156         (WebCore):
2157         * platform/gtk/RenderThemeGtk.h:
2158         (RenderThemeGtk):
2159         * platform/gtk/RenderThemeGtk2.cpp:
2160         (WebCore):
2161         * platform/gtk/RenderThemeGtk3.cpp:
2162         (WebCore):
2163         * platform/qt/RenderThemeQt.cpp:
2164         (WebCore):
2165         * platform/qt/RenderThemeQt.h:
2166         (WebCore):
2167         (RenderThemeQt):
2168         * platform/qt/RenderThemeQtMobile.cpp:
2169         (WebCore):
2170         * platform/qt/RenderThemeQtMobile.h:
2171         (RenderThemeQtMobile):
2172         * rendering/RenderMeter.cpp:
2173         * rendering/RenderMeter.h:
2174         * rendering/RenderObject.h:
2175         (RenderObject):
2176         * rendering/RenderProgress.cpp:
2177         * rendering/RenderProgress.h:
2178         * rendering/RenderTheme.cpp:
2179         (WebCore::RenderTheme::adjustStyle):
2180         (WebCore::RenderTheme::paint):
2181         (WebCore::RenderTheme::paintBorderOnly):
2182         (WebCore::RenderTheme::paintDecorations):
2183         (WebCore):
2184         * rendering/RenderTheme.h:
2185         (WebCore):
2186         (RenderTheme):
2187         * rendering/RenderThemeChromiumLinux.cpp:
2188         (WebCore):
2189         * rendering/RenderThemeChromiumLinux.h:
2190         * rendering/RenderThemeChromiumSkia.cpp:
2191         (WebCore):
2192         * rendering/RenderThemeChromiumSkia.h:
2193         (RenderThemeChromiumSkia):
2194         * rendering/RenderThemeChromiumWin.cpp:
2195         (WebCore):
2196         * rendering/RenderThemeChromiumWin.h:
2197         (RenderThemeChromiumWin):
2198         * rendering/RenderThemeMac.h:
2199         (RenderThemeMac):
2200         * rendering/RenderThemeMac.mm:
2201         (WebCore):
2202
2203 2012-07-22  Kent Tamura  <tkent@chromium.org>
2204
2205         Rename ENABLE_DETAILS to ENABLE_DETAILS_ELEMENT
2206         https://bugs.webkit.org/show_bug.cgi?id=91928
2207
2208         Reviewed by Kentaro Hara.
2209
2210         A flag name for an elmement should be ENABLE_*_ELEMENT.
2211
2212         * Configurations/FeatureDefines.xcconfig:
2213         * DerivedSources.make:
2214         * GNUmakefile.am:
2215         * html/HTMLDetailsElement.cpp:
2216         * html/HTMLDetailsElement.idl:
2217         * html/HTMLSummaryElement.cpp:
2218         * html/HTMLTagNames.in:
2219         * html/shadow/DetailsMarkerControl.cpp:
2220         * rendering/RenderDetailsMarker.cpp:
2221         * rendering/RenderDetailsMarker.h:
2222         * rendering/RenderObject.h:
2223         (RenderObject):
2224         * rendering/RenderTreeAsText.cpp:
2225         (WebCore::RenderTreeAsText::writeRenderObject):
2226
2227 2012-07-21  Dan Bernstein  <mitz@apple.com>
2228
2229         <rdar://problem/11928576> SVG-as-image (constrained) intrinsic size calculation is wrong in vertical writing modes
2230         https://bugs.webkit.org/show_bug.cgi?id=91918
2231
2232         Reviewed by Anders Carlsson.
2233
2234         Test: svg/as-image/svg-intrinsic-size-rectangular-vertical.html
2235
2236         * rendering/RenderReplaced.cpp:
2237         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox): When there is a content
2238         renderer, it returns a physical intrinsic size and aspect ratio. The code was already
2239         accounting for this by taking the reciprocal of the aspect ratio in the vertical case. Made
2240         it also transpose the size itself, turning it from physical to logical. Moved this code
2241         after setting m_intrinsicSize, since that member variable is always physical.
2242
2243 2012-07-21  Patrick Gansterer  <paroga@webkit.org>
2244
2245         Cleanup TextEncoding USE(XXX_UNICODE) macros
2246         https://bugs.webkit.org/show_bug.cgi?id=91923
2247
2248         Reviewed by Andreas Kling.
2249
2250         Replace PLATFORM(QT) with USE(QT4_UNICODE) and OS(WINCE) with USE(WINCE_UNICODE).
2251         This gives us more flexibility in choosing the unicode backend for a port.
2252
2253         * platform/text/TextEncoding.cpp:
2254         (WebCore::TextEncoding::encode):
2255         * platform/text/TextEncodingRegistry.cpp:
2256         (WebCore::extendTextCodecMaps):
2257
2258 2012-07-21  Patrick Gansterer  <paroga@webkit.org>
2259
2260         Remove unnecessary ICU header includes from SimpleFontDataWin.cpp
2261         https://bugs.webkit.org/show_bug.cgi?id=91922
2262
2263         Reviewed by Kentaro Hara.
2264
2265         This allows us to use SimpleFontDataWin with an other Unicode implementation too.
2266
2267         * platform/graphics/win/SimpleFontDataWin.cpp:
2268
2269 2012-07-21  Kwang Yul Seo  <skyul@company100.net>
2270
2271         A start tag whose tag name is "html" in the "in body" insertion mode is a parse error
2272         https://bugs.webkit.org/show_bug.cgi?id=91916
2273
2274         Reviewed by Eric Seidel.
2275
2276         According to the HTML5 spec, a start tag whose tag name is "html" in the "in body"
2277         insertion mode is a parse error.
2278
2279         Added HTMLTreeBuilder::processHtmlStartTagForInBody(AtomicHTMLToken&) to call parseError(token).
2280         Removed "FIXME: parse error" from HTMLConstructionSite::insertHTMLHtmlStartTagInBody and
2281         HTMLConstructionSite::insertHTMLBodyStartTagInBody because we already marked the call sites
2282         of these two methods with parseError(token).
2283
2284         No behavior change because parseError(token) is just a marker.
2285
2286         * html/parser/HTMLConstructionSite.cpp:
2287         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
2288         (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody):
2289         * html/parser/HTMLTreeBuilder.cpp:
2290         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
2291         (WebCore::HTMLTreeBuilder::processStartTag):
2292         (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
2293         (WebCore):
2294         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
2295         * html/parser/HTMLTreeBuilder.h:
2296
2297 2012-07-20  Czene Tamás  <tczene@inf.u-szeged.hu>
2298
2299         double data type shoud be changed to float in ColorMatrix
2300         https://bugs.webkit.org/show_bug.cgi?id=91499
2301
2302         Reviewed by Nikolas Zimmermann.
2303
2304         * platform/graphics/filters/FEColorMatrix.cpp:
2305         (WebCore::matrix):
2306         (WebCore::saturate):
2307         (WebCore::huerotate):
2308         (WebCore::luminance):
2309         (WebCore::effectType):
2310
2311 2012-07-20  Stephen White  <senorblanco@chromium.org>
2312
2313         [chromium] Take current transformation matrix into account when
2314         deciding on resize algorithm for drawPattern.
2315         https://bugs.webkit.org/show_bug.cgi?id=90624
2316
2317         Reviewed by Adrienne Walker.
2318
2319         Since the pattern shader uses both the current transformation matrix
2320         and the pattern matrix when transforming pixels, we need to
2321         do the same when computing the resampling mode.  Also removed the
2322         resampling hint code, added in r60658, since it appears to be dead
2323         (caller was removed in r76379).
2324
2325         Covered by existing tests, such as
2326         fast/borders/border-image-scale-transform.html.
2327
2328         * platform/graphics/skia/ImageSkia.cpp:
2329         (WebCore::computeResamplingMode):
2330         Pass in the matrix to be used for computing the destination width and
2331         height (for awesome resampling).  Remove the image resampling hint code.
2332         (WebCore::paintSkBitmap):
2333         Pass in the CTM to computeResamplingMode().
2334         (WebCore::Image::drawPattern):
2335         Concatenate the CTM and the pattern matrix, and pass that to 
2336         computeResamplingMode() and TransformDimensions().  Invert the
2337         CTM's scale and apply it to the pattern transform, so their
2338         concatenation gives identity scale.
2339         * platform/graphics/skia/PlatformContextSkia.cpp:
2340         * platform/graphics/skia/PlatformContextSkia.h:
2341         Remove the image resampling hint (dead code).
2342
2343 2012-07-20  Kwang Yul Seo  <skyul@company100.net>
2344
2345         Anything else in the "in table" insertion mode is a parse error
2346         https://bugs.webkit.org/show_bug.cgi?id=91915
2347
2348         Reviewed by Adam Barth.
2349
2350         According to the HTML5 spec, anything else in the "in table" insertion mode is a parse error.
2351
2352         No behavior change because parseError(token) is just a marker.
2353
2354         * html/parser/HTMLTreeBuilder.cpp:
2355         (WebCore::HTMLTreeBuilder::processEndTagForInTable):
2356
2357 2012-07-20  Kent Tamura  <tkent@chromium.org>
2358
2359         Rename ENABLE_DATALIST to ENABLE_DATALIST_ELEMENT
2360         https://bugs.webkit.org/show_bug.cgi?id=91846
2361
2362         Reviewed by Kentaro Hara.
2363
2364         A flag name for an elmement should be ENABLE_*_ELEMENT.
2365
2366         * Configurations/FeatureDefines.xcconfig:
2367         * DerivedSources.make:
2368         * GNUmakefile.am:
2369         * css/html.css:
2370         * html/HTMLDataListElement.cpp:
2371         * html/HTMLDataListElement.h:
2372         * html/HTMLDataListElement.idl:
2373         * html/HTMLInputElement.cpp:
2374         (WebCore):
2375         (WebCore::HTMLInputElement::parseAttribute):
2376         (WebCore::HTMLInputElement::insertedInto):
2377         (WebCore::HTMLInputElement::removedFrom):
2378         * html/HTMLInputElement.h:
2379         (HTMLInputElement):
2380         * html/HTMLInputElement.idl:
2381         * html/HTMLOptionElement.cpp:
2382         (WebCore::HTMLOptionElement::parseAttribute):
2383         (WebCore::HTMLOptionElement::childrenChanged):
2384         (WebCore):
2385         * html/HTMLOptionElement.h:
2386         (HTMLOptionElement):
2387         * html/HTMLTagNames.in:
2388         * html/InputType.cpp:
2389         (WebCore):
2390         * html/InputType.h:
2391         (InputType):
2392         * html/RangeInputType.cpp:
2393         (WebCore):
2394         * html/RangeInputType.h:
2395         (RangeInputType):
2396         * html/shadow/SliderThumbElement.cpp:
2397         (WebCore::RenderSliderContainer::layout):
2398         * page/DOMWindow.idl:
2399         * platform/efl/RenderThemeEfl.cpp:
2400         (WebCore):
2401         * platform/efl/RenderThemeEfl.h:
2402         (RenderThemeEfl):
2403         * platform/qt/RenderThemeQt.cpp:
2404         (WebCore):
2405         * platform/qt/RenderThemeQt.h:
2406         (RenderThemeQt):
2407         * rendering/RenderTheme.cpp:
2408         (WebCore):
2409         * rendering/RenderTheme.h:
2410         (RenderTheme):
2411         * rendering/RenderThemeChromiumLinux.cpp:
2412         (WebCore):
2413         (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
2414         * rendering/RenderThemeChromiumLinux.h:
2415         (RenderThemeChromiumLinux):
2416         * rendering/RenderThemeChromiumWin.cpp:
2417         (WebCore):
2418         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
2419         * rendering/RenderThemeChromiumWin.h:
2420         (RenderThemeChromiumWin):
2421         * rendering/RenderThemeMac.h:
2422         (RenderThemeMac):
2423         * rendering/RenderThemeMac.mm:
2424         (WebCore::RenderThemeMac::paintSliderTrack):
2425         (WebCore):
2426
2427 2012-07-18  Ryosuke Niwa  <rniwa@webkit.org>
2428
2429         Unify HTMLCollection and DynamicNodeList
2430         https://bugs.webkit.org/show_bug.cgi?id=91335
2431
2432         Reviewed by Anders Carlsson.
2433
2434         This is the grand unification of HTMLCollection and DynamicNodeList.
2435
2436         It merges implementations of item() and length() in ChildNodeList, DynamicNodeList,
2437         and HTMLCollection. The unified implementation is based on the one used for HTMLCollection,
2438         that has been improved over the last few days; see r122660 and r122672 for examples.
2439
2440         There are five key changes:
2441         1. Made itemBeforeOrAfter aware of DynamicNodeList.
2442         2. itemBeforeOrAfter and related functions take and return Node* to support ChildNodeList.
2443         3. Renamed InvalidCollectionType to NodeListCollectionType since DynamicNodeLists need to be
2444         identified itemBeforeOrAfter.
2445         4. Renamed itemAfter to virtualItemAfter in subclasses of HTMLCollection, and devirtualized
2446         itemAfter used in common cases to avoid performance regressions. To make this intent clear,
2447         SupportItemBefore and DoNotSupportItemBefore have been renamed to DoesNotOverrideItemAfter
2448         and OverridesItemAfter. This change also help us detect a subclass of HTMLCollection that
2449         passes in a wrong value to ItemBeforeSupportType by making forward iterations fail (hit an
2450         assertion or doesn't iterate at all) as well as backward iterations.
2451         5. Restricted the use of elementsArrayOffset to subclasses that provide virtualItemAfter.
2452
2453         This patch completes my effort to share code between HTMLCollection and DynamicNodeList.
2454
2455         * dom/ChildNodeList.cpp:
2456         (WebCore::ChildNodeList::ChildNodeList):
2457         (WebCore): Removed length() and item().
2458         (WebCore::ChildNodeList::nodeMatches):
2459         * dom/ChildNodeList.h:
2460         (ChildNodeList):
2461         * dom/ClassNodeList.cpp:
2462         (WebCore::ClassNodeList::ClassNodeList):
2463         * dom/Document.cpp:
2464         (WebCore::Document::registerNodeListCache):
2465         (WebCore::Document::unregisterNodeListCache):
2466         * dom/DynamicNodeList.cpp:
2467         (WebCore::DynamicNodeListCacheBase::invalidateCache):
2468         (WebCore::DynamicNodeList::length):
2469         (WebCore::DynamicNodeList::item):
2470         * dom/DynamicNodeList.h:
2471         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Takes new boolean argument
2472         shouldOnlyIncludeDirectChildren indicating whether the non-child descendents should be
2473         included or not. This is necessary to identify ChildNodeList in itemBeforeOrAfter.
2474         (WebCore::DynamicNodeListCacheBase::ownerNode): Moved from DynamicNodeListCacheBase and
2475         HTMLCollectionCacheBase.
2476         (WebCore::DynamicNodeListCacheBase::document): Moved from DynamicNodeListCacheBase.
2477         (WebCore::DynamicNodeListCacheBase::rootNode): Ditto.
2478         (WebCore::DynamicNodeListCacheBase::overridesItemAfter): Renamed from supportsItemBefore
2479         and the return value has been negated.
2480         (WebCore::DynamicNodeListCacheBase::shouldOnlyIncludeDirectChildren): Added.
2481         (WebCore::DynamicNodeListCacheBase):
2482         (WebCore::DynamicNodeList::DynamicNodeList): Takes NodeListType to determine the value of
2483         shouldOnlyIncludeDirectChildren.
2484         (DynamicNodeList):
2485         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
2486         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
2487         * dom/MicroDataItemList.cpp:
2488         (WebCore::MicroDataItemList::MicroDataItemList):
2489         * dom/NameNodeList.cpp:
2490         (WebCore::NameNodeList::NameNodeList):
2491         * dom/TagNodeList.cpp:
2492         (WebCore::TagNodeList::TagNodeList):
2493         * html/CollectionType.h:
2494         * html/HTMLAllCollection.cpp:
2495         (WebCore::HTMLAllCollection::HTMLAllCollection):
2496         * html/HTMLCollection.cpp:
2497         (WebCore::shouldOnlyIncludeDirectChildren):
2498         (WebCore::rootTypeFromCollectionType):
2499         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
2500         (WebCore::HTMLCollection::HTMLCollection):
2501         (WebCore::HTMLCollection::create):
2502         (WebCore::HTMLCollection::~HTMLCollection):
2503         (WebCore::isAcceptableElement):
2504         (WebCore::firstNode): Extracted from itemBeforeOrAfter.
2505         (WebCore::DynamicNodeListCacheBase::iterateForNextNode): Ditto.
2506         (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfter): Takes and returns Node*.
2507         Special case ChildNodeList since there is no need to skip any node. When "this" is a
2508         node list, call nodeMatches instead of isAcceptableElement.
2509         (WebCore::DynamicNodeListCacheBase::itemBefore): No longer takes offsetInArray since
2510         the use of elementsArrayOffset has been restricted to HTMLCollections that provides
2511         virtualItemAfter.
2512         (WebCore::DynamicNodeListCacheBase::itemAfter): Calls virtualItemAfter if necessary.
2513         Otherwise assert offsetInArray is zero since we should never be using this variable
2514         when virtualItemAfter is not provided.
2515         (WebCore::DynamicNodeListCacheBase::isLastItemCloserThanLastOrCachedItem):
2516         (WebCore::DynamicNodeListCacheBase::isFirstItemCloserThanCachedItem):
2517         (WebCore::DynamicNodeListCacheBase::setItemCache): Updates m_cachedElementsArrayOffset
2518         in HTMLCollection if and only if virtualItemAfter is provided. This is safe because
2519         node lists never provide virtualItemAfter.
2520         (WebCore::DynamicNodeListCacheBase::cachedElementsArrayOffset): Similarly, returns
2521         m_cachedElementsArrayOffset if virtualItemAfter is provided.
2522         (WebCore::DynamicNodeListCacheBase::lengthCommon):
2523         (WebCore::DynamicNodeListCacheBase::itemCommon): Note that supportsItemBefore() is
2524         equivalent to !overridesItemAfter() here.
2525         (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfterCachedItem): Uses Node* through
2526         out the function. Since itemBefore never uses offsetInArray, always sets 0 for that.
2527         Note that we never call itemBefore and virtualItemAfter on the same object.
2528         (WebCore::HTMLCollection::virtualItemAfter): Added only to make the class "concrete".
2529         (WebCore::HTMLCollection::namedItem):
2530         (WebCore::HTMLCollection::updateNameCache):
2531         (WebCore::HTMLCollection::tags):
2532         * html/HTMLCollection.h:
2533         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
2534         (HTMLCollectionCacheBase):
2535         (WebCore::HTMLCollection::length):
2536         (WebCore::HTMLCollection::item):
2537         (WebCore::HTMLCollection::base):
2538         (HTMLCollection):
2539         * html/HTMLFormCollection.cpp:
2540         (WebCore::HTMLFormCollection::HTMLFormCollection):
2541         (WebCore::HTMLFormCollection::virtualItemAfter):
2542         * html/HTMLFormCollection.h:
2543         (HTMLFormCollection):
2544         * html/HTMLNameCollection.cpp:
2545         (WebCore::HTMLNameCollection::HTMLNameCollection):
2546         (WebCore::HTMLNameCollection::virtualItemAfter):
2547         * html/HTMLNameCollection.h:
2548         (HTMLNameCollection):
2549         * html/HTMLOptionsCollection.cpp:
2550         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
2551         * html/HTMLPropertiesCollection.cpp:
2552         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
2553         (WebCore::HTMLPropertiesCollection::virtualItemAfter):
2554         (WebCore::HTMLPropertiesCollection::updateNameCache):
2555         * html/HTMLPropertiesCollection.h:
2556         (HTMLPropertiesCollection):
2557         * html/HTMLTableRowsCollection.cpp:
2558         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
2559         (WebCore::HTMLTableRowsCollection::virtualItemAfter):
2560         * html/HTMLTableRowsCollection.h:
2561         (HTMLTableRowsCollection):
2562         * html/LabelsNodeList.cpp:
2563         (WebCore::LabelsNodeList::LabelsNodeList):
2564         * html/RadioNodeList.cpp:
2565         (WebCore::RadioNodeList::RadioNodeList):
2566
2567 2012-07-20  Joshua Bell  <jsbell@chromium.org>
2568
2569         IndexedDB: Simplify backend interface classes
2570         https://bugs.webkit.org/show_bug.cgi?id=91901
2571
2572         Reviewed by Tony Chang.
2573
2574         The IDBTransactionBackendInterface included several methods only used by the
2575         real implementation objects, not via the interfaces. Expose a static Impl::from(Interface)
2576         method for transaction, and migrate all of the backend-internal uses from Interface to Impl.
2577
2578         No new tests - no functional changes.
2579
2580         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
2581         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
2582         * Modules/indexeddb/IDBCursorBackendImpl.h:
2583         (WebCore):
2584         (WebCore::IDBCursorBackendImpl::create):
2585         (IDBCursorBackendImpl):
2586         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2587         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
2588         (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
2589         (WebCore::IDBDatabaseBackendImpl::objectStore):
2590         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
2591         (WebCore::IDBDatabaseBackendImpl::deleteObjectStoreInternal):
2592         (WebCore::IDBDatabaseBackendImpl::setVersion):
2593         (WebCore::IDBDatabaseBackendImpl::setVersionInternal):
2594         (WebCore::IDBDatabaseBackendImpl::transactionStarted):
2595         (WebCore::IDBDatabaseBackendImpl::transactionFinished):
2596         (WebCore::IDBDatabaseBackendImpl::transaction):
2597         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2598         (WebCore):
2599         (IDBDatabaseBackendImpl):
2600         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
2601         (WebCore::IDBIndexBackendImpl::openCursorInternal):
2602         (WebCore::IDBIndexBackendImpl::openCursor):
2603         (WebCore::IDBIndexBackendImpl::openKeyCursor):
2604         (WebCore::IDBIndexBackendImpl::countInternal): Drop unused transaction argument.
2605         (WebCore::IDBIndexBackendImpl::count):
2606         (WebCore::IDBIndexBackendImpl::get):
2607         (WebCore::IDBIndexBackendImpl::getKey):
2608         * Modules/indexeddb/IDBIndexBackendImpl.h:
2609         (IDBIndexBackendImpl):
2610         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2611         (WebCore::IDBObjectStoreBackendImpl::get):
2612         (WebCore::IDBObjectStoreBackendImpl::put):
2613         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
2614         (WebCore):
2615         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2616         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
2617         (WebCore::IDBObjectStoreBackendImpl::clear):
2618         (WebCore::IDBObjectStoreBackendImpl::createIndex):
2619         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
2620         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
2621         (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal):
2622         (WebCore::IDBObjectStoreBackendImpl::openCursor):
2623         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
2624         (WebCore::IDBObjectStoreBackendImpl::count):
2625         (WebCore::IDBObjectStoreBackendImpl::countInternal): Drop unused transaction argument.
2626         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
2627         (WebCore):
2628         (IDBObjectStoreBackendImpl):
2629         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2630         (WebCore::IDBTransactionBackendImpl::objectStore):
2631         * Modules/indexeddb/IDBTransactionBackendImpl.h:
2632         (WebCore::IDBTransactionBackendImpl::from):
2633         (IDBTransactionBackendImpl):
2634         (WebCore::IDBTransactionBackendImpl::mode):
2635         * Modules/indexeddb/IDBTransactionBackendInterface.h:
2636         (IDBTransactionBackendInterface):
2637
2638 2012-07-20  Joshua Bell  <jsbell@chromium.org>
2639
2640         IndexedDB: "ASSERTION FAILED: !m_requestFinished" hit in IDBRequest::dispatchEvent
2641         https://bugs.webkit.org/show_bug.cgi?id=86911
2642
2643         Reviewed by Tony Chang.
2644
2645         Clean up the IDBRequest/IDBCursor relationship and the IDBRequest lifecycle.
2646
2647         The IDBRequest's m_cursor/setCursor() calls are renamed to m_pendingCursor/setPendingCursor() to
2648         clarify that the request will move between two states - either there's a cursor request in-flight
2649         c/o a continue() or advance() call, or the result has come in (cursor, null-for-done, or error).
2650         Since they were only ever used together, resetReadyState() is merged into setResultCursor(). The
2651         m_requestFinished flag becomes redundant and is dropped - the ASSERT reported in the bug
2652         becomes an ASSERT(m_readyState == PENDING) and m_readyState tracking is already correct.
2653
2654         Test: storage/indexeddb/request-continue-abort.html
2655
2656         * Modules/indexeddb/IDBCursor.cpp:
2657         (WebCore::IDBCursor::advance): Unreachable code path now dead and gone.
2658         (WebCore::IDBCursor::continueFunction): Ditto.
2659         * Modules/indexeddb/IDBRequest.cpp: Most functions just add state assertions.
2660         (WebCore::IDBRequest::IDBRequest):
2661         (WebCore::IDBRequest::abort):
2662         (WebCore::IDBRequest::setCursorDetails):
2663         (WebCore::IDBRequest::setPendingCursor): Merge with old resetReadyState().
2664         (WebCore):
2665         (WebCore::IDBRequest::getResultCursor): Helper, since digging cursor out of IDBAny is pesky.
2666         (WebCore::IDBRequest::setResultCursor): Just moved in the file to be with its friends.
2667         (WebCore::IDBRequest::finishCursor):
2668         (WebCore::IDBRequest::onError): Just assertions, re-ordering, re-naming.
2669         (WebCore::IDBRequest::onSuccess):
2670         (WebCore::IDBRequest::onSuccessWithContinuation):
2671         (WebCore::IDBRequest::hasPendingActivity):
2672         (WebCore::IDBRequest::dispatchEvent): Simplify!
2673         (WebCore::IDBRequest::enqueueEvent):
2674         * Modules/indexeddb/IDBRequest.h:
2675         (IDBRequest):
2676
2677 2012-07-20  Andrew Scherkus  <scherkus@chromium.org>
2678
2679         [chromium] Don't display fullscreen button for video elements not containing video
2680         https://bugs.webkit.org/show_bug.cgi?id=91811
2681
2682         Reviewed by Eric Carlson.
2683
2684         Covered by media/media-document-audio-repaint.html
2685
2686         * html/shadow/MediaControlRootElementChromium.cpp:
2687         (WebCore::MediaControlRootElementChromium::reset):
2688
2689 2012-07-20  Dmitry Titov  <dimich@chromium.org>
2690
2691         [Chromium] Out of Memory is observed when a large object is passed to a Web Worker.
2692         https://bugs.webkit.org/show_bug.cgi?id=91535.
2693
2694         Reviewed by David Levin.
2695
2696         No new tests because of no new behavior and lack of mechanism to monitor used memory.
2697
2698         * bindings/v8/SerializedScriptValue.cpp:
2699         (WebCore::SerializedScriptValue::SerializedScriptValue):
2700         (WebCore::SerializedScriptValue::registerMemoryAllocatedWithCurrentScriptContext):
2701         (WebCore):
2702         (WebCore::SerializedScriptValue::~SerializedScriptValue):
2703         * bindings/v8/SerializedScriptValue.h:
2704         (SerializedScriptValue):
2705         Added a method to SerializedScriptValue to add memory pressure on GC proportional to the size of memory allocated in serialized data.
2706         
2707         * dom/MessageEvent.cpp:
2708         (WebCore::MessageEvent::MessageEvent):
2709         (WebCore::MessageEvent::initMessageEvent):
2710         Call the new method of SerializedScriptValue during creation of MessageEvent (presumably in the thread which contains the right V8 context).
2711
2712 2012-07-20  David Grogan  <dgrogan@chromium.org>
2713
2714         IndexedDB: Include intVersion when converting between WebCore and WebKit IDBMetadata types
2715         https://bugs.webkit.org/show_bug.cgi?id=91414
2716
2717         Reviewed by Adam Barth.
2718
2719         No new tests because no new behavior.
2720
2721         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2722         (WebCore::IDBDatabaseBackendImpl::metadata):
2723         No behavior change, this just needs a dummy parameter to match the
2724         modified API.
2725
2726         * Modules/indexeddb/IDBMetadata.h:
2727         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
2728         (IDBDatabaseMetadata):
2729
2730 2012-07-18  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
2731
2732         [Soup] Unnecessary RefPtr usage and null check
2733         https://bugs.webkit.org/show_bug.cgi?id=91636
2734
2735         Reviewed by Martin Robinson.
2736
2737         Small clean up of code that is not necessary; no change in functionality.
2738
2739         * platform/network/soup/SocketStreamHandleSoup.cpp:
2740         (WebCore::SocketStreamHandle::connected):
2741
2742 2012-07-20  Mark Salisbury  <mark.salisbury@hp.com>
2743
2744         Typo in FontCacheWin.cpp causes return value from getCachedFontData() in getLastResortFallbackFont() to be ignored
2745         https://bugs.webkit.org/show_bug.cgi?id=91506
2746
2747         Reviewed by Joseph Pecoraro.
2748
2749         No new test.  The "fallback fallback" code ends up creating a font, so you always
2750         get a fallback font even with this code bug.  A test would be buggy, being highly
2751         platform dependent on what the "fallback fallback" font is on the particular
2752         windows machine the test runs on.
2753
2754         * platform/graphics/win/FontCacheWin.cpp:
2755         (WebCore::FontCache::getLastResortFallbackFont):
2756
2757 2012-07-20  Stephen White  <senorblanco@chromium.org>
2758
2759         [chromium] Clean up scratch texture usage in Chromium's implementation
2760         of GPU-accelerated filters.
2761         https://bugs.webkit.org/show_bug.cgi?id=83370
2762
2763         Reviewed by Adrienne Walker.
2764
2765         There didn't used to be a safe way to allocate a scratch texture, and
2766         hold into it beyond the lifetime of GrAutoScratchTexture.  Now there is:
2767         detach().
2768
2769         Covered by existing tests in css3/filters.
2770
2771         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
2772         (WebCore::CCRenderSurfaceFilters::apply):
2773         Use a GrAutoScratchTexture to allocate the destination texture, and 
2774         detach() to detach it from the cache before placing it in an
2775         SkGrTexturePixelRef.  This means we no longer need to do any lock/
2776         unlock trickery with the TextureCacheEntry, since the refcount is
2777         enough to keep the texture away from the cache's prying hands.
2778
2779 2012-07-20  Stephen White  <senorblanco@chromium.org>
2780
2781         [chromium] Clean up scratch texture usage in Chromium's implementation
2782         of GPU-accelerated filters.
2783         https://bugs.webkit.org/show_bug.cgi?id=83370
2784
2785         Reviewed by Adrienne Walker.
2786
2787         There didn't used to be a safe way to allocate a scratch texture, and
2788         hold into it beyond the lifetime of GrAutoScratchTexture.  Now there is:
2789         detach().
2790
2791         Covered by existing tests in css3/filters.
2792
2793         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
2794         (WebCore::CCRenderSurfaceFilters::apply):
2795         Use a GrAutoScratchTexture to allocate the destination texture, and 
2796         detach() to detach it from the cache before placing it in an
2797         SkGrTexturePixelRef.  This means we no longer need to do any lock/
2798         unlock trickery with the TextureCacheEntry, since the refcount is
2799         enough to keep the texture away from the cache's prying hands.
2800
2801 2012-07-19  Andrew Scherkus  <scherkus@chromium.org>
2802
2803         [chromium] CSS tweaks to media controls to prevent styles from being overridden
2804         https://bugs.webkit.org/show_bug.cgi?id=91802
2805
2806         Reviewed by Eric Carlson.
2807
2808         Having the buttons declared as inline caused them to not be included in the box layout,
2809         resulting in styles set outside the media element to affect the position of the buttons.
2810
2811         In a similar vein, it was also possible to override the font-style attribute for the time
2812         display.
2813
2814         Test: media/controls-styling-strict.html
2815
2816         * css/mediaControlsChromium.css:
2817         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
2818         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
2819         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
2820         (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button):
2821
2822 2012-07-20  Han Shen  <shenhan@google.com>
2823
2824         [Chromium] Compilation fails under gcc 4.7
2825         https://bugs.webkit.org/show_bug.cgi?id=90227
2826
2827         Reviewed by Tony Chang.
2828
2829         Disable warnings about c++0x compatibility in gcc newer than 4.6.
2830
2831         * WebCore.gyp/WebCore.gyp:
2832
2833 2012-07-20  Vincent Scheib  <scheib@chromium.org>
2834
2835         Unreviewed compile fix, r123247 included unintended changes to Document.cpp.
2836
2837         See http://trac.webkit.org/changeset/123247.
2838
2839         * dom/Document.cpp:
2840         (WebCore::Document::webkitExitPointerLock):
2841
2842 2012-07-20  Ryosuke Niwa  <rniwa@webkit.org>
2843
2844         REGRESSION(r122873): 15% regression on Dromaeo/dom-attr
2845         https://bugs.webkit.org/show_bug.cgi?id=91827
2846
2847         Reviewed by Anders Carlsson.
2848
2849         Move shouldInvalidateNodeListCaches from Document.cpp to Node.cpp since it's only called
2850         in Node::invalidateNodeListCachesInAncestors.
2851
2852         Test: PerformanceTests/Dromaeo/dom-attr.html.
2853
2854         * dom/Document.cpp:
2855         (WebCore):
2856         * dom/Node.cpp:
2857         (WebCore::shouldInvalidateNodeListCachesForAttr): Extracted from shouldInvalidateNodeListCaches
2858         to unroll the loop in shouldInvalidateNodeListCaches. Apparently gcc wasn't doing the right thing.
2859         (WebCore::Document::shouldInvalidateNodeListCaches):
2860         (WebCore::Document::invalidateNodeListCaches):
2861         (WebCore::Node::invalidateNodeListCachesInAncestors):
2862
2863 2012-07-20  Nico Weber  <thakis@chromium.org>
2864
2865         Fix more -Wunused-private-field violations
2866         https://bugs.webkit.org/show_bug.cgi?id=91876
2867
2868         Reviewed by Adam Barth.
2869
2870         As of http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120716/061102.html
2871         the warning finds more bugs. Fix them.
2872
2873         * html/FTPDirectoryDocument.cpp:
2874         (FTPDirectoryDocumentParser):
2875         (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser):
2876         * html/parser/HTMLTreeBuilder.cpp:
2877         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2878         * html/parser/HTMLTreeBuilder.h:
2879         (HTMLTreeBuilder):
2880         * html/shadow/MediaControlRootElementChromium.cpp:
2881         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
2882         * html/shadow/MediaControlRootElementChromium.h:
2883         (MediaControlRootElementChromium):
2884         * inspector/InspectorDOMStorageResource.cpp:
2885         (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
2886         * inspector/InspectorDOMStorageResource.h:
2887         (InspectorDOMStorageResource):
2888         * page/Settings.cpp:
2889         (WebCore::Settings::Settings):
2890         * page/Settings.h:
2891         (Settings):
2892         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2893         (WebCore::CCThreadProxy::CCThreadProxy):
2894         * platform/graphics/chromium/cc/CCThreadProxy.h:
2895         (CCThreadProxy):
2896         * rendering/svg/RenderSVGTextPath.cpp:
2897         (WebCore::RenderSVGTextPath::RenderSVGTextPath):
2898         * rendering/svg/RenderSVGTextPath.h:
2899
2900 2012-07-20  Adam Klein  <adamk@chromium.org>
2901
2902         CodeGeneratorInspector.py is unnecessarily chatty
2903         https://bugs.webkit.org/show_bug.cgi?id=91758
2904
2905         Reviewed by Vsevolod Vlasov.
2906
2907         The code aded in r123091 included a "print" statement for each written
2908         file. This makes for noisy build output, especially noticeable in the
2909         Chromium ninja build (where build output takes up a single line of the
2910         console).
2911
2912         If this print statement is generally useful, it should be
2913         hidden behind a --verbose commandline option, as we do for the binding
2914         generators.
2915
2916         * inspector/CodeGeneratorInspector.py:
2917         (SmartOutput.close): Remove print statement.
2918
2919 2012-07-20  Stephen White  <senorblanco@chromium.org>
2920
2921         [chromium] Enable GPU-accelerated skia implementation of
2922         feDiffuseLighting, feSpecularLighting.
2923         https://bugs.webkit.org/show_bug.cgi?id=91865
2924
2925         Reviewed by Dirk Schulze.
2926
2927         Translate the light parameters into the appropriate
2928         SkLightingImageFilter calls.  This path is only enabled when
2929         the filters are created with the Accelerated flag set.
2930
2931         This will be covered by tests in svg/filters/* when they are
2932         added to the virtual GPU tests.
2933
2934         * WebCore.gypi:
2935         * platform/graphics/filters/FELighting.h:
2936         (FELighting):
2937         * platform/graphics/filters/skia/FELightingSkia.cpp: Added.
2938         (WebCore):
2939         (WebCore::FELighting::platformApplySkia):
2940
2941 2012-07-20  Pavel Feldman  <pfeldman@chromium.org>
2942
2943         Web Inspector: disable fake workers inspection.
2944         https://bugs.webkit.org/show_bug.cgi?id=91867
2945
2946         Reviewed by Vsevolod Vlasov.
2947
2948         'Fake workers' is unreliable error-prone way to debug workers. There are a
2949         lot of frameworks supporting it. Inspector should not do that since it has a more
2950         powerful native worker inspection capabilities. Port owners should enable it
2951         in case they want to provide workers debugging.
2952
2953         * English.lproj/localizedStrings.js:
2954         * WebCore.gypi:
2955         * WebCore.order:
2956         * WebCore.vcproj/WebCore.vcproj:
2957         * inspector/InjectedScriptHost.cpp:
2958         (WebCore::InjectedScriptHost::InjectedScriptHost):
2959         * inspector/InjectedScriptHost.h:
2960         (InjectedScriptHost):
2961         * inspector/InjectedScriptHost.idl:
2962         * inspector/Inspector.json:
2963         * inspector/InspectorAgent.cpp:
2964         (WebCore::InspectorAgent::didCommitLoad):
2965         (WebCore::InspectorAgent::enable):
2966         * inspector/InspectorAgent.h:
2967         (WebCore):
2968         (InspectorAgent):
2969         * inspector/InspectorInstrumentation.cpp:
2970         * inspector/InspectorInstrumentation.h:
2971         (InspectorInstrumentation):
2972         * inspector/front-end/InjectedFakeWorker.js: Removed.
2973         * inspector/front-end/ScriptsPanel.js:
2974         * inspector/front-end/WebKit.qrc:
2975         * inspector/front-end/WorkersSidebarPane.js:
2976         (WebInspector.WorkersSidebarPane):
2977         * inspector/front-end/externs.js:
2978         * inspector/front-end/inspector.html:
2979         * inspector/front-end/inspector.js:
2980         * workers/AbstractWorker.cpp:
2981         (WebCore::AbstractWorker::contextDestroyed):
2982         * workers/AbstractWorker.h:
2983         (AbstractWorker):
2984         * workers/SharedWorker.cpp:
2985         (WebCore::SharedWorker::create):
2986         * workers/Worker.cpp:
2987         (WebCore::Worker::create):
2988
2989 2012-07-20  Sheriff Bot  <webkit.review.bot@gmail.com>
2990
2991         Unreviewed, rolling out r123182.
2992         http://trac.webkit.org/changeset/123182
2993         https://bugs.webkit.org/show_bug.cgi?id=91863
2994
2995         Causing ASSERT crashes in tests accessibility/canvas.html and
2996         accessibility/canvas-accessibilitynodeobject.html (Requested
2997         by jernoble on #webkit).
2998
2999         * CMakeLists.txt:
3000         * GNUmakefile.list.am:
3001         * Target.pri:
3002         * WebCore.gypi:
3003         * accessibility/AXObjectCache.cpp:
3004         (WebCore):
3005         * accessibility/AXObjectCache.h:
3006         (AXObjectCache):
3007         * accessibility/AccessibilityARIAGrid.cpp:
3008         (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid):
3009         (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid):
3010         (WebCore):
3011         (WebCore::AccessibilityARIAGrid::create):
3012         * accessibility/AccessibilityARIAGrid.h:
3013         (AccessibilityARIAGrid):
3014         * accessibility/AccessibilityARIAGridCell.cpp:
3015         (WebCore::AccessibilityARIAGridCell::create):
3016         * accessibility/AccessibilityARIAGridRow.cpp:
3017         (WebCore::AccessibilityARIAGridRow::create):
3018         * accessibility/AccessibilityAllInOne.cpp:
3019         * accessibility/AccessibilityList.cpp:
3020         (WebCore::AccessibilityList::create):
3021         * accessibility/AccessibilityListBox.cpp:
3022         (WebCore::AccessibilityListBox::create):
3023         * accessibility/AccessibilityMediaControls.cpp:
3024         (WebCore::AccessibilityMediaControl::create):
3025         (WebCore::AccessibilityMediaControlsContainer::create):
3026         (WebCore::AccessibilityMediaTimeline::create):
3027         (WebCore::AccessibilityMediaTimeDisplay::create):
3028         * accessibility/AccessibilityMenuList.cpp:
3029         * accessibility/AccessibilityMenuList.h:
3030         (WebCore::AccessibilityMenuList::create):
3031         * accessibility/AccessibilityNodeObject.cpp: Removed.
3032         * accessibility/AccessibilityNodeObject.h: Removed.
3033         * accessibility/AccessibilityObject.h:
3034         (AccessibilityObject):
3035         * accessibility/AccessibilityProgressIndicator.cpp:
3036         (WebCore::AccessibilityProgressIndicator::create):
3037         * accessibility/AccessibilityRenderObject.cpp:
3038         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
3039         (WebCore::AccessibilityRenderObject::create):
3040         (WebCore::AccessibilityRenderObject::detach):
3041         (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent):
3042         (WebCore):
3043         (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
3044         (WebCore::AccessibilityRenderObject::ariaRoleAttribute):
3045         (WebCore::AccessibilityRenderObject::updateAccessibilityRole):
3046         (WebCore::AccessibilityRenderObject::canSetFocusAttribute):
3047         (WebCore::AccessibilityRenderObject::childrenChanged):
3048         (WebCore::AccessibilityRenderObject::canHaveChildren):
3049         (WebCore::AccessibilityRenderObject::addChildren):
3050         * accessibility/AccessibilityRenderObject.h:
3051         (AccessibilityRenderObject):
3052         (WebCore::AccessibilityRenderObject::setRenderer):
3053         * accessibility/AccessibilitySlider.cpp:
3054         (WebCore::AccessibilitySlider::create):
3055         * accessibility/AccessibilityTable.cpp:
3056         (WebCore::AccessibilityTable::AccessibilityTable):
3057         (WebCore::AccessibilityTable::~AccessibilityTable):
3058         (WebCore):
3059         (WebCore::AccessibilityTable::create):
3060         * accessibility/AccessibilityTable.h:
3061         (AccessibilityTable):
3062         * accessibility/AccessibilityTableCell.cpp:
3063         (WebCore::AccessibilityTableCell::create):
3064         * accessibility/AccessibilityTableRow.cpp:
3065         (WebCore::AccessibilityTableRow::create):
3066
3067 2012-07-20  Christophe Dumez  <christophe.dumez@intel.com>
3068
3069         [EFL] Proxy configuration should honor the no_proxy environment variable
3070         https://bugs.webkit.org/show_bug.cgi?id=91747
3071
3072         Reviewed by Kenneth Rohde Christiansen.
3073
3074         Implement a custom Proxy URI Resolver for libsoup
3075         so that we can use it in EFL port. This custom
3076         proxy resolver brings support for setting
3077         exceptions so that the proxy is not used for the
3078         specified hosts.
3079
3080         By default, the proxy is not used for localhost and
3081         127.0.0.1.
3082
3083         No new tests, no behavior change for layout tests.
3084
3085         * PlatformEfl.cmake:
3086         * platform/network/soup/ProxyResolverSoup.cpp: Added.
3087         (soup_proxy_resolver_wk_init):
3088         (soupProxyResolverWkFinalize):
3089         (soupProxyResolverWkSetProperty):
3090         (soupProxyResolverWkGetProperty):
3091         (shouldBypassProxy):
3092         (idle_return_proxy_uri):
3093         (soupProxyResolverWkGetProxyURIAsync):
3094         (soupProxyResolverWkGetProxyURISync):
3095         (soup_proxy_resolver_wk_class_init):
3096         (soup_proxy_resolver_wk_interface_init):
3097         (soupProxyResolverWkNew):
3098         * platform/network/soup/ProxyResolverSoup.h: Added.
3099
3100 2012-07-20  Pierre Rossi  <pierre.rossi@gmail.com>
3101
3102         ColorChooserClient should expose the element's location
3103         https://bugs.webkit.org/show_bug.cgi?id=91767
3104
3105         Reviewed by Kent Tamura.
3106
3107         The rationale is that the chrome client could have an interest in placing the picker next to
3108         the element for usability reasons.
3109
3110         No new tests as there is not much logic here: Just exposing a geometry information to WebKit.
3111
3112         * html/ColorInputType.cpp:
3113         (WebCore::ColorInputType::elementRectRelativeToWindow):
3114         (WebCore):
3115         * html/ColorInputType.h:
3116         (ColorInputType):
3117         * platform/ColorChooserClient.h:
3118         (ColorChooserClient):
3119
3120 2012-07-20  Thiago Marcos P. Santos  <thiago.santos@intel.com>
3121
3122         [WK2] WebIntents doesn't build if mutation observers is disabled
3123         https://bugs.webkit.org/show_bug.cgi?id=91839
3124
3125         Reviewed by Kenneth Rohde Christiansen.
3126
3127         WebIntents was depending on a code protected by ENABLE(MUTATION_OBSERVERS).
3128         Now the code is also enabled by ENABLE(WEB_INTENTS).
3129
3130         * bindings/js/JSDictionary.cpp:
3131         (WebCore):
3132         * bindings/js/JSDictionary.h:
3133
3134 2012-07-20  Mihnea Ovidenie  <mihnea@adobe.com>
3135
3136         [CSSRegions]Assert failure when layout positioned objects in regions
3137         https://bugs.webkit.org/show_bug.cgi?id=90792
3138
3139         Reviewed by Andreas Kling.
3140
3141         Before clamping the containing block (for an out-of-flow positioned element
3142         inside a named flow) to the region, we have to test whether the region is not
3143         null, which can happen when the named flow does not have attached regions.
3144
3145         Tests: fast/regions/positioned-vrl-in-named-flow.html
3146                fast/regions/positioned-vrl-in-parent-named-flow.html
3147                fast/regions/positioned-with-vrl-parent-in-named-flow.html
3148
3149         * rendering/RenderBox.cpp:
3150         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
3151         (WebCore::RenderBox::computePositionedLogicalWidth):
3152         (WebCore::RenderBox::computePositionedLogicalHeight):
3153
3154 2012-07-20  Stephen Chenney  <schenney@chromium.org>
3155
3156         SVG Filter Effect sub-region not applied for some filters
3157         https://bugs.webkit.org/show_bug.cgi?id=89767
3158
3159         Reviewed by Dirk Schulze.
3160
3161         The filter effect region for SVG feGaussian and feDropShadow filters
3162         was incorrectly set, failing to account for the radius of the blur.
3163         This patch fixes the problem and removes an unneccessary clip
3164         operation when the filter result is blitted into the target. That clip
3165         was clipping the shadow from webkit-shadow.
3166
3167         Tests: svg/filters/feDropShadow-subregion.svg
3168                svg/filters/feGaussianBlur-subregion.svg
3169
3170         * platform/graphics/filters/FEDropShadow.cpp:
3171         (WebCore::FEDropShadow::determineAbsolutePaintRect): Moved the code
3172         that clips the paint rect by the filter effect subregion to come after
3173         the paint is modified by the filter radius.
3174         * platform/graphics/filters/FEGaussianBlur.cpp:
3175         (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
3176         Moved the code that clips the paint rect by the filter effect subregion to
3177         come after the paint is modified by the filter radius.
3178         * rendering/svg/RenderSVGResourceFilter.cpp:
3179         (WebCore::RenderSVGResourceFilter::postApplyResource):
3180         Removed a clip that is unnecessary and that was incorrectly clipping drop shadows.
3181
3182 2012-07-19  Pavel Feldman  <pfeldman@chromium.org>
3183
3184         Web Inspector: Status bar icons are misaligned by 1px to the right
3185         https://bugs.webkit.org/show_bug.cgi?id=91757
3186
3187         Reviewed by Vsevolod Vlasov.
3188
3189         * inspector/front-end/inspector.css:
3190         (.glyph):
3191         (.glyph.shadow):
3192
3193 2012-07-20  Andrei Poenaru  <poenaru@adobe.com>
3194
3195         Web Inspector: Protocol Extension: add getNamedFlowCollection command
3196         https://bugs.webkit.org/show_bug.cgi?id=91607
3197
3198         Reviewed by Pavel Feldman.
3199
3200         Extended the protocol with "getNamedFlowCollection" command.
3201         This command returns the CSS Named Flows from the document.
3202
3203         Test: inspector/styles/protocol-getNamedFlowCollection-command.html
3204
3205         * dom/WebKitNamedFlowCollection.cpp:
3206         (WebCore::WebKitNamedFlowCollection::namedFlowsNames):
3207         (WebCore):
3208         * dom/WebKitNamedFlowCollection.h:
3209         (WebKitNamedFlowCollection):
3210         * inspector/Inspector.json:
3211         * inspector/InspectorCSSAgent.cpp:
3212         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
3213         (WebCore):
3214         * inspector/InspectorCSSAgent.h:
3215         (InspectorCSSAgent):
3216         * inspector/InspectorDOMAgent.cpp:
3217         (WebCore::InspectorDOMAgent::assertDocument):
3218         (WebCore):
3219         * inspector/InspectorDOMAgent.h:
3220         (InspectorDOMAgent):
3221         * inspector/front-end/CSSStyleModel.js:
3222         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
3223
3224 2012-07-20  Eugene Klyuchnikov  <eustas.big@gmail.com>
3225
3226         Web Inspector: Timeline: forward compatibility for load.
3227         https://bugs.webkit.org/show_bug.cgi?id=91714
3228
3229         Reviewed by Pavel Feldman.
3230
3231         Accept records of unrecognized types and render them as "unknown".
3232
3233         Test: inspector/timeline/timeline-load-incompatible.html
3234
3235         * English.lproj/localizedStrings.js: Added UI string.
3236         * inspector/front-end/TimelinePresentationModel.js:
3237         (WebInspector.TimelinePresentationModel.recordStyle): Add missing record
3238         styles at runtime.
3239         (WebInspector.TimelinePresentationModel.Record.prototype._getRecordDetails):
3240         Add some common information for default case.
3241
3242 2012-07-20  MORITA Hajime  <morrita@google.com>
3243
3244         Another unreviewed Mac build fix against r123184.
3245
3246         * WebCore.exp.in:
3247
3248 2012-07-20  Mihnea Ovidenie  <mihnea@adobe.com>
3249
3250         [CSSRegions]Crash when flowing a region into itself
3251         https://bugs.webkit.org/show_bug.cgi?id=90289
3252
3253         Reviewed by Andreas Kling.
3254
3255         If a region is designed to receive itself as content through a named flow, we avoid
3256         a circular dependency by not attaching the region to the desired named flow.
3257         In such occasions, the region's attached flow thread object is null and
3258         we have to check this pointer before using it in RenderRegion::styleDidChange.
3259
3260         Test: fast/regions/flow-region-into-itself-crash.html
3261
3262         * rendering/RenderRegion.cpp:
3263         (WebCore::RenderRegion::styleDidChange):
3264
3265 2012-07-20  MORITA Hajime  <morrita@google.com>
3266
3267         Unreviewed Mac build fix against r123184.
3268
3269         * WebCore.exp.in:
3270
3271 2012-07-17  Kinuko Yasuda  <kinuko@chromium.org>
3272
3273         If value for responseType defined as type that not supported, it should not throw an exception in XHR 2
3274         https://bugs.webkit.org/show_bug.cgi?id=90976
3275
3276         Reviewed by Alexey Proskuryakov.
3277
3278         http://www.w3.org/TR/XMLHttpRequest2/#the-responsetype-attribute
3279         The spec does not say it should throw an exception when a non-supported
3280         type is set, and other browsers do not throw it either.
3281
3282         Test: fast/xmlhttprequest/xmlhttprequest-responsetype-set-type.html
3283
3284         * xml/XMLHttpRequest.cpp:
3285         (WebCore::XMLHttpRequest::setResponseType): Stop throwing an exception when non-supported type is given.
3286
3287 2012-07-20  Matt Falkenhagen  <falken@chromium.org>
3288
3289         Show or hide <dialog> depending on the open attribute
3290         https://bugs.webkit.org/show_bug.cgi?id=90931
3291
3292         Reviewed by Kent Tamura.
3293
3294         Test: fast/dom/HTMLDialogElement/dialog-open.html
3295
3296         * css/html.css: Add CSS for dialog. This is copied verbatim from the HTML5 spec: http://www.whatwg.org/specs/web-apps/current-work/#flow-content-1
3297         (dialog:not([open])):
3298         (dialog):
3299         * html/HTMLDialogElement.cpp:
3300         (WebCore::HTMLDialogElement::close): Set open to false, to hide the dialog.
3301         (WebCore::HTMLDialogElement::show): Set open to true, to show the dialog.
3302         (WebCore):
3303         (WebCore::HTMLDialogElement::isPresentationAttribute): Make openAttr a presentation attribute, to work around bug 91058
3304         * html/HTMLDialogElement.h:
3305         (HTMLDialogElement):
3306         * html/HTMLDialogElement.idl:
3307
3308 2012-07-20  Shinya Kawanaka  <shinyak@chromium.org>
3309
3310         Needs pseudo id to point the inner element of an img elemnet for styling
3311         https://bugs.webkit.org/show_bug.cgi?id=91590
3312
3313         Reviewed by Hajime Morita.
3314
3315         We introduce pseudo id to point the element in UserAgentShadowDOM.
3316         This enables us to style the inner element of an img element shadow.
3317         Please see also http://trac.webkit.org/wiki/ShadowDOMForReplacedElements
3318
3319         Test: fast/dom/shadow/shadowdom-for-image-with-pseudo-id.html
3320
3321         * html/shadow/ImageInnerElement.cpp:
3322         (WebCore::ImageInnerElement::shadowPseudoId):
3323         (WebCore):
3324         * html/shadow/ImageInnerElement.h:
3325         (ImageInnerElement):
3326
3327 2012-07-20  Kent Tamura  <tkent@chromium.org>
3328
3329         REGRESSION(r121420): Performance regression of form state saving for pages with multiple forms
3330         https://bugs.webkit.org/show_bug.cgi?id=91804
3331
3332         Reviewed by Hajime Morita.
3333
3334         The complexity of FormKeyGenerator::formKey() was O(N) where N is the
3335         number of form elements with an identical action URL, and formKey() is
3336         called for every form. So, it's O(N^2). A page in www.reddit.com
3337         contains hundreds of form elements with action="#". So FormController::
3338         formElementsState() took a few seconds on a slow machine.
3339
3340         In order to avoid O(N^2) operation, storing a map from form signatures
3341         to next index numbers, instead of storing existing formKey strings.
3342
3343         No new tests. Just a performance improvement.
3344
3345         * html/FormController.cpp:
3346         (FormKeyGenerator): Remove m_existingKeys. Add a map from a form
3347         signature string to the next index number.
3348         (WebCore::formSignature): Returns a signature string for a form, without
3349         an index number. This is like "actionURL [name1 name2 ]"
3350         (WebCore::FormKeyGenerator::formKey):
3351         Creates a formKey string by concatenating a formSignature and #n. N is
3352         obtained from m_formSignatureToNextIndexMap in O(1).
3353         (WebCore::FormKeyGenerator::willDeleteForm):
3354         Remove the code for m_existingKeys.
3355
3356 2012-07-20  Keishi Hattori  <keishi@webkit.org>
3357
3358         Fix crash in WebCore::HTMLInputElement::dataList
3359         https://bugs.webkit.org/show_bug.cgi?id=91818
3360
3361         Reviewed by Kent Tamura.
3362
3363         Fix crash that occurs when setting slider appearance on a regular node.
3364
3365         Test: fast/forms/range/slider-appearance-crash.html
3366
3367         * rendering/RenderTheme.cpp:
3368         (WebCore::RenderTheme::paintSliderTicks): Check if node is an input element.
3369
3370 2012-07-20  Kent Tamura  <tkent@chromium.org>
3371
3372         [Chromium] Fix an assertion failure in TextFieldDecorationElement::hostInput()
3373         https://bugs.webkit.org/show_bug.cgi?id=91824
3374
3375         Reviewed by Hajime Morita.
3376
3377         No new tests. This code is used only in Chromium browser.
3378
3379         * html/shadow/TextFieldDecorationElement.cpp:
3380         (WebCore::TextFieldDecorationElement::hostInput):
3381         Use shadowHost(), and allow to return 0.
3382         (WebCore::TextFieldDecorationElement::defaultEventHandler):
3383         Check 0.
3384
3385 2012-07-19  Simon Hausmann  <simon.hausmann@nokia.com>
3386
3387         [Qt] Compile WebCore without QtWidgets
3388         https://bugs.webkit.org/show_bug.cgi?id=91819
3389
3390         Reviewed by Kenneth Rohde Christiansen.
3391
3392         * WebCore.pri: QT += opengl is not needed for Qt 5, given that QtGui has OpenGL
3393         support built in with the QOpenGL* classes.
3394
3395 2012-07-19  MORITA Hajime  <morrita@google.com>
3396
3397         [Refactoring] Replace Node's Document pointer with a TreeScope pointer
3398         https://bugs.webkit.org/show_bug.cgi?id=59816
3399
3400         Reviewed by Ryosuke Niwa.
3401
3402         Before this change, Node::treeScope() fetches the TreeScope object
3403         from ElementRareData. This approach has several shortcomings:
3404
3405         - rareData() call is slow due to a hashtable lookup.
3406         - In shadow tree, each node has its tree scope in ElementRareData,
3407           that means the rare-data is no longer rare in that case.
3408
3409         This change gets rid of ElementRareData::m_treeScope by replacing
3410         Node::m_document with Node::m_treeScope. And retrieves the
3411         document of Node through m_treeScope.
3412
3413         Note that Node::document() is a hot function and naive
3414         replacemennt of m_document with m_treeScope can hurt the
3415         speed. This change employs some tricks to address it.
3416
3417         - This change introduces Node::InShadowTree flag, if the flag is off,
3418           that means m_treeScope is actually a document an can be returned as the result.
3419           this eliminates an extract dereference.
3420         - Node::m_treeScope can be null. But we don't want to issue any extra
3421           conditional statement. So this change represents a null
3422           TreeScope as TreeScope::nullInstance(), which saves one conditional
3423           statement.
3424
3425         With these changes, the Node::document() slowdown is minimized to
3426         unnoticeable size.
3427
3428         No new tests. Covered by existing tests.
3429
3430         * dom/Document.cpp: Took care of connectio betwen TreeScope.
3431         (WebCore::Document::Document):
3432         (WebCore::Document::~Document):
3433         (WebCore::Document::suggestedMIMEType):
3434         * dom/Document.h:
3435         (WebCore::Node::treeScope): Now just return m_treeScope, taking care of nullInstance() case.
3436         (WebCore):
3437         (WebCore::Node::setTreeScope): Now just sets m_treeScope.
3438         (WebCore::Node::documentInternal): Extracted from document() to have ASSERT-free version.
3439         (WebCore::Node::document): Re-implemented over treeScope() and the flag.
3440         (WebCore::Node::isDocumentNode): Re-implemented using treeScope()
3441         (WebCore::Node::Node):
3442         * dom/Node.cpp:
3443         (WebCore::Node::~Node):
3444         (WebCore::Node::reportMemoryUsage):
3445         * dom/Node.h:
3446         (Node):
3447         (WebCore::Node::inDocument):
3448         (WebCore::Node::isInShadowTree): Rewrote to use InShadowTree flag.
3449         * dom/NodeRareData.h:
3450         (WebCore::NodeRareData::NodeRareData): Eliminated m_treeScope.
3451         (NodeRareData):
3452         * dom/ShadowRoot.cpp:
3453         (WebCore::ShadowRoot::ShadowRoot):
3454         * dom/TreeScope.cpp:
3455         (WebCore::TreeScope::TreeScope):
3456         (WebCore):
3457         (WebCore::TreeScope::setParentTreeScope): Added.
3458         (WebCore::TreeScope::isDocumentScope): Added.
3459         (WebCore::TreeScope::nullInstance): Added.
3460         * dom/TreeScope.h: Added m_parentTreeScope.
3461         (WebCore):
3462         (WebCore::TreeScope::rootDocument): Added.
3463         (TreeScope):
3464         * dom/TreeScopeAdopter.cpp: No longer calls setDocument()
3465         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
3466         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
3467         * editing/MoveSelectionCommand.cpp: Includes Document.h to find inlined Node functions
3468         * editing/RemoveNodeCommand.cpp: Includes Document.h to find inlined Node functions
3469         * editing/RemoveNodePreservingChildrenCommand.cpp: Includes Document.h to find inlined Node functions
3470         * inspector/PageConsoleAgent.cpp: Includes Document.h to find inlined Node functions
3471
3472 2012-07-19  David Hyatt  <hyatt@apple.com>
3473
3474         SVG not properly respecting max-width.
3475         https://bugs.webkit.org/show_bug.cgi?id=91474
3476
3477         My previous checkin for 91474 accidentally inverted width and height in the division case for
3478         the computation of height. When I fixed this inversion, I discovered that <object> elements
3479         are in fact also broken with max-width handling, and that furthermore, trying to apply the same
3480         max-width fix by calling RenderBox::computeReplacedLogicalWidth/Height failed because those methods
3481         call intrinsicLogicalWidth()/Height(). Becuase m_intrinsicSize is out-of-date and does not reflect
3482         the values we just obtained from the contentRenderer, we use the default 300x150 values for object
3483         and fail to render.
3484         
3485         In order to both fix SVG/<object> with max-width constraints and to keep <object> rendering correctly
3486         even when there are no max-width constraints, I was forced to update the m_intrinsicSize immediately
3487         in order to make sure that the RenderBox methods returned the right values when computing the width/height
3488         constrained to max/min-width/height values.
3489
3490         Reviewed by Dan Bernstein.
3491
3492         Added two new tests in svg/as-image. One test covers non-rectangular images to test for the inversion
3493         mistake I made. The second test applies a max-width to <object> and shows that we have never gotten
3494         this right before. An existing test in svg/as-image/ already covers basic <object> use (and tests that
3495         the intrinsic size of 300x150 is not used when an explicit non-percentage size is specified on the SVG
3496         itself).
3497
3498         * rendering/RenderReplaced.cpp:
3499         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
3500         Add a check to update m_intrinsicSize when we know it should apply, so that the calls to check against
3501         min/max-width fetch this correct size.
3502         
3503         * rendering/RenderReplaced.h:
3504         (RenderReplaced):
3505         Make m_intrinsicSize mutable because of the mutation that occurs during the method above. It may be
3506         that we should re-evaluate whether all of these methods should be const, but this would impact RenderBox
3507         methods as well, so I chose to hold off going down that rabbit hole.
3508
3509 2012-07-19  Dominic Mazzoni  <dmazzoni@google.com>
3510
3511         AX: Need AccessibilityObjects for nodes without renderers in canvas subtree
3512         https://bugs.webkit.org/show_bug.cgi?id=87899
3513
3514         Reviewed by Chris Fleizach.
3515
3516         Refactors AccessibilityRenderObject so that it inherits from a new class,
3517         AccessibilityNodeObject, that can be constructed from a Node without a
3518         renderer. Modifies AXObjectCache so that it automatically creates an
3519         AccessibilityNodeObject for elements in a canvas subtree but not otherwise.
3520         A new layout test verifies that this correctly exposes an accessibility
3521         tree with appropriate roles for elements in a canvas subtree.
3522
3523         This patch does not try to complete the implementation of
3524         AccessibilityNodeObject. Most AX methods are still unimplemented and need
3525         to be migrated from AccessibilityRenderObject to AccessibilityNodeObject
3526         in a future patch.
3527         
3528         This patch also doesn't change anything outside of WebCore/accessibility, so
3529         the rest of WebCore only calls AXObjectCache when there are changes to a
3530         RenderObject, not to a Node. Accessible notifications on nodes without
3531         renderers need to be implemented in a future patch.
3532
3533         Test: accessibility/canvas-accessibilitynodeobject.html
3534
3535         * CMakeLists.txt:
3536         * GNUmakefile.list.am:
3537         * Target.pri:
3538         * WebCore.gypi:
3539         * accessibility/AXObjectCache.cpp:
3540         (WebCore::AXObjectCache::get):
3541         (WebCore):
3542         (WebCore::createFromNode):
3543         (WebCore::AXObjectCache::getOrCreate):
3544         (WebCore::AXObjectCache::remove):
3545         * accessibility/AXObjectCache.h:
3546         (AXObjectCache):
3547         (WebCore::AXObjectCache::get):
3548         (WebCore::AXObjectCache::getOrCreate):
3549         (WebCore::AXObjectCache::remove):
3550         * accessibility/AccessibilityARIAGrid.cpp:
3551         (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid):
3552         (WebCore):
3553         (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid):
3554         (WebCore::AccessibilityARIAGrid::init):
3555         (WebCore::AccessibilityARIAGrid::create):
3556         * accessibility/AccessibilityARIAGrid.h:
3557         (AccessibilityARIAGrid):
3558         * accessibility/AccessibilityARIAGridCell.cpp:
3559         (WebCore::AccessibilityARIAGridCell::create):
3560         * accessibility/AccessibilityARIAGridRow.cpp:
3561         (WebCore::AccessibilityARIAGridRow::create):
3562         * accessibility/AccessibilityAllInOne.cpp:
3563         * accessibility/AccessibilityList.cpp:
3564         (WebCore::AccessibilityList::create):
3565         * accessibility/AccessibilityListBox.cpp:
3566         (WebCore::AccessibilityListBox::create):
3567         * accessibility/AccessibilityMediaControls.cpp:
3568         (WebCore::AccessibilityMediaControl::create):
3569         (WebCore::AccessibilityMediaControlsContainer::create):
3570         (WebCore::AccessibilityMediaTimeline::create):
3571         (WebCore::AccessibilityMediaTimeDisplay::create):
3572         * accessibility/AccessibilityMenuList.cpp:
3573         (WebCore::AccessibilityMenuList::create):
3574         (WebCore):
3575         * accessibility/AccessibilityMenuList.h:
3576         (AccessibilityMenuList):
3577         * accessibility/AccessibilityNodeObject.cpp: Added.
3578         (WebCore):
3579         (WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
3580         (WebCore::AccessibilityNodeObject::~AccessibilityNodeObject):
3581         (WebCore::AccessibilityNodeObject::init):
3582         (WebCore::AccessibilityNodeObject::create):
3583         (WebCore::AccessibilityNodeObject::detach):
3584         (WebCore::AccessibilityNodeObject::childrenChanged):
3585         (WebCore::AccessibilityNodeObject::updateAccessibilityRole):
3586         (WebCore::AccessibilityNodeObject::firstChild):
3587         (WebCore::AccessibilityNodeObject::lastChild):
3588         (WebCore::AccessibilityNodeObject::previousSibling):
3589         (WebCore::AccessibilityNodeObject::nextSibling):
3590         (WebCore::AccessibilityNodeObject::parentObjectIfExists):
3591         (WebCore::AccessibilityNodeObject::parentObject):
3592         (WebCore::AccessibilityNodeObject::elementRect):
3593         (WebCore::AccessibilityNodeObject::setNode):
3594         (WebCore::AccessibilityNodeObject::document):
3595         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
3596         (WebCore::AccessibilityNodeObject::addChildren):
3597         (WebCore::AccessibilityNodeObject::accessibilityIsIgnored):
3598         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
3599         (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute):
3600         (WebCore::AccessibilityNodeObject::ariaRoleAttribute):
3601         (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent):
3602         * accessibility/AccessibilityNodeObject.h: Added.
3603         (WebCore):
3604         (AccessibilityNodeObject):
3605         (WebCore::AccessibilityNodeObject::isAccessibilityNodeObject):
3606         (WebCore::AccessibilityNodeObject::node):
3607         (WebCore::AccessibilityNodeObject::isDetached):
3608         (WebCore::toAccessibilityNodeObject):
3609         * accessibility/AccessibilityObject.h:
3610         (WebCore::AccessibilityObject::isAccessibilityNodeObject):
3611         * accessibility/AccessibilityProgressIndicator.cpp:
3612         (WebCore::AccessibilityProgressIndicator::create):
3613         * accessibility/AccessibilityRenderObject.cpp:
3614         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
3615         (WebCore::AccessibilityRenderObject::init):
3616         (WebCore):
3617         (WebCore::AccessibilityRenderObject::create):
3618         (WebCore::AccessibilityRenderObject::detach):
3619         (WebCore::AccessibilityRenderObject::setRenderer):
3620         (WebCore::AccessibilityRenderObject::canHaveChildren):
3621         (WebCore::AccessibilityRenderObject::addCanvasChildren):
3622         (WebCore::AccessibilityRenderObject::addChildren):
3623         * accessibility/AccessibilityRenderObject.h:
3624         (AccessibilityRenderObject):
3625         * accessibility/AccessibilitySlider.cpp:
3626         (WebCore::AccessibilitySlider::create):
3627         * accessibility/AccessibilityTable.cpp:
3628         (WebCore::AccessibilityTable::AccessibilityTable):
3629         (WebCore):
3630         (WebCore::AccessibilityTable::~AccessibilityTable):
3631         (WebCore::AccessibilityTable::init):
3632         (WebCore::AccessibilityTable::create):
3633         * accessibility/AccessibilityTable.h:
3634         (AccessibilityTable):
3635         * accessibility/AccessibilityTableCell.cpp:
3636         (WebCore::AccessibilityTableCell::create):
3637         * accessibility/AccessibilityTableRow.cpp:
3638         (WebCore::AccessibilityTableRow::create):
3639
3640 2012-07-19  Dan Bernstein  <mitz@apple.com>
3641
3642         The ATSUI-based complex text code is unused
3643         https://bugs.webkit.org/show_bug.cgi?id=91816
3644
3645         Reviewed by Sam Weinig.
3646
3647         * WebCore.gypi: Removed references to the files deleted in this change.
3648         * WebCore.xcodeproj/project.pbxproj: Ditto.
3649         * platform/graphics/FontCache.h:
3650         (FontCache): Replaced USE(CORE_TEXT) with PLATFORM(MAC) || PLATFORM(CHROMIUM) && OS(DARWIN).
3651         * platform/graphics/SimpleFontData.h:
3652         (SimpleFontData): Removed USE(ATSUI)-only code, replaced USE(CORE_TEXT) with
3653         (PLATFORM(CHROMIUM) && OS(DARWIN)).
3654         * platform/graphics/mac/ComplexTextController.cpp: Removed USE(ATSUI)-only code. Moved
3655         collectComplexTextRunsForCharacters() and the ComplexTextRun constructor out of this file.
3656         * platform/graphics/mac/ComplexTextController.h: Removed USE(ATSUI)-only code and removed
3657         #if USE(CORE_TEXT) because anyone including this header is using Core Text.
3658         * platform/graphics/mac/ComplexTextControllerATSUI.cpp: Removed.
3659         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3660         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Moved from
3661         ComplexTextController.cpp into this file and merged with createTextRunFromFontDataCoreText().
3662         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Moved from
3663         ComplexTextController.cpp into this file and merged with
3664         collectComplexTextRunsForCharactersCoreText().
3665         * platform/graphics/mac/SimpleFontDataATSUI.mm: Removed.
3666         * platform/graphics/mac/SimpleFontDataMac.mm:
3667         (WebCore::SimpleFontData::platformInit): Remove USE(ATSUI)-only code.
3668         (WebCore::SimpleFontData::platformDestroy): Ditto.
3669         * platform/text/mac/ShapeArabic.c: Removed.
3670         * platform/text/mac/ShapeArabic.h: Removed.
3671
3672 2012-07-19  Kent Tamura  <tkent@chromium.org>
3673
3674         Introduce Node::shadowHost()
3675         https://bugs.webkit.org/show_bug.cgi?id=91814
3676
3677         Reviewed by Hajime Morita.
3678
3679         Introduce Node::shadowHost(), which return the host element, or 0.
3680         Node::shadowAncestorNode() is used to obtain a shadow host. However it
3681         is confusing because it returns 'this' if this is not in a shadow tree.
3682
3683         Replaces one callsite of shadowAncestorNode() with shadowHost().
3684
3685         No behavior change.
3686
3687         * dom/Node.cpp:
3688         (WebCore::Node::shadowHost): Added.
3689         * dom/Node.h:
3690         (Node): Declare shadowHost(), and add a comment to shadowAncestorNode().
3691         * html/shadow/CalendarPickerElement.cpp:
3692         (WebCore::CalendarPickerElement::hostInput):
3693         Replace shadowAncestorNode() with shaodwHost().
3694
3695 2012-07-19  Kent Tamura  <tkent@chromium.org>
3696
3697         Form state restore: Need to identify a form by its content
3698         https://bugs.webkit.org/show_bug.cgi?id=91209
3699
3700         Reviewed by Hajime Morita.
3701
3702         Add names of the first two controls of a form to its formKey
3703         string. By this change, we can correctly restore states to
3704         reordered forms like webkit.org/b/91209#c0.
3705
3706         Tests: Added test cases to fast/forms/state-restore-per-form.html.
3707
3708         * html/FormController.cpp:
3709         (WebCore::recordFormStructure):
3710         Append at most two name attribute values.
3711         (WebCore::createKey): Insert a string built by recordFromStructure().
3712         (WebCore::formStateSignature): Bump the version.
3713
3714 2012-07-19  Wei James  <james.wei@intel.com>
3715
3716         enable Web Audio for chromium android port
3717         https://bugs.webkit.org/show_bug.cgi?id=89428
3718
3719         Reviewed by Kenneth Russell.
3720
3721         * WebCore.gyp/WebCore.gyp:
3722         * platform/audio/FFTFrameStub.cpp:
3723         (WebCore::FFTFrame::doFFT):
3724
3725 2012-07-19  David Hyatt  <hyatt@apple.com>
3726
3727         SVG images broken when max-width specified.
3728         https://bugs.webkit.org/show_bug.cgi?id=91474
3729
3730         SVG images were computing intrinsic dimensions when width and height were auto that did not
3731         respect min-max width/height. Normal images had code that applied these constraints properly.
3732         Looking at the code before the check-in that broke things, these constraints used to be
3733         applied to all images regardless of type via calcAspectRatioLogicalWidth/Height.
3734         
3735         This patch leaves the new function structure in place but converts the code to be more like
3736         it was prior to the introduction of the regression. Instead of raw intrinsic sizes being
3737         used in the SVG case, now all image types get the intrinsic sizes constrained when doing
3738         width/height computations.
3739
3740         Reviewed by Dan Bernstein.
3741
3742         Test: svg/as-image/svg-intrinsic-size.html
3743
3744         * rendering/RenderReplaced.cpp:
3745         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
3746         Rename computeIntrinsicRatioInformationForRenderBox to computeAspectRatioInformationForRenderBox.
3747         Also rename the intrinsicSize reference to constrainedSize to reflect the fact that the size
3748         is not necessarily the intrinsic size any longer but instead a size where both axes have been
3749         constrained based off the max-min values of the opposite axes.
3750         
3751         Move the constraining code out of RenderReplaced::computeIntrinsicRatioInformation into this
3752         function so that the SVG code path appies the constraints as well. The movement of this code
3753         is what fixes the bug.
3754
3755         (WebCore::RenderReplaced::computeIntrinsicRatioInformation):
3756         Changed to remove the code that constrains the returned size, since it is shifting to
3757         computeAspectRatioInformationForRenderBox instead.
3758
3759         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
3760         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
3761         * rendering/RenderReplaced.h:
3762         (RenderReplaced):
3763         Patch the name of the reference passed in to computeReplacedLogicalWidth/Height to be
3764         constrainedSize instead of intrinsicSize, so that it is more obvious that the returned
3765         result is not just the intrinsic size of the image.
3766
3767 2012-07-19  Dmitry Titov  <dimich@chromium.org>
3768
3769         Unreviewed, reverting http://trac.webkit.org/changeset/123149.
3770         It broke an IDB test on Chromium page cycler.
3771
3772         * bindings/v8/SerializedScriptValue.cpp:
3773         (WebCore::SerializedScriptValue::SerializedScriptValue):
3774         (WebCore):
3775         * bindings/v8/SerializedScriptValue.h:
3776         * dom/MessageEvent.cpp:
3777         (WebCore::MessageEvent::MessageEvent):
3778         (WebCore::MessageEvent::initMessageEvent):
3779
3780 2012-07-19  Julien Chaffraix  <jchaffraix@webkit.org>
3781
3782         [CSS2.1] Anonymous tables should be inline/block-level based off their parent
3783         https://bugs.webkit.org/show_bug.cgi?id=15365
3784
3785         Reviewed by Abhishek Arya.
3786
3787         This change makes us match bullet 3 "Generate missing parents" of section 17.2.1 http://www.w3.org/TR/CSS2/tables.html#anonymous-boxes":
3788         "If a table is contained by an inline element, then the anonymous tables should be inline-tables."
3789
3790         Patch based on an earlier change by Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>.
3791
3792         Tests: css2.1/20110323/inline-table-002b.html
3793                fast/dynamic/insert-before-table-part-in-continuation.html
3794                fast/table/inline-table-in-continuation.html
3795                fast/table/inline-table-with-caption.html
3796
3797         * rendering/RenderTable.cpp:
3798         (WebCore::RenderTable::createAnonymousWithParentRenderer):
3799         Added a check to determine if we should be inline or block based on our parent to match CSS 2.1.
3800
3801         * rendering/RenderInline.cpp:
3802         (WebCore::RenderInline::addChildIgnoringContinuation):
3803         Changed the child addition logic to not wrap a table part in an inline context. This change works
3804         as intended as we will call RenderObject::addChild which will create an anonymous inline table that
3805         will be added under |this| instead of the table part. As the table is inline, it doesn't need to be
3806         wrapped when we recursively call RenderInline::addChild.
3807
3808 2012-07-19  Chris Fleizach  <cfleizach@apple.com>
3809
3810         WebKit should pass <title> element value as the default description for web views
3811         https://bugs.webkit.org/show_bug.cgi?id=91763
3812
3813         Reviewed by Anders Carlsson.
3814
3815         Update the logic for determining the description for the AXWebArea to include the document's title.
3816
3817         Test: platform/mac/accessibility/document-title-used-for-description.html
3818
3819         * accessibility/AccessibilityRenderObject.cpp:
3820         (WebCore::AccessibilityRenderObject::webAreaAccessibilityDescription):
3821            Move web area description handling into a separate method.
3822         (WebCore::AccessibilityRenderObject::accessibilityDescription):
3823         * accessibility/AccessibilityRenderObject.h:
3824         (AccessibilityRenderObject):
3825
3826 2012-07-19  Zeev Lieber  <zlieber@chromium.org>
3827
3828         [Chromium] Textures drawn during occlusion are incorrectly re-used when unoccluded.
3829         https://bugs.webkit.org/show_bug.cgi?id=91537
3830
3831         Reviewed by Adrienne Walker.
3832
3833         Detecting if any external occlusion occurs when drawing a
3834         texture. If external occlusion happens, the texture is marked as
3835         "incomplete" in LayerRendererChromium, and is not being considered
3836         for re-use.
3837
3838         Minor refactoring of CCQuadCuller - extracted interface
3839         (CCQuadSink) and united append() and appendSurface() methods.
3840
3841         Added unit tests to verify this fix; also added test to try
3842         clipping instead of occlusion.
3843
3844         * platform/graphics/chromium/LayerRendererChromium.cpp:
3845         (LayerRendererChromium::CachedTexture):
3846         (WebCore::LayerRendererChromium::CachedTexture::create):
3847         (WebCore::LayerRendererChromium::CachedTexture::~CachedTexture):
3848         (WebCore::LayerRendererChromium::CachedTexture::isComplete):
3849         (WebCore::LayerRendererChromium::CachedTexture::setIsComplete):
3850         (WebCore::LayerRendererChromium::CachedTexture::CachedTexture):
3851         (WebCore):
3852         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
3853         (WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId):
3854         (WebCore::LayerRendererChromium::drawRenderPassQuad):
3855         * platform/graphics/chromium/LayerRendererChromium.h:
3856         (LayerRendererChromium):
3857         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
3858         (WebCore::CCIOSurfaceLayerImpl::appendQuads):
3859         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h:
3860         (CCIOSurfaceLayerImpl):
3861         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3862         (WebCore::CCLayerImpl::appendDebugBorderQuad):
3863         * platform/graphics/chromium/cc/CCLayerImpl.h:
3864         (WebCore):
3865         (WebCore::CCLayerImpl::appendQuads):
3866         (CCLayerImpl):
3867         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3868         (WebCore::::unoccludedContentRect):
3869         (WebCore::::unoccludedContributingSurfaceContentRect):
3870         (WebCore):
3871         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
3872         (CCOcclusionTrackerBase):
3873         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
3874         (WebCore::CCQuadCuller::CCQuadCuller):
3875         (WebCore::CCQuadCuller::append):
3876         * platform/graphics/chromium/cc/CCQuadCuller.h:
3877         (WebCore):
3878         (CCQuadCuller):
3879         (WebCore::CCQuadCuller::~CCQuadCuller):
3880         (WebCore::CCQuadCuller::hasExternalOcclusion):
3881         * platform/graphics/chromium/cc/CCQuadSink.h:
3882         (WebKit):
3883         (WebCore):
3884         (CCQuadSink):
3885         (WebCore::CCQuadSink::~CCQuadSink):
3886         * platform/graphics/chromium/cc/CCRenderPass.cpp:
3887         (WebCore::CCRenderPass::CCRenderPass):
3888         (WebCore::CCRenderPass::appendQuadsForLayer):
3889         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
3890         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
3891         (WebCore::CCRenderPassDrawQuad::create):
3892         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
3893         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
3894         (CCRenderPassDrawQuad):
3895         (WebCore::CCRenderPassDrawQuad::hasExternalOcclusion):
3896         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3897         (WebCore::CCRenderSurface::CCRenderSurface):
3898         (WebCore::CCRenderSurface::appendQuads):
3899         * platform/graphics/chromium/cc/CCRenderSurface.h:
3900         (WebCore):
3901         (WebCore::CCRenderSurface::setHasExternalOcclusion):
3902         (WebCore::CCRenderSurface::hasExternalOcclusion):
3903         (CCRenderSurface):
3904         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
3905         (WebCore::CCScrollbarLayerImpl::appendQuads):
3906         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
3907         (CCScrollbarLayerImpl):
3908         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
3909         (WebCore::CCSolidColorLayerImpl::appendQuads):
3910         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
3911         (CCSolidColorLayerImpl):
3912         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
3913         (WebCore::CCTextureLayerImpl::appendQuads):
3914         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
3915         (CCTextureLayerImpl):
3916         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3917         (WebCore::CCTiledLayerImpl::appendQuads):
3918         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3919         (CCTiledLayerImpl):
3920         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3921         (WebCore::CCVideoLayerImpl::appendQuads):
3922         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
3923         (CCVideoLayerImpl):
3924
3925 2012-07-19  Simon Fraser  <simon.fraser@apple.com>
3926
3927         Keep overlap testing on for descendants of an animating element
3928         https://bugs.webkit.org/show_bug.cgi?id=91787
3929
3930         Reviewed by Beth Dakin.
3931
3932         RenderLayerCompositor::computeCompositingRequirements() would turn off
3933         overlap testing for descendants of a layer that has a 3D transform,
3934         or has an animating transform. This could cause compositing changes
3935         inside an animating element when transitions start and stop, which
3936         is undesirable.
3937         
3938         Instead, we can keep overlap testing on for descendants of that
3939         animating element, but we have to turn it off for layers later
3940         in z-order.
3941         
3942         Also enhance the "IndirectCompositingReason" flags so that in
3943         the compositing log output, we can distinguish between layers that
3944         were composited as a result of overlap testing from those compositing
3945         for stacking reasons.
3946
3947         Test: compositing/layer-creation/animation-overlap-with-children.html
3948
3949         * rendering/RenderLayer.h: New IndirectCompositingReason value to
3950         distinguish overlap from stacking.
3951         * rendering/RenderLayerCompositor.cpp:
3952         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3953         Use an IndirectCompositingReason enum rather than a bool to track whether
3954         the layer starts as composited.
3955         Remove the if (layer->has3DTransform() || isRunningAcceleratedTransformAnimation(layer->renderer()))
3956         check that turned off overlap testing for descendants of this layer.
3957         Use IndirectCompositingForStacking (somewhat arbitrarily) for reflection layers.
3958         Turn overlap testing off for layers later in the z-order.
3959         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Take IndirectCompositingForStacking into
3960         account.
3961         (WebCore::RenderLayerCompositor::reasonForCompositing): Improve the logging output.
3962
3963 2012-07-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
3964
3965         [Qt] Enable CSS shaders in Qt (software mode)
3966         https://bugs.webkit.org/show_bug.cgi?id=85140
3967
3968         Reviewed by Simon Hausmann.
3969
3970         Added missing files to the Qt build.
3971
3972         No new tests, WebGL is still disabled by default in the bots.
3973
3974         * Target.pri:
3975
3976 2012-07-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
3977
3978         [Qt] Enable CSS shaders in Qt (software mode)
3979         https://bugs.webkit.org/show_bug.cgi?id=85140
3980
3981         Reviewed by Simon Hausmann.
3982
3983         Added missing files to the Qt build.
3984
3985         No new tests, WebGL is still disabled by default in the bots.
3986
3987         * Target.pri:
3988
3989 2012-07-19  Simon Fraser  <simon.fraser@apple.com>
3990
3991         Keep overlap testing on for descendants of an animating element
3992         https://bugs.webkit.org/show_bug.cgi?id=91787
3993
3994         Reviewed by Beth Dakin.
3995
3996         RenderLayerCompositor::computeCompositingRequirements() would turn off
3997         overlap testing for descendants of a layer that has a 3D transform,
3998         or has an animating transform. This could cause compositing changes
3999         inside an animating element when transitions start and stop, which
4000         is undesirable.
4001         
4002         Instead, we can keep overlap testing on for descendants of that
4003         animating element, but we have to turn it off for layers later
4004         in z-order.
4005         
4006         Also enhance the "IndirectCompositingReason" flags so that in
4007         the compositing log output, we can distinguish between layers that
4008         were composited as a result of overlap testing from those compositing
4009         for stacking reasons.
4010
4011         Test: compositing/layer-creation/animation-overlap-with-children.html
4012
4013         * rendering/RenderLayer.h: New IndirectCompositingReason value to
4014         distinguish overlap from stacking.
4015         * rendering/RenderLayerCompositor.cpp:
4016         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
4017         Use an IndirectCompositingReason enum rather than a bool to track whether
4018         the layer starts as composited.
4019         Remove the if (layer->has3DTransform() || isRunningAcceleratedTransformAnimation(layer->renderer()))
4020         check that turned off overlap testing for descendants of this layer.
4021         Use IndirectCompositingForStacking (somewhat arbitrarily) for reflection layers.
4022         Turn overlap testing off for layers later in the z-order.
4023         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Take IndirectCompositingForStacking into
4024         account.
4025         (WebCore::RenderLayerCompositor::reasonForCompositing): Improve the logging output.
4026
4027 2012-07-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
4028
4029         [Qt] Enable CSS shaders in&