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