[TextureMapper] Tiles are not created for large textures
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-05-11  Martin Robinson  <mrobinson@igalia.com>
2
3         [TextureMapper] Tiles are not created for large textures
4         https://bugs.webkit.org/show_bug.cgi?id=86245
5
6         Reviewed by Noam Rosenthal.
7
8         No new tests. This will not produce any observable behavior changes,
9         unless run on a machine with a small texture size limit.
10
11         The maxTextureSize() method on TextureMapperGL was missing a "const"
12         keyword, meaning that it was not properly overriding the version in
13         the abstract base class (TextureMapper). This patch adds the const
14         modifier and cleans up the list of override methods in the two 
15         TextureMapper sublcasses, adding the OVERRIDE macro for compilers that
16         support it and removing a couple unused methods.
17
18         * platform/graphics/texmap/TextureMapperGL.cpp:
19         * platform/graphics/texmap/TextureMapperGL.h:
20         (WebCore::TextureMapperGL::create):
21         * platform/graphics/texmap/TextureMapperImageBuffer.h:
22         (TextureMapperImageBuffer):
23
24 2012-05-11  Adrienne Walker  <enne@google.com>
25
26         [chromium] Prevent deadlock on CCVideoLayerImpl destruction
27         https://bugs.webkit.org/show_bug.cgi?id=86258
28
29         Reviewed by James Robinson.
30
31         ~CCVideoLayerImpl had a common deadlock issue where if it got
32         destroyed before WebMediaPlayerClientImpl, it would take a lock,
33         call WebMediaPlayerClientImpl::setVideoFrameProviderClient(0),
34         which in turn would call CCVideoLayerImpl::stopUsingProvider(),
35         which would try to take the same lock and would deadlock.
36
37         CCVideoLayerImpl is only created and destroyed during tree
38         synchronization in a commit or during synchronous compositor thread
39         destruction. In either case, the main thread is blocked, and so no
40         lock needs to be taken at all.
41
42         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
43         (WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
44         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
45         (WebCore::CCVideoLayerImpl::stopUsingProvider):
46
47 2012-05-11  Jeffrey Pfau  <jpfau@apple.com>
48
49         REGRESSION (r114170): Scroll areas in nested frames improperly placed when tiled drawing is enabled
50         https://bugs.webkit.org/show_bug.cgi?id=86239
51
52         Reviewed by Anders Carlsson.
53
54         Fixes a regression introduced in r114170 by recursively adding positions of parent frames to placement of nested frame scroll areas.
55
56         Manual tests: ManualTests/scrollable-positioned-frame.html
57                       ManualTests/scrollable-positioned-nested-frame.html
58
59         * page/scrolling/ScrollingCoordinator.cpp:
60         (WebCore::computeNonFastScrollableRegion):
61         (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
62
63 2012-05-11  Beth Dakin  <bdakin@apple.com>
64
65         https://bugs.webkit.org/show_bug.cgi?id=86278
66         Composited layers should only run the overlay scrollbars painting pass 
67         if necessary
68
69         Reviewed by Dan Bernstein.
70
71         It's not enough that the rootLayer has dirty scrollbars; we also have 
72         to actually be doing the overlay scrollbars painting pass to skip the 
73         early return.
74         * rendering/RenderLayer.cpp:
75         (WebCore::RenderLayer::paintLayer):
76
77 2012-05-11  Anders Carlsson  <andersca@apple.com>
78
79         Comcast website displays bottom of page when loaded
80         https://bugs.webkit.org/show_bug.cgi?id=86277
81         <rdar://problem/11426887>
82
83         Reviewed by Beth Dakin.
84
85         There were two bugs here. The first bug was that FrameView::setScrollPosition didn't end up calling into the scrolling coordinator
86         to update the scroll position. The second bug was that ScrollingTreeNodeMac::setScrollPosition didn't constrain the scroll position
87         to the edge of the page.
88
89         * page/FrameView.cpp:
90         (WebCore::FrameView::setScrollPosition):
91         Call requestScrollPositionUpdate.
92
93         * page/scrolling/ScrollingTree.cpp:
94         * page/scrolling/ScrollingTree.h:
95         Remove setMainFrameScrollPosition, it is not called by anyone.
96
97         * page/scrolling/mac/ScrollingTreeNodeMac.h:
98         * page/scrolling/mac/ScrollingTreeNodeMac.mm:
99         (WebCore::ScrollingTreeNodeMac::setScrollPosition):
100         Clamp to the page size and call setScrollPositionWithoutContentEdgeConstraints.
101
102         (WebCore::ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints):
103         Update the scroll layer position and call back to the main thread.
104
105         (WebCore::ScrollingTreeNodeMac::scrollBy):
106         Call setScrollPosition.
107
108         (WebCore::ScrollingTreeNodeMac::scrollByWithoutContentEdgeConstraints):
109         Call setScrollPositionWithoutContentEdgeConstraints.
110
111 2012-05-11  Gavin Barraclough  <barraclough@apple.com>
112
113         Introduce PropertyName class
114         https://bugs.webkit.org/show_bug.cgi?id=86241
115
116         Reviewed by Geoff Garen.
117
118         Replace 'const Identifier&' arguments to functions accessing object properties with a new 'PropertyName' type.
119         This change paves the way to allow for properties keyed by values that are not Identifiers.
120
121         This change is largely a mechanical find & replace.
122         It also changes JSFunction's constructor to take a UString& instead of an Identifier&
123         (since in some cases we can no longer guarantee that we'lll have an Identifier), and
124         unifies Identifier's methods to obtain array indices onto PropertyName.
125
126         The new PropertyName class retains the ability to support .impl() and .ustring(), but
127         in a future patch we may need to rework this, since not all PropertyNames should be
128         equal based on their string representation.
129
130         * WebCore.exp.in:
131         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
132         (WebCore::cssPropertyIDForJSCSSPropertyName):
133         (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
134         (WebCore::JSCSSStyleDeclaration::getOwnPropertyDescriptorDelegate):
135         (WebCore::JSCSSStyleDeclaration::putDelegate):
136         * bindings/js/JSDOMBinding.cpp:
137         (WebCore::findAtomicString):
138         (WebCore::objectToStringFunctionGetter):
139         * bindings/js/JSDOMBinding.h:
140         (WebCore):
141         (WebCore::propertyNameToString):
142         (WebCore::propertyNameToAtomicString):
143         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
144         (WebCore::JSDOMMimeTypeArray::canGetItemsForName):
145         (WebCore::JSDOMMimeTypeArray::nameGetter):
146         * bindings/js/JSDOMPluginArrayCustom.cpp:
147         (WebCore::JSDOMPluginArray::canGetItemsForName):
148         (WebCore::JSDOMPluginArray::nameGetter):
149         * bindings/js/JSDOMPluginCustom.cpp:
150         (WebCore::JSDOMPlugin::canGetItemsForName):
151         (WebCore::JSDOMPlugin::nameGetter):
152         * bindings/js/JSDOMStringMapCustom.cpp:
153         (WebCore::JSDOMStringMap::canGetItemsForName):
154         (WebCore::JSDOMStringMap::nameGetter):
155         (WebCore::JSDOMStringMap::deleteProperty):
156         (WebCore::JSDOMStringMap::putDelegate):
157         * bindings/js/JSDOMWindowCustom.cpp:
158         (WebCore::nonCachingStaticFunctionGetter):
159         (WebCore::childFrameGetter):
160         (WebCore::namedItemGetter):
161         (WebCore::JSDOMWindow::getOwnPropertySlot):
162         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
163         (WebCore::JSDOMWindow::put):
164         (WebCore::JSDOMWindow::deleteProperty):
165         (WebCore::JSDOMWindow::defineOwnProperty):
166         * bindings/js/JSDOMWindowShell.cpp:
167         (WebCore::JSDOMWindowShell::getOwnPropertySlot):
168         (WebCore::JSDOMWindowShell::getOwnPropertyDescriptor):
169         (WebCore::JSDOMWindowShell::put):
170         (WebCore::JSDOMWindowShell::putDirectVirtual):
171         (WebCore::JSDOMWindowShell::defineOwnProperty):
172         (WebCore::JSDOMWindowShell::deleteProperty):
173         * bindings/js/JSDOMWindowShell.h:
174         (JSDOMWindowShell):
175         * bindings/js/JSHTMLAllCollectionCustom.cpp:
176         (WebCore::getNamedItems):
177         (WebCore::callHTMLAllCollection):
178         (WebCore::JSHTMLAllCollection::canGetItemsForName):
179         (WebCore::JSHTMLAllCollection::nameGetter):
180         (WebCore::JSHTMLAllCollection::item):
181         * bindings/js/JSHTMLAppletElementCustom.cpp:
182         (WebCore::JSHTMLAppletElement::getOwnPropertySlotDelegate):
183         (WebCore::JSHTMLAppletElement::getOwnPropertyDescriptorDelegate):
184         (WebCore::JSHTMLAppletElement::putDelegate):
185         * bindings/js/JSHTMLCollectionCustom.cpp:
186         (WebCore::getNamedItems):
187         (WebCore::JSHTMLCollection::canGetItemsForName):
188         (WebCore::JSHTMLCollection::nameGetter):
189         * bindings/js/JSHTMLDocumentCustom.cpp:
190         (WebCore::JSHTMLDocument::canGetItemsForName):
191         (WebCore::JSHTMLDocument::nameGetter):
192         * bindings/js/JSHTMLEmbedElementCustom.cpp:
193         (WebCore::JSHTMLEmbedElement::getOwnPropertySlotDelegate):
194         (WebCore::JSHTMLEmbedElement::getOwnPropertyDescriptorDelegate):
195         (WebCore::JSHTMLEmbedElement::putDelegate):
196         * bindings/js/JSHTMLFormElementCustom.cpp:
197         (WebCore::JSHTMLFormElement::canGetItemsForName):
198         (WebCore::JSHTMLFormElement::nameGetter):
199         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
200         (WebCore::JSHTMLFrameSetElement::canGetItemsForName):
201         (WebCore::JSHTMLFrameSetElement::nameGetter):
202         * bindings/js/JSHTMLObjectElementCustom.cpp:
203         (WebCore::JSHTMLObjectElement::getOwnPropertySlotDelegate):
204         (WebCore::JSHTMLObjectElement::getOwnPropertyDescriptorDelegate):
205         (WebCore::JSHTMLObjectElement::putDelegate):
206         * bindings/js/JSHistoryCustom.cpp:
207         (WebCore::nonCachingStaticBackFunctionGetter):
208         (WebCore::nonCachingStaticForwardFunctionGetter):
209         (WebCore::nonCachingStaticGoFunctionGetter):
210         (WebCore::JSHistory::getOwnPropertySlotDelegate):
211         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
212         (WebCore::JSHistory::putDelegate):
213         (WebCore::JSHistory::deleteProperty):
214         * bindings/js/JSLocationCustom.cpp:
215         (WebCore::nonCachingStaticReplaceFunctionGetter):
216         (WebCore::nonCachingStaticReloadFunctionGetter):
217         (WebCore::nonCachingStaticAssignFunctionGetter):
218         (WebCore::JSLocation::getOwnPropertySlotDelegate):
219         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
220         (WebCore::JSLocation::putDelegate):
221         (WebCore::JSLocation::deleteProperty):
222         (WebCore::JSLocation::defineOwnProperty):
223         (WebCore::JSLocationPrototype::putDelegate):
224         (WebCore::JSLocationPrototype::defineOwnProperty):
225         * bindings/js/JSNamedNodeMapCustom.cpp:
226         (WebCore::JSNamedNodeMap::canGetItemsForName):
227         (WebCore::JSNamedNodeMap::nameGetter):
228         * bindings/js/JSNodeListCustom.cpp:
229         (WebCore::JSNodeList::canGetItemsForName):
230         (WebCore::JSNodeList::nameGetter):
231         * bindings/js/JSPluginElementFunctions.cpp:
232         (WebCore::runtimeObjectPropertyGetter):
233         (WebCore::runtimeObjectCustomGetOwnPropertySlot):
234         (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
235         (WebCore::runtimeObjectCustomPut):
236         * bindings/js/JSPluginElementFunctions.h:
237         (WebCore):
238         * bindings/js/JSStorageCustom.cpp:
239         (WebCore::JSStorage::canGetItemsForName):
240         (WebCore::JSStorage::nameGetter):
241         (WebCore::JSStorage::deleteProperty):
242         (WebCore::JSStorage::putDelegate):
243         * bindings/js/JSStyleSheetListCustom.cpp:
244         (WebCore::JSStyleSheetList::canGetItemsForName):
245         (WebCore::JSStyleSheetList::nameGetter):
246         * bindings/js/JSWorkerContextCustom.cpp:
247         (WebCore::JSWorkerContext::getOwnPropertySlotDelegate):
248         (WebCore::JSWorkerContext::getOwnPropertyDescriptorDelegate):
249         * bindings/scripts/CodeGeneratorJS.pm:
250         (GenerateGetOwnPropertySlotBody):
251         (GenerateGetOwnPropertyDescriptorBody):
252         (GenerateHeader):
253         (GenerateImplementation):
254         (GenerateConstructorDeclaration):
255         (GenerateConstructorDefinition):
256         * bridge/c/c_class.cpp:
257         (JSC::Bindings::CClass::methodsNamed):
258         (JSC::Bindings::CClass::fieldNamed):
259         * bridge/c/c_class.h:
260         (CClass):
261         * bridge/c/c_instance.cpp:
262         (JSC::Bindings::CRuntimeMethod::create):
263         (JSC::Bindings::CRuntimeMethod::finishCreation):
264         (JSC::Bindings::CInstance::getMethod):
265         * bridge/c/c_instance.h:
266         (CInstance):
267         * bridge/jni/jsc/JavaClassJSC.cpp:
268         (JavaClass::methodsNamed):
269         (JavaClass::fieldNamed):
270         * bridge/jni/jsc/JavaClassJSC.h:
271         (JavaClass):
272         * bridge/jni/jsc/JavaInstanceJSC.cpp:
273         (JavaRuntimeMethod::create):
274         (JavaRuntimeMethod::finishCreation):
275         * bridge/jni/jsc/JavaInstanceJSC.h:
276         (JavaInstance):
277         * bridge/jsc/BridgeJSC.h:
278         (Class):
279         (JSC::Bindings::Class::fallbackObject):
280         (JSC::Bindings::Instance::setValueOfUndefinedField):
281         (Instance):
282         (JSC::Bindings::Instance::getOwnPropertySlot):
283         (JSC::Bindings::Instance::getOwnPropertyDescriptor):
284         (JSC::Bindings::Instance::put):
285         * bridge/objc/objc_class.h:
286         (ObjcClass):
287         * bridge/objc/objc_class.mm:
288         (JSC::Bindings::ObjcClass::methodsNamed):
289         (JSC::Bindings::ObjcClass::fieldNamed):
290         (JSC::Bindings::ObjcClass::fallbackObject):
291         * bridge/objc/objc_instance.h:
292         (ObjcInstance):
293         * bridge/objc/objc_instance.mm:
294         (ObjCRuntimeMethod::create):
295         (ObjCRuntimeMethod::finishCreation):
296         (ObjcInstance::setValueOfUndefinedField):
297         (ObjcInstance::getValueOfUndefinedField):
298         * bridge/objc/objc_runtime.h:
299         (JSC::Bindings::ObjcFallbackObjectImp::create):
300         (JSC::Bindings::ObjcFallbackObjectImp::propertyName):
301         (ObjcFallbackObjectImp):
302         * bridge/objc/objc_runtime.mm:
303         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
304         (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlot):
305         (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertyDescriptor):
306         (JSC::Bindings::ObjcFallbackObjectImp::put):
307         (JSC::Bindings::callObjCFallbackObject):
308         (JSC::Bindings::ObjcFallbackObjectImp::deleteProperty):
309         (JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
310         * bridge/runtime_array.cpp:
311         (JSC::RuntimeArray::lengthGetter):
312         (JSC::RuntimeArray::getOwnPropertySlot):
313         (JSC::RuntimeArray::getOwnPropertyDescriptor):
314         (JSC::RuntimeArray::put):
315         (JSC::RuntimeArray::deleteProperty):
316         * bridge/runtime_array.h:
317         (RuntimeArray):
318         * bridge/runtime_method.cpp:
319         (JSC::RuntimeMethod::finishCreation):
320         (JSC::RuntimeMethod::lengthGetter):
321         (JSC::RuntimeMethod::getOwnPropertySlot):
322         (JSC::RuntimeMethod::getOwnPropertyDescriptor):
323         * bridge/runtime_method.h:
324         (JSC::RuntimeMethod::create):
325         (RuntimeMethod):
326         * bridge/runtime_object.cpp:
327         (JSC::Bindings::RuntimeObject::fallbackObjectGetter):
328         (JSC::Bindings::RuntimeObject::fieldGetter):
329         (JSC::Bindings::RuntimeObject::methodGetter):
330         (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
331         (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
332         (JSC::Bindings::RuntimeObject::put):
333         (JSC::Bindings::RuntimeObject::deleteProperty):
334         * bridge/runtime_object.h:
335         (RuntimeObject):
336
337 2012-05-11  David Barton  <dbarton@mathscribe.com>
338
339         use after free in WebCore::RenderObject::document
340         https://bugs.webkit.org/show_bug.cgi?id=84891
341
342         Reviewed by Julien Chaffraix.
343
344         Change RenderMathMLFenced::addChild() to use the beforeChild parameter. When beforeChild
345         is 0, insert child renderers before the closing fence, which might not be the same as
346         this->lastChild(), e.g. possibly due to anonymous blocks or generated content.
347
348         Tests: mathml/presentation/mfenced-add-child1-expected.html
349                mathml/presentation/mfenced-add-child1.html
350                mathml/presentation/mfenced-add-child2-expected.html
351                mathml/presentation/mfenced-add-child2.html
352
353         * rendering/mathml/RenderMathMLFenced.cpp:
354         (WebCore::RenderMathMLFenced::RenderMathMLFenced):
355         (WebCore::RenderMathMLFenced::makeFences):
356         (WebCore::RenderMathMLFenced::addChild):
357         * rendering/mathml/RenderMathMLFenced.h:
358         (RenderMathMLFenced):
359
360 2012-05-11  Anders Carlsson  <andersca@apple.com>
361
362         Can't scroll on webpage after following links from Blogger
363         https://bugs.webkit.org/show_bug.cgi?id=86274
364         <rdar://problem/11431352>
365
366         Reviewed by Beth Dakin.
367
368         When committing a new scroll layer, make sure to reset the scroll position.
369
370         * page/scrolling/ScrollingTree.cpp:
371         (WebCore::ScrollingTree::commitNewTreeState):
372
373 2012-05-11  Martin Robinson  <mrobinson@igalia.com>
374
375         [TextureMapper] Support drawing debug borders
376         https://bugs.webkit.org/show_bug.cgi?id=86237
377
378         Reviewed by Noam Rosenthal.
379
380         No new tests. This is the implementation of an interactive debugging
381         feature.
382
383         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
384         (WebCore::GraphicsLayer::create): Moved this to the top of the file to
385         reduce contention for the coveted last spot in the file. This also
386         follows the pattern used in many WebCore files of having the factories
387         at the top.
388         (WebCore::GraphicsLayerTextureMapper::setDebugBorder): Added this
389         plumbing.
390         * platform/graphics/texmap/GraphicsLayerTextureMapper.h: Added
391         plumbing.
392         * platform/graphics/texmap/TextureMapper.h: Ditto.
393         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
394         (WebCore::TextureMapperTiledBackingStore::TextureMapperTiledBackingStore):
395         Initialize the new member.
396         (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper): When
397         debug borders are enabled call the new drawBorder method on the TM.
398         (WebCore::TextureMapperTiledBackingStore::setDebugBorder): Added this
399         plumbing.
400         * platform/graphics/texmap/TextureMapperBackingStore.h: Added plumbing
401         and members to store debug border states. This is necessary because of
402         the when painting there is no handle on the GraphicsLayers.
403         * platform/graphics/texmap/TextureMapperGL.cpp:
404         (WebCore::TextureMapperGL::drawRect): Factored out the common bits of
405         drawTexture and drawBorder into this helper.
406         (WebCore::TextureMapperGL::drawBorder): Added this method, which works
407         very similarly to drawTexture, but uses a different shader program and
408         must also set the line width and color.
409         (WebCore::TextureMapperGL::drawTexture): Factored out the bits that
410         are shared with drawRect.
411         * platform/graphics/texmap/TextureMapperGL.h:
412         (TextureMapperGL): Added the new method declarations.
413         * platform/graphics/texmap/TextureMapperImageBuffer.h:
414         (WebCore::TextureMapperImageBuffer::drawBorder): Added an empty
415         implementation. Later we can add an implementation for the ImageBuffer
416         TM.
417         * platform/graphics/texmap/TextureMapperLayer.cpp:
418         (WebCore::TextureMapperLayer::updateBackingStore): When updating the
419         backing store send the debug border information through.
420         (WebCore::TextureMapperLayer::syncCompositingStateSelf): When updating
421         the layer state, also update the debug indicators. This is required to
422         initialize the debug border values for the layer.
423         (WebCore::TextureMapperLayer::setDebugBorder): Added this plumbing.
424         * platform/graphics/texmap/TextureMapperLayer.h: Ditto.
425         * platform/graphics/texmap/TextureMapperShaderManager.cpp: Added a
426         solid color shader that doesn't care about texture coordinates or
427         opacity values.
428         (WebCore::TextureMapperShaderManager::solidColorProgram): Added. This
429         is a shorter getter for the solid color program that doesn't require
430         casting from the caller.
431         (WebCore::TextureMapperShaderManager::getShaderProgram): Added support
432         for the solid color program.
433         (WebCore::TextureMapperShaderProgramSolidColor::create): Added.
434         (WebCore::TextureMapperShaderProgramSolidColor::TextureMapperShaderProgramSolidColor):
435         Ditto.
436         (WebCore::TextureMapperShaderProgramSolidColor::vertexShaderSource):
437         Ditto.
438         (WebCore::TextureMapperShaderProgramSolidColor::fragmentShaderSource):
439         Ditto.
440         * platform/graphics/texmap/TextureMapperShaderManager.h:
441         (TextureMapperShaderProgramSolidColor): Added.
442         (WebCore::TextureMapperShaderProgramSolidColor::colorVariable): Added.
443
444 2012-05-10  Timothy Hatcher  <timothy@apple.com>
445
446         Instrument timer function calls so they show up in the Web Inspector Timeline.
447
448         https://webkit.org/b/86173
449
450         Reviewed by Pavel Feldman.
451
452         Test: inspector/timeline/timeline-timer.html
453
454         * bindings/js/ScheduledAction.cpp:
455         (WebCore::ScheduledAction::executeFunctionInContext): Wrap the call with JSMainThreadExecState::instrumentFunctionCall
456         and InspectorInstrumentation::didCallFunction.
457
458 2012-05-11  Nico Weber  <thakis@chromium.org>
459
460         [chromium/mac] Let libwebkit.dylib link in Debug/components build
461         https://bugs.webkit.org/show_bug.cgi?id=86244
462
463         Reviewed by James Robinson.
464
465         In static builds, this was not needed because the targets depending on
466         'webkit' already link in QuartzCore. In Release components builds, it wasn't
467         needed because they are built with -dead_strip, which stripped the referencing
468         code.
469
470         * WebCore.gyp/WebCore.gyp:
471
472 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
473
474         Unreviewed, rolling out r116802.
475         http://trac.webkit.org/changeset/116802
476         https://bugs.webkit.org/show_bug.cgi?id=86260
477
478         This patch causes compiling error to chromium builds
479         (Requested by jianli_ on #webkit).
480
481         * WebCore.gypi:
482
483 2012-05-11  Ryosuke Niwa  <rniwa@webkit.org>
484
485         Regression fix after r116798.
486
487         We need to return true for the html element in the design mode
488         in which case parentNode() is editable and is not a body element.
489
490         * dom/Node.cpp:
491         (WebCore::Node::isRootEditableElement):
492
493 2012-05-11  James Robinson  <jamesr@chromium.org>
494
495         [chromium] Move implementation of WebCore::GraphicsContext3D and related from WebKit/chromium/src to WebCore/platform/chromium/support
496         https://bugs.webkit.org/show_bug.cgi?id=86257
497
498         Reviewed by Adam Barth.
499
500         The WebCore platform interfaces GraphicsContext3D and Extensions3DChromium are implemented in chromium on top of
501         the Platform interface WebGraphicsContext3D. This moves the implementation support code from WebKit/chromium/src
502         to WebCore/platform/chromium/support, which avoids having code in WebKit/ implementing WebCore interfaces and
503         allows code in WebCore/platform to use this support code directly where appropriate.
504
505         Refactor only, no new functionality or tests.
506
507         * WebCore.gypi:
508         * platform/chromium/support/Extensions3DChromium.cpp: Renamed from Source/WebKit/chromium/src/Extensions3DChromium.cpp.
509         (WebCore):
510         (WebCore::Extensions3DChromium::Extensions3DChromium):
511         (WebCore::Extensions3DChromium::~Extensions3DChromium):
512         (WebCore::Extensions3DChromium::supports):
513         (WebCore::Extensions3DChromium::ensureEnabled):
514         (WebCore::Extensions3DChromium::isEnabled):
515         (WebCore::Extensions3DChromium::getGraphicsResetStatusARB):
516         (WebCore::Extensions3DChromium::blitFramebuffer):
517         (WebCore::Extensions3DChromium::renderbufferStorageMultisample):
518         (WebCore::Extensions3DChromium::postSubBufferCHROMIUM):
519         (WebCore::Extensions3DChromium::mapBufferSubDataCHROMIUM):
520         (WebCore::Extensions3DChromium::unmapBufferSubDataCHROMIUM):
521         (WebCore::Extensions3DChromium::mapTexSubImage2DCHROMIUM):
522         (WebCore::Extensions3DChromium::unmapTexSubImage2DCHROMIUM):
523         (WebCore::Extensions3DChromium::setVisibilityCHROMIUM):
524         (WebCore::Extensions3DChromium::discardFramebufferEXT):
525         (WebCore::Extensions3DChromium::ensureFramebufferCHROMIUM):
526         (WebCore::Extensions3DChromium::setGpuMemoryAllocationChangedCallbackCHROMIUM):
527         (WebCore::Extensions3DChromium::createVertexArrayOES):
528         (WebCore::Extensions3DChromium::deleteVertexArrayOES):
529         (WebCore::Extensions3DChromium::isVertexArrayOES):
530         (WebCore::Extensions3DChromium::bindVertexArrayOES):
531         (WebCore::Extensions3DChromium::getTranslatedShaderSourceANGLE):
532         (WebCore::Extensions3DChromium::setSwapBuffersCompleteCallbackCHROMIUM):
533         (WebCore::Extensions3DChromium::rateLimitOffscreenContextCHROMIUM):
534         (WebCore::Extensions3DChromium::paintFramebufferToCanvas):
535         (WebCore::Extensions3DChromium::texImageIOSurface2DCHROMIUM):
536         (WebCore::Extensions3DChromium::texStorage2DEXT):
537         (WebCore::Extensions3DChromium::createQueryEXT):
538         (WebCore::Extensions3DChromium::deleteQueryEXT):
539         (WebCore::Extensions3DChromium::isQueryEXT):
540         (WebCore::Extensions3DChromium::beginQueryEXT):
541         (WebCore::Extensions3DChromium::endQueryEXT):
542         (WebCore::Extensions3DChromium::getQueryivEXT):
543         (WebCore::Extensions3DChromium::getQueryObjectuivEXT):
544         * platform/chromium/support/GraphicsContext3DChromium.cpp: Renamed from Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp.
545         (WebCore):
546         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
547         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
548         (WebCore::GraphicsContext3DPrivate::createGraphicsContextFromWebContext):
549         (WebCore::GraphicsContext3DPrivate::extractWebGraphicsContext3D):
550         (WebCore::GraphicsContext3DPrivate::platformGraphicsContext3D):
551         (WebCore::GraphicsContext3DPrivate::platformTexture):
552         (GrMemoryAllocationChangedCallback):
553         (WebCore::GrMemoryAllocationChangedCallback::GrMemoryAllocationChangedCallback):
554         (WebCore::GrMemoryAllocationChangedCallback::onGpuMemoryAllocationChanged):
555         (WebCore::GraphicsContext3DPrivate::grContext):
556         (WebCore::GraphicsContext3DPrivate::prepareTexture):
557         (WebCore::GraphicsContext3DPrivate::markContextChanged):
558         (WebCore::GraphicsContext3DPrivate::markLayerComposited):
559         (WebCore::GraphicsContext3DPrivate::layerComposited):
560         (WebCore::GraphicsContext3DPrivate::paintFramebufferToCanvas):
561         (WebCore::GraphicsContext3DPrivate::paintRenderingResultsToCanvas):
562         (WebCore::GraphicsContext3DPrivate::paintCompositedResultsToCanvas):
563         (WebCore::GraphicsContext3DPrivate::paintRenderingResultsToImageData):
564         (WebCore::GraphicsContext3DPrivate::reshape):
565         (WebCore::GraphicsContext3DPrivate::getInternalFramebufferSize):
566         (WebCore::GraphicsContext3DPrivate::isContextLost):
567         (WebCore::GraphicsContext3DPrivate::isGLES2Compliant):
568         (WebCore::GraphicsContext3DPrivate::bindAttribLocation):
569         (WebCore::GraphicsContext3DPrivate::bufferData):
570         (WebCore::GraphicsContext3DPrivate::bufferSubData):
571         (WebCore::GraphicsContext3DPrivate::getActiveAttrib):
572         (WebCore::GraphicsContext3DPrivate::getActiveUniform):
573         (WebCore::GraphicsContext3DPrivate::getAttribLocation):
574         (WebCore::GraphicsContext3DPrivate::getContextAttributes):
575         (WebCore::GraphicsContext3DPrivate::getProgramInfoLog):
576         (WebCore::GraphicsContext3DPrivate::getShaderInfoLog):
577         (WebCore::GraphicsContext3DPrivate::getShaderSource):
578         (WebCore::GraphicsContext3DPrivate::getString):
579         (WebCore::GraphicsContext3DPrivate::getUniformLocation):
580         (WebCore::GraphicsContext3DPrivate::shaderSource):
581         (WebCore::GraphicsContext3DPrivate::texImage2D):
582         (WebCore::GraphicsContext3DPrivate::texSubImage2D):
583         (WebCore::GraphicsContext3DPrivate::uniform1fv):
584         (WebCore::GraphicsContext3DPrivate::uniform1iv):
585         (WebCore::GraphicsContext3DPrivate::uniform2fv):
586         (WebCore::GraphicsContext3DPrivate::uniform2iv):
587         (WebCore::GraphicsContext3DPrivate::uniform3fv):
588         (WebCore::GraphicsContext3DPrivate::uniform3iv):
589         (WebCore::GraphicsContext3DPrivate::uniform4fv):
590         (WebCore::GraphicsContext3DPrivate::uniform4iv):
591         (WebCore::GraphicsContext3DPrivate::uniformMatrix2fv):
592         (WebCore::GraphicsContext3DPrivate::uniformMatrix3fv):
593         (WebCore::GraphicsContext3DPrivate::uniformMatrix4fv):
594         (WebCore::GraphicsContext3DPrivate::getExtensions):
595         (WebCore::GraphicsContext3DPrivate::isResourceSafe):
596         (WebCore::GraphicsContext3DPrivate::initializeExtensions):
597         (WebCore::GraphicsContext3DPrivate::supportsExtension):
598         (WebCore::GraphicsContext3DPrivate::ensureExtensionEnabled):
599         (WebCore::GraphicsContext3DPrivate::isExtensionEnabled):
600         (WebCore::GraphicsContext3D::GraphicsContext3D):
601         (WebCore::GraphicsContext3D::~GraphicsContext3D):
602         (WebCore::GraphicsContext3D::create):
603         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
604         (WebCore::GraphicsContext3D::platformTexture):
605         (WebCore::GraphicsContext3D::grContext):
606         (WebCore::GraphicsContext3D::prepareTexture):
607         (WebCore::GraphicsContext3D::getInternalFramebufferSize):
608         (WebCore::GraphicsContext3D::isResourceSafe):
609         (WebCore::GraphicsContext3D::platformLayer):
610         (WebCore::GraphicsContext3D::layerComposited):
611         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
612         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
613         (GraphicsContextLostCallbackAdapter):
614         (WebCore::GraphicsContextLostCallbackAdapter::~GraphicsContextLostCallbackAdapter):
615         (WebCore::GraphicsContextLostCallbackAdapter::GraphicsContextLostCallbackAdapter):
616         (WebCore::GraphicsContextLostCallbackAdapter::onContextLost):
617         (WebCore::GraphicsContextLostCallbackAdapter::create):
618         (WebCore::GraphicsContext3DPrivate::setContextLostCallback):
619         (GraphicsErrorMessageCallbackAdapter):
620         (WebCore::GraphicsErrorMessageCallbackAdapter::~GraphicsErrorMessageCallbackAdapter):
621         (WebCore::GraphicsErrorMessageCallbackAdapter::GraphicsErrorMessageCallbackAdapter):
622         (WebCore::GraphicsErrorMessageCallbackAdapter::onErrorMessage):
623         (WebCore::GraphicsErrorMessageCallbackAdapter::create):
624         (WebCore::GraphicsContext3DPrivate::setErrorMessageCallback):
625         (WebCore::GraphicsContext3D::isGLES2Compliant):
626         (GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
627         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::~GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
628         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
629         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::onSwapBuffersComplete):
630         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::create):
631         (WebCore::GraphicsContext3DPrivate::setSwapBuffersCompleteCallbackCHROMIUM):
632         (GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
633         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
634         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::~GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
635         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::onMemoryAllocationChanged):
636         (WebCore::GraphicsContext3DPrivate::setGpuMemoryAllocationChangedCallbackCHROMIUM):
637         * platform/chromium/support/GraphicsContext3DPrivate.h: Renamed from Source/WebKit/chromium/src/GraphicsContext3DPrivate.h.
638         (WebKit):
639         (WebCore):
640         (GraphicsContext3DPrivate):
641
642 2012-05-11  Keyar Hood  <keyar@chromium.org>
643
644         ImageSkia.cpp does not conform to style guidelines
645         https://bugs.webkit.org/show_bug.cgi?id=86219
646
647         Reviewed by Stephen White.
648
649         No tests as this is purely style changees.
650
651         * platform/graphics/skia/ImageSkia.cpp:
652         (WebCore::TransformDimensions):
653         (WebCore::BitmapImage::draw):
654         (WebCore::BitmapImageSingleFrameSkia::draw):
655
656 2012-05-11  Tim Horton  <timothy_horton@apple.com>
657
658         Unreviewed Chromium build fix after http://trac.webkit.org/changeset/116799.
659
660         * rendering/RenderLayerBacking.cpp:
661
662 2012-05-11  Terry Anderson  <tdanderson@chromium.org>
663
664         [chromium] Compute the best target node on a GestureTap event
665         https://bugs.webkit.org/show_bug.cgi?id=85101
666
667         Reviewed by Adam Barth.
668
669         Will be using the tests in the touchadjustment/ directory.
670
671         * WebCore.gypi:
672         Include TouchAdjustment.* files.
673
674 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
675
676         Unreviewed, rolling out r116498.
677         http://trac.webkit.org/changeset/116498
678         https://bugs.webkit.org/show_bug.cgi?id=86251
679
680         Causes crashes in major sites and security issues (Requested
681         by schenney on #webkit).
682
683         * rendering/svg/RenderSVGInline.cpp:
684         (WebCore::RenderSVGInline::addChild):
685         * rendering/svg/RenderSVGInlineText.cpp:
686         (WebCore::RenderSVGInlineText::willBeDestroyed):
687         (WebCore::RenderSVGInlineText::setTextInternal):
688         (WebCore::RenderSVGInlineText::styleDidChange):
689         * rendering/svg/RenderSVGText.cpp:
690         (WebCore::recursiveUpdateLayoutAttributes):
691         (WebCore::RenderSVGText::layoutAttributesChanged):
692         (WebCore::RenderSVGText::layoutAttributesWillBeDestroyed):
693         (WebCore::RenderSVGText::invalidateTextPositioningElements):
694         (WebCore::recursiveUpdateScaledFont):
695         (WebCore::RenderSVGText::layout):
696         (WebCore::RenderSVGText::addChild):
697         (WebCore::recursiveCollectLayoutAttributes):
698         (WebCore::RenderSVGText::rebuildLayoutAttributes):
699         (WebCore):
700         * rendering/svg/RenderSVGText.h:
701         (RenderSVGText):
702         (WebCore::RenderSVGText::layoutAttributes):
703         * rendering/svg/SVGRootInlineBox.cpp:
704         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
705         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
706         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributes):
707
708 2012-05-11  Tim Horton  <timothy_horton@apple.com>
709
710         FrameView->m_lastPaintTime is not updated in the tiled drawing case
711         https://bugs.webkit.org/show_bug.cgi?id=86246
712         <rdar://problem/11248475>
713
714         Reviewed by Simon Fraser.
715
716         Update FrameView's m_lastPaintTime from RenderLayerBacking::paintContents
717         if the RenderLayerBacking is backing a tiled drawing layer.
718
719         In the future we might want to consider updating m_lastPaintTime when any
720         compositing layer is painted into, but this change gets us on par with the
721         non-tiled-drawing case as it stands now.
722
723         No new tests.
724
725         * page/FrameView.h:
726         (WebCore::FrameView::setLastPaintTime):
727         * rendering/RenderLayerBacking.cpp:
728         (WebCore::RenderLayerBacking::paintContents):
729
730 2012-05-11  Shezan Baig  <shezbaig.wk@gmail.com>
731
732         Add helper function for node()->rootEditableElement() == node()
733         https://bugs.webkit.org/show_bug.cgi?id=86217
734
735         Reviewed by Ryosuke Niwa.
736
737         Added Node::isRootEditableElement and updated existing code that did
738         (node->rootEditableElement() == node) to use isRootEditableElement
739         instead.
740
741         No new tests. No change in behavior.
742
743         * dom/Node.cpp:
744         (WebCore::Node::isRootEditableElement):
745         (WebCore):
746         * dom/Node.h:
747         (Node):
748         Added new helper function.
749
750         * dom/Document.cpp:
751         (WebCore::Document::setFocusedNode):
752         * dom/Element.cpp:
753         (WebCore::Element::updateFocusAppearance):
754         * editing/CompositeEditCommand.cpp:
755         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
756         * editing/DeleteSelectionCommand.cpp:
757         (WebCore::DeleteSelectionCommand::removeNode):
758         * editing/InsertParagraphSeparatorCommand.cpp:
759         (WebCore::InsertParagraphSeparatorCommand::doApply):
760         * page/FocusController.cpp:
761         (WebCore::FocusController::setFocusedNode):
762         * rendering/RenderBlock.cpp:
763         (WebCore::RenderBlock::hasLineIfEmpty):
764         * rendering/RenderBlockLineLayout.cpp:
765         (WebCore::RenderBlock::addOverflowFromInlineChildren):
766         Updates to existing code to use the new helper function.
767
768 2012-05-11  Shawn Singh  <shawnsingh@chromium.org>
769
770         [chromium] Create WebTransformationMatrix interface for chromium platform
771         https://bugs.webkit.org/show_bug.cgi?id=86049
772
773         Reviewed by James Robinson.
774
775         This patch creates a WebTransformationMatrix interface. It will
776         remain unused at the moment, until (a) unit tests are created
777         and (b) when we are ready to make a brief transition of all other
778         chromium code to use it.
779
780         * WebCore.gypi:
781         * platform/chromium/support/WebTransformationMatrix.cpp: Added.
782         (WebKit):
783         (WebKit::WebTransformationMatrix::WebTransformationMatrix):
784         (WebKit::WebTransformationMatrix::operator=):
785         (WebKit::WebTransformationMatrix::operator==):
786         (WebKit::WebTransformationMatrix::operator*):
787         (WebKit::WebTransformationMatrix::inverse):
788         (WebKit::WebTransformationMatrix::to2dTransform):
789         (WebKit::WebTransformationMatrix::multiply):
790         (WebKit::WebTransformationMatrix::makeIdentity):
791         (WebKit::WebTransformationMatrix::translate):
792         (WebKit::WebTransformationMatrix::translate3d):
793         (WebKit::WebTransformationMatrix::translateRight3d):
794         (WebKit::WebTransformationMatrix::scale):
795         (WebKit::WebTransformationMatrix::scaleNonUniform):
796         (WebKit::WebTransformationMatrix::scale3d):
797         (WebKit::WebTransformationMatrix::rotate):
798         (WebKit::WebTransformationMatrix::rotate3d):
799         (WebKit::WebTransformationMatrix::skewX):
800         (WebKit::WebTransformationMatrix::skewY):
801         (WebKit::WebTransformationMatrix::applyPerspective):
802         (WebKit::WebTransformationMatrix::blend):
803         (WebKit::WebTransformationMatrix::hasPerspective):
804         (WebKit::WebTransformationMatrix::isInvertible):
805         (WebKit::WebTransformationMatrix::isBackFaceVisible):
806         (WebKit::WebTransformationMatrix::isIdentity):
807         (WebKit::WebTransformationMatrix::isIdentityOrTranslation):
808         (WebKit::WebTransformationMatrix::isIntegerTranslation):
809         (WebKit::WebTransformationMatrix::m11):
810         (WebKit::WebTransformationMatrix::setM11):
811         (WebKit::WebTransformationMatrix::m12):
812         (WebKit::WebTransformationMatrix::setM12):
813         (WebKit::WebTransformationMatrix::m13):
814         (WebKit::WebTransformationMatrix::setM13):
815         (WebKit::WebTransformationMatrix::m14):
816         (WebKit::WebTransformationMatrix::setM14):
817         (WebKit::WebTransformationMatrix::m21):
818         (WebKit::WebTransformationMatrix::setM21):
819         (WebKit::WebTransformationMatrix::m22):
820         (WebKit::WebTransformationMatrix::setM22):
821         (WebKit::WebTransformationMatrix::m23):
822         (WebKit::WebTransformationMatrix::setM23):
823         (WebKit::WebTransformationMatrix::m24):
824         (WebKit::WebTransformationMatrix::setM24):
825         (WebKit::WebTransformationMatrix::m31):
826         (WebKit::WebTransformationMatrix::setM31):
827         (WebKit::WebTransformationMatrix::m32):
828         (WebKit::WebTransformationMatrix::setM32):
829         (WebKit::WebTransformationMatrix::m33):
830         (WebKit::WebTransformationMatrix::setM33):
831         (WebKit::WebTransformationMatrix::m34):
832         (WebKit::WebTransformationMatrix::setM34):
833         (WebKit::WebTransformationMatrix::m41):
834         (WebKit::WebTransformationMatrix::setM41):
835         (WebKit::WebTransformationMatrix::m42):
836         (WebKit::WebTransformationMatrix::setM42):
837         (WebKit::WebTransformationMatrix::m43):
838         (WebKit::WebTransformationMatrix::setM43):
839         (WebKit::WebTransformationMatrix::m44):
840         (WebKit::WebTransformationMatrix::setM44):
841         (WebKit::WebTransformationMatrix::a):
842         (WebKit::WebTransformationMatrix::setA):
843         (WebKit::WebTransformationMatrix::b):
844         (WebKit::WebTransformationMatrix::setB):
845         (WebKit::WebTransformationMatrix::c):
846         (WebKit::WebTransformationMatrix::setC):
847         (WebKit::WebTransformationMatrix::d):
848         (WebKit::WebTransformationMatrix::setD):
849         (WebKit::WebTransformationMatrix::e):
850         (WebKit::WebTransformationMatrix::setE):
851         (WebKit::WebTransformationMatrix::f):
852         (WebKit::WebTransformationMatrix::setF):
853         (WebKit::WebTransformationMatrix::toWebCoreTransform):
854         (WebKit::WebTransformationMatrix::mapRect):
855         (WebKit::WebTransformationMatrix::mapPoint):
856         (WebKit::WebTransformationMatrix::mapQuad):
857         (WebKit::WebTransformationMatrix::projectPoint):
858
859 2012-05-11  Alexandru Chiculita  <achicu@adobe.com>
860
861         [CSS Shaders] Make CSS Shaders render to texture framebuffers
862         https://bugs.webkit.org/show_bug.cgi?id=85113
863
864         Reviewed by Dean Jackson.
865
866         Added the required members to store the framebuffer, the texture and the depth buffer. Also removed the m_drawingBuffer
867         because context->readPixels doesn't require one anymore.
868
869         ReadPixels is not flipping the result, so I've also removed the flipping projection matrix that was specific only to Chromium.
870
871         Added a test to check that colors are not switched and the resulting image is not mirrored.
872
873         Test: css3/filters/custom/effect-color-check.html
874
875         * platform/graphics/filters/FECustomFilter.cpp:
876         (WebCore::FECustomFilter::FECustomFilter):
877         (WebCore::FECustomFilter::~FECustomFilter):
878         (WebCore):
879         (WebCore::FECustomFilter::deleteRenderBuffers):
880         (WebCore::FECustomFilter::platformApplySoftware):
881         (WebCore::FECustomFilter::initializeContext):
882         (WebCore::FECustomFilter::resizeContext):
883         (WebCore::FECustomFilter::bindProgramAndBuffers):
884         * platform/graphics/filters/FECustomFilter.h:
885         (FECustomFilter):
886
887 2012-05-11  Anders Carlsson  <andersca@apple.com>
888
889         REGRESSION(r116687): [Chromium] plugins/embed-attributes-style.html shows a garbled string
890         https://bugs.webkit.org/show_bug.cgi?id=86170
891
892         Reviewed by Andreas Kling.
893
894         The string we are passing to the TextRun constructor needs to stay alive for longer so revert back to the old
895         behavior where we store it as a member variable.
896
897         * rendering/RenderEmbeddedObject.cpp:
898         (WebCore::unavailablePluginReplacementText):
899         (WebCore):
900         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
901         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
902         * rendering/RenderEmbeddedObject.h:
903         (RenderEmbeddedObject):
904
905 2012-05-11  Simon Fraser  <simon.fraser@apple.com>
906
907         CVDisplayLink keeps running after a single requestAnimationFrame
908         https://bugs.webkit.org/show_bug.cgi?id=86174
909         
910         Reviewed by Sam Weinig.
911         
912         A DisplayRefreshMonitor would keep its CVDisplayLink alive for as long
913         as it had clients, and the client is the ScriptedAnimationController, which
914         lives on the document. So a single requestAnimationFrame call would kick
915         off a CVDisplayLink which lived until the document was destroyed.
916         
917         Fix by having the DisplayRefreshMonitor kill itself if the CVDisplayLink
918         fires for 10 times with no scheduled callbacks (to avoid creation/deletion
919         thrash on pages that call requestAnimationFrames with short setTimeouts,
920         as some do).
921         
922         Use a HashMap in DisplayRefreshMonitorManager for the set of DisplayRefreshMonitor,
923         with the displayID as the key (using UnsignedWithZeroKeyHashTraits<uint64_t> since
924         we want to allow for 0 to be a valid displayID).
925         
926         Use a HashSet in DisplayRefreshMonitor for the client set, so that we don't have to
927         worry about adding clients twice.
928         
929         Also fix a possible crash when the only client of a DisplayRefreshMonitor
930         was removed from inside the callback by making DisplayRefreshMonitor ref-counted,
931         with a protector.
932
933         Test: fast/animation/request-animation-frame-detach-element2.html
934
935         * platform/graphics/DisplayRefreshMonitor.cpp:
936         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor): Initialize m_unscheduledFireCount
937         (WebCore::DisplayRefreshMonitor::handleDisplayRefreshedNotificationOnMainThread): Renamed
938         from refreshDisplayOnMainThread, since it doesn't just refresh the display.
939         (WebCore::DisplayRefreshMonitor::addClient): No longer inline.
940         (WebCore::DisplayRefreshMonitor::removeClient): No longer inline.
941         (WebCore::DisplayRefreshMonitor::displayDidRefresh): Keep track of m_unscheduledFireCount,
942         which we used to kill this monitor if it has been idle for a while.
943         Use a RefPtr<DisplayRefreshMonitor> to prevent deletion while running the callback.
944         Copy the clients to a vector to protect against mutating the set while enumerating it.
945         Notify the DisplayRefreshMonitorManager when we're done, so that it can decide
946         to delete inactive monitors.
947         
948         (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient): find or allocate
949         a DisplayRefreshMonitor for a given client.
950         (WebCore::DisplayRefreshMonitorManager::registerClient): Simplified by use of HashMap.
951         (WebCore::DisplayRefreshMonitorManager::unregisterClient): Ditto.
952         (WebCore::DisplayRefreshMonitorManager::scheduleAnimation): Ditto. Uses
953         ensureMonitorForClient() since an earlier inactive monitor may have been removed.
954         (WebCore::DisplayRefreshMonitorManager::displayDidRefresh): Remove inactive
955         monitors.
956         * platform/graphics/DisplayRefreshMonitor.h: Make DisplayRefreshMonitor
957         ref-counted, to make it easier to avoid deletion while it's on the stack.
958         (WebCore::DisplayRefreshMonitor::create):
959         (DisplayRefreshMonitor):
960         (WebCore::DisplayRefreshMonitor::shouldBeTerminated):
961         (DisplayRefreshMonitorManager):
962         * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp: Attempt to
963         keep things building.
964         (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor):
965         (WebCore::DisplayRefreshMonitor::displayLinkFired):
966         to give the manager a chance to kill this monitor.
967         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
968         (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor):
969         (WebCore::DisplayRefreshMonitor::displayLinkFired): Don't bail early
970         if not scheduled; we want to call handleDisplayRefreshedNotificationOnMainThread(),
971
972 2012-05-11  Pavel Feldman  <pfeldman@chromium.org>
973
974         Web Inspector: move canEditScriptSource and setScriptSource from DebuggerPresentationModel into ResourceBinding
975         https://bugs.webkit.org/show_bug.cgi?id=86234
976
977         Reviewed by Vsevolod Vlasov.
978
979         Simple move refactoring.
980
981         * inspector/front-end/DebuggerPresentationModel.js:
982         (WebInspector.DebuggerPresentationModel):
983         (WebInspector.DebuggerResourceBinding):
984         (WebInspector.DebuggerResourceBinding.canEditScriptSource):
985         (WebInspector.DebuggerResourceBinding.setScriptSource.didEditScriptSource):
986         (WebInspector.DebuggerResourceBinding.setScriptSource):
987         (WebInspector.DebuggerResourceBinding.prototype.canSetContent):
988         (WebInspector.DebuggerResourceBinding.prototype._uiSourceCodeForResource):
989         (WebInspector.DebuggerResourceBinding.prototype._setContentWithInitialContent):
990         * inspector/front-end/JavaScriptSourceFrame.js:
991         (WebInspector.JavaScriptSourceFrame.prototype.canEditSource):
992         (WebInspector.JavaScriptSourceFrame.prototype.editContent):
993
994 2012-05-11  Julien Chaffraix  <jchaffraix@webkit.org>
995
996         Remove RenderLayer::m_scrollOverflow
997         https://bugs.webkit.org/show_bug.cgi?id=86226
998
999         Reviewed by Simon Fraser.
1000
1001         No expected change in behavior.
1002
1003         * rendering/RenderLayer.cpp:
1004         (WebCore::RenderLayer::computeScrollDimensions):
1005         Added 2 local variables to compute the left / top scrollable overflows.
1006
1007         * rendering/RenderLayer.h:
1008         (WebCore::RenderLayer::scrolledContentOffset):
1009         Returned m_scrollOffset directly as this is what the old code was doing by adding
1010         m_scrollOrigin then adding m_scrollOverflow (which was set to -m_scrollOrigin in
1011         computeScrollDimensions).
1012
1013         (RenderLayer::m_scrollOffset): Improved the comment about what m_scrollOffset is.
1014
1015 2012-05-11  Pavel Feldman  <pfeldman@chromium.org>
1016
1017         Web Inspector: extract PresentationConsoleMessageHelper from DebuggerPresentationModel.
1018         https://bugs.webkit.org/show_bug.cgi?id=86229
1019
1020         Reviewed by Vsevolod Vlasov.
1021
1022         This change also starts tracking messages along with the live location changes.
1023
1024         Tested with script-formatter-console.html.
1025
1026         * inspector/front-end/BreakpointManager.js:
1027         * inspector/front-end/DebuggerPresentationModel.js:
1028         (WebInspector.DebuggerPresentationModel):
1029         (WebInspector.DebuggerPresentationModel.prototype._parsedScriptSource):
1030         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
1031         (WebInspector.PresentationConsoleMessageHelper):
1032         (WebInspector.PresentationConsoleMessageHelper.prototype._addPendingConsoleMessage):
1033         (WebInspector.PresentationConsoleMessageHelper.prototype._parsedScriptSource):
1034         (WebInspector.PresentationConsoleMessageHelper.prototype._debuggerReset):
1035         (WebInspector.PresentationConsoleMessage):
1036         * inspector/front-end/JavaScriptSourceFrame.js:
1037         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu):
1038         (WebInspector.JavaScriptSourceFrame.prototype._consoleMessageAdded):
1039         (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint):
1040
1041 2012-05-11  Emil A Eklund  <eae@chromium.org>
1042
1043         Simplify FloatingObject by removing unnecessary convenience methods.
1044         https://bugs.webkit.org/show_bug.cgi?id=86163
1045
1046         Reviewed by Eric Seidel.
1047
1048         Simplify the pixel snapping in FloatingObject by getting rid of a bunch
1049         of convenience methods.
1050
1051         No new tests, no change in functionality.
1052
1053         * rendering/RenderBlock.cpp:
1054         (WebCore::RenderBlock::addOverhangingFloats):
1055         (WebCore::RenderBlock::addIntrudingFloats):
1056         (WebCore::RenderBlock::FloatingObjects::intervalForFloatingObject):
1057         (WebCore::::string):
1058         * rendering/RenderBlock.h:
1059         (FloatingObject):
1060         (WebCore::RenderBlock::pixelSnappedLogicalTopForFloat):
1061         (WebCore::RenderBlock::pixelSnappedLogicalBottomForFloat):
1062         (WebCore::RenderBlock::pixelSnappedLogicalLeftForFloat):
1063         (WebCore::RenderBlock::pixelSnappedLogicalRightForFloat):
1064
1065 2012-05-11  Ian Vollick  <vollick@chromium.org>
1066
1067         [chromium] Ensure that animations continue to run when transform-style is changed
1068         https://bugs.webkit.org/show_bug.cgi?id=83283
1069
1070         Make sure that we transfer animations when changing layers due to a transform-style change.
1071         Unit tested in GraphicsLayerChromiumTest.updateLayerPreserves3DWithAnimations
1072
1073         Reviewed by James Robinson.
1074
1075         Test: animations/change-transform-style-during-animation.html
1076
1077         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1078         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
1079         * platform/graphics/chromium/LayerChromium.cpp:
1080         (WebCore::LayerChromium::setLayerAnimationController):
1081         (WebCore::LayerChromium::releaseLayerAnimationController):
1082         (WebCore):
1083         (WebCore::LayerChromium::notifyAnimationStarted):
1084         * platform/graphics/chromium/LayerChromium.h:
1085         (LayerChromium):
1086         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
1087         (WebCore::CCLayerAnimationController::CCLayerAnimationController):
1088         (WebCore::CCLayerAnimationController::pushAnimationUpdatesTo):
1089         (WebCore::CCLayerAnimationController::notifyAnimationStarted):
1090         (WebCore::CCLayerAnimationController::setClient):
1091         (WebCore):
1092         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
1093         (WebCore::CCLayerAnimationController::replaceImplThreadAnimations):
1094         * platform/graphics/chromium/cc/CCLayerAnimationController.h:
1095         (CCLayerAnimationController):
1096         (WebCore::CCLayerAnimationController::setForceSync):
1097
1098 2012-05-11  Tommy Widenflycht  <tommyw@google.com>
1099
1100         MediaStream API: Fix a reference counting issue in UserMediaRequest
1101         https://bugs.webkit.org/show_bug.cgi?id=86210
1102
1103         Reviewed by Abhishek Arya.
1104
1105         When contextDestroyed() is called on UserMediaRequest it does a callback to the
1106         page client. If the receiving code clears their stored copy the UserMediaRequest
1107         object is destroyed in the middle of the call.
1108
1109         Currently only testable manually against chrome, preferably with asan turned on.
1110         I have added a manual test that verifies the fix, but I have started work
1111         to make DumpRenderTree able to test this and many other things. The first patch is here:
1112         https://bugs.webkit.org/show_bug.cgi?id=86215
1113
1114         * Modules/mediastream/UserMediaRequest.cpp:
1115         (WebCore::UserMediaRequest::contextDestroyed):
1116
1117 2012-05-11  Min Qin  <qinmin@google.com>
1118
1119         split MediaPlayer::enterFullscreen into 2 seperate functions
1120         https://bugs.webkit.org/show_bug.cgi?id=86052
1121
1122         Reviewed by Adam Barth.
1123
1124         It is confusing that enterFullscreen returns a boolean while exitFullscreen does
1125         not do the same. And ios does not need the return value.
1126         So remove the return value on enterFullscreen and make a seperate canEnterFullscreen()
1127         function for android.
1128         No tests as there are no behavior change, just refactoring.
1129
1130         * platform/graphics/MediaPlayer.cpp:
1131         (WebCore::MediaPlayer::enterFullscreen):
1132         (WebCore):
1133         (WebCore::MediaPlayer::canEnterFullscreen):
1134         * platform/graphics/MediaPlayer.h:
1135         (MediaPlayer):
1136         * platform/graphics/MediaPlayerPrivate.h:
1137         (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
1138         (MediaPlayerPrivateInterface):
1139         (WebCore::MediaPlayerPrivateInterface::canEnterFullscreen):
1140
1141 2012-05-11  Pavel Feldman  <pfeldman@chromium.org>
1142
1143         Web Inspector: move breakpoint manager from debuggerPresentationModel to WebInspector.
1144         https://bugs.webkit.org/show_bug.cgi?id=86220
1145
1146         Reviewed by Yury Semikhatsky.
1147
1148         Now that breakpoint manager does not depend on the source mapping instance from the
1149         debugger presentation model, it can be moved out.
1150
1151         * inspector/front-end/DebuggerPresentationModel.js:
1152         (WebInspector.DebuggerPresentationModel):
1153         * inspector/front-end/JavaScriptSource.js:
1154         (WebInspector.JavaScriptSource):
1155         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent.didFormatContent):
1156         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent):
1157         (WebInspector.JavaScriptSource.prototype.setFormatted):
1158         * inspector/front-end/JavaScriptSourceFrame.js:
1159         (WebInspector.JavaScriptSourceFrame):
1160         * inspector/front-end/ScriptsPanel.js:
1161         * inspector/front-end/inspector.js:
1162
1163 2012-05-11  David Reveman  <reveman@chromium.org>
1164
1165         [Chromium] Move instantiation of texture uploader to LayerRendererChromium.
1166         https://bugs.webkit.org/show_bug.cgi?id=85893
1167
1168         Reviewed by Adrienne Walker.
1169
1170         Move instantiation of texture uploader to LayerRendererChromium and
1171         allow CCProxy to decide between a throttled or unthrottled uploader
1172         using a flag passed to the LayerRendererChromium constructor.
1173
1174         * platform/graphics/chromium/LayerRendererChromium.cpp:
1175         (WebCore::LayerRendererChromium::create):
1176         (WebCore::LayerRendererChromium::LayerRendererChromium):
1177         (WebCore::LayerRendererChromium::initializeSharedObjects):
1178         * platform/graphics/chromium/LayerRendererChromium.h:
1179         (LayerRendererChromium):
1180         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1181         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
1182         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1183         (CCLayerTreeHostImpl):
1184         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1185         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
1186         (WebCore::CCSingleThreadProxy::recreateContext):
1187         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1188         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
1189         (WebCore::CCThreadProxy::recreateContextOnImplThread):
1190
1191 2012-05-10  Pavel Feldman  <pfeldman@chromium.org>
1192
1193         Web Inspector: pass source mapping into UISourceCode's constructor; move formatting outside mapping.
1194         https://bugs.webkit.org/show_bug.cgi?id=86099
1195
1196         Reviewed by Vsevolod Vlasov.
1197
1198         This changes moves formatting out of the source mapping machinery.
1199         As a result, it removes most of the DebuggerPresentation's mapping-related code as well
1200         as most of the raw source code's code.
1201
1202         * inspector/front-end/BreakpointManager.js:
1203         (WebInspector.BreakpointManager):
1204         (WebInspector.BreakpointManager.prototype.restoreBreakpoints):
1205         (WebInspector.BreakpointManager.Breakpoint):
1206         * inspector/front-end/CallStackSidebarPane.js:
1207         (WebInspector.CallStackSidebarPane.prototype.setStatus):
1208         * inspector/front-end/CompilerScriptMapping.js:
1209         * inspector/front-end/DebuggerPresentationModel.js:
1210         (WebInspector.DebuggerPresentationModel):
1211         (WebInspector.DebuggerPresentationModel.prototype._callFrameSelected):
1212         (WebInspector.DebuggerPresentationModel.prototype._handleUISourceCodeListChanged):
1213         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
1214         * inspector/front-end/JavaScriptSource.js:
1215         (WebInspector.JavaScriptSource):
1216         (WebInspector.JavaScriptSource.prototype.fireContentAvailable):
1217         (WebInspector.JavaScriptSource.prototype.setFormatted.if):
1218         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent.didFormatContent):
1219         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent):
1220         (WebInspector.JavaScriptSource.prototype.setFormatted):
1221         (WebInspector.JavaScriptSource.prototype.togglingFormatter):
1222         (WebInspector.JavaScriptSource.prototype.uiLocationToRawLocation):
1223         (WebInspector.JavaScriptSource.prototype.overrideLocation):
1224         (WebInspector.JavaScriptSource.prototype.breakpointStorageId):
1225         (WebInspector):
1226         * inspector/front-end/JavaScriptSourceFrame.js:
1227         (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged):
1228         (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved):
1229         * inspector/front-end/RawSourceCode.js:
1230         (WebInspector.RawSourceCode):
1231         (WebInspector.RawSourceCode.prototype.addScript):
1232         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
1233         (WebInspector.RawSourceCode.prototype._createUISourceCode):
1234         (WebInspector.RawSourceCode.prototype.uiLocationToRawLocation):
1235         (WebInspector.RawSourceCode.prototype.uiSourceCode):
1236         (WebInspector.RawSourceCode.prototype._finishedLoading):
1237         * inspector/front-end/ResourceScriptMapping.js:
1238         (WebInspector.ResourceScriptMapping):
1239         (WebInspector.ResourceScriptMapping.prototype.addScript):
1240         (WebInspector.ResourceScriptMapping.prototype._handleUISourceCodeChanged):
1241         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged):
1242         * inspector/front-end/Script.js:
1243         (WebInspector.Script.prototype.rawLocationToUILocation):
1244         * inspector/front-end/ScriptFormatter.js:
1245         (WebInspector.ScriptFormatter.prototype._didFormatContent):
1246         (WebInspector.FormatterSourceMapping):
1247         (WebInspector.FormatterSourceMapping.prototype.originalToFormatted):
1248         (WebInspector.FormatterSourceMapping.prototype.formattedToOriginal):
1249         (WebInspector.IdentityFormatterSourceMapping):
1250         (WebInspector.IdentityFormatterSourceMapping.prototype.originalToFormatted):
1251         (WebInspector.IdentityFormatterSourceMapping.prototype.formattedToOriginal):
1252         (WebInspector.FormatterSourceMappingImpl):
1253         (WebInspector.FormatterSourceMappingImpl.prototype.originalToFormatted):
1254         (WebInspector.FormatterSourceMappingImpl.prototype.formattedToOriginal):
1255         * inspector/front-end/ScriptMapping.js:
1256         (WebInspector.MainScriptMapping):
1257         (WebInspector.MainScriptMapping.prototype._handleUISourceCodeListChanged):
1258         (WebInspector.MainScriptMapping.prototype.reset):
1259         * inspector/front-end/ScriptsPanel.js:
1260         (WebInspector.ScriptsPanel.prototype._handleUISourceCodeAdded):
1261         (WebInspector.ScriptsPanel.prototype.showFunctionDefinition):
1262         (WebInspector.ScriptsPanel.prototype._showFile):
1263         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
1264         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
1265         * inspector/front-end/ScriptsSearchScope.js:
1266         (WebInspector.ScriptsSearchResultsPane.prototype.createAnchor):
1267         * inspector/front-end/SnippetsModel.js:
1268         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
1269         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
1270         * inspector/front-end/UISourceCode.js:
1271         (WebInspector.UISourceCode):
1272         (WebInspector.UISourceCode.prototype.requestContent):
1273         (WebInspector.UISourceCode.prototype.mimeType):
1274         (WebInspector.UISourceCode.prototype.content):
1275         (WebInspector.UISourceCode.prototype.fireContentAvailable):
1276         (WebInspector.UISourceCode.prototype.contentLoaded):
1277         (WebInspector.UISourceCode.prototype.uiLocationToRawLocation):
1278
1279 2012-05-11  Dominik Röttsches  <dominik.rottsches@intel.com>
1280
1281         [EFL][DRT] Input Attribute Placeholder RefTests failing
1282         https://bugs.webkit.org/show_bug.cgi?id=85603
1283
1284         Unreviewed, build fix for EFL.
1285
1286         * platform/efl/RenderThemeEfl.cpp:
1287
1288 2012-05-11  Alexei Filippov  <alexeif@chromium.org>
1289
1290         Web Inspector: Remove support of combined nodes and edges serialization schema.
1291         https://bugs.webkit.org/show_bug.cgi?id=86209
1292
1293         Reviewed by Yury Semikhatsky.
1294
1295         * inspector/front-end/HeapSnapshot.js:
1296         (WebInspector.HeapSnapshotNode.prototype.get _nodes):
1297         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesStart):
1298         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesEnd):
1299         (WebInspector.HeapSnapshot):
1300         (WebInspector.HeapSnapshot.prototype._init):
1301         (WebInspector.HeapSnapshot.prototype._buildRetainers):
1302         (WebInspector.HeapSnapshot.prototype._bfs):
1303         (WebInspector.HeapSnapshot.prototype._buildAggregates):
1304         (WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize):
1305         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
1306         * inspector/front-end/HeapSnapshotLoader.js:
1307         (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
1308
1309 2012-05-11  Yury Semikhatsky  <yurys@chromium.org>
1310
1311         Web Inspector: add Profiler.getHeapObjectId command
1312         https://bugs.webkit.org/show_bug.cgi?id=86211
1313
1314         Reviewed by Pavel Feldman.
1315
1316         Added Profiler.getHeapObjectId command to the protocol which allows to convert remote
1317         object id to heap snapshot object id.
1318
1319         * bindings/js/ScriptProfiler.cpp:
1320         (WebCore::ScriptProfiler::getHeapObjectId):
1321         (WebCore):
1322         * bindings/js/ScriptProfiler.h:
1323         (WebCore):
1324         (ScriptProfiler):
1325         * bindings/v8/ScriptProfiler.cpp:
1326         (WebCore::ScriptProfiler::getHeapObjectId):
1327         (WebCore):
1328         * bindings/v8/ScriptProfiler.h:
1329         (WebCore):
1330         (ScriptProfiler):
1331         * inspector/InjectedScript.cpp:
1332         (WebCore::InjectedScript::findObjectById):
1333         (WebCore):
1334         * inspector/InjectedScript.h:
1335         (InjectedScript):
1336         * inspector/InjectedScriptSource.js:
1337         (.):
1338         * inspector/Inspector.json:
1339         * inspector/InspectorProfilerAgent.cpp:
1340         (WebCore::InspectorProfilerAgent::getHeapObjectId):
1341         (WebCore):
1342         * inspector/InspectorProfilerAgent.h:
1343         (InspectorProfilerAgent):
1344
1345 2012-05-11  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1346
1347         Qt support for new layout types.
1348         https://bugs.webkit.org/show_bug.cgi?id=85607
1349
1350         Reviewed by Simon Hausmann.
1351
1352         Adds similar Qt support to FractionalLayout classes as Qt has for
1353         FloatSomething and IntSomething classes. This means Qt code can stay
1354         unchanged from after the redefinition of Layout classes.
1355
1356         No new functionality. No new tests.
1357
1358         * Target.pri:
1359         * platform/FractionalLayoutUnit.h:
1360         (WebCore::operator<<):
1361         (WebCore::operator>>):
1362         * platform/graphics/FractionalLayoutPoint.h:
1363         (FractionalLayoutPoint):
1364         * platform/graphics/FractionalLayoutRect.h:
1365         (FractionalLayoutRect):
1366         * platform/graphics/FractionalLayoutSize.h:
1367         (FractionalLayoutSize):
1368         * platform/graphics/qt/FractionalLayoutPointQt.cpp: Added.
1369         (WebCore::FractionalLayoutPoint::FractionalLayoutPoint):
1370         (WebCore::FractionalLayoutPoint::operator QPointF):
1371         * platform/graphics/qt/FractionalLayoutRectQt.cpp: Added.
1372         (WebCore::FractionalLayoutRect::FractionalLayoutRect):
1373         (WebCore::FractionalLayoutRect::operator QRectF):
1374         * platform/graphics/qt/FractionalLayoutSizeQt.cpp: Added.
1375         (WebCore::FractionalLayoutSize::FractionalLayoutSize):
1376         (WebCore::FractionalLayoutSize::operator QSizeF):
1377
1378 2012-05-11  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1379
1380         Internals::touchPositionAdjustedToBestClickableNode adjust twice for scroll-offset
1381         https://bugs.webkit.org/show_bug.cgi?id=86205
1382
1383         Reviewed by Simon Hausmann.
1384
1385         Remove the redundant conversion from document to window coords.
1386
1387         Test: touchadjustment/scroll-offset.html
1388
1389         * testing/Internals.cpp:
1390         (WebCore::Internals::touchPositionAdjustedToBestClickableNode):
1391         (WebCore::Internals::bestZoomableAreaForTouchPoint):
1392
1393 2012-05-11  Ilya Tikhonovsky  <loislo@chromium.org>
1394
1395         Web Inspector: load heap snapshot implementation.
1396         https://bugs.webkit.org/show_bug.cgi?id=86097
1397
1398         The idea is to have a hidden file selector control.
1399         When the user select a context menu item or click a button
1400         we redirect this user-action to file selector.
1401         As result we see the standard file selector dialog.
1402         When the user selects a file we load it's chunks and push the chunks to the worker.
1403         The loaded snapshot can be completely unrelated to the current page.
1404         Thats why we have to skip range selection options in Summary tab.
1405
1406         Reviewed by Yury Semikhatsky.
1407
1408         * English.lproj/localizedStrings.js:
1409         * inspector/front-end/CSSSelectorProfileView.js:
1410         (WebInspector.CSSSelectorProfileType.prototype.createTemporaryProfile): now it accepts a custom title.
1411         * inspector/front-end/HeapSnapshotView.js:
1412         (WebInspector.HeapSnapshotView.prototype._updateFilterOptions): we have to skip the profiles loaded from file because there is no guaranty t
1413         (WebInspector.HeapSnapshotProfileType.prototype.createTemporaryProfile): now it accepts a custom title.
1414         (WebInspector.HeapSnapshotProfileType.prototype.createProfile): cosmetic changes.
1415         (WebInspector.HeapProfileHeader):
1416         (WebInspector.HeapProfileHeader.prototype._setupWorker): a common part was extracted from load method and reused in loadFromFile.
1417         (WebInspector.HeapProfileHeader.prototype._saveStatusUpdate): cosmetic changes.
1418         (WebInspector.HeapProfileHeader.prototype.finishHeapSnapshot):
1419         (WebInspector.HeapProfileHeader.prototype.canSaveToFile): cosmetic rename for better consistency with 'load' part.
1420         (WebInspector.HeapProfileHeader.prototype.saveToFile): cosmetic rename for better consistency with 'load' part.
1421         (WebInspector.HeapProfileHeader.prototype.canLoadFromFile): cosmetic rename for better consistency with 'load' part.
1422         (WebInspector.HeapProfileHeader.prototype.loadFromFile): chunk based file loader.
1423         (WebInspector.HeapProfileHeader.prototype.loadFromFile.loadNextChunk):
1424         (WebInspector.HeapProfileHeader.prototype.loadFromFile.onLoad):
1425         * inspector/front-end/ProfileView.js:
1426         (WebInspector.CPUProfileType.prototype.createTemporaryProfile): now it accepts a custom title.
1427         * inspector/front-end/ProfilesPanel.js:
1428         (WebInspector.ProfileType.prototype.createTemporaryProfile): now it accepts a custom title.
1429         (WebInspector.ProfileHeader.prototype.canSaveToFile): cosmetic rename for better consistency with 'load' part.
1430         (WebInspector.ProfileHeader.prototype.saveToFile): cosmetic rename for better consistency with 'load' part.
1431         (WebInspector.ProfileHeader.prototype.canLoadFromFile): default implementation for 'load' part.
1432         (WebInspector.ProfileHeader.prototype.loadFromFile): default implementation for 'load' part.
1433         (WebInspector.ProfilesPanel.prototype._createFileSelectorElement):
1434         (WebInspector.ProfilesPanel.prototype._loadFromFile):
1435         (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
1436
1437 2012-05-11  Dominik Röttsches  <dominik.rottsches@intel.com>
1438
1439         [EFL][DRT] Input Attribute Placeholder RefTests failing
1440         https://bugs.webkit.org/show_bug.cgi?id=85603
1441
1442         Reviewed by Hajime Morita.
1443
1444         Refrain from overriding style coloring by theme coloring.
1445         RenderThemeEfl was always overriding colors and whitespace
1446         handling leading to failures in reftests that verify placeholder styling
1447         which expect the user agent stylesheet to be applied correctly
1448         without any color overrides. Also, leave whitespace handling untouched.
1449
1450         No new tests, covered by existing tests. See also
1451         the LayoutTests/ChangeLog in this commit for the required
1452         rebaselining.
1453
1454         * platform/efl/RenderThemeEfl.cpp:
1455         (WebCore::RenderThemeEfl::createEdje):
1456         (WebCore::RenderThemeEfl::applyEdjeColors):
1457         (WebCore::RenderThemeEfl::RenderThemeEfl):
1458         (WebCore::RenderThemeEfl::adjustButtonStyle):
1459         (WebCore::RenderThemeEfl::adjustMenuListStyle):
1460         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
1461         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
1462         * platform/efl/RenderThemeEfl.h:
1463         (RenderThemeEfl):
1464
1465 2012-05-11  Christophe Dumez  <christophe.dumez@intel.com>
1466
1467         Web Intents code only supports V8
1468         https://bugs.webkit.org/show_bug.cgi?id=85954
1469
1470         Reviewed by Adam Barth.
1471
1472         Add necessary abstraction for js Dictionary and ScriptValue so that
1473         the Web Intents code in WebCore compiles with JSC, not just V8.
1474
1475         This required changes in the JSC bindings generator to pass
1476         callback arguments of type SerializedScriptValue as raw pointers
1477         instead of RefPtr. This matches the change made to the V8 bindings
1478         generator in r104531.
1479
1480         * CMakeLists.txt:
1481         * Modules/intents/Intent.cpp:
1482         * Modules/intents/Intent.h:
1483         * bindings/js/Dictionary.cpp:
1484         (WebCore::Dictionary::Dictionary):
1485         (WebCore):
1486         (WebCore::Dictionary::getOwnPropertiesAsStringHashMap):
1487         * bindings/js/Dictionary.h:
1488         (Dictionary):
1489         * bindings/js/JSBindingsAllInOne.cpp:
1490         * bindings/js/JSDictionary.cpp:
1491         (WebCore::JSDictionary::convertValue):
1492         (WebCore):
1493         * bindings/js/JSDictionary.h:
1494         (WebCore):
1495         (WebCore::JSDictionary::initializerObject):
1496         * bindings/js/ScriptValue.cpp:
1497         (WebCore::ScriptValue::serialize):
1498         (WebCore):
1499         * bindings/js/ScriptValue.h:
1500         (ScriptValue):
1501         * bindings/scripts/CodeGeneratorJS.pm:
1502         (AddIncludesForType):
1503         (GenerateCallbackHeader):
1504         (GenerateCallbackImplementation):
1505         (GetNativeTypeForCallbacks):
1506
1507 2012-05-11  Alexander Pavlov  <apavlov@chromium.org>
1508
1509         Web Inspector: Can't type spaces in "Override User Agent" field
1510         https://bugs.webkit.org/show_bug.cgi?id=86202
1511
1512         Reviewed by Yury Semikhatsky.
1513
1514         * inspector/front-end/HelpScreen.js:
1515         (WebInspector.HelpScreen.prototype.isClosingKey):
1516         (WebInspector.HelpScreen.prototype._onKeyDown):
1517         * inspector/front-end/SettingsScreen.js:
1518         (WebInspector.SettingsScreen.prototype.isClosingKey):
1519
1520 2012-05-11  Dominik Röttsches  <dominik.rottsches@intel.com>
1521
1522         [EFL][DRT] Input Attribute Placeholder RefTests failing
1523         https://bugs.webkit.org/show_bug.cgi?id=85603
1524
1525         Reviewed by Hajime Morita.
1526
1527         Refrain from overriding style coloring by theme coloring.
1528         RenderThemeEfl was always overriding colors and whitespace
1529         handling leading to failures in reftests that verify placeholder styling
1530         which expect the user agent stylesheet to be applied correctly
1531         without any color overrides. Also, leave whitespace handling untouched.
1532
1533         No new tests, covered by existing tests. See also
1534         the LayoutTests/ChangeLog in this commit for the required
1535         rebaselining.
1536
1537         * platform/efl/RenderThemeEfl.cpp:
1538         (WebCore::RenderThemeEfl::createEdje):
1539         (WebCore::RenderThemeEfl::applyEdjeColors):
1540         (WebCore::RenderThemeEfl::RenderThemeEfl):
1541         (WebCore::RenderThemeEfl::adjustButtonStyle):
1542         (WebCore::RenderThemeEfl::adjustMenuListStyle):
1543         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
1544         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
1545         * platform/efl/RenderThemeEfl.h:
1546         (RenderThemeEfl):
1547
1548 2012-05-11  Gustavo Noronha Silva  <gns@gnome.org>
1549
1550         REGRESSION(r116205): [GTK]: build no longer supports thin archives
1551         https://bugs.webkit.org/show_bug.cgi?id=86207
1552
1553         * GNUmakefile.am: go back to not linking libWebCoreModules into
1554         libWebCore; when linking 2 convenience libraries libtools tries to
1555         extract the object files from one of them to add to the other, breaking
1556         thin archive builds
1557
1558 2012-05-11  Keishi Hattori  <keishi@webkit.org>
1559
1560         Sanitization algorithm for input type=email should strip whitespaces
1561         https://bugs.webkit.org/show_bug.cgi?id=86177
1562
1563         Reviewed by Kent Tamura.
1564
1565         No new tests. Covered by: fast/forms/ValidityState-typeMismatch-email.html
1566
1567         The spec says that the value sanitization algorithm should
1568         > Strip line breaks from the value, then strip leading and trailing whitespace from the value.
1569
1570         * html/EmailInputType.cpp:
1571         (WebCore::EmailInputType::sanitizeValue):
1572
1573 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1574
1575         Unreviewed, rolling out r116752.
1576         http://trac.webkit.org/changeset/116752
1577         https://bugs.webkit.org/show_bug.cgi?id=86201
1578
1579         Build failure on Chromium-mac (Requested by tkent on #webkit).
1580
1581         * html/FormAssociatedElement.cpp:
1582         * html/FormAssociatedElement.h:
1583         (FormAssociatedElement):
1584         * html/HTMLFormControlElement.cpp:
1585         (WebCore::HTMLFormControlElement::setCustomValidity):
1586         * html/HTMLFormControlElement.h:
1587         (HTMLFormControlElement):
1588         * html/HTMLInputElement.cpp:
1589         (WebCore::HTMLInputElement::isValidValue):
1590         (WebCore::HTMLInputElement::typeMismatch):
1591         (WebCore::HTMLInputElement::valueMissing):
1592         (WebCore::HTMLInputElement::patternMismatch):
1593         (WebCore::HTMLInputElement::rangeUnderflow):
1594         (WebCore::HTMLInputElement::rangeOverflow):
1595         (WebCore::HTMLInputElement::minimum):
1596         (WebCore::HTMLInputElement::maximum):
1597         (WebCore::HTMLInputElement::stepMismatch):
1598         (WebCore::HTMLInputElement::minimumString):
1599         (WebCore::HTMLInputElement::maximumString):
1600         (WebCore):
1601         (WebCore::HTMLInputElement::stepBaseString):
1602         (WebCore::HTMLInputElement::stepString):
1603         (WebCore::HTMLInputElement::typeMismatchText):
1604         (WebCore::HTMLInputElement::valueMissingText):
1605         (WebCore::HTMLInputElement::isInRange):
1606         (WebCore::HTMLInputElement::isOutOfRange):
1607         * html/HTMLInputElement.h:
1608         (HTMLInputElement):
1609         * html/HTMLObjectElement.h:
1610         (WebCore::HTMLObjectElement::setCustomValidity):
1611         * html/HTMLSelectElement.cpp:
1612         (WebCore::HTMLSelectElement::valueMissing):
1613         * html/HTMLSelectElement.h:
1614         (HTMLSelectElement):
1615         * html/HTMLTextAreaElement.cpp:
1616         * html/HTMLTextAreaElement.h:
1617         (WebCore::HTMLTextAreaElement::valueMissing):
1618         (HTMLTextAreaElement):
1619         * html/InputType.cpp:
1620         (WebCore::InputType::alignValueForStep):
1621         (WebCore::InputType::stepUpFromRenderer):
1622         * html/InputType.h:
1623         (InputType):
1624         * html/ValidityState.cpp:
1625         (WebCore::ValidityState::validationMessage):
1626         (WebCore):
1627         (WebCore::ValidityState::setCustomErrorMessage):
1628         (WebCore::ValidityState::valueMissing):
1629         (WebCore::ValidityState::typeMismatch):
1630         (WebCore::ValidityState::patternMismatch):
1631         (WebCore::ValidityState::tooLong):
1632         (WebCore::ValidityState::rangeUnderflow):
1633         (WebCore::ValidityState::rangeOverflow):
1634         (WebCore::ValidityState::stepMismatch):
1635         (WebCore::ValidityState::customError):
1636         (WebCore::ValidityState::valid):
1637         * html/ValidityState.h:
1638         (ValidityState):
1639
1640 2012-05-11  Alexander Pavlov  <apavlov@chromium.org>
1641
1642         Web Inspector: Search box doesn't allow CSS selectors anymore
1643         https://bugs.webkit.org/show_bug.cgi?id=86196
1644
1645         Reviewed by Pavel Feldman.
1646
1647         Refactoring in http://trac.webkit.org/changeset/99983 inadvertently removed the selector matching during
1648         node search in the InspectorDOMAgent. This change re-introduces the Document::querySelectorAll() evaluation
1649         for the user query.
1650
1651         * inspector/InspectorDOMAgent.cpp:
1652         (WebCore::InspectorDOMAgent::performSearch):
1653
1654 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1655
1656         Unreviewed, rolling out r116527.
1657         http://trac.webkit.org/changeset/116527
1658         https://bugs.webkit.org/show_bug.cgi?id=86199
1659
1660         Causing crashes on ClusterFuzz (Requested by inferno-sec on
1661         #webkit).
1662
1663         * rendering/RenderScrollbar.cpp:
1664         (WebCore::RenderScrollbar::updateScrollbarPart):
1665         * rendering/RenderScrollbarPart.h:
1666
1667 2012-05-11  Yoshifumi Inoue  <yosin@chromium.org>
1668
1669         [Forms] Move ValidityState methods implementation to another place
1670         https://bugs.webkit.org/show_bug.cgi?id=86058
1671
1672         Reviewed by Kent Tamura.
1673
1674         This patch changes ValidityState class for limiting scope of
1675         number/range input type related methods for introducing decimal
1676         arithmetic.
1677
1678         Methods related to validation are moved from ValidateState to
1679         input, select and textarea elements with virtual method based
1680         dispatching via FormAssociateElement instead of tag name
1681         dispatching so far for code simplification.
1682
1683         No new tests. This patch doesn't change behavior.
1684
1685         * html/FormAssociatedElement.cpp:
1686         (WebCore::FormAssociatedElement::customError): Added. Called from ValidateState. Returns custom error mssage in member variable.
1687         (WebCore::FormAssociatedElement::patternMismatch): Added.  Called from ValidateState. This is default implementation.
1688         (WebCore::FormAssociatedElement::rangeOverflow): Added.  Called from ValidateState. This is default implementation.
1689         (WebCore::FormAssociatedElement::rangeUnderflow): Added.  Called from ValidateState. This is default implementation.
1690         (WebCore::FormAssociatedElement::stepMismatch): Added.  Called from ValidateState. This is default implementation.
1691         (WebCore::FormAssociatedElement::tooLong): Added.  Called from ValidateState. This is default implementation.
1692         (WebCore::FormAssociatedElement::typeMismatch): Added.  Called from ValidateState. This is default implementation.
1693         (WebCore::FormAssociatedElement::valid): Added.  Called from ValidateState. This is default implementation.
1694         (WebCore::FormAssociatedElement::valueMissing): Added.  Called from ValidateState. This is default implementation.
1695         (WebCore::FormAssociatedElement::customValidationMessage): Added.  Called from ValidateState. This is default implementation.
1696         (WebCore::FormAssociatedElement::validationMessage): Added.  Called from ValidateState. This is default implementation.
1697         (WebCore::FormAssociatedElement::setCustomValidity): Added.  set custom error message.
1698         * html/FormAssociatedElement.h:
1699         (FormAssociatedElement): Added new instance value m_customValidationMessage.
1700         * html/HTMLFormControlElement.cpp:
1701         (WebCore::HTMLFormControlElement::setCustomValidity): Changed. Calls base class setCustomValidity.
1702         * html/HTMLFormControlElement.h:
1703         (HTMLFormControlElement):
1704         * html/HTMLInputElement.cpp:
1705         (WebCore::HTMLInputElement::isValidValue): Call m_inputType methods instead of HTMLInputElement's.
1706         (WebCore::HTMLInputElement::tooLong): Call m_inputType methods instead of HTMLInputElement's.
1707         (WebCore):
1708         (WebCore::HTMLInputElement::typeMismatch): Move implementation to InputType.
1709         (WebCore::HTMLInputElement::valueMissing):  Move implementation to InputType.
1710         (WebCore::HTMLInputElement::patternMismatch): Move implementation to InputType.
1711         (WebCore::HTMLInputElement::rangeUnderflow): Move implementation to InputType.
1712         (WebCore::HTMLInputElement::rangeOverflow): Move implementation to InputType.
1713         (WebCore::HTMLInputElement::validationMessage): Move implementation to InputType.
1714         (WebCore::HTMLInputElement::stepMismatch): Move implementation to InputType.
1715         (WebCore::HTMLInputElement::isInRange): Call m_inputType methods instead of HTMLInputElement's.
1716         (WebCore::HTMLInputElement::isOutOfRange): Call m_inputType methods instead of HTMLInputElement's.
1717         * html/HTMLInputElement.h:
1718         (HTMLInputElement): Make tooLong method private.
1719         * html/HTMLObjectElement.h: Add "virtual" and "OVERRIDE".
1720         * html/HTMLSelectElement.cpp:
1721         (WebCore::HTMLSelectElement::validationMessage): Added. Implementation for HTMLSelectElement.
1722         (WebCore::HTMLSelectElement::valueMissing): Added. Implementation for HTMLSelectElement.
1723         * html/HTMLSelectElement.h:
1724         (HTMLSelectElement):  Added entries for newly added methods.
1725         * html/HTMLTextAreaElement.cpp:
1726         (WebCore::HTMLTextAreaElement::validationMessage): Added. Implementation for HTMLTextAreaElement.
1727         (WebCore::HTMLTextAreaElement::valueMissing): Added. Implementation for HTMLTextAreaElement.
1728         (WebCore::HTMLTextAreaElement::tooLong): Added. Implementation for HTMLTextAreaElement.
1729         * html/HTMLTextAreaElement.h:
1730         (HTMLTextAreaElement): Added entries for newly added methods. Change tooLong and valueMissing private.
1731         * html/InputType.cpp:
1732         (WebCore::InputType::stepMismatch): Change method signature.
1733         (WebCore::InputType::alignValueForStep):  Changed for calling InputClass instead of HTMLINputElement.
1734         (WebCore::InputType::stepUpFromRenderer):  Added. Moved from HTMLInputElement.
1735         (WebCore::InputType::validationMessage): Added.  Moved from HTMLInputElement.
1736         * html/InputType.h:
1737         (InputType): Added entries for newly added methods and update methods signature.
1738         * html/ValidityState.cpp: Move actual implementation to FormAssociatedElement and derived classes for localizing implementation change of elements and input types.
1739         (WebCore::ValidityState::validationMessage): Changed to call FormAssociatedElement's method.
1740         (WebCore::ValidityState::valueMissing): Changed to call FormAssociatedElement's method.
1741         (WebCore::ValidityState::typeMismatch): Changed to call FormAssociatedElement's method.
1742         (WebCore::ValidityState::patternMismatch): Changed to call FormAssociatedElement's method.
1743         (WebCore::ValidityState::tooLong): Changed to call FormAssociatedElement's method.
1744         (WebCore::ValidityState::rangeUnderflow): Changed to call FormAssociatedElement's method.
1745         (WebCore::ValidityState::rangeOverflow): Changed to call FormAssociatedElement's method.
1746         (WebCore::ValidityState::stepMismatch): Changed to call FormAssociatedElement's method.
1747         (WebCore::ValidityState::customError): Changed to call FormAssociatedElement's method.
1748         (WebCore::ValidityState::valid):
1749         * html/ValidityState.h:
1750         (ValidityState): Remove custom validation message related things.
1751
1752 2012-05-11  Kent Tamura  <tkent@chromium.org>
1753
1754         Fix a build error without SVG, introduced by tab-size support.
1755
1756         * css/StyleResolver.cpp:
1757         (WebCore::StyleResolver::collectMatchingRulesForList):
1758
1759 2012-05-11  Shinya Kawanaka  <shinyak@chromium.org>
1760
1761         [Refactoring] Move Selection from DOMWindow to TreeScope.
1762         https://bugs.webkit.org/show_bug.cgi?id=82699
1763
1764         Reviewed by Ryosuke Niwa.
1765
1766         Since ShadowRoot will also manage its own version of DOMSelection, we would like to
1767         share the code among Document and DOMSelection. This patch moves DOMSelection from DOMWindow to TreeScope
1768         so that ShadowRoot can also use it.
1769
1770         No new tests, should covered by existing tests.
1771
1772         * dom/Document.cpp:
1773         (WebCore::Document::updateFocusAppearanceTimerFired):
1774         * dom/Document.h:
1775         (Document):
1776         * dom/ShadowRoot.cpp:
1777         (WebCore::ShadowRoot::selection):
1778         * dom/TreeScope.cpp:
1779         (WebCore::TreeScope::~TreeScope):
1780         (WebCore::TreeScope::getSelection):
1781         (WebCore):
1782         * dom/TreeScope.h:
1783         (WebCore):
1784         (TreeScope):
1785         * page/DOMSelection.cpp:
1786         (WebCore::DOMSelection::DOMSelection):
1787         (WebCore::DOMSelection::clearTreeScope):
1788         (WebCore):
1789         * page/DOMSelection.h:
1790         (WebCore):
1791         (WebCore::DOMSelection::create):
1792         (DOMSelection):
1793         * page/DOMWindow.cpp:
1794         (WebCore::DOMWindow::~DOMWindow):
1795         (WebCore::DOMWindow::clearDOMWindowProperties):
1796         (WebCore::DOMWindow::getSelection):
1797         * page/DOMWindow.h:
1798         (DOMWindow):
1799
1800 2012-05-04  Yury Semikhatsky  <yurys@chromium.org>
1801
1802         Web Inspector: console should allow JS execution in the context of an isolated world
1803         https://bugs.webkit.org/show_bug.cgi?id=85612
1804
1805         Reviewed by Pavel Feldman.
1806
1807         Added an option to select not only a frame but also isolated world in which
1808         to perform evaluation of the code typed into the console.
1809
1810         Each execution context can be identified using it injected script id. We call it
1811         execution context id in the protocol. Runtime agent is extended with an event that
1812         is sent when new ExecutionContext is created. The event tracking can be enabled/disabled
1813         using setReportExecutionContextCreation command.
1814
1815         * bindings/js/ScriptController.cpp:
1816         (WebCore):
1817         (WebCore::isolatedWorldToSecurityOriginMap):
1818         * bindings/js/ScriptController.h:
1819         (ScriptController):
1820         * bindings/js/ScriptState.cpp:
1821         (WebCore::isolatedWorldScriptState):
1822         (WebCore):
1823         * bindings/js/ScriptState.h:
1824         (WebCore):
1825         * bindings/v8/ScriptController.cpp:
1826         (WebCore):
1827         (WebCore::ScriptController::isolatedWorldToSecurityOriginMap):
1828         * bindings/v8/ScriptController.h:
1829         (ScriptController):
1830         * bindings/v8/ScriptState.cpp:
1831         (WebCore::isolatedWorldScriptState):
1832         (WebCore):
1833         * bindings/v8/ScriptState.h:
1834         (WebCore):
1835         * bindings/v8/V8IsolatedContext.cpp:
1836         (WebCore::V8IsolatedContext::setSecurityOrigin):
1837         * bindings/v8/V8Proxy.cpp:
1838         (WebCore::V8Proxy::setIsolatedWorldSecurityOrigin):
1839         (WebCore::V8Proxy::isolatedWorldContext):
1840         (WebCore):
1841         (WebCore::V8Proxy::isolatedWorldToSecurityOriginMap):
1842         * bindings/v8/V8Proxy.h:
1843         (V8Proxy):
1844         * inspector/CodeGeneratorInspector.py:
1845         (DomainNameFixes):
1846         * inspector/Inspector.json:
1847         * inspector/InspectorInstrumentation.cpp:
1848         (WebCore::InspectorInstrumentation::didCreateIsolatedContextImpl):
1849         (WebCore):
1850         * inspector/InspectorInstrumentation.h:
1851         (WebCore):
1852         (InspectorInstrumentation):
1853         (WebCore::InspectorInstrumentation::didCreateIsolatedContext):
1854         * inspector/InspectorRuntimeAgent.cpp:
1855         (WebCore::InspectorRuntimeAgent::evaluate):
1856         * inspector/InspectorRuntimeAgent.h:
1857         (InspectorRuntimeAgent):
1858         * inspector/InstrumentingAgents.h:
1859         (WebCore):
1860         (WebCore::InstrumentingAgents::InstrumentingAgents):
1861         (WebCore::InstrumentingAgents::pageRuntimeAgent):
1862         (WebCore::InstrumentingAgents::setPageRuntimeAgent):
1863         (InstrumentingAgents):
1864         * inspector/PageRuntimeAgent.cpp:
1865         (PageRuntimeAgentState):
1866         (WebCore):
1867         (WebCore::PageRuntimeAgent::PageRuntimeAgent):
1868         (WebCore::PageRuntimeAgent::setFrontend):
1869         (WebCore::PageRuntimeAgent::clearFrontend):
1870         (WebCore::PageRuntimeAgent::restore):
1871         (WebCore::PageRuntimeAgent::setReportExecutionContextCreation):
1872         (WebCore::PageRuntimeAgent::didCreateExecutionContext):
1873         (WebCore::PageRuntimeAgent::getScriptStateForEval):
1874         * inspector/PageRuntimeAgent.h:
1875         (WebCore):
1876         (PageRuntimeAgent):
1877         * inspector/WorkerRuntimeAgent.cpp:
1878         (WebCore::WorkerRuntimeAgent::setReportExecutionContextCreation):
1879         (WebCore::WorkerRuntimeAgent::getScriptStateForEval):
1880         * inspector/WorkerRuntimeAgent.h:
1881         (WorkerRuntimeAgent):
1882         * inspector/front-end/ConsoleView.js:
1883         (WebInspector.ConsoleView.prototype.get statusBarItems):
1884         (WebInspector.ConsoleView.prototype.addContext):
1885         (WebInspector.ConsoleView.prototype.removeContext):
1886         (WebInspector.ConsoleView.prototype._updateIsolatedWorldSelector):
1887         (WebInspector.ConsoleView.prototype._contextUpdated):
1888         (WebInspector.ConsoleView.prototype._addedExecutionContext):
1889         (WebInspector.ConsoleView.prototype._currentEvaluationContextId):
1890         (WebInspector.ConsoleView.prototype._currentEvaluationContext):
1891         (WebInspector.ConsoleView.prototype._currentIsolatedWorldId):
1892         (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
1893         * inspector/front-end/ExtensionPanel.js:
1894         (WebInspector.ExtensionSidebarPane.prototype.setExpression):
1895         * inspector/front-end/ExtensionServer.js:
1896         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
1897         * inspector/front-end/JavaScriptContextManager.js:
1898         (WebInspector.JavaScriptContextManager):
1899         (WebInspector.JavaScriptContextManager.prototype._didLoadCachedResources):
1900         (WebInspector.JavaScriptContextManager.prototype.isolatedContextCreated):
1901         (WebInspector.RuntimeDispatcher):
1902         (WebInspector.RuntimeDispatcher.prototype.isolatedContextCreated):
1903         (WebInspector.ExecutionContext):
1904         (WebInspector.ExecutionContext.comparator):
1905         (WebInspector.FrameEvaluationContext):
1906         (WebInspector.FrameEvaluationContext.prototype._frameNavigated):
1907         (WebInspector.FrameEvaluationContext.prototype._addExecutionContext):
1908         (WebInspector.FrameEvaluationContext.prototype._ensureMainWorldContextAdded):
1909         (WebInspector.FrameEvaluationContext.prototype.isolatedContexts):
1910
1911 2012-05-11  Andrey Kosyakov  <caseq@chromium.org>
1912
1913         Web Inspector: use div, not span as a parent element for ElementsTreeOutline in Audits panel
1914         https://bugs.webkit.org/show_bug.cgi?id=86188
1915
1916         Reviewed by Yury Semikhatsky.
1917
1918         We need to use <div>, not <span> as a container for ElementsTreeOutline, as latter accesses its parent offsetWidth
1919         within _treeElementFromEvent(), which returns 0 for inline elements.
1920
1921         * inspector/front-end/AuditFormatters.js:
1922         (WebInspector.AuditFormatters.node.onNodeAvailable):
1923         (WebInspector.AuditFormatters.node):
1924
1925 2012-05-11  Antti Koivisto  <antti@apple.com>
1926
1927         Inline Node::traverseNextNode
1928         https://bugs.webkit.org/show_bug.cgi?id=85844
1929
1930         Reviewed by Ryosuke Niwa.
1931         
1932         Inline traverseNextNode and traverseNextSibling to reduce entry/exit overhead and allow better code generation
1933         for many hot loops.
1934
1935         In this version only the firstChild()/nextSibling() tests are inlined and the ancestor traversal is not.
1936         
1937         Performance bots will tell if this was worthwhile.
1938
1939         * dom/ContainerNode.h:
1940         (WebCore::Node::traverseNextNode):
1941         (WebCore):
1942         (WebCore::Node::traverseNextSibling):
1943         * dom/Node.cpp:
1944         (WebCore::Node::traverseNextAncestorSibling):
1945         * dom/Node.h:
1946         (Node):
1947         * bindings/v8/RetainedDOMInfo.cpp:
1948
1949 2012-05-07  Yury Semikhatsky  <yurys@chromium.org>
1950
1951         Web Inspector: get rid of InspectorAgent::emitCommitLoadIfNeeded method
1952         https://bugs.webkit.org/show_bug.cgi?id=85708
1953
1954         Reviewed by Pavel Feldman.
1955
1956         Instead of calling emitCommitLoadIfNeeded after all agents are restored
1957         required actions are performed directly in the restore() methods.
1958
1959         * inspector/InspectorAgent.cpp:
1960         * inspector/InspectorAgent.h:
1961         (WebCore::InspectorAgent::didCommitLoadFired):
1962         * inspector/InspectorController.cpp:
1963         (WebCore::InspectorController::InspectorController):
1964         (WebCore::InspectorController::restoreInspectorStateFromCookie):
1965         * inspector/InspectorDatabaseAgent.cpp:
1966         (WebCore::InspectorDatabaseAgent::restore):
1967         * inspector/InspectorPageAgent.cpp:
1968         (WebCore::InspectorPageAgent::create):
1969         (WebCore::InspectorPageAgent::InspectorPageAgent):
1970         (WebCore::InspectorPageAgent::restore):
1971         * inspector/InspectorPageAgent.h:
1972         (WebCore):
1973         * inspector/InspectorResourceAgent.cpp:
1974         (WebCore::InspectorResourceAgent::restore):
1975
1976 2012-05-10  Andrey Kosyakov  <caseq@chromium.org>
1977
1978         Web Inspector: [Extensions API] add audit formatters for remote objects and DOM elements
1979         https://bugs.webkit.org/show_bug.cgi?id=86108
1980
1981         Reviewed by Pavel Feldman.
1982
1983        - added two new formatters to AuditResults object of webInspector.audits API;
1984
1985         * inspector/front-end/AuditFormatters.js:
1986         (WebInspector.AuditFormatters.resourceLink):
1987         (WebInspector.AuditFormatters.object.onEvaluate):
1988         (WebInspector.AuditFormatters.object): format as a remote object property list;
1989         (WebInspector.AuditFormatters.node.onNodeAvailable):
1990         (WebInspector.AuditFormatters.node.onEvaluate):
1991         (WebInspector.AuditFormatters.node): format as a DOM elements sub-tree;
1992         (WebInspector.AuditFormatters.Utilities.evaluate): common expression evaluation logic for both new formatters;
1993         * inspector/front-end/ExtensionAPI.js:
1994         (injectedExtensionAPI.AuditResultImpl):
1995         * inspector/front-end/auditsPanel.css:
1996         (.audit-result-tree ol.outline-disclosure):
1997         (.audit-result-tree .section .header):
1998         (.audit-result-tree .section .header::before):
1999
2000 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2001
2002         Unreviewed, rolling out r116727.
2003         http://trac.webkit.org/changeset/116727
2004         https://bugs.webkit.org/show_bug.cgi?id=86181
2005
2006         Build error on Chromium-Android (Requested by tkent on
2007         #webkit).
2008
2009         * platform/graphics/MediaPlayer.cpp:
2010         (WebCore::MediaPlayer::enterFullscreen):
2011         (WebCore):
2012         * platform/graphics/MediaPlayer.h:
2013         (MediaPlayer):
2014         * platform/graphics/MediaPlayerPrivate.h:
2015         (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
2016         (MediaPlayerPrivateInterface):
2017
2018 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2019
2020         Unreviewed, rolling out r116731.
2021         http://trac.webkit.org/changeset/116731
2022         https://bugs.webkit.org/show_bug.cgi?id=86178
2023
2024         Build failure on Chromium-mac (Requested by tkent on #webkit).
2025
2026         * platform/graphics/chromium/LayerRendererChromium.cpp:
2027         (WebCore::LayerRendererChromium::create):
2028         (WebCore::LayerRendererChromium::LayerRendererChromium):
2029         (WebCore::LayerRendererChromium::initializeSharedObjects):
2030         * platform/graphics/chromium/LayerRendererChromium.h:
2031         (LayerRendererChromium):
2032         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2033         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
2034         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2035         (CCLayerTreeHostImpl):
2036         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2037         (UnthrottledTextureUploader):
2038         (WebCore::UnthrottledTextureUploader::create):
2039         (WebCore::UnthrottledTextureUploader::~UnthrottledTextureUploader):
2040         (WebCore::UnthrottledTextureUploader::isBusy):
2041         (WebCore::UnthrottledTextureUploader::beginUploads):
2042         (WebCore::UnthrottledTextureUploader::endUploads):
2043         (WebCore::UnthrottledTextureUploader::uploadTexture):
2044         (WebCore::UnthrottledTextureUploader::UnthrottledTextureUploader):
2045         (WebCore):
2046         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
2047         (WebCore::CCSingleThreadProxy::recreateContext):
2048         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2049         (WebCore):
2050         (UnthrottledTextureUploader):
2051         (WebCore::UnthrottledTextureUploader::create):
2052         (WebCore::UnthrottledTextureUploader::~UnthrottledTextureUploader):
2053         (WebCore::UnthrottledTextureUploader::isBusy):
2054         (WebCore::UnthrottledTextureUploader::beginUploads):
2055         (WebCore::UnthrottledTextureUploader::endUploads):
2056         (WebCore::UnthrottledTextureUploader::uploadTexture):
2057         (WebCore::UnthrottledTextureUploader::UnthrottledTextureUploader):
2058         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
2059         (WebCore::CCThreadProxy::recreateContextOnImplThread):
2060
2061 2012-05-10  David Reveman  <reveman@chromium.org>
2062
2063         [Chromium] Move instantiation of texture uploader to LayerRendererChromium.
2064         https://bugs.webkit.org/show_bug.cgi?id=85893
2065
2066         Reviewed by Adrienne Walker.
2067
2068         Move instantiation of texture uploader to LayerRendererChromium and
2069         allow CCProxy to decide between a throttled or unthrottled uploader
2070         using a flag passed to the LayerRendererChromium constructor.
2071
2072         * platform/graphics/chromium/LayerRendererChromium.cpp:
2073         (WebCore::LayerRendererChromium::create):
2074         (WebCore::LayerRendererChromium::LayerRendererChromium):
2075         (WebCore::LayerRendererChromium::initializeSharedObjects):
2076         * platform/graphics/chromium/LayerRendererChromium.h:
2077         (LayerRendererChromium):
2078         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2079         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
2080         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2081         (CCLayerTreeHostImpl):
2082         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2083         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
2084         (WebCore::CCSingleThreadProxy::recreateContext):
2085         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2086         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
2087         (WebCore::CCThreadProxy::recreateContextOnImplThread):
2088
2089 2012-05-10  MORITA Hajime  <morrita@google.com>
2090
2091         ElementShadow should minimize the usage of "ShadowRoot" name
2092         https://bugs.webkit.org/show_bug.cgi?id=85970
2093
2094         Reviewed by Dimitri Glazkov.
2095
2096         This change cleans two out dated assumptions which brought in at
2097         early stage of Shadow DOM implementation.
2098
2099         - Removed Element::hasShadowRoot(): shadow existence can be checked by Element::shadow().
2100         - Made ElementShadow::removeAllShadowRoots() private: we no longer allow ShadowRoot removal.
2101           It can only happens at the ElementShadow destruction.
2102
2103         Most of changes in element implementations are basically simple
2104         replacement from hasShadowRoot() to shadow().
2105
2106         No new tests. Covered by existing tests.
2107
2108         * WebCore.exp.in:
2109         * dom/ContainerNodeAlgorithms.h:
2110         (WebCore::ChildFrameDisconnector::collectDescendant):
2111         * dom/ComposedShadowTreeWalker.cpp:
2112         (WebCore::ComposedShadowTreeWalker::traverseChild):
2113         * dom/Document.cpp:
2114         (WebCore::Document::buildAccessKeyMap):
2115         * dom/Element.cpp:
2116         (WebCore::Element::recalcStyle):
2117         (WebCore::Element::ensureShadowRoot):
2118         (WebCore::Element::childrenChanged):
2119         * dom/Element.h:
2120         (Element):
2121         (WebCore::isShadowHost):
2122         (WebCore):
2123         * dom/ElementShadow.cpp:
2124         (WebCore::ElementShadow::~ElementShadow):
2125         (WebCore::ElementShadow::removeAllShadowRoots):
2126         * dom/ElementShadow.h:
2127         (ElementShadow):
2128         (WebCore::ElementShadow::host):
2129         * dom/EventDispatcher.cpp:
2130         * dom/Node.cpp:
2131         (WebCore::oldestShadowRootFor):
2132         * dom/NodeRenderingContext.cpp:
2133         (WebCore::NodeRenderingContext::NodeRenderingContext):
2134         * dom/ShadowRoot.cpp:
2135         (WebCore::ShadowRoot::create):
2136         * html/ColorInputType.cpp:
2137         (WebCore::ColorInputType::createShadowSubtree):
2138         * html/FileInputType.cpp:
2139         (WebCore::FileInputType::createShadowSubtree):
2140         (WebCore::FileInputType::multipleAttributeChanged):
2141         * html/HTMLDetailsElement.cpp:
2142         (WebCore::HTMLDetailsElement::createShadowSubtree):
2143         * html/HTMLInputElement.cpp:
2144         (WebCore::HTMLInputElement::createShadowSubtree):
2145         * html/HTMLKeygenElement.cpp:
2146         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
2147         (WebCore::HTMLKeygenElement::shadowSelect):
2148         * html/HTMLMediaElement.cpp:
2149         (WebCore::HTMLMediaElement::hasMediaControls):
2150         * html/HTMLMeterElement.cpp:
2151         (WebCore::HTMLMeterElement::createShadowSubtree):
2152         * html/HTMLProgressElement.cpp:
2153         (WebCore::HTMLProgressElement::createShadowSubtree):
2154         * html/HTMLSummaryElement.cpp:
2155         (WebCore::HTMLSummaryElement::createShadowSubtree):
2156         * html/HTMLTextAreaElement.cpp:
2157         (WebCore::HTMLTextAreaElement::createShadowSubtree):
2158         * html/InputType.cpp:
2159         (WebCore::InputType::destroyShadowSubtree):
2160         * html/RangeInputType.cpp:
2161         (WebCore::RangeInputType::handleMouseDownEvent):
2162         (WebCore::RangeInputType::createShadowSubtree):
2163         * html/TextFieldInputType.cpp:
2164         (WebCore::TextFieldInputType::createShadowSubtree):
2165         * html/shadow/SliderThumbElement.cpp:
2166         (WebCore::trackLimiterElementOf):
2167         * inspector/InspectorDOMAgent.cpp:
2168         (WebCore::InspectorDOMAgent::unbind):
2169         (WebCore::InspectorDOMAgent::buildObjectForNode):
2170         * page/FocusController.cpp:
2171         (WebCore):
2172         * rendering/RenderFileUploadControl.cpp:
2173         (WebCore::RenderFileUploadControl::uploadButton):
2174         * svg/SVGTRefElement.cpp:
2175         (WebCore::SVGTRefElement::updateReferencedText):
2176         (WebCore::SVGTRefElement::detachTarget):
2177         * testing/Internals.cpp:
2178         (WebCore::Internals::ensureShadowRoot):
2179         (WebCore::Internals::youngestShadowRoot):
2180         (WebCore::Internals::oldestShadowRoot):
2181         * testing/Internals.h:
2182         (Internals):
2183         * testing/Internals.idl:
2184
2185 2012-05-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2186
2187         Move resumeAnimations to use Internals interface
2188         https://bugs.webkit.org/show_bug.cgi?id=86063
2189
2190         Reviewed by Alexey Proskuryakov.
2191
2192         Add resumeAnimations functions, because it is able to work in the
2193         cross-port way through the Internals interface.
2194
2195         No new tests, since we are improving here the infra-structure for testing
2196         a specific method.
2197
2198         * testing/Internals.cpp:
2199         (WebCore::Internals::resumeAnimations):
2200         (WebCore):
2201         * testing/Internals.h:
2202         (Internals):
2203         * testing/Internals.idl:
2204
2205 2012-05-10  Min Qin  <qinmin@google.com>
2206
2207         split MediaPlayer::enterFullscreen into 2 seperate functions
2208         https://bugs.webkit.org/show_bug.cgi?id=86052
2209
2210         Reviewed by Benjamin Poulain.
2211
2212         It is confusing that enterFullscreen returns a boolean while exitFullscreen does
2213         not do the same. And ios does not need the return value.
2214         So remove the return value on enterFullscreen and make a seperate canEnterFullscreen()
2215         function for android.
2216         No tests as there are no behavior change, just refactoring.
2217
2218         * platform/graphics/MediaPlayer.cpp:
2219         (WebCore::MediaPlayer::enterFullscreen):
2220         (WebCore):
2221         (WebCore::MediaPlayer::canEnterFullscreen):
2222         * platform/graphics/MediaPlayer.h:
2223         (MediaPlayer):
2224         * platform/graphics/MediaPlayerPrivate.h:
2225         (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
2226         (MediaPlayerPrivateInterface):
2227         (WebCore::MediaPlayerPrivateInterface::canEnterFullscreen):
2228
2229 2012-05-10  Sheriff Bot  <webkit.review.bot@gmail.com>
2230
2231         Unreviewed, rolling out r116715.
2232         http://trac.webkit.org/changeset/116715
2233         https://bugs.webkit.org/show_bug.cgi?id=86172
2234
2235         Broke http/tests/security/cross-frame-access-selection.html
2236         (Requested by tkent on #webkit).
2237
2238         * dom/Document.cpp:
2239         (WebCore):
2240         (WebCore::Document::getSelection):
2241         * dom/Document.h:
2242         (Document):
2243         * dom/ShadowRoot.cpp:
2244         (WebCore::ShadowRoot::selection):
2245         * dom/TreeScope.cpp:
2246         (WebCore::TreeScope::~TreeScope):
2247         * dom/TreeScope.h:
2248         (WebCore):
2249         (TreeScope):
2250         * page/DOMSelection.cpp:
2251         (WebCore::DOMSelection::DOMSelection):
2252         * page/DOMSelection.h:
2253         (WebCore):
2254         (WebCore::DOMSelection::create):
2255         (DOMSelection):
2256         * page/DOMWindow.cpp:
2257         (WebCore::DOMWindow::~DOMWindow):
2258         (WebCore::DOMWindow::clearDOMWindowProperties):
2259         (WebCore::DOMWindow::getSelection):
2260         * page/DOMWindow.h:
2261         (DOMWindow):
2262
2263 2012-05-10  Hajime Morrita  <morrita@google.com>
2264
2265         WebKit should support tab-size.
2266         https://bugs.webkit.org/show_bug.cgi?id=52994
2267
2268         - Added boilerplate for "tab-size" CSS property.
2269         - Added RenderStye::tabSize() as a RareInheritedData.
2270         - Replaced TextRun::m_allowTabs into TextRun::m_tabSize.
2271
2272         Reviewed by Simon Fraser.
2273
2274         Tests: fast/css/tab-size-expected.html
2275                fast/css/tab-size.html
2276
2277         * css/CSSComputedStyleDeclaration.cpp:
2278         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2279         * css/CSSParser.cpp:
2280         (WebCore::CSSParser::parseValue):
2281         * css/CSSProperty.cpp:
2282         (WebCore::CSSProperty::isInheritedProperty):
2283         * css/CSSPropertyNames.in:
2284         * css/CSSStyleSelector.cpp:
2285         (WebCore::CSSStyleSelector::applyProperty):
2286         * html/canvas/CanvasRenderingContext2D.cpp:
2287         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2288         * platform/chromium/PopupListBox.cpp:
2289         (WebCore::PopupListBox::paintRow):
2290         * platform/graphics/Font.h:
2291         (WebCore::Font::tabWidth):
2292         * platform/graphics/TextRun.h:
2293         (WebCore::TextRun::TextRun):
2294         (WebCore::TextRun::allowTabs):
2295         (WebCore::TextRun::tabSize):
2296         (WebCore::TextRun::setTabSize):
2297         * platform/graphics/WidthIterator.cpp:
2298         (WebCore::WidthIterator::advance):
2299         * platform/graphics/mac/ComplexTextController.cpp:
2300         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2301         * platform/win/PopupMenuWin.cpp:
2302         (WebCore::PopupMenuWin::paint):
2303         * rendering/InlineTextBox.cpp:
2304         (WebCore::InlineTextBox::constructTextRun):
2305         * rendering/RenderBlock.cpp:
2306         (WebCore::RenderBlock::constructTextRun):
2307         * rendering/RenderBlockLineLayout.cpp:
2308         (WebCore::textWidth):
2309         (WebCore::tryHyphenating):
2310         * rendering/RenderText.cpp:
2311         (WebCore::RenderText::widthFromCache):
2312         (WebCore::RenderText::computePreferredLogicalWidths):
2313         (WebCore::RenderText::width):
2314         * rendering/RenderText.h:
2315         * rendering/style/RenderStyle.cpp:
2316         (WebCore::RenderStyle::diff):
2317         * rendering/style/RenderStyle.h:
2318         (WebCore::RenderStyleBitfields::tabSize):
2319         (WebCore::RenderStyleBitfields::collapsedTabSize):
2320         (WebCore::RenderStyleBitfields::setTabSize):
2321         (WebCore::RenderStyleBitfields::initialTabSize):
2322         * rendering/style/StyleRareInheritedData.cpp:
2323         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2324         (WebCore::StyleRareInheritedData::operator==):
2325         * rendering/style/StyleRareInheritedData.h:
2326         * rendering/svg/SVGInlineTextBox.cpp:
2327         (WebCore::SVGInlineTextBox::constructTextRun):
2328         * rendering/svg/SVGTextMetrics.cpp:
2329         (WebCore::constructTextRun):
2330
2331 2012-05-10  Antoine Labour  <piman@chromium.org>
2332
2333         Sync with impl thread when removing references to external textures
2334         https://bugs.webkit.org/show_bug.cgi?id=86054
2335
2336         We want to ensure the client side is safe to release textures, so we
2337         sync with the impl thread when:
2338         - we change the texture (and we had one)
2339         - the layer is removed from the tree (and we had a texture)
2340         - the layer is destroyed (and we had a texture)
2341
2342         Reviewed by James Robinson.
2343
2344         Test: TextureLayerChromiumTest.
2345
2346         * platform/graphics/chromium/TextureLayerChromium.cpp:
2347         (WebCore::TextureLayerChromium::~TextureLayerChromium):
2348         (WebCore::TextureLayerChromium::setTextureId):
2349         (WebCore::TextureLayerChromium::setLayerTreeHost):
2350         (WebCore):
2351         * platform/graphics/chromium/TextureLayerChromium.h:
2352         (TextureLayerChromium):
2353
2354 2012-05-10  Kent Tamura  <tkent@chromium.org>
2355
2356         [Chromium] attempt to build fix for Chromium-mac.
2357         r116697 introduced an override of a system function. It's intentional
2358         and WebCoreTextFieldCell should be in the whitelist.
2359
2360         * WebCore.gyp/WebCore.gyp:
2361
2362 2012-05-10  Anders Carlsson  <andersca@apple.com>
2363
2364         PDF files won't scroll in Safari when using Adobe plug-in
2365         https://bugs.webkit.org/show_bug.cgi?id=86167
2366         <rdar://problem/11389719>
2367
2368         Reviewed by Sam Weinig.
2369
2370         * page/scrolling/ScrollingCoordinator.cpp:
2371         (WebCore::computeNonFastScrollableRegion):
2372         Loop over the frame view children looking for plug-in views that want wheel events
2373         and add them to the non-fast scrollable region. Ideally, the plug-ins should be added
2374         to the set of scrollable areas, but PluginView in WebKit2 is not a ScrollableArea yet.
2375
2376         * plugins/PluginViewBase.h:
2377         (PluginViewBase):
2378         (WebCore::PluginViewBase::wantsWheelEvents):
2379
2380 2012-05-10  Alexey Proskuryakov  <ap@apple.com>
2381
2382         Crash in 3rd party WebKit apps that disable cache at a wrong time
2383         https://bugs.webkit.org/show_bug.cgi?id=86027
2384         <rdar://problem/10615880>
2385
2386         Reviewed by Antti Koivisto.
2387
2388         Added an API test.
2389
2390         The fix is to use CachedResourceHandle throughout MemoryCache, which will certainly
2391         keep the resource alive. Also removed earlier fixes.
2392
2393         * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::cachedImageSet):
2394         * css/CSSImageValue.cpp: (WebCore::CSSImageValue::cachedImage):
2395         * css/WebKitCSSShaderValue.cpp: (WebCore::WebKitCSSShaderValue::cachedShader):
2396         * history/PageCache.cpp: (WebCore::PageCache::releaseAutoreleasedPagesNow):
2397         * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement):
2398         * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::load):
2399         * loader/cache/CachedResourceLoader.cpp:
2400         (WebCore::CachedResourceLoader::requestImage):
2401         (WebCore::CachedResourceLoader::requestFont):
2402         (WebCore::CachedResourceLoader::requestTextTrack):
2403         (WebCore::CachedResourceLoader::requestShader):
2404         (WebCore::CachedResourceLoader::requestCSSStyleSheet):
2405         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
2406         (WebCore::CachedResourceLoader::requestScript):
2407         (WebCore::CachedResourceLoader::requestXSLStyleSheet):
2408         (WebCore::CachedResourceLoader::requestSVGDocument):
2409         (WebCore::CachedResourceLoader::requestLinkResource):
2410         (WebCore::CachedResourceLoader::requestRawResource):
2411         (WebCore::CachedResourceLoader::requestResource):
2412         (WebCore::CachedResourceLoader::revalidateResource):
2413         (WebCore::CachedResourceLoader::loadResource):
2414         (WebCore::CachedResourceLoader::requestPreload):
2415         * loader/cache/CachedResourceLoader.h: (CachedResourceLoader):
2416         * loader/cache/MemoryCache.h: (WebCore::MemoryCache::setPruneEnabled):
2417
2418         * loader/cache/CachedResourceHandle.h:
2419         (WebCore::CachedResourceHandle::CachedResourceHandle):
2420         (WebCore::CachedResourceHandle::operator=):
2421         Teach CachedResourceHandle how to make CachedResourceHandle<CachedResource> from
2422         a handle to subclass.
2423
2424 2012-05-10  Tien-Ren Chen  <trchen@chromium.org>
2425
2426         Eliminate duplicated code for culled line box in RenderInline
2427         https://bugs.webkit.org/show_bug.cgi?id=85725
2428
2429         This patch extracts the common part of culledInlineBoundingBox() /
2430         culledInlineAbsoluteRects() / culledInlineAbsoluteQuads() to become a
2431         template function generateCulledLineBoxRects(). The template function
2432         accepts a new parameter, GeneratorContext functor, which will be
2433         invoked everytime a new line box rect has been generated. The generated
2434         rect will be in local coordinate. The functor will be responsible for
2435         appropriate transformation, then appending to vector or union with
2436         existing bounding box.
2437
2438         Reviewed by Eric Seidel.
2439
2440         No new tests. No change in behavior.
2441
2442         * rendering/RenderInline.cpp:
2443         (WebCore):
2444         (WebCore::RenderInline::generateLineBoxRects):
2445         (WebCore::RenderInline::generateCulledLineBoxRects):
2446         (WebCore::RenderInline::absoluteRects):
2447         (WebCore::RenderInline::absoluteQuads):
2448         (WebCore::RenderInline::linesBoundingBox):
2449         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
2450         (WebCore::RenderInline::addFocusRingRects):
2451         * rendering/RenderInline.h:
2452         (RenderInline):
2453
2454 2012-05-10  Abhishek Arya  <inferno@chromium.org>
2455
2456         Crash in swapInNodePreservingAttributesAndChildren.
2457         https://bugs.webkit.org/show_bug.cgi?id=85197
2458  
2459         Reviewed by Ryosuke Niwa.
2460  
2461         Keep the children in a ref vector before adding them to newNode.
2462         They can get destroyed due to mutation events.
2463
2464         No new tests because we don't have a reduction.
2465
2466         * editing/ReplaceNodeWithSpanCommand.cpp:
2467         (WebCore::swapInNodePreservingAttributesAndChildren):
2468
2469 2012-05-10  Shinya Kawanaka  <shinyak@chromium.org>
2470
2471         [Refactoring] Move Selection from DOMWindow to TreeScope.
2472         https://bugs.webkit.org/show_bug.cgi?id=82699
2473
2474         Reviewed by Ryosuke Niwa.
2475
2476         Since ShadowRoot will also manage its own version of DOMSelection, we would like to
2477         share the code among Document and DOMSelection. This patch moves DOMSelection from DOMWindow to TreeScope
2478         so that ShadowRoot can also use it.
2479
2480         No new tests, should covered by existing tests.
2481
2482         * dom/Document.cpp:
2483         (WebCore::Document::updateFocusAppearanceTimerFired):
2484         * dom/Document.h:
2485         (Document):
2486         * dom/ShadowRoot.cpp:
2487         (WebCore::ShadowRoot::selection):
2488         * do/mTreeScope.cpp:
2489         (WebCore::TreeScope::~TreeScope):
2490         (WebCore::TreeScope::getSelection):
2491         (WebCore):
2492         * dom/TreeScope.h:
2493         (WebCore):
2494         (TreeScope):
2495         * page/DOMSelection.cpp:
2496         (WebCore::DOMSelection::DOMSelection):
2497         (WebCore::DOMSelection::clearTreeScope):
2498         (WebCore):
2499         * page/DOMSelection.h:
2500         (WebCore):
2501         (WebCore::DOMSelection::create):
2502         (DOMSelection):
2503         (WebCore::DOMSelection::frame):
2504         * page/DOMWindow.cpp:
2505         (WebCore::DOMWindow::~DOMWindow):
2506         (WebCore::DOMWindow::clearDOMWindowProperties):
2507         (WebCore::DOMWindow::getSelection):
2508         * page/DOMWindow.h:
2509         (DOMWindow):
2510
2511 2012-05-10  Kent Tamura  <tkent@chromium.org>
2512
2513         Unreviewed, rolling out r116594.
2514         http://trac.webkit.org/changeset/116594
2515         https://bugs.webkit.org/show_bug.cgi?id=86013
2516
2517         r116594 might have made some composition tests flaky.
2518
2519         * platform/graphics/chromium/LayerChromium.cpp:
2520         (WebCore::LayerChromium::addAnimation):
2521         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
2522         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
2523         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2524         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
2525         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
2526         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2527         (CCLayerTreeHost):
2528         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2529         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2530         * platform/graphics/chromium/cc/CCProxy.h:
2531         (CCProxy):
2532         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2533         (WebCore::CCSingleThreadProxy::CCSingleThreadProxy):
2534         (WebCore::CCSingleThreadProxy::doComposite):
2535         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
2536         (WebCore):
2537         * platform/graphics/chromium/cc/CCThreadProxy.h:
2538         (CCThreadProxy):
2539
2540 2012-05-10  Michael Nordman  <michaeln@google.com>
2541
2542         [chromium] DomStorage events handling needs TLC (2)
2543         https://bugs.webkit.org/show_bug.cgi?id=85221
2544         Alter the StorageArea virtual interface such that the mutators no longer
2545         return old values. This is to allow implementations of the interface to operate
2546         more asynchronously.
2547
2548         Reviewed by Adam Barth.
2549
2550         No new tests. Existing tests cover this.
2551
2552         * storage/StorageArea.h: Alter the interface so the mutators no longer return previous values
2553         * storage/StorageAreaImpl.cpp:
2554         (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame):  removed an unneeded PLATFORM(CHROMIUM) guard
2555         (WebCore::StorageAreaImpl::setItem): no longer return the old value
2556         (WebCore::StorageAreaImpl::removeItem): no longer return the old value
2557         (WebCore::StorageAreaImpl::clear): no longer return whether something was cleared
2558         * storage/StorageAreaImpl.h: match StorageArea's virtual interface
2559
2560 2012-05-10  Beth Dakin  <bdakin@apple.com>
2561
2562         https://bugs.webkit.org/show_bug.cgi?id=86158
2563         Overlay scrollbars without layers never paint in overflow regions in 
2564         tiled drawing mode
2565         -and corresponding-
2566         <rdar://problem/11289546>
2567
2568         Reviewed by Darin Adler.
2569
2570         RenderLayers paint scrollbars that do not have their own layers by 
2571         running a second pass through the layer tree after the layer tree has 
2572         painted. This ensures that the scrollbars always paint on top of 
2573         content. However, this mechanism was relying on 
2574         FrameView::paintContents() as a choke-point for all painting to 
2575         trigger the second painting pass. That is not a reasonable choke-point 
2576         in tiled drawing, so this patch adds similar code to 
2577         RenderLayerBacking.
2578
2579         Only opt into the second painting pass for scrollbars that do not have 
2580         their own layers.
2581         * rendering/RenderLayer.cpp:
2582         (WebCore::RenderLayer::paintOverflowControls):
2583         
2584         A layer that paints into its backing cannot return early here if it 
2585         has overlay scrollbars to paint.
2586         (WebCore::RenderLayer::paintLayer):
2587         
2588         This replicates code in FrameView::paintContents(). After painting the 
2589         owning layer, do a second pass if there are overlay scrollbars to 
2590         paint.
2591         * rendering/RenderLayerBacking.cpp:
2592         (WebCore::RenderLayerBacking::paintIntoLayer):
2593
2594 2012-05-10  Anders Carlsson  <andersca@apple.com>
2595
2596         Well, at least fixing the GTK+ build is something!
2597
2598         * platform/gtk/LocalizedStringsGtk.cpp:
2599         (WebCore::insecurePluginVersionText):
2600         (WebCore):
2601
2602 2012-05-10  Anders Carlsson  <andersca@apple.com>
2603
2604         Add insecurePluginVersionText stubs.
2605
2606         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2607         (WebCore::insecurePluginVersionText):
2608         (WebCore):
2609         * platform/efl/LocalizedStringsEfl.cpp:
2610         (WebCore::insecurePluginVersionText):
2611         (WebCore):
2612         * platform/qt/LocalizedStringsQt.cpp:
2613         (WebCore::insecurePluginVersionText):
2614         (WebCore):
2615
2616 2012-05-10  Sheriff Bot  <webkit.review.bot@gmail.com>
2617
2618         Unreviewed, rolling out r116677.
2619         http://trac.webkit.org/changeset/116677
2620         https://bugs.webkit.org/show_bug.cgi?id=86159
2621
2622         This patch causes linker error to some mac bots (Requested by
2623         jianli_ on #webkit).
2624
2625         * WebCore.exp.in:
2626         * dom/ContainerNode.h:
2627         * dom/Node.cpp:
2628         (WebCore::Node::traverseNextNode):
2629         (WebCore::Node::traverseNextSibling):
2630         * dom/Node.h:
2631         (Node):
2632
2633 2012-05-10  Abhishek Arya  <inferno@chromium.org>
2634
2635         Crash in FontCache::releaseFontData due to infinite float size.
2636         https://bugs.webkit.org/show_bug.cgi?id=86110
2637
2638         Reviewed by Andreas Kling.
2639
2640         New callers always forget to clamp the font size, which overflows
2641         to infinity on multiplication. It is best to clamp it at the end
2642         to avoid getting greater than std::numeric_limits<float>::max().
2643
2644         Test: fast/css/large-font-size-crash.html
2645
2646         * platform/graphics/FontDescription.h:
2647         (WebCore::FontDescription::setComputedSize):
2648         (WebCore::FontDescription::setSpecifiedSize):
2649
2650 2012-05-10  Beth Dakin  <bdakin@apple.com>
2651
2652         https://bugs.webkit.org/show_bug.cgi?id=82131
2653         [Mac] REGRESSION (r110480): Text field that specifies background-color 
2654         (or is auto-filled) gets un-themed border
2655         -and corresponding-
2656         <rdar://problem/11115221>
2657
2658         Reviewed by Maciej Stachowiak.
2659
2660         This change rolls out r110480 which is what caused styled text fields 
2661         to get the un-themed border, and it does a bunch of work to make sure 
2662         we get the pretty, new version of the NSTextField art whenever 
2663         possible. We do this differently for post-Lion OS's since there is now 
2664         a way to opt into it all the time. Lion and SnowLeopard can only use 
2665         the new art in HiDPI mode when the background color of the text field 
2666         is just white.
2667
2668         RenderThemeMac::textField() takes a boolean paramter used to determine 
2669         if the new gradient will be used.
2670         * rendering/RenderThemeMac.h:
2671         (RenderThemeMac):
2672         
2673         This is the post-Lion workaround. This code has no effect on Lion and 
2674         SnowLeopard. This allows up to opt into a version of [NSTextField drawWithFrame:] that will only draw the frame of the text field; without this, it will draw the frame and the background, which creates a number of problems with styled text fields and text fields in HiDPI. There is a less comprehesive workaround for Lion and SnowLeopard in place in RenderThemeMac::textField().
2675         * rendering/RenderThemeMac.mm:
2676         (-[WebCoreTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:]):
2677         
2678         This is the roll-out of r110480.
2679         (WebCore::RenderThemeMac::isControlStyled):
2680         
2681         See the comments for a full explanation, but this is mostly code for 
2682         Lion and SnowLeopard to determine if we can opt into the new artwork.
2683         (WebCore::RenderThemeMac::paintTextField):
2684         (WebCore::RenderThemeMac::textField):
2685
2686 2012-05-10  Anders Carlsson  <andersca@apple.com>
2687
2688         WebKit1: Add a way to blacklist specific plug-ins/plug-in versions
2689         https://bugs.webkit.org/show_bug.cgi?id=86150
2690         <rdar://problem/9551196>
2691
2692         Reviewed by Sam Weinig.
2693
2694         * English.lproj/Localizable.strings:
2695         Update.
2696
2697         * loader/SubframeLoader.cpp:
2698         (WebCore::SubframeLoader::loadPlugin):
2699         It is possible that the client has already set the unavailability reason so don't try to set it twice.
2700
2701         * platform/LocalizedStrings.cpp:
2702         (WebCore::insecurePluginVersionText):
2703         * platform/LocalizedStrings.h:
2704         Add insecure plug-in version text.
2705
2706         * rendering/RenderEmbeddedObject.cpp:
2707         (WebCore::RenderEmbeddedObject::unavailablePluginReplacementText):
2708         * rendering/RenderEmbeddedObject.h:
2709         Add InsecurePluginVersion unavailability reason.
2710
2711 2012-05-10  Eric Seidel  <eric@webkit.org>
2712
2713         Make IFRAME_SEAMLESS child documents inherit styles from their parent iframe element
2714         https://bugs.webkit.org/show_bug.cgi?id=85940
2715
2716         Reviewed by Ojan Vafai.
2717
2718         The HTML5 <iframe seamless> spec says:
2719         In a CSS-supporting user agent: the user agent must, for the purpose of CSS property
2720         inheritance only, treat the root element of the active document of the iframe
2721         element's nested browsing context as being a child of the iframe element.
2722         (Thus inherited properties on the root element of the document in the
2723         iframe will inherit the computed values of those properties on the iframe
2724         element instead of taking their initial values.)
2725
2726         Initially I implemented this support to the letter of the spec. However, doing so I learned
2727         that WebKit has a RenderStyle for the Document Node, not just the root element of the document.
2728         In this RenderStyle on the Document, we add a bunch of per-document styles from settings
2729         including designMode.
2730
2731         This change makes StyleResolver::styleForDocument inherit style from the parent iframe's
2732         style, before applying any of these per-document styles.  This may or may not be correct
2733         depending on what behavior we want for rtl-ordering, page-zoom, locale, design mode, etc.
2734         For now, we continue to treat the iframe's document as independent in these regards, and
2735         the settings on that document override those inherited from the iframe.
2736
2737         Also, intially when making this work, I added redirects in recalcStyle and scheduleStyleRecalc
2738         from the child document to the parent document in the case of seamless (since the parent
2739         document effectively manages the style resolve and layout of the child in seamless mode).
2740         However, I was not able to find a test which depended on this code change, so in this final patch
2741         I have removed both of these modifications and replaced them with FIXMEs.  Based on discussions
2742         with Ojan and James Robinson, I believe both of those changes may eventually be wanted.
2743
2744         This change basically does 3 things:
2745         1.  Makes StyleResolver::styleForDocument inherit from the parent iframe.
2746         2.  Makes any recalcStyle calls on the iframe propogate down into the child document (HTMLIFrameElement::didRecalcStyle).
2747         3.  Makes Document::recalcStyle aware of the fact that the Document's style *can* change
2748             for reasons other than recalcStyle(Force).
2749
2750         I'm open to more testing suggestions, if reviewers have settings on the Document's style
2751         that you want to make sure we inherit from the parent iframe, or don't inherit, etc.
2752         I view this as a complete solution to this aspect of the current <iframe seamless> spec,
2753         but likely not the last code we will write for this aspect of the seamless feature. :)
2754
2755         Tested by fast/frames/seamlesss/seamless-css-cascade.html and seamless-designMode.html
2756
2757         * css/StyleResolver.cpp:
2758         (WebCore::StyleResolver::collectMatchingRulesForList):
2759         * dom/Document.cpp:
2760         (WebCore::Document::scheduleStyleRecalc):
2761         (WebCore::Document::recalcStyle):
2762         * html/HTMLIFrameElement.cpp:
2763         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
2764         (WebCore::HTMLIFrameElement::didRecalcStyle):
2765         (WebCore):
2766         * html/HTMLIFrameElement.h:
2767         (HTMLIFrameElement):
2768
2769 2012-05-10  Julien Chaffraix  <jchaffraix@webkit.org>
2770
2771         Crash in computedCSSPadding* functions due to RenderImage::imageDimensionsChanged called during attachment
2772         https://bugs.webkit.org/show_bug.cgi?id=85912
2773
2774         Reviewed by Eric Seidel.
2775
2776         Tests: fast/images/link-body-content-imageDimensionChanged-crash.html
2777                fast/images/script-counter-imageDimensionChanged-crash.html
2778
2779         The bug comes from CSS generated images that could end up calling imageDimensionsChanged during attachment. As the
2780         rest of the code (e.g. computedCSSPadding*) would assumes that we are already inserted in the tree, we would crash.
2781
2782         The solution is to bail out in this case as newly inserted RenderObject will trigger layout later on and properly
2783         handle what we would be doing as part of imageDimensionChanged (the only exception being updating our intrinsic
2784         size which should be done as part of imageDimensionsChanged).
2785
2786         * rendering/RenderImage.cpp:
2787         (WebCore::RenderImage::imageDimensionsChanged):
2788
2789 2012-05-10  Adam Barth  <abarth@webkit.org>
2790
2791         ASSERT in BidiResolver<Iterator, Run>::commitExplicitEmbedding makes running debug builds annoying
2792         https://bugs.webkit.org/show_bug.cgi?id=86140
2793
2794         Reviewed by Eric Seidel.
2795
2796         The correct fix here is to resolve
2797         https://bugs.webkit.org/show_bug.cgi?id=76574, but in the mean time,
2798         this ASSERT is annoying.
2799
2800         * platform/text/BidiResolver.h:
2801         (WebCore::::commitExplicitEmbedding):
2802
2803 2012-05-10  Mark Pilgrim  <pilgrim@chromium.org>
2804
2805         [Chromium] Call addTraceEvent and getTraceCategoryEnabledFlag directly
2806         https://bugs.webkit.org/show_bug.cgi?id=85399
2807
2808         Reviewed by Adam Barth.
2809
2810         Part of a refactoring series. See tracking bug 82948.
2811
2812         * CMakeLists.txt:
2813         * GNUmakefile.list.am:
2814         * Target.pri:
2815         * WebCore.gypi:
2816         * WebCore.vcproj/WebCore.vcproj:
2817         * WebCore.xcodeproj/project.pbxproj:
2818         * platform/EventTracer.cpp: Added.
2819         (WebCore):
2820         (WebCore::EventTracer::getTraceCategoryEnabledFlag):
2821         (WebCore::EventTracer::addTraceEvent):
2822         * platform/EventTracer.h: Added.
2823         (WebCore):
2824         (EventTracer):
2825         * platform/chromium/EventTracerChromium.cpp: Added.
2826         (WebCore):
2827         (WebCore::EventTracer::getTraceCategoryEnabledFlag):
2828         (WebCore::EventTracer::addTraceEvent):
2829         * platform/chromium/PlatformSupport.h:
2830         * platform/chromium/TraceEvent.h:
2831
2832 2012-05-10  Adam Barth  <abarth@webkit.org>
2833
2834         ScrollView::fixedVisibleContentRect should be public
2835         https://bugs.webkit.org/show_bug.cgi?id=86147
2836
2837         Reviewed by Eric Seidel.
2838
2839         Some code in the WebKit layer of OS(ANDROID) uses this function. That
2840         could will be upstreamed in a later patch. For now, this patch just
2841         makes this function public so that we remove the diff to this file.
2842
2843         * platform/ScrollView.h:
2844         (WebCore::ScrollView::fixedVisibleContentRect):
2845         (WebCore::ScrollView::delegatesScrollingDidChange):
2846
2847 2012-05-10  Anders Carlsson  <andersca@apple.com>
2848
2849         Rename the missing plug-in indicator to the unavailable plug-in indicator
2850         https://bugs.webkit.org/show_bug.cgi?id=86136
2851
2852         Reviewed by Sam Weinig.
2853
2854         Since the indicator is shown for more than just missing plug-ins, generalize it and use a plug-in unavailability
2855         reason enum to make it easier to extend. Also, pass the unavailability reason to the ChromeClient member functions.
2856
2857         * WebCore.exp.in:
2858         * html/HTMLEmbedElement.cpp:
2859         (WebCore::HTMLEmbedElement::updateWidget):
2860         * html/HTMLObjectElement.cpp:
2861         (WebCore::HTMLObjectElement::updateWidget):
2862         * html/HTMLPlugInElement.cpp:
2863         (WebCore::HTMLPlugInElement::defaultEventHandler):
2864         * html/HTMLPlugInImageElement.cpp:
2865         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
2866         * loader/SubframeLoader.cpp:
2867         (WebCore::SubframeLoader::loadPlugin):
2868         * page/ChromeClient.h:
2869         (WebCore::ChromeClient::shouldUnavailablePluginMessageBeButton):
2870         (WebCore::ChromeClient::unavailablePluginButtonClicked):
2871         * page/FrameView.cpp:
2872         (WebCore::FrameView::updateWidget):
2873         * rendering/RenderEmbeddedObject.cpp:
2874         (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
2875         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
2876         (WebCore::RenderEmbeddedObject::showsUnavailablePluginIndicator):
2877         (WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsPressed):
2878         (WebCore::RenderEmbeddedObject::paint):
2879         (WebCore::RenderEmbeddedObject::paintReplaced):
2880         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
2881         (WebCore::RenderEmbeddedObject::unavailablePluginReplacementText):
2882         (WebCore):
2883         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
2884         (WebCore::shouldUnavailablePluginMessageBeButton):
2885         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
2886         (WebCore::RenderEmbeddedObject::getCursor):
2887         * rendering/RenderEmbeddedObject.h:
2888         (RenderEmbeddedObject):
2889
2890 2012-05-10  Brady Eidson  <beidson@apple.com>
2891
2892         <rdar://problem/10972577> and https://bugs.webkit.org/show_bug.cgi?id=80170
2893         Contents of noscript elements turned into strings in WebArchives
2894
2895         Reviewed by Andy Estes.
2896
2897         There's a much deeper question about how innerHTML of <noscript> is expected to work in 
2898         both a scripting and non-scripting environment that we should pursue separately.
2899
2900         But for webarchives, we can solve this by filtering out the <noscript> elements completely 
2901         if scripting is enabled.
2902
2903         Test: webarchive/ignore-noscript-if-scripting-enabled.html
2904
2905         * WebCore.exp.in:
2906
2907         Add arguments to createMarkup and MarkupAccumulator methods to pass a Vector of QualifiedNames
2908         that should be filtered from the resulting markup:
2909         * editing/MarkupAccumulator.cpp:
2910         (WebCore::MarkupAccumulator::serializeNodes):
2911         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
2912         * editing/MarkupAccumulator.h:
2913         * editing/markup.cpp:
2914         (WebCore::createMarkup):
2915         * editing/markup.h:
2916
2917         If scripting is enabled, add the noscriptTag to the tag names to filter:
2918         * loader/archive/cf/LegacyWebArchive.cpp:
2919         (WebCore::LegacyWebArchive::create):
2920
2921 2012-05-10  Abhishek Arya  <inferno@chromium.org>
2922
2923         Crash due to floats not removed from first-letter element.
2924         https://bugs.webkit.org/show_bug.cgi?id=86019
2925
2926         Reviewed by Julien Chaffraix.
2927
2928         Move clearing logic of a floating/positioned object from removeChild
2929         to removeChildNode. There are lot of places which use removeChildNode
2930         directly and hence the object is not removed from the floating or
2931         positioned objects list.
2932
2933         Test: fast/block/float/float-not-removed-from-first-letter.html
2934
2935         * rendering/RenderObject.cpp:
2936         (WebCore::RenderObject::removeChild):
2937         * rendering/RenderObjectChildList.cpp:
2938         (WebCore::RenderObjectChildList::removeChildNode):
2939
2940 2012-05-10  Andreas Kling  <kling@webkit.org>
2941
2942         Remove empty ElementAttributeData destructor.
2943         <http://webkit.org/b/86126>
2944
2945         Reviewed by Antti Koivisto.
2946
2947         * dom/ElementAttributeData.cpp:
2948         * dom/ElementAttributeData.h:
2949
2950 2012-05-10  Yury Semikhatsky  <yurys@chromium.org>
2951
2952         Web Inspector: heap snapshot comparison view is broken
2953         https://bugs.webkit.org/show_bug.cgi?id=86102
2954
2955         Reviewed by Pavel Feldman.
2956
2957         Pass HeapSnapshotProxy instead of undefined to the profile load callback. Added
2958         compiler annotations to avoid such errors in the future.
2959
2960         * inspector/front-end/HeapSnapshotView.js:
2961
2962 2012-05-10  Zan Dobersek  <zandobersek@gmail.com>
2963
2964         [GTK] ENABLE_IFRAME_SEAMLESS support
2965         https://bugs.webkit.org/show_bug.cgi?id=85843
2966
2967         Reviewed by Eric Seidel.
2968
2969         Export the ENABLE_IFRAME_SEAMLESS feature define when the feature is
2970         enabled.
2971
2972         No new tests - all the related tests should now be passing.
2973
2974         * GNUmakefile.am:
2975
2976 2012-05-10  Antti Koivisto  <antti@apple.com>
2977
2978         Inline Node::traverseNextNode
2979         https://bugs.webkit.org/show_bug.cgi?id=85844
2980
2981         Reviewed by Ryosuke Niwa.
2982         
2983         Inline traverseNextNode and traverseNextSibling to reduce entry/exit overhead and allow better code generation
2984         for many hot loops.
2985
2986         In this version only the firstChild()/nextSibling() tests are inlined and the ancestor traversal is not.
2987         
2988         Performance bots will tell if this was worthwhile.
2989
2990         * dom/ContainerNode.h:
2991         (WebCore::Node::traverseNextNode):
2992         (WebCore):
2993         (WebCore::Node::traverseNextSibling):
2994         * dom/Node.cpp:
2995         (WebCore::Node::traverseNextAncestorSibling):
2996         * dom/Node.h:
2997         (Node):
2998
2999 2012-05-10  Tommy Widenflycht  <tommyw@google.com>
3000
3001         MediaStream API: Fix MediaHints parsing
3002         https://bugs.webkit.org/show_bug.cgi?id=86098
3003
3004         Reviewed by Adam Barth.
3005
3006         Not currently testable. Working on a series of patches that will fix that.
3007
3008         * Modules/mediastream/PeerConnection00.cpp:
3009         (WebCore::PeerConnection00::createMediaHints):
3010
3011 2012-05-10  Tommy Widenflycht  <tommyw@google.com>
3012
3013         [chromium] MediaStream API: Fix the ExtraData functionality in WebMediaStreamDescriptor
3014         https://bugs.webkit.org/show_bug.cgi?id=86087
3015
3016         Reviewed by Adam Barth.
3017
3018         Not easy to test but I have added code that excercises this to WebUserMediaClientMock (in DumpRenderTree).
3019
3020         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
3021         (WebKit::WebMediaStreamDescriptor::setExtraData):
3022
3023 2012-05-10  Pavel Feldman  <pfeldman@chromium.org>
3024
3025         Web Inspector: search title is shown beside the search field (not under) in the vertical mode.
3026         https://bugs.webkit.org/show_bug.cgi?id=86120
3027
3028         Reviewed by Yury Semikhatsky.
3029
3030         This change makes search title render as placeholder at all times.
3031         It also adjusts the size of the search field when navigation arrows appear.
3032
3033         * inspector/front-end/SearchController.js:
3034         (WebInspector.SearchController):
3035         (WebInspector.SearchController.prototype.updateSearchLabel):
3036         (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
3037         (WebInspector.SearchController.prototype._createSearchNavigationButton):
3038         * inspector/front-end/inspector.css:
3039         (#toolbar-search-item):
3040         (.with-navigation-buttons #search):
3041         (.toolbar-search-navigation-label):
3042         (.with-navigation-buttons .toolbar-search-navigation-label):
3043         * inspector/front-end/inspector.html:
3044
3045 2012-05-10  Varun Jain  <varunjain@google.com>
3046
3047         [chromium] Trigger context menu for long press gesture
3048         https://bugs.webkit.org/show_bug.cgi?id=85919
3049
3050         Reviewed by Adam Barth.
3051
3052         Test: fast/events/touch/gesture/context-menu-on-long-press.html
3053
3054         * page/EventHandler.cpp:
3055         (WebCore):
3056         (WebCore::EventHandler::sendContextMenuEventForGesture):
3057         * page/EventHandler.h:
3058         (EventHandler):
3059
3060 2012-05-10  Abhishek Arya  <inferno@chromium.org>
3061
3062         Crash in ApplyStyleCommand::joinChildTextNodes.
3063         https://bugs.webkit.org/show_bug.cgi?id=85939
3064
3065         Reviewed by Ryosuke Niwa.
3066
3067         Test: editing/style/apply-style-join-child-text-nodes-crash.html
3068
3069         * editing/ApplyStyleCommand.cpp:
3070         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): add conditions
3071         to bail out if our start and end position nodes are removed due to 
3072         mutation events in joinChildTextNodes.
3073         (WebCore::ApplyStyleCommand::applyInlineStyle): this executes after
3074         applyRelativeFontStyleChange in ApplyStyleCommand::doApply. So, need
3075         to bail out if our start and end position nodes are removed due to
3076         mutation events.
3077         (WebCore::ApplyStyleCommand::joinChildTextNodes): hold all the children
3078         in a ref vector to prevent them from getting destroyed due to mutation events.
3079
3080 2012-05-10  Erik Arvidsson  <arv@chromium.org>
3081
3082         Unreviewed, rebaselined run-bindings-tests results.
3083
3084         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3085         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
3086         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
3087         * bindings/scripts/test/JS/JSTestObj.cpp:
3088         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
3089         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
3090         * bindings/scripts/test/V8/V8TestException.cpp:
3091         (WebCore::V8TestException::wrapSlow):
3092         * bindings/scripts/test/V8/V8TestException.h:
3093         (WebCore::V8TestException::wrap):
3094
3095 2012-05-10  Abhishek Arya  <inferno@chromium.org>
3096
3097         Crash in InsertParagraphSeparatorCommand::doApply.
3098         https://bugs.webkit.org/show_bug.cgi?id=84995
3099
3100         Reviewed by Ryosuke Niwa.
3101
3102         Test: editing/inserting/insert-paragraph-seperator-crash.html
3103
3104         * editing/DeleteSelectionCommand.cpp:
3105         (WebCore::DeleteSelectionCommand::mergeParagraphs): no need of static cast, since
3106         type of enclosingBlock returned is already Element*.
3107         * editing/IndentOutdentCommand.cpp:
3108         (WebCore::IndentOutdentCommand::tryIndentingAsListItem): no need of static cast, since
3109         type of enclosingBlock returned is already Element*.
3110         * editing/InsertParagraphSeparatorCommand.cpp:
3111         (WebCore::InsertParagraphSeparatorCommand::doApply): RefPtr startBlock to guard against
3112         mutation events.
3113         * editing/htmlediting.cpp:
3114         (WebCore::enclosingBlock): make sure type of enclosingNode is an element before doing
3115         the static cast. This was already failing in a couple of layout tests. Also, isBlock
3116         check already exists in the function call to enclosingNodeOfType, so don't need it
3117         again on enclosingNode's renderer.
3118         * editing/htmlediting.h: 
3119         (WebCore):
3120
3121 2012-05-10  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3122
3123         TouchAdjustment doesn't correct for scroll-offsets.
3124         https://bugs.webkit.org/show_bug.cgi?id=86083
3125
3126         Reviewed by Kenneth Rohde Christiansen.
3127
3128         Already tested by: touchadjustment/scroll-delegation
3129
3130         * page/EventHandler.cpp:
3131         (WebCore::EventHandler::bestClickableNodeForTouchPoint):
3132         (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
3133         * page/TouchAdjustment.cpp:
3134         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
3135         * testing/Internals.cpp:
3136         (WebCore::Internals::bestZoomableAreaForTouchPoint):
3137
3138 2012-05-10  Konrad Piascik  <kpiascik@rim.com>
3139
3140         Fix typo in filename
3141         https://bugs.webkit.org/show_bug.cgi?id=86095
3142
3143         Reviewed by Andreas Kling.
3144
3145         * UseJSC.cmake:
3146
3147 2012-05-10  Stephen Chenney  <schenney@chromium.org>
3148
3149         SVG Filters allow invalid elements as children
3150         https://bugs.webkit.org/show_bug.cgi?id=83979
3151
3152         Reviewed by Nikolas Zimmermann.
3153
3154         According to the SVG spec, there are numerous restrictions on the
3155         content of nodes (that is, their children). Specific to this problem,
3156         SVGFilter elements may only contain SVGFilterPrimitive elements, and
3157         those may only contain animation related elements. This patch enforces
3158         the restriction on filters in the render tree, thus preventing us from
3159         having (for instance) content that is inside a filter yet filtered by
3160         the filter.
3161
3162         Manual test: ManualTests/bugzilla-83979.svg
3163
3164         * svg/SVGFilterElement.cpp:
3165         (WebCore::SVGFilterElement::childShouldCreateRenderer): Added to only allow renderers for fe* children
3166         (WebCore):
3167         * svg/SVGFilterElement.h:
3168         (SVGFilterElement):
3169         * svg/SVGFilterPrimitiveStandardAttributes.h: Do not allow any children at all for fe* elements.
3170         (SVGFilterPrimitiveStandardAttributes):
3171
3172 2012-05-10  Joe Thomas  <joethomas@motorola.com>
3173
3174         [CSS3 Backgrounds and Borders] Add background-size to the background shorthand
3175         https://bugs.webkit.org/show_bug.cgi?id=27577
3176
3177         Reviewed by Alexis Menard.
3178
3179         Added CSSPropertyBackgroundSize to the background shorthand propery. Added the logic for parsing background-size.
3180         bakground-size appears after background-position followed by a '/'.
3181         The specification related to this change is http://www.w3.org/TR/css3-background/#the-background
3182
3183         Tests: fast/backgrounds/background-shorthand-with-backgroundSize-style.html
3184                fast/backgrounds/size/backgroundSize-in-background-shorthand.html
3185
3186         * css/CSSComputedStyleDeclaration.cpp:
3187         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3188         (WebCore::CSSComputedStyleDeclaration::getBackgroundShorthandValue):
3189         (WebCore):
3190         * css/CSSComputedStyleDeclaration.h:
3191         (CSSComputedStyleDeclaration):
3192         * css/CSSParser.cpp:
3193         (WebCore::CSSParser::parseValue):
3194         (WebCore::CSSParser::parseFillShorthand):
3195         * css/StylePropertySet.cpp:
3196         (WebCore::StylePropertySet::getLayeredShorthandValue):
3197         * css/StylePropertyShorthand.cpp:
3198         (WebCore):
3199         (WebCore::backgroundShorthand):
3200
3201 2012-05-10  MORITA Hajime <morrita@google.com>
3202
3203         Node::InDetachFlag could be removed.
3204         https://bugs.webkit.org/show_bug.cgi?id=85963
3205
3206         Reviewed by Antti Koivisto.
3207
3208         Removed Node::inDetach() since it can never true
3209         on the only call site setFocusedNode().
3210
3211         No new test. Covered by existing tests.
3212
3213         * dom/Document.cpp:
3214         (WebCore::Document::setFocusedNode):
3215         * dom/Node.cpp:
3216         (WebCore::Node::detach):
3217         * dom/Node.h:
3218         (WebCore):
3219         (Node):
3220
3221 2012-05-10  Keishi Hattori  <keishi@webkit.org>
3222
3223         Crash in HTMLFormControlElement::m_fieldSetAncestor
3224         https://bugs.webkit.org/show_bug.cgi?id=86070
3225
3226         Reviewed by Kent Tamura.
3227
3228         No new tests.
3229
3230         The previous patch r115990 didn't completely resolve the crash (Bug 85453)
3231         We don't have a reproducible test case, so we are reverting to the old code for setting m_fieldSetAncestor.
3232
3233         * html/HTMLFormControlElement.cpp:
3234         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
3235         (WebCore::HTMLFormControlElement::updateFieldSetAndLegendAncestor):
3236         (WebCore::HTMLFormControlElement::insertedInto): Set m_dataListAncestorState to Unknown because ancestor has changed. Call setNeedsWillValidateCheck because style might need to be updated.
3237         (WebCore::HTMLFormControlElement::removedFrom):
3238         (WebCore::HTMLFormControlElement::disabled):
3239         (WebCore::HTMLFormControlElement::recalcWillValidate):
3240         (WebCore::HTMLFormControlElement::willValidate):
3241         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
3242         * html/HTMLFormControlElement.h:
3243         (HTMLFormControlElement): Added m_dataListAncestorState.
3244
3245 2012-05-10  Sam D  <dsam2912@gmail.com>
3246
3247         Web Inspector: rename InspectorBackendStub.js to InspectorBackendCommands.js
3248         https://bugs.webkit.org/show_bug.cgi?id=72306
3249
3250         Changed name for InspectorBackendStub.js to
3251         InspectorBackendCommands.js
3252
3253         Reviewed by Yury Semikhatsky.
3254
3255         No new tests required. File name is changed.
3256
3257         * DerivedSources.pri:
3258         * GNUmakefile.am:
3259         * Target.pri:
3260         * WebCore.gyp/WebCore.gyp:
3261         * WebCore.gypi:
3262         * WebCore.vcproj/copyWebCoreResourceFiles.cmd:
3263         * WebCore.xcodeproj/project.pbxproj:
3264         * gyp/copy-inspector-resources.sh:
3265         * inspector/CodeGeneratorInspector.py:
3266         * inspector/front-end/InspectorBackendCommands.qrc: Added.
3267         * inspector/front-end/InspectorBackendStub.qrc: Removed.
3268         * inspector/front-end/inspector.html:
3269
3270 2012-05-10  Alexis Menard  <alexis.menard@openbossa.org>
3271
3272         [Qt] Avoid string conversions to construct a QUrl when using Qt5.
3273         https://bugs.webkit.org/show_bug.cgi?id=86006
3274
3275         Reviewed by Kenneth Rohde Christiansen.
3276
3277         In Qt5, the QUrl constructor can handle the string directly, even in UTF-16 because the
3278         constructor QUrl(QString) has been fixed. Unfortunately we still need to use the old
3279         code path when building with Qt4.
3280
3281         No new tests : it's a performance improvement which should be covered by tests.
3282
3283         * platform/qt/KURLQt.cpp:
3284         (WebCore::KURL::operator QUrl):
3285
3286 2012-05-10  Noel Gordon  <noel.gordon@gmail.com>
3287
3288         [chromium] REGRESSION(r107389) Visible line artifacts on some JPEG images
3289         https://bugs.webkit.org/show_bug.cgi?id=85772
3290
3291         Reviewed by Kent Tamura.
3292
3293         On some JPEG images, vertical and horizontal lines artifacts might appear in image
3294         regions with very high frequency color variation when using DCT_IFAST decodes. Use
3295         DCT_IFAST on small screen devices only (Chromium Android).
3296
3297         No new tests. Covered by existing tests.
3298
3299         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3300         (dctMethod): Permit DCT_IFAST decoding for Chromium Android only.
3301
3302 2012-05-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3303
3304         [Qt] Implement fit-to-width behaviour
3305         https://bugs.webkit.org/show_bug.cgi?id=86085
3306
3307         Reviewed by Simon Hausmann.
3308
3309         Add a method to get the minimum scale factor that contains the content
3310         without showing any chrome background.
3311
3312         * dom/ViewportArguments.cpp:
3313         (WebCore::computeMinimumScaleFactorForContentContained):
3314         (WebCore):
3315         * dom/ViewportArguments.h:
3316         (WebCore):
3317
3318 2012-05-10  MORITA Hajime  <morrita@google.com>
3319
3320         Remove support for Node::willRemove()
3321         https://bugs.webkit.org/show_bug.cgi?id=55209
3322
3323         Reviewed by Ryosuke Niwa.
3324
3325         This change de-virtualizes Node::willRemove(), gains
3326         5% speedup on Dromaeo dom-modify.
3327
3328         Originally there were 5 willRemove() overrides:
3329         - Element
3330         - HTMLStyleElement
3331         - HTMLSourceElement
3332         - HTMLTrackElement
3333         - HTMLFrameOwnerElement
3334
3335         For first 4 items, this change moves their implementations to
3336         Node::removedFrom() overrides.
3337
3338         Then HTMLFrameOwnerElement is the only class which needs the
3339         notification.  Because it emits the "unload" event, it needs some
3340         notification _before_ its removal. To handle that, this change
3341         introduces ChildFrameDisconnector which collects
3342         corresponding decendant elements and disconnect their content frame.
3343
3344         Even though this approach doesn't kill pre-removal tree traversal
3345         completely, it's a bit more efficient due to the de-virtualization.
3346
3347         No new tests. Covered by existing test.
3348
3349         * dom/ContainerNode.cpp:
3350         (WebCore::willRemoveChild): Replaced willRemove() call with ChildFrameDisconnector.
3351         (WebCore::willRemoveChildren): Ditto.
3352         (WebCore::ContainerNode::disconnectDescendantFrames): Added. Used from FrameLoader to replace Document::willRemove() call.
3353         (WebCore):
3354         * dom/ContainerNode.h:
3355         (ContainerNode):
3356         * dom/ContainerNodeAlgorithms.cpp:
3357         (WebCore::ChildFrameDisconnector::collectDescendant):
3358         (WebCore):
3359         (WebCore::ChildFrameDisconnector::Target::disconnect):
3360         * dom/ContainerNodeAlgorithms.h:
3361         (ChildFrameDisconnector):
3362         (Target):
3363         (WebCore::ChildFrameDisconnector::Target::Target):
3364         (WebCore::ChildFrameDisconnector::Target::isValid):
3365         (WebCore):
3366         (WebCore::ChildFrameDisconnector::ChildFrameDisconnector):
3367         (WebCore::ChildFrameDisconnector::collectDescendant):
3368         (WebCore::ChildFrameDisconnector::disconnect):
3369         * dom/Element.cpp:
3370         (WebCore::Element::removedFrom):
3371         * dom/Element.h:
3372         * dom/ElementShadow.cpp:
3373         * dom/ElementShadow.h:
3374         (ElementShadow):
3375         * dom/Node.cpp:
3376         * dom/Node.h: Added IsFrameOwnerElement flag to de-virtualize IsFrameOwnerElement().
3377         (WebCore::Node::isFrameOwnerElement): De-virtualized.
3378         (Node):
3379         * html/HTMLElement.h:
3380         (HTMLElement):
3381         (WebCore::HTMLElement::HTMLElement):
3382         * html/HTMLFrameOwnerElement.cpp:
3383         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
3384         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame): Extracted from original willRemove().
3385         * html/HTMLFrameOwnerElement.h:
3386         (HTMLFrameOwnerElement):
3387         (WebCore::toFrameOwnerElement):
3388         (WebCore):
3389         * html/HTMLMediaElement.cpp:
3390         (WebCore::HTMLMediaElement::sourceWasRemoved): Renamed from sourceWillBeRemoved(), dealing with the timing change.
3391         * html/HTMLMediaElement.h:
3392         (HTMLMediaElement):
3393         (WebCore::isMediaElement):
3394         (WebCore):
3395         (WebCore::toMediaElement):
3396         * html/HTMLSourceElement.cpp:
3397         (WebCore::HTMLSourceElement::removedFrom): Moved some code from willRemove().
3398         * html/HTMLSourceElement.h:
3399         (HTMLSourceElement):
3400         * html/HTMLStyleElement.cpp:
3401         (WebCore::HTMLStyleElement::removedFrom):
3402         (WebCore):
3403         * html/HTMLStyleElement.h:
3404         (HTMLStyleElement):
3405         * html/HTMLTrackElement.cpp:
3406         (WebCore::HTMLTrackElement::removedFrom): Moved some code from willRemove().
3407         * html/HTMLTrackElement.h:
3408         (HTMLTrackElement):
3409         * loader/FrameLoader.cpp:
3410         (WebCore::FrameLoader::clear):
3411
3412 2012-05-10  Kinuko Yasuda  <kinuko@chromium.org>
3413
3414         Change the return type of Entry.toURL() back to String from KURL
3415         https://bugs.webkit.org/show_bug.cgi?id=85858
3416
3417         Reviewed by Ryosuke Niwa.
3418
3419         I once changed it from String to KURL in r116273 but it turned out that
3420         it involves implicit conversion and may incur extra overhead.
3421         This partly reverts r116273 while keeping some internal functions
3422         returning KURL as it's what we initially create as and is more
3423         convenient to operate on.
3424
3425         No new tests; no functional or visible changes.
3426
3427         * Modules/filesystem/EntryBase.cpp:
3428         (WebCore::EntryBase::toURL):
3429         * Modules/filesystem/EntryBase.h:
3430         (EntryBase):
3431
3432 2012-05-10  Alexander Pavlov  <apavlov@chromium.org>
3433
3434         Web Inspector: Autocomplete for CSS property values in the Styles pane behaving incorrectly
3435         https://bugs.webkit.org/show_bug.cgi?id=85784
3436
3437         Reviewed by Vsevolod Vlasov.
3438
3439         Before executing the number increment/decrement within CSS property value, the current word is checked
3440         for being a valid suggestion for the current property, and if it is, the numeric change is skipped
3441         in favor of the suggested property value switch by a suggest box.
3442