[V8] add contextForWorld helper function to ScriptController
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-11-27  Dan Carney  <dcarney@google.com>
2
3         [V8] add contextForWorld helper function to ScriptController
4         https://bugs.webkit.org/show_bug.cgi?id=103376
5
6         Reviewed by Kentaro Hara.
7
8         Reducing some commonly occuring code with an inline function.
9
10         No new tests. No change in functionality.
11
12         * bindings/v8/ScriptController.cpp:
13         (WebCore::ScriptController::contextForWorld):
14         (WebCore):
15         (WebCore::ScriptController::currentWorldContext):
16         (WebCore::ScriptController::mainWorldContext):
17         * bindings/v8/ScriptController.h:
18         (ScriptController):
19
20 2012-11-26  Allan Sandfeld Jensen  <allan.jensen@digia.com>
21
22         [Qt] Implement the mimetype icon methods
23         https://bugs.webkit.org/show_bug.cgi?id=103260
24
25         Reviewed by Simon Hausmann.
26
27         * platform/graphics/Icon.h:
28         (Icon):
29         * platform/graphics/qt/IconQt.cpp:
30         (WebCore::Icon::createIconForFiles):
31         (WebCore::Icon::paint):
32
33 2012-09-17  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
34
35         Incorrect rect-based hit-test result when hit-test region includes culled inlines
36         https://bugs.webkit.org/show_bug.cgi?id=88376
37
38         Reviewed by Dave Hyatt.
39
40         Move the handling of culled inlines from HitTestResult::addNodeToRectBasedTestResult to 
41         InlineFlowBox::nodeAtPoint. This makes it possible to fix a number of bugs with how
42         culled inlines were handled. They are now checked after all their children, and may
43         terminate area-based hit-testing if they contain the whole area.
44
45         Tests: fast/dom/nodesFromRect/nodesFromRect-culled-inlines.html
46                fast/dom/nodesFromRect/nodesFromRect-culled-inline-with-linebreak.html
47
48         * rendering/HitTestResult.cpp:
49         (WebCore::HitTestLocation::HitTestLocation):
50         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
51         * rendering/HitTestResult.h:
52         (HitTestLocation):
53         * rendering/InlineFlowBox.cpp:
54         (WebCore::InlineFlowBox::nodeAtPoint):
55         * rendering/RenderInline.cpp:
56         (WebCore::RenderInline::hitTestCulledInline):
57         * rendering/RenderInline.h:
58         (RenderInline):
59
60 2012-11-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
61
62         REGRESSION(134887) [Qt][EFL][WK2] Repaint counter not working
63         https://bugs.webkit.org/show_bug.cgi?id=103261
64
65         Reviewed by Noam Rosenthal.
66
67         Fixed regression introduced in 134887, which introduced the
68         updateContentsNoSwizzle method and called it directly from
69         the repaint counter.
70
71         This method obviously needs to bind the texture.
72
73         * platform/graphics/texmap/TextureMapperGL.cpp:
74         (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
75
76 2012-11-27  Sheriff Bot  <webkit.review.bot@gmail.com>
77
78         Unreviewed, rolling out r135786.
79         http://trac.webkit.org/changeset/135786
80         https://bugs.webkit.org/show_bug.cgi?id=103379
81
82         It made 3 plugin tests timeout on several platforms (Requested
83         by Ossy on #webkit).
84
85         * CMakeLists.txt:
86         * GNUmakefile.list.am:
87         * Target.pri:
88         * WebCore.exp.in:
89         * WebCore.gypi:
90         * WebCore.vcproj/WebCore.vcproj:
91         * WebCore.xcodeproj/project.pbxproj:
92         * loader/FrameLoadRequest.cpp: Removed.
93         * loader/FrameLoadRequest.h:
94         (WebCore::FrameLoadRequest::FrameLoadRequest):
95         (FrameLoadRequest):
96         * loader/FrameLoader.cpp:
97         (WebCore::FrameLoader::load):
98         * loader/FrameLoader.h:
99         (FrameLoader):
100         * page/DragController.cpp:
101         (WebCore::DragController::performDrag):
102         * plugins/PluginView.cpp:
103         (WebCore::PluginView::performRequest):
104
105 2012-11-27  Kent Tamura  <tkent@chromium.org>
106
107         Implement ValidityState::badInput
108         https://bugs.webkit.org/show_bug.cgi?id=102861
109
110         Reviewed by Hajime Morita.
111
112         Add ValidityState::badInput, add hasBadInput, which always returns
113         false, to FormAssociatedElement, HTMLInputElement, and InputType.
114
115         For NumberInputType, we had hasUnacceptableValue, which was a hack to
116         make an input element match to :invalid if the element had non-number
117         strings. We don't need the hack any more because badInput affects :invalid
118         style. hasUnacceptableValue is re-used for hasBadInput implementation.
119         We cleared invalid numbers when elements lost focus to tell users that
120         the element had invalid numbers. We don't need this behavior because the
121         interactive validation tells it.
122
123         For date/time input types, we should make an input badInput when the
124         input has empty value but its sub-fields have values. It covers both of
125         partial input cases such as 12/--/2012 and invalid dates such as
126         02/31/2012.
127
128         For other types, ValidityState::badInput always returns false.
129
130         This patch doesn't contain tests for badInput validation messages. They
131         will be added later.
132
133         Tests: fast/forms/date-multiple-fields/date-multiple-fields-validity-badinput.html
134                fast/forms/datetime-multiple-fields/datetime-multiple-fields-validity-badinput.html
135                fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-validity-badinput.html
136                fast/forms/month-multiple-fields/month-multiple-fields-validity-badinput.html
137                fast/forms/number/number-validity-badinput.html
138                fast/forms/time-multiple-fields/time-multiple-fields-validity-badinput.html
139                fast/forms/week-multiple-fields/week-multiple-fields-validity-badinput.html
140
141         * html/ValidityState.idl: Add badInput IDL attribute.
142         * html/ValidityState.h:
143         (ValidityState): Add badInput.
144         * html/ValidityState.cpp:
145         (WebCore::ValidityState::badInput):
146         Added. Calls FormAssociatedElement::hasBadInput.
147
148         * html/FormAssociatedElement.h:
149         (FormAssociatedElement): Add hasBadInput.
150         * html/FormAssociatedElement.cpp:
151         (WebCore::FormAssociatedElement::hasBadInput):
152         Added. It always returns false.
153         (WebCore::FormAssociatedElement::valid): Takes account of hasBadInput().
154
155         * html/HTMLInputElement.h:
156         (HTMLInputElement):
157         Remove hasUnacceptableValue, and add hasBadInput override.
158         * html/HTMLInputElement.cpp:
159         (WebCore::HTMLInputElement::hasBadInput):
160         Added. Delegate to InputType::hasBadInput.
161         (WebCore): Remove hasUnacceptableValue.
162
163         * html/InputType.h:
164         (InputType): Add hasBadInput and badInputText, and remove
165         hasUnacceptableValue.
166         * html/InputType.cpp:
167         (WebCore::InputType::hasBadInput): Added. Returns false.
168         (WebCore::InputType::badInputText):
169         Added. This function should not be called because hasBadInput always
170         returns false.
171         (WebCore::InputType::validationMessage):
172         Supports badInput. This returns badInputText if hasBadInput is true.
173
174         * html/NumberInputType.h:
175         (NumberInputType): Add hasBadInput and badInputTest. Remove
176         handleBlurEvent and hasUnacceptableValue.
177         * html/NumberInputType.cpp:
178         Remove handleBlurEvent, which cleared invalid number strings.
179         (WebCore::NumberInputType::hasBadInput):
180         Added. We don't need to check existence of a renderer. The standard form
181         validation feature doesn't care of it.
182         (WebCore::NumberInputType::badInputText): Returns
183         validationMessageBadInputForNumberText defined in LocalizedStrings.h.
184         * css/SelectorChecker.cpp:
185         (WebCore::SelectorChecker::checkOneSelector):
186         Remove a hack for hasUnacceptableValue. isValidFormControlElement takes
187         account of badInput.
188         * dom/Element.h: Remove hasUnacceptableValue.
189
190         * html/BaseMultipleFieldsDateAndTimeInputType.h:
191         (BaseMultipleFieldsDateAndTimeInputType): Add hasBadInput and badInputText.
192         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
193         (WebCore::BaseMultipleFieldsDateAndTimeInputType::badInputText):
194         Returns validationMessageBadInputForDateTimeText defined in LocalizedStrings.h.
195         (WebCore::BaseMultipleFieldsDateAndTimeInputType::hasBadInput):
196         Added.
197         (WebCore::BaseMultipleFieldsDateAndTimeInputType::setValue):
198         Add setNeedsValidityCheck call. It is needed because
199         updateInnerTextValue can modify subfields empty state.
200
201         * html/TextFieldInputType.cpp:
202         (WebCore::TextFieldInputType::subtreeHasChanged): Update a comment.
203         * platform/LocalizedStrings.h:
204         (WebCore): Add validationMessageBadInputForNumberText and
205         validationMessageBadInputForDateTimeText.
206         * platform/LocalizedStrings.cpp:
207         (WebCore::validationMessageBadInputForNumberText):
208         Added a placeholder implementation. This should be fixed later.
209         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
210         (WebCore::validationMessageBadInputForNumberText): Ditto.
211         * platform/efl/LocalizedStringsEfl.cpp:
212         (WebCore::validationMessageBadInputForNumberText): Ditto.
213         * platform/qt/LocalizedStringsQt.cpp:
214         (WebCore::validationMessageBadInputForNumberText): Ditto.
215
216 2012-11-27  Hajime Morrita  <morrita@google.com>
217
218         [Refactoring] NodeFlags::IsShadowRootFlag should be Node::IsDocumentFragmentFlag
219         https://bugs.webkit.org/show_bug.cgi?id=103370
220
221         Reviewed by Kentaro Hara.
222
223         This chagne introduces Node::IsDocumentFragmentFlag so that we can
224         have fast Node::isDocumentFragment().
225
226         Note that Node::isShadowRoot() can become slightly slower when it
227         returns true, but that is minor in terms of the number of calls at runtime.
228
229         No new tests. No behavior change.
230
231         * dom/DocumentFragment.cpp:
232         (WebCore::DocumentFragment::create):
233         * dom/DocumentFragment.h:
234         * dom/Node.cpp:
235         (WebCore::Node::documentFragmentIsShadowRoot):
236         (WebCore):
237         * dom/Node.h:
238         (Node):
239         (WebCore::Node::isDocumentFragment):
240         (WebCore::Node::isShadowRoot):
241         (WebCore::Node::parentNode):
242         (WebCore::Node::parentNodeGuaranteedHostFree):
243         * dom/ShadowRoot.h:
244
245 2012-11-26  Kent Tamura  <tkent@chromium.org>
246
247         :read-only selector should match to date/time input types
248         https://bugs.webkit.org/show_bug.cgi?id=103350
249
250         Reviewed by Kentaro Hara.
251
252         We supported :read-only and :read-write only for text form controls;
253         i.e. <textarea> and text-field <input>. According to [1], we should
254         support them for date/time types. So, this patch removes
255         isTextFormControl check in SelectorChecker, and just relies on
256         shouldMatchRead{Only,Write}Selector virtual functions.
257
258         Tests: Update fast/forms/*/*-appearance-pseudo-classes.html.
259
260         [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
261
262         * css/SelectorChecker.cpp:
263         (WebCore::SelectorChecker::checkOneSelector):
264         Remove isFormControlElement check and isTextFormControl check.
265
266         * html/HTMLFormControlElement.cpp:
267         Remove shouldMatchRead{Only,Write}Selector functions. We don't need
268         common implementations any more.
269         * html/HTMLFormControlElement.h: Ditto.
270
271         * html/HTMLTextAreaElement.h:
272         (HTMLTextAreaElement): Add shouldMatchRead{Only,Write}Selector overrides.
273         * html/HTMLTextAreaElement.cpp:
274         (WebCore::HTMLTextAreaElement::shouldMatchReadOnlySelector): Added.
275         (WebCore::HTMLTextAreaElement::shouldMatchReadWriteSelector): Added.
276
277         * html/HTMLInputElement.h:
278         (HTMLInputElement): Add shouldMatchRead{Only,Write}Selector overrides.
279         * html/HTMLInputElement.cpp:
280         (WebCore::HTMLInputElement::shouldMatchReadOnlySelector):
281         Added. This checks InputType::supportsReadOnly and readOnly.
282         (WebCore::HTMLInputElement::shouldMatchReadWriteSelector): Ditto.
283
284         * html/InputType.h:
285         (InputType): Add supportsReadOnly.
286         * html/InputType.cpp:
287         (WebCore::InputType::supportsReadOnly): Added. Returns false by default.
288
289         * html/BaseDateAndTimeInputType.h:
290         (BaseDateAndTimeInputType): Add supportsReadOnly.
291         * html/BaseDateAndTimeInputType.cpp:
292         (WebCore::BaseDateAndTimeInputType::supportsReadOnly): Added. Returns true.
293         * html/TextFieldInputType.h:
294         (TextFieldInputType): Add supportsReadOnly.
295         * html/TextFieldInputType.cpp:
296         (WebCore::TextFieldInputType::supportsReadOnly): Added. Returns true.
297
298 2012-11-26  Sheriff Bot  <webkit.review.bot@gmail.com>
299
300         Unreviewed, rolling out r135822.
301         http://trac.webkit.org/changeset/135822
302         https://bugs.webkit.org/show_bug.cgi?id=103369
303
304         Undo the revert of r135818, since that change does not affect
305         code used by Chromium (Requested by apavlov on #webkit).
306
307         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
308         (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
309         (WebCore::GraphicsLayerTextureMapper::setContentsVisible):
310
311 2012-11-26  Michael Pruett  <michael@68k.org>
312
313         [GTK] Fix build error on GTK due to r135749
314         https://bugs.webkit.org/show_bug.cgi?id=103365
315
316         Reviewed by Dean Jackson.
317
318         In r135749, many files which were already included
319         in webcore_built_sources were erroneously added to
320         webcore_svg_built_sources in GNUmakefile.list.am.
321
322         * GNUmakefile.list.am:
323
324 2012-11-26  Sheriff Bot  <webkit.review.bot@gmail.com>
325
326         Unreviewed, rolling out r135818.
327         http://trac.webkit.org/changeset/135818
328         https://bugs.webkit.org/show_bug.cgi?id=103368
329
330         platform/chromium/virtual/threaded/compositing/visibility
331         /visibility-simple-webgl-layer.html crash on Mountain Lion
332         (Requested by apavlov on #webkit).
333
334         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
335         (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
336         (WebCore::GraphicsLayerTextureMapper::setContentsVisible):
337
338 2012-11-26  Huang Dongsung  <luxtella@company100.net>
339
340         Coordinated Graphics: Set visibility to a mask layer in GraphicsLayer::setContentsVisible().
341         https://bugs.webkit.org/show_bug.cgi?id=103297
342
343         Reviewed by Noam Rosenthal.
344
345         GraphicsLayerTextureMapper and CoordinatedGraphicsLayer set the visibility of a
346         mask layer in setContentsVisible() and setMaskLayer() like setting a size.
347         This patch is needed because RenderLayerBacking does not set the visibility to a
348         mask layer like the size.
349
350         This patch does not change user experience because an invisible layer is not
351         rendered although the mask layer is rendered. In that sense, it is an
352         optimization patch.
353
354         No new tests. It is an optimization patch.
355
356         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
357         (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
358         (WebCore::GraphicsLayerTextureMapper::setContentsVisible):
359
360 2012-11-26  Kentaro Hara  <haraken@chromium.org>
361
362         [V8] Rename EXCEPTION_BLOCK() macros
363         https://bugs.webkit.org/show_bug.cgi?id=103352
364
365         Reviewed by Adam Barth.
366
367         Since V8Parameter was renamed to V8StringResource,
368         we rename macros that use V8Parameter.
369
370         EXCEPTION_BLOCK() => V8TRYCATCH()
371         STRING_TO_V8PARAMETER_EXCEPTION_BLOCK() => V8TRYCATCH_FOR_V8STRINGRESOURCE()
372         STRING_TO_V8PARAMETER_EXCEPTION_BLOCK_VOID() => V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID()
373
374         No tests. No change in behavior.
375
376         * bindings/scripts/CodeGeneratorV8.pm:
377         (GenerateParametersCheck):
378         (GenerateEventConstructorCallback):
379         (ConvertToV8StringResource):
380         * bindings/scripts/test/V8/V8Float64Array.cpp:
381         (WebCore::Float64ArrayV8Internal::fooCallback):
382         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
383         (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
384         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
385         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
386         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
387         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
388         (WebCore::V8TestEventConstructor::constructorCallback):
389         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
390         (WebCore::TestEventTargetV8Internal::itemCallback):
391         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
392         * bindings/scripts/test/V8/V8TestInterface.cpp:
393         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetter):
394         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrSetter):
395         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
396         (WebCore::V8TestInterface::constructorCallback):
397         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
398         (WebCore::TestMediaQueryListListenerV8Internal::methodCallback):
399         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
400         (WebCore::V8TestNamedConstructorConstructorCallback):
401         * bindings/scripts/test/V8/V8TestObj.cpp:
402         (WebCore::TestObjV8Internal::staticStringAttrAttrSetter):
403         (WebCore::TestObjV8Internal::stringAttrAttrSetter):
404         (WebCore::TestObjV8Internal::reflectedStringAttrAttrSetter):
405         (WebCore::TestObjV8Internal::reflectedURLAttrAttrSetter):
406         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrSetter):
407         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter):
408         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter):
409         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
410         (WebCore::TestObjV8Internal::longMethodWithArgsCallback):
411         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
412         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
413         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
414         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
415         (WebCore::TestObjV8Internal::idbKeyCallback):
416         (WebCore::TestObjV8Internal::optionsObjectCallback):
417         (WebCore::TestObjV8Internal::methodWithOptionalArgCallback):
418         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback):
419         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
420         (WebCore::TestObjV8Internal::methodWithOptionalStringCallback):
421         (WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback):
422         (WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback):
423         (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
424         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
425         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
426         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
427         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
428         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
429         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
430         (WebCore::TestObjV8Internal::overloadedMethod8Callback):
431         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
432         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
433         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
434         (WebCore::TestObjV8Internal::classMethodWithOptionalCallback):
435         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
436         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
437         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
438         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
439         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
440         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
441         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
442         (WebCore::TestObjV8Internal::convert1Callback):
443         (WebCore::TestObjV8Internal::convert2Callback):
444         (WebCore::TestObjV8Internal::convert4Callback):
445         (WebCore::TestObjV8Internal::convert5Callback):
446         (WebCore::TestObjV8Internal::strictFunctionCallback):
447         (WebCore::TestObjV8Internal::variadicStringMethodCallback):
448         (WebCore::TestObjV8Internal::variadicDoubleMethodCallback):
449         (WebCore::TestObjV8Internal::variadicNodeMethodCallback):
450         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
451         (WebCore::V8TestOverloadedConstructors::constructor1Callback):
452         (WebCore::V8TestOverloadedConstructors::constructor2Callback):
453         (WebCore::V8TestOverloadedConstructors::constructor3Callback):
454         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
455         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
456         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
457         * bindings/v8/V8Binding.h:
458         (WebCore::toV8Sequence):
459         * bindings/v8/V8BindingMacros.h:
460         * bindings/v8/custom/V8BlobCustom.cpp:
461         (WebCore::V8Blob::constructorCallbackCustom):
462         * bindings/v8/custom/V8ConsoleCustom.cpp:
463         (WebCore::V8Console::profileCallback):
464         (WebCore::V8Console::profileEndCallback):
465         * bindings/v8/custom/V8DOMWindowCustom.cpp:
466         (WebCore::handlePostMessageCallback):
467         * bindings/v8/custom/V8DataViewCustom.cpp:
468         (WebCore::V8DataView::getInt8Callback):
469         (WebCore::V8DataView::getUint8Callback):
470         (WebCore::V8DataView::setInt8Callback):
471         (WebCore::V8DataView::setUint8Callback):
472         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
473         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallback):
474         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
475         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
476         * bindings/v8/custom/V8DocumentCustom.cpp:
477         (WebCore::V8Document::evaluateCallback):
478         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
479         (WebCore::V8HTMLOptionsCollection::addCallback):
480         * bindings/v8/custom/V8HistoryCustom.cpp:
481         (WebCore::V8History::pushStateCallback):
482         (WebCore::V8History::replaceStateCallback):
483         * bindings/v8/custom/V8IntentCustom.cpp:
484         (WebCore::V8Intent::constructorCallbackCustom):
485         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
486         (WebCore::V8SQLTransaction::executeSqlCallback):
487         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
488         (WebCore::V8SQLTransactionSync::executeSqlCallback):
489         * bindings/v8/custom/V8SVGLengthCustom.cpp:
490         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
491         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
492         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
493         * bindings/v8/custom/V8WorkerContextCustom.cpp:
494         (WebCore::V8WorkerContext::importScriptsCallback):
495
496 2012-11-26  Andreas Kling  <akling@apple.com>
497
498         Node: Move AreSVGAttributesValidFlag to ElementAttributeData.
499         <http://webkit.org/b/103349>
500
501         Reviewed by Anders Carlsson.
502
503         Moved AreSVGAttributesValidFlag to ElementAttributeData and change it to use "dirty" semantics.
504         This frees up a bit on Node, and we will always have ElementAttributeData if the animated
505         attributes are dirty anyway.
506
507         * dom/Element.cpp:
508         (WebCore::Element::getAttribute):
509         * dom/Element.h:
510         (WebCore::Element::updateInvalidAttributes):
511         * dom/ElementAttributeData.cpp:
512         (WebCore::ElementAttributeData::ElementAttributeData):
513         * dom/ElementAttributeData.h:
514         (WebCore::ElementAttributeData::ElementAttributeData):
515         (ElementAttributeData):
516         * dom/Node.h:
517         (Node):
518         * svg/SVGElement.cpp:
519         (WebCore::SVGElement::updateAnimatedSVGAttribute):
520         * svg/SVGElement.h:
521         (WebCore::SVGElement::invalidateSVGAttributes):
522
523 2012-11-26  Sheriff Bot  <webkit.review.bot@gmail.com>
524
525         Unreviewed, rolling out r135798.
526         http://trac.webkit.org/changeset/135798
527         https://bugs.webkit.org/show_bug.cgi?id=103354
528
529         Broke the chrome mac build (Requested by noel_ on #webkit).
530
531         * platform/graphics/chromium/DeferredImageDecoder.cpp:
532         (WebCore::DeferredImageDecoder::~DeferredImageDecoder):
533         (WebCore::DeferredImageDecoder::createResizedLazyDecodingBitmap):
534         (WebCore::DeferredImageDecoder::frameBufferAtIndex):
535         (WebCore::DeferredImageDecoder::createLazyDecodingBitmap):
536         * platform/graphics/chromium/DeferredImageDecoder.h:
537         (DeferredImageDecoder):
538         * platform/graphics/chromium/ImageDecodingStore.cpp:
539         (WebCore::ImageDecodingStore::instanceOnMainThread):
540         (WebCore::ImageDecodingStore::initializeOnMainThread):
541         (WebCore::ImageDecodingStore::shutdown):
542         (WebCore::ImageDecodingStore::calledOnValidThread):
543         (WebCore::ImageDecodingStore::lookupFrameCache):
544         (WebCore::ImageDecodingStore::deleteFrameCache):
545         * platform/graphics/chromium/ImageDecodingStore.h:
546         (WebCore):
547         (ImageDecodingStore):
548         * platform/graphics/chromium/ImageFrameGenerator.cpp:
549         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
550         (WebCore::ImageFrameGenerator::~ImageFrameGenerator):
551         (WebCore::ImageFrameGenerator::setData):
552         (WebCore::ImageFrameGenerator::decodeAndScale):
553         * platform/graphics/chromium/ImageFrameGenerator.h:
554         (WebCore):
555         (WebCore::ImageFrameGenerator::create):
556         (ImageFrameGenerator):
557         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
558         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
559         (WebCore::LazyDecodingPixelRef::onLockPixels):
560         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
561         * platform/graphics/chromium/LazyDecodingPixelRef.h:
562         (WebCore):
563         (LazyDecodingPixelRef):
564         * platform/graphics/chromium/ScaledImageFragment.cpp:
565         (WebCore::ScaledImageFragment::ScaledImageFragment):
566         (WebCore::ScaledImageFragment::isEqual):
567         (WebCore):
568         * platform/graphics/chromium/ScaledImageFragment.h:
569         (WebCore):
570         (WebCore::ScaledImageFragment::create):
571         (ScaledImageFragment):
572         * platform/graphics/chromium/SkSizeHash.h: Removed.
573
574 2012-11-26  Huang Dongsung  <luxtella@company100.net>
575
576         [TexMap] GraphicsLayerTextureMapper::setSize() sets the size of a mask layer.
577         https://bugs.webkit.org/show_bug.cgi?id=103297
578
579         Reviewed by Noam Rosenthal.
580
581         Currently, CoordinatedGraphicsLayer sets the size of a mask layer in setSize()
582         and setMaksLayer(). GraphicsLayerTextureMapper follows the behavior. If so we
583         don't have to check the size of the mask layer in TextureMapperLayer::flushCompositingState().
584
585         No new tests. Covered by existing tests.
586
587         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
588         (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
589         (WebCore::GraphicsLayerTextureMapper::setSize):
590         * platform/graphics/texmap/TextureMapperLayer.cpp:
591         (WebCore::TextureMapperLayer::flushCompositingState):
592
593 2012-11-26  Kentaro Hara  <haraken@chromium.org>
594
595         [V8] Remove V8Parameter::object()
596         https://bugs.webkit.org/show_bug.cgi?id=103340
597
598         Reviewed by Adam Barth.
599
600         V8Parameter can use m_v8Object directly.
601
602         No tests. No change in behavior.
603
604         * bindings/v8/V8StringResource.h:
605         (WebCore::::prepare):
606
607 2012-11-26  Kentaro Hara  <haraken@chromium.org>
608
609         [V8] Rename V8Parameter to V8StringResource
610         https://bugs.webkit.org/show_bug.cgi?id=103341
611
612         Reviewed by Adam Barth.
613
614         We can rename V8Parameter to V8StringResource. In a follow-up patch,
615         I will rename macros around V8Parameter.
616
617         No tests. No change in behavior.
618
619         * bindings/scripts/CodeGeneratorV8.pm:
620         (GenerateNormalAttrGetter):
621         (GenerateNormalAttrSetter):
622         (GenerateParametersCheck):
623         (GenerateEventConstructorCallback):
624         (GetNativeTypeFromSignature):
625         (GetNativeType):
626         (ConvertToV8StringResource):
627         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
628         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
629         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
630         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
631         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
632         (WebCore::V8TestEventConstructor::constructorCallback):
633         * bindings/scripts/test/V8/V8TestInterface.cpp:
634         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetter):
635         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrSetter):
636         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
637         (WebCore::V8TestInterface::constructorCallback):
638         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
639         (WebCore::V8TestNamedConstructorConstructorCallback):
640         * bindings/scripts/test/V8/V8TestObj.cpp:
641         (WebCore::TestObjV8Internal::staticStringAttrAttrSetter):
642         (WebCore::TestObjV8Internal::stringAttrAttrSetter):
643         (WebCore::TestObjV8Internal::reflectedStringAttrAttrSetter):
644         (WebCore::TestObjV8Internal::reflectedURLAttrAttrSetter):
645         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrSetter):
646         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter):
647         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter):
648         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
649         (WebCore::TestObjV8Internal::longMethodWithArgsCallback):
650         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
651         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
652         (WebCore::TestObjV8Internal::methodWithOptionalStringCallback):
653         (WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback):
654         (WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback):
655         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
656         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
657         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
658         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
659         (WebCore::TestObjV8Internal::strictFunctionCallback):
660         (WebCore::TestObjV8Internal::variadicStringMethodCallback):
661         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
662         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
663         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
664         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
665         * bindings/v8/V8StringResource.h:
666         (WebCore::V8StringResource::V8StringResource):
667         (WebCore::::prepare):
668         * bindings/v8/custom/V8ConsoleCustom.cpp:
669         (WebCore::V8Console::profileCallback):
670         (WebCore::V8Console::profileEndCallback):
671         * bindings/v8/custom/V8DOMWindowCustom.cpp:
672         (WebCore::handlePostMessageCallback):
673         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
674         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallback):
675         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
676         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
677         * bindings/v8/custom/V8HistoryCustom.cpp:
678         (WebCore::V8History::pushStateCallback):
679         (WebCore::V8History::replaceStateCallback):
680         * bindings/v8/custom/V8IntentCustom.cpp:
681         (WebCore::V8Intent::constructorCallbackCustom):
682         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
683         (WebCore::V8SQLTransaction::executeSqlCallback):
684         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
685         (WebCore::V8SQLTransactionSync::executeSqlCallback):
686         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
687         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
688
689 2012-11-26  Andreas Kling  <akling@apple.com>
690
691         HTMLOptionElement: Remove two unused members.
692         <http://webkit.org/b/103337>
693
694         Reviewed by Kent Tamura.
695
696         Remove two unused members from HTMLOptionElement, m_value and m_label.
697         40kB progression on Membuster3.
698
699         * html/HTMLOptionElement.h:
700         (HTMLOptionElement):
701
702 2012-11-26  Stephen White  <senorblanco@chromium.org>
703
704         [Chromium] Shared graphics context should only pushGroupMarker() once
705         https://bugs.webkit.org/show_bug.cgi?id=103082
706
707         Reviewed by James Robinson.
708
709         GraphicsContext3D's pushGroupMarkerEXT() is being called every time
710         an ImageBuffer is created, leading to unlimited memory growth, since
711         they share a common GraphicsContext3D.  It should be called only once,
712         on context creation.
713
714         Tested by manually checking the memory usage in Chrome's TaskManager.
715         (Sorry, I can't think of a way to test this automatically.)
716
717         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
718         (WebCore::SharedGraphicsContext3DImpl::getOrCreateContext):
719         * platform/graphics/skia/ImageBufferSkia.cpp:
720         (WebCore::createAcceleratedCanvas):
721
722 2012-11-26  Kentaro Hara  <haraken@chromium.org>
723
724         [V8] Remove WorkerContextExecutionProxy.{h,cpp}
725         https://bugs.webkit.org/show_bug.cgi?id=103325
726
727         Reviewed by Adam Barth.
728
729         Now WorkerContextExecutionProxy.{h,cpp} are empty.
730
731         No tests. No change in behavior.
732
733         * UseV8.cmake:
734         * WebCore.gypi:
735         * bindings/v8/ScheduledAction.cpp:
736         * bindings/v8/V8AbstractEventListener.cpp:
737         * bindings/v8/V8DOMWrapper.cpp:
738         * bindings/v8/V8WorkerContextEventListener.h:
739         (WebCore):
740         * bindings/v8/WorkerContextExecutionProxy.cpp: Removed.
741         * bindings/v8/WorkerContextExecutionProxy.h: Removed.
742         * bindings/v8/WorkerScriptController.cpp:
743         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
744         * bindings/v8/custom/V8MessageChannelCustom.cpp:
745         * bindings/v8/custom/V8MessagePortCustom.cpp:
746         * bindings/v8/custom/V8WorkerCustom.cpp:
747         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
748
749 2012-11-26  Michael Saboff  <msaboff@apple.com>
750
751         Grapheme cluster functions can be simplified for 8 bit Strings
752         https://bugs.webkit.org/show_bug.cgi?id=102996
753
754         Reviewed by Alexey Proskuryakov.
755
756         For 8 bit strings, check for the uncommon CR-LF by looking for any CR.  If there aren't any CR characters,
757         the number of Extended Grapheme Clusters is equal to the string length.  If we need to handle Tailored
758         Graheme Clusters, then this will need to change.
759
760         No new tests. No change in functionality.
761
762         * platform/text/TextBreakIterator.cpp:
763         (WebCore::numGraphemeClusters):
764         (WebCore::numCharactersInGraphemeClusters):
765
766 2012-11-26  Istiaque Ahmed  <lazyboy@chromium.org>
767
768         Check for empty perContextData while creating NP V8 Object.
769         https://bugs.webkit.org/show_bug.cgi?id=98448
770
771         Reviewed by Adam Barth.
772
773         Fixes crash in npCreateV8ScriptObject(), if NP Invoke is called from a document
774         that is no longer displayed in frame (isCurrentlyDisplayedInFrame() ==
775         false), we have empty perContextData and this results in invalid memory access.
776
777         Test: platform/chromium/plugins/empty-per-context-data.html
778
779         * bindings/v8/NPV8Object.cpp:
780         (WebCore::npCreateV8ScriptObject):
781
782 2012-11-26  Michael Saboff  <msaboff@apple.com>
783
784         HTML/XML parser helper unconsumeCharacters() can push back 8 bit text as 16 bit text
785         https://bugs.webkit.org/show_bug.cgi?id=103317
786
787         Reviewed by Oliver Hunt.
788
789         Changed to use the String directly from the StringBuilder instead of creating our own.
790         Used toStringPreserveCapacity() in case the caller may want to add to the StringBuilder
791         even though current callers don't.
792
793         No new tests. No change in functionality.
794
795         * xml/parser/CharacterReferenceParserInlines.h:
796         (WebCore::unconsumeCharacters):
797
798 2012-11-26  Noel Gordon  <noel.gordon@gmail.com>
799
800         PNG decode performance: avoid using frame buffer.setRGBA(x,y)
801         https://bugs.webkit.org/show_bug.cgi?id=103216
802
803         Reviewed by Brent Fulgham.
804
805         Writing decoded row pixels to the frame buffer with buffer.setRGBA(x,y) is slow compared
806         to writing direct to the frame buffer address. Use buffer.getAddr() to obtain the output
807         pixel row address, write the decoded row pixels to that address.
808
809         No new tests. Covered by many existing tests.
810
811         * platform/image-decoders/ImageDecoder.h:
812         (WebCore::ImageFrame::setRGBA): Make routine setRGBA(PixelData* dest, ...) public. Test
813         m_premultiplyAlpha once to minimize code branching in this routine.
814         * platform/image-decoders/png/PNGImageDecoder.cpp:
815         (WebCore::PNGImageDecoder::rowAvailable): Write decoded row pixels to the frame buffer
816         using the pixel address form: buffer.setRGBA(address++, ...).
817
818 2012-11-26  Alpha Lam  <hclam@chromium.org>
819
820         [chromium] Implement full-featured image cache
821         https://bugs.webkit.org/show_bug.cgi?id=99784
822
823         Reviewed by James Robinson.
824
825         Implement a thread-safe image cache to be used with deferred image
826         decoding. Image cache can now be accessed on any thread.
827
828         The patch implements the following logic:
829         1. Mutex to protect all cache operations.
830         2. Cache indexing using key (ImageFrameGenerator*, SkISize scaledSize)
831         3. Cache lookup.
832         4. Cache insertion.
833         5. Generation of cache entry by scaling full size image.
834         6. Generation of cache entries by decoding and scaling.
835
836         Classes involved:
837
838         ImageDecodingStore
839
840         Responsible for owning cache entries and indexing. Pruning and memory
841         management will be added later.
842
843         ImageFrameGenerator
844
845         Responsible for generating new cache enties and insert them into
846         ImageDecodingStore.
847
848         LazyDecodingPixelRef
849
850         Responsible for cache lookup and lazy generation of cache entries
851         using ImageFrameGenerator. There is a mutex to protect concurrent
852         lock operations.
853
854         These items are not implemented in this patch:
855         1. Cache pruning.
856         2. Setting cache memory limit.
857         3. Cache deletion.
858         4. Caching incomplete images and ImageDecoder.
859
860         Unit tests added in ImageFrameGeneratorTest.cpp.
861         Layout tests are under platform/chromium/virtual/fast/images.
862
863         * platform/graphics/chromium/DeferredImageDecoder.cpp:
864         (WebCore::DeferredImageDecoder::~DeferredImageDecoder):
865         (WebCore::DeferredImageDecoder::createResizedLazyDecodingBitmap):
866         (WebCore::DeferredImageDecoder::setEnabled):
867         (WebCore):
868         (WebCore::DeferredImageDecoder::frameBufferAtIndex):
869         (WebCore::DeferredImageDecoder::createLazyDecodingBitmap):
870         * platform/graphics/chromium/DeferredImageDecoder.h:
871         (DeferredImageDecoder):
872         * platform/graphics/chromium/ImageDecodingStore.cpp:
873         (WebCore::ImageDecodingStore::instance):
874         (WebCore::ImageDecodingStore::initializeOnce):
875         (WebCore::ImageDecodingStore::shutdown):
876         (WebCore::ImageDecodingStore::lockCompleteCache):
877         Lookup complete cache entry using hash key, increment use count.
878         (WebCore::ImageDecodingStore::lockIncompleteCache): TODO.
879         (WebCore::ImageDecodingStore::unlockCache):
880         Lookup cache entry using hash key, decrement use count.
881         (WebCore):
882         (WebCore::ImageDecodingStore::insertAndLockCache):
883         Insert new cache entry and increment use count.
884         (WebCore::ImageDecodingStore::prune): TODO.
885         * platform/graphics/chromium/ImageDecodingStore.h:
886         (WebCore):
887         (ImageDecodingStore):
888         (WebCore::ImageDecodingStore::CacheEntry::create):
889         (WebCore::ImageDecodingStore::CacheEntry::createAndUse):
890         (CacheEntry):
891         (WebCore::ImageDecodingStore::CacheEntry::CacheEntry):
892         (WebCore::ImageDecodingStore::CacheEntry::~CacheEntry):
893         * platform/graphics/chromium/ImageFrameGenerator.cpp:
894         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
895         (WebCore::ImageFrameGenerator::setData):
896         (WebCore::ImageFrameGenerator::decodeAndScale):
897         Method for creating new cache entries. This is protected by a mutex
898         to prevent concurrent operations. Which means only one thread can
899         generate new cache entries for a set of encoded data.
900         (WebCore):
901         (WebCore::ImageFrameGenerator::tryToLockCache):
902         Tries to lookup a cache entry.
903         (WebCore::ImageFrameGenerator::tryToScale):
904         Tries to lookup a full size cache entry and generate a scaled version.
905         (WebCore::ImageFrameGenerator::tryToDecodeAndScale):
906         Tries to decode and scale.
907         * platform/graphics/chromium/ImageFrameGenerator.h:
908         (WebCore):
909         (ImageDecoderFactory):
910         (WebCore::ImageFrameGenerator::create):
911         (ImageFrameGenerator):
912         (WebCore::ImageFrameGenerator::setImageDecoderFactoryForTesting):
913         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
914         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
915         (WebCore::LazyDecodingPixelRef::onLockPixels):
916         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
917         * platform/graphics/chromium/LazyDecodingPixelRef.h:
918         (WebCore):
919         (LazyDecodingPixelRef):
920         * platform/graphics/chromium/ScaledImageFragment.cpp:
921         (WebCore::ScaledImageFragment::ScaledImageFragment):
922         * platform/graphics/chromium/ScaledImageFragment.h:
923         (WebCore):
924         (WebCore::ScaledImageFragment::create):
925         (ScaledImageFragment):
926         (WebCore::ScaledImageFragment::scaledSize):
927         * platform/graphics/chromium/SkSizeHash.h: Added.
928         (WTF):
929
930 2012-11-26  Andreas Kling  <akling@apple.com>
931
932         Node: Remove IsSynchronizingSVGAttributesFlag.
933         <http://webkit.org/b/103328>
934
935         Reviewed by Antti Koivisto.
936
937         Animated SVG attributes used to be synchronized by using DOM API which could use unwanted re-entrancy
938         via callbacks below Element::attributeChanged(). The "is synchronizing SVG attributes" flag was used
939         to protect against such re-entrancy.
940
941         These days, lazy attributes are synchronized using Element::setSynchronizedLazyAttribute() to avoid
942         issues like this. The flag does nothing, so we can just remove it.
943
944         * dom/Node.h:
945         (WebCore):
946         * svg/SVGElement.cpp:
947         (WebCore::SVGElement::attributeChanged):
948         (WebCore::SVGElement::updateAnimatedSVGAttribute):
949
950 2012-11-26  Kentaro Hara  <haraken@chromium.org>
951
952         [V8] Refactor WorkerScriptController
953         https://bugs.webkit.org/show_bug.cgi?id=103330
954
955         Reviewed by Adam Barth.
956
957         r135703 just moved methods from WorkerContextExecutionProxy
958         to WorkerScriptController. We should refactor the methods as a follow-up.
959
960         No tests. No change in behavior.
961
962         * bindings/v8/WorkerScriptController.cpp:
963         (WebCore::WorkerScriptController::~WorkerScriptController):
964         (WebCore::WorkerScriptController::disposeContext):
965         (WebCore::WorkerScriptController::initializeContextIfNeeded):
966         (WebCore::WorkerScriptController::evaluate):
967         (WebCore::WorkerScriptController::disableEval):
968         * bindings/v8/WorkerScriptController.h:
969         (WorkerScriptController):
970
971 2012-11-26  Varun Jain  <varunjain@chromium.org>
972
973         LongPress and LongTap gestures should start drag/drop and open context menu respectively.
974         https://bugs.webkit.org/show_bug.cgi?id=101545
975
976         Reviewed by Antonio Gomes.
977
978         For LongPress, we simulate drag by sending a mouse down and mouse drag
979         events. If a drag is not started (because maybe there is no draggable
980         element), then we show context menu instead (which is the current
981         behavior for LongPress). For LongTap, we use the existing functions that
982         LongPress uses to summon the context menu. LongPress initiated drag and
983         drop can be enabled/disabled by the platform using the Setting
984         touchDragDropEnabled which is disabled by default.
985
986         Tests: fast/events/touch/gesture/context-menu-on-long-tap.html
987                fast/events/touch/gesture/long-press-on-draggable-element-triggers-drag.html
988
989         * page/EventHandler.cpp:
990         (WebCore::EventHandler::EventHandler):
991         (WebCore::EventHandler::clear):
992         (WebCore::EventHandler::handleMouseDraggedEvent):
993         (WebCore::EventHandler::handleGestureEvent):
994         (WebCore::EventHandler::handleGestureLongPress):
995         (WebCore::EventHandler::handleGestureLongTap):
996         (WebCore):
997         (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
998         (WebCore::EventHandler::adjustGesturePosition):
999         (WebCore::EventHandler::handleDrag):
1000         * page/EventHandler.h:
1001         (EventHandler):
1002         * page/Settings.in:
1003
1004 2012-11-26  Andreas Kling  <akling@apple.com>
1005
1006         RenderStyle: Move 'list-style-image' to rare inherited data.
1007         <http://webkit.org/b/103300>
1008
1009         Reviewed by Antti Koivisto.
1010
1011         list-style-image is not nearly common enough to merit a spot in StyleInheritedData.
1012         Move it to StyleRareInheritedData.
1013
1014         134kB progression on Membuster3.
1015
1016         * rendering/style/RenderStyle.cpp:
1017         (WebCore::RenderStyle::diff):
1018         (WebCore::RenderStyle::listStyleImage):
1019         (WebCore::RenderStyle::setListStyleImage):
1020         * rendering/style/StyleInheritedData.cpp:
1021         (WebCore::StyleInheritedData::StyleInheritedData):
1022         (WebCore::StyleInheritedData::operator==):
1023         * rendering/style/StyleInheritedData.h:
1024         (StyleInheritedData):
1025         * rendering/style/StyleRareInheritedData.h:
1026         * rendering/style/StyleRareInheritedData.cpp:
1027         (SameSizeAsStyleRareInheritedData):
1028         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1029         (WebCore::StyleRareInheritedData::operator==):
1030
1031 2012-11-26  James Simonsen  <simonjam@chromium.org>
1032
1033         Consolidate FrameLoader::load() into one function taking a FrameLoadRequest
1034         https://bugs.webkit.org/show_bug.cgi?id=102151
1035
1036         Reviewed by Adam Barth.
1037
1038         There's a FIXME that we have too many FrameLoader::load*() functions. This patch consolidates 3 into 1.
1039         There are still a few more load functions that will be consolidated later. Using FrameLoadRequest as
1040         the interface into FrameLoader will also provide a place to pass in the initiator. Finally, this matches
1041         the refactoring done with CachedResourceRequest and CachedResourceLoader.
1042
1043         No new tests. No change in functionality.
1044
1045         * WebCore.exp.in:
1046         * loader/FrameLoadRequest.h:
1047         (WebCore::FrameLoadRequest::FrameLoadRequest):
1048         (WebCore::FrameLoadRequest::setLockHistory): These are former arguments to load().
1049         (WebCore::FrameLoadRequest::lockHistory): Ditto.
1050         (FrameLoadRequest):
1051         (WebCore::FrameLoadRequest::setShouldCheckNewWindowPolicy): Ditto.
1052         (WebCore::FrameLoadRequest::shouldCheckNewWindowPolicy): Ditto.
1053         (WebCore::FrameLoadRequest::substituteData): Ditto.
1054         (WebCore::FrameLoadRequest::setSubstituteData): Ditto.
1055         (WebCore::FrameLoadRequest::hasSubstituteData): Ditto.
1056         * loader/FrameLoader.cpp:
1057         (WebCore::FrameLoader::load): No change in behavior, just merged it all into one function.
1058         * loader/FrameLoader.h:
1059         (FrameLoader):
1060         * page/DragController.cpp:
1061         (WebCore::DragController::performDrag):
1062
1063 2012-11-24 Genevieve Mak <gmak@rim.com>
1064
1065         [BlackBerry] Stop sending touch events to plugins.
1066         https://bugs.webkit.org/show_bug.cgi?id=103188
1067
1068         Reviewed by Rob Buis.
1069
1070         Reviewed internally by Jeff Rogers and Mike Lattanzio.
1071         No tests required.
1072         PR #248605
1073
1074         * plugins/blackberry/PluginViewBlackBerry.cpp:
1075         (WebCore::PluginView::handleTouchEvent):
1076         (WebCore::PluginView::handleMouseEvent):
1077
1078 2012-11-26  Adenilson Cavalcanti  <cavalcantii@gmail.com>
1079
1080         Removing unnecessary friend classes in RenderObject: LayoutRepainter, RenderSVGContainer
1081         https://bugs.webkit.org/show_bug.cgi?id=103164
1082
1083         Reviewed by Simon Fraser.
1084
1085         Removing some of classes marked as friend of RenderObject. This patch solves this issue
1086         for 2 classes: RenderSVGContainer (that is derived from RenderObject) and LayoutRepainter
1087         (that accesses one const member function in RenderObject that is now made public).
1088
1089         No new tests, no changes in functionality.
1090
1091         * rendering/RenderObject.h:
1092         (RenderObject):
1093         (WebCore::RenderObject::outlineBoundsForRepaint):
1094
1095 2012-11-26  Jon Lee  <jonlee@apple.com>
1096
1097         Pass clicks through to the restarted plugin
1098         https://bugs.webkit.org/show_bug.cgi?id=102150
1099         <rdar://problem/12695575>
1100
1101         Reviewed by Simon Fraser.
1102
1103         Add a new state to the machine for plugin snapshotting, called PlayingWithPendingMouseClick.
1104         This represents the state where the plugin is playing, but before the pending mouse click
1105         has been fired. Once the click is sent, the plugin state transitions to Playing. For
1106         situations where the plugin just runs normally without a simulated click, the plugin state
1107         jumps from DisplayingSnapshot straight to Playing, as before.
1108
1109         * html/HTMLPlugInElement.h: Add new display state to represent when the plugin is running,
1110         but a pending mouse click is about to be sent to the plugin.
1111         (WebCore::HTMLPlugInElement::dispatchPendingMouseClick): Called by the plugin when it is
1112         ok for the element to send the pending mouse click.
1113         * html/HTMLPlugInElement.cpp:
1114         (WebCore::HTMLPlugInElement::defaultEventHandler): Update the handler to pass the event
1115         to the renderer to handle if the state is before PlayingWithPendingMouseClick.
1116
1117         * html/HTMLPlugInImageElement.h:
1118         * html/HTMLPlugInImageElement.cpp: Add a click timer to delay the mouse click so that the
1119         plugin has some time to initialize.
1120         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initialize the mouse timer.
1121         (WebCore::HTMLPlugInImageElement::setPendingClickEvent): Keep track of the click event
1122         the user made to restart the plugin.
1123         (WebCore::HTMLPlugInImageElement::dispatchPendingMouseClick): Start the timer.
1124         (WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired): When the timer fires,
1125         dispatch the simulated click, with mouse over, mouse down, and mouse up events. Transition
1126         to the Playing state, and we no longer need the click event.
1127
1128         * rendering/RenderSnapshottedPlugIn.cpp: Change the threshold state to PlayingWithPendingMouseClick
1129         instead of Playing, since that is the earliest state where the plugin is playing.
1130         (WebCore::RenderSnapshottedPlugIn::paint):
1131         (WebCore::RenderSnapshottedPlugIn::paintReplaced):
1132         (WebCore::RenderSnapshottedPlugIn::getCursor):
1133         (WebCore::RenderSnapshottedPlugIn::handleEvent): If the user clicked on the button, jump to
1134         Playing, and don't send a simulated click. Otherwise, transition to PlayingWithPendingMouseClick,
1135         and keep track of that mouse event.
1136
1137         * WebCore.exp.in: Export MouseRelatedEvent::offsetX() and offsetY().
1138
1139 2012-11-26  Dan Carney  <dcarney@google.com>
1140
1141         Refactor V8 bindings to allow content scripts to access subframes
1142         https://bugs.webkit.org/show_bug.cgi?id=93646
1143
1144         Reviewed by Adam Barth.
1145
1146         Isolated window shells are now initialized on the fly
1147         as needed.
1148
1149         No new tests. Existing test modified.
1150
1151         * bindings/v8/DOMWrapperWorld.cpp:
1152         (WebCore::DOMWrapperWorld::ensureIsolatedWorld):
1153         * bindings/v8/DOMWrapperWorld.h:
1154         (WebCore::DOMWrapperWorld::createdFromUnitializedWorld):
1155         (DOMWrapperWorld):
1156         * bindings/v8/ScriptController.cpp:
1157         (WebCore::ScriptController::currentWorldContext):
1158
1159 2012-11-26  Alex Christensen  <alex.christensen@flexsim.com>
1160
1161         clipboardwin compile error for win64
1162         https://bugs.webkit.org/show_bug.cgi?id=94124
1163
1164         Reviewed by Brent Fulgham.
1165
1166         The clipboard utilities code uses std::min with one unsigned int parameter and one size_t parameter.
1167         This causes a problem when compiling for 64-bit Windows because the two types are not the same size.
1168         To resolve this issue, we specify the template type as the type the return value is being cast into
1169
1170         Fixed a few compile errors for Windows x64 by specifying template parameters.
1171
1172         * platform/win/ClipboardUtilitiesWin.cpp:
1173         (WebCore::setFileDescriptorData): Specify the types for the std::min macro to avoid compiler errors
1174         under 64-bit builds.
1175
1176 2012-11-26  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1177
1178         [GTK] GtkSocket is leaked until webview is destroyed.
1179         https://bugs.webkit.org/show_bug.cgi?id=102564
1180
1181         Reviewed by Martin Robinson.
1182
1183         Remove GtkSocket from its parent when pluginview is destroyed. Then,
1184         the GtkSocket and it's possible child widgets are realeased when it is
1185         no more needed.
1186
1187         No new tests, already covered by existing tests.
1188
1189         * plugins/gtk/PluginViewGtk.cpp:
1190         (WebCore::PluginView::platformDestroy):
1191
1192 2012-11-26  Luke Macpherson   <macpherson@chromium.org>
1193
1194         Make StyleResolver::applyProperty use isInherit in CSSPropertyWebkitMarquee instead of calculating equivalent in-place.
1195         https://bugs.webkit.org/show_bug.cgi?id=102446
1196
1197         Reviewed by Tony Chang.
1198
1199         !m_parentNode || !value->isInheritedValue() is equivalent to !isInherit (by De Morgan's law).
1200
1201         No new tests / code is provably equivalent.
1202
1203         * css/StyleResolver.cpp:
1204         (WebCore::StyleResolver::applyProperty):
1205
1206 2012-11-26  Pratik Solanki  <psolanki@apple.com>
1207
1208         Add ResourceBuffer::append(CFDataRef) to get code to compile with USE(NETWORK_CFDATA_ARRAY_CALLBACK)
1209         https://bugs.webkit.org/show_bug.cgi?id=102706
1210
1211         Reviewed by Brent Fulgham.
1212
1213         No new tests because the flag isn't enabled. Also the functionality should be covered by
1214         existing tests.
1215
1216         * loader/ResourceBuffer.cpp:
1217         (WebCore):
1218         (WebCore::ResourceBuffer::append):
1219         * loader/ResourceBuffer.h:
1220         (ResourceBuffer):
1221         * loader/mac/ResourceLoaderMac.mm:
1222
1223 2012-11-26  Tony Chang  <tony@chromium.org>
1224
1225         Move more functions from internals.settings to internals
1226         https://bugs.webkit.org/show_bug.cgi?id=102976
1227
1228         Reviewed by Adam Barth.
1229
1230         Move functions that don't have to do with Settings off of internals.settings.
1231         setPagination and configurationForViewport were defined on internals, so we
1232         can inline the functions (no test change).
1233
1234         setEnableMockPagePopup is moved to Internals.
1235
1236         No new tests, this is a refactor.
1237
1238         * testing/InternalSettings.cpp:
1239         (WebCore::InternalSettings::reset): Move reset code into Internals.
1240         * testing/InternalSettings.h:
1241         (InternalSettings): Remove code for setPagination, configurationForViewport and setEnableMockPagePopup.
1242         * testing/InternalSettings.idl: Remove setPagination and setEnableMockPagePopup.
1243         * testing/Internals.cpp:
1244         (WebCore): Use a static to keep track of the MockPagePopupDriver.
1245         (WebCore::Internals::resetToConsistentState): Code from InternalSettings::reset
1246         (WebCore::Internals::setEnableMockPagePopup): Code copied from InternalSettings.
1247         (WebCore::Internals::pagePopupController): Code copied from InternalSettings.
1248         (WebCore::Internals::setPagination): Code copied from InternalSettings.
1249         (WebCore::Internals::configurationForViewport): Code copied from InternalSettings.
1250         * testing/Internals.h:
1251         (Internals): Add setEnableMockPagePopup.
1252         * testing/Internals.idl: Add setEnableMockPagePopup.
1253
1254 2012-11-26  Andrei Bucur  <abucur@adobe.com>
1255
1256         [CSS Regions] Add Region info for RootLineBoxes and pack the pagination data
1257         https://bugs.webkit.org/show_bug.cgi?id=101332
1258
1259         Reviewed by David Hyatt.
1260
1261         Currently the pagination information for lines is spread between the RootInlineBox and InlineFlowBox classes, consuming memory even though
1262         the boxes were not the result of an pagination layout. To overcome this, a new struct (LineFragmentationData) is created that wraps all the data,
1263         including two new members, the containing Region for the line and a boolean that states if the line was laid out in a Region or not.
1264         The flag is necessary because the sanitize function on LineFragmentationData resets the containing Region to 0 if the Region was removed from
1265         chain (so a value of 0 for the containing Region means two things). The sanitize function should prevent access to an invalid address.
1266         The containing Region is used to detect if a line changed the Region where it resides. This will be helpful especially when implementing region
1267         styling for layout properties (e.g. the font-size property https://bugs.webkit.org/show_bug.cgi?id=95559 ).
1268         A line can change the region when it is shifted inside the containing block or if the entire block moves. This means it's better to delegate
1269         the task of updating the containing Region to the block.
1270
1271         Tests: fast/regions/line-containing-region-crash.html
1272
1273         * rendering/InlineFlowBox.cpp:
1274         (SameSizeAsInlineFlowBox):
1275         * rendering/InlineFlowBox.h:
1276         (WebCore::InlineFlowBox::InlineFlowBox):
1277         (InlineFlowBox):
1278         * rendering/RenderBlock.cpp:
1279         (WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
1280         * rendering/RenderBlockLineLayout.cpp:
1281         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
1282         (WebCore::RenderBlock::linkToEndLineIfNeeded):
1283         (WebCore::RenderBlock::determineStartPosition):
1284         * rendering/RootInlineBox.cpp:
1285         (WebCore::RootInlineBox::RootInlineBox):
1286         (WebCore::RootInlineBox::setContainingRegion):
1287         (WebCore):
1288         (WebCore::RootInlineBox::LineFragmentationData::sanitize): This is an O(1) function that checks if the containig Region is still valid pointer.
1289         * rendering/RootInlineBox.h:
1290         (WebCore):
1291         (WebCore::RootInlineBox::paginationStrut):
1292         (WebCore::RootInlineBox::setPaginationStrut):
1293         (WebCore::RootInlineBox::isFirstAfterPageBreak):
1294         (WebCore::RootInlineBox::setIsFirstAfterPageBreak):
1295         (WebCore::RootInlineBox::paginatedLineWidth):
1296         (WebCore::RootInlineBox::setPaginatedLineWidth):
1297         (RootInlineBox):
1298         (WebCore::RootInlineBox::containingRegion):
1299         (WebCore::RootInlineBox::hasContainingRegion): Use this to determine if the line has a region or not.
1300         (WebCore::RootInlineBox::ensureLineFragmentationData):
1301         (LineFragmentationData):
1302         (WebCore::RootInlineBox::LineFragmentationData::LineFragmentationData):
1303
1304
1305 2012-11-26  Michelangelo De Simone  <michelangelo@webkit.org>
1306
1307         [CSS Shaders] Add IDL file and bindings for mix function
1308         https://bugs.webkit.org/show_bug.cgi?id=93011
1309
1310         Reviewed by Dean Jackson.
1311
1312         JavaScript bindings have been added for the Custom Filter mix()
1313         function (WebKitCSSMixFunctionValue). As of now, this is only a
1314         placeholder that extends CSSValueList without adding any new
1315         property.
1316
1317         Test: css3/filters/custom/custom-filter-mix-bindings.html
1318
1319         * CMakeLists.txt: mix() IDL has been added to the Generator;
1320         DerivedSources have been included.
1321         * DerivedSources.cpp: Ditto.
1322         * DerivedSources.make: Ditto.
1323         * DerivedSources.pri: Ditto.
1324         * GNUmakefile.list.am: Ditto.
1325         * WebCore.gypi: Ditto.
1326         * WebCore.vcproj/WebCore.vcproj: Ditto.
1327         * WebCore.xcodeproj/project.pbxproj: Ditto.
1328         * bindings/js/JSCSSValueCustom.cpp:
1329         (WebCore::toJS): return a JSC DOM wrapper for WebKitCSSMixFunctionValue.
1330         * bindings/v8/custom/V8CSSValueCustom.cpp:
1331         (WebCore::V8CSSValue::dispatchWrapCustom): Ditto, for V8.
1332         * css/WebKitCSSMixFunctionValue.idl: Added.
1333
1334 2012-11-26  Simon Fraser  <simon.fraser@apple.com>
1335
1336         Optimize layer updates after scrolling
1337         https://bugs.webkit.org/show_bug.cgi?id=102635
1338
1339         Reviewed by Sam Weinig.
1340
1341         updateLayerPositionsAfterScroll() previously unconditionally cleared clip
1342         rects, and recomputed repaint rects too often. Recomputing both of these
1343         can be very expensive, as they involve tree walks up to the root.
1344         
1345         We can optimize layer updates after document scrolling by only clearing clip
1346         rects, and recomputing repaint rects, if we encounter a fixed- or sticky-position
1347         element. For overflow scroll, we have to clear clip rects and recompute repaint rects.
1348
1349         * page/FrameView.cpp:
1350         (WebCore::FrameView::repaintFixedElementsAfterScrolling): Call updateLayerPositionsAfterDocumentScroll().
1351         * rendering/RenderLayer.cpp:
1352         (WebCore::RenderLayer::updateLayerPositions): Call clearClipRects() because
1353         updateLayerPosition() no longer does.
1354         (WebCore::RenderLayer::updateLayerPositionsAfterDocumentScroll): Version of updateLayerPositionsAfterScroll()
1355         that is for document scrolls. It has no need to push layers to the geometry map.
1356         (WebCore::RenderLayer::updateLayerPositionsAfterOverflowScroll): Pushes layers to the geometry map,
1357         and calls updateLayerPositionsAfterScroll() with the IsOverflowScroll flag.
1358         (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Set the HasChangedAncestor flag
1359         if our location changed, and use that as a hint to clear cached rects. Be more conservative
1360         than before about when to clear cached clip rects.
1361         (WebCore::RenderLayer::updateLayerPosition):  Move responsibility for calling
1362         clearClipRects() ouf of this function and into callers.
1363         (The one caller outside RenderLayer will be removed via bug 102624).
1364         Return a bool indicating whether our position changed.
1365         (WebCore::RenderLayer::scrollTo): Call updateLayerPositionsAfterOverflowScroll().
1366         (WebCore::RenderLayer::updateClipRects): Added some #ifdeffed out code that is useful
1367         to verify that cached clips are correct; it's too slow to leave enabled in debug builds.
1368         * rendering/RenderLayer.h:
1369         (WebCore::RenderLayer::setLocation): Change to take a LayoutPoint, rather than separate
1370         x and y.
1371
1372 2012-11-26  Rafael Brandao  <rafael.lobo@openbossa.org>
1373
1374         [Cairo] Surface should not be destroyed before its usage
1375         https://bugs.webkit.org/show_bug.cgi?id=103273
1376
1377         Reviewed by Brent Fulgham.
1378
1379         * platform/graphics/texmap/TextureMapperGL.cpp:
1380         (WebCore::TextureMapperGL::drawRepaintCounter): There's some calls to get
1381         the bits and stride from surface right after its destructions. It should
1382         be postponed to avoid annoying bugs.
1383
1384 2012-11-26  Julien Chaffraix  <jchaffraix@webkit.org>
1385
1386         RenderBox::computePercentageLogicalHeight should use containingBlockLogicalWidthForContent
1387         https://bugs.webkit.org/show_bug.cgi?id=103075
1388
1389         Reviewed by Ojan Vafai.
1390
1391         Using the containing block's content logical block was working for most renderers but 2 renderers
1392         were special and were broken in orthogonal writing modes:
1393         - captions as they override containingBlockLogicalWidthForContent to return the table's logical width.
1394         - multi-column renderers as they override availableLogicalWidth to constrain the child to the column logical width.
1395
1396         By switching to containingBlockLogicalWidthForContent, we got those 2 cases covered.
1397
1398         Tests: fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode.html
1399                fast/table/caption-orthogonal-writing-mode-sizing.html
1400
1401         * rendering/RenderBox.cpp:
1402         (WebCore::RenderBox::computePercentageLogicalHeight):
1403         Updated the function to track which renderer's containing block we use and call
1404         containingBlockLogicalWidthForContent on it.
1405
1406 2012-11-26  Abhishek Arya  <inferno@chromium.org>
1407
1408         Crash in Frame::dispatchVisibilityStateChangeEvent.
1409         https://bugs.webkit.org/show_bug.cgi?id=102053
1410
1411         Reviewed by Adam Barth.
1412
1413         Child frame can go away inside webkitvisibilitychange
1414         event handler. Store it in a ref counted vector.
1415
1416         Test: fast/frames/page-visibility-crash.html
1417
1418         * page/Frame.cpp:
1419         (WebCore::Frame::dispatchVisibilityStateChangeEvent):
1420
1421 2012-11-26  Hurnjoo Lee  <hurnjoo.lee@samsung.com>
1422
1423         [Cairo] fillRectWithColor with Color::transparent doesn't perform anything
1424         https://bugs.webkit.org/show_bug.cgi?id=101911
1425
1426         Reviewed by Kenneth Rohde Christiansen.
1427
1428         fillRectWithColor with Color::transparent doesn't perform anything
1429         because fillRectWithColor does early-return if the alpha value of
1430         color is zero. But we expect that fill the rect with transparent color
1431         in case the cairo_operator is CAIRO_OPERATOR_SOURCE.
1432
1433         Covered by existing tests.
1434
1435         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1436         (WebCore::fillRectWithColor):Add condition to prevent early-return if
1437         cairo_operator is not CAIRO_OPERATOR_OVER
1438
1439 2012-11-26  Jae Hyun Park  <jae.park@company100.net>
1440
1441         Remove redundant assignment in TextureMapperLayer::flushCompositingStateSelf
1442         https://bugs.webkit.org/show_bug.cgi?id=103233
1443
1444         Reviewed by Noam Rosenthal.
1445
1446         This patch removes redundant assignment in TextureMapperLayer::flushCompositingStateSelf.
1447
1448         No new tests, because no change in bahavior.
1449
1450         * platform/graphics/texmap/TextureMapperLayer.cpp:
1451         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
1452
1453 2012-11-26  Tamas Czene  <tczene@inf.u-szeged.hu>
1454
1455         OpenCL version of SourceAlpha, SourceGraphics and FETurbulence filter effects 
1456         https://bugs.webkit.org/show_bug.cgi?id=99829
1457
1458         Reviewed by Zoltan Herczeg.
1459
1460         This patch contains the OpenCL implementation of SourceAlpha, SourceGraphic, FETurbulence and a simple OpenCL environment. 
1461         At the moment only the Qt build system is supported 
1462         ~3x speed-up (depending on hardware configuration)
1463
1464         * Target.pri:
1465         * WebCore.pri:
1466         * platform/graphics/filters/FETurbulence.h: Added platformApplyOpenCL() virtual function.
1467         (FETurbulence):
1468         * platform/graphics/filters/FilterEffect.cpp: Added platform specific apply.
1469         (WebCore::FilterEffect::apply):
1470         (WebCore):
1471         (WebCore::FilterEffect::platformApplyOpenCL): A function to use software computing if a filter is not implemented on OpenCL. It will be deleted after all of the filters are implemented.
1472         (WebCore::FilterEffect::clearResult):
1473         (WebCore::FilterEffect::asImageBuffer):
1474         (WebCore::FilterEffect::openCLImageToImageBuffer): Gets the result of the filter from the OpenCL device and converts it to ImageBuffer type.
1475         (WebCore::FilterEffect::createOpenCLImageResult): Allocates memory on OpenCL device and if it gets an image as a parameter, it uploads the image to the OpenCL device.
1476         (WebCore::FilterEffect::transformResultColorSpace): 
1477         * platform/graphics/filters/FilterEffect.h:
1478         (FilterEffect):
1479         (WebCore::FilterEffect::openCLImage):
1480         (WebCore::FilterEffect::setOpenCLImage):
1481         (WebCore::FilterEffect::hasResult):
1482         * platform/graphics/filters/SourceAlpha.h:
1483         (SourceAlpha):
1484         * platform/graphics/filters/SourceGraphic.h:
1485         (SourceGraphic):
1486         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp: Added.
1487         (WebCore):
1488         (WebCore::FilterContextOpenCL::context): Configures the OpenCL environment.
1489         (WebCore::FilterContextOpenCL::createOpenCLImage): Allocates memory on OpenCL device.
1490         (WebCore::FilterContextOpenCL::openCLTransformColorSpace): OpenCL implementation of transformColorSpace.
1491         (WebCore::FilterContextOpenCL::compileProgram):
1492         * platform/graphics/gpu/opencl/FilterContextOpenCL.h: Added.
1493         (WebCore):
1494         (FilterContextOpenCL):
1495         (WebCore::FilterContextOpenCL::deviceId):
1496         (WebCore::FilterContextOpenCL::deviceContext):
1497         (WebCore::FilterContextOpenCL::commandQueue):
1498         (RunKernel):
1499         (WebCore::FilterContextOpenCL::RunKernel::RunKernel):
1500         (WebCore::FilterContextOpenCL::RunKernel::addArgument):
1501         (WebCore::FilterContextOpenCL::RunKernel::run):
1502         (WebCore::FilterContextOpenCL::kernelByName): Returns the reference of a function in the OpenCL program.
1503         * platform/graphics/gpu/opencl/OpenCLFESourceAlpha.cpp: Added.
1504         (WebCore):
1505         (WebCore::SourceAlpha::platformApplyOpenCL):
1506         * platform/graphics/gpu/opencl/OpenCLFESourceGraphic.cpp: Added.
1507         (WebCore):
1508         (WebCore::SourceGraphic::platformApplyOpenCL):
1509         * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp: Added.
1510         (WebCore):
1511         (WebCore::FilterContextOpenCL::compileFETurbulence):
1512         (WebCore::FilterContextOpenCL::applyFETurbulence):
1513         (WebCore::FETurbulence::platformApplyOpenCL):
1514         * platform/graphics/gpu/opencl/OpenCLHandle.h: Added.
1515         (WebCore):
1516         (OpenCLHandle):
1517         (WebCore::OpenCLHandle::OpenCLHandle):
1518         (WebCore::OpenCLHandle::operator cl_mem):
1519         (WebCore::OpenCLHandle::operator=):
1520         (WebCore::OpenCLHandle::operator UnspecifiedBoolType):
1521         (WebCore::OpenCLHandle::handleAddress):
1522         (WebCore::OpenCLHandle::clear):
1523
1524 2012-11-26  'Pavel Feldman'  <pfeldman@chromium.org>
1525
1526         Not reviewed: follow up for r135720, fixing node highlight.
1527
1528         * inspector/InspectorOverlayPage.html:
1529
1530 2012-11-26  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
1531
1532         [EFL] Crashes in compositing layout tests with AC on.
1533         https://bugs.webkit.org/show_bug.cgi?id=103144
1534
1535         Reviewed by Noam Rosenthal.
1536
1537         Application could leave texture packing parameters in non-zero state before
1538         texture mapper drawing/texture uploading. To avoid crash texture upload should
1539         specify packing parameters before each texture upload if packing is supported.
1540
1541         Covered by existing tests.
1542
1543         * platform/graphics/texmap/TextureMapperGL.cpp:
1544         (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
1545
1546 2012-11-26  George Staikos  <staikos@webkit.org>
1547
1548         [BlackBerry] Remove a lot of unnecessary and incorrect code causing crashes
1549         https://bugs.webkit.org/show_bug.cgi?id=103199
1550
1551         Reviewed by Yong Li.
1552
1553         This is the first big step to unforking this code.  It's very close to
1554         where it needs to be now, but the first step is to get rid of the
1555         crashes by deleting code that isn't needed and makes bad assumptions
1556         about object lifetime.  Crashes were found by automation without
1557         test case or reproduction steps.
1558
1559         * loader/blackberry/CookieJarBlackBerry.cpp:
1560         (WebCore::cookies): delete most code
1561         (WebCore::setCookies): delete most code
1562
1563 2012-11-26  Thiago Marcos P. Santos  <thiago.santos@intel.com>
1564
1565         Viewport CSS rules should not clamp values like Viewport META
1566         https://bugs.webkit.org/show_bug.cgi?id=103068
1567
1568         Reviewed by Kenneth Rohde Christiansen.
1569
1570         CSS Device Adaption does not clamp the length and zoom values the
1571         same way as the Viewport META. In fact, they are not clamped at all,
1572         but instead, we just make sure that length values are at least 1px.
1573
1574         Tests: css3/device-adapt/opera/constrain-018.xhtml
1575                css3/device-adapt/opera/constrain-019.xhtml
1576                css3/device-adapt/opera/constrain-023.xhtml
1577                css3/device-adapt/opera/constrain-024.xhtml
1578
1579         * dom/ViewportArguments.cpp:
1580         (WebCore::ViewportArguments::resolve):
1581
1582 2012-11-26  Mike West  <mkwst@chromium.org>
1583
1584         Web Inspector: URLs containing '^' are improperly linked in console messages.
1585         https://bugs.webkit.org/show_bug.cgi?id=103248
1586
1587         Reviewed by Yury Semikhatsky.
1588
1589         This patch adds '^' to WebInspector's regex of acceptable characters for
1590         URLs that it knows how to display.
1591
1592         Test: http/tests/inspector/network/script-as-text-loading-with-caret.html
1593
1594         * inspector/front-end/ResourceUtils.js:
1595         (WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
1596
1597 2012-11-26  Yury Semikhatsky  <yurys@chromium.org>
1598
1599         Unreviewed. Fix Qt minimal compilation after r135713.
1600
1601         * inspector/InspectorController.h: hid file content behind ENABLE(INSPECTOR)
1602
1603 2012-11-26  Pavel Feldman  <pfeldman@chromium.org>
1604
1605         Web Inspector: object preview does not render node id, className; logs too many functions for jQuery.
1606         https://bugs.webkit.org/show_bug.cgi?id=103222
1607
1608         Reviewed by Yury Semikhatsky.
1609
1610         - Added node class name and id into the preview
1611         - Now keeps track of properties separately from array indexes.
1612
1613         * inspector/InjectedScriptSource.js:
1614         (.):
1615         * inspector/InspectorOverlayPage.html:
1616         * inspector/front-end/ConsoleMessage.js:
1617         (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
1618         (WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreview):
1619
1620 2012-11-26  Florin Malita  <fmalita@chromium.org>
1621
1622         RenderSVGResourceContainer does not clear cached data on removal
1623         https://bugs.webkit.org/show_bug.cgi?id=102620
1624
1625         Reviewed by Dirk Schulze.
1626
1627         RenderSVGResourceContainer::removeClient needs to also remove the client from specialized
1628         caches, otherwise we can end up with stale references.
1629
1630         Test: svg/custom/stale-resource-data-crash.svg
1631
1632         * rendering/svg/RenderSVGResourceContainer.cpp:
1633         (WebCore::RenderSVGResourceContainer::removeClient):
1634
1635 2012-11-26  'Pavel Feldman'  <pfeldman@chromium.org>
1636
1637         Not reviewed: rolling out r135714 and r135712 for breaking debug tests.
1638
1639         * inspector/InjectedScriptSource.js:
1640         (.):
1641         * inspector/InspectorOverlayPage.html:
1642         * inspector/front-end/ConsoleMessage.js:
1643         (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
1644
1645 2012-11-26  Zeno Albisser  <zeno@webkit.org>
1646
1647         [Qt][Win] buildfix after r135706.
1648         https://bugs.webkit.org/show_bug.cgi?id=103249
1649
1650         The Windows implementation of GraphicsSurface cannot use
1651         m_size anymore, as this member has been removed.
1652         Further it needs to implement a platformSize() function.
1653
1654         Reviewed by Kenneth Rohde Christiansen.
1655
1656         * platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:
1657         (WebCore::GraphicsSurfacePrivate::size):
1658         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
1659         (WebCore::GraphicsSurface::platformSize):
1660         (WebCore):
1661
1662 2012-11-26  Yury Semikhatsky  <yurys@chromium.org>
1663
1664         Web Inspector: unify agents handling in Page and Worker inspector controllers
1665         https://bugs.webkit.org/show_bug.cgi?id=103238
1666
1667         Reviewed by Alexander Pavlov.
1668
1669         Introduced a class that represents a collection of inspector agents and allows
1670         to call methods declared on InspectorAgentBaseInterface for all registered agents.
1671         InspectorController and WorkerInspectorController switched to this class.
1672
1673         * inspector/InspectorBaseAgent.cpp:
1674         (WebCore::InspectorAgentRegistry::append):
1675         (WebCore):
1676         (WebCore::InspectorAgentRegistry::setFrontend):
1677         (WebCore::InspectorAgentRegistry::clearFrontend):
1678         (WebCore::InspectorAgentRegistry::restore):
1679         (WebCore::InspectorAgentRegistry::registerInDispatcher):
1680         (WebCore::InspectorAgentRegistry::discardAgents):
1681         * inspector/InspectorBaseAgent.h:
1682         (InspectorAgentRegistry):
1683         (WebCore):
1684         * inspector/InspectorController.cpp:
1685         (WebCore::InspectorController::~InspectorController):
1686         (WebCore::InspectorController::connectFrontend):
1687         (WebCore::InspectorController::disconnectFrontend):
1688         (WebCore::InspectorController::reconnectFrontend):
1689         * inspector/InspectorController.h:
1690         (InspectorController):
1691
1692 2012-11-26  Pavel Feldman  <pfeldman@chromium.org>
1693
1694         Web Inspector: object preview does not render node id, className; logs too many functions for jQuery.
1695         https://bugs.webkit.org/show_bug.cgi?id=103222
1696
1697         Reviewed by Yury Semikhatsky.
1698
1699         - Added node class name and id into the preview
1700         - Now keeps track of properties separately from array indexes.
1701
1702         * inspector/InjectedScriptSource.js:
1703         (.):
1704         * inspector/InspectorOverlayPage.html:
1705         * inspector/front-end/ConsoleMessage.js:
1706         (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
1707         (WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreview):
1708
1709 2012-11-26  Andrey Adaikin  <aandrey@chromium.org>
1710
1711         Web Inspector: [WebGL] Save WebGL extensions and restore on replay
1712         https://bugs.webkit.org/show_bug.cgi?id=103141
1713
1714         Reviewed by Yury Semikhatsky.
1715
1716         Save WebGL extensions that were enabled by the application, and restore it before the replay.
1717         Drive-by: remove redundant if- checks in WebGL custom function wrappers (similar to 2D canvas).
1718
1719         * inspector/InjectedScriptCanvasModuleSource.js:
1720         (.):
1721
1722 2012-11-26  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1723
1724         HitTestResult should not be a HitTestLocation
1725         https://bugs.webkit.org/show_bug.cgi?id=101590
1726
1727         Reviewed by Sam Weinig.
1728
1729         Change HitTestResult from being a HitTestLocation to having a HitTestLocation. 
1730         A result of a test should not be a special case of the location of the test.
1731
1732         No change in functionality. No new tests.
1733
1734         * rendering/HitTestResult.cpp:
1735         (WebCore::HitTestResult::HitTestResult):
1736         (WebCore::HitTestResult::operator=):
1737         (WebCore::HitTestResult::isSelected):
1738         (WebCore::HitTestResult::spellingToolTip):
1739         (WebCore::HitTestResult::replacedString):
1740         * rendering/HitTestResult.h:
1741         (WebCore::HitTestResult::isRectBasedTest):
1742         (WebCore::HitTestResult::pointInInnerNodeFrame):
1743         (WebCore::HitTestResult::hitTestLocation):
1744         (HitTestResult):
1745
1746 2012-11-26  Marja Hölttä  <marja@chromium.org>
1747
1748         Circular reference between Document and MediaQueryMatcher.
1749         https://bugs.webkit.org/show_bug.cgi?id=103242
1750
1751         Reviewed by Kenneth Rohde Christiansen.
1752
1753         It's not enough to clean up listeners in MediaQueryMatcher in ~Document,
1754         since MediaQueryListListener keeps the Document alive. This caused
1755         www.crbug.com/113983.
1756
1757         No new tests: No visible change in behavior (except that it doesn't leak memory).
1758
1759         * dom/Document.cpp:
1760         (WebCore::Document::~Document):
1761         (WebCore::Document::detach):
1762
1763 2012-11-26  Eugene Klyuchnikov  <eustas@chromium.org>
1764
1765         Web Inspector: HeapProfiler: remove snapshotView reference from data-grids.
1766         https://bugs.webkit.org/show_bug.cgi?id=103240
1767
1768         Reviewed by Yury Semikhatsky.
1769
1770         Cleanup: remove redundant dependency.
1771
1772         * inspector/front-end/HeapSnapshotDataGrids.js: Do not store view ref.
1773         * inspector/front-end/HeapSnapshotGridNodes.js:
1774         Removed unused assignments.
1775         * inspector/front-end/HeapSnapshotView.js:
1776         Do not pass self to data-grids.
1777
1778 2012-11-26  Zeno Albisser  <zeno@webkit.org>
1779
1780         GraphicsSurface should only store its size in a single place.
1781         https://bugs.webkit.org/show_bug.cgi?id=103143
1782
1783         Reviewed by Kenneth Rohde Christiansen.
1784
1785         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1786         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1787             Cosmetics only.
1788         * platform/graphics/surfaces/GraphicsSurface.cpp:
1789         (WebCore::GraphicsSurface::size):
1790             Return the size as received from the platform abstraction.
1791         (WebCore):
1792         (WebCore::GraphicsSurface::GraphicsSurface):
1793         * platform/graphics/surfaces/GraphicsSurface.h:
1794         (GraphicsSurface):
1795             Remove data member m_size.
1796         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1797         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1798             Always take the size of the GraphicsSurface as an argument.
1799         (WebCore::GraphicsSurfacePrivate::size):
1800         (GraphicsSurfacePrivate):
1801         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
1802             Retrieve the size from GraphicsSurfacePrivate where necessary.
1803         (WebCore::GraphicsSurface::platformSize):
1804         (WebCore):
1805         (WebCore::GraphicsSurface::platformImport):
1806         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
1807         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1808             Add a constructor that takes a window id as an argument
1809             for the receiving side of the GraphcisSurface.
1810             The GraphicsSurface can then determine its dimensions
1811             from the provided XWindow.
1812         (WebCore::GraphicsSurfacePrivate::createPixmap):
1813         (WebCore::GraphicsSurfacePrivate::size):
1814             Query the size of the GraphicsSurface backing from X.
1815         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
1816             Retrieve the size from GraphicsSurfacePrivate where necessary.
1817         (WebCore::GraphicsSurface::platformSize):
1818         (WebCore):
1819         (WebCore::GraphicsSurface::platformImport):
1820
1821 2012-11-26  Thiago Santos  <thiago.sousa.santos@collabora.com>
1822
1823         [GStreamer] Floating reference handling fix
1824         https://bugs.webkit.org/show_bug.cgi?id=101349
1825
1826         Reviewed by Philippe Normand.
1827
1828         GStreamer 0.10 and 1.0 differ when creating GstGhostPad from pad
1829         templates, the 1.0 doesn't take ownership on the passed
1830         GstPadTemplate, while 0.10 does. So this patch adds a
1831         GStreamerVersioning function to handle this different approach
1832         transparently in Webkit gstreamer elements.
1833
1834         Existing media tests cover this change.
1835
1836         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1837         (webkit_web_audio_src_init):
1838         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
1839         (webkitGstGhostPadFromStaticTemplate):
1840         * platform/graphics/gstreamer/GStreamerVersioning.h:
1841         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1842         (webkit_web_src_init):
1843
1844 2012-11-26  Kentaro Hara  <haraken@chromium.org>
1845
1846         [V8] Remove WorkerContextExecutionProxy
1847         https://bugs.webkit.org/show_bug.cgi?id=103210
1848
1849         Reviewed by Adam Barth.
1850
1851         This patch moves all methods in WorkerContextExecutionProxy
1852         to WorkerScriptController.
1853
1854         Due to the dependency between WorkerContextExecutionProxy's methods,
1855         it is a bit difficult to split this patch into pieces.
1856         This patch simply moves methods without changing their logic.
1857         Also this patch doesn't remove empty WorkerContextExecutionProxy.{h,cpp}
1858         to keep the diff sane. I will address these issues in a follow-up patch.
1859
1860         Tests: fast/worker/*
1861
1862         * bindings/v8/ScriptState.cpp:
1863         (WebCore::scriptStateFromWorkerContext):
1864         * bindings/v8/V8Binding.cpp:
1865         (WebCore::toV8Context):
1866         * bindings/v8/V8WorkerContextEventListener.cpp:
1867         (WebCore::V8WorkerContextEventListener::handleEvent):
1868         * bindings/v8/WorkerContextExecutionProxy.cpp:
1869         * bindings/v8/WorkerContextExecutionProxy.h:
1870         * bindings/v8/WorkerScriptController.cpp:
1871         (WebCore::WorkerScriptController::WorkerScriptController):
1872         (WebCore::WorkerScriptController::~WorkerScriptController):
1873         (WebCore::WorkerScriptController::dispose):
1874         (WebCore):
1875         (WebCore::WorkerScriptController::initializeIfNeeded):
1876         (WebCore::WorkerScriptController::evaluate):
1877         (WebCore::WorkerScriptController::setEvalAllowed):
1878         (WebCore::WorkerScriptController::disableEval):
1879         * bindings/v8/WorkerScriptController.h:
1880         (WebCore):
1881         (WebCore::WorkerContextExecutionState::WorkerContextExecutionState):
1882         (WorkerContextExecutionState):
1883         (WorkerScriptController):
1884         (WebCore::WorkerScriptController::context):
1885         * bindings/v8/WorkerScriptDebugServer.cpp:
1886         (WebCore::WorkerScriptDebugServer::addListener):
1887         * bindings/v8/custom/V8WorkerContextCustom.cpp:
1888         (WebCore::SetTimeoutOrInterval):
1889         (WebCore::toV8):
1890
1891 2012-11-26  Hajime Morrita  <morrita@google.com>
1892
1893         [Refactoring] Some Node::isDescendant calls can be replaced with Node::contains()
1894         https://bugs.webkit.org/show_bug.cgi?id=103211
1895
1896         Reviewed by Daniel Bates.
1897
1898         A couple of call sites of isDescendant() does same as Node::contains().
1899         This change replaces these locations with Node::contains().
1900
1901         No new tests, no behavior change.
1902
1903         * dom/Node.cpp:
1904         (WebCore::checkAcceptChild):
1905         * dom/Range.cpp:
1906         (WebCore::Range::surroundContents):
1907
1908 2012-11-26  Kunihiko Sakamoto  <ksakamoto@chromium.org>
1909
1910         [Chromium] Enable input type datetime-local
1911         https://bugs.webkit.org/show_bug.cgi?id=103213
1912
1913         Reviewed by Kent Tamura.
1914
1915         This patch enables <input type=datetime-local> for Chromium.
1916
1917         No new tests. Covered by existing tests.
1918
1919         * bindings/generic/RuntimeEnabledFeatures.cpp:
1920         (WebCore): Changed RuntimeEnabledFeatures::isInputTypeDateTimeLocalEnabled to true
1921         if INPUT_TYPE_DATETIMELOCAL is enabled.
1922
1923 2012-11-26  Hajime Morrita  <morrita@google.com>
1924
1925         [Shadow DOM] Implement Element::createShadowRoot()
1926         https://bugs.webkit.org/show_bug.cgi?id=102911
1927
1928         Reviewed by Kentaro Hara.
1929
1930         Added an API implementation and exposed it.
1931
1932         This is basically an alias of the ShadowRoot constructor, which
1933         will be removed as bug 102913.
1934
1935         Test: fast/dom/shadow/shadow-aware-create-shdow-root.html
1936
1937         * bindings/gobject/GNUmakefile.am:
1938         * dom/Element.cpp:
1939         (WebCore::Element::createShadowRoot):
1940         (WebCore):
1941         * dom/Element.h:
1942         (Element):
1943         * dom/Element.idl:
1944
1945 2012-11-26  Jon Lee  <jonlee@apple.com>
1946
1947         Extend EventDispatcher::dispatchSimulatedClick to allow sending a mouseover event
1948         https://bugs.webkit.org/show_bug.cgi?id=102610
1949         <rdar://problem/12725663>
1950
1951         Reviewed by Darin Adler.
1952
1953         Update the dispatchSimulatedClick() to take option enums for dispatching events.
1954
1955         * dom/SimulatedClickOptions.h: Added. Define two options enums. One tracks which mouse
1956         events to send. The other determines whether to force the element to repaint.
1957
1958         * dom/EventDispatcher.cpp:
1959         (WebCore::EventDispatcher::dispatchSimulatedClick): Refactor to use the option enums.
1960         * dom/EventDispatcher.h:
1961         (EventDispatcher): Update function signature.
1962
1963         * dom/Node.cpp: Refactor parameters to use the options enums rather than booleans.
1964         (WebCore::Node::dispatchSimulatedClick):
1965         * dom/Node.h:
1966
1967         Refactor. Remove redundant comments.
1968         * html/BaseCheckableInputType.cpp:
1969         (WebCore::BaseCheckableInputType::accessKeyAction):
1970         * html/BaseClickableWithKeyInputType.cpp:
1971         (WebCore::BaseClickableWithKeyInputType::accessKeyAction):
1972         * html/HTMLAnchorElement.cpp:
1973         (WebCore::HTMLAnchorElement::accessKeyAction):
1974         * html/HTMLButtonElement.cpp:
1975         (WebCore::HTMLButtonElement::accessKeyAction):
1976         * html/HTMLElement.cpp:
1977         (WebCore::HTMLElement::click):
1978         (WebCore::HTMLElement::accessKeyAction):
1979         * html/HTMLSelectElement.cpp:
1980         (WebCore::HTMLSelectElement::accessKeyAction):
1981         * html/RadioInputType.cpp:
1982         (WebCore::RadioInputType::handleKeydownEvent):
1983         * html/RangeInputType.cpp:
1984         (WebCore::RangeInputType::accessKeyAction):
1985
1986         Add SimulatedClickOptions.h.
1987         * GNUmakefile.list.am:
1988         * Target.pri:
1989         * WebCore.gypi:
1990         * WebCore.vcproj/WebCore.vcproj:
1991         * WebCore.xcodeproj/project.pbxproj:
1992
1993 2012-11-26  Shinya Kawanaka  <shinyak@chromium.org>
1994
1995         [Shadow] Attaching children of a shadow host takes O(N^2) where N is the number of host children
1996         https://bugs.webkit.org/show_bug.cgi?id=103017
1997
1998         Reviewed by Hajime Morita.
1999
2000         Since ContentDistribution was just a Vector, ContentDistribution::find() took O(N). Each child of shadow host calls it.
2001         As a result, attaching children of shadow host takes O(N^2) at all.
2002
2003         In this patch, we make ContentDistribution::find() O(1) amortizedly. We introduce HashMap from a Node to Vector index,
2004         and use it for ContentDistribution::find().
2005
2006         No new tests, covered by existing tests.
2007
2008         * html/shadow/ContentDistributor.cpp:
2009         (WebCore::ContentDistribution::swap):
2010         (WebCore):
2011         (WebCore::ContentDistribution::append):
2012         (WebCore::ContentDistribution::find):
2013         (WebCore::ContentDistributor::distributeSelectionsTo):
2014         * html/shadow/ContentDistributor.h:
2015         (ContentDistribution): ContentDistribution now contains Vector and a reverse map.
2016         (WebCore::ContentDistribution::first):
2017         (WebCore::ContentDistribution::last):
2018         (WebCore::ContentDistribution::at):
2019         (WebCore::ContentDistribution::size):
2020         (WebCore::ContentDistribution::isEmpty):
2021         (WebCore::ContentDistribution::clear):
2022         (WebCore::ContentDistribution::contains):
2023         (WebCore::ContentDistribution::nodes):
2024
2025 2012-11-26  Dan Carney  <dcarney@google.com>
2026
2027         [V8] Give isolated shells a lifecycle like that of main shells
2028         https://bugs.webkit.org/show_bug.cgi?id=96522
2029
2030         Reviewed by Adam Barth.
2031
2032         Refactored the isolated shells in ScriptController
2033         to be cleaned up the same way the main shell is.
2034
2035         No new tests. No change in functionality.
2036
2037         * bindings/v8/ScriptController.cpp:
2038         (WebCore::ScriptController::~ScriptController):
2039         (WebCore::ScriptController::clearForOutOfMemory):
2040         (WebCore::ScriptController::clearForClose):
2041         (WebCore::ScriptController::clearWindowShell):
2042         * bindings/v8/ScriptController.h:
2043         (ScriptController):
2044         * bindings/v8/V8DOMWindowShell.cpp:
2045         (WebCore::V8DOMWindowShell::destroyIsolatedShell):
2046         (WebCore::V8DOMWindowShell::clearForClose):
2047         * bindings/v8/V8DOMWindowShell.h:
2048         (V8DOMWindowShell):
2049
2050 2012-11-25  Sheriff Bot  <webkit.review.bot@gmail.com>
2051
2052         Unreviewed, rolling out r135656.
2053         http://trac.webkit.org/changeset/135656
2054         https://bugs.webkit.org/show_bug.cgi?id=103218
2055
2056         Made a few SVG tests crash on all platforms (Requested by
2057         apavlov on #webkit).
2058
2059         * css/CSSComputedStyleDeclaration.cpp:
2060         (WebCore::valueForFamily):
2061         * css/CSSValuePool.cpp:
2062         (WebCore::CSSValuePool::createFontFamilyValue):
2063
2064 2012-11-25  Takashi Sakamoto  <tasak@google.com>
2065
2066         WebCore::RenderBlock::determineStartPosition crash
2067         https://bugs.webkit.org/show_bug.cgi?id=98993
2068
2069         Reviewed by Brent Fulgham.
2070
2071         If we move some node and the node has some text,
2072         InlineFlowBox::removeChild() is invoked. The method invokes
2073         RootInlineBox::childRemoved(). childRemoved() checks whether the
2074         removed inlinebox has the renderer of its parent's line break object.
2075         If so, use setLineBreakInfo to make the parent's line break info to
2076         be 0. However in RenderBlock::determineStartPosition(), the code
2077         assume that all line break info is solved, i.e.
2078         prevRootBox->lineBreakObj()->isText(). Since lineBreakObj() returns 0
2079         because of removeChild(), determineStartPosition crash occurs.
2080
2081         Test: fast/inline/inline-box-append-child-crash.html
2082
2083         * rendering/RenderBlockLineLayout.cpp:
2084         (WebCore::RenderBlock::determineStartPosition):
2085         Checks whether lineBreakObj() is 0 or not before using lineBreakObj().
2086
2087 2012-11-25  Nikita Vasilyev  <me@elv1s.ru>
2088
2089         Web Inspector: use native Element.prototype.normalize instead of custom defined Element.prototype.pruneEmptyTextNodes
2090         https://bugs.webkit.org/show_bug.cgi?id=103205
2091
2092         Reviewed by Pavel Feldman.
2093
2094         * inspector/front-end/DOMExtension.js:
2095         * inspector/front-end/TextPrompt.js:
2096         (WebInspector.TextPrompt.prototype.clearAutoComplete):
2097         (WebInspector.TextPrompt.prototype._completionsReady):
2098         (WebInspector.TextPrompt.prototype.applySuggestion):
2099
2100 2012-11-25  Nikita Vasilyev  <me@elv1s.ru>
2101
2102         Web Inspector: remove unused DOM methods
2103         https://bugs.webkit.org/show_bug.cgi?id=103204
2104
2105         Reviewed by Pavel Feldman.
2106
2107         * inspector/front-end/DOMExtension.js:
2108
2109 2012-11-25  Nikita Vasilyev  <me@elv1s.ru>
2110
2111         Web Inspector: Remove unused Array.convert method
2112         https://bugs.webkit.org/show_bug.cgi?id=103202
2113
2114         Reviewed by Daniel Bates.
2115
2116         * inspector/front-end/utilities.js:
2117
2118 2012-11-25  Chris Fleizach  <cfleizach@apple.com>
2119
2120         AX: file upload input cannot be activated with VoiceOver
2121         https://bugs.webkit.org/show_bug.cgi?id=100343
2122
2123         Reviewed by Sam Weinig.
2124
2125         Simulated events were not allowed to be processed in the file input type in the DOMActivate handler.
2126         This was a problem for accessibility clients which rely on simulated events.
2127
2128         The solution is to mark the UserGestureIndicator as definitely processing an event.
2129
2130         Test: accessibility/file-upload-button-with-axpress.html
2131
2132         * accessibility/AccessibilityObject.cpp:
2133         (WebCore::AccessibilityObject::press):
2134
2135 2012-11-25  Nikita Vasilyev  <me@elv1s.ru>
2136
2137         Web Inspector: dispatch an event upon heap snapshot filter change
2138         https://bugs.webkit.org/show_bug.cgi?id=103201
2139
2140         Reviewed by Pavel Feldman.
2141
2142         Dispatch heapSnapshotFilterChanged event so it can be received by third parties.
2143
2144         * inspector/front-end/HeapSnapshotView.js:
2145         (WebInspector.HeapSnapshotView.prototype._changeFilter):
2146         * inspector/front-end/UserMetrics.js:
2147
2148 2012-11-25  Kent Tamura  <tkent@chromium.org>
2149
2150         Refactoring: Move the content of HTMLInputElement::subtreeHasChanged to TextFieldInputType
2151         https://bugs.webkit.org/show_bug.cgi?id=103195
2152
2153         Reviewed by Kentaro Hara.
2154
2155         HTMLInputElement::subtreeHasChanged is called only if the input is
2156         a text field. The code should be moved to TextFieldInputType.
2157
2158         No new tests. This should not change any behavior.
2159
2160         * html/HTMLInputElement.cpp:
2161         - Remove unnecessary NumberInputType.h inclusion.
2162         - Remove convertFromVisibleValue. It was used only by subtreeHasChanged.
2163         (WebCore::HTMLInputElement::subtreeHasChanged):
2164         Move the code to TextFieldInputType::subtreeHasChanged except
2165         calculateAndAdjustDirectionality, which is a protected member of
2166         HTMLElement.
2167         * html/HTMLInputElement.h:
2168         (HTMLInputElement): Remove convertFromVisibleValue.
2169
2170         * html/InputType.cpp:
2171         Move convertFromVisibleValue to TextFieldInputType.
2172         (WebCore::InputType::subtreeHasChanged):
2173         Add ASSERT_NOT_REACHED.
2174         * html/InputType.h:
2175         (InputType): Remove convertFromVisibleValue.
2176
2177         * html/TextFieldInputType.cpp:
2178         (WebCore::TextFieldInputType::convertFromVisibleValue):
2179         Moved from InputType.
2180         (WebCore::TextFieldInputType::subtreeHasChanged):
2181         Moved from HTMLInputElement. A latter part is moved to
2182         didSetValueByUserEdit to be hooked by SearchInputType.
2183         (WebCore::TextFieldInputType::didSetValueByUserEdit):
2184         Moved from HTMLInputElement::subtreeHasChanged, and clean up the code.
2185         * html/TextFieldInputType.h:
2186         (TextFieldInputType):
2187         - Move convertFromVisibleValue from InputType.
2188         - Add didSetValueByUserEdit and subtreeHasChanged.
2189
2190         * html/SearchInputType.cpp:
2191         (WebCore::SearchInputType::didSetValueByUserEdit):
2192         Renamed from subtreeHasChanged, and calls TextFieldInputType::didSetValueByUserEdit.
2193         * html/SearchInputType.h:
2194         (SearchInputType): Rename subtreeHasChanged to didSetValueByUserEdit.
2195
2196 2012-11-22  Kentaro Hara  <haraken@chromium.org>
2197
2198         [V8] Move WorkerExecutionContextProxy::initializeIfNeeded() to V8Initializer
2199         https://bugs.webkit.org/show_bug.cgi?id=103061
2200
2201         Reviewed by Adam Barth.
2202
2203         This is an incremental step to remove WorkerExecutionContextProxy.
2204         This patch moves WorkerExecutionContextProxy::initializeIfNeeded() to V8Initializer.
2205         This patch also renames methods so that the names become consistent
2206         between the main thread and workers.
2207
2208         No tests. No change in behavior.
2209
2210         * bindings/v8/V8Initializer.cpp:
2211         (WebCore::reportFatalErrorInMainThread):
2212         (WebCore::messageHandlerInMainThread):
2213         (WebCore::failedAccessCheckCallbackInMainThread):
2214         (WebCore::V8Initializer::initializeMainThreadIfNeeded):
2215         (WebCore::reportFatalErrorInWorker):
2216         (WebCore):
2217         (WebCore::messageHandlerInWorker):
2218         (WebCore::V8Initializer::initializeWorkerIfNeeded):
2219         * bindings/v8/V8Initializer.h:
2220         (V8Initializer):
2221         * bindings/v8/WorkerContextExecutionProxy.cpp:
2222         (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
2223         * bindings/v8/WorkerContextExecutionProxy.h:
2224         (WorkerContextExecutionProxy):
2225
2226 2012-11-25  Christophe Dumez  <christophe.dumez@intel.com>
2227
2228         [EFL] Refactor RenderThemeEfl::ThemePartCacheEntry::reuse()
2229         https://bugs.webkit.org/show_bug.cgi?id=103189
2230
2231         Reviewed by Kenneth Rohde Christiansen.
2232
2233         Check if the entry size and type changed in
2234         RenderThemeEfl::ThemePartCacheEntry::reuse() to avoid
2235         useless processing if one of them did not change.
2236
2237         Remove useless call to cairo_surface_finish() since
2238         we are using a smart pointer for the surface.
2239
2240         Resize the edge object *after* loading its content
2241         from the theme file as it seems more logical this
2242         way.
2243
2244         No new tests, no behavior change for layout tests.
2245
2246         * platform/efl/RenderThemeEfl.cpp:
2247         (WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
2248         * platform/efl/RenderThemeEfl.h:
2249         (ThemePartCacheEntry):
2250
2251 2012-11-25  Ryosuke Niwa  <rniwa@webkit.org>
2252
2253         Rename DynamicNodeList to LiveNodeList
2254         https://bugs.webkit.org/show_bug.cgi?id=103197
2255
2256         Reviewed by Ojan Vafai.
2257
2258         Rename DynamicNodeList to LiveNodeList to match the terminology used in DOM4 working draft:
2259         http://www.w3.org/TR/2012/WD-dom-20120405/#concept-collection-live
2260         "A collection (either NodeList or HTMLCollection) can be either live or static".
2261
2262         Also rename DynamicNodeListCacheBase to LiveNodeListBase, and merge DynamicSubtreeNodeList
2263         into LiveNodeList (old DynamicNodeList) now that the only difference between those two classes
2264         is the former calling registerNodeListCache and unregisterNodeListCache on Document.
2265
2266         This patch completes the series of simplification of NodeList/HTMLCollection classes.
2267
2268         * CMakeLists.txt:
2269         * GNUmakefile.list.am:
2270         * Target.pri:
2271         * WebCore.gypi:
2272         * WebCore.xcodeproj/project.pbxproj:
2273         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2274         (WebCore::getNamedItems):
2275         * bindings/js/JSNodeListCustom.cpp:
2276         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
2277         * bindings/v8/custom/V8NodeListCustom.cpp:
2278         (WebCore::V8NodeList::opaqueRootForGC):
2279         * dom/ChildNodeList.cpp:
2280         (WebCore::ChildNodeList::ChildNodeList):
2281         (WebCore::ChildNodeList::nodeMatches):
2282         * dom/ChildNodeList.h:
2283         * dom/ClassNodeList.cpp:
2284         (WebCore::ClassNodeList::ClassNodeList):
2285         * dom/ClassNodeList.h:
2286         * dom/DOMAllInOne.cpp:
2287         * dom/Document.cpp:
2288         (WebCore::Document::registerNodeListCache):
2289         (WebCore::Document::unregisterNodeListCache):
2290         (WebCore):
2291         * dom/Document.h:
2292         (WebCore):
2293         (Document):
2294         * dom/DynamicNodeList.cpp: Removed.
2295         * dom/DynamicNodeList.h: Removed.
2296         * dom/LiveNodeList.cpp: Copied from Source/WebCore/dom/DynamicNodeList.cpp.
2297         (WebCore::LiveNodeListBase::rootNode):
2298         (WebCore::LiveNodeListBase::invalidateCache):
2299         (WebCore::LiveNodeListBase::invalidateIdNameCacheMaps):
2300         (WebCore::LiveNodeListBase::reportMemoryUsage):
2301         (WebCore::LiveNodeList::namedItem):
2302         * dom/LiveNodeList.h: Copied from Source/WebCore/dom/DynamicNodeList.h.
2303         (WebCore::LiveNodeListBase::LiveNodeListBase):
2304         (WebCore::LiveNodeListBase::shouldInvalidateTypeOnAttributeChange):
2305         (WebCore::LiveNodeList::LiveNodeList):
2306         (WebCore::LiveNodeList::~LiveNodeList):
2307         (LiveNodeList):
2308         * dom/MicroDataItemList.cpp:
2309         (WebCore::MicroDataItemList::MicroDataItemList):
2310         * dom/MicroDataItemList.h:
2311         * dom/NameNodeList.cpp:
2312         (WebCore::NameNodeList::NameNodeList):
2313         * dom/NameNodeList.h:
2314         * dom/Node.cpp:
2315         (WebCore::shouldInvalidateNodeListCachesForAttr):
2316         (WebCore::Document::invalidateNodeListCaches):
2317         * dom/Node.h:
2318         (WebCore):
2319         * dom/NodeList.h:
2320         (WebCore::NodeList::isLiveNodeList):
2321         * dom/NodeRareData.h:
2322         (NodeListsNodeData):
2323         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
2324         (WebCore::NodeListsNodeData::removeCacheWithName):
2325         (WebCore::NodeListsNodeData::removeCacheWithQualifiedName):
2326         (WebCore::NodeListsNodeData::adoptTreeScope):
2327         * dom/PropertyNodeList.cpp:
2328         (WebCore::PropertyNodeList::PropertyNodeList):
2329         * dom/PropertyNodeList.h:
2330         * dom/TagNodeList.cpp:
2331         (WebCore::TagNodeList::TagNodeList):
2332         * dom/TagNodeList.h:
2333         * html/HTMLCollection.cpp:
2334         (WebCore::HTMLCollection::HTMLCollection):
2335         (WebCore::LiveNodeListBase::iterateForNextNode):
2336         (WebCore::LiveNodeListBase::itemBeforeOrAfter):
2337         (WebCore::LiveNodeListBase::itemBefore):
2338         (WebCore::LiveNodeListBase::itemAfter):
2339         (WebCore::LiveNodeListBase::isLastItemCloserThanLastOrCachedItem):
2340         (WebCore::LiveNodeListBase::isFirstItemCloserThanCachedItem):
2341         (WebCore::LiveNodeListBase::setItemCache):
2342         (WebCore::LiveNodeListBase::length):
2343         (WebCore::LiveNodeListBase::item):
2344         (WebCore::LiveNodeListBase::itemBeforeOrAfterCachedItem):
2345         * html/HTMLCollection.h:
2346         * html/LabelsNodeList.cpp:
2347         (WebCore::LabelsNodeList::LabelsNodeList):
2348         * html/LabelsNodeList.h:
2349         * html/RadioNodeList.cpp:
2350         (WebCore::RadioNodeList::RadioNodeList):
2351         * html/RadioNodeList.h:
2352
2353 2012-10-08  Robert Hogan  <robert@webkit.org>
2354
2355         Changing position:relative to position:static results in mis-positioned div
2356         https://bugs.webkit.org/show_bug.cgi?id=26397
2357
2358         Reviewed by Ojan Vafai.
2359
2360         When a block changes position from relative to static it is no longer the containing block for any
2361         positioned objects it may have. If any of those positioned objects actually have a position specified
2362         they are going to need a layout as their new containing block will likely have a different location they
2363         need to offset from. Positioned objects without a specified position always get a layout anyway 
2364         in layoutPositionedObjects() so no need to worry about them in this situation. 
2365
2366         Test: fast/block/abspos-child-container-changes-from-relative-to-static-expected.html
2367
2368         * rendering/RenderBlock.cpp:
2369         (WebCore::RenderBlock::styleWillChange):
2370         (WebCore::RenderBlock::layoutPositionedObjects):
2371         (WebCore::RenderBlock::removePositionedObjects):
2372         * rendering/RenderBlock.h:
2373         (RenderBlock):
2374
2375 2012-11-24  Antti Koivisto  <antti@apple.com>
2376
2377         Make renderer construction less generic
2378         https://bugs.webkit.org/show_bug.cgi?id=103175
2379
2380         Reviewed by Ojan Vafai.
2381
2382         The renderer construction code currently operates on Nodes and is very generic. In reality
2383         only Element and Text nodes can have renderers and the Text case is much simpler.
2384
2385         This patch separates the Text and Element renderer construction paths and makes it statically
2386         known that other Node types can't have renderers. Less generic code is less branchy and enables
2387         further optimizations.
2388
2389         * dom/CharacterData.cpp:
2390         (WebCore::CharacterData::parserAppendData):
2391         (WebCore::CharacterData::setDataAndUpdate):
2392         (WebCore):
2393         (WebCore::CharacterData::rendererIsNeeded):
2394         (WebCore::CharacterData::createRenderer):
2395         
2396             Only Text subclass of CharacterData can have renderers.
2397
2398         * dom/CharacterData.h:
2399         (CharacterData):
2400         * dom/ContainerNode.h:
2401         (WebCore::ContainerNode::childShouldCreateRenderer):
2402         
2403             Move childShouldCreateRenderer from Node to ContainerNode.
2404
2405         (ContainerNode):
2406         * dom/Element.cpp:
2407         (WebCore::Element::rendererIsNeeded):
2408         (WebCore):
2409         (WebCore::Element::attach):
2410         (WebCore::Element::childShouldCreateRenderer):
2411         * dom/Element.h:
2412         
2413             Move rendererIsNeeded and createRenderer from Node to Element.
2414
2415         (Element):
2416         * dom/Node.cpp:
2417         (WebCore::Node::attach):
2418         (WebCore):
2419         * dom/Node.h:
2420         (Node):
2421         * dom/NodeRenderingContext.cpp:
2422         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
2423         (WebCore::NodeRenderingContext::createRendererForTextIfNeeded):
2424         
2425             Separate the Element and Text renderer creation paths. Both are less branchy.
2426             The Text path is much simpler and avoids a bunch of virtual calls.
2427
2428         (WebCore):
2429         * dom/NodeRenderingContext.h:
2430         (NodeRenderingContext):
2431         * dom/Text.cpp:
2432         (WebCore::Text::textRendererIsNeeded):
2433         (WebCore::Text::createTextRendererIfNeeded):
2434         (WebCore):
2435         (WebCore::Text::createTextRenderer):
2436         (WebCore::Text::attach):
2437         (WebCore::Text::updateTextRenderer):
2438         * dom/Text.h:
2439         
2440                 Add non-virtual Text specific functions.
2441
2442         (WebCore):
2443         (Text):
2444         * rendering/RenderBlock.cpp:
2445         (WebCore::RenderBlock::clone):
2446
2447 2012-11-22  Ryosuke Niwa  <rniwa@webkit.org>
2448
2449         REGRESSION(r135493): HTMLCollection and DynamicNodeList have two vtable pointers
2450         https://bugs.webkit.org/show_bug.cgi?id=103096
2451
2452         Reviewed by Sam Weinig.
2453
2454         Co-authored by Ilya Tikhonovsky.
2455
2456         Made DynamicNodeListCacheBase inherit from NodeList. While HTMLCollection doesn't inherit
2457         from NodeList in IDL, it makes a lot of sense for the C++ implementation to do so via
2458         DynamicNodeListCacheBase since HTMLCollection and live NodeList share a lot of code in
2459         DynamicNodeListCacheBase.
2460
2461         This lets remove proxies for item() and length() in DynamicNodeList and HTMLCollection
2462         and directly implement them in DynamicNodeListCacheBase which used to provide itemCommon()
2463         and lengthCommon().
2464
2465         Also renamed NodeList::itemWithName() to NodeList::namedItem() to match HTMLCollection's
2466         naming convention.
2467
2468         Finally, removed reportMemoryUsage in DynamicNodeList::reportMemoryUsage since DynamicNodeList
2469         now uses single inheritance.
2470
2471         * bindings/js/JSNodeListCustom.cpp:
2472         (WebCore::JSNodeList::canGetItemsForName): Calls namedItem, which has been renamed from
2473         itemWithName.
2474         (WebCore::JSNodeList::nameGetter): Ditto.
2475         * bindings/v8/custom/V8NodeListCustom.cpp:
2476         (WebCore::V8NodeList::namedPropertyGetter): Ditto.
2477         * bindings/v8/custom/V8NamedNodesCollection.cpp:
2478         (WebCore::V8NamedNodesCollection::namedItem): Renamed from itemWithName.
2479         * bindings/v8/custom/V8NamedNodesCollection.h:
2480         * dom/ChildNodeList.cpp:
2481         (WebCore::ChildNodeList::nodeMatches): Updated comment.
2482         * dom/DynamicNodeList.cpp:
2483         (WebCore::DynamicNodeList::namedItem): Renamed from itemWithName.
2484         * dom/DynamicNodeList.h:
2485         (DynamicNodeListCacheBase): Inhertis from NodeList and renamed lengthCommon and itemCommon
2486         to virtual length and item respectively.
2487         (DynamicNodeList): Now inherits from just DynamicNodeListCacheBase instead of NodeList
2488         and DynamicNodeListCacheBase since the former now inhertis from NodeList. Also removed
2489         length() and item() since they're implemented in DynamicNodeListCacheBase now and renamed
2490         itemWithName() to namedItem() to match HTMLCollection's naming convention.
2491         * dom/NodeList.h:
2492         (NodeList::namedItem): Renamed from itemWithName. Note that this member function is not
2493         exposed via IDL. It's merely used in the binding code.
2494         * dom/StaticHashSetNodeList.cpp:
2495         (WebCore::StaticHashSetNodeList::namedItem): Ditto.
2496         * dom/StaticHashSetNodeList.h:
2497         (StaticHashSetNodeList::namedItem): Ditto.
2498         * dom/StaticNodeList.cpp:
2499         (WebCore::StaticNodeList::namedItem): Ditto.
2500         * dom/StaticNodeList.h:
2501         (StaticNodeList::namedItem): Ditto.
2502         * html/HTMLCollection.cpp:
2503         (WebCore::DynamicNodeListCacheBase::length): Renamed from lengthCommon.
2504         (WebCore::DynamicNodeListCacheBase::item): Renamed from itemCommon.
2505         * html/HTMLCollection.h:
2506         (HTMLCollection): Inherits from DynamicNodeListCacheBase since DynamicNodeListCacheBase
2507         is already RefCount'ed and NodeList, from which DynamicNodeListCacheBase inherits,
2508         inherits from ScriptWrappable.
2509
2510 2012-11-24  Christophe Dumez  <christophe.dumez@intel.com>
2511
2512         [EFL] Refactor RenderThemeEfl::paintThemePart()
2513         https://bugs.webkit.org/show_bug.cgi?id=103192
2514
2515         Reviewed by Kenneth Rohde Christiansen.
2516
2517         Refactor RenderThemeEfl::paintThemePart() so that:
2518         - Some C'ism is removed
2519         - RTL related code is moved to applyEdjeRTLState()
2520         - evas_render() is called instead of evas_render_updates()
2521           to avoid creating uselessly update rects.
2522
2523         No new tests, no behavior change for layout tests.
2524
2525         * platform/efl/RenderThemeEfl.cpp:
2526         (WebCore::RenderThemeEfl::applyEdjeRTLState):
2527         (WebCore):
2528         (WebCore::RenderThemeEfl::paintThemePart):
2529         * platform/efl/RenderThemeEfl.h:
2530         (RenderThemeEfl):
2531
2532 2012-11-24  Brent Fulgham  <bfulgham@webkit.org>
2533
2534         [WinCairo] Avoid access violation when frame is NULL.
2535         https://bugs.webkit.org/show_bug.cgi?id=68753
2536
2537         BitmapImage::drawFrameMatchingSourceSize causes an access violation
2538         if BitmapImage::frameAtIndex returns NULL. (Found by David Delaune).
2539
2540         Reviewed by Simon Fraser.
2541
2542         * platform/graphics/win/ImageCairoWin.cpp:
2543         (WebCore::BitmapImage::drawFrameMatchingSourceSize): Check for null
2544         cairo_surface_t pointer and avoid dereferencing.
2545
2546 2012-11-24  Christophe Dumez  <christophe.dumez@intel.com>
2547
2548         [EFL] Refactor RenderThemeEfl::getThemePartFromCache()
2549         https://bugs.webkit.org/show_bug.cgi?id=103186
2550
2551         Reviewed by Kenneth Rohde Christiansen.
2552
2553         Refactor getThemePartFromCache() so that a list is used
2554         for the cache instead of a vector. The function moves
2555         items to the head of the container which is much more
2556         efficient with a list than a vector.
2557
2558         The list ordering is also slightly altered so that the
2559         cached parts that were used last come first. Previously,
2560         they were sorted by creation time which may cause an
2561         item to be removed from the cache because it is older
2562         even if is was used recently.
2563
2564         This patch also gets rid of some code duplication at the
2565         end of the function.
2566
2567         No new tests, no behavior change.
2568
2569         * platform/efl/RenderThemeEfl.cpp:
2570         (WebCore::RenderThemeEfl::ThemePartCacheEntry::create): Return
2571         a smart pointer instead of a raw pointer.
2572         (WebCore::RenderThemeEfl::getThemePartFromCache):
2573         (WebCore::RenderThemeEfl::clearThemePartCache): Rename 
2574         flushThemePartCache to clearThemePartCache for clarity.
2575         (WebCore::RenderThemeEfl::loadTheme):
2576         (WebCore::RenderThemeEfl::RenderThemeEfl):
2577         (WebCore::RenderThemeEfl::~RenderThemeEfl):
2578         * platform/efl/RenderThemeEfl.h:
2579         (ThemePartCacheEntry):
2580         (RenderThemeEfl):
2581
2582 2012-11-24  Liam Quinn  <lquinn@rim.com>
2583
2584         [BlackBerry] RTSP should use the same MediaDocument as HTTP videos.
2585         https://bugs.webkit.org/show_bug.cgi?id=103185
2586         RIM PR 250114
2587
2588         Reviewed by George Staikos.
2589
2590         Make our MediaPlayer implementation indicate that it supports RTSP. That way, DOMImplementation::createDocument will create the same MediaDocument as is used for HTTP videos.
2591
2592         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2593         (WebCore::MediaPlayerPrivate::supportsType):
2594
2595 2012-11-24  Andreas Kling  <akling@apple.com>
2596
2597         Put computed style 'font-family' values in the CSSValuePool.
2598         <http://webkit.org/b/103184>
2599
2600         Reviewed by Ojan Vafai.
2601
2602         Use CSSValuePool::createFontFamilyValue() when handing out 'font-family' values from CSSComputedStyleDeclaration.
2603         This avoids creating extra CSSPrimitiveValue objects since we already have these in the pool from parsing.
2604         Also added a max capacity to the font-family cache (using random eviction.)
2605
2606         * css/CSSComputedStyleDeclaration.cpp:
2607         (WebCore::valueForFamily):
2608         * css/CSSValuePool.cpp:
2609         (WebCore::CSSValuePool::createFontFamilyValue):
2610
2611 2012-11-24  Hayato Ito  <hayato@chromium.org>
2612
2613         It's confusing that return values of 'bool Node::dispatchEvent(...)' and 'bool Node::dispatchMouseEvent(..)' have the opposite meanings.
2614         https://bugs.webkit.org/show_bug.cgi?id=103058
2615
2616         Reviewed by Ojan Vafai.
2617
2618         Refactor MouseEventDispatchMediator::dispatchEvent() and
2619         EventHandler::dispatchMouseEvent() so that they return bool
2620         which has the same meaning of the return value of
2621         Node::dispatchEvent().
2622
2623         No tests. No change in behavior.
2624
2625         * dom/MouseEvent.cpp:
2626         (WebCore::MouseEventDispatchMediator::dispatchEvent):
2627         * page/EventHandler.cpp:
2628         (WebCore::EventHandler::handleMousePressEvent):
2629         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2630         (WebCore::EventHandler::handleMouseMoveEvent):
2631         (WebCore::EventHandler::handleMouseReleaseEvent):
2632         (WebCore::EventHandler::dispatchMouseEvent):
2633         (WebCore::EventHandler::sendContextMenuEvent):
2634         (WebCore::EventHandler::sendContextMenuEventForKey):
2635
2636 2012-11-23  Kangil Han  <kangil.han@samsung.com>
2637
2638         Fix unused parameter compile warnings
2639         https://bugs.webkit.org/show_bug.cgi?id=103167
2640
2641         Reviewed by Gyuyoung Kim.
2642
2643         Remove compile warning messages by omitting parameter name and using UNUSED_PARAM.
2644
2645         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
2646         (webkitAccessibleHyperlinkIsSelectedLink):
2647         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2648         (webkitAccessibleTextGetTextAfterOffset):
2649         (webkitAccessibleTextGetTextAtOffset):
2650         (webkitAccessibleTextGetTextBeforeOffset):
2651         (webkitAccessibleTextGetOffsetAtPoint):
2652
2653 2012-11-23  Michael Saboff  <msaboff@apple.com>
2654
2655         listMarkerText() should create 8 bit strings when possible
2656         https://bugs.webkit.org/show_bug.cgi?id=103011
2657
2658         Reviewed by Filip Pizlo.
2659
2660         Made processing of marker text items use 8 bit strings where possible in order to reduce 16 bit strings.
2661
2662         Changes covered by existing tests.
2663
2664         * rendering/RenderListMarker.cpp:
2665         (WebCore::toRoman): Changed character constants and buffer to build string to LChar's
2666         (WebCore::toAlphabeticOrNumeric): Made a template based on character type.
2667         (WebCore::toSymbolic): Made a template based on character type.
2668         (WebCore::toAlphabetic): Made a template based on character type.
2669         (WebCore::toNumeric): Added character type template parameter.
2670         (WebCore::listMarkerText): Changed character constants to LChar where possible.
2671
2672 2012-11-23  Robert Kroeger  <rjkroege@chromium.org>
2673
2674         Remove unused ScrollByPixelVelocity
2675         https://bugs.webkit.org/show_bug.cgi?id=102840
2676
2677         Reviewed by Sam Weinig.
2678
2679         https://bugs.webkit.org/show_bug.cgi?id=80311 wrongly introduced a new
2680         kind of scroll: "ScrollByPixelVelocity". This code is not used on any platform
2681         and will not be of use in the future so this patch removes it.
2682
2683         No new tests: code removal/cleanup.
2684
2685         * page/EventHandler.cpp:
2686         (WebCore::EventHandler::defaultWheelEventHandler):
2687         (WebCore::EventHandler::handleGestureEvent):
2688         * platform/PlatformWheelEvent.h:
2689         * platform/ScrollAnimator.cpp:
2690         (WebCore::ScrollAnimator::handleWheelEvent):
2691         * platform/ScrollAnimatorNone.cpp:
2692         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone):
2693         (WebCore::ScrollAnimatorNone::scroll):
2694         (WebCore::ScrollAnimatorNone::cancelAnimations):
2695         (WebCore::ScrollAnimatorNone::animationTimerFired):
2696         * platform/ScrollAnimatorNone.h:
2697         (ScrollAnimatorNone):
2698         * platform/ScrollTypes.h:
2699         * platform/ScrollableArea.cpp:
2700         (WebCore::ScrollableArea::scroll):
2701
2702 2012-11-23  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2703
2704         Removing unnecessary RenderBox friend access in RenderObject
2705         https://bugs.webkit.org/show_bug.cgi?id=103159
2706
2707         Reviewed by Eric Seidel.
2708
2709         RenderObject has several classes marked as friend, between them,
2710         there is RenderBox which is derived from it indirectly and is not accessing
2711         its forefather private data making unnecessary the 'friend' access level.
2712
2713         No new tests, no changes in functionality.
2714
2715         * rendering/RenderObject.h:
2716         (RenderObject):
2717
2718 2012-11-23  Alexis Menard  <alexis@webkit.org>
2719
2720         [CSS3 Backgrounds and Borders] Implement new CSS3 background-position parsing.
2721         https://bugs.webkit.org/show_bug.cgi?id=102104
2722
2723         Reviewed by Julien Chaffraix.
2724
2725         Implement the parsing of the CSS3 background-position property which
2726         allows to specify up to four values to position the background. It is
2727         documented here :
2728         http://www.w3.org/TR/css3-background/#the-background-position . I
2729         decided to split up the patch is two pieces, the parsing and later I
2730         will do the rendering. I kept the old code as much as possible (i.e.
2731         the two values parsing) as it is used not only by background-position
2732         but by few other properties. The new four values support is only valid
2733         on the property itself but does not work on the shorthand.
2734
2735         Opera has already implemented this feature.
2736
2737         I extended backgrounds/background-position-parsing-2.html to cover the
2738         new possible values as well as buggy values.
2739
2740         * Configurations/FeatureDefines.xcconfig:
2741         * GNUmakefile.am:
2742         * GNUmakefile.features.am:
2743         * css/CSSParser.cpp:
2744         (WebCore::CSSParser::parseFillPositionComponent): Modify this function
2745         to allow creation of CSS primitive values with not only percentage or
2746         length but with keywords also as the new <position> type allows to
2747         specify keywords, for example top 30px right 20px.
2748         (WebCore):
2749         (WebCore::isValueConflictingWithCurrentEdge):
2750         (WebCore::isBackgroundPositionKeyword):
2751         (WebCore::CSSParser::parse3ValuesBackgroundPosition):
2752         (WebCore::CSSParser::parse4ValuesBackgroundPosition):
2753         (WebCore::CSSParser::parseFillBackgroundPosition): This function counts
2754         the number of words for the property value and call dedicated parsing
2755         functions for each case. Note that in case of two values we just call the old CSS 2.1
2756         method.
2757         (WebCore::CSSParser::parseFillPosition):
2758         (WebCore::CSSParser::parseFillProperty): Only call the new parsing
2759         function if the feature is activated otherwise fallback to the old code
2760         path.
2761         * css/CSSParser.h:
2762
2763 2012-11-23  Justin Novosad  <junov@google.com>
2764
2765         Adding occlusion detection to reduce overdraw in RenderBox background rendering
2766         https://bugs.webkit.org/show_bug.cgi?id=102557
2767
2768         Reviewed by Stephen White.
2769
2770         Adding hasAlpha method to all classes dervived from CSSImageValue and
2771         StyleImage, in order to support occlusion testing. 
2772         This allows the FillLayer recursion to stop early when an opaque layer
2773         is encountered while applying a CSS background style. This also allows
2774         the elimination of background color application when the background is
2775         completely covered by an image.  The optimization also skips the
2776         clearing of the page's root element when the page background is
2777         entirely covered by an image (e.g a tiled bitmap or a gradient)
2778
2779         Test: fast/backgrounds/background-opaque-images-over-color.html
2780
2781         * css/CSSCrossfadeValue.cpp:
2782         (WebCore::subimageHasAlpha):
2783         (WebCore):
2784         (WebCore::CSSCrossfadeValue::isPending):
2785         (WebCore::CSSCrossfadeValue::hasAlpha):
2786         * css/CSSCrossfadeValue.h:
2787         (CSSCrossfadeValue):
2788         * css/CSSGradientValue.cpp:
2789         (WebCore::CSSGradientValue::hasAlpha):
2790         (WebCore):
2791         * css/CSSGradientValue.h:
2792         (CSSGradientValue):
2793         * css/CSSImageGeneratorValue.cpp:
2794         (WebCore::CSSImageGeneratorValue::hasAlpha):
2795         (WebCore):
2796         * css/CSSImageGeneratorValue.h:
2797         (CSSImageGeneratorValue):
2798         * css/CSSImageValue.cpp:
2799         (WebCore::CSSImageValue::hasAlpha):
2800         (WebCore):
2801         * css/CSSImageValue.h:
2802         (WebCore):
2803         (CSSImageValue):
2804         * loader/cache/CachedImage.cpp:
2805         (WebCore::CachedImage::currentFrameHasAlpha):
2806         Test whether a cached image has alpha, with side effect of ensuring
2807         the image is in cache. (new method)
2808         (WebCore):
2809         * loader/cache/CachedImage.h:
2810         (CachedImage):
2811         * rendering/RenderBox.cpp:
2812         (WebCore::RenderBox::paintFillLayers):
2813         Added layer recursion early exit when an opaque layer is encountered.
2814         * rendering/RenderBoxModelObject.cpp:
2815         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2816         Eliminated background color fill when the layer contains an opaque
2817         image that covers the entire RenderBox.
2818         * rendering/style/FillLayer.cpp:
2819         (WebCore::FillLayer::hasOpaqueImage):
2820         Returns true if the layer's image is known to be fully opaque.
2821         (WebCore):
2822         (WebCore::FillLayer::hasRepeatXY):
2823         * rendering/style/FillLayer.h:
2824         (FillLayer):
2825         * rendering/style/StyleCachedImage.cpp:
2826         (WebCore::StyleCachedImage::hasAlpha):
2827         (WebCore):
2828         * rendering/style/StyleCachedImage.h:
2829         (StyleCachedImage):
2830         * rendering/style/StyleCachedImageSet.cpp:
2831         (WebCore::StyleCachedImageSet::hasAlpha):
2832         (WebCore):
2833         * rendering/style/StyleCachedImageSet.h:
2834         (StyleCachedImageSet):
2835         * rendering/style/StyleGeneratedImage.cpp:
2836         (WebCore::StyleGeneratedImage::hasAlpha):
2837         (WebCore):
2838         * rendering/style/StyleGeneratedImage.h:
2839         (StyleGeneratedImage):
2840         * rendering/style/StyleImage.h:
2841         (StyleImage):
2842         * rendering/style/StylePendingImage.h:
2843         (WebCore::StylePendingImage::hasAlpha):
2844
2845 2012-11-23  Justin Novosad  <junov@google.com>
2846
2847         Page background color bleeds through inner edge of div border with rounded edges
2848         https://bugs.webkit.org/show_bug.cgi?id=103089
2849
2850         Reviewed by Stephen White.
2851
2852         Test that verifies whether a RenderBoxEdge is more than 2 pixels wide
2853         was applying the content scale factor backwards, so the
2854         obscuresBackgroundEdge was falsely passing for downsized boxes.
2855
2856         Test: fast/backgrounds/gradient-background-leakage-2.html
2857
2858         * rendering/RenderBoxModelObject.cpp:
2859         (WebCore::BorderEdge::obscuresBackgroundEdge):
2860
2861 2012-11-23  Huang Dongsung  <luxtella@company100.net>
2862
2863         [TexMap] Remove dependency of TextureMapperLayer on GraphicsLayerTextureMapper.
2864         https://bugs.webkit.org/show_bug.cgi?id=103046
2865
2866         Reviewed by Noam Rosenthal.
2867
2868         It is a preparation patch for Threaded Coordinated Graphics on WK1.
2869
2870         We want to make TextureMapperLayer into an actor model. After making an actor
2871         model, GraphicsLayerTextureMapper and LayerTreeRenderer will communicate with
2872         TextureMapperLayer using message passing. In the first step, we want to hide
2873         GraphicsLayerTextureMapper from TextureMapperLayer.
2874
2875         There are 2 kinds of dependencies of TextureMapperLayer in GraphicsLayerTextureMapper.
2876         1. To query layer states
2877         2. To paint layer contents
2878
2879         In this patch, we removed the second dependency. Currently, TextureMapperLayer
2880         requests painting contents to GraphicsLayerTextureMapper in WK1 while
2881         Coordinated Graphics prepares the contents in LayerTreeRenderer. This patch
2882         makes WK1 prepare the contents in GraphicsLayerTextureMapper like
2883         LayerTreeRenderer.
2884
2885         We will remove the first dependency in a follow-up patch.
2886
2887         Covered by existing layout tests.
2888
2889         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2890         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
2891         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
2892         (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
2893         (WebCore):
2894         (WebCore::GraphicsLayerTextureMapper::didFlushCompositingState):
2895         (WebCore::GraphicsLayerTextureMapper::didFlushCompositingStateRecursive):
2896         (WebCore::GraphicsLayerTextureMapper::updateBackingStore):
2897         (WebCore::GraphicsLayerTextureMapper::prepareBackingStore):
2898         (WebCore::GraphicsLayerTextureMapper::shouldHaveBackingStore):
2899         (WebCore::GraphicsLayerTextureMapper::drawRepaintCounter):
2900         (WebCore::GraphicsLayerTextureMapper::setDebugBorder):
2901         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2902         (GraphicsLayerTextureMapper):
2903         (WebCore::GraphicsLayerTextureMapper::setHasOwnBackingStore):
2904         * platform/graphics/texmap/TextureMapperLayer.cpp:
2905         (WebCore::TextureMapperLayer::rootLayer):
2906         (WebCore::TextureMapperLayer::paintSelf):
2907         (WebCore::TextureMapperLayer::textureMapper):
2908         (WebCore):
2909         (WebCore::TextureMapperLayer::flushCompositingState):
2910         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
2911         * platform/graphics/texmap/TextureMapperLayer.h:
2912         (WebCore):
2913         (WebCore::TextureMapperLayer::TextureMapperLayer):
2914         (TextureMapperLayer):
2915         (WebCore::TextureMapperLayer::setBackingStore):
2916         (State):
2917         (WebCore::TextureMapperLayer::State::State):
2918
2919 2012-11-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2920
2921         [ENCHANT] Infinite loop when end word position is not found
2922         https://bugs.webkit.org/show_bug.cgi?id=103139
2923
2924         Reviewed by Martin Robinson.
2925
2926         Covered by existing tests in editing/spelling.
2927
2928         * editing/visible_units.cpp:
2929         (WebCore::isLogicalStartOfWord): Make it private again.
2930         (WebCore::islogicalEndOfWord): Ditto.
2931         * editing/visible_units.h:
2932         * platform/text/enchant/TextCheckerEnchant.cpp:
2933         (WebCore::TextCheckerEnchant::checkSpellingOfWord): Helper funtion
2934         to check a word inside a string using the loaded dictionaries.
2935         (WebCore::TextCheckerEnchant::checkSpellingOfString): Optimize and
2936         simply the code by using the word iterator to iterate the
2937         words.
2938         * platform/text/enchant/TextCheckerEnchant.h:
2939         (TextCheckerEnchant):
2940
2941 2012-11-23  Zeno Albisser  <zeno@webkit.org>
2942
2943         [Qt] GraphicsContext3DQt makes wrong surface current.
2944         https://bugs.webkit.org/show_bug.cgi?id=103136
2945
2946         blitMultisampleFramebufferAndRestoreContext restores
2947         the wrong surface in case the currentContext is the same
2948         as m_platformContext.
2949         In this case we would reset the bound surface to NULL.
2950         Instead we should just leave the context unchanged.
2951
2952         Reviewed by Kenneth Rohde Christiansen.
2953
2954         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2955         (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext):
2956
2957 2012-11-23  Alexei Filippov  <alph@chromium.org>
2958
2959         Web Inspector: remove total item from NMI snapshot grid
2960         https://bugs.webkit.org/show_bug.cgi?id=101926
2961
2962         Reviewed by Yury Semikhatsky.
2963
2964         * inspector/front-end/NativeMemorySnapshotView.js:
2965         (WebInspector.NativeSnapshotDataGrid):
2966
2967 2012-11-23  Zeno Albisser  <zeno@webkit.org>
2968
2969         [Qt] GraphicsContext3DQt should not overwrite glClearColor of sharing context.
2970         https://bugs.webkit.org/show_bug.cgi?id=103135
2971
2972         In case we use GraphicsContext3DQt to render into or
2973         read from an existing context, we should not reset
2974         the glClearColor on construction.
2975         Otherwise we might overwrite an existing definition from
2976         the sharing context.
2977
2978         Reviewed by Kenneth Rohde Christiansen.
2979
2980         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2981         (WebCore::GraphicsContext3D::GraphicsContext3D):
2982
2983 2012-11-23  Pavel Feldman  <pfeldman@chromium.org>
2984
2985         Web Inspector: damaging last chunk does not remove its garbage from DOM
2986         https://bugs.webkit.org/show_bug.cgi?id=103132
2987
2988         Reviewed by Vsevolod Vlasov.
2989
2990         Removing everything between undamaged chunks, not registered chunk rows.
2991
2992         * inspector/front-end/DefaultTextEditor.js:
2993         (WebInspector.TextEditorMainPanel.prototype._insertSpanBefore):
2994         (WebInspector.TextEditorMainPanel.prototype._updateChunksForRanges):
2995         (WebInspector.TextEditorMainChunk.prototype.updateCollapsedLineRow):
2996         (WebInspector.TextEditorMainChunk.prototype.firstElement):
2997         (WebInspector.TextEditorMainChunk.prototype.lastElement):
2998
2999 2012-11-23  Ilya Tikhonovsky  <loislo@chromium.org>
3000
3001         RenderLayer minor clean-up: replace raw pointers with OwnPtrs.
3002         https://bugs.webkit.org/show_bug.cgi?id=103134
3003
3004         Reviewed by Eric Seidel.
3005
3006         I found that RenderLayer still uses raw pointers to the objects which it owns.
3007         Looks like these pointers could be replaced with OwnPtrs.
3008
3009         * rendering/RenderLayer.cpp:
3010         (WebCore::RenderLayer::RenderLayer):
3011         (WebCore::RenderLayer::~RenderLayer):
3012         (WebCore::RenderLayer::paintLayerContents):
3013         (WebCore::RenderLayer::hitTestLayer):
3014         (WebCore::RenderLayer::updateNormalFlowList):
3015         (WebCore::RenderLayer::collectLayers):
3016         (WebCore::RenderLayer::styleChanged):
3017         * rendering/RenderLayer.h:
3018         (WebCore::RenderLayer::marquee):
3019         (WebCore::RenderLayer::posZOrderList):
3020         (WebCore::RenderLayer::negZOrderList):
3021         (WebCore::RenderLayer::normalFlowList):
3022         (RenderLayer):
3023         (WebCore::RenderLayer::clearZOrderLists):
3024
3025 2012-11-23  Christophe Dumez  <christophe.dumez@intel.com>
3026
3027         [EFL][AC] Mouse cursor is not updated when accelerated compositing is enabled
3028         https://bugs.webkit.org/show_bug.cgi?id=103131
3029
3030         Reviewed by Kenneth Rohde Christiansen.
3031
3032         Make sure we try to get the Ecore_X_Window using ecore_evas_gl_x11_window_get()
3033         in applyFallbackCursor() if accelerated compositing is enabled instead of
3034         using ecore_evas_software_x11_window_get(). This fixes mouse cursor update
3035         when accelerated compositing is enabled.
3036
3037         No new tests, no behavior change for layout tests.
3038
3039         * platform/efl/EflScreenUtilities.cpp:
3040         (WebCore::applyFallbackCursor):
3041
3042 2012-11-16  Yury Semikhatsky  <yurys@chromium.org>
3043
3044         Memory instrumentation: extract MemoryObjectInfo declaration into a separate file
3045         https://bugs.webkit.org/show_bug.cgi?id=102510
3046
3047         Reviewed by Pavel Feldman.
3048
3049         Added necessary includes where MemoryObjectInfo declaration is required.
3050
3051         * platform/audio/FFTFrame.cpp:
3052         * rendering/style/RenderStyle.cpp:
3053         * rendering/style/StyleRareInheritedData.cpp:
3054         * rendering/style/StyleRareNonInheritedData.cpp:
3055
3056 2012-11-23  Dan Carney  <dcarney@google.com>
3057
3058         Remove V8DOMWindowShell::getEntered
3059         https://bugs.webkit.org/show_bug.cgi?id=96637
3060
3061         Reviewed by Adam Barth.
3062
3063         V8DOMWindowShell::getEntered was refactored so that the window shell
3064         no longer has to be kept alive by a v8 context. Instead, only
3065         the DOMWrapperWorld will be kept alive.
3066
3067         No new tests. No change in functionality.
3068
3069         * bindings/v8/DOMDataStore.cpp:
3070         (WebCore::DOMDataStore::current):
3071         * bindings/v8/DOMWrapperWorld.cpp:
3072         (WebCore::isolatedWorldWeakCallback):
3073         (WebCore):
3074         (WebCore::DOMWrapperWorld::makeContextWeak):
3075         (WebCore::DOMWrapperWorld::setIsolatedWorldField):
3076         * bindings/v8/DOMWrapperWorld.h:
3077         (DOMWrapperWorld):
3078         (WebCore::DOMWrapperWorld::isolated):
3079         * bindings/v8/ScriptController.cpp:
3080         (WebCore::ScriptController::existingWindowShell):
3081         (WebCore::ScriptController::windowShell):
3082         (WebCore::ScriptController::evaluateInIsolatedWorld):
3083         (WebCore::ScriptController::currentWorldContext):
3084         (WebCore::ScriptController::collectIsolatedContexts):
3085         * bindings/v8/ScriptController.h:
3086         (ScriptController):
3087         * bindings/v8/V8Binding.h:
3088         (WebCore::worldForEnteredContextIfIsolated):
3089         * bindings/v8/V8DOMWindowShell.cpp:
3090         (WebCore::V8DOMWindowShell::destroyIsolatedShell):
3091         (WebCore::V8DOMWindowShell::disposeContext):
3092         (WebCore::V8DOMWindowShell::initializeIfNeeded):
3093         * bindings/v8/V8DOMWindowShell.h:
3094         (V8DOMWindowShell):
3095         * bindings/v8/V8PerContextData.h:
3096         * bindings/v8/WorldContextHandle.cpp:
3097         (WebCore::WorldContextHandle::WorldContextHandle):
3098
3099 2012-11-23  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3100
3101         Web Inspector: Refine JsDoc in ProfilesPanel.js
3102         https://bugs.webkit.org/show_bug.cgi?id=103042
3103
3104         Reviewed by Yury Semikhatsky.
3105
3106         I'm going to make profiler output typed.
3107
3108         This will require some amount of refactoring.
3109
3110         Before refactoring I would like to make things
3111         unambiguous by adding JsDoc where they are missing.
3112
3113         * inspector/front-end/ProfilesPanel.js:
3114         (WebInspector.ProfilesPanel.prototype._onToggleProfiling):
3115         Added to eliminate parameter type ambiguity.
3116
3117 2012-11-23  Kent Tamura  <tkent@chromium.org>
3118
3119         Correct input[type=number] value sanitization for user-input
3120         https://bugs.webkit.org/show_bug.cgi?id=103018
3121
3122         Reviewed by Kentaro Hara.
3123
3124         If a number field has non-number string, HTMLInputElement::value is not
3125         updated and returns the past valid value. It doesn't match to the value
3126         sanitization algorithm defined by the HTML standard [1], and Opera's
3127         behavior. We should sanitize non-number strings to "".
3128
3129         [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#number-state-(type=number)
3130         > The value sanitization algorithm is as follows: If the value of the
3131         > element is not a valid floating-point number, then set it to the empty
3132         > string instead.
3133
3134         No new tests. Update existing tests;
3135         fast/forms/number/number-commit-valid-only.html and
3136         fast/forms/number/number-unacceptable-style.html
3137
3138         * html/HTMLInputElement.cpp:
3139         (WebCore::HTMLInputElement::subtreeHasChanged):
3140         Remove isAcceptableValue check.
3141
3142         * html/HTMLInputElement.h:
3143         (HTMLInputElement): isAcceptableValue is no longer needed.
3144         * html/InputType.cpp: Remove isAcceptableValue.
3145         * html/InputType.h: Ditto.
3146         * html/NumberInputType.cpp: Ditto.
3147         (WebCore::NumberInputType::hasUnacceptableValue):
3148         Fold the isAcceptableValue content into this.
3149         * html/NumberInputType.h:
3150         (NumberInputType): Remove isAcceptableValue.
3151
3152 2012-11-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3153
3154         Unreviewed, rolling out r135592.
3155         http://trac.webkit.org/changeset/135592
3156         https://bugs.webkit.org/show_bug.cgi?id=103126
3157
3158         broke Chromium Mac compilation (Requested by yurys on
3159         #webkit).
3160
3161         * WebCore.gypi:
3162
3163 2012-11-23  Yury Semikhatsky  <yurys@chromium.org>
3164
3165         Remove references to non-chromium entries from WebCore.gypi (part 2)
3166         https://bugs.webkit.org/show_bug.cgi?id=103124
3167
3168         Reviewed by Pavel Feldman.
3169
3170         * WebCore.gypi: removed references to gtk, cocoa, posix, ios, cf, win and mac
3171
3172 2012-11-23  Andrey Adaikin  <aandrey@chromium.org>
3173
3174         Web Inspector: [Canvas] add startCapturing and stopCapturing methods to protocol
3175         https://bugs.webkit.org/show_bug.cgi?id=103053
3176
3177         Reviewed by Pavel Feldman.
3178
3179         Add startCapturing and stopCapturing methods to the protocol to instrument several canvas frames in a row.
3180         Drive-by: support start offset index in retrieving trace logs in the backend as well as "alive" flag.
3181
3182         * inspector/InjectedScriptCanvasModule.cpp:
3183         (WebCore::InjectedScriptCanvasModule::captureFrame):
3184         (WebCore):
3185         (WebCore::InjectedScriptCanvasModule::startCapturing):
3186         (WebCore::InjectedScriptCanvasModule::callStartCapturingFunction):
3187         (WebCore::InjectedScriptCanvasModule::stopCapturing):
3188         (WebCore::InjectedScriptCanvasModule::dropTraceLog):
3189         (WebCore::InjectedScriptCanvasModule::callVoidFunctionWithTraceLogIdArgument):
3190         (WebCore::InjectedScriptCanvasModule::traceLog):
3191         * inspector/InjectedScriptCanvasModule.h:
3192         (InjectedScriptCanvasModule):
3193         * inspector/InjectedScriptCanvasModuleSource.js:
3194         (.):
3195         * inspector/Inspector.json:
3196         * inspector/InspectorCanvasAgent.cpp:
3197         (WebCore::InspectorCanvasAgent::startCapturing):
3198         (WebCore):
3199         (WebCore::InspectorCanvasAgent::stopCapturing):
3200         (WebCore::InspectorCanvasAgent::getTraceLog):
3201         * inspector/InspectorCanvasAgent.h:
3202         (InspectorCanvasAgent):
3203         * inspector/front-end/CanvasProfileView.js:
3204         (WebInspector.CanvasProfileView):
3205
3206 2012-11-23  Andrey Kosyakov  <caseq@chromium.org>
3207
3208         Web Inspector: dispatch events upon certain user actions on inspector's notification services
3209         https://bugs.webkit.org/show_bug.cgi?id=103114
3210
3211         Reviewed by Pavel Feldman.
3212
3213         Add a bunch of WebInspector.UserMetrics.UserAction, so platform-specific code can wire to user actions
3214         without breaking too often.
3215
3216         * inspector/front-end/ElementsPanel.js:
3217         (WebInspector.ElementsPanel.prototype._setPseudoClassForNodeId):
3218         * inspector/front-end/JavaScriptSourceFrame.js:
3219         (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint):
3220         * inspector/front-end/NetworkItemView.js:
3221         (WebInspector.NetworkItemView.prototype._tabSelected.set WebInspector):
3222         (WebInspector.NetworkItemView.prototype._tabSelected):
3223         * inspector/front-end/NetworkPanel.js:
3224         (WebInspector.NetworkLogView.prototype._sortItems):
3225         (WebInspector.NetworkDataGridNode.prototype.select):
3226         * inspector/front-end/ProfilesPanel.js:
3227         (WebInspector.ProfilesPanel.prototype.addProfileHeader):
3228         * inspector/front-end/ScriptsPanel.js:
3229         (WebInspector.ScriptsPanel.prototype._showSourceLine):
3230         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
3231         * inspector/front-end/UISourceCode.js:
3232         (WebInspector.UISourceCode.prototype.revertToOriginal):
3233         (WebInspector.UISourceCode.prototype.revertAndClearHistory):
3234         (WebInspector.UISourceCode.prototype.commitWorkingCopy):
3235         * inspector/front-end/UserMetrics.js:
3236         * inspector/front-end/externs.js:
3237         * inspector/front-end/inspector.js:
3238         (WebInspector._requestZoom.set var):
3239         (WebInspector._requestZoom):
3240
3241 2012-11-23  Christophe Dumez  <christophe.dumez@intel.com>
3242
3243         WebSocket's MessageEvent.origin attribute is an empty string
3244         https://bugs.webkit.org/show_bug.cgi?id=102889
3245
3246         Reviewed by Kentaro Hara.
3247
3248         Fix WebSocket implementation so that the message event's origin
3249         attribute is properly set to the Unicode serialization of the
3250         origin of the URL that was passed to the WebSocket object's
3251         constructor, instead of an empty string.
3252
3253         The new behavior is according to the specification:
3254         http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#feedback-from-the-protocol
3255
3256         It also matches the behavior of Firefox.
3257
3258         Tests: http/tests/websocket/tests/hybi/send-blob-onmessage-origin.html
3259                http/tests/websocket/tests/hybi/send-onmessage-origin.html
3260
3261         * Modules/websockets/WebSocket.cpp:
3262         (WebCore::WebSocket::didReceiveMessage):
3263         (WebCore::WebSocket::didReceiveBinaryData):
3264         * dom/MessageEvent.cpp:
3265         (WebCore::MessageEvent::MessageEvent):
3266         * dom/MessageEvent.h:
3267         (WebCore::MessageEvent::create):
3268         (MessageEvent):
3269
3270 2012-11-22  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3271
3272         Web Inspector: No "Save Heap Snapshot" option after canceling save to file dialog.
3273         https://bugs.webkit.org/show_bug.cgi?id=100916
3274
3275         Reviewed by Yury Semikhatsky.
3276
3277         Fixed order of operations - now receiver is assigned only when save
3278         dialog responds.
3279
3280         * inspector/front-end/HeapSnapshotView.js: Fixed order of operations.
3281
3282 2012-11-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3283
3284         [Qt] REGRESSION(r135507): It made 13 tests fail
3285         https://bugs.webkit.org/show_bug.cgi?id=103069
3286
3287         Reviewed by Simon Hausmann.
3288
3289         The subframe loading logic depends on that script extensions are not recognized,
3290         so avoid recognizing them in getMIMETypeForExtension which is used for pre-load
3291         mimetype detection.
3292
3293         * platform/qt/MIMETypeRegistryQt.cpp:
3294         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
3295
3296 2012-11-23  Jochen Eisinger  <jochen@chromium.org>
3297
3298         REGRESSION (r135455): Compilation without SVG enabled broken
3299         https://bugs.webkit.org/show_bug.cgi?id=103108
3300
3301         Reviewed by Yury Semikhatsky.
3302
3303         Move SVG-only code behind #if ENABLE(SVG) that was accidentially moved
3304         outside of the #if block during the refactoring.
3305
3306         * platform/graphics/filters/FilterOperation.h:
3307         (ReferenceFilterOperation):
3308
3309 2012-11-23  Julian Pastarmov  <pastarmovj@chromium.org>
3310
3311         REGRESSION (r128633): td changes size during re-layout of table although it shouldn't
3312         https://bugs.webkit.org/show_bug.cgi?id=102802
3313
3314         Reviewed by Ojan Vafai.
3315
3316         The bug was caused by incorrectly rewriting a nested condition which caused the else
3317         clause to trigger in wrong cases.
3318
3319         Test: fast/table/nested-tables-with-div-offset.html
3320
3321         * rendering/RenderBox.cpp:
3322         (WebCore::RenderBox::computePercentageLogicalHeight):
3323         Reverted wrong combination of nested if statements.
3324
3325 2012-11-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3326
3327         [Qt] REGRESSION(r135507): It made 13 tests fail
3328         https://bugs.webkit.org/show_bug.cgi?id=103069
3329
3330         Reviewed by Simon Hausmann.
3331
3332         Fix regression in recognizing MHTML on some platforms.
3333
3334         * platform/qt/MIMETypeRegistryQt.cpp:
3335         (ExtensionMap):
3336         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
3337         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
3338
3339 2012-11-22  Pavel Feldman  <pfeldman@chromium.org>
3340
3341         Web Inspector: ctrl+end in editor does not select the last symbol.
3342         https://bugs.webkit.org/show_bug.cgi?id=103078
3343
3344         Reviewed by Vsevolod Vlasov.
3345
3346         Test: inspector/editor/text-editor-selection.html
3347
3348         * inspector/front-end/DefaultTextEditor.js:
3349         (WebInspector.DefaultTextEditor.prototype._handleScrollChanged):
3350         (WebInspector.DefaultTextEditor.prototype.overrideViewportForTest):
3351         (WebInspector.TextEditorChunkedPanel.prototype._repaintAll):
3352         (WebInspector.TextEditorChunkedPanel.prototype._scrollTop):
3353         (WebInspector.TextEditorChunkedPanel.prototype._clientHeight):
3354         (WebInspector.TextEditorMainPanel.prototype._paintLineChunks):
3355         (WebInspector.TextEditorMainPanel.prototype._selectionToPosition):
3356         (WebInspector.TextEditorMainPanel.prototype._updateHighlightsForRange):
3357
3358 2012-11-23  Yury Semikhatsky  <yurys@chromium.org>
3359
3360         Remove references to non-chromium entries from WebCore.gypi
3361         https://bugs.webkit.org/show_bug.cgi?id=103103
3362
3363         Reviewed by Pavel Feldman.
3364
3365         * WebCore.gypi: Removed references to files specific for wince, cairo, qt, wx and efl.
3366
3367 2012-11-23  Alexander Pavlov  <apavlov@chromium.org>
3368
3369         Web Inspector: inspector overlay is always updated when inspector is open
3370         https://bugs.webkit.org/show_bug.cgi?id=103106
3371
3372         Reviewed by Pavel Feldman.
3373
3374         Provide empty size into the InspectorOverlay if the metrics emulation is disabled,
3375         so that it will not get painted in all cases.
3376
3377         * inspector/InspectorController.cpp:
3378         (WebCore::InspectorController::webViewResized): Call InspectorPageAgent::webViewResized() rather than InspectorOverlay::resize().
3379         * inspector/InspectorPageAgent.cpp:
3380         (WebCore::InspectorPageAgent::webViewResized): Provide empty size into InspectorOverlay::resize() if device metrics are not emulated.
3381         * inspector/InspectorPageAgent.h:
3382
3383 2012-11-23  Krzysztof Czech  <k.czech@samsung.com>
3384
3385         [EFL] Platform support for Accessibility feature.
3386         https://bugs.webkit.org/show_bug.cgi?id=100848
3387
3388         Reviewed by Gyuyoung Kim.
3389
3390         Add EFL platform's definitions to enable proper accessibility routines.
3391
3392         No new tests. Covered by existing layout tests.
3393
3394         * PlatformEfl.cmake: Add accessibility/atk content to compilation.
3395         * accessibility/AccessibilityObject.cpp:
3396         (WebCore::AccessibilityObject::AccessibilityObject):
3397         * accessibility/AccessibilityObject.h:
3398         (AccessibilityObject):
3399         * accessibility/efl/AccessibilityObjectEfl.cpp: Removed. No needed platform specific implementation. ATK shared implementation will be used.
3400
3401 2012-11-23  Thiago Marcos P. Santos  <thiago.santos@intel.com>
3402
3403         Expose DOM interface for CSS Device Adaptation
3404         https://bugs.webkit.org/show_bug.cgi?id=95966
3405
3406         Reviewed by Kenneth Rohde Christiansen.
3407
3408         Added V8 and JSC bindings for CSS Device Adapation.
3409
3410         Test: css3/device-adapt/opera/cssom-001.xhtml
3411
3412         * CMakeLists.txt:
3413         * DerivedSources.make:
3414         * DerivedSources.pri:
3415         * GNUmakefile.list.am:
3416         * WebCore.gypi:
3417         * WebCore.xcodeproj/project.pbxproj:
3418         * bindings/js/JSCSSRuleCustom.cpp:
3419         (WebCore::toJS):
3420         * bindings/objc/DOMCSS.mm:
3421         (kitClass):
3422         * bindings/v8/custom/V8CSSRuleCustom.cpp:
3423         (WebCore::wrap):
3424         * css/CSSRule.idl:
3425         * css/WebKitCSSViewportRule.idl: Added.
3426         * page/DOMWindow.idl:
3427
3428 2012-11-22  Sheriff Bot  <webkit.review.bot@gmail.com>
3429
3430         Unreviewed, rolling out r135549.
3431         http://trac.webkit.org/changeset/135549
3432         https://bugs.webkit.org/show_bug.cgi?id=103102
3433
3434         Multiple layout test crashes (Requested by yurys on #webkit).
3435
3436         * rendering/RenderTable.cpp:
3437         (WebCore::RenderTable::layout):
3438         * rendering/RenderTable.h:
3439         (RenderTable):
3440
3441 2012-11-22  Rick Byers  <rbyers@chromium.org>
3442
3443         window is missing Touch and TouchList - touch event conformance test failure
3444         https://bugs.webkit.org/show_bug.cgi?id=96295
3445
3446         Reviewed by Adam Barth.
3447
3448         Add Touch and TouchList constructors to window for ENABLE(TOUCH_EVENTS).
3449
3450         Tests: fast/js/global-constructors.html
3451                fast/events/touch/document-create-touch-list.html
3452
3453         * page/DOMWindow.idl:
3454
3455 2012-11-22  Dan Carney  <dcarney@google.com>
3456
3457         [V8] Make worker context prototype chain match other browsers
3458         https://bugs.webkit.org/show_bug.cgi?id=103057
3459
3460         Reviewed by Adam Barth.
3461
3462         The following should be defined in a worker:
3463         Object.getOwnPropertyDescriptor(this.__proto__, "postMessage")
3464         It is currently undefined in chrome only. This patch fixes that.
3465
3466         No new tests. No change in functionality.
3467
3468         * bindings/scripts/CodeGeneratorV8.pm:
3469         (GenerateImplementation):
3470
3471 2012-11-22  Rafael Brandao  <rafael.lobo@openbossa.org>
3472
3473         Remove PLATFORM(HAIKU) leftovers code
3474         https://bugs.webkit.org/show_bug.cgi?id=103086
3475
3476         Reviewed by Antti Koivisto.