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