5c4dfb163b2f995050c7491b0584522258c8bfd1
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-01-11  Philip Rogers  <pdr@google.com>
2
3         Skip CachedImage::CreateImage if we don't have image data
4         https://bugs.webkit.org/show_bug.cgi?id=106156
5
6         Reviewed by Nate Chapin.
7
8         This patch skips image creation if we do not have image data. This can occur during
9         cache revalidation when the revalidation request (304 not modified) comes back without
10         any content. In this revalidation case, the http spec requires that a mimetype not be set
11         on the response to prevent a cached resource from having a different mimetype
12         from the revalidated resource. Because revalidation requests do not have a mimetype,
13         CachedImage::CreateImage() will fail on SVG images. This patch prevents
14         CachedImage::CreateImage() from being called during revalidation.
15
16         No new tests as there are no observable changes from this patch.
17
18         * loader/cache/CachedImage.cpp:
19         (WebCore::CachedImage::data):
20
21 2013-01-11  Kentaro Hara  <haraken@chromium.org>
22
23         Unreviewed. Rebaselined run-bindings-tests.
24
25         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
26         (WebCore::TestEventConstructorV8Internal::attr1AttrGetter):
27         (WebCore::TestEventConstructorV8Internal::attr2AttrGetter):
28         * bindings/scripts/test/V8/V8TestException.cpp:
29         (WebCore::TestExceptionV8Internal::nameAttrGetter):
30         * bindings/scripts/test/V8/V8TestInterface.cpp:
31         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetter):
32         (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter):
33         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter):
34         * bindings/scripts/test/V8/V8TestObj.cpp:
35         (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter):
36         (WebCore::TestObjV8Internal::staticStringAttrAttrGetter):
37         (WebCore::TestObjV8Internal::stringAttrAttrGetter):
38         (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter):
39         (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter):
40         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter):
41         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter):
42         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter):
43         (WebCore::TestObjV8Internal::hashAttrGetter):
44         (WebCore::TestObjV8Internal::conditionalMethod1Callback):
45
46 2013-01-11  Levi Weintraub  <leviw@chromium.org>
47
48         RenderGeometryMap and TransformState disagree with sub-pixel layout and translations
49         https://bugs.webkit.org/show_bug.cgi?id=106047
50
51         Reviewed by Simon Fraser.
52
53         Mirror RenderGeometryMap's optimization for integer-translated transforms in TransformState.
54         This avoids the current behavior where the two can disagree on mappings, since RenderGeometryMap
55         pixel-snapped later when a translation occurred between two sub-pixel containers.
56
57         Test: fast/layers/geometry-map-transform-state-translation-mismatch.html
58
59         * platform/graphics/transforms/TransformState.h:
60         (WebCore::TransformState::setQuad): Clear accumulatedOffset when setting a new quad. Note: this
61         implementation only works properly when only tracking a quad.
62         * platform/graphics/transforms/TransformState.cpp:
63         (WebCore::TransformState::applyTransform): apply integral translations to the accumulatedOffset
64         for performance and consistency with RenderGeometryMap.
65
66 2013-01-11  Abhishek Arya  <inferno@chromium.org>
67
68         Heap-use-after-free in WebCore::RenderText::computePreferredLogicalWidths
69         https://bugs.webkit.org/show_bug.cgi?id=95901
70
71         Reviewed by Simon Fraser.
72
73         Prevent re-entrancy of view layout. Loading of SVG document during font load
74         causes it to re-enter layout and blowing the style away from underneath.
75         
76         Test: Go to http://www.speckproducts.com and make sure crash does not happen.
77
78         * dom/Document.cpp:
79         (WebCore::Document::updateLayout):
80
81 2013-01-11  Kentaro Hara  <haraken@chromium.org>
82
83         [V8] Do not create a local handle for a cached v8 string that is returned to V8 immediately
84         https://bugs.webkit.org/show_bug.cgi?id=106557
85
86         Reviewed by Adam Barth.
87
88         Currently we are always creating a local handle for a cached
89         V8 string returned to V8:
90
91           Handle<Value> v8String(StringImpl* impl, Isolate* isolate) {
92             ...;
93             return Local<String>::New(isolate, m_cachedString);
94           }
95
96         However, we don't need to create a local handle in a case
97         where it is guaranteed that no V8 object allocation is conducted
98         before a control flow returns back to V8. In particular, in a case
99         where a cached V8 string is immediately returned to V8, we don't
100         need to create a local handle:
101
102           Handle<Value> xxxxAttrGetter() {
103             ...;
104             return v8String(imp->xxxx(), isolate);  // This can return a persistent handle safely.
105           }
106
107         This patch improves performance of div.id by 9.2%.
108
109         No tests. No change in behavior.
110
111         * bindings/scripts/CodeGeneratorV8.pm:
112         (GenerateNormalAttrGetter):
113         (GenerateCallbackImplementation):
114         (GenerateFunctionCallString):
115         (NativeToJSValue):
116         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
117         (WebCore::TestEventConstructorV8Internal::attr1AttrGetter):
118         (WebCore::TestEventConstructorV8Internal::attr2AttrGetter):
119         * bindings/scripts/test/V8/V8TestException.cpp:
120         (WebCore::TestExceptionV8Internal::nameAttrGetter):
121         * bindings/scripts/test/V8/V8TestInterface.cpp:
122         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetter):
123         (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter):
124         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter):
125         * bindings/scripts/test/V8/V8TestObj.cpp:
126         (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter):
127         (WebCore::TestObjV8Internal::staticStringAttrAttrGetter):
128         (WebCore::TestObjV8Internal::stringAttrAttrGetter):
129         (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter):
130         (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter):
131         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter):
132         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter):
133         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter):
134         (WebCore::TestObjV8Internal::hashAttrGetter):
135         (WebCore::TestObjV8Internal::conditionalMethod1Callback):
136         * bindings/v8/V8Binding.h:
137         (WebCore::v8String):
138         (WebCore::v8StringOrNull):
139         (WebCore::v8StringOrUndefined):
140         * bindings/v8/V8ValueCache.cpp:
141         (WebCore::StringCache::v8ExternalStringSlow):
142         * bindings/v8/V8ValueCache.h:
143         (WebCore::StringCache::v8ExternalString):
144         (StringCache):
145
146 2013-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
147
148         Unreviewed. Fix make distcheck.
149
150         * GNUmakefile.list.am: Add missing header files.
151
152 2013-01-11  Xianzhu Wang  <wangxianzhu@chromium.org>
153
154         RenderLayerCompositor should let ScrollingCoordinator update main thread scrolling reasons after change of layers
155         https://bugs.webkit.org/show_bug.cgi?id=105652
156
157         Reviewed by Simon Fraser.
158
159         Let ScrollingCoordinator know the change of ViewportConstrainedNotCompositedReason in time.
160         By the way moved RenderLayerCompositor::FixedPositionLayerNotCompositedReason to RenderLayer::ViewportConstrainedNotCompositedReason.
161
162         Tests: compositing/layer-creation/fixed-position-in-view-dynamic.html
163                compositing/layer-creation/fixed-position-out-of-view-dynamic.html
164
165         * page/scrolling/ScrollingCoordinator.cpp:
166         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
167         (WebCore::ScrollingCoordinator::mainThreadScrollingReasons):
168         (WebCore::ScrollingCoordinator::mainThreadScrollingReasonsAsText):
169         * page/scrolling/ScrollingCoordinator.h:
170         (ScrollingCoordinator):
171         * page/scrolling/mac/ScrollingCoordinatorMac.h:
172         (WebCore::ScrollingCoordinatorMac::hasVisibleSlowRepaintViewportConstrainedObjects):
173         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
174         (WebCore::logThreadedScrollingMode):
175         * rendering/RenderLayer.cpp:
176         (WebCore::RenderLayer::RenderLayer):
177         (WebCore::RenderLayer::paintLayer):
178         * rendering/RenderLayer.h:
179         (RenderLayer): Moved RenderLayerCompositor::FixedPositionLayerNotCompositedReason to here and renamed it to ViewportConstrainedNotCompositedReason.
180         (WebCore::RenderLayer::setViewportConstrainedNotCompositedReason):
181         (WebCore::RenderLayer::viewportConstrainedNotCompositedReason):
182         * rendering/RenderLayerCompositor.cpp:
183         (WebCore::RenderLayerCompositor::updateCompositingLayers):
184         (WebCore::RenderLayerCompositor::updateBacking): Now updates ViewportConstrainedNotCompositedReason here instead of in computeCompositingRequirements before so that the reason is updated in time.
185         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
186         (WebCore::RenderLayerCompositor::needsToBeComposited):
187         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
188         (WebCore::RenderLayerCompositor::reasonForCompositing):
189         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
190         (WebCore::RenderLayerCompositor::reportMemoryUsage):
191         * rendering/RenderLayerCompositor.h:
192         (RenderLayerCompositor):
193
194 2013-01-11  Kenneth Russell  <kbr@google.com>
195
196         [Chromium] WebGL typed array constructor crashes on exception
197         https://bugs.webkit.org/show_bug.cgi?id=106308
198
199         Reviewed by Kentaro Hara.
200
201         Check for empty handles (indicating exception thrown) after calls
202         into V8 VM.
203
204         Added new case from Khronos typed array conformance tests to
205         fast/canvas/webgl/array-unit-tests.html.
206
207         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
208         (WebCore::constructWebGLArray):
209             Check for empty handles after calls into V8 VM.
210
211 2013-01-11  Kentaro Hara  <haraken@chromium.org>
212
213         [V8] Slightly optimize getWrapperFast()
214         https://bugs.webkit.org/show_bug.cgi?id=106667
215
216         Reviewed by Adam Barth.
217
218         This patch improves an if condition in getWrapperFast(),
219         as commented in DOMDataStore.h.
220
221         This patch improves performance of div.firstChild from
222         15.1 ns to 14.0 ns (+7.8%), although I couldn't observe
223         performance improvement in Dromaeo/dom-traverse.
224
225         No tests. No change in behavior.
226
227         * bindings/v8/DOMDataStore.h:
228         (WebCore::DOMDataStore::getWrapperFast):
229
230 2013-01-11  Florin Malita  <fmalita@chromium.org>
231
232         [SVG] Suppress resource rebuilding for unattached and shadow elements
233         https://bugs.webkit.org/show_bug.cgi?id=106664
234
235         Reviewed by Dirk Schulze.
236
237         SVGStyledElement::buildPendingResourcesIfNeeded() can be called while cloning a subtree
238         (as nodes are inserted into the clone, while still detached) or when elements are inserted
239         into the shadow tree. Both of these cases are problematic for SVGUseElement and can trigger
240         indirect recursion in SVGUseElement::buildPendingResource.
241
242         Since shadow and !inDocument() nodes are of no interest to ID dependents (they cannot be
243         found by ID in the document), the patch short-circuits buildPendingResource() for these
244         cases.
245
246         Test: svg/custom/use-rebuild-resources-crash.svg
247
248         * svg/SVGStyledElement.cpp:
249         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
250
251 2013-01-11  Dominic Mazzoni  <dmazzoni@google.com>
252
253         AX: Computed hierarchical level is not consistent with aria-level
254         https://bugs.webkit.org/show_bug.cgi?id=106638
255
256         Reviewed by Chris Fleizach.
257
258         Make hierarchicalLevel computation 1-based to match the aria-level spec.
259
260         Extends an existing test: platform/mac/accessibility/aria-tree.html.
261
262         * accessibility/AccessibilityNodeObject.cpp:
263         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
264         * accessibility/AccessibilityObject.h:
265         (AccessibilityObject):
266         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
267         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
268
269 2013-01-11  Vsevolod Vlasov  <vsevik@chromium.org>
270
271         Web Inspector: Workspace should support several projects and should not have temporary UISourceCodes.
272         https://bugs.webkit.org/show_bug.cgi?id=105856
273
274         Reviewed by Pavel Feldman.
275
276         Workspace now supports several projects with the networkProject being a main one.
277         Replaced temporary UISourceCodes with specific projects (debugger and liveedit).
278         The concept of workspace reset on navigation is now replaced with project reset concept instead.
279         Introduced snippets project (that is not reset on navigation).
280         Script mappings are now reset on GlobalObjectCleared event.
281
282         * inspector/front-end/BreakpointManager.js:
283         (WebInspector.BreakpointManager):
284         (WebInspector.BreakpointManager.prototype._innerSetBreakpoint):
285         (WebInspector.BreakpointManager.prototype._filteredBreakpointLocations):
286         (WebInspector.BreakpointManager.prototype.toggleAllBreakpoints):
287         (WebInspector.BreakpointManager.prototype.removeAllBreakpoints):
288         (WebInspector.BreakpointManager.prototype._projectWillReset.get for):
289         (WebInspector.BreakpointManager.prototype._projectWillReset):
290         * inspector/front-end/CSSStyleModel.js:
291         (WebInspector.CSSStyleModel):
292         (WebInspector.CSSStyleModel.prototype._inspectedURLChanged):
293         (WebInspector.CSSStyleModel.prototype._resetSourceMappings):
294         (WebInspector.CSSStyleModelResourceBinding):
295         (WebInspector.CSSStyleModelResourceBinding.prototype._viaInspectorResourceURL):
296         (WebInspector.CSSStyleModelResourceBinding.prototype._reset):
297         * inspector/front-end/CompilerScriptMapping.js:
298         (WebInspector.CompilerScriptMapping):
299         (WebInspector.CompilerScriptMapping.prototype._debuggerReset):
300         * inspector/front-end/DebuggerScriptMapping.js:
301         * inspector/front-end/DefaultScriptMapping.js:
302         (WebInspector.DefaultScriptMapping):
303         (WebInspector.DefaultScriptMapping.prototype.addScript):
304         (WebInspector.DefaultScriptMapping.prototype._debuggerReset):
305         * inspector/front-end/ExtensionServer.js:
306         (WebInspector.ExtensionServer.prototype._onGetPageResources):
307         * inspector/front-end/FilteredItemSelectionDialog.js:
308         (WebInspector.OpenResourceDialog.show):
309         * inspector/front-end/LiveEditSupport.js:
310         (WebInspector.LiveEditSupport):
311         (WebInspector.LiveEditSupport.prototype.uiSourceCodeForLiveEdit):
312         (WebInspector.LiveEditSupport.prototype._debuggerReset):
313         * inspector/front-end/NetworkUISourceCodeProvider.js:
314         (WebInspector.NetworkUISourceCodeProvider):
315         (WebInspector.NetworkUISourceCodeProvider.prototype._mainFrameNavigated):
316         (WebInspector.NetworkUISourceCodeProvider.prototype._addFile):
317         (WebInspector.NetworkUISourceCodeProvider.prototype._reset):
318         * inspector/front-end/ResourceScriptMapping.js:
319         (WebInspector.ResourceScriptMapping):
320         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAddedToWorkspace):
321         (WebInspector.ResourceScriptMapping.prototype._debuggerReset):
322         * inspector/front-end/RevisionHistoryView.js:
323         (WebInspector.RevisionHistoryView):
324         (WebInspector.RevisionHistoryView.prototype._projectWillReset):
325         * inspector/front-end/SASSSourceMapping.js:
326         (_bindUISourceCode):
327         * inspector/front-end/ScriptSnippetModel.js:
328         (WebInspector.ScriptSnippetModel):
329         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
330         (WebInspector.ScriptSnippetModel.prototype.reset):
331         * inspector/front-end/ScriptsNavigator.js:
332         * inspector/front-end/ScriptsPanel.js:
333         (WebInspector.ScriptsPanel):
334         (WebInspector.ScriptsPanel.prototype._addUISourceCode):
335         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
336         (WebInspector.ScriptsPanel.prototype._removeUISourceCodes):
337         (WebInspector.ScriptsPanel.prototype._debuggerWasDisabled):
338         (WebInspector.ScriptsPanel.prototype._debuggerReset):
339         (WebInspector.ScriptsPanel.prototype._projectWillReset):
340         (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation):
341         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
342         (WebInspector.ScriptsPanel.prototype.showGoToSourceDialog):
343         * inspector/front-end/SimpleWorkspaceProvider.js:
344         (WebInspector.SimpleWorkspaceProvider):
345         (WebInspector.SimpleWorkspaceProvider.prototype.addFile):
346         (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
347         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
348         * inspector/front-end/StylesSourceMapping.js:
349         (WebInspector.StylesSourceMapping):
350         (WebInspector.StylesSourceMapping.prototype._projectWillReset):
351         * inspector/front-end/TabbedEditorContainer.js:
352         (WebInspector.TabbedEditorContainer.prototype.reset):
353         * inspector/front-end/UISourceCode.js:
354         (WebInspector.UISourceCode.prototype.project):
355         * inspector/front-end/Workspace.js:
356         (WebInspector.WorkspaceController):
357         (WebInspector.WorkspaceController.prototype._inspectedURLChanged):
358         (WebInspector.Project):
359         (WebInspector.Project.prototype.name):
360         (WebInspector.Project.prototype.isServiceProject):
361         (WebInspector.Project.prototype._reset):
362         (WebInspector.Workspace):
363         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
364         (WebInspector.Workspace.prototype.uiSourceCodeForURI):
365         (WebInspector.Workspace.prototype.addProject):
366         (WebInspector.Workspace.prototype.project):
367         (WebInspector.Workspace.prototype.projects):
368         (WebInspector.Workspace.prototype.uiSourceCodes):
369         (WebInspector.Workspace.prototype.projectForUISourceCode):
370         (WebInspector.Workspace.prototype.requestFileContent):
371         (WebInspector.Workspace.prototype.setFileContent):
372         (WebInspector.Workspace.prototype.searchInFileContent):
373         * inspector/front-end/inspector.js:
374         * inspector/front-end/utilities.js:
375
376 2013-01-11  Eugene Klyuchnikov  <eustas@chromium.org>
377
378         Web Inspector: [Resources] Make grid columns set configurable.
379         https://bugs.webkit.org/show_bug.cgi?id=105739
380
381         Reviewed by Pavel Feldman.
382
383         Added context menu on grid header to hide/show grid columns.
384         Hidden columns set is persisted.
385
386         * inspector/front-end/DataGrid.js:
387         Fixed show/hide behavior, introduced weight control.
388         * inspector/front-end/NetworkPanel.js:
389         Added member to track visibility of columns in detailerd mode. Added
390         context menu for grid header.
391
392 2013-01-11  Andras Becsi  <andras.becsi@digia.com>
393
394         [Qt] Fix the build if libxslt is not available but libxml2 is
395         https://bugs.webkit.org/show_bug.cgi?id=106661
396
397         Reviewed by Simon Hausmann.
398
399         On Linux building the xml parser sources fails if the needed libxslt
400         dependencies are not installed but libxml2 is.
401
402         * WebCore.pri: add libxml2 to pkg-config if not on mac.
403
404 2013-01-11  Stephen Chenney  <schenney@chromium.org>
405         Objects can be re-added to the AXObjectCache during removal
406         https://bugs.webkit.org/show_bug.cgi?id=104171
407
408         The problem occurs when a label's corresponding element is a sibling
409         that precedes it in the render tree, and the corresponding element is
410         removed. The corresponding element's AX render object is removed, but
411         then recreated when accessibilityIsIgnored() invokes correspondingControl()
412         on the label. The corresponding renderer then has an AX render object
413         that survives beyond the deleted renderer, leading to invalid memory
414         accesses.
415
416         The solution is to rearrange the calls to delete the renderer's AX
417         render object only when we are sure it will no longer be required.
418
419         Reviewed by Simon Fraser.
420
421         Test: accessibility/corresponding-control-deleted-crash.html
422
423         * rendering/RenderObject.cpp:
424         (WebCore::RenderObject::willBeDestroyed): Move the call to remove the
425         renderer from the AXCache to after the renderer is removed from the
426         render tree. This means that the AXObject still exists during renderer
427         removal, as we require.
428
429 2013-01-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
430
431         [Qt][WK1] Web Audio support
432         https://bugs.webkit.org/show_bug.cgi?id=106651
433
434         Reviewed by Jocelyn Turcotte.
435
436         Convert JavaScript Uint8Array to QByteArray. This conversion is necessary to support testRunner.setAudioData().
437
438         * bridge/qt/qt_runtime.cpp:
439         (JSC::Bindings::isJSUint8Array):
440         (Bindings):
441         (JSC::Bindings::valueRealType):
442         (JSC::Bindings::convertValueToQVariant):
443
444 2013-01-11  Anton Vayvod  <avayvod@chromium.org>
445
446         Text Autosizing - elements much narrower than its parent autosizing clusters should be autosized separately.
447         https://bugs.webkit.org/show_bug.cgi?id=105188
448
449         Reviewed by Kenneth Rohde Christiansen.
450
451         Some blocks of text might be narrower than their parent clusters and should be autosized separately.
452         This helps with autosizing for the pages implementing the sidebars as a narrow blocks of text with wide margins and
453         the main content being positioned atop this margin (or vice versa).
454
455         * rendering/TextAutosizer.cpp:
456         (WebCore::TextAutosizer::isContainerAutosizingCluster):
457
458             Returns true if the container is more than 200 pixels narrower than its parent cluster's lowest common
459             ancestor of all the text nodes.
460
461 2013-01-11  Andreas Kling  <akling@apple.com>
462
463         Remove unused CSSSelector(QualifiedName) constructor.
464         <http://webkit.org/b/106652>
465
466         Reviewed by Antti Koivisto.
467
468         * css/CSSSelector.h:
469         (CSSSelector):
470
471 2013-01-11  Zan Dobersek  <zandobersek@gmail.com>
472
473         [GTK] Disable the ENABLE_LEGACY_WEB_AUDIO feature define in release builds
474         https://bugs.webkit.org/show_bug.cgi?id=106577
475
476         Reviewed by Philippe Normand.
477
478         The Web Audio feature is not enabled in the release builds, so there's
479         no need to enable the legacy Web Audio API either.
480
481         No new tests - no new functionality.
482
483         * GNUmakefile.features.am.in:
484
485 2013-01-11  Antoine Quint  <graouts@apple.com>
486
487         Web Inspector: Option+Click on Node Expander Doesn't Work the First Time
488         https://bugs.webkit.org/show_bug.cgi?id=66868
489
490         Up to now, the TreeElement.prototype.expandRecursively() method would correctly
491         expand children recursively based on the provided depth, but would not wait to
492         perform this task until all child nodes had been populated, which means that this
493         would only work incrementally with one additional level of child nodes being shown
494         expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy.
495         
496         In order to fix this, this patch adds a new optional argument to the DOMAgent's
497         requestChildNodes() methods to provide the depth at which we want to retrieve children
498         of a given node. The DOMAgent provides a new .getSubtree() method that calls
499         requestChildNodes() with the provided depth.
500
501         Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's
502         new .getSubtree() method and then call the default implementation when all nodes
503         have been retrieved from the backend.
504
505         Reviewed by Pavel Feldman.
506
507         Tests: inspector-protocol/dom-request-child-nodes-depth.html
508                inspector/elements/expand-recursively.html
509
510         * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes().
511         * inspector/InspectorDOMAgent.cpp:
512         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter
513         which defaults to 1.
514         (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter
515         which defaults to 1 and allows -1 as an unbound value.
516         * inspector/InspectorDOMAgent.h:
517         (InspectorDOMAgent):
518         * inspector/front-end/DOMAgent.js:
519         (WebInspector.DOMNode.prototype.):
520         (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth
521         we want to retrieve children of a given node from the backend.
522         * inspector/front-end/ElementsTreeOutline.js:
523         (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation
524         to first obtain the deepest subtree for the current node so that deep expansion happens as expected.
525
526 2013-01-11  Alexander Pavlov  <apavlov@chromium.org>
527
528         Web Inspector: [Elements] Search in the DOM tree does not scroll horizontally
529         https://bugs.webkit.org/show_bug.cgi?id=106648
530
531         Reviewed by Vsevolod Vlasov.
532
533         Scroll into view the first match in every tree element, if needed.
534
535         * inspector/front-end/ElementsPanel.js:
536         (WebInspector.ElementsPanel.prototype._highlightCurrentSearchResult):
537
538 2013-01-11  Andrey Adaikin  <aandrey@chromium.org>
539
540         Web Inspector: [Canvas] a minor follow-up to r137262
541         https://bugs.webkit.org/show_bug.cgi?id=106644
542
543         Reviewed by Pavel Feldman.
544
545         * inspector/InjectedScriptCanvasModuleSource.js:
546         (.):
547
548 2013-01-11  Kent Tamura  <tkent@chromium.org>
549
550         BaseDateAndTimeInputType should not inherit from TextFieldInputType
551         https://bugs.webkit.org/show_bug.cgi?id=106306
552
553         Reviewed by Hajime Morita.
554
555         Date/time input types don't need text-field features at all.
556
557         No new tests. This should not make any behavior changes except reduction
558         of memory usage.
559
560         * html/BaseDateAndTimeInputType.h:
561         Inherit InputType instead of TextFieldInputType.
562         (WebCore::BaseDateAndTimeInputType::BaseDateAndTimeInputType):
563         (BaseDateAndTimeInputType): Update function declarations.
564         * html/BaseDateAndTimeInputType.cpp:
565         Remove handleKeydownEvent and convertFromVisibleValue, which are for
566         TextFieldInputType.
567         (WebCore::BaseDateAndTimeInputType::shouldRespectListAttribute):
568         Added. This is necessary for <datalist> support. TextFieldInputType has
569         the same code.
570         (WebCore::BaseDateAndTimeInputType::valueMissing):
571         Added. This is necessary for validity.valueMissing. TextFieldInputType
572         has the same code.
573
574         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
575         Remove unnecessary functions which cancel TextFieldInputType behavior.
576         * html/BaseChooserOnlyDateAndTimeInputType.h:
577         (BaseChooserOnlyDateAndTimeInputType): Remove declarations for them.
578
579         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
580         Remove unnecessary functions which cancel TextFieldInputType behavior.
581         * html/BaseMultipleFieldsDateAndTimeInputType.h:
582         (BaseMultipleFieldsDateAndTimeInputType):
583         Add SpinButtonOwner interface. We didn't need it because
584         TextFieldInputType implements it.
585
586 2013-01-11  Mary Wu  <mary.wu@torchmobile.com.cn>
587
588         [BlackBerry] Enable concatenating headers with same field name
589         https://bugs.webkit.org/show_bug.cgi?id=106625
590
591         Reviewed by Rob Buis.
592
593         RFC 2616 specifies that headers could concatenate with comma if they have
594         same field name. We should enable this if the header allows multiple values.
595
596         RIM PR# 275508, internally reviewed by Joe Mason
597
598         (WebCore):
599         (WebCore::isAppendableHeader):
600         (WebCore::NetworkJob::handleNotifyHeaderReceived):
601
602 2013-01-11  Jochen Eisinger  <jochen@chromium.org>
603
604         Connect UserGestureIndicator for mousedown and mouseup events
605         https://bugs.webkit.org/show_bug.cgi?id=105138
606
607         Reviewed by Adam Barth.
608
609         Ports that consume user gestures to prevent certain types of pop-ups
610         need to be able to connect mousedown and mouseup events, otherwise, a
611         single mouse click will allow for opening multiple pop-ups.
612
613         Note that a mousedown is not always followed by a mouseup and vice
614         versa, e.g. when the mousedown results in a context menu being shown, or
615         something is dragged into the page.
616
617         Test: platform/chromium/fast/events/popup-allowed-from-gesture-only-once-two-events.html
618
619         * page/EventHandler.cpp:
620         (WebCore::EventHandler::clear):
621         (WebCore::EventHandler::handleMousePressEvent):
622         (WebCore::EventHandler::handleMouseReleaseEvent):
623         * page/EventHandler.h:
624
625 2013-01-11  Eugene Klyuchnikov  <eustas@chromium.org>
626
627         Web Inspector: [Resources] "Delete" cookie deletes all cookies with matching name.
628         https://bugs.webkit.org/show_bug.cgi?id=105633
629
630         Reviewed by Pavel Feldman.
631
632         "Delete" cookie deletes all cookies with matching name,
633         ignoring domain and path.
634
635         * inspector/Inspector.json: Change argument "domain" to "url"
636         * inspector/InspectorPageAgent.cpp:
637         (WebCore::InspectorPageAgent::deleteCookie): Use url to delte cookies.
638         * inspector/InspectorPageAgent.h: Adopt new signature.
639         * inspector/front-end/CookieItemsView.js:
640         (WebInspector.CookieItemsView.prototype._deleteCookie): Ditto.
641
642 2013-01-11  KwangYong Choi  <ky0.choi@samsung.com>
643
644         [EFL] Fix unused parameter build error
645         https://bugs.webkit.org/show_bug.cgi?id=106639
646
647         Reviewed by Kentaro Hara.
648
649         Use UNUSED_PARAM macro to fix build error.
650
651         No new tests, no behavior change.
652
653         * platform/efl/EflScreenUtilities.cpp:
654         (WebCore::isUsingEcoreX):
655         * platform/efl/RenderThemeEfl.cpp:
656         (WebCore::RenderThemeEfl::supportsDataListUI):
657
658 2013-01-11  Pavel Feldman  <pfeldman@chromium.org>
659
660         Web Inspector [chromium]: Debugger.globalObjectCleared is not dispatched on reload after renderer swap
661         https://bugs.webkit.org/show_bug.cgi?id=106555
662
663         Reviewed by Vsevolod Vlasov.
664
665         Wrong ::enable was made virtual in the InspectorDebuggerAgent.
666
667         Test: inspector/debugger/debugger-scripts-reload.html
668
669         * inspector/InspectorDebuggerAgent.h:
670         (InspectorDebuggerAgent):
671         * inspector/PageDebuggerAgent.cpp:
672         (WebCore::PageDebuggerAgent::enable):
673         (WebCore::PageDebuggerAgent::disable):
674         * inspector/PageDebuggerAgent.h:
675         (PageDebuggerAgent):
676
677 2013-01-11  Vsevolod Vlasov  <vsevik@chromium.org>
678
679         Web Inspector: Refactoring, move NetworkWorkspaceProvider to NetworkUISourceCodeProvider.js and rename its parent to SimpleWorkspaceProvider.
680         https://bugs.webkit.org/show_bug.cgi?id=106635
681
682         Reviewed by Pavel Feldman.
683
684         * WebCore.gypi:
685         * WebCore.vcproj/WebCore.vcproj:
686         * inspector/compile-front-end.py:
687         * inspector/front-end/DebuggerScriptMapping.js:
688         (WebInspector.DebuggerScriptMapping):
689         * inspector/front-end/DefaultScriptMapping.js:
690         (WebInspector.DefaultScriptMapping):
691         (WebInspector.DefaultScriptMapping.prototype.addScript):
692         (WebInspector.DebuggerWorkspaceProvider):
693         (WebInspector.DebuggerWorkspaceProvider.prototype.addDebuggerFile):
694         * inspector/front-end/LiveEditSupport.js:
695         (WebInspector.LiveEditSupport):
696         (WebInspector.LiveEditSupport.prototype.uiSourceCodeForLiveEdit):
697         (WebInspector.LiveEditWorkspaceProvider):
698         (WebInspector.LiveEditWorkspaceProvider.prototype.addLiveEditFile):
699         * inspector/front-end/NetworkUISourceCodeProvider.js:
700         (WebInspector.NetworkWorkspaceProvider):
701         (WebInspector.NetworkWorkspaceProvider.prototype.addNetworkFile):
702         * inspector/front-end/SimpleWorkspaceProvider.js: Renamed from Source/WebCore/inspector/front-end/NetworkWorkspaceProvider.js.
703         (WebInspector.SimpleWorkspaceProvider):
704         (WebInspector.SimpleWorkspaceProvider.uriForURL):
705         (WebInspector.SimpleWorkspaceProvider.prototype.requestFileContent):
706         (WebInspector.SimpleWorkspaceProvider.prototype.setFileContent):
707         (WebInspector.SimpleWorkspaceProvider.prototype.searchInFileContent):
708         (WebInspector.SimpleWorkspaceProvider.prototype.addFile):
709         (WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
710         (WebInspector.SimpleWorkspaceProvider.prototype.uniqueURI):
711         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
712         * inspector/front-end/WebKit.qrc:
713         * inspector/front-end/inspector.html:
714         * inspector/front-end/inspector.js:
715
716 2013-01-10  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
717
718         On Linux, should be able to get spelling suggestions without selecting the misspelled word
719         https://bugs.webkit.org/show_bug.cgi?id=103520
720
721         Reviewed by Ryosuke Niwa.
722
723         Allow to get/insert spelling suggestions without selecting the misspelled word for
724         Linux WebKit ports. WebCore assumes that the misspelled word has to be selected
725         to get its suggestions.
726
727         In compliance with native application behaviour a new editing policy is introduced,
728         to do not highlight the misspelled word to just get its guesses.
729
730         No new tests, covered by context-menu-suggestions.html.
731
732         * WebCore.exp.in:
733         Remove _ZN7WebCore6Editor21isSelectionMisspelledEv symbol as Mac port doesn't
734         need it any longer.
735
736         * editing/EditingBehavior.h:
737         (EditingBehavior):
738         (WebCore::EditingBehavior::shouldAllowSpellingSuggestionsWithoutSelection):
739         Add a new behavior for Linux, to allow spelling suggestions without selecting
740         the misspelled word.
741
742         * editing/Editor.cpp:
743         (WebCore::Editor::isContinuousSpellCheckingEnabled):
744         Add missing const modifier, to use this method in 'misspelledWordAtCaretOrRange() const'.
745
746         (WebCore::Editor::misspelledWordAtCaretOrRange):
747         Allow to check spelling under the caret or selected word.
748         Does nothing for selection made on the multiple words.
749
750         (WebCore::Editor::misspelledSelectionString):
751         Return the misspelled selection.
752
753         (WebCore::Editor::guessesForMisspelledWord):
754         Remove 'Selection' from method name as it may return guesses without selection.
755
756         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
757         Ditto.
758
759         * page/ContextMenuController.cpp:
760         (WebCore::ContextMenuController::contextMenuItemSelected):
761         Select the word under caret to meet the conditions from misspelledWordAtCaretOrRange.
762
763         (WebCore::ContextMenuController::populate):
764         Update guessesForMisspelledOrUngrammatical call.
765
766 2013-01-10  Hajime Morrita  <morrita@google.com>
767
768         https://bugs.webkit.org/show_bug.cgi?id=106283
769         [Shadow DOM] HTMLContentElement and HTMLShadowElement should be behind SHADOW_DOM
770
771         Reviewed by Kentaro Hara.
772
773         No new tests. Covered by existing tests.
774
775         This change moves <content> and <shadow> behind
776         ENABLE(SHADOW_DOM). Note that empty stub definitions are remaining
777         even after this change. They are for minimizing #if/#endif usage
778         and won't hurt code size.
779
780         * WebCore.exp.in:
781         * html/InputType.cpp:
782         (WebCore::InputType::destroyShadowSubtree):
783         * html/shadow/ContentDistributor.cpp:
784         (WebCore::ContentDistributor::distribute):
785         * html/shadow/HTMLContentElement.cpp:
786         (WebCore):
787         (WebCore::HTMLContentElement::create):
788         (WebCore::HTMLContentElement::HTMLContentElement):
789         * html/shadow/HTMLContentElement.h:
790         (WebCore):
791         (HTMLContentElement):
792         * html/shadow/HTMLShadowElement.cpp:
793         * html/shadow/HTMLShadowElement.h:
794         (WebCore):
795         (WebCore::isHTMLShadowElement):
796         (WebCore::toHTMLShadowElement):
797         * html/shadow/TextFieldDecorationElement.cpp:
798         (WebCore::TextFieldDecorationElement::decorate):
799         * testing/Internals.cpp:
800         (WebCore::Internals::createContentElement):
801         (WebCore::Internals::isValidContentSelect):
802
803 2013-01-10  Takashi Sakamoto  <tasak@google.com>
804
805         Implement CSSGroupingRule for @host @-rules and @supports.
806         https://bugs.webkit.org/show_bug.cgi?id=106418
807
808         Reviewed by Antti Koivisto.
809
810         CSSGroupingRule is to share code between CSSMediaRule, CSSSupportsRule
811         and CSSHostRule. @supports and @host @-rules are dervied from
812         CSSGroupingRule:
813         http://www.w3.org/TR/2012/WD-css3-conditional/#the-cssgroupingrule-interface
814         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#css-host-rule-interface
815         Since @media is also derived from CSSGroupingRule and @region has the
816         same interface as CSSGroupingRule, modify to use CSSGroupingRule:
817         http://dev.w3.org/csswg/css3-regions/#the-at-region-style-rule
818
819         No new tests, because no new feature is implemented.
820
821         * CMakeLists.txt:
822         * GNUmakefile.list.am:
823         * Target.pri:
824         * WebCore.gypi:
825         * WebCore.vcproj/WebCore.vcproj:
826         * WebCore.xcodeproj/project.pbxproj:
827         Added CSSGroupingRule.h and CSSGroupingRule.cpp.
828         * css/CSSAllInOne.cpp:
829         Modified to include CSSGroupingRule.cpp.
830         * css/CSSGroupingRule.cpp: Added.
831         (WebCore):
832         (WebCore::CSSGroupingRule::CSSGroupingRule):
833         (WebCore::CSSGroupingRule::~CSSGroupingRule):
834         (WebCore::CSSGroupingRule::insertRule):
835         (WebCore::CSSGroupingRule::deleteRule):
836         (WebCore::CSSGroupingRule::appendCssTextForItems):
837         (WebCore::CSSGroupingRule::length):
838         (WebCore::CSSGroupingRule::item):
839         (WebCore::CSSGroupingRule::cssRules):
840         (WebCore::CSSGroupingRule::reattach):
841         (WebCore::CSSGroupingRule::reportMemoryUsage):
842         These codes are moved from CSSMediaRule and WebKitCSSRegionRule.
843         * css/CSSGroupingRule.h:
844         (WebCore):
845         (CSSGroupingRule):
846         * css/CSSMediaRule.cpp:
847         (WebCore::CSSMediaRule::CSSMediaRule):
848         (WebCore::CSSMediaRule::~CSSMediaRule):
849         Make CSSMediaRule inherit CSSGroupingRule.
850         (WebCore::CSSMediaRule::media):
851         (WebCore::CSSMediaRule::reattach):
852         Keep the code for updating media queries' CSSOMWrapper.
853         (WebCore::CSSMediaRule::reportMemoryUsage):
854         We need to report media queries' CSSOMWrapper memory usage.
855         (WebCore::CSSMediaRule::mediaQueries):
856         (WebCore::CSSMediaRule::cssText):
857         * css/CSSMediaRule.h:
858         * css/WebKitCSSRegionRule.cpp:
859         Make WebKitCSSRegionRule inherit CSSGroupingRule.
860         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
861         (WebCore::WebKitCSSRegionRule::cssText):
862         * css/WebKitCSSRegionRule.h:
863         * css/StyleRule.h:
864         Added inlined accessor to obtain StyleRuleMedia* and StyleRuleRegion*
865         from StyleRuleBlock*.
866
867 2012-12-28  Andrey Adaikin  <aandrey@chromium.org>
868
869         Web Inspector: [Canvas] add an option to reload the page if there is an uninstrumented canvas
870         https://bugs.webkit.org/show_bug.cgi?id=105822
871
872         Reviewed by Pavel Feldman.
873
874         Show in the front-end an option to reload the page if there is an uninstrumented canvas.
875
876         * inspector/front-end/CanvasProfileView.js:
877         (WebInspector.CanvasProfileType):
878         (WebInspector.CanvasProfileType.prototype.decorationElement):
879         (WebInspector.CanvasProfileType.prototype._updateDecorationElement):
880         (WebInspector.CanvasProfileType.prototype._onReloadPageButtonClick):
881         * inspector/front-end/ProfileLauncherView.js:
882         (WebInspector.ProfileLauncherView.prototype.addProfileType):
883         * inspector/front-end/ProfilesPanel.js:
884         (WebInspector.ProfileType.prototype.decorationElement):
885
886 2013-01-10  Dimitri Glazkov  <dglazkov@chromium.org>
887
888         The word "selector" is somewhat redundant redundantly used in SelectorChecker.
889         https://bugs.webkit.org/show_bug.cgi?id=106413
890
891         In https://bugs.webkit.org/show_bug.cgi?id=105864, Antti suggested reducing some of the redundant uses of the word
892         "selector" in SelectorChecker. Here's a start.
893
894         Reviewed by Antti Koivisto.
895
896         Simple renames, no change in behavior.
897
898         * css/SelectorChecker.cpp:
899         (WebCore::SelectorChecker::match): Renamed.
900         (WebCore):
901         (WebCore::SelectorChecker::fastCheck): Ditto,
902         (WebCore::SelectorChecker::checkOne): Ditto.
903         * css/SelectorChecker.h:
904         (SelectorChecker):
905         * css/StyleResolver.cpp:
906         (WebCore::StyleResolver::collectMatchingRulesForList): Changed to use new name.
907         (WebCore::StyleResolver::ruleMatches): Renamed from checkSelector to better match argument and return value.
908         (WebCore::StyleResolver::checkRegionSelector): Changed to use new names.
909         * css/StyleResolver.h:
910         (StyleResolver):
911         * dom/SelectorQuery.cpp:
912         (WebCore::SelectorDataList::matches): Ditto.
913         (WebCore::SelectorDataList::execute): Ditto.
914         * html/shadow/ContentSelectorQuery.cpp:
915         (WebCore::ContentSelectorChecker::checkContentSelector): Ditto.
916
917 2013-01-10  John J. Barton  <johnjbarton@chromium.org>
918
919         Web Inspector: Pass the script url to the script-preprocessor script
920         https://bugs.webkit.org/show_bug.cgi?id=104384
921
922         Reviewed by Pavel Feldman.
923
924         Add url argument to the script-preprocessor script in PageAgent.reload()
925
926         Test: inspector/debugger/debugger-script-preprocessor.html
927
928         * bindings/v8/DebuggerScript.js:
929         * bindings/v8/ScriptDebugServer.cpp:
930         (WebCore::ScriptDebugServer::ScriptPreprocessor::ScriptPreprocessor):
931         (WebCore::ScriptDebugServer::ScriptPreprocessor::preprocessSourceCode):
932         (WebCore::ScriptDebugServer::handleV8DebugEvent):
933         * bindings/v8/custom/V8InjectedScriptManager.cpp:
934         (WebCore::InjectedScriptManager::createInjectedScript):
935
936 2013-01-10  Eugene Klyuchnikov  <eustas@chromium.org>
937
938         Web Inspector: DataGrid refactoring: make cell editing more generic.
939         https://bugs.webkit.org/show_bug.cgi?id=105849
940
941         Reviewed by Pavel Feldman.
942
943         Editing feature has been added to DataGrid to edit localStorage.
944         Column numbers (0 and 1) are hardcoded.
945
946         This patch makes column editing feature more generic: remove hardcoded
947         colums, take "editable" column property into account.
948
949         This patch is a prerequisite for cookie editing.
950
951         * inspector/front-end/DOMStorageItemsView.js:
952         Use meaningful column names.
953         * inspector/front-end/DataGrid.js:
954         (WebInspector.DataGrid.prototype._ondblclick): Check column editability.
955         (WebInspector.DataGrid.prototype._contextMenuInDataTable): Ditto.
956         (WebInspector.DataGridNode.prototype.createCell):
957         Supply cell element with column id.
958         (WebInspector.DataGrid.prototype.columnIdentifierFromNode):
959         Added utility method.
960         (WebInspector.DataGrid.prototype._nextEditableColumn): Ditto.
961         (WebInspector.DataGrid.prototype._keyDown): Calculate editable column.
962         (WebInspector.DataGrid.prototype._editingCommitted): Ditto.
963         (WebInspector.DataGrid.prototype._startEditing): Ditto.
964         (WebInspector.DataGrid.prototype._startEditingColumnOfDataGridNode):
965         Refined parameter type / name.
966         (WebInspector.DataGrid.prototype._resizerDragging):
967         Fix resizer index property names.
968         (WebInspector.DataGrid.prototype._startResizerDragging): Ditto.
969         (WebInspector.DataGrid.prototype._positionResizers): Ditto.
970         * inspector/front-end/NetworkPanel.js:
971         (WebInspector.NetworkLogView.prototype._updateDividersIfNeeded): Ditto.
972
973 2013-01-10  Matt Falkenhagen  <falken@chromium.org>
974
975         Elements must be reattached when inserted/removed from top layer
976         https://bugs.webkit.org/show_bug.cgi?id=105489
977
978         Reviewed by Julien Chaffraix.
979
980         Ensure a reattach occurs when an element is inserted/removed from top layer, so its renderer can be inserted correctly:
981         as a child of RenderView in top layer sibling order if it's in the top layer, and in the usual place otherwise.
982
983         We previously relied on style recalc to catch when an element is inserted/removed from the top layer, because it
984         only happens on dialog.show/close which toggle display: none. But that is incorrect because, for example, close()
985         followed immediately by show() results in no style change.
986
987         Tests: fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer.html
988                fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd.html
989
990         * dom/Element.cpp:
991         (WebCore::Element::removedFrom): Call Document::removeFromTopLayer to let the element be removed from the top layer vector.
992         removeFromTopLayer calls Element::setIsInTopLayer(false) itself if needed.
993         (WebCore::Element::setIsInTopLayer): Ensure a reattach occurs if the element is already attached.
994
995 2013-01-10  Shinya Kawanaka  <shinyak@chromium.org>
996
997         When a selected node in nested ShadowDOM is deleted, selection have wrong range.
998         https://bugs.webkit.org/show_bug.cgi?id=106526
999
1000         Reviewed by Ryosuke Niwa.
1001
1002         Since FrameSelection and htmlediting did not consider nested Shadow DOM, the FrameSelection still selects
1003         removed elements if selected nodes in nested Shadow DOM are removed.
1004
1005         We have to use containsIncludingShadowDOM to handle with nested Shadow DOM correctly.
1006
1007         Test: fast/dom/shadow/selection-in-nested-shadow.html
1008
1009         * editing/FrameSelection.cpp:
1010         (WebCore::removingNodeRemovesPosition):
1011         * editing/htmlediting.cpp:
1012         (WebCore::updatePositionForNodeRemoval):
1013
1014 2013-01-10  Hajime Morrita  <morrita@google.com>
1015
1016         [Shadow DOM] Refactoring: InsertionPoint could simplify its subclass hooks
1017         https://bugs.webkit.org/show_bug.cgi?id=106614
1018
1019         Reviewed by Dimitri Glazkov.
1020
1021         This change simplifies InsertionPoint overrides and give some flexibility to it.
1022
1023         The change
1024
1025         - Removes InsertionPoint::isSelectValid(). now ContentSelectorQuery parses given selector anyway.
1026           Invalid select attribute is handled by newly introduced matchTypeFor() method.
1027         - Introduces InsertionPoint::matchTypeFor() to give a chance each InsertionPoint to decide whether it
1028           accepts the given node as its distribution. Then it lets DetailsSummaryElement adopt it.
1029         - Pulls some HTMLShadowElement overrides up to InsertionPoint so that other upcoming InsertionPoint
1030           subclasses don't need to override them.
1031
1032         No new tests. Refactoring.
1033
1034         * html/HTMLDetailsElement.cpp:
1035         (WebCore::DetailsSummaryElement::DetailsSummaryElement):
1036         - Implemented matchTypeFor() to get rid of HTMLContentElement machinery which is compiled out in the upcoming change.
1037         (DetailsSummaryElement):
1038         * html/shadow/ContentSelectorQuery.cpp:
1039         (WebCore::ContentSelectorQuery::ContentSelectorQuery):
1040         (WebCore::ContentSelectorQuery::matches):
1041         * html/shadow/HTMLContentElement.cpp:
1042         (WebCore::HTMLContentElement::matchTypeFor): Added.
1043         (WebCore):
1044         * html/shadow/HTMLContentElement.h:
1045         (HTMLContentElement):
1046         (WebCore::isHTMLContentElement):
1047         * html/shadow/HTMLShadowElement.cpp:
1048         * html/shadow/HTMLShadowElement.h:
1049         (HTMLShadowElement):
1050         * html/shadow/InsertionPoint.cpp:
1051         (WebCore::InsertionPoint::emptySelectorList): Moved from HTMLShadowElement.
1052         (WebCore):
1053         * html/shadow/InsertionPoint.h:
1054         (WebCore::InsertionPoint::matchTypeFor): Added.
1055         (WebCore::InsertionPoint::selectorList): Moved from HTMLShadowElement.
1056         (InsertionPoint):
1057         * testing/Internals.cpp:
1058         (WebCore::Internals::isValidContentSelect):
1059
1060 2013-01-10  Dean Jackson  <dino@apple.com>
1061
1062         Plugin snapshot label should take device resolution and inset into account
1063         https://bugs.webkit.org/show_bug.cgi?id=106619
1064
1065         Reviewed by Simon Fraser.
1066
1067         * rendering/RenderSnapshottedPlugIn.cpp:
1068         (WebCore::RenderSnapshottedPlugIn::paintLabel): Take into account the inset in the label image.
1069         (WebCore::RenderSnapshottedPlugIn::tryToFitStartLabel): Look at the page's device scale, and adjust the label image accordingly.
1070
1071 2013-01-10  James Robinson  <jamesr@chromium.org>
1072
1073         [chromium] Store scrollable layer's contents size for coordinated scrollable layers
1074         https://bugs.webkit.org/show_bug.cgi?id=106518
1075
1076         Reviewed by Adrienne Walker.
1077
1078         This stores a scrollable layer's contentsSize in the scroll layer's bounds, which is otherwise not useful. This
1079         value is currently calculated based on fragile knowledge of the tree structure immediately beneath a scrollable
1080         layer.
1081
1082         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
1083         (WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
1084
1085 2013-01-10  Dan Beam  <dbeam@chromium.org>
1086
1087         Implement AutocompleteErrorEvent#reason
1088         https://bugs.webkit.org/show_bug.cgi?id=105568
1089
1090         Reviewed by Adam Barth.
1091
1092         Test: fast/events/constructors/autocomplete-error-event-constructor.html
1093
1094         * WebCore.gypi: Added AutocompleteErrorEvent.idl and AutocompleteErrorEvent.h for chromium port's build.
1095         * dom/AutocompleteErrorEvent.h: Added.
1096         (WebCore): Added new type of error named AutocompleteErrorEvent.
1097         (AutocompleteErrorEventInit): Added init params for AutocompleteErrorEvents (so initEvent() can be used).
1098         (AutocompleteErrorEvent): Added a new error event that inherits from Event but also has a reason for failure.
1099         (WebCore::AutocompleteErrorEvent::create): Factory function to create AutocompleteErrorEvents.
1100         (WebCore::AutocompleteErrorEvent::reason): The reason why a requestAutocomplete() invocation failed. Can be
1101                                                    "disabled", "cancel", or "invalid".
1102         (WebCore::AutocompleteErrorEvent::interfaceName): The name of the event's interface (for event.toString()).
1103         (WebCore::AutocompleteErrorEvent::AutocompleteErrorEvent): Various ways of constructing the error event.
1104         * dom/AutocompleteErrorEvent.idl: Added.
1105         * dom/EventNames.in: Added AutocompleteError to this list, based on REQUEST_AUTOCOMPLETE conditional.
1106         * html/HTMLFormElement.cpp: Updated form elements to dispatch AutocompleteErrorEvents on errors and to give
1107                                     more details (event.reason) when the request fails.
1108         (WebCore::HTMLFormElement::requestAutocomplete): Changed to newly added failure type "disabled".
1109         (WebCore::HTMLFormElement::finishRequestAutocomplete): Changed
1110         * html/HTMLFormElement.h: Added new results (ErrorDisabled, ErrorCancel, ErrorInvalid).
1111         * page/DOMWindow.idl: Added global event constructor for new AutocompleteErrorEvent() style event creation.
1112
1113 2013-01-10  Yong Li  <yoli@rim.com>
1114
1115         HTMLMediaElement::resume() should schedule a load rather than load immediately
1116         https://bugs.webkit.org/show_bug.cgi?id=106587
1117
1118         Reviewed by Eric Carlson.
1119
1120         It is not always safe to start the jobs at the time resume() is called. That is why the jobs are
1121         suspended. It can also be suspended again right after being resumed.
1122
1123         No new tests as there is no visible functional change, also it is a theoretically good-to-have change
1124         that doesn't fix any known cross-platform issue.
1125
1126         * html/HTMLMediaElement.cpp:
1127         (WebCore::HTMLMediaElement::resume): Replace load() with scheduleLoad().
1128
1129 2013-01-10  Adam Barth  <abarth@webkit.org>
1130
1131         Add an ENABLE macro and a WebCore::Setting for the threaded parser
1132         https://bugs.webkit.org/show_bug.cgi?id=106595
1133
1134         Reviewed by Benjamin Poulain.
1135
1136         This patch adds both a WebCore::Setting and an ENABLE macro for the
1137         threaded parser. We plan to keep the ENABLE macro off by default for a
1138         while. The runtime setting will let us more easily conduct A/B
1139         experiments when the time arises.
1140
1141         * page/Settings.in:
1142
1143 2013-01-10  Xianzhu Wang  <wangxianzhu@chromium.org>
1144
1145         Regression(r129944): Heap-use-after-free in WebCore::computeNonFastScrollableRegion
1146         https://bugs.webkit.org/show_bug.cgi?id=99515
1147
1148         Reviewed by Simon Fraser.
1149
1150         The object used-after-freed is a destructed FrameView that is still in the m_scrollableAreas set of the parent FrameView. Actually it has been removed from m_scrollableAreas when setParent(0), but then is added back in updateScrollableAreaSet() because its frameViewParent() is still not 0 (though parent() is already 0).
1151
1152         No new tests. The heap-use-after-free doesn't always cause crash so it can't be stably tested with a test case. Memory analysis tools like asan discovered the heap-use-after-free and verified that the patch can fix the issue.
1153
1154         * page/FrameView.cpp:
1155         (WebCore::FrameView::parentFrameView): Checks if the FrameView has been removed from the parent.
1156
1157 2013-01-10  John Mellor  <johnme@chromium.org>
1158
1159         Fix scale of screen.width, window.outerWidth and @media device-width when page scale not applied in compositor.
1160         https://bugs.webkit.org/show_bug.cgi?id=106460
1161
1162         Reviewed by Kenneth Rohde Christiansen.
1163
1164         screen.width, window.outerWidth and @media device-width should be in
1165         density independent (UI) pixels, not physical screen pixels.
1166
1167         This already works on most ports (including iOS). However Chrome for
1168         Android currently internally sizes its windows in physical screen pixels
1169         instead of density independent pixels, and this leaks through in the
1170         sizes provided to WebCore.
1171
1172         This patch scales these sizes appropriately before they reach JavaScript,
1173         on platforms where the applyPageScaleFactorInCompositor setting is false
1174         (i.e. just Chrome for Android). Once Chrome for Android switches over to
1175         the same coordinate space, the applyPageScaleFactorInCompositor setting
1176         will be removed, along with any code (such as this) that depends on it.
1177
1178         The effect of this patch on Chrome for Android when viewing a page with
1179         a width=device-width viewport on a Galaxy Nexus (720x1280 @ dPR 2) is:
1180             @media device-width      changes from 720 to 360
1181             screen.width             changes from 720 to 360
1182             screen.availWidth        changes from 720 to 360
1183             window.outerWidth        changes from 720 to 360
1184             window.innerWidth                    remains 360 (at overview zoom)
1185             @media width                         remains 360
1186             document.documentElement.clientWidth remains 360
1187             document.documentElement.offsetWidth remains 360
1188             document.documentElement.scrollWidth remains 360
1189             document.body.clientWidth            remains 360
1190             document.body.offsetWidth            remains 360
1191             document.body.scrollWidth            remains 360
1192         And similarly for heights (though they are slightly less than 640, since
1193         toolbars etc. get subtracted from the available height).
1194
1195         No new tests, as applyDeviceScaleFactorInCompositor appears to always be
1196         true in DumpRenderTree, so this situation cannot occur there.
1197
1198         * page/Settings.in:
1199             Added applyDeviceScaleFactorInCompositor setting, which allows
1200             detecting whether we need to normalize the scale.
1201         * platform/chromium/PlatformScreenChromium.cpp:
1202         (WebCore::toUserSpace):
1203             Static function for normalizing screen rect scale.
1204         (WebCore::screenRect):
1205             Uses toUserSpace.
1206         (WebCore::screenAvailableRect):
1207             Uses toUserSpace.
1208         * rendering/TextAutosizer.cpp:
1209         (WebCore::TextAutosizer::processSubtree):
1210             Use applyDeviceScaleFactorInCompositor instead of
1211             applyPageScaleFactorInCompositor, to scale the window rect correctly
1212             on platforms other than Chrome for Android.
1213
1214 2013-01-10  Florin Malita  <fmalita@chromium.org>
1215
1216         Rename GraphicsContext::addRoundedRectClip
1217         https://bugs.webkit.org/show_bug.cgi?id=106581
1218
1219         Reviewed by Simon Fraser.
1220
1221         This patch renames GraphicsContext::addRoundedRectClip to clipRoundedRect for consistency
1222         with the other GC clipping methods.
1223
1224         No new tests: no functional changes.
1225
1226         * WebCore.order:
1227         * platform/graphics/GraphicsContext.cpp:
1228         (WebCore::GraphicsContext::clipRoundedRect):
1229         * platform/graphics/GraphicsContext.h:
1230         (GraphicsContext):
1231         * platform/graphics/skia/GraphicsContextSkia.cpp:
1232         (WebCore::GraphicsContext::clipRoundedRect):
1233         * rendering/RenderBox.cpp:
1234         (WebCore::RenderBox::paintBoxDecorations):
1235         (WebCore::RenderBox::pushContentsClip):
1236         * rendering/RenderBoxModelObject.cpp:
1237         (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
1238         (WebCore::RenderBoxModelObject::paintBorder):
1239         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
1240         * rendering/RenderLayer.cpp:
1241         (WebCore::RenderLayer::clipToRect):
1242         * rendering/RenderThemeChromiumWin.cpp:
1243         (WebCore):
1244         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
1245         * rendering/RenderThemeMacShared.mm:
1246         (WebCore::RenderThemeMacShared::paintMenuListButtonGradients):
1247         (WebCore::RenderThemeMacShared::paintSliderTrack):
1248         * rendering/RenderThemeSafari.cpp:
1249         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
1250         (WebCore::RenderThemeSafari::paintSliderTrack):
1251         * rendering/RenderThemeWinCE.cpp:
1252         (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
1253
1254 2013-01-10  Tommy Widenflycht  <tommyw@google.com>
1255
1256         MediaStream API: Adding the new id attribute to MediaStream and MediaStreamTrack
1257         https://bugs.webkit.org/show_bug.cgi?id=106564
1258
1259         Reviewed by Adam Barth.
1260
1261         Specification: http://dev.w3.org/2011/webrtc/editor/getusermedia.html
1262         MediaStream looses its label attribute and instead gets an id attribute.
1263         MediaStreamTrack gets an id attribute.
1264
1265         Not testable yet, will add tests in a followup patch.
1266
1267         * Modules/mediastream/MediaStream.h:
1268         (WebCore::MediaStream::label):
1269         (MediaStream):
1270         (WebCore::MediaStream::id):
1271         * Modules/mediastream/MediaStream.idl:
1272         * Modules/mediastream/MediaStreamTrack.cpp:
1273         (WebCore::MediaStreamTrack::id):
1274         (WebCore):
1275         * Modules/mediastream/MediaStreamTrack.h:
1276         * Modules/mediastream/MediaStreamTrack.idl:
1277         * platform/chromium/support/WebMediaStreamComponent.cpp:
1278         (WebKit::WebMediaStreamComponent::initialize):
1279         (WebKit):
1280         (WebKit::WebMediaStreamComponent::isEnabled):
1281         (WebKit::WebMediaStreamComponent::id):
1282         (WebKit::WebMediaStreamComponent::source):
1283         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
1284         (WebKit::WebMediaStreamDescriptor::label):
1285         (WebKit):
1286         (WebKit::WebMediaStreamDescriptor::id):
1287         * platform/mediastream/MediaStreamComponent.h:
1288         (WebCore::MediaStreamComponent::id):
1289         (WebCore::MediaStreamComponent::MediaStreamComponent):
1290         (MediaStreamComponent):
1291         * platform/mediastream/MediaStreamDescriptor.h:
1292         (WebCore::MediaStreamDescriptor::create):
1293         (WebCore::MediaStreamDescriptor::id):
1294         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
1295         (MediaStreamDescriptor):
1296
1297 2013-01-10  Ojan Vafai  <ojan@chromium.org>
1298
1299         Flexboxes incorrectly add the scrollbar width to the intrinsic width of fixed-width items
1300         https://bugs.webkit.org/show_bug.cgi?id=106591
1301
1302         Reviewed by Levi Weintraub.
1303
1304         The scrollbar width should only be added if the width of the flex item
1305         is not fixed.
1306
1307         Test: fast/css/fixed-width-intrinsic-width-excludes-scrollbars.html
1308
1309         * rendering/RenderBlock.cpp:
1310         (WebCore::RenderBlock::computePreferredLogicalWidths):
1311         Use shared helper method. This also happens to fix the vertical
1312         writing-mode case.
1313
1314         * rendering/RenderBox.cpp:
1315         (WebCore::RenderBox::instrinsicScrollbarLogicalWidth):
1316         (WebCore):
1317         * rendering/RenderBox.h:
1318         (RenderBox):
1319         Add a method for determining the scrollbar's contribution to the boxes
1320         intrinsic width.
1321
1322         * rendering/RenderDeprecatedFlexibleBox.cpp:
1323         (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
1324         * rendering/RenderFlexibleBox.cpp:
1325         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
1326         Use shared code for determining the scrollbar width and only add the
1327         width when computing the intrinsic widths.
1328
1329         * rendering/RenderGrid.cpp:
1330         (WebCore::RenderGrid::computePreferredLogicalWidths):\
1331         Just adding a FIXME to account for scrollbar width.
1332
1333 2013-01-10  Nate Chapin  <japhet@chromium.org>
1334
1335         Replace unnecessary null-checks with an assert in MainResourceLoader::continueAfterNavigationPolicy.
1336         https://bugs.webkit.org/show_bug.cgi?id=106476
1337
1338         Reviewed by Alexey Proskuryakov.
1339
1340         * loader/MainResourceLoader.cpp:
1341         (WebCore::MainResourceLoader::continueAfterNavigationPolicy): Null-checks for resourceLoader were
1342             added in an abundance of caution in r139150. Given that we know the load hasn't been cancelled,
1343             resourceLoader can only be null if continueAfterNavigationPolicy() has already been called
1344             before when m_substituteData is valid. continueAfterNavigationPolicy() is only called for redirects,
1345             and SubstituteData doesn't support redirects, so it is correct to assert that resourceLoader is non-null.
1346
1347 2013-01-10  Levi Weintraub  <leviw@chromium.org>
1348
1349         ScrollingCoordinator touch event hit rects aren't converted to proper coordinates when in nested views
1350         https://bugs.webkit.org/show_bug.cgi?id=106383
1351
1352         Reviewed by James Robinson.
1353
1354         ScrollingCoordinator uses clippedOverflowRectForRepaint(0) to generate the bounds for a renderer's hit
1355         testing rect. The rect this returns is in the coordinates of its document. This change converts the
1356         rect to the outermost view's coordinate system using convertToContainingView.
1357
1358         Tests: platform/chromium/fast/events/touch/touch-hit-rects-in-iframe.html
1359
1360         * page/scrolling/ScrollingCoordinator.cpp:
1361         (WebCore::accumulateRendererTouchEventTargetRects):
1362
1363 2013-01-10  Levi Weintraub  <leviw@chromium.org>
1364
1365         Regression(r137939): Heap-use-after-free in WebCore::accumulateDocumentEventTargetRects
1366         https://bugs.webkit.org/show_bug.cgi?id=106454
1367
1368         Reviewed by James Robinson.
1369
1370         Correctly removing child Documents from their parent's tracked touch handler maps when detaching and
1371         when their last touch event handler is removed.
1372
1373         Test: fast/events/touch/nested-document-with-touch-handler-detached-crash.html
1374
1375         * dom/Document.cpp:
1376         (WebCore::Document::detach):
1377         (WebCore::Document::didRemoveEventTargetNode):
1378
1379 2013-01-10  Nate Chapin  <japhet@chromium.org>
1380
1381         REGRESSION(r138222): WebDocumentLoaderMac-related leaks seen on Leaks bot
1382         https://bugs.webkit.org/show_bug.cgi?id=106137
1383
1384         Reviewed by Brady Eidson.
1385
1386         Tested manually by comparing before and after leaks output for WK1-mac.
1387
1388         * loader/MainResourceLoader.cpp:
1389         (WebCore::MainResourceLoader::receivedError): Call dispatchDidFailLoading() if
1390             a SubstituteData load fails or is cancelled. Without this call, load counts
1391             are not balanced on WebDocumentLoaderMac and it is retained forever.
1392         (WebCore::MainResourceLoader::didFinishLoading):
1393
1394 2013-01-10  Robert Kroeger  <rjkroege@chromium.org>
1395
1396         Manually revert http://trac.webkit.org/changeset/136012
1397         https://bugs.webkit.org/show_bug.cgi?id=106580
1398
1399         Reviewed by Dimitri Glazkov.
1400
1401         136012 broke touch-scrolling of an overflow div in an iframe. Revert manually
1402         to work around conflicts.
1403
1404         * page/EventHandler.cpp:
1405         (WebCore::EventHandler::handleWheelEvent):
1406
1407 2013-01-10  Robert Hogan  <robert@webkit.org>
1408
1409         REGRESSION(r136967): margin-top + overflow:hidden causes incorrect layout for internal floated elements
1410         https://bugs.webkit.org/show_bug.cgi?id=106374
1411
1412         Reviewed by David Hyatt.
1413
1414         r136397 treated any self-collapsing block that had a clearance delta as though it was clearing a float, but
1415         blocks that avoid floats can get a clearance delta too. So just ensure there is clearance on the block when deciding
1416         whether we need to add the margin back in before placing the float.
1417
1418         Test: fast/block/margin-collapse/self-collapsing-block-with-overflow-hidden-and-float-child.html
1419
1420         * rendering/RenderBlockLineLayout.cpp:
1421         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
1422
1423 2013-01-10  Alexander Pavlov  <apavlov@chromium.org>
1424
1425         Web Inspector: Color picker in Styles pane shows wrong initial color
1426         https://bugs.webkit.org/show_bug.cgi?id=106567
1427
1428         Reviewed by Pavel Feldman.
1429
1430         The RGB's G value for "crimson" was wrong.
1431
1432         * inspector/front-end/Color.js:
1433
1434 2013-01-10  Tony Chang  <tony@chromium.org>
1435
1436         Speed up supplemental dependency computation
1437         https://bugs.webkit.org/show_bug.cgi?id=106503
1438
1439         Reviewed by Adam Barth.
1440
1441         On my machine, generating supplemental IDL dependencies was taking about 18s
1442         because it has to run the C preprocessor on each IDL file. Avoid this by using
1443         a regular expression to find the Supplemental= value in each IDL file rather than
1444         doing a full parse. Now generating supplemental IDL dependencies is less than a
1445         second.
1446
1447         preprocess-idls.pl used to also check IDL attributes against IDLAttributes.txt.
1448         Move this code to run in generate-bindings.pl. This change revealed that
1449         TestRunner.idl uses PassContext so add that to IDLAttributes.txt.
1450
1451         No new tests, this is a build refactor. EWS bots should be green.
1452
1453         * DerivedSources.make: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
1454         * DerivedSources.pri: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
1455         * GNUmakefile.am: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
1456         * UseJSC.cmake: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
1457         * UseV8.cmake: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
1458         * WebCore.gyp/WebCore.gyp: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
1459         * bindings/scripts/IDLAttributes.txt: Add PassContext needed by TestRunner.idl.
1460         * bindings/scripts/generate-bindings.pl:
1461         (loadIDLAttributes): Moved from preprocess-idls.pl.
1462         (checkIDLAttributes): Moved from preprocess-idls.pl.
1463         (checkIfIDLAttributesExists): Moved from preprocess-idls.pl.
1464         * bindings/scripts/preprocess-idls.pl:
1465         (getSupplementalFromIDLFile): Helper method to get Supplemental=* quickly.
1466
1467 2013-01-10  Max Vujovic  <mvujovic@adobe.com>
1468
1469         [CSS Filters] RenderLayerCompositor::addToOverlapMap should take into account the filters outsets (ie. blur and drop-shadow)
1470         https://bugs.webkit.org/show_bug.cgi?id=94022
1471
1472         Reviewed by Simon Fraser.
1473
1474         When a layer has a filter that moves pixels, we need to add its entire bounds, including its
1475         outsets and children, to the overlap map. The filter can move the children's pixels
1476         anywhere in the layer, so we can't rely on the children's bounds.
1477
1478         Eventually, we should avoid adding children to the overlap map if the parent's bounds used
1479         for overlap testing already include the children. I've added a FIXME for this optimization.
1480
1481         Tests: compositing/filters/sw-layer-overlaps-hw-shadow.html
1482                compositing/filters/sw-nested-shadow-overlaps-hw-nested-shadow.html
1483                compositing/filters/sw-shadow-overlaps-hw-layer.html
1484                compositing/filters/sw-shadow-overlaps-hw-shadow.html
1485
1486         * rendering/RenderLayer.h:
1487         (WebCore::RenderLayer::overlapBounds):
1488             If necessary, return the calculated layer bounds, including the children. Otherwise,
1489             return the localBoundingBox.
1490         (RenderLayer):
1491         (WebCore::RenderLayer::overlapBoundsIncludeChildren):
1492             If the layer has a filter that moves pixels, return true.
1493         * rendering/RenderLayerCompositor.cpp:
1494         (WebCore::RenderLayerCompositor::addToOverlapMap):
1495             Add the overlapBounds instead of the localBoundingBox to the overlap map.
1496         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1497             Use the overlapBounds instead of the localBoundingBox for overlap testing.
1498
1499 2013-01-09  Ojan Vafai  <ojan@chromium.org>
1500
1501         intrinsic min-widths don't override width for file upload controls
1502         https://bugs.webkit.org/show_bug.cgi?id=106517
1503
1504         Reviewed by Tony Chang.
1505
1506         Separate out computing intrinsic width from perferred width so that
1507         we can use the intrinsic width correctly when applying min-width/max-width.
1508         The preferred width is the width used in its container's computation
1509         of its intrinsic width.
1510
1511         This is the first in a series of patches making this work across
1512         the render tree. 
1513
1514         Test: fast/forms/file/intrinsic-min-width-overrides-width.html
1515
1516         * rendering/RenderBox.cpp:
1517         (WebCore::RenderBox::minIntrinsicLogicalWidth):
1518         (WebCore):
1519         (WebCore::RenderBox::maxIntrinsicLogicalWidth):
1520         (WebCore::RenderBox::computeIntrinsicLogicalWidths):
1521         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1522         * rendering/RenderBox.h:
1523         (RenderBox):
1524         * rendering/RenderFileUploadControl.cpp:
1525         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
1526         (WebCore):
1527         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
1528         * rendering/RenderFileUploadControl.h:
1529         (RenderFileUploadControl):
1530
1531 2013-01-10  Victor Carbune  <victor@rosedu.org>
1532
1533         media/video-controls-captions.html fails after fixing https://bugs.webkit.org/show_bug.cgi?id=105536
1534         https://bugs.webkit.org/show_bug.cgi?id=106230
1535
1536         Reviewed by Eric Carlson.
1537
1538         Until Chromium has proper controls for lists of text tracks, the caption button
1539         needs to preserve its functionality.
1540
1541         Updated TestExpectations to reactivate test.
1542
1543         * html/HTMLMediaElement.cpp:
1544         (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Added explicit call to updateTextTrackDisplay.
1545         This enables hiding the tracks immediately.
1546         * html/shadow/MediaControlElements.cpp:
1547         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Added extra check before rendering
1548         that captions should actually be displayed.
1549
1550 2013-01-10  Hajime Morrita  <morrita@google.com>
1551
1552         ComposedShadowTreeWalker shouldn't be exposed to non-ShadowDOM classes
1553         https://bugs.webkit.org/show_bug.cgi?id=106505
1554
1555         Reviewed by Dimitri Glazkov.
1556
1557         This change hides ComposedShadowTreeWalker from non-ShadowDOM classes by
1558
1559         - introducing thin wrapper functions on NodeRenderingTraversal and relacing
1560           CSTW callsites with it,
1561         - replacing ComposedShadowTreeWalker usage with AncestorChainWalker if possible and
1562         - moving AncestorChainWalker to its own file and including it on files
1563           which needs only AncestorChainWalker. This eliminates ComposedShadowTreeWalker.h inclusions.
1564
1565         No new tests. No behavior change.
1566
1567         * CMakeLists.txt:
1568         * GNUmakefile.list.am:
1569         * Target.pri:
1570         * WebCore.gypi:
1571         * WebCore.xcodeproj/project.pbxproj:
1572         * dom/AncestorChainWalker.cpp: Added. Extracted from ComposedShadowTreeWalker.cpp
1573         (WebCore):
1574         (WebCore::AncestorChainWalker::AncestorChainWalker):
1575         (WebCore::AncestorChainWalker::parent):
1576         * dom/AncestorChainWalker.h: Added. Extracted from ComposedShadowTreeWalker.h
1577         (WebCore):
1578         (AncestorChainWalker):
1579         (WebCore::AncestorChainWalker::get):
1580         (WebCore::AncestorChainWalker::crossingInsertionPoint):
1581         * dom/ComposedShadowTreeWalker.cpp:
1582         * dom/ComposedShadowTreeWalker.h:
1583         * dom/DOMAllInOne.cpp:
1584         * dom/ElementShadow.h:
1585         (WebCore::shadowOfParent):
1586         (WebCore):
1587         * dom/EventDispatcher.cpp:
1588         * dom/Node.cpp:
1589         * dom/NodeRenderingTraversal.cpp:
1590         (WebCore::NodeRenderingTraversal::nextInScope):
1591         (NodeRenderingTraversal):
1592         (WebCore::NodeRenderingTraversal::previousInScope): Added.
1593         (WebCore::NodeRenderingTraversal::parentInScope): Added.
1594         (WebCore::NodeRenderingTraversal::lastChildInScope): Added.
1595         * dom/NodeRenderingTraversal.h:
1596         (NodeRenderingTraversal):
1597         * dom/TreeScope.cpp:
1598         * html/HTMLLIElement.cpp:
1599         (WebCore::HTMLLIElement::attach):
1600         * page/EventHandler.cpp:
1601         * page/FocusController.cpp: Replacing CSTW with NRT
1602         (WebCore):
1603         (WebCore::FocusNavigationScope::focusNavigationScopeOf):
1604         (WebCore::FocusController::findNodeWithExactTabIndex):
1605         (WebCore::nextNodeWithGreaterTabIndex):
1606         (WebCore::previousNodeWithLowerTabIndex):
1607         (WebCore::FocusController::nextFocusableNode):
1608         (WebCore::FocusController::previousFocusableNode):
1609
1610 2013-01-10  Zan Dobersek  <zandobersek@gmail.com>
1611
1612         Remove the ENABLE_ANIMATION_API feature define occurences
1613         https://bugs.webkit.org/show_bug.cgi?id=106544
1614
1615         Reviewed by Simon Fraser.
1616
1617         The Animation API code was removed in r137243. The ENABLE_ANIMATION_API
1618         feature define handling still lingers in various build systems and configurations
1619         but is of no use, so it should be removed.
1620
1621         No new tests - no new functionality.
1622
1623         * Configurations/FeatureDefines.xcconfig:
1624         * GNUmakefile.features.am.in:
1625
1626 2013-01-10  Robert Phillips  <robertphillips@chromium.org>
1627
1628         Serialization of Gradients fails when PlatformContextSkia is not bitmap backed
1629         https://bugs.webkit.org/show_bug.cgi?id=106559
1630
1631         Reviewed by Stephen White.
1632
1633         This patch switches over from having platform/Skia improperly
1634         crack open the device to find the bitmap configuration to just
1635         specifying it directly.
1636
1637         No new tests. This bug is Chromium specific and only occurs in a
1638         debugging tool (when serializing to a Skia-specific file format).
1639
1640         * platform/graphics/skia/PlatformContextSkia.cpp:
1641         (WebCore::PlatformContextSkia::createCompatibleDevice):
1642
1643 2013-01-10  Alexander Pavlov  <apavlov@chromium.org>
1644
1645         The "outline-offset" property is not found in the computed style property list
1646         https://bugs.webkit.org/show_bug.cgi?id=106561
1647
1648         Reviewed by Alexis Menard.
1649
1650         Listed CSSPropertyOutlineOffset in the CSSComputedStyleDeclaration's computedProperties[].
1651
1652         Test: fast/css/getComputedStyle/getComputedStyle-outline-offset.html
1653
1654         * css/CSSComputedStyleDeclaration.cpp:
1655
1656 2013-01-10  David Faure  <faure@kde.org>
1657
1658         PluginPackage::freeLibraryTimerFired asserts if plugin got loaded again meanwhile
1659         https://bugs.webkit.org/show_bug.cgi?id=106463
1660
1661         Reviewed by Simon Hausmann.
1662
1663         No new tests, this code path will be tested by bug 106140.
1664
1665         * plugins/PluginPackage.cpp:
1666         (WebCore::PluginPackage::freeLibraryTimerFired): skip unloading if loaded again meanwhile.
1667
1668 2013-01-10  Alexander Pavlov  <apavlov@chromium.org>
1669
1670         CSSParser does not allow the absence of whitespace between "and" and "expression"
1671         https://bugs.webkit.org/show_bug.cgi?id=106458
1672
1673         Reviewed by Antti Koivisto.
1674
1675         The issue was that a construct similar to "and(max-width: 480px)" looks like a function call (token type FUNCTION), even though
1676         it is actually a MEDIA_AND followed by a parenthesized expression.
1677
1678         Test: fast/css/media-rule-no-whitespace.html
1679
1680         * css/CSSParser.cpp:
1681         (WebCore::CSSParser::detectFunctionTypeToken): Return if the detection has been successful.
1682         (WebCore::CSSParser::realLex): Test for media query tokens if function type detection has failed.
1683         * css/CSSParser.h:
1684
1685 2013-01-10  Alexis Menard  <alexis@webkit.org>
1686
1687         ASSERT_NOT_REACHED in StylePropertySet::fontValue when accessing font style property through JS after setting style font size.
1688         https://bugs.webkit.org/show_bug.cgi?id=88866
1689
1690         Reviewed by Alexander Pavlov.
1691
1692         StylePropertySet::fontValue always assumed that it was called using
1693         style.font after a subsequent call which set the shorthand font. The
1694         ASSERT_NOT_REACHED assumed that all longhands of the font shorthand not
1695         set by the shorthand itself were set to initial. While it's true when
1696         we set the font shorthand (i.e all longhands are set to implicit initial)
1697         it is not true when you set the longhands individually. For example setting
1698         font-size will not set other font properties to initial. It is the behavior of all
1699         other shorthands in WebKit. When reconstructing the shorthand other
1700         properties tests whether the value of each longhands is initial or not
1701         (if not then we omit the value, as we should always construct the
1702         shortest shorthand possible) or if the value is set or not (if set then
1703         we include it in the shorthand if not then we omit it). The comment
1704         removed was also talking about invalid font property potentially built
1705         by fontValue(). So far appendFontLonghandValueIfExplicit will always
1706         construct a valid value as it takes care of adding ' ' or '/' when
1707         needed, so the return value is parsable and correct.
1708
1709         Test: fast/css/font-shorthand-from-longhands.html
1710
1711         * css/StylePropertySet.cpp:
1712         (WebCore::StylePropertySet::appendFontLonghandValueIfExplicit):
1713         (WebCore::StylePropertySet::fontValue):
1714         * css/StylePropertySet.h:
1715
1716 2013-01-10  Sheriff Bot  <webkit.review.bot@gmail.com>
1717
1718         Unreviewed, rolling out r139306.
1719         http://trac.webkit.org/changeset/139306
1720         https://bugs.webkit.org/show_bug.cgi?id=106550
1721
1722         it broke inspector-protocol/nmi-webaudio-leak-test.html
1723         (Requested by loislo on #webkit).
1724
1725         * bindings/v8/V8PerIsolateData.cpp:
1726         (WebCore::V8PerIsolateData::reportMemoryUsage):
1727         * css/CSSMediaRule.cpp:
1728         (WebCore::CSSMediaRule::reportMemoryUsage):
1729         * css/CSSProperty.cpp:
1730         (WebCore::CSSProperty::reportMemoryUsage):
1731         * css/CSSStyleSheet.cpp:
1732         (WebCore::CSSStyleSheet::reportMemoryUsage):
1733         * css/MediaList.cpp:
1734         (WebCore::MediaList::reportMemoryUsage):
1735         * css/RuleSet.cpp:
1736         (WebCore::RuleData::reportMemoryUsage):
1737         (WebCore::RuleSet::reportMemoryUsage):
1738         (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
1739         * css/StyleResolver.cpp:
1740         (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
1741         (WebCore::StyleResolver::reportMemoryUsage):
1742         * css/StyleSheetContents.cpp:
1743         (WebCore::StyleSheetContents::reportMemoryUsage):
1744         * dom/TreeScope.cpp:
1745         (WebCore::TreeScope::reportMemoryUsage):
1746         * inspector/HeapGraphSerializer.cpp:
1747         (WebCore::HeapGraphSerializer::reportMemoryUsage):
1748         * inspector/InspectorMemoryAgent.cpp:
1749         * inspector/InspectorProfilerAgent.cpp:
1750         (WebCore::InspectorProfilerAgent::reportMemoryUsage):
1751         * inspector/MemoryInstrumentationImpl.cpp:
1752         (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
1753         * loader/DocumentLoader.cpp:
1754         (WebCore::DocumentLoader::reportMemoryUsage):
1755         * loader/FrameLoader.cpp:
1756         (WebCore::FrameLoader::reportMemoryUsage):
1757         * loader/MainResourceLoader.cpp:
1758         (WebCore::MainResourceLoader::reportMemoryUsage):
1759         * loader/Prerenderer.cpp:
1760         (WebCore::Prerenderer::reportMemoryUsage):
1761         * loader/ResourceLoader.cpp:
1762         (WebCore::ResourceLoader::reportMemoryUsage):
1763         * loader/cache/CachedImage.cpp:
1764         (WebCore::CachedImage::reportMemoryUsage):
1765         * page/Page.cpp:
1766         (WebCore::Page::reportMemoryUsage):
1767
1768 2013-01-10  Ilya Tikhonovsky  <loislo@chromium.org>
1769
1770         Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrumented classes 2/N
1771         https://bugs.webkit.org/show_bug.cgi?id=106546
1772
1773         Reviewed by Vsevolod Vlasov.
1774
1775         Many nontrivial class members were instrumented in reportMemoryUsage methods.
1776
1777         * bindings/v8/V8PerIsolateData.cpp:
1778         (WebCore::V8PerIsolateData::reportMemoryUsage):
1779         * css/CSSMediaRule.cpp:
1780         (WebCore::CSSMediaRule::reportMemoryUsage):
1781         * css/CSSProperty.cpp:
1782         (WebCore::CSSProperty::reportMemoryUsage):
1783         * css/CSSStyleSheet.cpp:
1784         (WebCore::CSSStyleSheet::reportMemoryUsage):
1785         * css/MediaList.cpp:
1786         (WebCore::MediaList::reportMemoryUsage):
1787         * css/RuleSet.cpp:
1788         (WebCore::RuleData::reportMemoryUsage):
1789         (WebCore::RuleSet::reportMemoryUsage):
1790         (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
1791         * css/StyleResolver.cpp:
1792         (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
1793         (WebCore::StyleResolver::reportMemoryUsage):
1794         * css/StyleSheetContents.cpp:
1795         (WebCore::StyleSheetContents::reportMemoryUsage):
1796         * dom/TreeScope.cpp:
1797         (WebCore::TreeScope::reportMemoryUsage):
1798         * inspector/HeapGraphSerializer.cpp:
1799         (WebCore::HeapGraphSerializer::reportMemoryUsage):
1800         * inspector/InspectorMemoryAgent.cpp:
1801         * inspector/InspectorProfilerAgent.cpp:
1802         (WebCore::InspectorProfilerAgent::reportMemoryUsage):
1803         * inspector/MemoryInstrumentationImpl.cpp:
1804         (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
1805         * loader/DocumentLoader.cpp:
1806         (WebCore::DocumentLoader::reportMemoryUsage):
1807         * loader/FrameLoader.cpp:
1808         (WebCore::FrameLoader::reportMemoryUsage):
1809         * loader/MainResourceLoader.cpp:
1810         (WebCore::MainResourceLoader::reportMemoryUsage):
1811         * loader/Prerenderer.cpp:
1812         (WebCore::Prerenderer::reportMemoryUsage):
1813         * loader/ResourceLoader.cpp:
1814         (WebCore::ResourceLoader::reportMemoryUsage):
1815         * loader/cache/CachedImage.cpp:
1816         (WebCore::CachedImage::reportMemoryUsage):
1817         * page/Page.cpp:
1818         (WebCore::Page::reportMemoryUsage):
1819
1820 2013-01-10  Christophe Dumez  <christophe.dumez@intel.com>
1821
1822         [EFL] Add gstreamer 1.0.5 to jhbuild
1823         https://bugs.webkit.org/show_bug.cgi?id=106178
1824
1825         Reviewed by Laszlo Gombos.
1826
1827         Remove GSTREAMER_INTERFACES_LIBRARIES from EFL
1828         CMake configuration.
1829
1830         No new tests, no behavior change for layout tests.
1831
1832         * PlatformEfl.cmake:
1833
1834 2013-01-09  Christophe Dumez  <christophe.dumez@intel.com>
1835
1836         Unreviewed build fix after r139266.
1837
1838         r139266 broke the debug build of the gstreamer backend due
1839         to a missing header include.
1840
1841         No new tests, no behavior change.
1842
1843         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
1844
1845 2013-01-09  Alec Flett  <alecflett@chromium.org>
1846
1847         IndexedDB: Allow createIndex/createObjectStore to be asynchronous
1848         https://bugs.webkit.org/show_bug.cgi?id=106377
1849
1850         Reviewed by Tony Chang.
1851
1852         Migrate implementations of createIndex/deleteIndex,
1853         createObjectStore/deleteObjectStore over to IDBDatabaseBackendImpl,
1854         so that they can be asynchronous in multi-process ports.
1855
1856         Has the side effect of removing the last consumers of
1857         IDBIndexBackendImpl and IDBObjectStoreBackendImpl. The former
1858         is removed complete and the latter becomes a temporary namespace
1859         pending a further more mechanical code shuffle.
1860
1861         A key refactoring effect is that the IDBDatabaseBackendImpl
1862         now contains the authoritative IDBDatabaseMetadata hierarchy,
1863         and updates to it are consolidated in one place rather than
1864         scattered across a parallel object tree.
1865
1866         No new tests as this is just refactoring.
1867
1868         * Modules/indexeddb/IDBBackingStore.cpp: Simplify objectstore/index loading and propagate errors.
1869         (WebCore::IDBBackingStore::getObjectStores):
1870         (WebCore::IDBBackingStore::getIndexes):
1871         * Modules/indexeddb/IDBBackingStore.h:
1872         (IDBBackingStore):
1873         * Modules/indexeddb/IDBCursorBackendImpl.cpp: Dependency cleanup.
1874         * Modules/indexeddb/IDBCursorBackendImpl.h: Dependency cleanup.
1875         (WebCore):
1876         * Modules/indexeddb/IDBDatabase.cpp: Frontend IDBObjectStores no longer hold onto backend objects.
1877         (WebCore::IDBDatabase::createObjectStore):
1878         (WebCore::IDBDatabase::deleteObjectStore):
1879         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Add all create/deleteIndex operations from IDBIndexBackendImpl.
1880         (WebCore::CreateObjectStoreOperation::create):
1881         (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
1882         (CreateObjectStoreOperation):
1883         (WebCore::DeleteObjectStoreOperation::create):
1884         (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
1885         (DeleteObjectStoreOperation):
1886         (WebCore::CreateObjectStoreAbortOperation::create):
1887         (WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
1888         (CreateObjectStoreAbortOperation):
1889         (WebCore::DeleteObjectStoreAbortOperation::create):
1890         (WebCore::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
1891         (DeleteObjectStoreAbortOperation):
1892         (CreateIndexOperation):
1893         (WebCore::CreateIndexOperation::create):
1894         (WebCore::CreateIndexOperation::CreateIndexOperation):
1895         (WebCore):
1896         (DeleteIndexOperation):
1897         (WebCore::DeleteIndexOperation::create):
1898         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
1899         (CreateIndexAbortOperation):
1900         (WebCore::CreateIndexAbortOperation::create):
1901         (WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
1902         (DeleteIndexAbortOperation):
1903         (WebCore::DeleteIndexAbortOperation::create):
1904         (WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
1905         (WebCore::GetOperation::GetOperation):
1906         (WebCore::IDBDatabaseBackendImpl::addObjectStore):
1907         (WebCore::IDBDatabaseBackendImpl::removeObjectStore):
1908         (WebCore::IDBDatabaseBackendImpl::addIndex):
1909         (WebCore::IDBDatabaseBackendImpl::removeIndex):
1910         (WebCore::IDBDatabaseBackendImpl::openInternal):
1911         (WebCore::IDBDatabaseBackendImpl::metadata):
1912         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1913         (WebCore::CreateObjectStoreOperation::perform):
1914         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
1915         (WebCore::IDBDatabaseBackendImpl::createIndex):
1916         (WebCore::CreateIndexOperation::perform):
1917         (WebCore::CreateIndexAbortOperation::perform):
1918         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
1919         (WebCore::DeleteIndexOperation::perform):
1920         (WebCore::DeleteIndexAbortOperation::perform):
1921         (WebCore::IDBDatabaseBackendImpl::get):
1922         (WebCore::IDBDatabaseBackendImpl::put):
1923         (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
1924         (WebCore::IDBDatabaseBackendImpl::count):
1925         (WebCore::DeleteRangeOperation::perform):
1926         (WebCore::DeleteObjectStoreOperation::perform):
1927         (WebCore::IDBDatabaseBackendImpl::deleteDatabaseFinal):
1928         (WebCore::IDBDatabaseBackendImpl::loadObjectStores): Load directly into metadata from backing store.
1929         (WebCore::CreateObjectStoreAbortOperation::perform):
1930         (WebCore::DeleteObjectStoreAbortOperation::perform):
1931         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
1932         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1933         (WebCore):
1934         (IDBDatabaseBackendImpl):
1935         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1936         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
1937         * Modules/indexeddb/IDBIndexBackendImpl.cpp: Removed.
1938         * Modules/indexeddb/IDBIndexBackendImpl.h: Removed.
1939         * Modules/indexeddb/IDBObjectStore.cpp:
1940         (WebCore::IDBObjectStore::IDBObjectStore): Frontend IDBIndex objects no longer hold onto backend.
1941         (WebCore::IDBObjectStore::createIndex): 
1942         (WebCore::IDBObjectStore::deleteIndex):
1943         * Modules/indexeddb/IDBObjectStore.h:
1944         (WebCore::IDBObjectStore::create):
1945         (IDBObjectStore):
1946         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1947         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
1948         (WebCore):
1949         (IDBObjectStoreBackendImpl):
1950         * Modules/indexeddb/IDBTransaction.cpp:
1951         (WebCore::IDBTransaction::objectStore):
1952         * Modules/indexeddb/IDBTransaction.h:
1953         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1954         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1955         (WebCore::IDBTransactionBackendImpl::objectStore):
1956         * WebCore.gypi:
1957         * WebCore.vcproj/WebCore.vcproj:
1958         * WebCore.xcodeproj/project.pbxproj:
1959
1960 2013-01-09  John J. Barton  <johnjbarton@chromium.org>
1961
1962         Web Inspector: Don't throw exceptions when we don't have a callstack
1963         https://bugs.webkit.org/show_bug.cgi?id=104849
1964
1965         Reviewed by Pavel Feldman.
1966
1967         Check array details.callFrames.length before accessing array;
1968
1969         No new tests, but this fix may help us find the cause of 'other' reasons.
1970
1971         * inspector/front-end/ScriptsPanel.js:
1972         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
1973
1974 2013-01-09  Eugene Klyuchnikov  <eustas@chromium.org>
1975
1976         Web Inspector: [Network] Data grid header and content cells are misaligned.
1977         https://bugs.webkit.org/show_bug.cgi?id=105795
1978
1979         Reviewed by Pavel Feldman.
1980
1981         Header and content tables have different width -> same percent values
1982         turn to different cell widths.
1983
1984         * inspector/front-end/DataGrid.js: Add "corner" cell to all rows.
1985         * inspector/front-end/dataGrid.css: Apply "corner" rules to "td" nodes.
1986         (.data-grid .data-container): Remove artificial padding.
1987
1988 2013-01-09  Tien-Ren Chen  <trchen@chromium.org>
1989
1990         Make caret repainting container-aware
1991         https://bugs.webkit.org/show_bug.cgi?id=103955
1992
1993         Reviewed by Simon Fraser.
1994
1995         Only invalidate local rects on the caret's repaint container,
1996         instead of invalidating an absolute rect on the whole view.
1997
1998         Test: fast/repaint/caret-with-transformation.html
1999
2000         * editing/FrameSelection.cpp:
2001         (WebCore::caretRendersInsideNode):
2002         (WebCore::caretRenderer):
2003         (WebCore::FrameSelection::caretRenderer):
2004         (WebCore::DragCaretController::caretRenderer):
2005         (WebCore::repaintCaretForLocalRect):
2006         (WebCore::FrameSelection::recomputeCaretRect):
2007         (WebCore::CaretBase::invalidateCaretRect):
2008         (WebCore::FrameSelection::focusedOrActiveStateChanged):
2009         * editing/FrameSelection.h:
2010         * rendering/RenderView.cpp:
2011         (WebCore::RenderView::repaintSelection):
2012         * rendering/RenderView.h:
2013
2014 2013-01-09  Ryosuke Niwa  <rniwa@webkit.org>
2015
2016         Rebaseline the binding test after r139278.
2017
2018         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2019         (WebCore::JSTestEventTarget::getOwnPropertySlot):
2020
2021 2013-01-09  Ryosuke Niwa  <rniwa@webkit.org>
2022
2023         [JSC] REGRESSION(r135093): A form control with name=length overrides length property on form.elements
2024         https://bugs.webkit.org/show_bug.cgi?id=105775
2025
2026         Reviewed by Sam Weinig.
2027
2028         Fixed the bug by respecting properties on ancestor classes.
2029
2030         Test: fast/dom/collection-length-should-not-be-overridden.html
2031
2032         * bindings/js/JSDOMBinding.h:
2033         (WebCore::getStaticValueSlotEntryWithoutCaching): Added.
2034         * bindings/scripts/CodeGeneratorJS.pm:
2035         (GenerateGetOwnPropertySlotBody): Use getStaticValueSlotEntryWithoutCaching to climb up the class
2036         hierarchy.
2037
2038 2013-01-09  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2039
2040         [EFL] [WebGL] Remove GLX dependencies from X11WindowResources..
2041         https://bugs.webkit.org/show_bug.cgi?id=106319
2042
2043         Reviewed by Kenneth Rohde Christiansen.
2044
2045         This patch removes GLX specific calls from X11WindowResources.
2046         This class is shared by both GLX and EGL implementations.
2047
2048         * platform/graphics/surfaces/glx/GLXSurface.cpp:
2049         (WebCore::GLXTransportSurface::setGeometry):
2050         * platform/graphics/surfaces/glx/X11WindowResources.cpp:
2051         (WebCore::X11OffScreenWindow::reSizeWindow):
2052
2053 2013-01-09  Huang Dongsung  <luxtella@company100.net>
2054
2055         Remove deviceScaleFactor argument in computeMinimumScaleFactorForContentContained().
2056         https://bugs.webkit.org/show_bug.cgi?id=106500
2057
2058         Reviewed by Kenneth Rohde Christiansen.
2059
2060         deviceScaleFactor argument is not used after r139189.
2061
2062         No new tests. Refactoring only.
2063
2064         * dom/ViewportArguments.cpp:
2065         (WebCore::computeMinimumScaleFactorForContentContained):
2066         * dom/ViewportArguments.h:
2067         (WebCore):
2068
2069 2013-01-09  Elliott Sprehn  <esprehn@gmail.com>
2070
2071         Node::containingShadowRoot should be constant time
2072         https://bugs.webkit.org/show_bug.cgi?id=106494
2073
2074         Reviewed by Dimitri Glazkov.
2075
2076         There's no reason to traverse up the tree to find the containing
2077         ShadowRoot when we already know if we're in a ShadowRoot by looking at
2078         the treeScope().
2079
2080         No new tests, just refactoring.
2081
2082         * dom/Node.cpp:
2083         (WebCore::Node::containingShadowRoot):
2084
2085 2013-01-09  Hajime Morrita  <morrita@google.com>
2086
2087         [Shadow DOM] Distribution related code on ElementShadow should be minimized.
2088         https://bugs.webkit.org/show_bug.cgi?id=106294
2089
2090         Reviewed by Dimitri Glazkov.
2091
2092         This change moves ElementShadow::m_selectFeatures,
2093         m_shouldCollectSelectFeatureSet and related methods to
2094         ContentDistributor.
2095
2096         There are also some renaming and small refactorings for better fit
2097         on new place:
2098
2099         - shouldCollectSelectFeatureSet is renamed needsSelectorRuleSet for conciseness.
2100         - setShouldCollectSelectFeatureSet() which used recursion morphed into
2101           iterative willAffectSelector().
2102         - ensureDistributionFromDocument() becomes a static method.
2103
2104         No new tests. Refactoring.
2105
2106         * WebCore.exp.in:
2107         * dom/Element.cpp:
2108         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
2109         * dom/ElementShadow.cpp:
2110         (WebCore::ElementShadow::addShadowRoot):
2111         (WebCore::ElementShadow::removeAllShadowRoots):
2112         * dom/ElementShadow.h:
2113         (ElementShadow):
2114         (WebCore::ElementShadow::invalidateDistribution):
2115         (WebCore::ElementShadow::ensureDistribution):
2116         (WebCore::ElementShadow::didAffectSelector):
2117         (WebCore::ElementShadow::willAffectSelector):
2118         (WebCore::ElementShadow::containingShadow):
2119         (WebCore):
2120         * html/shadow/ContentDistributor.cpp:
2121         (WebCore::ScopeContentDistribution::registerInsertionPoint):
2122         (WebCore::ScopeContentDistribution::unregisterInsertionPoint):
2123         (WebCore::ContentDistributor::ContentDistributor):
2124         (WebCore::ContentDistributor::ensureDistribution):
2125         (WebCore):
2126         (WebCore::ContentDistributor::ensureDistributionFromDocument):
2127         (WebCore::ContentDistributor::invalidateDistribution):
2128         (WebCore::ContentDistributor::ensureSelectFeatureSet):
2129         (WebCore::ContentDistributor::collectSelectFeatureSetFrom):
2130         (WebCore::ContentDistributor::didAffectSelector):
2131         (WebCore::ContentDistributor::willAffectSelector):
2132         (WebCore::ContentDistributor::didShadowBoundaryChange):
2133         * html/shadow/ContentDistributor.h:
2134         (ScopeContentDistribution):
2135         (WebCore::ContentDistributor::needsSelectFeatureSet):
2136         (WebCore::ContentDistributor::setNeedsSelectFeatureSet):
2137         (ContentDistributor):
2138         (WebCore::ContentDistributor::setValidity):
2139         (WebCore::ContentDistributor::needsInvalidation):
2140         * html/shadow/HTMLContentElement.cpp:
2141         (WebCore::HTMLContentElement::parseAttribute):
2142         * html/shadow/HTMLContentElement.h:
2143         * html/shadow/HTMLShadowElement.cpp:
2144         (WebCore::HTMLShadowElement::olderShadowRoot):
2145         * html/shadow/InsertionPoint.cpp:
2146         (WebCore::InsertionPoint::getDistributedNodes):
2147         (WebCore::InsertionPoint::insertedInto):
2148         (WebCore::InsertionPoint::removedFrom):
2149         * html/shadow/InsertionPoint.h:
2150         (WebCore::InsertionPoint::canAffectSelector):
2151         * testing/Internals.cpp:
2152         (WebCore::Internals::hasSelectorForIdInShadow):
2153         (WebCore::Internals::hasSelectorForClassInShadow):
2154         (WebCore::Internals::hasSelectorForAttributeInShadow):
2155         (WebCore::Internals::hasSelectorForPseudoClassInShadow):
2156
2157 2013-01-09  Shinya Kawanaka  <shinyak@chromium.org>
2158
2159         Assert triggered in SelectorChecker::checkOneSelector when scrollbar (e.g. :horizontal) selector is specified.
2160         https://bugs.webkit.org/show_bug.cgi?id=106414
2161
2162         Reviewed by Dimitri Glazkov.
2163
2164         In SelectorChecker::checkOneSelector, scrollbar related pseudoType (e.g. :horizontal) is not handled anywhere.
2165         This caused ASSERT triggered. We have to check them.
2166
2167         Test: fast/css/scrollbar-crash.html
2168
2169         * css/SelectorChecker.cpp:
2170         (WebCore::SelectorChecker::checkOneSelector):
2171
2172 2013-01-09  Filip Pizlo  <fpizlo@apple.com>
2173
2174         Unreviewed, fix build after http://trac.webkit.org/changeset/139262
2175
2176         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
2177
2178 2013-01-09  Chris Rogers  <crogers@google.com>
2179
2180         Allow live/local audio input to be enabled only when needed
2181         https://bugs.webkit.org/show_bug.cgi?id=106490
2182
2183         Reviewed by Kenneth Russell.
2184         
2185         WebAudio can process live/local audio input using a MediaStreamAudioSourceNode.
2186         But currently the audio back-end is not able to know when/if audio input will be
2187         needed, so it needs to assume the worst and initialize the system to support potential
2188         audio input in all cases.  For some audio back-ends this can end up being less efficient
2189         than initializing for audio output only.  This patch adds the ability for the audio back-end
2190         to be able to initialize itself for audio input later on, only when/if it's needed.
2191
2192         * Modules/webaudio/AudioContext.cpp:
2193         (WebCore::AudioContext::createMediaStreamSource):
2194         * Modules/webaudio/AudioDestinationNode.h:
2195         (AudioDestinationNode):
2196         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
2197         (WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode):
2198         (WebCore::DefaultAudioDestinationNode::initialize):
2199         (WebCore::DefaultAudioDestinationNode::uninitialize):
2200         (WebCore::DefaultAudioDestinationNode::createDestination):
2201         (WebCore):
2202         (WebCore::DefaultAudioDestinationNode::enableInput):
2203         * Modules/webaudio/DefaultAudioDestinationNode.h:
2204         (DefaultAudioDestinationNode):
2205         * Modules/webaudio/OfflineAudioDestinationNode.h:
2206         (OfflineAudioDestinationNode):
2207         (WebCore::OfflineAudioDestinationNode::sampleRate):
2208         * platform/audio/AudioDestination.h:
2209         (AudioDestination):
2210         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
2211         (WebCore::AudioDestination::create):
2212         * platform/audio/mac/AudioDestinationMac.cpp:
2213         (WebCore::AudioDestination::create):
2214
2215 2013-01-09  Tim Horton  <timothy_horton@apple.com>
2216
2217         Don't drop to huge tile mode if we're only slow-scrolling because of a page overlay
2218         https://bugs.webkit.org/show_bug.cgi?id=106502
2219         <rdar://problem/12959143>
2220
2221         Reviewed by Simon Fraser.
2222
2223         We only use the MainThreadScrollingReason "ForcedOnMainThread" if WebKit2 installs
2224         a page overlay (TiledCoreAnimationDrawingArea::didInstallPageOverlay), which clients
2225         can cause arbitrarily.
2226
2227         We probably should still use default-sized tiles in this case (this will also
2228         prevent us from falling into gigantic tiles for WebKit2 find-in-page, among other things).
2229
2230         * rendering/RenderLayerBacking.cpp:
2231         (WebCore::RenderLayerBacking::adjustTileCacheCoverage):
2232
2233 2013-01-09  Takashi Sakamoto  <tasak@google.com>
2234
2235         border-radius with box-shadow is not rendered correctly
2236         https://bugs.webkit.org/show_bug.cgi?id=106404
2237
2238         Reviewed by Hajime Morita.
2239
2240         RoundedRect::isRenderable is wrong. So RoundedRect::adjustRadii
2241         is invoked for renderable RoundedRects.
2242
2243         Test: fast/borders/border-radius-with-box-shadow.html
2244
2245         * platform/graphics/RoundedRect.cpp:
2246         (WebCore::RoundedRect::isRenderable):
2247         Have to compare topLeft's height plus bottomLeft's height with
2248         rect's height and to compare topRight's height plus bottomRight's
2249         height with rect's height.
2250
2251 2013-01-09  Joanmarie Diggs  <jdiggs@igalia.com>
2252
2253         [GTK] accessibility/aria-labelledby-overrides-label.html requires a proper baseline
2254         https://bugs.webkit.org/show_bug.cgi?id=105638
2255
2256         Reviewed by Martin Robinson.
2257
2258         The test was failing for two reasons:
2259         - AccessibilityRenderObject::correspondingLabelForControlElement() was
2260           not ignoring the ARIA labelled-by property
2261         - AccessibilityController::accessibleElementById() was not implemented
2262
2263         Because getting an element by ID cannot be done in the UIProcess, the
2264         decision was made to expose the element's ID as an accessible attribute
2265         of the object.
2266
2267         In addition, fixing the bug in AccessibilityRenderObject made it possible
2268         to eliminate the Gtk platform-specific expectations for another test.
2269
2270         No new tests; instead, the failing test was unskipped and a proper baseline
2271         provided.
2272
2273         * accessibility/AccessibilityRenderObject.cpp:
2274         (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
2275         Return null for objects where hasTextAlternative() is true.
2276         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2277         (webkitAccessibleGetAttributes): Expose the element's ID as an accessible
2278         attribute.
2279
2280 2013-01-09  Tony Gentilcore  <tonyg@chromium.org>
2281
2282         Remove unused includes from HTMLTreeBuilder
2283         https://bugs.webkit.org/show_bug.cgi?id=106496
2284
2285         Reviewed by Levi Weintraub.
2286
2287         Noticed these while searching HTMLTreeBuilder for non-thread friendly deps.
2288
2289         No new tests because no new functionality.
2290
2291         * html/parser/HTMLTreeBuilder.cpp:
2292
2293 2013-01-09  Max Vujovic  <mvujovic@adobe.com>
2294
2295         [CSS Shaders] Detached identifier after mesh box type is not applied
2296         https://bugs.webkit.org/show_bug.cgi?id=105321
2297
2298         Reviewed by Dean Jackson.
2299
2300         Before this patch, if a "detached" identifier followed a mesh box type identifier, the
2301         detached identifier was not applied. In other words, the mesh would still be attached.
2302
2303         For example:
2304         -webkit-filter: custom(url(...) mix(url(...) normal source-atop), 1 1 border-box detached);
2305
2306         Although the mesh box type is being removed from the Filter Effects spec, for now, we
2307         continue to accept the mesh box type in parsing because of existing content. Eventually,
2308         custom filters will transition to an at-rule syntax, once it is defined.
2309
2310         Test: css3/filters/custom/custom-filter-detached-mesh-with-mesh-box-type.html
2311
2312         * css/CSSParser.cpp:
2313         (WebCore::CSSParser::parseCustomFilter):
2314             In CSSParser, do not add the mesh box type identifier to the list that will be passed to
2315             StyleResolver. StyleResolver is expecting a "detached" identifier in that position and
2316             does not interpret mesh box types.
2317
2318 2013-01-09  Dan Winship  <danw@gnome.org>
2319
2320         [Soup] Handle redirection inside WebKit
2321         https://bugs.webkit.org/show_bug.cgi?id=61122
2322         https://bugs.webkit.org/show_bug.cgi?id=88961
2323
2324         Reviewed by Martin Robinson.
2325
2326         Rather than using libsoup's built-in redirection handling (which
2327         doesn't do everything exactly the way WebKit wants, and can't
2328         handle redirects to non-http URIs anyway), process redirections
2329         ourselves.
2330
2331         No new tests; unskips a few existing tests.
2332
2333         * platform/network/ResourceHandleInternal.h:
2334         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2335         (ResourceHandleInternal):
2336         * platform/network/soup/ResourceError.h:
2337         (ResourceError):
2338         * platform/network/soup/ResourceErrorSoup.cpp:
2339         (WebCore::ResourceError::transportError):
2340         (WebCore):
2341         (WebCore::ResourceError::httpError):
2342         * platform/network/soup/ResourceHandleSoup.cpp:
2343         (WebCore):
2344         (WebCore::gotHeadersCallback):
2345         (WebCore::restartedCallback):
2346         (WebCore::shouldRedirect):
2347         (WebCore::doRedirect):
2348         (WebCore::redirectCloseCallback):
2349         (WebCore::redirectSkipCallback):
2350         (WebCore::cleanupSoupRequestOperation):
2351         (WebCore::sendRequestCallback):
2352         (WebCore::createSoupMessageForHandleAndRequest):
2353         (WebCore::createSoupRequestAndMessageForHandle):
2354         (WebCore::ResourceHandle::start):
2355
2356 2013-01-09  Florin Malita  <fmalita@chromium.org>
2357
2358         [Skia] Implement GraphicsContext::addRoundedRectClip() using SkCanvas::clipRRect()
2359         https://bugs.webkit.org/show_bug.cgi?id=106461
2360
2361         Reviewed by Stephen White.
2362
2363         This patch adds a Skia-specific version of GraphicsContext::addRoundedRectClip() to take
2364         advantage of the SkCanvas::clipRRect() primitive.
2365
2366         As a minor cleanup, the anonymous namespace in GraphicsContextSkia.cpp is extended to cover
2367         all the local helper functions.
2368
2369         No new tests: coverage provided by existing tests.
2370
2371         * platform/graphics/GraphicsContext.cpp:
2372         (WebCore):
2373         * platform/graphics/skia/GraphicsContextSkia.cpp:
2374         (WebCore::GraphicsContext::addRoundedRectClip):
2375         (WebCore):
2376         (WebCore::GraphicsContext::fillRoundedRect):
2377         * platform/graphics/skia/PlatformContextSkia.h:
2378         (WebCore::PlatformContextSkia::clipRRect):
2379         (WebCore):
2380
2381 2013-01-09  Andreas Kling  <akling@apple.com>
2382
2383         SVG-as-image: Throw out cached bitmap renderings after they sit unused for some time.
2384         <http://webkit.org/b/106484>
2385         <rdar://problem/12983216>
2386
2387         Reviewed by Antti Koivisto.
2388
2389         Add a one-shot timer to SVGImageCache to self-clear the bitmap cache 30 seconds after last access.
2390         This prevents us from keeping huge ImageBuffers around in memory for the lifetime of the elements
2391         referencing that particular SVG file. (The ownership model is actually a bit more complicated
2392         but that's irrelevant to this issue.)
2393
2394         10234kB progression on Membuster3.
2395
2396         * svg/graphics/SVGImageCache.cpp:
2397         (WebCore::SVGImageCache::SVGImageCache):
2398         (WebCore::SVGImageCache::~SVGImageCache):
2399         (WebCore::SVGImageCache::clearBitmapCache):
2400         (WebCore::SVGImageCache::cacheClearTimerFired):
2401         (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
2402         * svg/graphics/SVGImageCache.h:
2403         (SVGImageCache):
2404
2405 2013-01-09  Alexey Proskuryakov  <ap@apple.com>
2406
2407         Assertion failure in SubresourceLoader::didFail when reloading
2408         https://bugs.webkit.org/show_bug.cgi?id=101416
2409
2410         Reviewed by Nate Chapin.
2411
2412         Test: http/tests/cache/network-error-during-revalidation.html
2413
2414         * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didFail): Handle revalidation.
2415
2416 2013-01-09  Alexandru Chiculita  <achicu@adobe.com>
2417
2418         Assertion Failure in WebCore::RenderLayerCompositor::updateCompositingLayers
2419         https://bugs.webkit.org/show_bug.cgi?id=106419
2420
2421         Reviewed by Simon Fraser.
2422
2423         No new tests added, just un-skipped 3 existing tests.
2424
2425         RenderLayerCompositor::updateCompositingLayers is being called with a pending layout, so computing the
2426         layers at that point would be useless & error-prone as they will be using incorrect layout values. If a layout is pending it means that 
2427         RenderLayerCompositor::updateCompositingLayers would get called again after the pending layout ends, so any values calculated at that point would be
2428         overwritten immediately. This patch removes the old ASSERT and makes it a return instead.
2429
2430         * rendering/RenderLayerCompositor.cpp:
2431         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2432
2433 2013-01-09  Robert Hogan  <robert@webkit.org>
2434
2435         REGRESSION(r111439): Focus ring is rendered incorrectly in fast/inline/continuation-outlines-with-layers.html
2436         https://bugs.webkit.org/show_bug.cgi?id=106064
2437
2438         Reviewed by David Hyatt.
2439
2440         * rendering/RenderBlock.cpp:
2441         (WebCore::RenderBlock::paintObject): 
2442
2443 2013-01-09  Gregg Tavares  <gman@google.com>
2444
2445         Add stub for CanvasProxy
2446         https://bugs.webkit.org/show_bug.cgi?id=106275
2447
2448         Reviewed by Dean Jackson.
2449
2450         No new tests as no new fuctionality exposed.
2451
2452         * CMakeLists.txt:
2453         * DerivedSources.make:
2454         * DerivedSources.pri:
2455         * GNUmakefile.list.am:
2456         * Target.pri:
2457         * WebCore.gypi:
2458         * WebCore.xcodeproj/project.pbxproj:
2459         * html/canvas/CanvasProxy.cpp: Added.
2460         * html/canvas/CanvasProxy.h: Added.
2461         * html/canvas/CanvasProxy.idl: Added.
2462
2463 2013-01-09  Antti Koivisto  <antti@apple.com>
2464
2465         Release FastMalloc thread caches on memory warning
2466         https://bugs.webkit.org/show_bug.cgi?id=106471
2467
2468         Reviewed by Geoff Garen.
2469         
2470         FastMalloc keeps some memory in per-thread caches (currently 2MB each). We currently flush these caches on memory warning 
2471         for the main thread only. We should do it for other WebKit threads that use FastMalloc too.
2472
2473         Call WTF::releaseFastMallocFreeMemory in a bunch of WebCore support threads on memory warning. Unfortunately we don't have 
2474         an uniform way of doing threads so this requires bunch of thread type specific code.
2475         
2476         Looks to be ~1% progression in membuster3 final and maximum numbers.
2477
2478         * platform/mac/MemoryPressureHandlerMac.mm:
2479         (WebCore::MemoryPressureHandler::releaseMemory):
2480         * storage/StorageTask.cpp:
2481         (WebCore::StorageTask::performTask):
2482         * storage/StorageTask.h:
2483         (WebCore::StorageTask::createReleaseFastMallocFreeMemory):
2484         * storage/StorageThread.cpp:
2485         (WebCore::storageThreads):
2486         (WebCore):
2487         (WebCore::StorageThread::StorageThread):
2488         (WebCore::StorageThread::~StorageThread):
2489         (WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThread):
2490         * storage/StorageThread.h:
2491         (StorageThread):
2492         * workers/WorkerThread.cpp:
2493         (WebCore::threadSetMutex):
2494         (WebCore::workerThreads):
2495         (WebCore::WorkerThread::workerThreadCount):
2496         (WebCore::WorkerThread::WorkerThread):
2497         (WebCore::WorkerThread::~WorkerThread):
2498         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThread):
2499         (WebCore):
2500         * workers/WorkerThread.h:
2501         (WorkerThread):
2502
2503 2013-01-09  Tony Gentilcore  <tonyg@chromium.org>
2504
2505         REGRESSION(r139141): Assertion failure in WebCore::HTMLConstructionSite::HTMLConstructionSite
2506         https://bugs.webkit.org/show_bug.cgi?id=106412
2507
2508         Reviewed by Darin Adler.
2509
2510         This corrects the assertion added in r139141. The assertion was designed to make sure that we are using the
2511         HTMLDocument class. XHTML documents also use HTMLDocument.
2512
2513         No new tests because no new functionality.
2514
2515         * html/parser/HTMLConstructionSite.cpp:
2516         (WebCore::HTMLConstructionSite::HTMLConstructionSite):
2517
2518 2013-01-08  Ojan Vafai  <ojan@chromium.org>
2519
2520         min-content gets the wrong value if min-width is set on some form controls
2521         https://bugs.webkit.org/show_bug.cgi?id=106389
2522
2523         Reviewed by Tony Chang.
2524
2525         Simplify the logic. The only exposed change in behavior is that
2526         m_minPreferredLogicalWidth gets set to m_maxPreferredLogicalWidth
2527         instead of 0 when min-width is set.
2528
2529         Test: fast/forms/min-content-form-controls.html
2530
2531         * rendering/RenderFileUploadControl.cpp:
2532         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
2533         * rendering/RenderListBox.cpp:
2534         (WebCore::RenderListBox::computePreferredLogicalWidths):
2535         * rendering/RenderMenuList.cpp:
2536         (WebCore::RenderMenuList::computePreferredLogicalWidths):
2537         * rendering/RenderSlider.cpp:
2538         (WebCore::RenderSlider::computePreferredLogicalWidths):
2539         * rendering/RenderTextControl.cpp:
2540         (WebCore::RenderTextControl::computePreferredLogicalWidths):
2541
2542 2013-01-09  Abhishek Arya  <inferno@chromium.org>
2543
2544         Mitigate out-of-bounds access in InlineIterator
2545         https://bugs.webkit.org/show_bug.cgi?id=104812
2546
2547         Reviewed by Levi Weintraub.
2548
2549         Share code between InlineIterator::current and InlineIterator::previousInSameNode,
2550         thereby checking for access outside text renderer's length.
2551
2552         * rendering/InlineIterator.h:
2553         (InlineIterator):
2554         (WebCore::InlineIterator::characterAt):
2555         (WebCore):
2556         (WebCore::InlineIterator::current):
2557         (WebCore::InlineIterator::previousInSameNode):
2558
2559 2013-01-09  Yongjun Zhang  <yongjun_zhang@apple.com>
2560
2561         If ImageLoader's loadEventSender or errorEventSender fires after document is detached, the document will be leaked.
2562
2563         https://bugs.webkit.org/show_bug.cgi?id=106394
2564
2565         Reviewed by Alexey Proskuryakov.
2566
2567         ImageLoader's loadEventSender and errorEventSender schedule event dispatching in separate timers and refs
2568         the Element in updatedHasPendingEvent.  If the Document is detached before either eventSender dispatches,
2569         we would leak the Document since we bail out early in dispatchPendingLoadEvent or dispatchPendingErrorEvent,
2570         without deref-ing the Element itself.
2571
2572         No new tests.  Verified manually by using heap tool to count the living HTMLDocuments.
2573
2574         * loader/ImageLoader.cpp:
2575         (WebCore::ImageLoader::dispatchPendingLoadEvent): also call updatedHasPendingEvent to deref the Element if
2576                     the document is detached.
2577         (WebCore::ImageLoader::dispatchPendingErrorEvent): ditto.
2578
2579 2013-01-09  Dimitri Glazkov  <dglazkov@chromium.org>
2580
2581         Unreviewed, rolling out r139143.
2582         http://trac.webkit.org/changeset/139143
2583         https://bugs.webkit.org/show_bug.cgi?id=106135
2584
2585         Broke Chromium content_browsertests.
2586
2587         * platform/leveldb/LevelDBDatabase.cpp:
2588         (WebCore::LevelDBDatabase::open):
2589         (WebCore::LevelDBDatabase::openInMemory):
2590
2591 2013-01-09  Sam Weinig  <sam@webkit.org>
2592
2593         Add Settings.in and make_settings.pl to the project.
2594
2595         Reviewed by Anders Carlsson.
2596
2597         * WebCore.xcodeproj/project.pbxproj:
2598
2599 2013-01-09  Ojan Vafai  <ojan@chromium.org>
2600
2601         marquee special-case in RenderBlock is not needed
2602         https://bugs.webkit.org/show_bug.cgi?id=106396
2603
2604         Reviewed by Simon Fraser.
2605
2606         This was added in http://trac.webkit.org/changeset/105772. The layout test
2607         in that patch (which is disabled) works and the original site that was broken
2608         also still works.
2609
2610         * rendering/RenderBlock.cpp:
2611         (WebCore::RenderBlock::computePreferredLogicalWidths):
2612
2613 2013-01-09  Tony Chang  <tony@chromium.org>
2614
2615         Automatically generate Settings::unifiedTextCheckerEnabled
2616         https://bugs.webkit.org/show_bug.cgi?id=106382
2617
2618         Reviewed by Adam Barth.
2619
2620         No new tests, no change in behavior. This is covered by existing editing/spelling tests.
2621
2622         * page/Settings.cpp:
2623         (WebCore): Move default value into a global so we can generate the initializer.
2624         (WebCore::Settings::Settings): Remove initializer code that is now generated.
2625         * page/Settings.h:
2626         (Settings): Remove getters and setters.
2627         * page/Settings.in: Add entry to be generated.
2628         * testing/InternalSettings.cpp:
2629         (WebCore::InternalSettings::Backup::Backup): Remove backup since the generated code does this.
2630         (WebCore::InternalSettings::Backup::restoreTo): Remove restore code since the generated code does this.
2631         * testing/InternalSettings.h:
2632         (InternalSettings): Remove member variable.
2633         * testing/InternalSettings.idl: The getter was unused so it's being removed. The setter is now generated.
2634
2635 2013-01-09  Alexis Menard  <alexis@webkit.org>
2636
2637         Implement CSS computed style value for transition shorthand
2638         https://bugs.webkit.org/show_bug.cgi?id=105035
2639
2640         Reviewed by Dean Jackson.
2641
2642         Implement support for query the transition and webkit-transition
2643         shorthand from the computed style.
2644
2645         Test: transitions/transitions-parsing.html
2646
2647         * css/CSSComputedStyleDeclaration.cpp:
2648         (WebCore::createTransitionPropertyValue): Factor the code to create the
2649         correct value into a function to reuse it for the shorthand.
2650         (WebCore::getTransitionPropertyValue):
2651         (WebCore::createTimingFunctionValue): Little refactor, the intermediate
2652         local variables are not needed.
2653         (WebCore::getTimingFunctionValue):
2654         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2655
2656 2013-01-09  Hajime Morrita  <morrita@google.com>
2657
2658         Document::setActiveNode() should be Document::setActiveElement()
2659         https://bugs.webkit.org/show_bug.cgi?id=106437
2660
2661         Reviewed by Ojan Vafai.
2662
2663         No new tests. No functoinal change.
2664
2665         * dom/Document.cpp:
2666         (WebCore::Document::setActiveElement):
2667         (WebCore::Document::updateHoverActiveState):
2668         * dom/Document.h:
2669         (Document):
2670         * rendering/HitTestResult.cpp:
2671         (WebCore::HitTestResult::innerElement):
2672         (WebCore):
2673         * rendering/HitTestResult.h:
2674         (HitTestResult):
2675
2676 2013-01-09  Shinya Kawanaka  <shinyak@chromium.org>
2677
2678         [Shadow DOM]: ShadowRoot has wrong nodeName attribute
2679         https://bugs.webkit.org/show_bug.cgi?id=104995
2680
2681         Reviewed by Dimitri Glazkov.
2682
2683         According to the Shadow DOM spec, ShadowRoot.nodeName should return '#document-fragment' instead of '#shadow-root'.
2684         We remove ShadowRoot::nodeName.
2685
2686         No new tests, covered by existing tests.
2687
2688         * dom/ShadowRoot.cpp:
2689         * dom/ShadowRoot.h:
2690         (ShadowRoot):
2691
2692 2013-01-09  Zoltan Horvath  <zoltan@webkit.org>
2693
2694         [CSS Regions] Selecting text through nested regions causes weird and unclearable selection  
2695         https://bugs.webkit.org/show_bug.cgi?id=105641
2696
2697         Reviewed by David Hyatt.
2698
2699         If you have a region with a nested region inside what is rendered below the base region and you are trying select text
2700         starting from the base region and ending it in the nested region, firstly you got a weird selection, secondly you can't
2701         clear the selection. We could prevent this strange behavior by preventing the selection through different region flows.
2702
2703         Test: fast/regions/selecting-text-through-different-region-flows.html
2704
2705         * rendering/RenderView.cpp:
2706         (WebCore::RenderView::setSelection): Don't allow selection when trying to select different region flows.
2707
2708 2013-01-09  Hugo Parente Lima  <hugo.lima@openbossa.org>
2709
2710         Regression(r138681) : Add HAVE(ACCESSIBILITY) guard to atk files, fix for a fix.
2711         https://bugs.webkit.org/show_bug.cgi?id=106448
2712
2713         Reviewed by Gyuyoung Kim.
2714
2715         Some atk files don't use HAVE(ACCESSIBILITY). It might make build errors when
2716         the macro isn't enabled.
2717
2718         * accessibility/atk/WebKitAccessibleHyperlink.h:
2719         * accessibility/atk/WebKitAccessibleInterfaceAction.h:
2720         * accessibility/atk/WebKitAccessibleInterfaceComponent.h:
2721         * accessibility/atk/WebKitAccessibleInterfaceHypertext.h:
2722
2723 2013-01-09  Chris Fleizach  <cfleizach@apple.com>
2724
2725         AX: native popup buttons should not use textUnderElement for their title
2726         https://bugs.webkit.org/show_bug.cgi?id=106349
2727
2728         Reviewed by Ryosuke Niwa.
2729
2730         Chromium relies on the older title() method to return its title. As a result, we also
2731         need to handle the case of <select> element pop up buttons returning the textUnderElement().
2732
2733         No new tests. Fix existing break.
2734
2735         * accessibility/AccessibilityNodeObject.cpp:
2736         (WebCore::AccessibilityNodeObject::title):
2737
2738 2013-01-09  Jussi Kukkonen  <jussi.kukkonen@intel.com>
2739
2740         IndexedDB: Remove ASSERTs that can't assert but result in compiler warnings
2741         https://bugs.webkit.org/show_bug.cgi?id=106442
2742
2743         Reviewed by Kentaro Hara.
2744
2745         IDBLevelDBCoding::m_metaDataType has been changed to unsigned
2746         so ASSERT(m_metaDataType >= 0) is no longer useful: the compiler
2747         warnings however create build difficulties at least with EFL.
2748
2749         * Modules/indexeddb/IDBLevelDBCoding.cpp:
2750         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::metaDataType):
2751         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):
2752
2753 2012-12-29  Ilya Tikhonovsky  <loislo@chromium.org>
2754
2755         Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrumented classes 1/N
2756         https://bugs.webkit.org/show_bug.cgi?id=106445
2757
2758         Reviewed by Vsevolod Vlasov.
2759
2760         The patch has almost mechanical changes.
2761
2762         * bindings/v8/V8Binding.cpp:
2763         * bindings/v8/V8ValueCache.cpp:
2764         (WTF):
2765         (WebCore::StringCache::reportMemoryUsage):
2766         (WebCore):
2767         * dom/Document.cpp:
2768         (WebCore::Document::reportMemoryUsage):
2769         * dom/DocumentStyleSheetCollection.cpp:
2770         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
2771         * dom/ElementRareData.cpp:
2772         (WebCore::ElementRareData::reportMemoryUsage):
2773         * loader/cache/CachedResource.cpp:
2774         (WebCore::CachedResource::reportMemoryUsage):
2775         * page/Frame.cpp:
2776         (WebCore::Frame::reportMemoryUsage):
2777         * page/Page.cpp:
2778         (WebCore::Page::reportMemoryUsage):
2779         * platform/graphics/skia/NativeImageSkia.cpp:
2780         (WebCore::NativeImageSkia::reportMemoryUsage):
2781         * platform/network/FormData.cpp:
2782         (WebCore::FormData::reportMemoryUsage):
2783         (WebCore):
2784         (WebCore::FormDataElement::reportMemoryUsage):
2785         * platform/network/FormData.h:
2786         (FormDataElement):
2787         * rendering/RenderView.cpp:
2788         (WebCore::RenderView::reportMemoryUsage):
2789         * rendering/style/StyleRareNonInheritedData.cpp:
2790         (WebCore::StyleRareNonInheritedData::reportMemoryUsage):
2791
2792 2013-01-09  Florin Malita  <fmalita@chromium.org>
2793
2794         [Skia] Implement GraphicsContext::fillRoundedRect() using SkCanvas::drawRRect()
2795         https://bugs.webkit.org/show_bug.cgi?id=106366
2796
2797         Reviewed by Stephen White.
2798
2799         Skia provides rounded-rect primitives, so we can avoid degrading fillRoundedRect() to
2800         drawPath().
2801
2802         Due to subtle pixel differences (not visually noticeable), switching from drawPath() to
2803         drawRRect() requires rebaselining some of the existing results.
2804
2805         No new tests: coverage provided by existing tests.
2806
2807         * platform/graphics/skia/GraphicsContextSkia.cpp:
2808         (WebCore::GraphicsContext::fillRoundedRect):
2809         * platform/graphics/skia/PlatformContextSkia.h:
2810         (WebCore::PlatformContextSkia::drawRRect):
2811         (WebCore):
2812
2813 2013-01-09  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2814
2815         Web Inspector: cannot undock inspector when window size is too small
2816         https://bugs.webkit.org/show_bug.cgi?id=106054
2817
2818         Reviewed by Pavel Feldman.
2819
2820         Consider dockingUnavailable flag only when dockSide is in undocked
2821         state.
2822
2823         * inspector/front-end/DockController.js:
2824         (WebInspector.DockController.prototype._updateUI.get document):
2825
2826 2013-01-09  Zeno Albisser  <zeno@webkit.org>
2827
2828         [Qt] WebGL content is incomplete when using multiple canvas
2829         https://bugs.webkit.org/show_bug.cgi?id=106313
2830
2831         While we are using double buffering for WebGL,
2832         we do not use a drawable that implements a mechanism
2833         for swapping buffers.
2834         Therefore we have to make sure that all GL commands
2835         have been executed properly before copying the texture
2836         onto the GraphicsSurface.
2837
2838         Reviewed by Simon Hausmann.
2839
2840         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2841         (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext):
2842
2843 2013-01-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2844
2845         Unreviewed. Fix make distcheck.
2846
2847         * GNUmakefile.list.am: Add missing headers.
2848
2849 2013-01-09  Zeno Albisser  <zeno@webkit.org>
2850
2851         [Qt][Mac] GraphicsSurface does not need glEnable/glDisable for texture targets.
2852         https://bugs.webkit.org/show_bug.cgi?id=106310
2853
2854         glEnable/glDisable for texture targets is only necessary
2855         when using the fixed function pipeline.
2856         Enabling or disabling the target might cause unexpected
2857         behavior to texture bindings and is therefore considered harmful.
2858
2859         Reviewed by Noam Rosenthal.
2860
2861         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
2862         (WebCore::createTexture):
2863         (WebCore::GraphicsSurfacePrivate::copyFromTexture):
2864         (WebCore::GraphicsSurface::platformCopyToGLTexture):
2865
2866 2013-01-09  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2867
2868         INPUT_MULTIPLE_FIELDS_UI: min/max attributes should not make all fields read-only
2869         https://bugs.webkit.org/show_bug.cgi?id=106422
2870
2871         Reviewed by Kent Tamura.
2872
2873         Do not make day-field of date input and month-field of month input readonly
2874         even if min and max are the same.
2875
2876         Tests: fast/forms/date-multiple-fields/date-multiple-fields-readonly-subfield.html
2877                fast/forms/month-multiple-fields/month-multiple-fields-readonly-subfield.html
2878
2879         * html/shadow/DateTimeEditElement.cpp:
2880         (WebCore::DateTimeEditBuilder::visitField): Added check for date type.
2881
2882 2013-01-09  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2883
2884         INPUT_MULTIPLE_FIELDS_UI: Step-up/-down of week field should respect min/max attributes
2885         https://bugs.webkit.org/show_bug.cgi?id=106416
2886
2887         Reviewed by Kent Tamura.
2888
2889         Make step-up/-down of the week field respect the min/max attributes of the element.
2890         Note that it still accepts any keyboard inputs (the element
2891         becomes 'invalid' state when out-of-range values entered).
2892
2893         Tests: fast/forms/week-multiple-fields/week-multiple-fields-readonly-subfield.html
2894                fast/forms/week-multiple-fields/week-multiple-fields-stepup-stepdown-from-renderer.html
2895
2896         * css/html.css: Add a CSS rule for week field.
2897         * html/shadow/DateTimeEditElement.cpp:
2898         (WebCore::DateTimeEditBuilder::visitField):
2899         Compute minimum/maximum values of week field from the min/max parameters of the element.
2900         * html/shadow/DateTimeFieldElements.cpp:
2901         (WebCore::DateTimeWeekFieldElement::DateTimeWeekFieldElement): Add mininum/maximum arguments.
2902         (WebCore::DateTimeWeekFieldElement::create): Ditto.
2903         (WebCore::DateTimeWeekFieldElement::clampValueForHardLimits): Added.
2904         * html/shadow/DateTimeFieldElements.h:
2905         (DateTimeWeekFieldElement): Add mininum/maximum arguments and declare clampValueForHardLimits.
2906
2907 2013-01-08  Arpita Bahuguna  <arpitabahuguna@gmail.com>
2908
2909         Caret is incorrectly painted for a contenteditable <div> containing a <br> in vertical writing mode
2910         https://bugs.webkit.org/show_bug.cgi?id=103621
2911
2912         Reviewed by Ryosuke Niwa.
2913
2914         While computing the caret rect for the given specific scenario, we
2915         canonicalize our position. For the upstream (or downstream) block flow
2916         candidates a check to ignore the nodes having renderers with zero height
2917         is carried out. This is where we fail our check in the vertical writing mode.
2918
2919         In the vertical writing mode, instead of verifying the height of the descendants
2920         of the candidate nodes, a check for their width should be carried out.
2921
2922         For our case, i.e. the <br> element contained inside the div, the bounding box
2923         in the vertical writing mode would have a width greater than zero and height
2924         equal to zero (as is to be expected in the vertical mode).
2925
2926         Thus, we need to make a check against the logical height. For the vertical
2927         writing mode, the logical height should return the width of the computed
2928         bounding box.
2929
2930         Test: editing/selection/caret-in-div-containing-br-in-vertical-mode.html
2931
2932         * dom/Position.cpp:
2933         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
2934         Have modified the code to verify against the logical height, instead
2935         of simply the height, both in case of RenderText and RenderBox.
2936         The logical height of the computed rects returns a value according
2937         to the writing mode.
2938
2939         For the RenderText a new function, linesLogicalBoundingBox() is called
2940         which returns the values depending on the writing mode.
2941         Similarly, on the RenderBox, pixelSnappedLogicalHeight() is called which
2942         too takes care of the writing mode internally. (borderBoundingBox()
2943         internally calls on the pixelSnappedRect).
2944
2945         * rendering/RenderText.cpp:
2946         (WebCore::RenderText::linesLogicalBoundingBox):
2947         (WebCore):
2948         * rendering/RenderText.h:
2949         (RenderText):
2950         New function is added to return the logical linesBoundingBox, i.e.,
2951         the width and height of the linesBoundingBox are set according to
2952         the writing mode.
2953
2954 2013-01-08  Tony Gentilcore  <tonyg@chromium.org>
2955
2956         Remove a few unused includes from HTMLTreeBuilder
2957         https://bugs.webkit.org/show_bug.cgi?id=106401
2958
2959         Reviewed by Adam Barth.
2960
2961         I happened to notice these while attempting to remove non-thread friendly deps from HTMLTreeBuilder.
2962
2963         No new tests because no new functionality.
2964
2965         * html/parser/HTMLTreeBuilder.cpp:
2966
2967 2013-01-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2968
2969         Regression(r138681): Add HAVE(ACCESSIBILITY) guard to atk files
2970         https://bugs.webkit.org/show_bug.cgi?id=106290
2971
2972         Reviewed by Martin Robinson.
2973
2974         Some atk files don't use HAVE(ACCESSIBILITY). It might make build errors when
2975         the macro isn't enabled.
2976
2977         * accessibility/atk/AXObjectCacheAtk.cpp:
2978         * accessibility/atk/WebKitAccessibleHyperlink.h:
2979         * accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
2980         * accessibility/atk/WebKitAccessibleInterfaceAction.h:
2981         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
2982         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
2983         * accessibility/atk/WebKitAccessibleInterfaceDocument.h:
2984         * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
2985         * accessibility/atk/WebKitAccessibleInterfaceEditableText.h:
2986         * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp:
2987         * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.h:
2988         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
2989         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
2990         * accessibility/atk/WebKitAccessibleInterfaceImage.h:
2991         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
2992         * accessibility/atk/WebKitAccessibleInterfaceSelection.h:
2993         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
2994         * accessibility/atk/WebKitAccessibleInterfaceTable.h:
2995         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2996         * accessibility/atk/WebKitAccessibleInterfaceText.h:
2997         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
2998         * accessibility/atk/WebKitAccessibleInterfaceValue.h:
2999         * accessibility/atk/WebKitAccessibleUtil.cpp:
3000         * accessibility/atk/WebKitAccessibleUtil.h:
3001         * accessibility/atk/WebKitAccessibleWrapperAtk.h:
3002
3003 2013-01-08  Matt Falkenhagen  <falken@chromium.org>
3004
3005         Make NodeRenderingContext::parentRenderer and nextRenderer top layer aware
3006         https://bugs.webkit.org/show_bug.cgi?id=103477
3007
3008         Reviewed by Hajime Morita.
3009
3010         Original patch by Elliott Sprehn (minor code and layout tests added).
3011
3012         Instead of using adjustInsertionPointForTopLayerElement and reassigning
3013         pointers passed by reference we should just make nextRenderer and parentRenderer
3014         handle the top layer properly. Right now they would return the wrong values
3015         since we only correctly handle the top layer during renderer creation.
3016
3017         This makes handling of top layer elements consistent with handling of
3018         other special renderering systems like flow threads.
3019
3020         Tests: fast/dom/HTMLDialogElement/modal-dialog-in-replaced-renderer.html
3021                fast/dom/HTMLDialogElement/modal-dialog-in-table-column.html
3022                fast/dom/HTMLDialogElement/modal-dialog-sibling.html
3023
3024         * dom/NodeRenderingContext.cpp:
3025         (WebCore::isRendererReparented): Added this helper function. We must skip
3026         renderers that are reparented in nextRenderer and previousRenderer.
3027         (WebCore):
3028         (WebCore::adjustInsertionPointForTopLayerElement): Removed this method.
3029         (WebCore::NodeRenderingContext::nextRenderer):
3030         (WebCore::NodeRenderingContext::previousRenderer):
3031         (WebCore::NodeRenderingContext::parentRenderer):
3032         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
3033
3034 2013-01-08  Kent Tamura  <tkent@chromium.org>
3035
3036         REGRESSION(r135836): Invalid user input for input[type=number] should be cleared by input.value=""
3037         https://bugs.webkit.org/show_bug.cgi?id=106284
3038
3039         Reviewed by Hajime Morita.
3040
3041         No new tests. Updates fast/forms/number/number/validity-badinput.html.
3042
3043         * html/NumberInputType.cpp:
3044         (WebCore::NumberInputType::setValue):
3045         If the new sanitized value is empty and innerTextValue is a bad input
3046         (it means !valueChanged && !innerTextValue().isEmpty() because the new
3047         sanitized value is empty), we need to update innerTextValue with the
3048         empty string.
3049         * html/NumberInputType.h:
3050         (NumberInputType): Declare setValue.
3051
3052 2013-01-08  Nate Chapin  <japhet@chromium.org>
3053
3054         REGRESSION(r138222?): [Mac WK1] http/tests/appcache/main-resource-redirect.html asserts in WebFrameLoaderClient::dispatchDidFinishLoading
3055         https://bugs.webkit.org/show_bug.cgi?id=106123
3056
3057         Reviewed by Alexey Proskuryakov.
3058
3059         No new tests, fixing an existing test.
3060
3061         * loader/MainResourceLoader.cpp:
3062         (WebCore::MainResourceLoader::continueAfterNavigationPolicy): Before calling m_resource->removeClient(this)
3063             and potentially canceling the ResourceLoader, ensure it won't send resource load callbacks.
3064         * loader/ResourceLoader.h:
3065         (WebCore::ResourceLoader::setSendCallbackPolicy):
3066
3067 2013-01-08  Alexandru Chiculita  <achicu@adobe.com>
3068
3069         Assert in RenderGeometryMap::mapToContainer
3070         https://bugs.webkit.org/show_bug.cgi?id=106068
3071
3072         Reviewed by Simon Fraser.
3073
3074         The assert was due to a pending layout, so the values used to compute the layer bounding boxes were incorrect.
3075         That was because of the Document::setVisualUpdatesAllowed mechanism, which triggers a compositor update
3076         and a repaint, but before this patch didn't check whether a layout was pending or not.
3077
3078         Added a check in Document::setVisualUpdatesAllowed for pending layouts and bailed when such case happened.
3079         A layout will come anyway and trigger the correct updates. Couldn't not force an inline layout at that time
3080         as this function is sometimes called really soon, when the WebKit parts are not fully created yet and updates were
3081         calling back into some client callbacks that were not ready.
3082
3083         Also added an assert in RenderLayerCompositor::updateCompositingLayers to check for other cases that might
3084         try to update the layers with a layout pending. That one led to finding an issue in the RenderMarquee, which
3085         was updating on a timer callback. It might happen that a layout is pending while this timer fires and it 
3086         tries to update the scroll position of the layers while a layout is still due.
3087
3088         There was already a protection to bail if a layout is pending in RenderMarquee::timerFired, so I've just broadened the scope
3089         to the whole RenderView to catch all the layout requests.
3090
3091         Tests: compositing/geometry/assert-layout-not-done.html
3092                compositing/geometry/assert-marquee-timer.html
3093
3094         * dom/Document.cpp:
3095         (WebCore::Document::setVisualUpdatesAllowed):
3096         * rendering/RenderLayerCompositor.cpp:
3097         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3098         * rendering/RenderMarquee.cpp:
3099         (WebCore::RenderMarquee::timerFired):
3100
3101 2013-01-08  Justin Novosad  <junov@google.com>
3102
3103         CanvasRenderingContext2D::setFont argument may reference destroyed object
3104         https://bugs.webkit.org/show_bug.cgi?id=106385
3105
3106         Reviewed by Abhishek Arya.
3107
3108         No new tests: covered by fast/canvas/canvas-measureText.html
3109
3110         This is a re-write of r138994.  Fixing bug in setFont instead of
3111         workaround at call site. 
3112
3113         * html/canvas/CanvasRenderingContext2D.cpp:
3114         (WebCore::CanvasRenderingContext2D::setFont):
3115         (WebCore::CanvasRenderingContext2D::accessFont):
3116
3117 2013-01-08  David Grogan  <dgrogan@chromium.org>
3118
3119         IndexedDB: Provide LevelDB with IDBEnv instead of Env::Default
3120         https://bugs.webkit.org/show_bug.cgi?id=106135
3121
3122         Reviewed by Tony Chang.
3123
3124         IDBEnv only changes the name of the histogram where errors are logged.
3125
3126         * platform/leveldb/LevelDBDatabase.cpp:
3127         (WebCore::LevelDBDatabase::open):
3128         (WebCore::LevelDBDatabase::openInMemory):
3129
3130 2013-01-08  Brandon Jones  <bajones@chromium.org>
3131
3132         Make WebGLRenderingContext inherit from ActiveDOMObject
3133         https://bugs.webkit.org/show_bug.cgi?id=104733
3134
3135         Reviewed by Adam Barth.
3136
3137         When ActiveDOMObject::stop is called on the WebGLRenderingContext the
3138         DrawingBuffer and GraphicsContext3D instances are forcibly released in
3139         order to keep GPU memory utilization to a minimum.
3140
3141         Incorporated new layout test based on one just added to the WebGL
3142         conformance suite. Also tested manually by reloading and
3143         navigating between many WebGL apps.
3144
3145         Test: fast/canvas/webgl/context-release-upon-reload.html
3146
3147         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3148         (WebCore::V8HTMLCanvasElement::getContextCallback):
3149             Removed garbage collection hack added in Bug 76255.
3150         * html/canvas/WebGLRenderingContext.cpp:
3151         (WebCore):
3152         (WebCore::WebGLRenderingContext::create):
3153             Call suspendIfNeeded per ActiveDOMObject contract.
3154         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
3155             Call ActiveDOMObject constructor.
3156         (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
3157             Call destroyGraphicsContext3D.
3158         (WebCore::WebGLRenderingContext::destroyGraphicsContext3D):
3159             Drop DrawingBuffer backing store and delete GraphicsContext3D.
3160         (WebCore::WebGLRenderingContext::hasPendingActivity):
3161             Always return false.
3162         (WebCore::WebGLRenderingContext::stop):
3163             Force lost context upon page reload or navigation.
3164         * html/canvas/WebGLRenderingContext.h:
3165         (WebGLRenderingContext):
3166             Inherit from ActiveDOMObject and override notifications.
3167         * platform/graphics/blackberry/DrawingBufferBlackBerry.cpp:
3168         (WebCore):
3169         (WebCore::DrawingBuffer::clearPlatformLayer):
3170             Add currently no-op implementation.
3171         * platform/graphics/cairo/DrawingBufferCairo.cpp:
3172         (WebCore):
3173         (WebCore::DrawingBuffer::clearPlatformLayer):
3174             Add currently no-op implementation.
3175         * platform/graphics/chromium/DrawingBufferChromium.cpp:
3176         (WebCore::DrawingBufferPrivate::clearTextureId):
3177             Clear texture ID from compositor's layer.
3178         (DrawingBufferPrivate):
3179         (WebCore::DrawingBuffer::framebuffer):
3180             Moved around to reduce number of #ifdefs.
3181         (WebCore):
3182         (WebCore::DrawingBuffer::platformLayer):
3183         (WebCore::DrawingBuffer::clearPlatformLayer):
3184             Tell compositor to stop referencing DrawingBuffer's texture.
3185         * platform/graphics/clutter/DrawingBufferClutter.cpp:
3186         (WebCore):
3187         (WebCore::DrawingBuffer::clearPlatformLayer):
3188             Add currently no-op implementation.
3189         * platform/graphics/gpu/DrawingBuffer.cpp:
3190         (WebCore::DrawingBuffer::clear):
3191             Call clearPlatformLayer before deleting OpenGL resources.
3192         * platform/graphics/gpu/DrawingBuffer.h:
3193         (DrawingBuffer):
3194             Add clearPlatformLayer.
3195         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
3196         (WebCore):
3197         (WebCore::DrawingBuffer::clearPlatformLayer):
3198             Add currently no-op implementation.
3199         * platform/graphics/gpu/qt/DrawingBufferQt.cpp:
3200         (WebCore):
3201         (WebCore::DrawingBuffer::clearPlatformLayer):
3202             Add currently no-op implementation.
3203
3204 2013-01-08  Tony Gentilcore  <tonyg@chromium.org>
3205
3206         Remove dependency on Document from HTMLConstructionSite::inQuirksMode()
3207         https://bugs.webkit.org/show_bug.cgi?id=106375
3208
3209         Reviewed by Adam Barth.
3210
3211         This is another step towards removing main thread object dependencies
3212         from the parser.
3213
3214         No new tests because no new functionality.
3215
3216         * dom/Document.h:
3217         * html/HTMLDocument.cpp:
3218         * html/HTMLDocument.h:
3219         (HTMLDocument):
3220         * html/parser/HTMLConstructionSite.cpp:
3221         (WebCore::HTMLConstructionSite::HTMLConstructionSite):
3222         (WebCore::HTMLConstructionSite::setDefaultCompatibilityMode):
3223         (WebCore):
3224         (WebCore::HTMLConstructionSite::setCompatibilityMode):
3225         (WebCore::HTMLConstructionSite::setCompatibilityModeFromDoctype):
3226         (WebCore::HTMLConstructionSite::insertDoctype):
3227         (WebCore::HTMLConstructionSite::inQuirksMode):
3228         * html/parser/HTMLConstructionSite.h:
3229         (HTMLConstructionSite):
3230
3231 2013-01-08  Florin Malita  <fmalita@chromium.org>
3232
3233         Remove unused GraphicsContext::addInnerRoundedRectClip()
3234         https://bugs.webkit.org/show_bug.cgi?id=106376
3235
3236         Reviewed by Andreas Kling.
3237
3238         Since there don't seem to be any users left for it, remove addInnerRoundedRectClip().
3239
3240         No new tests: no functional changes.
3241
3242         * platform/graphics/GraphicsContext.h:
3243         (GraphicsContext):
3244         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3245         * platform/graphics/cg/GraphicsContextCG.cpp:
3246         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
3247         * platform/graphics/qt/GraphicsContextQt.cpp:
3248         * platform/graphics/skia/GraphicsContextSkia.cpp:
3249         (WebCore):
3250         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3251         * platform/graphics/wx/GraphicsContextWx.cpp:
3252
3253 2013-01-08  Justin Novosad  <junov@google.com>
3254
3255         Color bleeding with rounded rectangles on high dpi displays
3256         https://bugs.webkit.org/show_bug.cgi?id=106373
3257
3258         Reviewed by Simon Fraser.
3259
3260         Test: fast/backgrounds/gradient-background-leakage-hidpi.html
3261
3262         Avoid using the BackgroundBleedShrinkBackground draw strategy for
3263         RenderBox when border width is less than two layout units. This
3264         is because rounded rectangles are always snapped to integer layout
3265         coordinates, even with subpixel layout enabled.
3266
3267         * rendering/RenderBox.cpp:
3268         (WebCore::RenderBox::determineBackgroundBleedAvoidance):
3269
3270 2013-01-08  Elliott Sprehn  <esprehn@chromium.org>
3271
3272         Merge getLineAtIndex into RenderBlock::lineAtIndex
3273         https://bugs.webkit.org/show_bug.cgi?id=106379
3274
3275         Reviewed by Eric Seidel.
3276
3277         getLineAtIndex can be merged into lineAtIndex, which was it's only caller.
3278
3279         No new tests, just refactoring.
3280
3281         * rendering/RenderBlock.cpp:
3282         (WebCore::RenderBlock::lineAtIndex):
3283         (WebCore::RenderBlock::lineCount):
3284         * rendering/RenderBlock.h:
3285         (RenderBlock):
3286
3287 2013-01-08  Rafael Weinstein  <rafaelw@chromium.org>
3288
3289         [HTMLTemplateElement] Allow <template> content to be inspected
3290         https://bugs.webkit.org/show_bug.cgi?id=105839
3291
3292         Reviewed by Pavel Feldman.
3293
3294         In addition to the plumbing which allows template contents to be
3295         displayed within the inspector, this patch adds a manually-managed
3296         weakref from the template document back to its host document (typically
3297         the creator). This is required so that the inspector agent can be found
3298         for template elements.
3299
3300         * dom/Document.cpp:
3301         (WebCore::Document::~Document):
3302         (WebCore::Document::templateDocument):
3303         * dom/Document.h:
3304         (Document):
3305         (WebCore::Document::setTemplateDocumentHost):
3306         (WebCore::Document::templateDocumentHost):
3307         * editing/markup.cpp:
3308         (WebCore::createFragmentForInnerOuterHTML):
3309         * html/HTMLTemplateElement.cpp:
3310         (WebCore::HTMLTemplateElement::content):
3311         * inspector/Inspector.json:
3312         * inspector/InspectorDOMAgent.cpp:
3313         (WebCore::InspectorDOMAgent::buildObjectForNode):
3314         * inspector/InspectorInstrumentation.h:
3315         (WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
3316         * inspector/front-end/DOMAgent.js:
3317         (WebInspector.DOMNode):
3318         (WebInspector.DOMNode.prototype.hasChildNodes):
3319         (WebInspector.DOMNode.prototype._insertChild):
3320         (WebInspector.DOMNode.prototype._setChildrenPayload):
3321
3322 2013-01-08  Hajime Morrita  <morrita@google.com>
3323
3324         [Shadow DOM] Distribution related code on ShadowRoot should be minimized.
3325         https://bugs.webkit.org/show_bug.cgi?id=106282
3326
3327         Reviewed by Dimitri Glazkov.
3328
3329         ShadowRoot had a certain amount of logic which is dedicated for
3330         node distribution computation.  These code is going to be compiled
3331         out (Bug 103339) and better be part of the node distribution
3332         algorithm, which is ScopeContentDistribution class.
3333
3334         This change
3335
3336         - Renames ShadowRootContentDistributionData to
3337           ScopeContentDistribution.  New name is concise and a bit more
3338           meaningful: It owns per TreeScope distribution state.
3339         - Moves distribution related code from ShadowRoot to ScopeContentDistribution
3340
3341         No new tests. Refactoring.
3342
3343         * WebCore.exp.in:
3344         * css/StyleScopeResolver.cpp:
3345         (WebCore::StyleScopeResolver::styleSharingCandidateMatchesHostRules):
3346         (WebCore::StyleScopeResolver::matchHostRules):
3347         * dom/ComposedShadowTreeWalker.cpp:
3348         (WebCore::nodeCanBeDistributed):
3349         (WebCore::ComposedShadowTreeWalker::traverseBackToYoungerShadowRoot):
3350         (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost):
3351         (WebCore::AncestorChainWalker::parent):
3352         * dom/ElementShadow.cpp:
3353         (WebCore::ElementShadow::collectSelectFeatureSetFrom):
3354         * dom/ShadowRoot.cpp:
3355         (WebCore::ShadowRoot::insertedInto):
3356         (WebCore::ShadowRoot::removedFrom):
3357         (WebCore::ShadowRoot::ensureScopeDistribution):
3358         (WebCore::ShadowRoot::reportMemoryUsage):
3359         * dom/ShadowRoot.h:
3360         (WebCore):
3361         (ShadowRoot):
3362         (WebCore::ShadowRoot::scopeDistribution):
3363         * html/shadow/ContentDistributor.cpp:
3364         (WebCore::ScopeContentDistribution::ScopeContentDistribution):
3365         (WebCore::ScopeContentDistribution::invalidateInsertionPointList):
3366         (WebCore::ScopeContentDistribution::ensureInsertionPointList):
3367         (WebCore::ScopeContentDistribution::registerInsertionPoint):
3368         (WebCore::ScopeContentDistribution::unregisterInsertionPoint):
3369         (WebCore::ScopeContentDistribution::hasShadowElement):
3370         (WebCore):
3371         (WebCore::ScopeContentDistribution::hasContentElement):
3372         (WebCore::ScopeContentDistribution::countElementShadow):
3373         (WebCore::ScopeContentDistribution::hasInsertionPoint):
3374         (WebCore::ScopeContentDistribution::assignedTo):
3375         (WebCore::ContentDistributor::distribute):
3376         (WebCore::ContentDistributor::invalidate):
3377         * html/shadow/ContentDistributor.h:
3378         (ScopeContentDistribution):
3379         (WebCore::ScopeContentDistribution::registerElementShadow):
3380         (WebCore::ScopeContentDistribution::unregisterElementShadow):
3381         (WebCore::ScopeContentDistribution::hasElementShadow):
3382         * html/shadow/HTMLShadowElement.cpp:
3383         (WebCore::HTMLShadowElement::olderShadowRoot):
3384         * html/shadow/InsertionPoint.cpp:
3385         (WebCore::InsertionPoint::insertedInto):
3386         (WebCore::InsertionPoint::removedFrom):
3387         (WebCore::InsertionPoint::contains):
3388         (WebCore):
3389         (WebCore::resolveReprojection):
3390         * html/shadow/InsertionPoint.h:
3391         (InsertionPoint):
3392         (WebCore):
3393         * testing/Internals.cpp:
3394         (WebCore::Internals::hasShadowInsertionPoint):
3395         (WebCore::Internals::hasContentElement):
3396         (WebCore::Internals::countElementShadow):
3397
3398 2013-01-08  Tom Sepez  <tsepez@chromium.org>
3399
3400         Copy-paste preserves <embed> tags containing active content.
3401         https://bugs.webkit.org/show_bug.cgi?id=77625
3402
3403         Reviewed by Ryosuke Niwa.
3404
3405         Test: editing/pasteboard/paste-noplugin.html
3406
3407         * dom/FragmentScriptingPermission.h:
3408         (WebCore::scriptingContentIsAllowed):
3409         (WebCore::pluginContentIsAllowed):
3410         Add new permission to restrict plugin pasting.  Add inline functions to check
3411         the implications of each permission rather than having a list of raw comparisions
3412         sprinkled throughout the code. 
3413         
3414         * editing/markup.cpp:
3415         (WebCore::createFragmentFromMarkup):
3416         Revert back to unsafe plugin pasting regardless of caller's intentions when
3417         the settings allow it.
3418
3419         * dom/Element.cpp:
3420         (WebCore::Element::parserSetAttributes):
3421         * html/parser/HTMLConstructionSite.cpp:
3422         (WebCore::HTMLConstructionSite::insertScriptElement):
3423         * xml/parser/XMLDocumentParserLibxml2.cpp:
3424         (WebCore::XMLDocumentParser::endElementNs):
3425         * xml/parser/XMLDocumentParserQt.cpp:
3426         (WebCore::XMLDocumentParser::parseEndElement):
3427         Use new inline functions to check implications of permissions rather than raw
3428         comparisions.
3429         
3430         * html/parser/HTMLTreeBuilder.cpp:
3431         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3432         (WebCore::HTMLTreeBuilder::processEndTag):
3433         Check if plugin pasting is allowed before inserting applet/embed/oject elements.
3434
3435         * page/Settings.in:
3436         Declaration of new unsafePluginPastingEnabled setting.
3437
3438         * platform/mac/PasteboardMac.mm:
3439         (WebCore::Pasteboard::documentFragment):
3440         * platform/blackberry/PasteboardBlackBerry.cpp:
3441         (WebCore::Pasteboard::documentFragment):
3442         * platform/chromium/DragDataChromium.cpp:
3443         (WebCore::DragData::asFragment):
3444         * platform/chromium/PasteboardChromium.cpp:
3445         (WebCore::Pasteboard::documentFragment):
3446         * platform/gtk/PasteboardGtk.cpp:
3447         (WebCore::Pasteboard::documentFragment):
3448         * platform/qt/DragDataQt.cpp:
3449         (WebCore::DragData::asFragment):
3450         * platform/qt/PasteboardQt.cpp:
3451         (WebCore::Pasteboard::documentFragment):
3452         * platform/win/ClipboardUtilitiesWin.cpp:
3453         (WebCore::fragmentFromCFHTML):
3454         (WebCore::fragmentFromHTML):
3455         * platform/wx/PasteboardWx.cpp:
3456         (WebCore::Pasteboard::documentFragment):
3457         Pass DisallowScriptingAndPluginContent enum value.
3458         
3459 2013-01-08  Alexis Menard  <alexis@webkit.org>
3460
3461         WebKit does not reject some cubic-bezier form values for transition-timing-function.
3462         https://bugs.webkit.org/show_bug.cgi?id=106369
3463
3464         Reviewed by Dean Jackson.
3465
3466         http://www.w3.org/TR/css3-transitions/#transition-timing-function-property
3467         describes restricitions on cubic-bezier values where the x values of
3468         the curve should be between [0, 1] and y values can exceed this range.
3469         WebKit was not following the specification by allowing x values
3470         exceeding the range.
3471         The spec also says that we should reject the defintion if the condition
3472         is not respected which is what the new code does.
3473
3474         Test: transitions/transitions-parsing.html
3475
3476         * css/CSSParser.cpp:
3477         (WebCore::CSSParser::parseAnimationTimingFunction):
3478
3479 2013-01-08  Andreas Kling  <akling@apple.com>
3480
3481         Heap-use-after-free in bool WebCore::SelectorChecker::checkOneSelector.
3482         <http://webkit.org/b/105834>
3483
3484         Reviewed by Antti Koivisto.
3485
3486         Suppress the DOMSubtreeModified event when synchronizing the "style" attribute and we've
3487         instantiated an Attr node wrapper for the said attribute.
3488
3489         Also added an assertion that Document's StyleResolver isn't cleared during style recalc,
3490         which will help us catch this kind of bug in the future.
3491
3492         Test: fast/dom/mutation-event-listener-with-dirty-inline-style-crash.html
3493
3494         * dom/Document.cpp:
3495         (WebCore::Document::styleResolverThrowawayTimerFired):
3496         * dom/Element.cpp:
3497         (WebCore::Element::setAttributeInternal):
3498
3499 2013-01-08  Sheriff Bot  <webkit.review.bot@gmail.com>
3500
3501         Unreviewed, rolling out r139096.
3502         http://trac.webkit.org/changeset/139096
3503         https://bugs.webkit.org/show_bug.cgi?id=106367
3504
3505         not a complete fix (Requested by bweinstein on #webkit).
3506
3507         * html/HTMLPlugInImageElement.cpp:
3508         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
3509
3510 2013-01-08  Brian Weinstein  <bweinstein@apple.com>
3511
3512         Plug-ins shouldn’t be added to list to autostart if you start a plugin in private browsing.
3513         https://bugs.webkit.org/show_bug.cgi?id=106348
3514         <rdar://problem/12968442>
3515
3516         Reviewed by Anders Carlsson.
3517
3518         * html/HTMLPlugInImageElement.cpp:
3519         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Don't call addAutoStartOrigin if we are
3520             in private browsing mode.
3521
3522 2013-01-08  Chris Fleizach  <cfleizach@apple.com>
3523
3524         AX: native popup buttons should not use textUnderElement for their title
3525         https://bugs.webkit.org/show_bug.cgi?id=106349
3526
3527         Reviewed by Ryosuke Niwa.
3528
3529         Native popup buttons (<select> elements) were calculating its title based on the text
3530         under the element. When Bug 103794 introduced a more complete way of getting render text,
3531         it causes popup buttons to start returning a title.
3532         The fix is that we should not be calculating a title for a native popup button from its children.
3533
3534         Existing tests cover this functionality. This will fix a failing test.
3535
3536         * accessibility/AccessibilityNodeObject.cpp:
3537         (WebCore::AccessibilityNodeObject::visibleText):
3538
3539 2013-01-08  Ojan Vafai  <ojan@chromium.org>
3540
3541         text controls are sized too small when a percentage height is set
3542         https://bugs.webkit.org/show_bug.cgi?id=106277
3543
3544         Reviewed by Tony Chang.
3545
3546         This makes our behavior match Firefox 17, IE 9 and Opera 12.
3547         The current logic came from http://trac.webkit.org/changeset/13723,
3548         which itself was copy-pasted from RenderReplaced and no longer has this clause..
3549
3550         Test: fast/forms/percent-height-auto-width-form-controls.html
3551
3552         * rendering/RenderFileUploadControl.cpp:
3553         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
3554         * rendering/RenderListBox.cpp:
3555         (WebCore::RenderListBox::computePreferredLogicalWidths):
3556         * rendering/RenderMenuList.cpp:
3557         (WebCore::RenderMenuList::computePreferredLogicalWidths):
3558         * rendering/RenderSlider.cpp:
3559         (WebCore::RenderSlider::computePreferredLogicalWidths):
3560         * rendering/RenderTextControl.cpp:
3561         (WebCore::RenderTextControl::computePreferredLogicalWidths):
3562
3563 2013-01-08  Peter Beverloo  <peter@chromium.org>
3564
3565         [Chromium] Modify Android's user agent CSS to not set a border-radius on select elements
3566         https://bugs.webkit.org/show_bug.cgi?id=106327
3567
3568         Reviewed by Adam Barth.
3569
3570         Android's user agent CSS overrides the style applied to <select>
3571         elements with a @size or @multiple attribute, and then applies
3572         (among other things) a border-radius of 5 pixels. While select
3573         elements with a larger size or multiple selection should appear
3574         as drop-down boxes for now, setting the border radius causes
3575         Chromium to skip rendering the background and border, making
3576         them hard to read when the page relies on the default styling.
3577
3578         This is covered by existing pixel tests.
3579
3580         * css/themeChromiumAndroid.css:
3581         (select[size][multiple]):
3582
3583 2013-01-08  Mike West  <mkwst@chromium.org>
3584
3585         CSP: 'none' should take effect only if no other source expression is present.
3586         https://bugs.webkit.org/show_bug.cgi?id=106314
3587
3588         Reviewed by Adam Barth.
3589
3590         WebKit's handling of 'none' in Content Security Policy source lists
3591         doesn't quite match the spec. Currently, we're treating any source list
3592         that contains 'none' as its first token as an empty list. That is:
3593         "script-src 'none'" is handled in the same way as
3594         "script-src 'none' example.com". Based on a bit of public-webappsec@
3595         discussion[1], the behavior we actually want should treat the first as
3596         an empty list, while treating the second as "script-src example.com". In
3597         other words, 'none' in a source list is a no-op, unless it is the _only_
3598         item in the source list.
3599
3600         This patch adjusts our parsing behavior accordingly, and tweaks the
3601         console log we emit for invalid source expressions to warn specifically
3602         about this case.
3603
3604         [1]: http://lists.w3.org/Archives/Public/public-webappsec/2013Jan/0006.html
3605
3606         Test: http/tests/security/contentSecurityPolicy/source-list-parsing-none.html
3607
3608         * page/ContentSecurityPolicy.cpp:
3609         (WebCore::isSourceListNone):
3610             A new static method that returns true when given a string that
3611             contains only 'none' (potentially surrounded by whitespace), and
3612             false otherwise.
3613         (WebCore):
3614         (WebCore::CSPSourceList::parse):
3615             Move the 'none' check into the initial layer of parsing, which means
3616             that we can drop the 'isFirstSourceInList' check entirely.
3617         (WebCore::CSPSourceList::parseSource):
3618             Since we've already checked for 'none' in ::parse, we can at this
3619             point safely treat any occurance of 'none' in the source list as an
3620             invalid expression.
3621         (WebCore::ContentSecurityPolicy::reportInvalidSourceExpression):
3622             If the invalid expression is 'none', add a clarification to the
3623             console message, noting that 'none' only has effect when it's all
3624             alone.
3625
3626 2013-01-08  Alok Priyadarshi  <alokp@chromium.org>
3627
3628         Added OpaqueRegionSkia::currentTrackingOpaqueRect
3629
3630         [chromium] Add OpaqueRegionSkia::currentTrackingOpaqueRect
3631         https://bugs.webkit.org/show_bug.cgi?id=106267
3632
3633         Reviewed by Stephen White.
3634
3635         No new tests needed. No change in functionality.
3636
3637         * platform/graphics/skia/OpaqueRegionSkia.cpp:
3638         (WebCore::OpaqueRegionSkia::applyOpaqueRegionFromLayer):
3639         (WebCore::OpaqueRegionSkia::markRectAsOpaque):
3640         (WebCore::OpaqueRegionSkia::markRectAsNonOpaque):
3641         (WebCore::OpaqueRegionSkia::markAllAsNonOpaque):
3642         (WebCore::OpaqueRegionSkia::currentTrackingOpaqueRect):
3643         (WebCore):
3644         * platform/graphics/skia/OpaqueRegionSkia.h:
3645         (OpaqueRegionSkia):
3646
3647 2013-01-08  Zan Dobersek  <zandobersek@gmail.com>
3648
3649         [GTK] Build failures when building with python 3.3
3650         https://bugs.webkit.org/show_bug.cgi?id=106194
3651
3652         Reviewed by Dirk Pranke.
3653
3654         Python 3.3 introduced changes to dictionaries which can result in changed
3655         iteration order. More about these changes:
3656         http://docs.python.org/3.3/whatsnew/3.3.html#pep-412-key-sharing-dictionary
3657         http://www.python.org/dev/peps/pep-0412/#cons
3658
3659         This causes the Source/WebCore/inspector/generate-inspector-protocol-version
3660         script to fail the self-testing when using Python 3.3. These changes work
3661         around this problem by not checking for expected errors in order but rather
3662         for their presence in the error output sequence. The number of actual errors
3663         is also checked to be equal to the number of expected errors.
3664
3665         No new tests - no new functionality.
3666
3667         * inspector/generate-inspector-protocol-version:
3668         (self_test):
3669
3670 2013-01-08  Antoine Quint  <graouts@apple.com>
3671
3672         <track> element's mode set to "disabled" after load although it was explicitly set to "hidden"
3673         https://bugs.webkit.org/show_bug.cgi?id=105536
3674
3675         Remove all concept of "showing by default". This means removing the showingByDefault()
3676         and setShowingByDefault() methods on TextTrack. As I was going  through this code,
3677         I also noticed that in HTMLMediaElement::configureTextTrackGroup(), we would set
3678         defaultTrack to textTrack.get() even though defaultTrack was created to be a RefPtr<TextTrack>.
3679
3680         As a result, we can now pass an additional 8 tests from the Opera-submitted test suite:
3681
3682         LayoutTests/media/track/opera/interfaces/TextTrack/addCue.html
3683         LayoutTests/media/track/opera/interfaces/TextTrack/removeCue.html
3684         LayoutTests/media/track/opera/interfaces/TextTrackCue/endTime.html
3685         LayoutTests/media/track/opera/interfaces/TextTrackCue/startTime.html
3686         LayoutTests/media/track/opera/interfaces/TextTrackCue/align.html
3687         LayoutTests/media/track/opera/interfaces/TextTrackCue/id.html
3688         LayoutTests/media/track/opera/interfaces/TextTrackCue/pauseOnExit.html
3689         LayoutTests/media/track/opera/interfaces/TextTrackCue/track.html
3690
3691         Reviewed by Eric Carlson.
3692
3693         * html/HTMLMediaElement.cpp:
3694         (WebCore::HTMLMediaElement::configureTextTrackGroup):
3695         (WebCore::HTMLMediaElement::toggleTrackAtIndex):
3696         * html/track/TextTrack.cpp:
3697         (WebCore::TextTrack::TextTrack):
3698         (WebCore::TextTrack::setMode):
3699         (WebCore::TextTrack::isRendered):
3700         * html/track/TextTrack.h:
3701         (WebCore::TextTrack::mode):
3702         (TextTrack):
3703
3704 2013-01-08  Mark Lam  <mark.lam@apple.com>
3705
3706         Removed the need for the ProposedDatabase mechanism.
3707         https://bugs.webkit.org/show_bug.cgi?id=106292.
3708
3709         Reviewed by Sam Weinig.
3710
3711         No new tests.
3712
3713         * Modules/webdatabase/AbstractDatabase.cpp:
3714         (WebCore::AbstractDatabase::details):
3715         (WebCore):
3716         * Modules/webdatabase/AbstractDatabase.h:
3717         (AbstractDatabase):
3718         * Modules/webdatabase/DatabaseContext.cpp:
3719         (WebCore::DatabaseContext::databaseExceededQuota):
3720         * Modules/webdatabase/DatabaseContext.h:
3721         (DatabaseContext):
3722         * Modules/webdatabase/DatabaseTracker.cpp:
3723         (WebCore::DatabaseTracker::canEstablishDatabase):
3724         (WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
3725         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
3726         * Modules/webdatabase/DatabaseTracker.h:
3727         (DatabaseTracker):
3728         * Modules/webdatabase/SQLTransactionClient.cpp:
3729         (WebCore::SQLTransactionClient::didExceedQuota):
3730         * loader/EmptyClients.h:
3731         (WebCore::EmptyChromeClient::exceededDatabaseQuota):
3732         * page/ChromeClient.h:
3733         (ChromeClient):
3734
3735 2013-01-08  Chris Fleizach  <cfleizach@apple.com>
3736
3737         AX: PopUpButtons do not report that AXValueAttribute is supported
3738         https://bugs.webkit.org/show_bug.cgi?id=106333
3739
3740         Reviewed by Ryosuke Niwa.
3741
3742         The Mac platform expects that AXPopUpButton's expose the AXValue attribute.
3743
3744         Test: platform/mac/accessibility/popup-button-exposes-axvalue.html
3745
3746         * accessibility/AccessibilityObject.h:
3747         (WebCore::AccessibilityObject::isPopUpButton):
3748         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
3749         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
3750
3751 2013-01-08  Alexis Menard  <alexis@webkit.org>
3752
3753         transition-delay and transition-duration return incorrect values when querying using the computed style.
3754         https://bugs.webkit.org/show_bug.cgi?id=105432
3755
3756         Reviewed by Dean Jackson.
3757
3758         When setting the transition-delay to 10ms for example the value of transition-delay
3759         on the computed style was incorrect, it should return 0.01s but it was
3760         returning something like 0.0099999999...s. In fact the bug was after
3761         the parsing step when creating the Animation object where a conversion
3762         from a double to float was done. This conversion is not needed as the
3763         animation class expects double for delay and transition times.
3764
3765         Test: transitions/transitions-parsing.html
3766
3767         * css/CSSToStyleMap.cpp:
3768         (WebCore::CSSToStyleMap::mapAnimationDelay):
3769         (WebCore::CSSToStyleMap::mapAnimationDuration):
3770
3771 2013-01-08  Hajime Morrita  <morrita@google.com>
3772
3773         [Shadow DOM] Refactoring: invalidateParentDistributionIfNecessary() calls are too intrusive
3774         https://bugs.webkit.org/show_bug.cgi?id=106305
3775
3776         Reviewed by Dimitri Glazkov.
3777
3778         Scattering invalidateParentDistributionIfNecessary() looks bad because
3779         - it has long name whose terminology is cryptic for people who don't know much about Shadow DOM standard.
3780         - its calls are always paired with setNeedsStyleRecalc() and people do setNeedsStyleRecalc()
3781           need to be aware about distribution feature bit tracking. Separate invalidateParentDistributionIfNecessary()
3782           call doesn't help that recognition.
3783
3784         This change introduces Element::didAffectSelector() to replace a setNeedsStyleRecalc()-i37y() call sequence.
3785         SelectRuleFeatureSet::FeatureRule is renamed AffectedSelectorType so that it explains its purpose
3786         in a bit more plain WebKit term.
3787
3788         No new tests. Refactoring.
3789
3790         * dom/Document.cpp:
3791         (WebCore::Document::setCSSTarget): Adopted didAffectSelector.
3792         * dom/Element.cpp:
3793         (WebCore::Element::didAffectSelector): Added.
3794         (WebCore):
3795         * dom/Element.h:
3796         (Element):
3797         * dom/ElementShadow.cpp:
3798         (WebCore::ElementShadow::didAffectSelector): Morphed from invalidateParentDistributionIfNecessary().
3799         * dom/ElementShadow.h:
3800         (ElementShadow):
3801         * html/HTMLAnchorElement.cpp:
3802         (WebCore::HTMLAnchorElement::parseAttribute): Adopted didAffectSelector
3803         * html/HTMLDetailsElement.cpp:
3804         * html/HTMLFormControlElement.cpp:
3805         (WebCore::HTMLFormControlElement::disabledAttributeChanged): Adopted didAffectSelector
3806         * html/HTMLInputElement.cpp:
3807         (WebCore::HTMLInputElement::setChecked): Adopted didAffectSelector
3808         (WebCore::HTMLInputElement::setIndeterminate): Adopted didAffectSelector
3809         * html/HTMLOptGroupElement.cpp:
3810         (WebCore::HTMLOptGroupElement::parseAttribute): Adopted didAffectSelector
3811         * html/HTMLOptionElement.cpp:
3812         (WebCore::HTMLOptionElement::parseAttribute): Adopted didAffectSelector
3813         (WebCore::HTMLOptionElement::setSelectedState): Adopted didAffectSelector
3814         * html/HTMLProgressElement.cpp:
3815         (WebCore::HTMLProgressElement::didElementStateChange): Adopted didAffectSelector
3816         * html/HTMLSummaryElement.cpp:
3817         * html/shadow/HTMLContentElement.cpp:
3818         * html/shadow/SelectRuleFeatureSet.cpp:
3819         (WebCore::SelectRuleFeatureSet::collectFeaturesFromSelector): Followed renaming.
3820         * html/shadow/SelectRuleFeatureSet.h: Followed renaming.
3821         (WebCore::SelectRuleFeatureSet::hasSelectorForChecked):
3822         (WebCore::SelectRuleFeatureSet::hasSelectorForEnabled):
3823         (WebCore::SelectRuleFeatureSet::hasSelectorForDisabled):
3824         (WebCore::SelectRuleFeatureSet::hasSelectorForIndeterminate):
3825         (WebCore::SelectRuleFeatureSet::hasSelectorForLink):
3826         (WebCore::SelectRuleFeatureSet::hasSelectorForTarget):
3827         (WebCore::SelectRuleFeatureSet::hasSelectorForVisited):
3828         (WebCore::SelectRuleFeatureSet::hasSelectorFor):
3829         (WebCore::SelectRuleFeatureSet::setSelectRuleFeature):
3830
3831 2013-01-08  Sergio Villar Senin  <svillar@igalia.com>
3832
3833         [Qt] Fix build with --web-audio
3834         https://bugs.webkit.org/show_bug.cgi?id=106328
3835
3836         Reviewed by Philippe Normand.
3837
3838         Build fix, no new tests required.
3839
3840         * Target.pri: addded missing OfflineAudioContext.[cpp|h].
3841
3842 2013-01-08  Martin Robinson  <mrobinson@igalia.com>
3843
3844         [GTK] Login & password shown in browsers' URL entry after successful HTTP authentication
3845         https://bugs.webkit.org/show_bug.cgi?id=105190
3846
3847         Reviewed by Carlos Garcia Campos.
3848
3849         Test: http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url.html
3850
3851         * platform/network/soup/ResourceHandleSoup.cpp:
3852         (WebCore::restartedCallback): After sending a redirect with credentials to libsoup, strip
3853         the credentials from the request. This ensures that the credentials do not show up in
3854         the user agent or in document.location.
3855
3856 2013-01-08  Keishi Hattori  <keishi@webkit.org>
3857
3858         [Chromium] Don't confine page popups to root view on Mac
3859         https://bugs.webkit.org/show_bug.cgi?id=106315
3860
3861         Reviewed by Kent Tamura.
3862
3863         No new tests.
3864
3865         * Resources/pagepopups/pickerCommon.js:
3866         (adjustWindowRect): Remove code to confine to root view.
3867
3868 2012-12-12  Antonio Gomes  <a1.gomes@sisa.samsung.com>
3869
3870         Make RenderLayer::updateNeedsCompositedScrolling scrollbars agnostic
3871         https://bugs.webkit.org/show_bug.cgi?id=95494
3872
3873         Reviewed by James Robinson.
3874
3875         Some ports (including Qt-wk1 and BlackBerry) allow disabling
3876         scrollbars at FrameView creation level. That said, cheking for the
3877         scrollbars presence in order to determine if we should promote a
3878         RenderLayer to use composited scrolling is not ideal, as done in
3879         RenderLayerCompositor::updateNeedsCompositedScrolling()
3880
3881         Instead, this patch makes the RenderLayer class to query its FrameView
3882         if it has been cached as scrollable by the later.
3883
3884         Least, patch also takes this opportunity to remove RenderLayer::allowsScrolling,
3885         which became unused.
3886
3887         No new tests added, since there is no *practical* behavior change: ports
3888         like Chromium and others who currently check for the scrollbars presence
3889         in order to determine either to promote or not layers to benefit of composited
3890         scrolling should not be affected.
3891
3892         * rendering/RenderLayer.cpp:
3893         (WebCore::RenderLayer::updateNeedsCompositedScrolling):
3894         * rendering/RenderLayer.h:
3895         (RenderLayer):
3896
3897 2012-12-20  Antonio Gomes  <a1.gomes@sisa.samsung.com>
3898
3899         Introduce a compositing trigger for scrollable frames
3900         https://bugs.webkit.org/show_bug.cgi?id=105573
3901
3902         Reviewed by James Robinson.
3903
3904         Make requiresCompositingForScrollableFrame to check the
3905         newly added compositing trigger instead of the associated setting.
3906
3907         It introduces no have behavior change, so no new tests. Patch basically
3908         does some preparation work for adding support to composite scrollable inner
3909         frames independently from "force compositing mode" bit.
3910
3911         * page/ChromeClient.h:
3912         * rendering/RenderLayerCompositor.cpp:
3913         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
3914         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):
3915
3916 2013-01-08  Kihong Kwon  <kihong.kwon@samsung.com>
3917
3918         Add DeviceProximityController to support Device Proximity Events.
3919         https://bugs.webkit.org/show_bug.cgi?id=97630
3920
3921         Reviewed by Hajime Morita.
3922
3923         Implement DeviceProximityController which is inherited from DeviceController to support Device Proximity Events.
3924         DeviceProximityController has two major functionalities.
3925         - When listener is added, DeviceProximityController stores DOMWindow pointer to m_listeners
3926           and start gathering proximity event.
3927         - When DeviceProximityController receives a proximity event from client, fire an event using m_listeners.
3928         In addition, setDeviceProximity function is added to Internals for layout test.
3929
3930         Tests: proximity/add-listener-from-callback.html
3931                proximity/basic-operation.html
3932                proximity/create-event.html
3933                proximity/event-after-navigation.html
3934                proximity/multiple-frames.html
3935                proximity/no-page-cache.html
3936                proximity/optional-event-properties.html
3937                proximity/updates.html
3938                proximity/window-property.html
3939
3940         * CMakeLists.txt:
3941         * GNUmakefile.am:
3942         * GNUmakefile.list.am:
3943         * Modules/proximity/DeviceProximityClient.h: Added.
3944         (WebCore):
3945         (DeviceProximityClient):
3946         (WebCore::DeviceProximityClient::~DeviceProximityClient):
3947         * Modules/proximity/DeviceProximityController.cpp: Added.
3948         (WebCore):
3949         (WebCore::DeviceProximityController::DeviceProximityController):
3950         (WebCore::DeviceProximityController::create):
3951         (WebCore::DeviceProximityController::didChangeDeviceProximity):
3952         (WebCore::DeviceProximityController::deviceProximityClient):
3953         (WebCore::DeviceProximityController::hasLastData):
3954         (WebCore::DeviceProximityController::getLastEvent):
3955         (WebCore::DeviceProximityController::supplementName):
3956         (WebCore::DeviceProximityController::from):
3957         (WebCore::DeviceProximityController::isActiveAt):
3958         (WebCore::provideDeviceProximityTo):
3959         * Modules/proximity/DeviceProximityController.h: Added.
3960         (WebCore):
3961         (DeviceProximityController):
3962         (WebCore::DeviceProximityController::~DeviceProximityController):
3963         * Target.pri:
3964         * WebCore.gyp/WebCore.gyp:
3965         * WebCore.gypi:
3966         * WebCore.pri:
3967         * WebCore.vcproj/WebCore.vcproj:
3968         * WebCore.vcproj/WebCoreCommon.vsprops:
3969         * WebCore.xcodeproj/project.pbxproj:
3970         * history/PageCache.cpp:
3971         When a page has Device Proximity Event Listener, it has not to be cached like Device Orientation.
3972         (WebCore::logCanCachePageDecision):
3973         (WebCore::PageCache::canCache):
3974         * page/DOMWindow.cpp:
3975         (WebCore::DOMWindow::addEventListener):
3976         (WebCore::DOMWindow::removeEventListener):
3977         (WebCore::DOMWindow::removeAllEventListeners):
3978         * testing/Internals.cpp:
3979         (WebCore::Internals::setDeviceProximity):
3980         (WebCore):
3981         * testing/Internals.h:
3982         (Internals):
3983         * testing/Internals.idl:
3984
3985 2013-01-03  Sergio Villar Senin  <svillar@igalia.com>
3986
3987         [GTK] Add WebP image support
3988         https://bugs.webkit.org/show_bug.cgi?id=105915
3989
3990         Reviewed by Martin Robinson.
3991
3992         * GNUmakefile.am: add WTF_USE_WEBP definition.
3993         * GNUmakefile.list.am: properly sort image decoders in the sources list.
3994
3995 2013-01-08  Steve Block  <steveblock@chromium.org>
3996
3997         Rename 'IntSize toSize(const IntPoint&)' to 'toIntSize'
3998         https://bugs.webkit.org/show_bug.cgi?id=106307
3999
4000         This matches other method names which distinguish between sizes and
4001         points. See https://bugs.webkit.org/show_bug.cgi?id=105992#c4.
4002
4003         Reviewed by Kentaro Hara.
4004
4005         Refactoring only, no functional change.
4006
4007         * accessibility/AccessibilityRenderObject.cpp:
4008         (WebCore::AccessibilityRenderObject::scrollTo):
4009         * html/HTMLSelectElement.cpp:
4010         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
4011         * platform/ScrollView.h:
4012         (WebCore::ScrollView::scrollOffset):
4013         * platform/graphics/IntPoint.h:
4014         (WebCore::toIntSize):
4015         * rendering/RenderLayer.cpp:
4016         (WebCore::RenderLayer::updateLayerPositions):
4017         (WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
4018         (WebCore::RenderLayer::paintOverflowControls):
4019         * rendering/RenderLayerBacking.cpp:
4020         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
4021
4022 2013-01-08  Yoshifumi Inoue  <yosin@chromium.org>
4023
4024         Dragging over an element with scrollbars should scroll the element when dragging near edges
4025         https://bugs.webkit.org/show_bug.cgi?id=39725
4026
4027         Reviewed by Hajime Morita.
4028
4029         This patch introduces auto scrolling functionality during drag-and-drop
4030         when drop source is near edge of scrollable element.
4031
4032         When drop source is inside 20px of scrollable element more than 200ms,
4033         scrollable element is automatically scrolled every 50ms toward drop
4034         source position, e.g. vertically scroll up when drop source is in top
4035         edge.
4036
4037         Test: fast/events/drag-and-drop-autoscroll.html
4038
4039         * page/AutoscrollController.cpp: