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