7e85f0c362dc1f2a10eba645e894049bc32cfafd
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-12  Eugene Klyuchnikov  <eustas@chromium.org>
2
3         Web Inspector: [REGRESSION] StepInto (F11) and StepOut (Shift-F11) shortcuts toggle Inspector window full-screen state
4         https://bugs.webkit.org/show_bug.cgi?id=112113
5
6         Reviewed by Alexander Pavlov.
7
8         Updated handlers missed in first patch. Added JSDocs to all handlers.
9
10         * inspector/front-end/Panel.js: Fixed JSDocs.
11         * inspector/front-end/CallStackSidebarPane.js:
12         Added return values. Added JSDocs.
13         * inspector/front-end/ScriptsPanel.js: Ditto.
14         * inspector/front-end/GoToLineDialog.js: Added JSDocs.
15         * inspector/front-end/TimelinePanel.js: Ditto.
16
17 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
18
19         [BlackBerry] DisplayRefreshMonitor: rename m_timestamp back to m_monotonicAnimationStartTime
20         https://bugs.webkit.org/show_bug.cgi?id=112139
21
22         Reviewed by Rob Buis.
23
24         This changed in r131131, but it was accidentally renamed back in r144465.
25
26         * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
27         (WebCore::DisplayRefreshMonitor::displayLinkFired):
28
29 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
30
31         [BlackBerry] FontPlatformData: HarfBuzz renaming
32         https://bugs.webkit.org/show_bug.cgi?id=112142
33
34         Reviewed by Rob Buis.
35
36         When the old HarfBuzz code was removed in r141291,
37         HarfBuzzNGFace.h was renamed to HarfBuzzFace.h and m_harfbuzzFace
38         was renamed to m_harfBuzzFace.
39
40         These changes need to be reflected in the BlackBerry port.
41
42         * platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp:
43         (WebCore::FontPlatformData::FontPlatformData):
44         (WebCore::FontPlatformData::platformDataInit):
45         (WebCore::FontPlatformData::platformDataAssign):
46         (WebCore::FontPlatformData::harfBuzzFace):
47
48 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
49
50         [BlackBerry] FontCacheBlackBerry: return PassRefPtr<SimpleFontData>
51         https://bugs.webkit.org/show_bug.cgi?id=112022
52
53         Reviewed by Rob Buis.
54
55         FontData functions return PassRefPtr since r130160.
56
57         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
58         (WebCore::FontCache::getFontDataForCharacters):
59         (WebCore::FontCache::getSimilarFontPlatformData):
60         (WebCore::FontCache::getLastResortFallbackFont):
61         * platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp:
62         (WebCore::SimpleFontData::createScaledFontData):
63
64 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
65
66         Web Inspector: Fix checkContentUpdated behavior in UISourceCode.
67         https://bugs.webkit.org/show_bug.cgi?id=112037
68
69         Reviewed by Alexander Pavlov.
70
71         UISourceCode.checkContentUpdated now saves last updated content that was loaded and rejected
72         by user on the per-file basis (only the last one was saved currently).
73
74         * inspector/front-end/FileSystemProjectDelegate.js:
75         (WebInspector.FileSystemProjectDelegate.prototype.innerCallback):
76         (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent):
77         (WebInspector.FileSystemProjectDelegate.prototype.canSetFileContent):
78         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
79         * inspector/front-end/SimpleWorkspaceProvider.js:
80         (WebInspector.SimpleProjectDelegate.prototype.canSetFileContent):
81         * inspector/front-end/UISourceCode.js:
82         (WebInspector.UISourceCode.prototype.checkContentUpdated.contentLoaded):
83         (WebInspector.UISourceCode.prototype.checkContentUpdated):
84         (WebInspector.UISourceCode.prototype._commitContent):
85         (WebInspector.UISourceCode.prototype.addRevision):
86         (WebInspector.UISourceCode.prototype.commitWorkingCopy):
87         * inspector/front-end/Workspace.js:
88         (WebInspector.ProjectDelegate.prototype.canSetFileContent):
89         (WebInspector.Project.prototype.canSetFileContent):
90
91 2013-03-12  Tomas Popela  <tpopela@redhat.com>
92
93         [Gtk] NBSP are not replaced when using X clipboard
94         https://bugs.webkit.org/show_bug.cgi?id=112118
95
96         Reviewed by Martin Robinson.
97
98         We're not replacing nbsp with spaces when using X clipboard
99         (Shift+Insert or middle mouse button).
100
101         * platform/gtk/DataObjectGtk.cpp:
102         (WebCore::DataObjectGtk::text):
103
104 2013-03-12  Florin Malita  <fmalita@chromium.org>
105
106         SVG Pattern pixelated on inline SVG with CSS transforms
107         https://bugs.webkit.org/show_bug.cgi?id=111587
108
109         Reviewed by Dirk Schulze.
110
111         When calculating the resolution for resource image buffers, we need to also consider CSS
112         transforms. This patch updates calculateTransformationToOutermostSVGCoordinateSystem()
113         (renamed to calculateTransformationToOutermostCoordinateSystem) to include the affine
114         component from CSS transforms by walking the parent layer tree.        
115
116         Test: svg/custom/resources-css-scaled.html
117
118         * rendering/svg/RenderSVGResourceClipper.cpp:
119         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
120         * rendering/svg/RenderSVGResourceFilter.cpp:
121         (WebCore::RenderSVGResourceFilter::applyResource):
122         * rendering/svg/RenderSVGResourceGradient.cpp:
123         (WebCore::createMaskAndSwapContextForTextGradient):
124         (WebCore::clipToTextMask):
125         * rendering/svg/RenderSVGResourceMasker.cpp:
126         (WebCore::RenderSVGResourceMasker::applyResource):
127         * rendering/svg/RenderSVGResourcePattern.cpp:
128         (WebCore::RenderSVGResourcePattern::buildPattern):
129         * rendering/svg/SVGRenderingContext.cpp:
130         (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
131         (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
132         * rendering/svg/SVGRenderingContext.h:
133         (SVGRenderingContext):
134
135 2013-03-12  Yury Semikhatsky  <yurys@chromium.org>
136
137         Web Inspector: add html canvas memory details to the native memory overview
138         https://bugs.webkit.org/show_bug.cgi?id=112123
139
140         Reviewed by Alexander Pavlov.
141
142         Show memory occupied vby HTMLCanvasElements under Image category
143         in the native memory overview.
144
145         * inspector/front-end/NativeHeapSnapshot.js:
146         (WebInspector.NativeHeapSnapshot.prototype.images.getImageName):
147         (WebInspector.NativeHeapSnapshot.prototype.images.getCanvasName):
148         (WebInspector.NativeHeapSnapshot.prototype.images):
149         (WebInspector.NativeHeapSnapshot.prototype._addNodes):
150
151 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
152
153         Web Inspector: ResourceScriptFile diverged state should be correctly reset after debugger reset.
154         https://bugs.webkit.org/show_bug.cgi?id=112036
155
156         Reviewed by Alexander Pavlov.
157
158         * inspector/front-end/ResourceScriptMapping.js:
159         (WebInspector.ResourceScriptFile):
160         (WebInspector.ResourceScriptFile.prototype._workingCopyChanged):
161         (WebInspector.ResourceScriptFile.prototype._maybeDirtyChanged):
162
163 2013-03-12  Marja Hölttä  <marja@chromium.org>
164
165         [V8] Move the GetRawTemplate and HasInstance logic from generated bindings to V8PerIsolateData
166         https://bugs.webkit.org/show_bug.cgi?id=112136
167
168         Reviewed by Kentaro Hara.
169
170         When templates for main world and non-main worlds will be separated (bug
171         111724), HasInstance logic will be a bit ugly: We cannot determine the
172         world type on the fly, because during GC there is no entered context,
173         and HasInstance is called during GC. So we need to check against
174         templates from all the worlds. It's cleaner if that logic is in
175         V8PerIsolateData.
176
177         No new tests (Updated existing bindings tests).
178
179         * bindings/scripts/CodeGeneratorV8.pm:
180         (GenerateHeader):
181         (GenerateDomainSafeFunctionGetter):
182         (GenerateImplementation):
183         (CreateCustomSignature):
184         * bindings/scripts/test/V8/V8Float64Array.cpp:
185         (WebCore::ConfigureV8Float64ArrayTemplate):
186         (WebCore::V8Float64Array::GetTemplate):
187         (WebCore::V8Float64Array::HasInstance):
188         * bindings/scripts/test/V8/V8Float64Array.h:
189         (V8Float64Array):
190         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
191         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
192         (WebCore::ConfigureV8TestActiveDOMObjectTemplate):
193         (WebCore::V8TestActiveDOMObject::GetTemplate):
194         (WebCore::V8TestActiveDOMObject::HasInstance):
195         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
196         (V8TestActiveDOMObject):
197         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
198         (WebCore::V8TestCustomNamedGetter::GetTemplate):
199         (WebCore::V8TestCustomNamedGetter::HasInstance):
200         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
201         (V8TestCustomNamedGetter):
202         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
203         (WebCore::V8TestEventConstructor::GetTemplate):
204         (WebCore::V8TestEventConstructor::HasInstance):
205         * bindings/scripts/test/V8/V8TestEventConstructor.h:
206         (V8TestEventConstructor):
207         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
208         (WebCore::ConfigureV8TestEventTargetTemplate):
209         (WebCore::V8TestEventTarget::GetTemplate):
210         (WebCore::V8TestEventTarget::HasInstance):
211         * bindings/scripts/test/V8/V8TestEventTarget.h:
212         (V8TestEventTarget):
213         * bindings/scripts/test/V8/V8TestException.cpp:
214         (WebCore::V8TestException::GetTemplate):
215         (WebCore::V8TestException::HasInstance):
216         * bindings/scripts/test/V8/V8TestException.h:
217         (V8TestException):
218         * bindings/scripts/test/V8/V8TestInterface.cpp:
219         (WebCore::ConfigureV8TestInterfaceTemplate):
220         (WebCore::V8TestInterface::GetTemplate):
221         (WebCore::V8TestInterface::HasInstance):
222         * bindings/scripts/test/V8/V8TestInterface.h:
223         (V8TestInterface):
224         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
225         (WebCore::V8TestMediaQueryListListener::GetTemplate):
226         (WebCore::V8TestMediaQueryListListener::HasInstance):
227         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
228         (V8TestMediaQueryListListener):
229         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
230         (WebCore::V8TestNamedConstructor::GetTemplate):
231         (WebCore::V8TestNamedConstructor::HasInstance):
232         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
233         (V8TestNamedConstructor):
234         * bindings/scripts/test/V8/V8TestNode.cpp:
235         (WebCore::V8TestNode::GetTemplate):
236         (WebCore::V8TestNode::HasInstance):
237         * bindings/scripts/test/V8/V8TestNode.h:
238         (V8TestNode):
239         * bindings/scripts/test/V8/V8TestObj.cpp:
240         (WebCore::ConfigureV8TestObjTemplate):
241         (WebCore::V8TestObj::GetTemplate):
242         (WebCore::V8TestObj::HasInstance):
243         * bindings/scripts/test/V8/V8TestObj.h:
244         (V8TestObj):
245         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
246         (WebCore::V8TestOverloadedConstructors::GetTemplate):
247         (WebCore::V8TestOverloadedConstructors::HasInstance):
248         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
249         (V8TestOverloadedConstructors):
250         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
251         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
252         (WebCore::V8TestSerializedScriptValueInterface::HasInstance):
253         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
254         (V8TestSerializedScriptValueInterface):
255         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
256         (WebCore::ConfigureV8TestTypedefsTemplate):
257         (WebCore::V8TestTypedefs::GetTemplate):
258         (WebCore::V8TestTypedefs::HasInstance):
259         * bindings/scripts/test/V8/V8TestTypedefs.h:
260         (V8TestTypedefs):
261         * bindings/v8/V8PerIsolateData.cpp:
262         (WebCore::V8PerIsolateData::rawTemplate):
263         (WebCore):
264         (WebCore::V8PerIsolateData::hasInstance):
265         * bindings/v8/V8PerIsolateData.h:
266         (V8PerIsolateData):
267         * bindings/v8/custom/V8LocationCustom.cpp:
268         (WebCore::V8Location::reloadAttrGetterCustom):
269         (WebCore::V8Location::replaceAttrGetterCustom):
270         (WebCore::V8Location::assignAttrGetterCustom):
271
272 2013-03-12  Eugene Klyuchnikov  <eustas@chromium.org>
273
274         Web Inspector: Fix JSDocs in TimelinePanel.js
275         https://bugs.webkit.org/show_bug.cgi?id=112137
276
277         Reviewed by Vsevolod Vlasov.
278
279         Fix parameter type annotation of _loadFromFile.
280
281         * inspector/front-end/TimelinePanel.js: Fixed JSDoc.
282
283 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
284
285         Web Inspector: Add a test for Workspace add/removeMapping methods.
286         https://bugs.webkit.org/show_bug.cgi?id=112035
287
288         Reviewed by Alexander Pavlov.
289
290         Test: inspector/debugger/file-system-project-mapping.html
291
292         * inspector/front-end/ScriptsPanel.js:
293         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork.mapFileSystemToNetwork):
294         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork):
295         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem.mapNetworkToFileSystem):
296         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem):
297         * inspector/front-end/Workspace.js:
298         (WebInspector.Project.prototype._fileAdded):
299         (WebInspector.Workspace.prototype.addMapping):
300
301 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
302
303         Web Inspector: SourceFrames are leaking on reload.
304         https://bugs.webkit.org/show_bug.cgi?id=111961
305
306         Reviewed by Alexander Pavlov.
307
308         Added dispose method on UISourceCodeFrame.
309         Scripts panel now calls dispose when SourceFrame is removed and JavaScriptSourceFrame
310         could remove breakpoint manager listeners in it.
311         TabbedEditorContainer does not call viewForFile other than in appendFileTab methods to 
312         avoid recreating SourceFrame for uiSourceCode when it was already removed.
313
314         Test: inspector/debugger/breakpoint-manager-listeners-count.html
315
316         * inspector/front-end/JavaScriptSourceFrame.js:
317         (WebInspector.JavaScriptSourceFrame.prototype.dispose):
318         * inspector/front-end/ScriptsPanel.js:
319         * inspector/front-end/TabbedEditorContainer.js:
320         (WebInspector.TabbedEditorContainer.prototype._addScrollAndSelectionListeners):
321         (WebInspector.TabbedEditorContainer.prototype._removeScrollAndSelectionListeners):
322         (WebInspector.TabbedEditorContainer.prototype._tabClosed):
323         * inspector/front-end/UISourceCodeFrame.js:
324         (WebInspector.UISourceCodeFrame.prototype.dispose):
325
326 2013-03-12  Alexander Pavlov  <apavlov@chromium.org>
327
328         Web Inspector: [Elements] Unable to undo "Edit as HTML" changes in the editor
329         https://bugs.webkit.org/show_bug.cgi?id=112119
330
331         Reviewed by Vsevolod Vlasov.
332
333         No new tests, a UI change.
334
335         * inspector/front-end/ElementsPanel.js:
336         (WebInspector.ElementsPanel.prototype.handleShortcut): Do not undo/redo DOM/CSS changes if editing DOM text.
337         * inspector/front-end/ElementsTreeOutline.js:
338         (WebInspector.ElementsTreeOutline.prototype.editing): Added.
339
340 2013-03-12  Andrey Lushnikov  <lushnikov@chromium.org>
341
342         Web Inspector: [CodeMirror] there are bugs in TokenHighlight feature
343         https://bugs.webkit.org/show_bug.cgi?id=112039
344
345         Reviewed by Vsevolod Vlasov.
346
347         Fix token highlight in codeMirror experiment
348         - rewrite token highlight overlay mode to highlight words, not
349         substrings
350         - add workaround to avoid selection of already selected word
351
352         No new tests.
353
354         * inspector/front-end/CodeMirrorTextEditor.js:
355         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._cursorChange):
356         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._removeHighlight):
357         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype.nextToken):
358         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight):
359         * inspector/front-end/cm/cmdevtools.css:
360         (.line-with-selection .cm-column-with-selection):
361
362 2013-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
363
364         Unreviewed, rolling out r145514.
365         http://trac.webkit.org/changeset/145514
366         https://bugs.webkit.org/show_bug.cgi?id=112134
367
368         breaks Mac build (Requested by falken on #webkit).
369
370         * dom/Element.cpp:
371         * dom/Element.h:
372         * dom/EventDispatcher.cpp:
373         (WebCore::EventDispatcher::dispatchSimulatedClick):
374         * dom/GestureEvent.cpp:
375         (WebCore::GestureEventDispatchMediator::dispatchEvent):
376         * dom/MouseEvent.cpp:
377         (WebCore::MouseEventDispatchMediator::dispatchEvent):
378         * dom/Node.cpp:
379         (WebCore):
380         (WebCore::Node::isInert):
381         (WebCore::Node::handleLocalEvents):
382         (WebCore::Node::disabled):
383         (WebCore::Node::willRespondToMouseMoveEvents):
384         (WebCore::Node::willRespondToMouseClickEvents):
385         (WebCore::Node::willRespondToTouchEvents):
386         * dom/Node.h:
387         (Node):
388
389 2013-03-12  Andrey Lushnikov  <lushnikov@chromium.org>
390
391         Web Inspector: [CodeMirror] highlight matching braces
392         https://bugs.webkit.org/show_bug.cgi?id=112041
393
394         Reviewed by Vsevolod Vlasov.
395
396         Add "matchbrackets" add-on to CodeMirror text editor add override
397         default styles for matched and unmatched braces.
398
399         No new tests.
400
401         * WebCore.gypi:
402         * WebCore.vcproj/WebCore.vcproj:
403         * WebCore.vcxproj/WebCore.vcxproj:
404         * WebCore.vcxproj/WebCore.vcxproj.filters:
405         * inspector/front-end/CodeMirrorTextEditor.js:
406         (WebInspector.CodeMirrorTextEditor):
407         * inspector/front-end/WebKit.qrc:
408         * inspector/front-end/cm/cmdevtools.css:
409         (.CodeMirror-matchingbracket):
410         (.CodeMirror-nonmatchingbracket):
411         * inspector/front-end/cm/matchbrackets.js: Added.
412         (.):
413
414 2013-03-12  Matt Falkenhagen  <falken@chromium.org>
415
416         Refactoring: Pull Node::disabled() and Node::isInert() down to Element.
417         https://bugs.webkit.org/show_bug.cgi?id=112085
418
419         Reviewed by Hajime Morrita.
420
421         Node is too low a level for these methods.
422
423         No new tests, just refactoring.
424
425         * dom/Element.cpp:
426         (WebCore::Element::disabled):
427         (WebCore):
428         (WebCore::Element::isInert):
429         * dom/Element.h:
430         (Element):
431         * dom/EventDispatcher.cpp:
432         (WebCore::EventDispatcher::dispatchSimulatedClick):
433         * dom/GestureEvent.cpp:
434         (WebCore::GestureEventDispatchMediator::dispatchEvent):
435         * dom/MouseEvent.cpp:
436         (WebCore::MouseEventDispatchMediator::dispatchEvent):
437         * dom/Node.cpp:
438         (WebCore::Node::handleLocalEvents):
439         (WebCore::Node::willRespondToMouseMoveEvents):
440         (WebCore::Node::willRespondToMouseClickEvents):
441         (WebCore::Node::willRespondToTouchEvents):
442         * dom/Node.h:
443         (Node):
444
445 2013-03-12  Marja Hölttä  <marja@chromium.org>
446
447         [V8] Get rid of function-level static FunctionTemplates in generated bindings code
448         https://bugs.webkit.org/show_bug.cgi?id=111971
449
450         Reviewed by Jochen Eisinger.
451
452         In the future we'll create and store function templates for main world
453         and non-main worlds separately (see bug 111724), having function
454         templates as static variables inside functions will break the
455         functionality.
456
457         No new tests (updated the bindings test expectations).
458
459         * bindings/scripts/CodeGeneratorV8.pm:
460         (GenerateDomainSafeFunctionGetter):
461         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
462         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
463         * bindings/v8/V8PerIsolateData.cpp:
464         (WebCore::V8PerIsolateData::V8PerIsolateData):
465         (WebCore::V8PerIsolateData::privateTemplate):
466         (WebCore):
467         * bindings/v8/V8PerIsolateData.h:
468         (V8PerIsolateData):
469         * bindings/v8/custom/V8LocationCustom.cpp:
470         (WebCore::V8Location::reloadAttrGetterCustom):
471         (WebCore::V8Location::replaceAttrGetterCustom):
472         (WebCore::V8Location::assignAttrGetterCustom):
473
474 2013-03-12  Takashi Sakamoto  <tasak@google.com>
475
476         [Refactoring] Implement RuleCollector
477         https://bugs.webkit.org/show_bug.cgi?id=109916
478
479         Reviewed by Antti Koivisto.
480
481         Implemented rule collector for an element and collector for a page.
482         Not all members in class State are required entire while resolving
483         a style.
484
485         No new tests, because just refactoring.
486
487         * CMakeLists.txt:
488         * GNUmakefile.list.am:
489         * Target.pri:
490         * WebCore.gypi:
491         * WebCore.xcodeproj/project.pbxproj:
492         * css/CSSAllInOne.cpp:
493         Added ElementRuleCollector and PageRuleCollector.
494         * css/DocumentRuleSets.cpp:
495         (WebCore::ShadowDistributedRules::collectMatchRequests):
496         Since behaviorAtBoundary is a state owned by ElementRuleCollector,
497         removed from here.
498         * css/DocumentRuleSets.h:
499         (WebCore::ShadowDistributedRules::isEmpty):
500         Added to quickly check whether there exist any ShadowDistributedRules
501         or not.
502         * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
503         (WebCore):
504         (WebCore::ElementRuleCollector::matchedResult):
505         (WebCore::ElementRuleCollector::matchedRuleList):
506         (WebCore::ElementRuleCollector::addMatchedRule):
507         (WebCore::ElementRuleCollector::clearMatchedRules):
508         (WebCore::ElementRuleCollector::ensureRuleList):
509         (WebCore::ElementRuleCollector::addElementStyleProperties):
510         (WebCore::ElementRuleCollector::collectMatchingRules):
511         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
512         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
513         (WebCore::ElementRuleCollector::matchScopedAuthorRules):
514         (WebCore::ElementRuleCollector::matchHostRules):
515         (WebCore::ElementRuleCollector::matchShadowDistributedRules):
516         (WebCore::ElementRuleCollector::matchAuthorRules):
517         (WebCore::ElementRuleCollector::matchUserRules):
518         (WebCore::ElementRuleCollector::matchUARules):
519         (WebCore::ElementRuleCollector::ruleMatches):
520         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
521         (WebCore::ElementRuleCollector::sortMatchedRules):
522         (WebCore::ElementRuleCollector::matchAllRules):
523         Moved these methods from StyleResolver to this class.
524         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
525         This method is used for checking whether a given element can share
526         a cache.
527         * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
528         (WebCore):
529         (WebCore::ElementRuleCollector::ElementRuleCollector):
530         Use styleResolver instance to initialize its member variables, i.e.
531         SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
532         StyleScopedResolver.
533         (ElementRuleCollector):
534         (WebCore::ElementRuleCollector::setMode):
535         (WebCore::ElementRuleCollector::setPseudoStyleRequest):
536         (WebCore::ElementRuleCollector::setSameOriginOnly):
537         (WebCore::ElementRuleCollector::setRegionForStyling):
538         Mode, SameOriginOnly, RegionForStyling are only used while collecting
539         matched rules.
540         (WebCore::ElementRuleCollector::setMedium):
541         Need to know which default stylesheet should be looked up.
542         (WebCore::ElementRuleCollector::document):
543         * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
544         (WebCore::comparePageRules):
545         (WebCore::PageRuleCollector::isLeftPage):
546         (WebCore::PageRuleCollector::isFirstPage):
547         (WebCore::PageRuleCollector::pageName):
548         (WebCore::PageRuleCollector::matchAllPageRules):
549         (WebCore::PageRuleCollector::matchPageRules):
550         (WebCore::checkPageSelectorComponents):
551         (WebCore::PageRuleCollector::matchPageRulesForList):
552         Moved from StyleResolver.
553         * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
554         (WebCore):
555         (WebCore::PageRuleCollector::PageRuleCollector):
556         (PageRuleCollector):
557         (WebCore::PageRuleCollector::matchedResult):
558         * css/StyleResolver.cpp:
559         (WebCore):
560         (WebCore::StyleResolver::State::clear):
561         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
562         (WebCore::StyleResolver::State::initForStyleResolve):
563         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
564         (WebCore::StyleResolver::styleForElement):
565         (WebCore::StyleResolver::styleForKeyframe):
566         (WebCore::StyleResolver::pseudoStyleForElement):
567         (WebCore::StyleResolver::styleForPage):
568         (WebCore::StyleResolver::pseudoStyleRulesForElement):
569         (WebCore::StyleResolver::applyMatchedProperties):
570         * css/StyleResolver.h:
571         (WebCore::MatchRequest::MatchRequest):
572         Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
573         state.
574         (MatchRequest):
575         (WebCore::StyleResolver::selectorFilter):
576         Added to obtain SelectorFilter in ElementRuleCollector's constructor.
577         (StyleResolver):
578         (MatchResult):
579         (WebCore::StyleResolver::State::State):
580         To pass ASSERT in StyleResolver::applyProperties, need to keep
581         m_regionForStyling.
582         (State):
583         (WebCore::StyleResolver::State::regionForStyling):
584         (WebCore::StyleResolver::State::useSVGZoomRules):
585         (WebCore::StyleResolver::hasSelectorForId):
586         (WebCore):
587         (WebCore::checkRegionSelector):
588         * inspector/InspectorCSSAgent.cpp:
589         (WebCore::InspectorCSSAgent::willMatchRule):
590         Removed StyleResolver from its parameter list. Instead, added
591         InspectorCSSOMWrappers and DocumentStyleSheetCollection.
592         * inspector/InspectorCSSAgent.h:
593         (WebCore):
594         (InspectorCSSAgent):
595         * inspector/InspectorInstrumentation.cpp:
596         (WebCore):
597         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
598         * inspector/InspectorInstrumentation.h:
599         (WebCore):
600         (InspectorInstrumentation):
601         (WebCore::InspectorInstrumentation::willMatchRule):
602
603 2013-03-12  Floris Bos  <bos@je-eigen-domein.nl>
604
605         [Qt] WebKit fails to compile if EGL headers are not in default INCLUDEPATH
606         https://bugs.webkit.org/show_bug.cgi?id=111859
607
608         Reviewed by Jocelyn Turcotte.
609
610         The 3D graphics code wants to include EGL header files.
611         But on some platforms such as the Raspberry Pi those are not in /usr/include
612         but in another folder.
613         Fix adds "egl" to CONFIG when OpenGL ES2 is used, so the right include
614         paths are added.
615
616         * WebCore.pri:
617
618 2013-03-12  Mike West  <mkwst@chromium.org>
619
620         XSSAuditor should send only one console error when blocking a page.
621         https://bugs.webkit.org/show_bug.cgi?id=110733
622
623         Reviewed by Daniel Bates.
624
625         Currently, we send two console errors when XSSAuditor blocks a page:
626         "Refused to execute a JavaScript script. Source code of script found
627         within request.\n", and "Entire page will be blocked.".
628
629         We should only send one message, tuning it properly for the context, and
630         including the URL of the page effected by the XSSAuditor's work.
631
632         Covered by rebaselines of all the XSSAuditor and 'reflected-xss' tests.
633
634         * html/parser/XSSAuditor.cpp:
635         * html/parser/XSSAuditor.h:
636         (WebCore::XSSAuditor::XSSAuditor):
637             Add two booleans to track the headers used to set the XSSAuditor state.
638         (WebCore::XSSAuditor::init):
639         (WebCore::XSSAuditor::filterToken):
640             Add detail about the header status to the constructed XSSInfo object.
641         * html/parser/XSSAuditorDelegate.cpp:
642         (WebCore::buildConsoleError):
643             Move message construction out into a separate inlined function, as
644             it's becoming complex.
645         (WebCore::XSSAuditorDelegate::didBlockScript):
646             Fold the "Entire page will be blocked" message into the main console
647             error.
648         * html/parser/XSSAuditorDelegate.h:
649         (WebCore::XSSInfo::create):
650         (WebCore::XSSInfo::XSSInfo):
651             Add detail about header status to XSSInfo in order to correctly
652             construct the console error.
653
654 2013-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
655
656         Unreviewed, rolling out r145494.
657         http://trac.webkit.org/changeset/145494
658         https://bugs.webkit.org/show_bug.cgi?id=112117
659
660         Breaks Chromium Mac (Requested by pfeldman on #webkit).
661
662         * bindings/scripts/CodeGeneratorV8.pm:
663         (GenerateDomainSafeFunctionGetter):
664         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
665         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
666         * bindings/v8/V8PerIsolateData.cpp:
667         (WebCore::V8PerIsolateData::V8PerIsolateData):
668         * bindings/v8/V8PerIsolateData.h:
669         (V8PerIsolateData):
670         * bindings/v8/custom/V8LocationCustom.cpp:
671         (WebCore::V8Location::reloadAttrGetterCustom):
672         (WebCore::V8Location::replaceAttrGetterCustom):
673         (WebCore::V8Location::assignAttrGetterCustom):
674
675 2013-03-12  Yury Semikhatsky  <yurys@chromium.org>
676
677         Web Inspector: add memory instrumentation for ImageLoader
678         https://bugs.webkit.org/show_bug.cgi?id=112115
679
680         Reviewed by Alexander Pavlov.
681
682         Added memory instrumentation to ImageLoader. CachedImage referenced
683         by the loader is reported as having retaining reference. This allows
684         to see in the native memory graph CachedImages that are not reachable
685         from MemoryCache but referenced by HTMLImageElement.
686
687         * loader/ImageLoader.cpp:
688         (WebCore::ImageLoader::reportMemoryUsage):
689         (WebCore):
690         * loader/ImageLoader.h:
691         (ImageLoader):
692
693 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
694
695         Web Inspector: Broken shortcuts in Snippets SourceFrame
696         https://bugs.webkit.org/show_bug.cgi?id=112038
697
698         Reviewed by Pavel Feldman.
699
700         * inspector/front-end/SnippetJavaScriptSourceFrame.js:
701         (WebInspector.SnippetJavaScriptSourceFrame):
702         (WebInspector.SnippetJavaScriptSourceFrame.prototype._onKeyDown):
703
704 2013-03-12  Eugene Klyuchnikov  <eustas@chromium.org>
705
706         Web Inspector: [Timeline] File selector control becomes visible on "tab" navigation.
707         https://bugs.webkit.org/show_bug.cgi?id=111710
708
709         Reviewed by Pavel Feldman.
710
711         Solution: Exclude file selector control from tab-navigation flow.
712
713         * inspector/front-end/FileUtils.js: Set tab-index to control.
714         * inspector/front-end/TimelinePanel.js: Remove duplicating code.
715         * inspector/front-end/inspector.css:
716         (.status-bar-item): Make scroll height equal to offset height.
717
718 2013-03-12  Marja Hölttä  <marja@chromium.org>
719
720         [V8] Get rid of function-level static FunctionTemplates in generated bindings code
721         https://bugs.webkit.org/show_bug.cgi?id=111971
722
723         Reviewed by Kentaro Hara.
724
725         In the future we'll create and store function templates for main world
726         and non-main worlds separately (see bug 111724), having function
727         templates as static variables inside functions will break the
728         functionality.
729
730         No new tests (updated the bindings test expectations).
731
732         * bindings/scripts/CodeGeneratorV8.pm:
733         (GenerateDomainSafeFunctionGetter):
734         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
735         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
736         * bindings/v8/V8PerIsolateData.cpp:
737         (WebCore::V8PerIsolateData::V8PerIsolateData):
738         (WebCore::V8PerIsolateData::privateTemplate):
739         (WebCore):
740         * bindings/v8/V8PerIsolateData.h:
741         (V8PerIsolateData):
742         * bindings/v8/custom/V8LocationCustom.cpp:
743         (WebCore::V8Location::reloadAttrGetterCustom):
744         (WebCore::V8Location::replaceAttrGetterCustom):
745         (WebCore::V8Location::assignAttrGetterCustom):
746
747 2013-03-12  Tien-Ren Chen  <trchen@chromium.org>
748
749         Need to notify ScrollingCoordinator when frame scrollbars are destroyed
750         https://bugs.webkit.org/show_bug.cgi?id=112104
751
752         Reviewed by James Robinson.
753
754         Need to notify ScrollingCoordinatorChromium whenever m_layerForHorizontalScrollbar /
755         m_layerForVerticalScrollbar changes, for correct lifetime management.
756
757         No new tests. Difficult to test lifetime management internal to ScrollingCoordinatorChromium.
758
759         * rendering/RenderLayerCompositor.cpp:
760         (WebCore::RenderLayerCompositor::destroyRootLayer):
761
762 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
763
764         We'll get there eventually.
765
766         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
767
768 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
769
770         Fumbled adding new files to the vcproj. Fixing.
771
772         * WebCore.vcproj/WebCore.vcproj:
773
774 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
775
776         Fix the Windows build by providing implementations of PlatformCAFilters::setFiltersOnLayer(),
777         PlatformCAFilters::numAnimatedFilterProperties() and PlatformCAFilters::animatedFilterPropertyName(),
778         adding PlatformCAFiltersWin.cpp to the vcproj.
779         
780         * WebCore.vcproj/WebCore.vcproj:
781         * platform/graphics/ca/PlatformCAFilters.h:
782         (PlatformCAFilters):
783         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp: Copied from Source/WebCore/platform/graphics/ca/PlatformCAFilters.h.
784         (PlatformCAFilters::setFiltersOnLayer):
785         (PlatformCAFilters::numAnimatedFilterProperties):
786         (PlatformCAFilters::animatedFilterPropertyName):
787
788 2013-03-11  Jochen Eisinger  <jochen@chromium.org>
789
790         Don't create multiple user gesture indicators when forwarding events to sub frames
791         https://bugs.webkit.org/show_bug.cgi?id=111923
792
793         Reviewed by Adam Barth.
794
795         Ports that implement consumable user gestures depend on a single user
796         gesture indicator being created in response to a single user gesture.
797
798         Test: platform/chromium/fast/events/popup-allowed-from-gesture-only-once-iframes.html
799
800         * dom/UserGestureIndicator.cpp:
801         (WebCore::isDefinite):
802         (WebCore::UserGestureIndicator::UserGestureIndicator):
803         (WebCore::UserGestureIndicator::processingUserGesture):
804         * dom/UserGestureIndicator.h:
805         * page/EventHandler.cpp:
806         (WebCore::EventHandler::handleMousePressEvent):
807         (WebCore::EventHandler::handleMouseDoubleClickEvent):
808         (WebCore::EventHandler::handleMouseReleaseEvent):
809         (WebCore::EventHandler::keyEvent):
810         (WebCore::EventHandler::handleTouchEvent):
811
812 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
813
814         Fix Windows build.
815
816         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
817
818 2013-03-11  Tim Horton  <timothy_horton@apple.com>
819
820         Unreviewed build fix after http://trac.webkit.org/changeset/145472.
821
822         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
823         (PlatformCAFilters::colorMatrixValueForFilter):
824
825 2013-03-11  Takashi Sakamoto  <tasak@google.com>
826
827         [CSS] shadow from radius has wrong render in webkit
828         https://bugs.webkit.org/show_bug.cgi?id=99928
829
830         Reviewed by Simon Fraser.
831
832         No rounded cornder should be expanded in the mixed case, i.e. some
833         corners are rounded, but others are not rounded.
834         Need to look at each corner independently,
835         i.e. top-left, top-right, bottom-left and bottom-right, and
836         to expand corners whose width and height are larger than 0.
837
838         Test: fast/box-shadow/box-shadow-with-zero-radius.html
839
840         * platform/graphics/RoundedRect.cpp:
841         (WebCore::RoundedRect::Radii::expand):
842
843 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
844
845         [CA] Animations of CSS filters don't work correctly
846         https://bugs.webkit.org/show_bug.cgi?id=111905
847
848         Reviewed by Dean Jackson.
849
850         Fix various issues with transitions of composited filters on Mac,
851         most of which stemmed from the conversion to use CAFilter.
852         
853         Put the Mac CA filter-related code into a new file, PlatformCAFilters,
854         to group code that creates filter properties into a single place.
855         
856         Animations of CIFilters using multiple values never worked correctly,
857         because we would clobber all but the last property for each filter,
858         so fix that.
859         
860         Changes in the moved filter code:
861             - Made use of sepiaFullConstants in the CIFilter and CAFilter code.
862             - For CI, return CIVectors instead of NSArrays of NSNumbers.
863             - Fudge the inputColor for the CI grayscale filter to better match software filters.
864             - fix some cases where the behavior was wrong in the isDefault() case.
865
866         * WebCore.xcodeproj/project.pbxproj: Add PlatformCAFilters.h, PlatformCAFiltersMac.mm.
867         * platform/graphics/GraphicsLayer.cpp:
868         (WebCore::GraphicsLayer::animationNameForTransition): This function was creating a string
869         containing non-ASCII characters.
870         * platform/graphics/ca/GraphicsLayerCA.cpp:
871         (WebCore::animationIdentifier): To handle CIFilter animations, we need to tack another
872         index onto the animation identifier, since some animations require animating multiple
873         properties of the same CIFilter. Add "subIndex" for this.
874         (WebCore::GraphicsLayerCA::moveOrCopyAnimations): Ditto.
875         (WebCore::GraphicsLayerCA::updateAnimations): Ditto.
876         (WebCore::GraphicsLayerCA::setAnimationOnLayer): Ditto.
877         (WebCore::GraphicsLayerCA::removeCAAnimationFromLayer): Ditto.
878         (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer): Ditto.
879         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): Ditto.
880         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): Ditto.
881         * platform/graphics/ca/GraphicsLayerCA.h: Ditto.
882         (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
883         (LayerPropertyAnimation):
884         * platform/graphics/ca/PlatformCAAnimation.h:
885         (PlatformCAAnimation): Functions moved.
886         * platform/graphics/ca/PlatformCAFilters.h: Added.
887         (PlatformCAFilters):
888         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
889         (PlatformCAAnimation::setFromValue):
890         (PlatformCAAnimation::setToValue):
891         (PlatformCAAnimation::setValues):
892         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Added.
893         (PlatformCAFilters::filterValueForOperation):
894         (PlatformCAFilters::colorMatrixValueForFilter):
895         (PlatformCAFilters::numAnimatedFilterProperties):
896         (PlatformCAFilters::animatedFilterPropertyName):
897         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
898         (PlatformCALayer::PlatformCALayer):
899         (PlatformCALayer::addAnimationForKey):
900         (PlatformCALayer::setFilters):
901         (PlatformCALayer::filtersCanBeComposited):
902
903 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
904
905         Unreviewed, rolling out r145462.
906         http://trac.webkit.org/changeset/145462
907         https://bugs.webkit.org/show_bug.cgi?id=112097
908
909         Compilation failure in PluginView.cpp (Requested by jamesr_ on
910         #webkit).
911
912         * accessibility/AccessibilityMenuList.cpp:
913         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
914         * bindings/objc/DOM.mm:
915         (kitClass):
916         * bindings/v8/V8LazyEventListener.cpp:
917         (WebCore::V8LazyEventListener::prepareListenerObject):
918         * css/SelectorChecker.cpp:
919         (WebCore::SelectorChecker::checkOne):
920         * editing/ApplyStyleCommand.cpp:
921         (WebCore::isLegacyAppleStyleSpan):
922         (WebCore::isEmptyFontTag):
923         (WebCore::ApplyStyleCommand::applyBlockStyle):
924         * editing/FormatBlockCommand.cpp:
925         (WebCore::isElementForFormatBlock):
926         * editing/ReplaceSelectionCommand.cpp:
927         (WebCore::isMailPasteAsQuotationNode):
928         (WebCore::haveSameTagName):
929         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
930         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
931         * history/CachedPage.cpp:
932         (WebCore::CachedPage::restore):
933         * html/ColorInputType.cpp:
934         (WebCore::ColorInputType::suggestions):
935         * html/HTMLTableRowsCollection.cpp:
936         (WebCore::isInHead):
937         (WebCore::isInBody):
938         (WebCore::isInFoot):
939         * inspector/DOMPatchSupport.cpp:
940         (WebCore::DOMPatchSupport::innerPatchNode):
941         * page/PageSerializer.cpp:
942         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
943         * plugins/PluginView.cpp:
944         (WebCore::PluginView::getValue):
945         * rendering/RenderEmbeddedObject.cpp:
946         (WebCore::RenderEmbeddedObject::paintContents):
947         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
948         * rendering/RenderLayer.cpp:
949         (WebCore::RenderLayer::name):
950         * rendering/RenderMedia.cpp:
951         (WebCore::RenderMedia::mediaElement):
952         * rendering/RenderSearchField.cpp:
953         (WebCore::RenderSearchField::autosaveName):
954         * rendering/RenderTextControl.cpp:
955         (WebCore::RenderTextControl::textFormControlElement):
956         (WebCore::updateUserModifyProperty):
957         * rendering/mathml/RenderMathMLFenced.cpp:
958         (WebCore::RenderMathMLFenced::updateFromElement):
959         * rendering/mathml/RenderMathMLFraction.cpp:
960         (WebCore::RenderMathMLFraction::updateFromElement):
961         * xml/parser/XMLDocumentParserLibxml2.cpp:
962         (WebCore::XMLDocumentParser::XMLDocumentParser):
963         (WebCore::XMLDocumentParser::endElementNs):
964
965 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
966
967         Move SharedWorkerRepository functions out of DefaultSharedWorkerRepository
968         https://bugs.webkit.org/show_bug.cgi?id=100418
969
970         Reviewed by Sam Weinig.
971
972         * CMakeLists.txt:
973         * GNUmakefile.list.am:
974         * Target.pri:
975         * WebCore.vcproj/WebCore.vcproj:
976         * WebCore.xcodeproj/project.pbxproj:
977         Added SharedWorkerRepository.cpp.
978
979         * WebCore.gyp/WebCore.gyp:
980         * WebCore.gypi:
981         Chromium uses WebKit/chromium/src/SharedWorkerRepository.cpp instead of
982         WebCore/workers/DefaultSharedWorkerRepository.cpp. Not sure why it's added and
983         then excluded, but did the same with the new SharedWorkerRepository.cpp, which
984         just contains some code moved from that file.
985
986         * workers/DefaultSharedWorkerRepository.cpp:
987         (WebCore::SharedWorkerScriptLoader::load): Removed a PLATFORM(CHROMIUM) clause,
988         chromium doesn't compile this file.
989         (WebCore::DefaultSharedWorkerRepository::connectToWorker): Added a FIXME about
990         seemingly wrong code.
991
992         * workers/SharedWorkerRepository.cpp: Added.
993         (WebCore::SharedWorkerRepository::isAvailable):
994         (WebCore::SharedWorkerRepository::connect):
995         (WebCore::SharedWorkerRepository::documentDetached):
996         (WebCore::SharedWorkerRepository::hasSharedWorkers):
997         Moved from DefaultSharedWorkerRepository.cpp, because this is part of SharedWorkerRepository.
998
999 2013-03-11  Adam Barth  <abarth@webkit.org>
1000
1001         Make BackgroundHTMLParser work with doc.writes that enter or leave foreign content
1002         https://bugs.webkit.org/show_bug.cgi?id=109764
1003
1004         Reviewed by Eric Seidel.
1005
1006         Previously, we were not reseting the state of the
1007         HTMLTreeBuilderSimulator when we failed speculative parsing. This had a
1008         number of observable consequences, including not parsing CDATA sections
1009         correctly when document.write caused us to enter foreign content.
1010
1011         Test: fast/parser/document-write-svg-cdata.html
1012
1013         * html/parser/BackgroundHTMLParser.cpp:
1014         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
1015         (WebCore::BackgroundHTMLParser::resumeFrom):
1016         (WebCore::BackgroundHTMLParser::pumpTokenizer):
1017         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
1018         * html/parser/BackgroundHTMLParser.h:
1019         (Checkpoint):
1020         (BackgroundHTMLParser):
1021         * html/parser/HTMLDocumentParser.cpp:
1022         (WebCore::HTMLDocumentParser::validateSpeculations):
1023         (WebCore::HTMLDocumentParser::didFailSpeculation):
1024         * html/parser/HTMLDocumentParser.h:
1025         (ParsedChunk):
1026         * html/parser/HTMLElementStack.h:
1027         (WebCore::HTMLElementStack::ElementRecord::namespaceURI):
1028         * html/parser/HTMLTreeBuilder.h:
1029         (WebCore::HTMLTreeBuilder::options):
1030         (WebCore::HTMLTreeBuilder::openElements):
1031         (HTMLTreeBuilder):
1032         * html/parser/HTMLTreeBuilderSimulator.cpp:
1033         (WebCore::HTMLTreeBuilderSimulator::stateFor):
1034         (WebCore):
1035         * html/parser/HTMLTreeBuilderSimulator.h:
1036         (WebCore):
1037         (WebCore::HTMLTreeBuilderSimulator::state):
1038         (WebCore::HTMLTreeBuilderSimulator::setState):
1039         (HTMLTreeBuilderSimulator):
1040
1041 2013-03-11  Abhishek Arya  <inferno@chromium.org>
1042
1043         Replace static_casts with to* functions.
1044         https://bugs.webkit.org/show_bug.cgi?id=112072
1045
1046         Reviewed by Philip Rogers.
1047
1048         to* functions are preferred over static_cast calls since they
1049         help to catch bad casts easily on the testing infrastructure.
1050
1051         * accessibility/AccessibilityMenuList.cpp:
1052         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
1053         * bindings/objc/DOM.mm:
1054         (kitClass):
1055         * bindings/v8/V8LazyEventListener.cpp:
1056         (WebCore::V8LazyEventListener::prepareListenerObject):
1057         * css/SelectorChecker.cpp:
1058         (WebCore::SelectorChecker::checkOne):
1059         * editing/ApplyStyleCommand.cpp:
1060         (WebCore::isLegacyAppleStyleSpan):
1061         (WebCore::isEmptyFontTag):
1062         (WebCore::ApplyStyleCommand::applyBlockStyle):
1063         * editing/FormatBlockCommand.cpp:
1064         (WebCore::isElementForFormatBlock):
1065         * editing/ReplaceSelectionCommand.cpp:
1066         (WebCore::isMailPasteAsQuotationNode):
1067         (WebCore::haveSameTagName):
1068         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1069         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
1070         * history/CachedPage.cpp:
1071         (WebCore::CachedPage::restore):
1072         * html/ColorInputType.cpp:
1073         (WebCore::ColorInputType::suggestions):
1074         * html/HTMLTableRowsCollection.cpp:
1075         (WebCore::isInHead):
1076         (WebCore::isInBody):
1077         (WebCore::isInFoot):
1078         * inspector/DOMPatchSupport.cpp:
1079         (WebCore::DOMPatchSupport::innerPatchNode):
1080         * page/PageSerializer.cpp:
1081         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
1082         * plugins/PluginView.cpp:
1083         (WebCore::PluginView::getValue):
1084         * rendering/RenderEmbeddedObject.cpp:
1085         (WebCore::RenderEmbeddedObject::paintContents):
1086         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
1087         * rendering/RenderLayer.cpp:
1088         (WebCore::RenderLayer::name):
1089         * rendering/RenderMedia.cpp:
1090         (WebCore::RenderMedia::mediaElement):
1091         * rendering/RenderSearchField.cpp:
1092         (WebCore::RenderSearchField::autosaveName):
1093         * rendering/RenderTextControl.cpp:
1094         (WebCore::RenderTextControl::textFormControlElement):
1095         (WebCore::updateUserModifyProperty):
1096         * rendering/mathml/RenderMathMLFenced.cpp:
1097         (WebCore::RenderMathMLFenced::updateFromElement):
1098         * rendering/mathml/RenderMathMLFraction.cpp:
1099         (WebCore::RenderMathMLFraction::updateFromElement):
1100         * xml/parser/XMLDocumentParserLibxml2.cpp:
1101         (WebCore::XMLDocumentParser::XMLDocumentParser):
1102         (WebCore::XMLDocumentParser::endElementNs):
1103
1104 2013-03-11  Philip Rogers  <pdr@google.com>
1105
1106         Replace static_casts for SVGSVGElement and SVGStopElement
1107         https://bugs.webkit.org/show_bug.cgi?id=111651
1108
1109         Reviewed by Stephen Chenney.
1110
1111         toSVGSVGElement and toSVGStopElement are preferred over static_casts because bad casts
1112         can be caught on our testing infrastructure. This patches replaces all static_casts for
1113         SVGSVGElement and SVGStopElement with toSVGSVGElement and toSVGStopElement, respectively.
1114
1115         Additionaly, this patch renames SVGElement::isSVG to SVGElement::isSVGSVGElement to
1116         remove ambiguity for callers who may confuse this with isSVGElement.
1117
1118         No new tests as this is covered with existing tests.
1119
1120         * rendering/svg/RenderSVGRoot.cpp:
1121         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
1122         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
1123         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
1124         (WebCore::RenderSVGRoot::layout):
1125         (WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
1126         (WebCore::RenderSVGRoot::hasRelativeDimensions):
1127         (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth):
1128         (WebCore::RenderSVGRoot::hasRelativeLogicalHeight):
1129         * rendering/svg/RenderSVGViewportContainer.cpp:
1130         (WebCore::RenderSVGViewportContainer::determineIfLayoutSizeChanged):
1131         (WebCore::RenderSVGViewportContainer::calcViewport):
1132         (WebCore::RenderSVGViewportContainer::viewportTransform):
1133         * svg/SVGDocument.cpp:
1134         (WebCore::SVGDocument::rootElement):
1135         (WebCore::SVGDocument::childShouldCreateRenderer):
1136         * svg/SVGElement.cpp:
1137         (WebCore::SVGElement::ownerSVGElement):
1138         * svg/SVGElement.h:
1139         (WebCore::SVGElement::isSVGSVGElement):
1140         * svg/SVGGradientElement.cpp:
1141         (WebCore::SVGGradientElement::buildStops):
1142         * svg/SVGLengthContext.cpp:
1143         (WebCore::SVGLengthContext::determineViewport):
1144         * svg/SVGSVGElement.h:
1145         (WebCore):
1146         (WebCore::toSVGSVGElement):
1147         * svg/SVGStopElement.h:
1148         (WebCore::toSVGStopElement):
1149         (WebCore):
1150
1151 2013-03-11  Tony Chang  <tony@chromium.org>
1152
1153         Small code cleanup in RenderFlexibleBox
1154         https://bugs.webkit.org/show_bug.cgi?id=112076
1155
1156         Reviewed by Ojan Vafai.
1157
1158         No new tests, this is a refactor and existing tests in css3/flexbox should pass.
1159
1160         * rendering/RenderFlexibleBox.cpp:
1161         (WebCore::RenderFlexibleBox::layoutBlock): Remove unused param from repositionLogicalHeightDependentFlexItems.
1162         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Remove unused param from repositionLogicalHeightDependentFlexItems.
1163         The clientLogicalBottom can't have changed in this time (the only thing we've done is align children).
1164         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Just call layout() if we marked the flexitem as needing layout.
1165         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Just call layout() if we marked the flexitem as needing layout.
1166         * rendering/RenderFlexibleBox.h:
1167         (RenderFlexibleBox): Remove unused param from repositionLogicalHeightDependentFlexItems.
1168
1169 2013-03-11  Jochen Eisinger  <jochen@chromium.org>
1170
1171         Rename DefinitelyProcessingUserGesture to DefinitelyProcessingNewUserGesture
1172         https://bugs.webkit.org/show_bug.cgi?id=111959
1173
1174         Reviewed by Alexey Proskuryakov.
1175
1176         The rationale is that the UserGestureIndicator will increase the number
1177         of consumable user gestures when it's invoked with what is now
1178         DefinitelyProcessingNewUserGesture.
1179
1180         In a follow-up change I will reintroduce DefinitelyProcessingUserGesture
1181         which will only increase the consumable user gesture count if we are
1182         not already processing a user gesture.
1183
1184         No new tests, no change in functionality.
1185
1186         * accessibility/AccessibilityNodeObject.cpp:
1187         (WebCore::AccessibilityNodeObject::increment):
1188         (WebCore::AccessibilityNodeObject::decrement):
1189         * accessibility/AccessibilityObject.cpp:
1190         (WebCore::AccessibilityObject::press):
1191         * bindings/ScriptControllerBase.cpp:
1192         (WebCore::ScriptController::executeScript):
1193         * bindings/js/ScriptController.cpp:
1194         (WebCore::ScriptController::executeScriptInWorld):
1195         * bindings/v8/NPV8Object.cpp:
1196         (_NPN_EvaluateHelper):
1197         * dom/UserGestureIndicator.cpp:
1198         (WebCore::isDefinite):
1199         (WebCore::UserGestureIndicator::UserGestureIndicator):
1200         (WebCore::UserGestureIndicator::processingUserGesture):
1201         * dom/UserGestureIndicator.h:
1202         * inspector/InspectorFrontendClientLocal.cpp:
1203         (WebCore::InspectorFrontendClientLocal::openInNewTab):
1204         * inspector/InspectorFrontendHost.cpp:
1205         (WebCore::FrontendMenuProvider::contextMenuItemSelected):
1206         * inspector/InspectorPageAgent.cpp:
1207         (WebCore::InspectorPageAgent::navigate):
1208         * loader/NavigationScheduler.cpp:
1209         (WebCore::ScheduledURLNavigation::fire):
1210         (WebCore::ScheduledURLNavigation::didStartTimer):
1211         (WebCore::ScheduledRedirect::fire):
1212         (WebCore::ScheduledRefresh::fire):
1213         (WebCore::ScheduledHistoryNavigation::fire):
1214         (WebCore::ScheduledFormSubmission::fire):
1215         (WebCore::ScheduledFormSubmission::didStartTimer):
1216         * page/EventHandler.cpp:
1217         (WebCore::EventHandler::handleMousePressEvent):
1218         (WebCore::EventHandler::handleMouseDoubleClickEvent):
1219         (WebCore::EventHandler::handleMouseReleaseEvent):
1220         (WebCore::EventHandler::keyEvent):
1221         (WebCore::EventHandler::handleTouchEvent):
1222         * platform/chromium/PopupContainer.cpp:
1223         (WebCore::PopupContainer::handleMouseDownEvent):
1224         (WebCore::PopupContainer::handleMouseMoveEvent):
1225         (WebCore::PopupContainer::handleMouseReleaseEvent):
1226         (WebCore::PopupContainer::handleWheelEvent):
1227         (WebCore::PopupContainer::handleKeyEvent):
1228
1229 2013-03-11  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
1230
1231         Ruby text is incorrectly positioned when its writing-mode is changed to vertical after layout is done
1232         https://bugs.webkit.org/show_bug.cgi?id=96592
1233
1234         Reviewed by Hajime Morrita.
1235
1236         Fixed logical left of RenderRubyText is not cleared.
1237
1238         This causes trouble when RenderRubyTest is laid out vertically after horizontally.
1239         Horizontal layout set logical top(== y).
1240         Vertical layout don't set logical left(== y).
1241         RenderRubyText::y remain old one.
1242         We clear old RenderRubyText::y at the first part of layout().
1243
1244         Test: fast/writing-mode/ruby-text-logical-left.html
1245
1246         * rendering/RenderRubyRun.cpp:
1247         (WebCore::RenderRubyRun::layout): Reset logicalLeft not to reuse old one.
1248
1249 2013-03-11  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
1250
1251         [css3-text] Add partial parsing support for text-underline-position property from CSS3 Text
1252         https://bugs.webkit.org/show_bug.cgi?id=102491
1253
1254         Reviewed by Julien Chaffraix.
1255
1256         This patch extends the existing parsing to support 'auto', 'alphabetic' and 'under'. We don't fully match
1257         the specification as we don't support [ left | right ] and this is left for another implementation
1258         as the rendering will need to be added.
1259
1260         Test: fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position.html
1261
1262         * css/CSSComputedStyleDeclaration.cpp:
1263         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1264         * css/CSSParser.cpp:
1265         (WebCore::CSSParser::parseValue):
1266         (WebCore::CSSParser::parseTextUnderlinePosition):
1267         * css/CSSParser.h:
1268         * css/CSSPrimitiveValueMappings.h:
1269         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1270         (WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
1271         * css/CSSProperty.cpp:
1272         (WebCore::CSSProperty::isInheritedProperty):
1273         Added parsing-related checks for text-underline-position property.
1274         * css/CSSPropertyNames.in: Added '-webkit-underline-position' property.
1275         * css/CSSValueKeywords.in:
1276         * css/SVGCSSValueKeywords.in:
1277         * css/StyleBuilder.cpp:
1278         (ApplyPropertyTextUnderlinePosition):
1279         (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
1280         (WebCore::ApplyPropertyTextUnderlinePosition::createHandler):
1281         (WebCore::StyleBuilder::StyleBuilder):
1282         Set property handler for text-underline-position.
1283         * css/StyleResolver.cpp:
1284         (WebCore::StyleResolver::applyProperty):
1285         * rendering/style/RenderStyle.h:
1286         * rendering/style/RenderStyleConstants.h:
1287         * rendering/style/StyleRareInheritedData.cpp:
1288         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1289         (WebCore::StyleRareInheritedData::operator==):
1290         Added support for m_textUnderlinePosition on copy constructor and operator
1291         assignment functions.
1292         * rendering/style/StyleRareInheritedData.h:
1293         (StyleRareInheritedData): Added m_textUnderlinePosition here as it won't be used regularly.
1294
1295 2013-03-11  Christian Biesinger  <cbiesinger@chromium.org>
1296
1297         Hit testing should use ancestorInThisScope to get the non-shadow ancestor
1298         https://bugs.webkit.org/show_bug.cgi?id=112068
1299
1300         Reviewed by Dimitri Glazkov.
1301
1302         Tests: media/nodesFromRect-shadowContent.html
1303
1304         * rendering/HitTestResult.cpp:
1305         (WebCore::HitTestResult::setToNonShadowAncestor):
1306         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
1307         Use ancestorInThisScope which is not deprecated and which produces
1308         correct results for nested shadow trees (e.g. in case of <video>,
1309         which contains <input> elements for the controls, which themselves
1310         have shadow trees)
1311
1312 2013-03-11  Abhishek Arya  <inferno@chromium.org>
1313
1314         Replace static_cast with to* helper functions.
1315         https://bugs.webkit.org/show_bug.cgi?id=112045
1316
1317         Reviewed by Eric Seidel.
1318
1319         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1320         (WebCore::V8HTMLOptionsCollection::removeMethodCustom):
1321         (WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
1322         * bindings/v8/custom/V8NamedNodesCollection.cpp:
1323         (WebCore::V8NamedNodesCollection::namedItem):
1324         * bindings/v8/custom/V8NodeCustom.cpp:
1325         (WebCore::wrap):
1326         * editing/BreakBlockquoteCommand.cpp:
1327         (WebCore::BreakBlockquoteCommand::doApply):
1328         * editing/CompositeEditCommand.cpp:
1329         (WebCore::CompositeEditCommand::insertNodeAt):
1330         (WebCore::CompositeEditCommand::pushAnchorElementDown):
1331         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
1332         (WebCore::CompositeEditCommand::splitTreeToNode):
1333         * editing/InsertParagraphSeparatorCommand.cpp:
1334         (WebCore::InsertParagraphSeparatorCommand::doApply):
1335         * loader/archive/cf/LegacyWebArchive.cpp:
1336         (WebCore::LegacyWebArchive::create):
1337         * platform/chromium/PasteboardChromium.cpp:
1338         (WebCore::Pasteboard::writeImage):
1339         * platform/mac/HTMLConverter.mm:
1340         (+[WebHTMLConverter editingAttributedStringFromRange:]):
1341         * rendering/RenderLayerBacking.cpp:
1342         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1343         * rendering/RenderLayerCompositor.cpp:
1344         (WebCore::RenderLayerCompositor::frameContentsCompositor):
1345         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
1346         * rendering/RenderSnapshottedPlugIn.cpp:
1347         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
1348         * rendering/mathml/RenderMathMLOperator.cpp:
1349         (WebCore::RenderMathMLOperator::updateFromElement):
1350         * rendering/svg/RenderSVGResourceContainer.cpp:
1351         (WebCore::RenderSVGResourceContainer::idChanged):
1352
1353 2013-03-11  James Robinson  <jamesr@chromium.org>
1354
1355         [chromium] Use SkMatrix44 instead of WebTransformationMatrix in animation APIs
1356         https://bugs.webkit.org/show_bug.cgi?id=111791
1357
1358         Reviewed by Adrienne Walker.
1359
1360         Adds a new utility function to convert a TransformationMatrix to an SkMatrix44 and
1361         uses it in AnimationTranslationUtil and GraphicsLayerChromium.
1362
1363         * WebCore.gypi:
1364         * platform/chromium/support/WebTransformationMatrix.cpp:
1365         (WebKit::WebTransformationMatrix::WebTransformationMatrix):
1366         * platform/graphics/chromium/AnimationTranslationUtil.cpp:
1367         (WebCore::toWebTransformOperations):
1368         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1369         (WebCore::GraphicsLayerChromium::updateTransform):
1370         (WebCore::GraphicsLayerChromium::updateChildrenTransform):
1371         * platform/graphics/chromium/TransformSkMatrix44Conversions.cpp:
1372         (WebCore::TransformSkMatrix44Conversions::convert):
1373         * platform/graphics/chromium/TransformSkMatrix44Conversions.h:
1374         (TransformSkMatrix44Conversions):
1375
1376 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1377
1378         Unreviewed, rolling out r145435.
1379         http://trac.webkit.org/changeset/145435
1380         https://bugs.webkit.org/show_bug.cgi?id=112082
1381
1382         Still does not compile (Requested by jamesr on #webkit).
1383
1384         * Modules/indexeddb/IDBBackingStore.cpp:
1385         (WebCore::IDBBackingStore::getObjectStores):
1386         (WebCore::IDBBackingStore::createObjectStore):
1387         (WebCore::IDBBackingStore::deleteObjectStore):
1388         (WebCore::IDBBackingStore::getRecord):
1389         (WebCore::IDBBackingStore::putRecord):
1390         (WebCore::IDBBackingStore::clearObjectStore):
1391         (WebCore::IDBBackingStore::deleteRecord):
1392         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
1393         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
1394         (WebCore::IDBBackingStore::keyExistsInObjectStore):
1395         (WebCore::IDBBackingStore::getIndexes):
1396         (WebCore::IDBBackingStore::createIndex):
1397         (WebCore::IDBBackingStore::deleteIndex):
1398         (WebCore::IDBBackingStore::putIndexDataForRecord):
1399         (WebCore::IDBBackingStore::findKeyInIndex):
1400         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
1401         (WebCore::IDBBackingStore::keyExistsInIndex):
1402         (WebCore::indexCursorOptions):
1403         * Modules/indexeddb/IDBBackingStore.h:
1404         (IDBBackingStore):
1405         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1406         (WebCore::DeleteIndexOperation::create):
1407         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
1408         (DeleteIndexOperation):
1409         (WebCore::IDBDatabaseBackendImpl::openInternal):
1410         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
1411         (WebCore::DeleteIndexOperation::perform):
1412         (WebCore::DeleteRangeOperation::perform):
1413         (WebCore::ClearOperation::perform):
1414         * Modules/indexeddb/IDBLevelDBCoding.cpp:
1415         (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
1416         (WebCore::IDBLevelDBCoding::KeyPrefix::encode):
1417         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
1418         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
1419         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
1420         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
1421         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
1422         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
1423         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
1424         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
1425         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
1426         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
1427         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
1428         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
1429         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
1430         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
1431         * Modules/indexeddb/IDBLevelDBCoding.h:
1432         (IDBLevelDBCoding):
1433         (KeyPrefix):
1434         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1435         (WebCore::IDBObjectStoreBackendImpl::IndexWriter::writeIndexKeys):
1436
1437 2013-03-11  Alec Flett  <alecflett@chromium.org>
1438
1439         IndexedDB: Protect against key prefix overflows
1440         https://bugs.webkit.org/show_bug.cgi?id=111138
1441
1442         Reviewed by Tony Chang.
1443
1444         This reworks the boundary checking for all databaseId,
1445         objectStoreId, and indexId, including negative and
1446         zero-based ids. All entrypoints into IDBLevelDBCoding
1447         are protected with explicit checks and all internal
1448         uses of KeyPrefix are protected with ASSERTs in the
1449         various constructors.
1450
1451         Tests: WebKit unit tests IDBBackingStoreTest.cpp in WebKit/chromium
1452
1453         * Modules/indexeddb/IDBBackingStore.h: Make all public methods boolean-based for errors.
1454         * Modules/indexeddb/IDBLevelDBCoding.h: Add methods for checking databaseId, objectStoreId, and indexId.
1455
1456 2013-03-11  Philip Rogers  <pdr@google.com>
1457
1458         Replace static_cast<SVGStyledElement> with toSVGStyledElement()
1459         https://bugs.webkit.org/show_bug.cgi?id=111651
1460
1461         Reviewed by Abhishek Arya.
1462
1463         toSVGStyledElement is preferred over static_cast<SVGStyledElement*> because bad casts
1464         can be caught on our testing infrastructure. This patch replaces all
1465         static_cast<SVGStyledElement> instances with toSVGStyledElement.
1466
1467         Additionally, this patch renames SVGElement::isStyled to SVGElement::isSVGStyledElement to
1468         remove a confusing overlap with html styled elements. This name differs slighly from the
1469         other is*() functions in SVGElement but this will be resolved up with webkit.org/b/107386.
1470
1471         No new tests as this is covered with existing tests.
1472
1473         * rendering/svg/RenderSVGModelObject.cpp:
1474         (WebCore::getElementCTM):
1475         * rendering/svg/RenderSVGResourceClipper.cpp:
1476         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
1477         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
1478         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
1479         * rendering/svg/RenderSVGResourceMasker.cpp:
1480         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
1481         (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
1482         * rendering/svg/RenderSVGResourcePattern.cpp:
1483         (WebCore::RenderSVGResourcePattern::createTileImage):
1484         * rendering/svg/SVGRenderSupport.cpp:
1485         (WebCore::SVGRenderSupport::layoutChildren):
1486         * rendering/svg/SVGResources.cpp:
1487         (WebCore::registerPendingResource):
1488         * svg/SVGAnimationElement.cpp:
1489         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
1490         (WebCore::SVGAnimationElement::computeCSSPropertyValue):
1491         (WebCore::SVGAnimationElement::adjustForInheritance):
1492         (WebCore::inheritsFromProperty):
1493         * svg/SVGElement.cpp:
1494         (WebCore::collectInstancesForSVGElement):
1495         (WebCore::SVGElement::isAnimatableAttribute):
1496         * svg/SVGElement.h:
1497         (WebCore::SVGElement::isSVGStyledElement):
1498         * svg/SVGElementInstance.cpp:
1499         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
1500         (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
1501         * svg/SVGLocatable.cpp:
1502         (WebCore::SVGLocatable::computeCTM):
1503         * svg/SVGStyledElement.cpp:
1504         (WebCore::SVGStyledElement::updateRelativeLengthsInformation):
1505         * svg/SVGStyledElement.h:
1506         (WebCore::SVGStyledElement::isSVGStyledElement):
1507         * svg/SVGUseElement.cpp:
1508         (WebCore::SVGUseElement::selfHasRelativeLengths):
1509         * svg/graphics/filters/SVGFEImage.cpp:
1510         (WebCore::FEImage::platformApplySoftware):
1511
1512 2013-03-11  Tim Horton  <timothy_horton@apple.com>
1513
1514         PDFPlugin: Make scrolling between pages in non-continuous modes work
1515         https://bugs.webkit.org/show_bug.cgi?id=111415
1516         <rdar://problem/12555320>
1517
1518         Reviewed by Alexey Proskuryakov.
1519
1520         * WebCore.exp.in: Export ScrollableArea::scrollToOffsetWithoutAnimation.
1521
1522 2013-03-11  Mark Lam  <mark.lam@apple.com>
1523
1524         Remove the use of the quotaMap cache in DatabaseTracker.
1525         https://bugs.webkit.org/show_bug.cgi?id=111805.
1526
1527         Reviewed by Geoffrey Garen.
1528
1529         This change is needed because using the quotaMap cache can result in
1530         an inaccurate read (in a multi-process system) on what database files
1531         are actually present on the filesystem. Instead of using the quotaMap
1532         cache, we rely on the tracker database and query it every time we need
1533         the origin/quota information.
1534
1535         No new tests.
1536
1537         * Modules/webdatabase/DatabaseTracker.cpp:
1538         (WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
1539         (WebCore::DatabaseTracker::hasEntryForOriginNoLock):
1540         (WebCore::DatabaseTracker::origins):
1541         (WebCore::DatabaseTracker::quotaForOriginNoLock):
1542         (WebCore::DatabaseTracker::setQuota):
1543         (WebCore::DatabaseTracker::addDatabase):
1544         (WebCore::DatabaseTracker::deleteOrigin):
1545         * Modules/webdatabase/DatabaseTracker.h:
1546
1547 2013-03-11  Morten Stenshorne  <mstensho@opera.com>
1548
1549         Don't rely on the fact that StaticPosition happens to be defined as 0
1550         https://bugs.webkit.org/show_bug.cgi?id=110123
1551
1552         Also made the expression slightly less convoluted.
1553
1554         Reviewed by Alexey Proskuryakov.
1555
1556         No new tests. This is just code cleanup.
1557
1558         * rendering/RenderObject.cpp:
1559         (WebCore::RenderObject::containingBlock):
1560
1561 2013-03-11  Adam Barth  <abarth@webkit.org>
1562
1563         Unreviewed attempt to fix build after http://trac.webkit.org/changeset/145421.
1564
1565         * html/HTMLPlugInImageElement.cpp:
1566
1567 2013-03-05  Ojan Vafai  <ojan@chromium.org>
1568
1569         Intrinsic width keyword values don't work for tables
1570         https://bugs.webkit.org/show_bug.cgi?id=111515
1571
1572         Reviewed by Julien Chaffraix.
1573
1574         Tests: fast/css-intrinsic-dimensions/css-tables.html
1575                fast/css-intrinsic-dimensions/tables.html
1576
1577         * rendering/RenderBox.cpp:
1578         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
1579         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1580         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1581         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1582         * rendering/RenderBox.h:
1583         Pass in the border and padding as an argument since RenderTable needs
1584         to pass in a different value. Unfortunately, the math doesn't work out right
1585         in the positioned/replaced cases if we just pass 0. We need to pass in the correct
1586         border and padding and then subtract it from the result.
1587
1588         * rendering/RenderTable.cpp:
1589         (WebCore::RenderTable::updateLogicalWidth):
1590         Compute intrinsic widths as well as specified ones. Down the road
1591         we may want to consider having intrinsic width values return true for
1592         isSpecified.
1593
1594         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
1595         Compute intrinsic widths as well.
1596
1597         (WebCore::RenderTable::computeIntrinsicLogicalWidths):
1598         Implement this method so that the RenderBox::computeIntrinsicLogicalWidthUsing
1599         gets the right intrinsic values instead of the preferred values.
1600
1601         (WebCore::RenderTable::computePreferredLogicalWidths):
1602         * rendering/RenderTable.h:
1603
1604 2013-03-11  Stephen Chenney  <schenney@chromium.org>
1605
1606         HTMLInputElement can delete an ImageLoader while it's still needed
1607         https://bugs.webkit.org/show_bug.cgi?id=110621
1608
1609         Reviewed by Darin Adler.
1610
1611         ImageLoader objects may fire events for HTMLInputElements that are of
1612         type ImageInputType that own the loader. These events may cause script
1613         to run that changes the type of the input element and hence causes the
1614         ImageLoader to be deleted, while the image loader is still processing
1615         the event dispatch. Bad things ensue.
1616
1617         This change moves ownership of the ImageLoader from the ImageInputType
1618         onto the HTMLImageElement which is already protected from deletion during
1619         event processing.
1620
1621         Test: fast/forms/image/image-error-event-modifies-type-crash.html
1622
1623         * html/HTMLInputElement.cpp:
1624         (WebCore::HTMLInputElement::imageLoader): Method to return the
1625           ImageLoader, creating it if not already created.
1626         * html/HTMLInputElement.h:
1627         (WebCore::HTMLInputElement::hasImageLoader): Return true if the
1628           ImageLoader has been created.
1629         (HTMLInputElement): Define ImageLoader access methods and the OwnPtr
1630           for the HTMLImageLoader.
1631         * html/ImageInputType.cpp:
1632         (WebCore::ImageInputType::srcAttributeChanged): Use the element's ImageLoader.
1633         (WebCore::ImageInputType::attach): Use the element's ImageLoader.
1634         (WebCore::ImageInputType::willMoveToNewOwnerDocument): Use the element's ImageLoader.
1635         (WebCore::ImageInputType::height): Use the element's ImageLoader.
1636         (WebCore::ImageInputType::width): Use the element's ImageLoader.
1637         * html/ImageInputType.h:
1638         (ImageInputType): Remove the declaration of the ImageLoader.
1639
1640 2013-03-11  Alok Priyadarshi  <alokp@chromium.org>
1641
1642         Revert "Mark GraphicsLayers as opaque when possible"
1643
1644         This reverts commit 0a4d3c2d8a0373aa9e5bd9209885137a13a7f0e0.
1645
1646         REGRESSION (r143626): http://chainlove.com shows garbage tiles on Mac
1647         https://bugs.webkit.org/show_bug.cgi?id=112043
1648
1649         Unreviewed, rolling out r143626.
1650
1651         * rendering/RenderBox.cpp:
1652         * rendering/RenderBox.h:
1653         (RenderBox):
1654         * rendering/RenderBoxModelObject.h:
1655         (RenderBoxModelObject):
1656         * rendering/RenderLayer.cpp:
1657         * rendering/RenderLayer.h:
1658         (RenderLayer):
1659         * rendering/RenderLayerBacking.cpp:
1660         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1661         * rendering/RenderLayerModelObject.h:
1662         (RenderLayerModelObject):
1663
1664 2013-03-11  Dean Jackson  <dino@apple.com>
1665
1666         Plugins created during user gestures (or soon after) should not be snapshotted
1667         https://bugs.webkit.org/show_bug.cgi?id=111975
1668
1669         Reviewed by Tim Horton.
1670
1671         There are sites which create plugins in response to user actions, such as clicking
1672         on an image that is acting like a poster frame. In those cases we should never snapshot.
1673
1674         There are some other sites which also create plugins in response to user actions,
1675         but don't necessarily create the content themselves. Instead they run some script
1676         that injects an iframe, and the frame loads a plugin. In order to make sure we don't
1677         snapshot in those cases, we're adding the concept of a blessed plugin. Anything that
1678         is created soon after a *handled* user gesture is not snapshotted. To do this we
1679         mark a timestamp in the document when we've called an event listener for a user
1680         gesture. The plugin element then compares its creation time with the most recent
1681         user action time.
1682
1683         * dom/Document.cpp:
1684         (WebCore::Document::Document): Initialise new timestamp.
1685         (WebCore::Document::resetLastHandledUserGestureTimestamp): Sets the member variable
1686             to the current time.
1687         * dom/Document.h:
1688         (WebCore::Document::lastHandledUserGestureTimestamp): Getter.
1689
1690         * dom/EventTarget.cpp:
1691         (WebCore::EventTarget::fireEventListeners): If there were some event listeners and
1692             we were processing a user gesture, then reset the timestamp in the document.
1693
1694         * html/HTMLPlugInImageElement.cpp:
1695         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Remember if we were created
1696             during a user gesture.
1697         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Start the plugin
1698             if we were created during a user gesture, or if we are close enough in time
1699             to a listener that fired in relation to a user gesture.
1700         * html/HTMLPlugInImageElement.h: New private member flag indicating if we were
1701             in a user gesture when constructed.
1702
1703 2013-03-11  Jeffrey Pfau  <jpfau@apple.com>
1704
1705         List cache partitions as units instead of as their contents
1706         https://bugs.webkit.org/show_bug.cgi?id=111909
1707
1708         Reviewed by Maciej Stachowiak.
1709
1710         Not possible to test with current automated test tools, must be tested manually.
1711
1712         * loader/cache/MemoryCache.cpp:
1713         (WebCore::MemoryCache::getOriginsWithCache): List a cache item as a member of a partition, if possible
1714
1715 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
1716
1717         Chromium build fix. Forked files strike again.
1718
1719         * platform/network/chromium/ResourceHandle.cpp:
1720         (WebCore::ResourceHandle::firstRequest):
1721
1722 2013-03-11  James Robinson  <jamesr@chromium.org>
1723
1724         Fix typo from r145399. Rubber stamped by Abhishek Arya.
1725
1726         * rendering/svg/RenderSVGViewportContainer.h:
1727         (WebCore::toRenderSVGViewportContainer):
1728
1729 2013-03-11  Hans Muller  <hmuller@adobe.com>
1730
1731         [CSS Exclusions] Refactor the ExclusionPolygon class to enable storing multiple boundaries
1732         https://bugs.webkit.org/show_bug.cgi?id=111766
1733
1734         Reviewed by Dirk Schulze.
1735
1736         Refactored the ExclusionPolygon class to enable adding support for shape-margin and shape-padding.
1737         Extracted a new FloatPolygon class which is now used by ExclusionPolygon to represent the shape's
1738         boundary. It will be used to add m_paddedPolygon and m_marginPolygon members to ExclusionPolygon
1739         in a subsequent patch.
1740
1741         No new tests. This is strictly a refactoring of the existing code.
1742
1743         * CMakeLists.txt:
1744         * GNUmakefile.list.am:
1745         * WebCore.gypi:
1746         * WebCore.vcproj/WebCore.vcproj:
1747         * WebCore.xcodeproj/project.pbxproj:
1748         * platform/graphics/FloatPolygon.cpp: Factored out of Source/WebCore/rendering/ExclusionPolygon.cpp.
1749         (WebCore::determinant):
1750         (WebCore::areCollinearPoints):
1751         (WebCore::areCoincidentPoints):
1752         (WebCore::isPointOnLineSegment):
1753         (WebCore::nextVertexIndex):
1754         (WebCore::FloatPolygon::FloatPolygon):
1755         (WebCore::FloatPolygon::findNextEdgeVertexIndex):
1756         (WebCore::FloatPolygon::overlappingEdges):
1757         (WebCore::leftSide):
1758         (WebCore::FloatPolygon::contains):
1759         (WebCore::VertexPair::overlapsRect):
1760         (WebCore::VertexPair::intersection):
1761         * platform/graphics/FloatPolygon.h: Factored out of Source/WebCore/rendering/ExclusionPolygon.h.
1762         (FloatPolygon):
1763         (WebCore::FloatPolygon::vertexAt):
1764         (WebCore::FloatPolygon::numberOfVertices):
1765         (WebCore::FloatPolygon::fillRule):
1766         (WebCore::FloatPolygon::edgeAt):
1767         (WebCore::FloatPolygon::numberOfEdges):
1768         (WebCore::FloatPolygon::boundingBox):
1769         (WebCore::FloatPolygon::isEmpty):
1770         (VertexPair):
1771         (WebCore::VertexPair::~VertexPair):
1772         (WebCore::VertexPair::minX):
1773         (WebCore::VertexPair::minY):
1774         (WebCore::VertexPair::maxX):
1775         (WebCore::VertexPair::maxY):
1776         (FloatPolygonEdge):
1777         (WebCore::FloatPolygonEdge::previousEdge):
1778         (WebCore::FloatPolygonEdge::nextEdge):
1779         (WebCore::FloatPolygonEdge::polygon):
1780         (WebCore::FloatPolygonEdge::vertexIndex1):
1781         (WebCore::FloatPolygonEdge::vertexIndex2):
1782         (WebCore::FloatPolygonEdge::edgeIndex):
1783         * rendering/ExclusionPolygon.cpp: Now depends on FloatPolygon.
1784         (EdgeIntersection):
1785         (WebCore::leftSide):
1786         (WebCore::computeXIntersection):
1787         (WebCore::getVertexIntersectionVertices):
1788         (WebCore::computeXIntersections):
1789         (WebCore::computeOverlappingEdgeXProjections):
1790         (WebCore::ExclusionPolygon::getExcludedIntervals):
1791         (WebCore::ExclusionPolygon::getIncludedIntervals):
1792         (WebCore::firstFitRectInPolygon):
1793         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop):
1794         * rendering/ExclusionPolygon.h: Now depends on FloatPolygon.
1795         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge):
1796         (ExclusionPolygon):
1797         (WebCore::ExclusionPolygon::ExclusionPolygon):
1798
1799 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
1800
1801         Roll out part of r144671.
1802
1803         ResourceHandle::firstRequest() should not be const(), because it returns a
1804         non-const reference.        
1805
1806         * platform/network/ResourceHandle.cpp:
1807         (WebCore::ResourceHandle::firstRequest):
1808         * platform/network/ResourceHandle.h:
1809
1810 2013-01-30  Jer Noble  <jer.noble@apple.com>
1811
1812         Mac: Cmd-w should close full screen window.
1813         https://bugs.webkit.org/show_bug.cgi?id=108406
1814
1815         Reviewed by Darin Adler.
1816
1817         Pass performClose: requests on to the owning window controller.
1818
1819         * platform/mac/WebCoreFullScreenWindow.mm:
1820         (-[WebCoreFullScreenWindow performClose:]):
1821
1822 2013-03-11  Xiyuan Xia  <xiyuan@chromium.org>
1823
1824         [Chromium] chromium/linux breaks expectation of select popup background due to bad UA css rules
1825         https://bugs.webkit.org/show_bug.cgi?id=111873
1826
1827         Reviewed by Tony Chang.
1828
1829         On linux the default <select> background color is too dark to use as the
1830         popup background color.  Last fixes:
1831         https://bugs.webkit.org/show_bug.cgi?id=54115 and
1832         https://bugs.webkit.org/show_bug.cgi?id=56023
1833         attempt to fix the problem by applying a lighter background using
1834         special <option> selector. This breaks expectations of some websites.
1835
1836         This CL reverts the bad UA css rules above and provides the lighter
1837         background color if <select> and <option> elements are using the default
1838         background.
1839
1840         No new tests, this tests <select> popups and can be verified by ManualTests/select-scroll.html.
1841
1842         * css/themeChromiumLinux.css:
1843         (select):
1844         * platform/PopupMenuStyle.h:
1845         (WebCore::PopupMenuStyle::PopupMenuStyle):
1846         (WebCore::PopupMenuStyle::backgroundColorType):
1847         (PopupMenuStyle):
1848         * platform/chromium/PopupListBox.cpp:
1849         (WebCore::PopupListBox::paintRow):
1850         * rendering/RenderMenuList.cpp:
1851         (WebCore::RenderMenuList::itemStyle):
1852         (WebCore::RenderMenuList::getItemBackgroundColor):
1853         * rendering/RenderMenuList.h:
1854         (RenderMenuList):
1855         * rendering/RenderSearchField.cpp:
1856         (WebCore::RenderSearchField::menuStyle):
1857         * rendering/RenderThemeChromiumDefault.cpp:
1858         (WebCore::RenderThemeChromiumDefault::systemColor):
1859
1860 2013-03-11  James Robinson  <jamesr@chromium.org>
1861
1862         Compile fix. Rubber-stamp by Eric Seidel.
1863
1864         * html/shadow/MediaControlElements.cpp:
1865         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1866
1867 2013-03-11  Dima Gorbik  <dgorbik@apple.com>
1868
1869         Fix build for r145397 (part 2)
1870
1871         Unreviewed.
1872
1873         * html/track/TextTrackCue.cpp:
1874         (WebCore::TextTrackCue::getDisplayTree):
1875
1876 2013-03-11  Dima Gorbik  <dgorbik@apple.com>
1877
1878         Fix build for r145397
1879
1880         Unreviewed.
1881
1882         * html/shadow/MediaControls.cpp:
1883         (WebCore::MediaControls::createTextTrackDisplay):
1884         * html/shadow/MediaControlsChromium.cpp:
1885         (WebCore::MediaControlsChromium::createTextTrackDisplay):
1886         * html/shadow/MediaControlsGtk.cpp:
1887         (WebCore::MediaControlsGtk::createTextTrackDisplay):
1888
1889 2013-03-11  Abhishek Arya  <inferno@chromium.org>
1890
1891         Add ASSERT_WITH_SECURITY_IMPLICATION to catch bad casts.
1892         https://bugs.webkit.org/show_bug.cgi?id=112060
1893
1894         Reviewed by Eric Seidel.
1895
1896         * Modules/geolocation/Geolocation.cpp:
1897         (WebCore::Geolocation::document):
1898         * accessibility/AccessibilityMenuList.h:
1899         (WebCore::toAccessibilityMenuList):
1900         * accessibility/AccessibilityNodeObject.h:
1901         (WebCore::toAccessibilityNodeObject):
1902         * accessibility/AccessibilityRenderObject.h:
1903         (WebCore::toAccessibilityRenderObject):
1904         * accessibility/AccessibilitySVGRoot.h:
1905         (WebCore::toAccessibilitySVGRoot):
1906         * accessibility/AccessibilitySpinButton.h:
1907         (WebCore::toAccessibilitySpinButton):
1908         (WebCore::toAccessibilitySpinButtonPart):
1909         * accessibility/AccessibilityTable.h:
1910         (WebCore::toAccessibilityTable):
1911         * css/StyleRule.h:
1912         (WebCore::toStyleRuleMedia):
1913         (WebCore::toStyleRuleSupports):
1914         (WebCore::toStyleRuleRegion):
1915         * dom/EventContext.h:
1916         (WebCore::toTouchEventContext):
1917         * fileapi/File.h:
1918         (WebCore::toFile):
1919         * html/HTMLElement.cpp:
1920         (WebCore::HTMLElement::insertAdjacentElement):
1921         (WebCore::contextElementForInsertion):
1922         * html/HTMLMediaElement.h:
1923         (WebCore::toMediaElement):
1924         * html/HTMLMeterElement.h:
1925         (WebCore::toHTMLMeterElement):
1926         * html/HTMLOptionElement.cpp:
1927         (WebCore::toHTMLOptionElement):
1928         * html/HTMLProgressElement.cpp:
1929         (WebCore::HTMLProgressElement::renderProgress):
1930         * html/HTMLProgressElement.h:
1931         (WebCore::toHTMLProgressElement):
1932         * html/HTMLSelectElement.h:
1933         (WebCore::toHTMLSelectElement):
1934         * html/HTMLTableCellElement.cpp:
1935         (WebCore::toHTMLTableCellElement):
1936         * html/HTMLTextFormControlElement.h:
1937         (WebCore::toHTMLTextFormControlElement):
1938         * html/PluginDocument.h:
1939         (WebCore::toPluginDocument):
1940         * html/shadow/DetailsMarkerControl.cpp:
1941         (WebCore::DetailsMarkerControl::summaryElement):
1942         * html/shadow/HTMLContentElement.h:
1943         (WebCore::toHTMLContentElement):
1944         * html/shadow/HTMLShadowElement.h:
1945         (WebCore::toHTMLShadowElement):
1946         * html/shadow/TextFieldDecorationElement.cpp:
1947         (WebCore::TextFieldDecorationElement::hostInput):
1948         * page/DOMWindow.cpp:
1949         (WebCore::DOMWindow::document):
1950         * rendering/InlineTextBox.h:
1951         (WebCore::toInlineTextBox):
1952         * rendering/RenderHTMLCanvas.h:
1953         (WebCore::toRenderHTMLCanvas):
1954         * rendering/RenderScrollbar.h:
1955         (WebCore::toRenderScrollbar):
1956         * rendering/RenderTextFragment.h:
1957         (WebCore::toRenderTextFragment):
1958         * rendering/mathml/RenderMathMLOperator.h:
1959         (WebCore::toRenderMathMLOperator):
1960         * rendering/svg/RenderSVGTextPath.h:
1961         (WebCore::toRenderSVGTextPath):
1962         * rendering/svg/RenderSVGViewportContainer.h:
1963         (WebCore::toRenderSVGViewportContainer):
1964         * svg/graphics/SVGImageChromeClient.h:
1965         (WebCore::toSVGImageChromeClient):
1966
1967 2013-03-11  Adam Barth  <abarth@webkit.org>
1968
1969         Factor HTMLTreeBuilderSimulator out of BackgroundHTMLParser
1970         https://bugs.webkit.org/show_bug.cgi?id=112057
1971
1972         Reviewed by Eric Seidel.
1973
1974         Simulating the HTML tree builder is a separate concern from parsing on
1975         the background thread. We plan to re-use the tree builder simulator for
1976         the view-source parser, for example. Also, having the simulator as a
1977         separate object will make it easier to fix
1978         https://bugs.webkit.org/show_bug.cgi?id=109764.
1979
1980         * CMakeLists.txt:
1981         * GNUmakefile.list.am:
1982         * Target.pri:
1983         * WebCore.gypi:
1984         * WebCore.vcproj/WebCore.vcproj:
1985         * html/parser/BackgroundHTMLParser.cpp:
1986         (WebCore):
1987         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
1988         (WebCore::BackgroundHTMLParser::pumpTokenizer):
1989         * html/parser/BackgroundHTMLParser.h:
1990         (BackgroundHTMLParser):
1991
1992 2013-02-26  Dima Gorbik  <dgorbik@apple.com>
1993
1994         Not all properties apply to the '::cue' pseudo-element
1995         https://bugs.webkit.org/show_bug.cgi?id=110705
1996
1997         Reviewed by Eric Carlson.
1998
1999         Background properties are not inherited and they were not applied to right elements.
2000         Now we apply all ::cue properties to WebVTT cue background box, which -webkit-media-text-track-all-nodes
2001         container was corresponding to. Now it has 'cue' pseudoId instead of '-webkit-media-text-track-all-nodes'.
2002         Property filtering is turned off for user agent rules so that we are still able to apply filtered rules
2003         to this container internally. m_cueContainer is removed because it is no longer needed.
2004         m_allDocumentNodes container was renamed to m_cueBackgroundBox.
2005
2006         Existing tests modified to cover this case.
2007
2008         * css/RuleSet.h:
2009         (WebCore::RuleData::propertyWhitelistType): disable filtering for UA rules.
2010         * css/StyleResolver.cpp:
2011         (WebCore::StyleResolver::sortAndTransferMatchedRules): pass the UA scope to propertyWhitelistType().
2012         * css/mediaControls.css: rename -webkit-media-text-track-all-nodes to 'cue'
2013         (video::cue): 
2014         * html/shadow/MediaControlElements.cpp:
2015         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2016         * html/shadow/MediaControlElements.h:
2017         (MediaControlTextTrackContainerElement):
2018         * html/shadow/MediaControls.cpp:
2019         (WebCore::MediaControls::createTextTrackDisplay):
2020         * html/shadow/MediaControlsChromium.cpp:
2021         (WebCore::MediaControlsChromium::createTextTrackDisplay):
2022         * html/shadow/MediaControlsGtk.cpp:
2023         (WebCore::MediaControlsGtk::createTextTrackDisplay):
2024         * html/track/TextTrackCue.cpp:
2025         (WebCore::TextTrackCue::TextTrackCue):
2026         (WebCore::TextTrackCue::updateDisplayTree):
2027         (WebCore::TextTrackCue::getDisplayTree):
2028         * html/track/TextTrackCue.h:
2029         (WebCore::TextTrackCue::element):
2030         * page/CaptionUserPreferencesMac.mm:
2031         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride):
2032
2033 2013-03-11  Tim Horton  <timothy_horton@apple.com>
2034
2035         ChromeClient.h doesn’t need to include RenderSnapshottedPlugIn
2036         https://bugs.webkit.org/show_bug.cgi?id=111981
2037
2038         Reviewed by Kentaro Hara.
2039
2040         * page/ChromeClient.h: Remove the extraneous #include.
2041
2042 2013-03-11  David Hyatt  <hyatt@apple.com>
2043
2044         Vertical writing doesn't work with form controls.
2045         https://bugs.webkit.org/show_bug.cgi?id=70211
2046
2047         Reviewed by Simon Fraser.
2048
2049         This is just some basic plumbing work to make textfields and
2050         textareas work with vertical writing modes. This patch leaves the
2051         html.css override alone, so authors can't enable vertical
2052         writing yet.
2053         
2054         The changes consist of converting uses of x/y/width/height to
2055         logicalLeft/Top/Width/Height.
2056       
2057         * rendering/RenderBoxModelObject.h:
2058         (WebCore::RenderBoxModelObject::paddingLogicalLeft):
2059         (WebCore::RenderBoxModelObject::paddingLogicalRight):
2060         (RenderBoxModelObject):
2061         (WebCore::RenderBoxModelObject::marginLogicalHeight):
2062         (WebCore::RenderBoxModelObject::marginLogicalWidth):
2063         * rendering/RenderSearchField.cpp:
2064         (WebCore::RenderSearchField::computeControlLogicalHeight):
2065         (WebCore::RenderSearchField::computeLogicalHeightLimit):
2066         (WebCore::RenderSearchField::centerContainerIfNeeded):
2067         * rendering/RenderSearchField.h:
2068         (RenderSearchField):
2069         * rendering/RenderTextControl.cpp:
2070         (WebCore::RenderTextControl::textBlockLogicalHeight):
2071         (WebCore::RenderTextControl::textBlockLogicalWidth):
2072         (WebCore::RenderTextControl::computeLogicalHeight):
2073         (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
2074         (WebCore::RenderTextControl::computePreferredLogicalWidths):
2075         * rendering/RenderTextControl.h:
2076         (RenderTextControl):
2077         * rendering/RenderTextControlMultiLine.cpp:
2078         (WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
2079         (WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):
2080         (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
2081         * rendering/RenderTextControlMultiLine.h:
2082         (RenderTextControlMultiLine):
2083         * rendering/RenderTextControlSingleLine.cpp:
2084         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
2085         (WebCore::RenderTextControlSingleLine::paint):
2086         (WebCore::RenderTextControlSingleLine::computeLogicalHeightLimit):
2087         (WebCore::RenderTextControlSingleLine::layout):
2088         (WebCore::RenderTextControlSingleLine::styleDidChange):
2089         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
2090         (WebCore::RenderTextControlSingleLine::computeControlLogicalHeight):
2091         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
2092         * rendering/RenderTextControlSingleLine.h:
2093         (RenderTextControlSingleLine):
2094         * rendering/style/RenderStyle.h:
2095
2096 2013-03-11  Tim Horton  <timothy_horton@apple.com>
2097
2098         TiledBacking scrolling coverage can be unfairly limited for clients who do scrolling outside the web view
2099         https://bugs.webkit.org/show_bug.cgi?id=111958
2100         <rdar://problem/13356896>
2101
2102         Reviewed by Darin Adler.
2103
2104         Don't limit TiledBacking coverage if the client has opted into using
2105         its exposed rect to allow scrolling above the web view.
2106
2107         * platform/graphics/TiledBacking.h:
2108         * platform/graphics/ca/mac/TileController.h:
2109         * rendering/RenderLayerBacking.cpp:
2110         (WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
2111
2112 2013-03-11  Rajeev Sarvaria  <rsarvaria@blackberry.com>
2113
2114         GetnUniform*vEXT (Robustness extension) passed incorrect parameter in WebGLRenderingContext
2115         https://bugs.webkit.org/show_bug.cgi?id=111450
2116
2117         Reviewed by Rob Buis.
2118
2119         Bufsize argument corrected to size in bytes instead of number of integers or floats.
2120
2121         * html/canvas/WebGLRenderingContext.cpp:
2122         (WebCore):
2123         (WebCore::WebGLRenderingContext::getUniform):
2124
2125 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2126
2127         Unreviewed, rolling out r145375.
2128         http://trac.webkit.org/changeset/145375
2129         https://bugs.webkit.org/show_bug.cgi?id=112050
2130
2131         Does not compile (Requested by jamesr on #webkit).
2132
2133         * Modules/indexeddb/IDBBackingStore.cpp:
2134         (WebCore::IDBBackingStore::getObjectStores):
2135         (WebCore::IDBBackingStore::createObjectStore):
2136         (WebCore::IDBBackingStore::deleteObjectStore):
2137         (WebCore::IDBBackingStore::getRecord):
2138         (WebCore::IDBBackingStore::putRecord):
2139         (WebCore::IDBBackingStore::clearObjectStore):
2140         (WebCore::IDBBackingStore::deleteRecord):
2141         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
2142         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
2143         (WebCore::IDBBackingStore::keyExistsInObjectStore):
2144         (WebCore::IDBBackingStore::getIndexes):
2145         (WebCore::IDBBackingStore::createIndex):
2146         (WebCore::IDBBackingStore::deleteIndex):
2147         (WebCore::IDBBackingStore::putIndexDataForRecord):
2148         (WebCore::IDBBackingStore::findKeyInIndex):
2149         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
2150         (WebCore::IDBBackingStore::keyExistsInIndex):
2151         (WebCore::indexCursorOptions):
2152         * Modules/indexeddb/IDBBackingStore.h:
2153         (IDBBackingStore):
2154         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2155         (WebCore::DeleteIndexOperation::create):
2156         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
2157         (DeleteIndexOperation):
2158         (WebCore::IDBDatabaseBackendImpl::openInternal):
2159         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
2160         (WebCore::DeleteIndexOperation::perform):
2161         (WebCore::DeleteRangeOperation::perform):
2162         (WebCore::ClearOperation::perform):
2163         * Modules/indexeddb/IDBLevelDBCoding.cpp:
2164         (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
2165         (WebCore::IDBLevelDBCoding::KeyPrefix::encode):
2166         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
2167         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
2168         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
2169         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
2170         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
2171         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
2172         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
2173         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
2174         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
2175         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
2176         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
2177         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
2178         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
2179         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
2180         * Modules/indexeddb/IDBLevelDBCoding.h:
2181         (IDBLevelDBCoding):
2182         (KeyPrefix):
2183         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2184         (WebCore::IDBObjectStoreBackendImpl::IndexWriter::writeIndexKeys):
2185
2186 2013-03-11  Adam Klein  <adamk@chromium.org>
2187
2188         MutationCallback should be a WebIDL 'callback', not a [Callback] interface
2189         https://bugs.webkit.org/show_bug.cgi?id=91406
2190
2191         Reviewed by Adam Barth.
2192
2193         Spec: http://dom.spec.whatwg.org/#mutationcallback
2194
2195         Besides no longer calling handleEvent methods on passed-in objects,
2196         throw a TypeError if a non-function is passed to the MutationObserver constructor.
2197         This is per WebIDL: http://www.w3.org/TR/WebIDL/#es-callback-function
2198
2199         Updated MutationObserver constructor tests to exercise TypeError-throwing behavior.
2200
2201         * bindings/js/JSMutationCallback.cpp:
2202         (WebCore::JSMutationCallback::call): Call the callback directly instead of handing off to JSCallbackData; make return value void.
2203         Use jsArray() to convert from WTF::Vector -> JSArray.
2204         * bindings/js/JSMutationCallback.h:
2205         (JSMutationCallback): Rename handleEvent() to call(), make it void.
2206         * bindings/js/JSMutationObserverCustom.cpp:
2207         (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): Throw if passed a non-function.
2208         * bindings/v8/V8MutationCallback.cpp:
2209         (WebCore::V8MutationCallback::V8MutationCallback): Take a v8::Function instead of a v8::Object.
2210         (WebCore::V8MutationCallback::call): Call the callback directly instead of handing off to invokeCallback(); make return value void.
2211         Use v8Array() to convert form WTF::Vector -> JSArray.
2212         * bindings/v8/V8MutationCallback.h:
2213         (WebCore::V8MutationCallback::create): Take a v8::Function instead of a v8::Object.
2214         (V8MutationCallback): ditto
2215         * bindings/v8/custom/V8MutationObserverCustom.cpp:
2216         (WebCore::V8MutationObserver::constructorCustom): Throw if passed a non-function, cast to a v8::Function when constructing callback.
2217         * dom/MutationCallback.h:
2218         (WebCore): Remove unnecessary typedef.
2219         (MutationCallback): Rename handleEvent() to call(), make it void.
2220         * dom/MutationObserver.cpp:
2221         (WebCore::MutationObserver::deliver): Update MutationCallback method name.
2222
2223 2013-03-11  Julien Chaffraix  <jchaffraix@webkit.org>
2224
2225         [CSS Grid Layout] Handle spanning grid items over specified grid tracks
2226         https://bugs.webkit.org/show_bug.cgi?id=111918
2227
2228         Reviewed by Tony Chang.
2229
2230         This change updates the containing block override logic to handle multiple
2231         spanned tracks. This makes the multiple specified grid tracks case work and
2232         will enable us to handle the minmax case once the computation logic has been
2233         updated.
2234
2235         Test: fast/css-grid-layout/grid-item-spanning-resolution.html
2236
2237         * rendering/RenderGrid.cpp:
2238         (WebCore::RenderGrid::logicalContentHeightForChild):
2239         (WebCore::RenderGrid::layoutGridItems):
2240         Updated these functions to use gridAreaBreadthForChild.
2241
2242         (WebCore::RenderGrid::gridAreaBreadthForChild):
2243         Added this helper function to handle multiple spanned grid tracks.
2244
2245         * rendering/RenderGrid.h: Added the previous function.
2246
2247 2013-03-11  Philip Rogers  <pdr@google.com>
2248
2249         Replace SVG's static_cast<SVGElement> with toSVGElement()
2250         https://bugs.webkit.org/show_bug.cgi?id=111651
2251
2252         Reviewed by Abhishek Arya.
2253
2254         toSVGElement is preferred over static_cast because bad casts can be caught on
2255         our testing infrastructure. This patch replaces all static_cast<SVGElement>
2256         instances with toSVGElement.
2257
2258         No new tests as this is just a refactoring.
2259
2260         * css/CSSCursorImageValue.cpp:
2261         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
2262         * css/StyleResolver.cpp:
2263         (WebCore::StyleResolver::matchAllRules):
2264         (WebCore::StyleResolver::locateCousinList):
2265         (WebCore::StyleResolver::canShareStyleWithElement):
2266         (WebCore::StyleResolver::locateSharedStyle):
2267         * dom/Element.cpp:
2268         (WebCore::Element::synchronizeAllAttributes):
2269         (WebCore::Element::synchronizeAttribute):
2270         * rendering/svg/RenderSVGModelObject.cpp:
2271         (WebCore::getElementCTM):
2272         (WebCore::RenderSVGModelObject::checkIntersection):
2273         (WebCore::RenderSVGModelObject::checkEnclosure):
2274         * rendering/svg/RenderSVGResource.cpp:
2275         (WebCore::removeFromCacheAndInvalidateDependencies):
2276         * rendering/svg/RenderSVGResourceClipper.cpp:
2277         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
2278         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
2279         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
2280         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
2281         * rendering/svg/RenderSVGResourceFilter.cpp:
2282         (WebCore::RenderSVGResourceFilter::buildPrimitives):
2283         * rendering/svg/RenderSVGResourceMasker.cpp:
2284         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
2285         (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
2286         * rendering/svg/RenderSVGResourcePattern.cpp:
2287         (WebCore::RenderSVGResourcePattern::createTileImage):
2288         * rendering/svg/RenderSVGShape.cpp:
2289         (WebCore::RenderSVGShape::strokeWidth):
2290         * rendering/svg/RenderSVGText.cpp:
2291         (WebCore::RenderSVGText::strokeBoundingBox):
2292         * rendering/svg/SVGRenderSupport.cpp:
2293         (WebCore::SVGRenderSupport::layoutChildren):
2294         (WebCore::SVGRenderSupport::applyStrokeStyleToContext):
2295         * rendering/svg/SVGRenderTreeAsText.cpp:
2296         (WebCore::writeSVGPaintingResource):
2297         (WebCore::writeStyle):
2298         (WebCore::operator<<):
2299         * rendering/svg/SVGResources.cpp:
2300         (WebCore::SVGResources::buildCachedResources):
2301         * rendering/svg/SVGTextLayoutEngine.cpp:
2302         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
2303         * svg/SVGAElement.cpp:
2304         (WebCore::SVGAElement::createRenderer):
2305         * svg/SVGAnimationElement.cpp:
2306         (WebCore::SVGAnimationElement::adjustForInheritance):
2307         * svg/SVGElement.cpp:
2308         (WebCore::SVGElement::viewportElement):
2309         (WebCore::SVGElement::haveLoadedRequiredResources):
2310         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
2311         (WebCore::SVGElement::childShouldCreateRenderer):
2312         * svg/SVGElement.h:
2313         (WebCore::toSVGElement):
2314         (WebCore):
2315         * svg/SVGFEImageElement.cpp:
2316         (WebCore::SVGFEImageElement::buildPendingResource):
2317         * svg/SVGFilterElement.cpp:
2318         (WebCore::SVGFilterElement::childShouldCreateRenderer):
2319         * svg/SVGGradientElement.cpp:
2320         (WebCore::SVGGradientElement::buildStops):
2321         * svg/SVGLocatable.cpp:
2322         (WebCore::SVGLocatable::nearestViewportElement):
2323         (WebCore::SVGLocatable::farthestViewportElement):
2324         (WebCore::SVGLocatable::computeCTM):
2325         * svg/SVGMPathElement.cpp:
2326         (WebCore::SVGMPathElement::buildPendingResource):
2327         * svg/SVGSVGElement.cpp:
2328         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
2329         * svg/SVGStyledElement.cpp:
2330         (WebCore::SVGStyledElement::updateRelativeLengthsInformation):
2331         * svg/SVGSwitchElement.cpp:
2332         (WebCore::SVGSwitchElement::childShouldCreateRenderer):
2333         * svg/SVGTextPathElement.cpp:
2334         (WebCore::SVGTextPathElement::buildPendingResource):
2335         * svg/SVGUseElement.cpp:
2336         (WebCore::SVGUseElement::buildPendingResource):
2337         (WebCore::SVGUseElement::toClipPath):
2338         (WebCore::SVGUseElement::rendererClipChild):
2339         (WebCore::SVGUseElement::buildInstanceTree):
2340         (WebCore::SVGUseElement::hasCycleUseReferencing):
2341         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2342         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
2343         * svg/SVGViewSpec.cpp:
2344         (WebCore::SVGViewSpec::viewTarget):
2345         * svg/animation/SVGSMILElement.cpp:
2346         (WebCore::SVGSMILElement::buildPendingResource):
2347         * svg/graphics/filters/SVGFEImage.cpp:
2348         (WebCore::FEImage::platformApplySoftware):
2349
2350 2013-03-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2351
2352         [SOUP] ResourceRequest::updateSoupMessage doesn't update the URI of the soup message
2353         https://bugs.webkit.org/show_bug.cgi?id=112040
2354
2355         Reviewed by Gustavo Noronha Silva.
2356
2357         * platform/network/soup/ResourceRequestSoup.cpp:
2358         (WebCore::ResourceRequest::updateSoupMessage): Update the soup
2359         message URI with the ResourceRequest URL.
2360
2361 2013-03-11  Alec Flett  <alecflett@chromium.org>
2362
2363         IndexedDB: Protect against key prefix overflows
2364         https://bugs.webkit.org/show_bug.cgi?id=111138
2365
2366         Reviewed by Tony Chang.
2367
2368         This reworks the boundary checking for all databaseId,
2369         objectStoreId, and indexId, including negative and
2370         zero-based ids. All entrypoints into IDBLevelDBCoding
2371         are protected with explicit checks and all internal
2372         uses of KeyPrefix are protected with ASSERTs in the
2373         various constructors.
2374
2375         Tests: WebKit unit tests IDBBackingStoreTest.cpp in WebKit/chromium
2376
2377         * Modules/indexeddb/IDBBackingStore.h: Make all public methods boolean-based for errors.
2378         * Modules/indexeddb/IDBLevelDBCoding.h: Add methods for checking databaseId, objectStoreId, and indexId.
2379
2380 2013-03-11  Xan Lopez  <xlopez@igalia.com>
2381
2382         [BlackBerry] PlatformBlackBerry.cmake: create thin AR archives
2383         https://bugs.webkit.org/show_bug.cgi?id=110580
2384
2385         Reviewed by Rob Buis.
2386
2387         Otherwise libwebcore.a goes beyond the 4Gb file size limit and the
2388         link phase fails.
2389
2390         * PlatformBlackBerry.cmake:
2391
2392 2013-03-11  Pavel Feldman  <pfeldman@chromium.org>
2393
2394         Web Inspector: fix styles toolbar in the vertical mode.
2395         Not reviewed: swapped two lines.
2396
2397         * inspector/front-end/ElementsPanel.js:
2398         (WebInspector.ElementsPanel.prototype._splitVertically):
2399
2400 2013-03-11  Andrey Lushnikov  <lushnikov@chromium.org>
2401
2402         Web Inspector: [CodeMirror] add token highlight feature
2403         https://bugs.webkit.org/show_bug.cgi?id=112009
2404
2405         Reviewed by Pavel Feldman.
2406
2407         Handle CodeMirror's "cursorActivity" event, check selection for being
2408         a word and highlight all its occurrences via CodeMirror.addOverlay method.
2409
2410         No new tests.
2411
2412         * inspector/front-end/CodeMirrorTextEditor.js:
2413         (WebInspector.CodeMirrorTextEditor):
2414         (WebInspector.CodeMirrorTextEditor.TokenHighlighter):
2415         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._cursorChange):
2416         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._isWord):
2417         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._removeHighlight):
2418         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight.nextToken):
2419         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight):
2420         * inspector/front-end/cm/cmdevtools.css:
2421         (.cm-token-highlight):
2422
2423 2013-03-11  Andrey Lushnikov  <lushnikov@chromium.org>
2424
2425         Web Inspector: [CodeMirror] set indentation size according to devtools settings
2426         https://bugs.webkit.org/show_bug.cgi?id=111717
2427
2428         Reviewed by Pavel Feldman.
2429
2430         Set up codemirror indent size according to devtools settings.
2431
2432         No new tests.
2433
2434         * inspector/front-end/CodeMirrorTextEditor.js:
2435         (.get if):
2436         (WebInspector.CodeMirrorTextEditor):
2437
2438 2013-03-11  Yury Semikhatsky  <yurys@chromium.org>
2439
2440         Web Inspector: add per image statistics to the native memory snapshot
2441         https://bugs.webkit.org/show_bug.cgi?id=112011
2442
2443         Reviewed by Pavel Feldman.
2444
2445         Added per-image statistics to the native memory distribution table.
2446
2447         * inspector/front-end/HeapSnapshotProxy.js:
2448         (WebInspector.HeapSnapshotWorker):
2449         (WebInspector.HeapSnapshotWorker.prototype.createLoader):
2450         (WebInspector.HeapSnapshotWorker.prototype.wrapCallback):
2451         (WebInspector.HeapSnapshotWorker.prototype.callFactoryMethod):
2452         (WebInspector.HeapSnapshotProxyObject.prototype.callFactoryMethod): the method now accepts
2453         proxy constructor function instead of its name. This eliminates unnecessary function lookup.
2454         (WebInspector.HeapSnapshotLoaderProxy):
2455         (WebInspector.HeapSnapshotLoaderProxy.prototype.close):
2456         (WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
2457         (WebInspector.HeapSnapshotProxy.prototype.createRetainingEdgesProvider):
2458         (WebInspector.HeapSnapshotProxy.prototype.createAddedNodesProvider):
2459         (WebInspector.HeapSnapshotProxy.prototype.createDeletedNodesProvider):
2460         (WebInspector.HeapSnapshotProxy.prototype.createNodesProvider):
2461         (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForClass):
2462         (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForDominator):
2463         (WebInspector.NativeHeapSnapshotProxy):
2464         (WebInspector.NativeHeapSnapshotProxy.prototype.images):
2465         * inspector/front-end/HeapSnapshotView.js:
2466         (WebInspector.HeapProfileHeader.prototype.snapshotProxyConstructor):
2467         (WebInspector.HeapProfileHeader.prototype._setupWorker):
2468         * inspector/front-end/NativeHeapSnapshot.js:
2469         (WebInspector.NativeHeapSnapshot.prototype.images):
2470         * inspector/front-end/NativeMemorySnapshotView.js:
2471         (WebInspector.NativeSnapshotNode):
2472         (WebInspector.NativeSnapshotNode.prototype._createSizeCell):
2473         (WebInspector.NativeSnapshotNode.prototype._populate):
2474         (WebInspector.NativeSnapshotNode.prototype._addChildrenFromGraph):
2475         (WebInspector.NativeSnapshotNode.prototype._addImageDetails.didLoad.didReceiveImages):
2476         (WebInspector.NativeSnapshotNode.prototype._addImageDetails):
2477         (WebInspector.NativeSnapshotProfileHeader.prototype.snapshotProxyConstructor):
2478
2479 2013-03-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2480
2481         [Qt] Enable tiled shadow blur for inset box shadows
2482         https://bugs.webkit.org/show_bug.cgi?id=111736
2483
2484         Reviewed by Noam Rosenthal.
2485
2486         Paint inset box-shadows using the optimized tiled shadow blur, instead of
2487         applying shadow blur to the entire painted rect.
2488
2489         This optimizes the default CSS on common pastebin sites.
2490
2491         Tested by existing tests.
2492
2493         * platform/graphics/GraphicsContext.cpp:
2494         * platform/graphics/ShadowBlur.cpp:
2495         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
2496             Must set fill color before calling clearShadow, as that might clear m_color.
2497         (WebCore::ShadowBlur::drawLayerPieces):
2498             Ditto.
2499         * platform/graphics/qt/GraphicsContextQt.cpp:
2500         (WebCore::GraphicsContext::fillPath):
2501         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2502
2503 2013-03-11  Alberto Garcia  <agarcia@igalia.com>
2504
2505         [BlackBerry] GraphicsLayer: rename notifySyncRequired to notifyFlushRequired
2506         https://bugs.webkit.org/show_bug.cgi?id=111997
2507
2508         Reviewed by Rob Buis.
2509
2510         This changed in r130439 but the old name was introduced again by
2511         mistake in r144465.
2512
2513         * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
2514         (WebCore::GraphicsLayerBlackBerry::notifyFlushRequired):
2515         * platform/graphics/blackberry/LayerWebKitThread.cpp:
2516         (WebCore::LayerWebKitThread::setNeedsCommit):
2517
2518 2013-03-11  Kent Tamura  <tkent@chromium.org>
2519
2520         Inappropriate validation message for required number/date input elements
2521         https://bugs.webkit.org/show_bug.cgi?id=111982
2522
2523         Reviewed by Kentaro Hara.
2524
2525         For validation message, badInput messages should take precedence
2526         over valueMissing messages because users already filled out the
2527         field with a bad value.
2528
2529         Tests: Update fast/forms/validationMessage.html
2530
2531         * html/InputType.cpp:
2532         (WebCore::InputType::validationMessage):
2533         Check badInput first.
2534
2535 2013-03-11  Yury Semikhatsky  <yurys@chromium.org>
2536
2537         Web Inspector: extract common parts of native profiles
2538         https://bugs.webkit.org/show_bug.cgi?id=111965
2539
2540         Reviewed by Alexander Pavlov.
2541
2542         Extracted common parts of native profiles into NativeProfileTypeBase. Memory
2543         domain dispatcher is now a separate class as it is shared by two native memory
2544         profile types.
2545
2546         Both native memory profile types now capture native heap graph.
2547
2548         * inspector/front-end/NativeMemorySnapshotView.js:
2549         (WebInspector.MemoryAgentDispatcher.instance):
2550         (WebInspector.NativeProfileTypeBase.prototype.buttonClicked.didReceiveMemorySnapshot):
2551         (WebInspector.NativeProfileTypeBase.prototype.buttonClicked):
2552         (WebInspector.NativeSnapshotProfileType):
2553         (WebInspector.NativeSnapshotProfileHeader.prototype._didReceiveMemorySnapshot):
2554         (WebInspector.NativeMemoryProfileType):
2555         (WebInspector.NativeMemoryProfileHeader.prototype._updateSnapshotStatus):
2556         (WebInspector.NativeMemoryProfileHeader.prototype._didReceiveMemorySnapshot):
2557
2558 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2559
2560         Unreviewed, rolling out r145349.
2561         http://trac.webkit.org/changeset/145349
2562         https://bugs.webkit.org/show_bug.cgi?id=111966
2563
2564         Missing code history of Element,PageRuleCollector. (Requested
2565         by tasak on #webkit).
2566
2567         * CMakeLists.txt:
2568         * GNUmakefile.list.am:
2569         * Target.pri:
2570         * WebCore.gypi:
2571         * WebCore.xcodeproj/project.pbxproj:
2572         * css/CSSAllInOne.cpp:
2573         * css/DocumentRuleSets.cpp:
2574         (WebCore::ShadowDistributedRules::collectMatchRequests):
2575         * css/DocumentRuleSets.h:
2576         * css/ElementRuleCollector.cpp: Removed.
2577         * css/ElementRuleCollector.h: Removed.
2578         * css/PageRuleCollector.cpp: Removed.
2579         * css/PageRuleCollector.h: Removed.
2580         * css/StyleResolver.cpp:
2581         (WebCore::leftToRightDeclaration):
2582         (WebCore):
2583         (WebCore::rightToLeftDeclaration):
2584         (WebCore::StyleResolver::State::ensureRuleList):
2585         (WebCore::StyleResolver::State::clear):
2586         (WebCore::StyleResolver::addMatchedProperties):
2587         (WebCore::StyleResolver::addElementStyleProperties):
2588         (MatchingUARulesScope):
2589         (WebCore::MatchingUARulesScope::MatchingUARulesScope):
2590         (WebCore::MatchingUARulesScope::~MatchingUARulesScope):
2591         (WebCore::MatchingUARulesScope::isMatchingUARules):
2592         (WebCore::StyleResolver::collectMatchingRules):
2593         (WebCore::StyleResolver::collectMatchingRulesForRegion):
2594         (WebCore::StyleResolver::sortAndTransferMatchedRules):
2595         (WebCore::StyleResolver::matchScopedAuthorRules):
2596         (WebCore::StyleResolver::matchHostRules):
2597         (WebCore::StyleResolver::matchAuthorRules):
2598         (WebCore::StyleResolver::matchUserRules):
2599         (WebCore::StyleResolver::matchUARules):
2600         (WebCore::StyleResolver::collectMatchingRulesForList):
2601         (WebCore::compareRules):
2602         (WebCore::StyleResolver::sortMatchedRules):
2603         (WebCore::StyleResolver::matchAllRules):
2604         (WebCore::StyleResolver::State::initForStyleResolve):
2605         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2606         (WebCore::StyleResolver::styleForElement):
2607         (WebCore::StyleResolver::styleForKeyframe):
2608         (WebCore::StyleResolver::pseudoStyleForElement):
2609         (WebCore::StyleResolver::styleForPage):
2610         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2611         (WebCore::StyleResolver::ruleMatches):
2612         (WebCore::StyleResolver::checkRegionSelector):
2613         (WebCore::comparePageRules):
2614         (WebCore::StyleResolver::matchPageRules):
2615         (WebCore::checkPageSelectorComponents):
2616         (WebCore::StyleResolver::matchPageRulesForList):
2617         (WebCore::StyleResolver::isLeftPage):
2618         (WebCore::StyleResolver::isFirstPage):
2619         (WebCore::StyleResolver::pageName):
2620         * css/StyleResolver.h:
2621         (WebCore::MatchRequest::MatchRequest):
2622         (MatchRequest):
2623         (StyleResolver):
2624         (MatchResult):
2625         (WebCore::StyleResolver::State::State):
2626         (State):
2627         (WebCore::StyleResolver::State::takeRuleList):
2628         (WebCore::StyleResolver::State::setSameOriginOnly):
2629         (WebCore::StyleResolver::State::isSameOriginOnly):
2630         (WebCore::StyleResolver::State::pseudoStyleRequest):
2631         (WebCore::StyleResolver::State::setMode):
2632         (WebCore::StyleResolver::State::mode):
2633         (WebCore::StyleResolver::State::matchedRules):
2634         (WebCore::StyleResolver::State::addMatchedRule):
2635         * inspector/InspectorCSSAgent.cpp:
2636         (WebCore::InspectorCSSAgent::willMatchRule):
2637         * inspector/InspectorCSSAgent.h:
2638         (WebCore):
2639         (InspectorCSSAgent):
2640         * inspector/InspectorInstrumentation.cpp:
2641         (WebCore):
2642         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
2643         * inspector/InspectorInstrumentation.h:
2644         (WebCore):
2645         (InspectorInstrumentation):
2646         (WebCore::InspectorInstrumentation::willMatchRule):
2647
2648 2013-03-11  Marja Hölttä  <marja@chromium.org>
2649
2650         [V8] Fix V8InjectedScriptManager
2651         https://bugs.webkit.org/show_bug.cgi?id=111968
2652
2653         Reviewed by Kentaro Hara.
2654
2655         This is needed to make the inspector work after templates for main world
2656         and non-main worlds are separated (bug 111724).
2657
2658         No new tests (no changes in functionality).
2659
2660         * bindings/v8/custom/V8InjectedScriptManager.cpp:
2661         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
2662
2663 2013-03-11  Hayato Ito  <hayato@chromium.org>
2664
2665         Make sure that CSSSelector::setValue() is never called after parsing its pseudoType.
2666         https://bugs.webkit.org/show_bug.cgi?id=111957
2667
2668         Reviewed by Hajime Morrita.
2669
2670         It'd be nice to have an assertion here since
2671         CSSSelector::pseudoType() will never parse a new value after it
2672         parses a value and m_pseudoType is set to non-PseudoNotParsed.
2673
2674         No new tests (no change in behaviour).
2675
2676         * css/CSSSelector.h:
2677         (WebCore::CSSSelector::setValue):
2678
2679 2013-03-11  Takashi Sakamoto  <tasak@google.com>
2680
2681         [Refactoring] Implement RuleCollector
2682         https://bugs.webkit.org/show_bug.cgi?id=109916
2683
2684         Reviewed by Antti Koivisto.
2685
2686         Implemented rule collector for an element and collector for a page.
2687         Not all members in class State are required entire while resolving
2688         a style.
2689
2690         No new tests, because just refactoring.
2691
2692         * CMakeLists.txt:
2693         * GNUmakefile.list.am:
2694         * Target.pri:
2695         * WebCore.gypi:
2696         * WebCore.xcodeproj/project.pbxproj:
2697         * css/CSSAllInOne.cpp:
2698         Added ElementRuleCollector and PageRuleCollector.
2699         * css/DocumentRuleSets.cpp:
2700         (WebCore::ShadowDistributedRules::collectMatchRequests):
2701         Since behaviorAtBoundary is a state owned by ElementRuleCollector,
2702         removed from here.
2703         * css/DocumentRuleSets.h:
2704         (WebCore::ShadowDistributedRules::isEmpty):
2705         Added to quickly check whether there exist any ShadowDistributedRules
2706         or not.
2707         * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
2708         (WebCore):
2709         (WebCore::ElementRuleCollector::matchedResult):
2710         (WebCore::ElementRuleCollector::matchedRuleList):
2711         (WebCore::ElementRuleCollector::addMatchedRule):
2712         (WebCore::ElementRuleCollector::clearMatchedRules):
2713         (WebCore::ElementRuleCollector::ensureRuleList):
2714         (WebCore::ElementRuleCollector::addElementStyleProperties):
2715         (WebCore::ElementRuleCollector::collectMatchingRules):
2716         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
2717         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
2718         (WebCore::ElementRuleCollector::matchScopedAuthorRules):
2719         (WebCore::ElementRuleCollector::matchHostRules):
2720         (WebCore::ElementRuleCollector::matchShadowDistributedRules):
2721         (WebCore::ElementRuleCollector::matchAuthorRules):
2722         (WebCore::ElementRuleCollector::matchUserRules):
2723         (WebCore::ElementRuleCollector::matchUARules):
2724         (WebCore::ElementRuleCollector::ruleMatches):
2725         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
2726         (WebCore::ElementRuleCollector::sortMatchedRules):
2727         (WebCore::ElementRuleCollector::matchAllRules):
2728         Moved these methods from StyleResolver to this class.
2729         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
2730         This method is used for checking whether a given element can share
2731         a cache.
2732         * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
2733         (WebCore):
2734         (WebCore::ElementRuleCollector::ElementRuleCollector):
2735         Use styleResolver instance to initialize its member variables, i.e.
2736         SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
2737         StyleScopedResolver.
2738         (ElementRuleCollector):
2739         (WebCore::ElementRuleCollector::setMode):
2740         (WebCore::ElementRuleCollector::setPseudoStyleRequest):
2741         (WebCore::ElementRuleCollector::setSameOriginOnly):
2742         (WebCore::ElementRuleCollector::setRegionForStyling):
2743         Mode, SameOriginOnly, RegionForStyling are only used while collecting
2744         matched rules.
2745         (WebCore::ElementRuleCollector::setMedium):
2746         Need to know which default stylesheet should be looked up.
2747         (WebCore::ElementRuleCollector::document):
2748         * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
2749         (WebCore::comparePageRules):
2750         (WebCore::PageRuleCollector::isLeftPage):
2751         (WebCore::PageRuleCollector::isFirstPage):
2752         (WebCore::PageRuleCollector::pageName):
2753         (WebCore::PageRuleCollector::matchAllPageRules):
2754         (WebCore::PageRuleCollector::matchPageRules):
2755         (WebCore::checkPageSelectorComponents):
2756         (WebCore::PageRuleCollector::matchPageRulesForList):
2757         Moved from StyleResolver.
2758         * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
2759         (WebCore):
2760         (WebCore::PageRuleCollector::PageRuleCollector):
2761         (PageRuleCollector):
2762         (WebCore::PageRuleCollector::matchedResult):
2763         * css/StyleResolver.cpp:
2764         (WebCore):
2765         (WebCore::StyleResolver::State::clear):
2766         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
2767         (WebCore::StyleResolver::State::initForStyleResolve):
2768         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2769         (WebCore::StyleResolver::styleForElement):
2770         (WebCore::StyleResolver::styleForKeyframe):
2771         (WebCore::StyleResolver::pseudoStyleForElement):
2772         (WebCore::StyleResolver::styleForPage):
2773         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2774         (WebCore::StyleResolver::applyMatchedProperties):
2775         * css/StyleResolver.h:
2776         (WebCore::MatchRequest::MatchRequest):
2777         Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
2778         state.
2779         (MatchRequest):
2780         (WebCore::StyleResolver::selectorFilter):
2781         Added to obtain SelectorFilter in ElementRuleCollector's constructor.
2782         (StyleResolver):
2783         (MatchResult):
2784         (WebCore::StyleResolver::State::State):
2785         To pass ASSERT in StyleResolver::applyProperties, need to keep
2786         m_regionForStyling.
2787         (State):
2788         (WebCore::StyleResolver::State::regionForStyling):
2789         (WebCore::StyleResolver::State::useSVGZoomRules):
2790         (WebCore::StyleResolver::hasSelectorForId):
2791         (WebCore):
2792         (WebCore::checkRegionSelector):
2793         * inspector/InspectorCSSAgent.cpp:
2794         (WebCore::InspectorCSSAgent::willMatchRule):
2795         Removed StyleResolver from its parameter list. Instead, added
2796         InspectorCSSOMWrappers and DocumentStyleSheetCollection.
2797         * inspector/InspectorCSSAgent.h:
2798         (WebCore):
2799         (InspectorCSSAgent):
2800         * inspector/InspectorInstrumentation.cpp:
2801         (WebCore):
2802         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
2803         * inspector/InspectorInstrumentation.h:
2804         (WebCore):
2805         (InspectorInstrumentation):
2806         (WebCore::InspectorInstrumentation::willMatchRule):
2807
2808 2013-03-11  Mike West  <mkwst@chromium.org>
2809
2810         XSSAuditor doesn't need a copy of the original document's body.
2811         https://bugs.webkit.org/show_bug.cgi?id=111946
2812
2813         Reviewed by Darin Adler.
2814
2815         The XSSAuditor currently copies the original HTTP body of the document
2816         that's being audited in order to include it into a violation report if
2817         reflected XSS is detected. We don't actually need to do this, as we
2818         have access to the original request information from inside the
2819         XSSAuditorDelegate where the report is generated.
2820         XSSAuditorDelegate::didBlockScript ASSERTs that it's running on the
2821         main thread, so it should be safe to reach through the document's
2822         loader to get that information directly, rather than passing it from
2823         thread to thread via XSSInfo object properties.
2824
2825         * html/parser/XSSAuditor.h:
2826         * html/parser/XSSAuditor.cpp:
2827         (WebCore::XSSAuditor::init):
2828         (WebCore::XSSAuditor::filterToken):
2829         (WebCore::XSSAuditor::isSafeToSendToAnotherThread):
2830         * html/parser/XSSAuditorDelegate.h:
2831         (WebCore::XSSInfo::create):
2832         (WebCore::XSSInfo::XSSInfo):
2833         * html/parser/XSSAuditorDelegate.cpp:
2834         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
2835             Drop the XSSInfo and XSSAuditor properties that held an
2836             isolatedCopy of the the original HTTP body. Depending on the
2837             document's size, this could be a significant savings.
2838         (WebCore::XSSAuditorDelegate::didBlockScript):
2839             Reach into the document's loader's original request in order to
2840             grab the body as a String, and feed that into the violation report
2841             object.
2842
2843             As a drive-by, this patch creates a FrameLoader* temporary
2844             variable to minimize repetition in this area of the code. We use
2845             the loader a few times, but should only have to grab it once.
2846
2847 2013-03-11  Silvia Pfeiffer  <silviapf@chromium.org>
2848
2849         [Chromium] REGRESSION: Closed Captions button not showing properly
2850         https://bugs.webkit.org/show_bug.cgi?id=109871
2851
2852         Reviewed by Jer Noble.
2853
2854         No new tests - covered by existing tests.
2855
2856         Most of the patch was in the meantime covered by a patch to
2857         https://bugs.webkit.org/show_bug.cgi?id=111109 .
2858         This changes a static Chromium-only function name to be consistent with
2859         parent class function names.
2860
2861         * rendering/RenderMediaControlsChromium.cpp:
2862         (WebCore::paintMediaToggleClosedCaptionsButton):
2863         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
2864         Rename paintMediaClosedCaptionsButton to paintMediaToggleClosedCaptionsButton.
2865
2866 2013-03-11  Tim Horton  <timothy_horton@apple.com>
2867
2868         RenderSnapshottedPlugIn paints in PaintPhaseBlockBackground instead of PaintPhaseForeground
2869         https://bugs.webkit.org/show_bug.cgi?id=111962
2870         <rdar://problem/13289335>
2871
2872         Reviewed by Dean Jackson.
2873
2874         RenderSnapshottedPlugIn should paint its snapshot during the foreground
2875         painting phase, instead of BlockBackground, to match normal plugin painting.
2876
2877         * rendering/RenderSnapshottedPlugIn.cpp:
2878         (WebCore::RenderSnapshottedPlugIn::paint):
2879
2880 2013-03-07  Alexander Pavlov  <apavlov@chromium.org>
2881
2882         Web Inspector: [Elements] XSLT transformation result from the xml-stylesheet PI not rendered
2883         https://bugs.webkit.org/show_bug.cgi?id=111313
2884
2885         Reviewed by Vsevolod Vlasov.
2886
2887         Frame document update upon XSL transformation was never instrumented.
2888         This change instruments the Document::applyXSLTransform() method to that end.
2889
2890         Test: http/tests/inspector/styles/xsl-transformed.xml
2891
2892         * dom/Document.cpp:
2893         (WebCore::Document::applyXSLTransform): Instrumented.
2894         * inspector/InspectorDOMAgent.cpp:
2895         (WebCore::InspectorDOMAgent::frameDocumentUpdated): Invoked upon applyXSLTransform().
2896         * inspector/InspectorDOMAgent.h:
2897         * inspector/InspectorInstrumentation.cpp:
2898         (WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl): Added.
2899         * inspector/InspectorInstrumentation.h:
2900         (WebCore::InspectorInstrumentation::didCommitLoad): Drive-by: simplified.
2901         (WebCore::InspectorInstrumentation::frameDocumentUpdated): Added.
2902
2903 2013-03-10  Matt Falkenhagen  <falken@chromium.org>
2904
2905         Implement inert subtrees needed for modal <dialog>
2906         https://bugs.webkit.org/show_bug.cgi?id=110952
2907
2908         Reviewed by Hajime Morrita.
2909
2910         This changes Node::disabled() to return true when a modal dialog is
2911         open and the node is not in the dialog.
2912
2913         Reusing disabled for inertness is useful because then event
2914         targeting and focus control automatically have the desired behavior:
2915         inert nodes are skipped over.
2916
2917         Tests: fast/dom/HTMLDialogElement/closed-dialog-does-not-block-mouse-events.html
2918                fast/dom/HTMLDialogElement/modal-dialog-blocks-mouse-events.html
2919                fast/dom/HTMLDialogElement/non-modal-dialog-does-not-block-mouse-events.html
2920
2921         * dom/Document.h:
2922         (WebCore::Document::activeModalDialog): Returns the topmost element in the top layer.
2923         Since now the only elements in the top layer are modal dialogs, it is the active modal dialog.
2924         * dom/Node.cpp:
2925         (WebCore):
2926         (WebCore::Node::isInert): As per the spec, a node that is not an ancestor or descendant of the modal dialog is inert.
2927         (WebCore::Node::disabled): Return false when inert.
2928         * dom/Node.h:
2929         * html/HTMLFormControlElement.cpp:
2930         (WebCore::HTMLFormControlElement::disabled): Fall back to the superclass so inert is taken into account.
2931
2932 2013-03-10  Glenn Adams  <glenn@skynav.com>
2933
2934         Line breaking opportunities at the end of a text node are missed
2935         https://bugs.webkit.org/show_bug.cgi?id=17427
2936
2937         Reviewed by Darin Adler.
2938
2939         When initializing context for determining next break position,
2940         reuse last two characters from previous text node(s) within block.
2941         This additional state is stored in the current LazyLineBreakIterator
2942         as an optimization to prevent having to add two new parameters to
2943         isBreakable().
2944
2945         At present, this fixes only the ASCII shortcut code path, but
2946         does not yet handle the non-ASCII path. Since the ASCII path is
2947         the most performant critical, the handling of this latter path
2948         will be addressed by webkit.org/b/105692.
2949
2950         Additionally test for case where last two characters context
2951         is derived from distinct nodes, possibly with intervening empty
2952         inline node(s).
2953
2954         Test: fast/text/line-break-between-text-nodes.html
2955
2956         * platform/text/TextBreakIterator.h:
2957         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
2958         (WebCore::LazyLineBreakIterator::lastCharacter):
2959         (WebCore::LazyLineBreakIterator::secondToLastCharacter):
2960         (WebCore::LazyLineBreakIterator::setLastTwoCharacters):
2961         (WebCore::LazyLineBreakIterator::resetLastTwoCharacters):
2962         (WebCore::LazyLineBreakIterator::updateLastTwoCharacters):
2963         (LazyLineBreakIterator):
2964         Add state variables to retain last two characters of previous text node(s)
2965         for reuse when initializing nextBreakPosition<>() context.
2966         * rendering/RenderBlockLineLayout.cpp:
2967         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2968         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2969         Record and reset retained last two characters of previous text node(s) as
2970         appropriate.
2971         * rendering/break_lines.cpp:
2972         (WebCore::nextBreakablePosition):
2973         Use state variables holding retained last two characters of previous text node(s)
2974         for when initializing nextBreakPosition<>() context.
2975
2976 2013-03-10  Darin Adler  <darin@apple.com>
2977
2978         NetworkStorageSession leaks its CFURLStorageSessionRef
2979         https://bugs.webkit.org/show_bug.cgi?id=111950
2980         <rdar://problem/13384134>
2981
2982         Reviewed by Sam Weinig.
2983
2984         * platform/network/NetworkStorageSession.h:
2985         Change the argument type of the constructor to a RetainPtr.
2986         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2987         (WebCore::NetworkStorageSession::NetworkStorageSession): Changed
2988         the argument type to a RetainPtr.
2989         (WebCore::NetworkStorageSession::switchToNewTestingSession): Added
2990         calls to adoptCF to adopt the value returned by wkCreatePrivateStorageSession.
2991         (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Ditto.
2992         (WebCore::NetworkStorageSession::cookieStorage): Changed to use adoptCF
2993         instead of the RetainPtr constructor with AdoptCF since the former is
2994         far easier to read.
2995
2996 2013-03-10  Jason Anderssen  <janderssen@gmail.com>
2997
2998         Conformance Test 1.0.3 (Beta) function: bufferData undefined value failed.
2999         https://bugs.webkit.org/show_bug.cgi?id=111641
3000
3001         Reviewed by Dean Jackson.
3002
3003         The WebGL specification requires that a size of 0 is not valid. In javascript, passing in undefined 
3004         as a parameter to a long long is the same as passing in 0, so we must check for this incorrect
3005         value and fail. 
3006         The test suite in Kronos 1.0.3 failed, test to verify conformance is as follows:
3007         https://www.khronos.org/registry/webgl/sdk/tests/conformance/more/functions/bufferDataBadArgs.html.
3008
3009         * html/canvas/WebGLRenderingContext.cpp:
3010         (WebCore::WebGLRenderingContext::bufferData):
3011         Synthesize error and returned if size is 0.
3012
3013 2013-03-10  Andreas Kling  <akling@apple.com>
3014
3015         SVGDocumentExtensions should use OwnPtr for pending resource maps.
3016         <http://webkit.org/b/111943>
3017
3018         Reviewed by Anders Carlsson.
3019
3020         * svg/SVGDocumentExtensions.cpp:
3021         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
3022         (WebCore::SVGDocumentExtensions::addPendingResource):
3023         (WebCore::SVGDocumentExtensions::isElementPendingResources):
3024         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
3025         (WebCore::SVGDocumentExtensions::removePendingResource):
3026         (WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
3027         (WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval):
3028         * svg/SVGDocumentExtensions.h:
3029         (SVGDocumentExtensions):
3030
3031 2013-03-10  Tim Horton  <timothy_horton@apple.com>
3032
3033         Add a heuristic to determine the “primary” snapshotted plugin
3034         https://bugs.webkit.org/show_bug.cgi?id=111932
3035         <rdar://problem/13270208>
3036
3037         Reviewed by Dean Jackson.
3038
3039         * WebCore.exp.in: Export a few things.
3040         * html/HTMLPlugInImageElement.cpp:
3041         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
3042         (WebCore::classNameForShadowRoot): If we've been informed that we are the primary snapshotted plugin, add the 'primary' class.
3043         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Added
3044         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Hand classNameForShadowRoot our primary-ness.
3045         * html/HTMLPlugInImageElement.h:
3046         (HTMLPlugInImageElement): Add storage for m_isPrimarySnapshottedPlugIn.
3047
3048 2013-03-10  Mike West  <mkwst@chromium.org>
3049
3050         XSSAuditor doesn't need a copy of the original document URL.
3051         https://bugs.webkit.org/show_bug.cgi?id=111944
3052
3053         Reviewed by Adam Barth.
3054
3055         When creating an XSSInfo object in response to detecting reflected XSS
3056         on a page, the Auditor was passing in a copy of the document's
3057         original URL for reporting. It doesn't look like we need this, as
3058         XSSInfo's only consumer, XSSAuditorDelegate, runs on the main thread
3059         with access to the document. We can obtain access to the same
3060         information by reading the URL directly from the delegate's Document
3061         object if and when we need it.
3062
3063         * html/parser/XSSAuditorDelegate.cpp:
3064         (WebCore::XSSAuditorDelegate::didBlockScript):
3065             Read the document's URL directly in order to create a violation
3066             report.
3067         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
3068         * html/parser/XSSAuditorDelegate.h:
3069         (WebCore::XSSInfo::create):
3070         (WebCore::XSSInfo::XSSInfo):
3071         * html/parser/XSSAuditor.cpp:
3072         (WebCore::XSSAuditor::init):
3073         (WebCore::XSSAuditor::filterToken):
3074         (WebCore::XSSAuditor::isSafeToSendToAnotherThread):
3075         * html/parser/XSSAuditor.h:
3076             Remove the copied original URL from both XSSInfo objects and the
3077             XSSAuditor.
3078
3079 2013-03-10  Andreas Kling  <akling@apple.com>
3080
3081         GlyphMetricsMap should use OwnPtr.
3082         <http://webkit.org/b/111937>
3083
3084         Reviewed by Anders Carlsson.
3085
3086         Use OwnPtr instead of raw pointer + deleteAllValues().
3087
3088         * platform/graphics/GlyphMetricsMap.h:
3089         (GlyphMetricsMap):
3090         (WebCore::::locatePageSlowCase):
3091
3092 2013-03-10  Eric Carlson  <eric.carlson@apple.com>
3093
3094         Allow iOS port to use InbandTextTrackPrivateAVF
3095         https://bugs.webkit.org/show_bug.cgi?id=111933
3096
3097         Reviewed by Dean Jackson.
3098
3099         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3100         (WebCore::InbandTextTrackPrivateAVF::processCue): Drive-by cleanup.
3101         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
3102
3103 2013-03-09  Eric Carlson  <eric.carlson@apple.com>
3104
3105         Enable platform code to implement text track menu
3106         https://bugs.webkit.org/show_bug.cgi?id=111924
3107
3108         Reviewed by Dean Jackson.
3109
3110         No new tests, the new code isn't enabled in any ports yet.
3111
3112         * WebCore.xcodeproj/project.pbxproj: Add PlatformTextTrack.h and PlatformTextTrackMenu.h.
3113
3114         * html/HTMLAudioElement.cpp:
3115         (WebCore::HTMLAudioElement::createForJSConstructor): scheduleLoad -> scheduleDelayedAction.
3116
3117         * html/HTMLMediaElement.cpp:
3118         (WebCore::HTMLMediaElement::HTMLMediaElement): Deal with scheduleLoad to scheduleDelayedAction rename.
3119         (WebCore::HTMLMediaElement::parseAttribute): Ditto.
3120         (WebCore::HTMLMediaElement::finishParsingChildren): Ditto.
3121         (WebCore::HTMLMediaElement::insertedInto): Ditto.
3122         (WebCore::HTMLMediaElement::scheduleDelayedAction): Ditto.
3123         (WebCore::HTMLMediaElement::scheduleNextSourceChild): Ditto.
3124         (WebCore::HTMLMediaElement::loadTimerFired): Ditto.
3125         (WebCore::HTMLMediaElement::textTrackModeChanged): Notify platform menu of track change.
3126         (WebCore::HTMLMediaElement::playInternal): Deal with scheduleLoad to scheduleDelayedAction rename.
3127         (WebCore::HTMLMediaElement::pauseInternal): Ditto.
3128         (WebCore::HTMLMediaElement::mediaPlayerDidAddTrack): Ditto. Call addTrack() instead of appending 
3129             the track directly.
3130         (WebCore::HTMLMediaElement::setSelectedTextTrack): Deal with platform menu changing the
3131             selected track.
3132         (WebCore::HTMLMediaElement::platformTextTracks): Return an array of PlatformTracks representing
3133             the current text tracks.
3134         (WebCore::HTMLMediaElement::notifyMediaPlayerOfTextTrackChanges): Notify the platform menu
3135             that the list of text tracks has changed.
3136         (WebCore::HTMLMediaElement::platformTextTrackMenu): Return the platform track menu, if any.
3137         (WebCore::HTMLMediaElement::closeCaptionTracksChanged): 
3138         (WebCore::HTMLMediaElement::addTrack): Call addTrack() instead of appending the track directly.
3139         (WebCore::HTMLMediaElement::removeTrack): Call closeCaptionTracksChanged.
3140         (WebCore::HTMLMediaElement::addTextTrack): Call addTrack() instead of appending the track directly.
3141         (WebCore::HTMLMediaElement::didAddTrack): Ditto.
3142         (WebCore::HTMLMediaElement::didRemoveTrack): Deal with scheduleLoad to scheduleDelayedAction rename.
3143         (WebCore::HTMLMediaElement::sourceWasAdded): Ditto.
3144         (WebCore::HTMLMediaElement::clearMediaPlayer): Forget the platform track menu.
3145         (WebCore::HTMLMediaElement::resume): Deal with scheduleLoad to scheduleDelayedAction rename.
3146         * html/HTMLMediaElement.h:
3147
3148         * html/track/InbandTextTrack.h: scheduleLoad -> scheduleDelayedAction.
3149
3150         * html/track/TextTrack.cpp:
3151         (WebCore::TextTrack::platformTextTrack): Create a PlatformTextTrack.
3152         * html/track/TextTrack.h:
3153
3154         * platform/graphics/MediaPlayer.cpp:
3155         (WebCore::MediaPlayer::implementsTextTrackControls): New, player private passthrough.
3156         (WebCore::MediaPlayer::textTrackMenu): Ditto.
3157         * platform/graphics/MediaPlayer.h:
3158         * platform/graphics/MediaPlayerPrivate.h:
3159
3160         * platform/graphics/PlatformTextTrack.h: Added.
3161
3162         * platform/graphics/PlatformTextTrackMenu.h: Added.
3163
3164 2013-03-09  Eric Carlson  <eric.carlson@apple.com>
3165
3166         Video size calculated incorrectly when PLUGIN_PROXY_FOR_VIDEO
3167         https://bugs.webkit.org/show_bug.cgi?id=111912
3168
3169         Reviewed by Dean Jackson.
3170
3171         * html/shadow/MediaControlElements.cpp:
3172         (WebCore::MediaControlTextTrackContainerElement::updateSizes): We use RenderPart when
3173             PLUGIN_PROXY_FOR_VIDEO is defined, not RenderVideo.
3174
3175 2013-03-09  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
3176
3177         Fix offset handling in GStreamer WebKitWebSource.
3178         https://bugs.webkit.org/show_bug.cgi?id=111888
3179
3180         Reviewed by Philippe Normand.
3181
3182         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3183         (webKitWebSrcSeekDataCb):
3184         (StreamingClient::didReceiveData):
3185         The offset handling in WebKitWebSource was completely wrong
3186         before and caused wrong offsets to be set on the GStreamer buffers
3187         after a seek.
3188
3189         Apart from that there was also a race condition that happens
3190         when a downstream element causes seeks in very short succession
3191         and is switching between two different parts of the stream.
3192
3193 2013-03-09  Keishi Hattori  <keishi@webkit.org>
3194
3195         Month transition animation is missing in some places
3196         https://bugs.webkit.org/show_bug.cgi?id=111908
3197
3198         Reviewed by Kent Tamura.
3199
3200         Month transition animation was missing when navigating using keyboard
3201         shortcuts and when navigation was trigger by selecting.
3202
3203         Added tests to calendar-picker/*-picker-key-operations.html.
3204
3205         * Resources/pagepopups/calendarPicker.js:
3206         (Animator): Added annotations.
3207         (Animator.prototype.isRunning): Returns true of the animation is running. Used by test.
3208         (ScrollView.prototype.scrollAnimator): Returns the scroll animator. Used by test.
3209         (CalendarPicker):
3210         (CalendarPicker.prototype.onYearListViewDidSelectMonth): Use CalendarPicker.NavigationBehavior enum instead of bool.
3211         (CalendarPicker.prototype.setSelection): Ditto.
3212         (CalendarPicker.prototype._moveHighlight): Ditto.
3213         (CalendarPicker.prototype.onCalendarTableKeyDown): Ditto.
3214         (CalendarPicker.prototype.onBodyKeyDown): Ditto.
3215
3216 2013-03-09  Dean Jackson  <dino@apple.com>
3217
3218         Can't build w/o accelerated compositing
3219         https://bugs.webkit.org/show_bug.cgi?id=111891
3220
3221         Patch originally came from Tobias Mueller <tobiasmue@gnome.org>
3222
3223         Unreviewed build fix for platforms without ACCELERATED_COMPOSITING enabled, due
3224         to r145057.
3225
3226         * dom/PseudoElement.cpp:
3227         (WebCore::PseudoElement::~PseudoElement): Wrap the call to pseudoElementDestroyed in
3228             USE(ACCELERATED_COMPOSITING)
3229
3230 2013-03-07  Robert Hogan  <robert@webkit.org>
3231
3232         REGRESSION(r140907): Incorrect baseline for cells with media content during load
3233         https://bugs.webkit.org/show_bug.cgi?id=108357
3234
3235         Reviewed by Julien Chaffraix.
3236
3237         If a cell has replaced content, the intrinsic height of its content can change between layouts. If that's the case then the intrinsic padding we used
3238         for layout (the padding required to push the contents of the cell down to the row's baseline) is included in the new height and baseline and makes both
3239         of them wrong. So if a cell's content's intrinsic height has changed push the new content up into the intrinsic padding and relayout so that the rest of
3240         table and row layout can use the correct baseline and height for this cell.
3241
3242         Tests: fast/css/vertical-align-baseline-rowspan-012.html
3243                http/tests/css/vertical-align-baseline-after-image-load-2.html
3244                http/tests/css/vertical-align-baseline-after-image-load-3.html
3245                http/tests/css/vertical-align-baseline-after-image-load.html
3246
3247         * rendering/RenderTableCell.cpp:
3248         (WebCore::RenderTableCell::layout):
3249         * rendering/RenderTableCell.h:
3250         (WebCore::RenderTableCell::isBaselineAligned):
3251         * rendering/RenderTableSection.cpp:
3252         (WebCore::RenderTableSection::calcRowLogicalHeight):
3253         (WebCore::RenderTableSection::layoutRows):
3254
3255 2013-03-08  Chris Fleizach  <cfleizach@apple.com>
3256
3257         REGRESSION: Intermittent crash in SpeechSynthesis::didFinishSpeaking
3258         https://bugs.webkit.org/show_bug.cgi?id=111613
3259
3260         Reviewed by Ryosuke Niwa.
3261
3262         This crash happens when the mock synthesizer utterance variable gets cleared
3263         before the speakingFinished timer happens. I don't see how that could happen
3264         but I was able to make a similar problem happen when cancel is called twice.
3265
3266         This adds in a few more asserts and common sense checks. I'm hoping it will
3267         illuminate the problem further.
3268
3269         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
3270         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
3271         (WebCore::PlatformSpeechSynthesizerMock::speak):
3272         (WebCore::PlatformSpeechSynthesizerMock::cancel):
3273
3274 2013-03-08  David Kilzer  <ddkilzer@apple.com>
3275
3276         BUILD FIX: Make WebCore link for iOS
3277
3278         * WebCore.exp.in:
3279         - Add ENABLE(RUBBER_BAND) for FrameView::setWantsLayerForTopOverHangArea(bool)
3280           and FrameView::setWantsLayerForBottomOverHangArea(bool).
3281         - Move FloatPoint::FloatPoint(_NSPoint const&) to !PLATFORM(IOS)
3282           section.
3283
3284 2013-03-08  Julien Chaffraix  <jchaffraix@webkit.org>
3285
3286         [CSS Grid Layout] Resolve grid-{end|after} integer against the end|after edge
3287         https://bugs.webkit.org/show_bug.cgi?id=111885
3288
3289         Reviewed by Tony Chang.
3290
3291         The current code resolves grid-end (resp. grid-after) <integer>'s format against the start
3292         (resp. before) axis. The specification changed so that they are resolved against their matching
3293         axis.
3294
3295         Test: fast/css-grid-layout/grid-auto-flow-resolution.html
3296
3297         * rendering/RenderGrid.cpp:
3298         (WebCore::RenderGrid::maximumIndexInDirection):
3299         Updated the code to do the grid sizing measurement without resolveGridPositionsFromStyle. That's required
3300         as resolveGridPositionsFromStyle requires the grid to be sized.
3301
3302         (WebCore::RenderGrid::placeItemsOnGrid):
3303         Added a comment about not recomputing after grid growth. This issue was raised to www-style
3304         (http://lists.w3.org/Archives/Public/www-style/2013Mar/0182.html).
3305
3306         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
3307         Added an ASSERT now that we don't call it during grid construction. Also added some code to pass
3308         the side of the GridPosition we give to resolveGridPositionFromStyle.
3309
3310         (WebCore::RenderGrid::resolveGridPositionFromStyle):
3311         Updated the code to resolve the grid position against the right side.
3312
3313         * rendering/RenderGrid.h:
3314         Added GridPositionSide and updated resolveGridPositionFromStyle's signature.
3315
3316 2013-03-08  Sheriff Bot  <webkit.review.bot@gmail.com>
3317
3318         Unreviewed, rolling out r142015.
3319         http://trac.webkit.org/changeset/142015
3320         https://bugs.webkit.org/show_bug.cgi?id=111904
3321
3322         The change caused 2 major regressions (bug 111091 and bug
3323         111595) and Pravin doesn't have time to investigate them
3324         (Requested by jchaffraix on #webkit).
3325
3326         * dom/Node.cpp:
3327         (WebCore::Node::diff):
3328         * rendering/RenderBlock.cpp:
3329         (WebCore::RenderBlock::childBecameNonInline):
3330         (WebCore):
3331         * rendering/RenderBlock.h:
3332         (RenderBlock):
3333         * rendering/RenderBoxModelObject.h:
3334         (WebCore::RenderBoxModelObject::childBecameNonInline):
3335         (RenderBoxModelObject):
3336         * rendering/RenderInline.cpp:
3337         (WebCore::RenderInline::childBecameNonInline):
3338         (WebCore):
3339         * rendering/RenderInline.h:
3340         (RenderInline):
3341         * rendering/RenderObject.cpp:
3342         (WebCore):
3343         (WebCore::RenderObject::handleDynamicFloatPositionChange):
3344         (WebCore::RenderObject::styleWillChange):
3345         (WebCore::RenderObject::styleDidChange):
3346         * rendering/RenderObject.h:
3347         (RenderObject):
3348
3349 2013-03-08  Dean Jackson  <dino@apple.com>
3350
3351         Don't snapshot Java plugins
3352         https://bugs.webkit.org/show_bug.cgi?id=111899
3353
3354         Reviewed by Tim Horton.
3355
3356         Export MIMETypeRegistry::isJavaAppletMIMEType symbol.
3357
3358         * WebCore.exp.in:
3359
3360 2013-03-08  Rafael Weinstein  <rafaelw@chromium.org>
3361
3362         [HTMLTemplateElement] processTemplateEndTag() needs to check for template in html scope
3363         https://bugs.webkit.org/show_bug.cgi?id=111880
3364
3365         Reviewed by Eric Seidel.
3366
3367         Currently, </template> handling exits with an error if there is not a template tag "in scope"
3368         which will be true if there is a table (for instance) below a template. This makes it so that
3369         the search (correctly) examines the entire element stack.
3370
3371         Tests added to html5lib testing library.
3372
3373         * html/parser/HTMLTreeBuilder.cpp:
3374         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
3375
3376 2013-03-08  Eric Seidel  <eric@webkit.org>
3377
3378         BackgroundHTMLParser should be able to atomize well-known strings
3379         https://bugs.webkit.org/show_bug.cgi?id=107337
3380
3381         Reviewed by Adam Barth.
3382
3383         Testing this patch easily requires applying bug 107236 locally
3384         to remove all the rendering noise from Parser/html-threaded-parser.html.
3385
3386         This patch adds a new class HTMLIdentifier which allows us to avoid
3387         allocating strings for known tag/attribute names from HTMLNames.
3388
3389         There is still a lot of meat on this bone, but I think it's important to
3390         land something "smallish" to start and iterate from there.
3391
3392         This took Parser/html-threaded-parser.html from:
3393         median= 443.726500002 ms, stdev= 7.25002679952 ms, min= 430.244000047 ms, max= 455.511000007 ms
3394         to:
3395         median= 427.849500004 ms, stdev= 9.96967058292 ms, min= 417.914000049 ms, max= 461.528000014 ms
3396         on my MBP.
3397
3398         * CMakeLists.txt:
3399         * GNUmakefile.list.am:
3400         * Target.pri:
3401         * WebCore.gypi:
3402         * WebCore.vcproj/WebCore.vcproj:
3403         * WebCore.vcxproj/WebCore.vcxproj:
3404         * html/parser/AtomicHTMLToken.h:
3405         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
3406         * html/parser/BackgroundHTMLParser.cpp:
3407         (WebCore::tokenExitsForeignContent):
3408         (WebCore::tokenExitsSVG):
3409         (WebCore::tokenExitsMath):
3410         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
3411         * html/parser/CSSPreloadScanner.cpp:
3412         (WebCore::CSSPreloadScanner::scan):
3413         * html/parser/CSSPreloadScanner.h:
3414         (WebCore):
3415         (CSSPreloadScanner):
3416         * html/parser/CompactHTMLToken.cpp:
3417         (SameSizeAsCompactHTMLToken):
3418         (WebCore::CompactHTMLToken::CompactHTMLToken):
3419         * html/parser/CompactHTMLToken.h:
3420         (WebCore::CompactHTMLToken::Attribute::Attribute):
3421         (Attribute):
3422         (WebCore::CompactHTMLToken::data):
3423         (WebCore::CompactHTMLToken::publicIdentifier):
3424         (CompactHTMLToken):
3425         * html/parser/HTMLDocumentParser.cpp:
3426         (WebCore::HTMLDocumentParser::startBackgroundParser):
3427         * html/parser/HTMLIdentifier.cpp: Added.
3428         (WebCore):
3429         (WebCore::identifierTable):
3430         (WebCore::HTMLIdentifier::hasIndex):
3431         (WebCore::HTMLIdentifier::findIndex):
3432         (WebCore::nameForIndex):
3433         (WebCore::HTMLIdentifier::asString):
3434         (WebCore::HTMLIdentifier::asStringImpl):
3435         (WebCore::HTMLIdentifier::addNames):
3436         (WebCore::HTMLIdentifier::init):
3437         * html/parser/HTMLIdentifier.h: Added.
3438         (WebCore):
3439         (HTMLIdentifier):
3440         (WebCore::HTMLIdentifier::HTMLIdentifier):
3441         (WebCore::HTMLIdentifier::isSafeToSendToAnotherThread):
3442         * html/parser/HTMLParserIdioms.cpp:
3443         (WebCore::threadSafeEqual):
3444         (WebCore::threadSafeMatch):
3445         * html/parser/HTMLParserIdioms.h:
3446         (WebCore):
3447         (WebCore::threadSafeHTMLNamesMatch):
3448         * html/parser/HTMLPreloadScanner.cpp:
3449         (WebCore::TokenPreloadScanner::tagIdFor):
3450         (WebCore::TokenPreloadScanner::StartTagScanner::match):
3451         (TokenPreloadScanner::StartTagScanner):
3452         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
3453         * html/parser/HTMLPreloadScanner.h:
3454
3455 2013-03-08  Brandon Jones  <bajones@google.com>
3456
3457         Check to ensure MultisampleRenderbuffer creation succeeds
3458         https://bugs.webkit.org/show_bug.cgi?id=111780
3459
3460         Reviewed by Dean Jackson.
3461
3462         On OSX systems using AMD graphics chips the allocation of large
3463         Multisample Renderbuffers in Chromium would fail without any indication
3464         of failure. Attempting to draw to the buffer resulted in garbage being
3465         rendered onscreen. This could be reproduced by opening a full-page
3466         WebGL app and pressing (Command + "-") several times. This patch adds an
3467         additional check during DrawingBuffer resize to verify that the resized
3468         buffer is valid. 
3469
3470         * platform/graphics/gpu/DrawingBuffer.cpp:
3471         (WebCore):
3472         (WebCore::DrawingBuffer::checkBufferIntegrity):
3473         (WebCore::DrawingBuffer::reset):
3474         * platform/graphics/gpu/DrawingBuffer.h:
3475         (DrawingBuffer):
3476
3477 2013-03-08  Harald Alvestrand  <hta@chromium.org>
3478
3479         Implemented new API for RTCStatsReport object.
3480         https://bugs.webkit.org/show_bug.cgi?id=110333
3481
3482         Removed RTCStatsElement object, moved its interface to
3483         RTCStatsReport. Preserved some interfaces for
3484         backwards compatibility; will be removed in a later patch.
3485
3486         Reviewed by Adam Barth.
3487
3488         Tested by extensions to RTCPeerConnection-stats test.
3489
3490         * Modules/mediastream/RTCStatsElement.cpp: Removed.
3491         * Modules/mediastream/RTCStatsElement.h: Removed.
3492         * Modules/mediastream/RTCStatsElement.idl: Removed.
3493         * Modules/mediastream/RTCStatsReport.cpp:
3494         (WebCore::RTCStatsReport::create):
3495         (WebCore::RTCStatsReport::RTCStatsReport):
3496         (WebCore):
3497         (WebCore::RTCStatsReport::names):
3498         (WebCore::RTCStatsReport::local):
3499         (WebCore::RTCStatsReport::remote):
3500         (WebCore::RTCStatsReport::addStatistic):
3501         (WebCore::RTCStatsReport::addElement):
3502         * Modules/mediastream/RTCStatsReport.h:
3503         (RTCStatsReport):
3504         (WebCore::RTCStatsReport::timestamp):
3505         (WebCore::RTCStatsReport::id):
3506         (WebCore::RTCStatsReport::stat):
3507         * Modules/mediastream/RTCStatsReport.idl:
3508         * Modules/mediastream/RTCStatsResponse.cpp:
3509         (WebCore::RTCStatsResponse::namedItem):
3510         (WebCore):
3511         (WebCore::RTCStatsResponse::addReport):
3512         (WebCore::RTCStatsResponse::addStatistic):
3513         * Modules/mediastream/RTCStatsResponse.h:
3514         (RTCStatsResponse):
3515         * Modules/mediastream/RTCStatsResponse.idl:
3516         * WebCore.gypi:
3517         * platform/chromium/support/WebRTCStatsResponse.cpp:
3518         (WebKit::WebRTCStatsResponse::addReport):
3519         (WebKit):
3520         (WebKit::WebRTCStatsResponse::addStatistic):
3521         (WebKit::WebRTCStatsResponse::addElement):
3522         * platform/mediastream/RTCStatsResponseBase.h:
3523         (RTCStatsResponseBase):
3524
3525 2013-03-08  Eric Seidel  <eric@webkit.org>
3526
3527         Free up background parser's checkpoints when speculation succeeds
3528         https://bugs.webkit.org/show_bug.cgi?id=110547
3529
3530         Reviewed by Adam Barth.
3531
3532         This should be a memory (and possible perf) win while parsing
3533         pages, as we will no longer hold multiple copies of every
3534         source byte during the whole parse.
3535
3536         Many LayoutTests exercise this code path, and I've manually (debugger and printf)
3537         that we're hitting this code, but we'll have to wait for the memory/perf bots
3538         to tell us if this shows up as a win.
3539
3540         We only bother to message the parser at the end of a speculation chain, so as not
3541         to send too many messages to the background parser.
3542
3543         * html/parser/BackgroundHTMLInputStream.cpp:
3544         (WebCore::BackgroundHTMLInputStream::BackgroundHTMLInputStream):
3545         (WebCore::BackgroundHTMLInputStream::invalidateCheckpointsUpThrough):
3546         (WebCore):
3547         (WebCore::BackgroundHTMLInputStream::rewindTo):
3548         * html/parser/BackgroundHTMLInputStream.h:
3549         (BackgroundHTMLInputStream):
3550         (Checkpoint):
3551         (WebCore::BackgroundHTMLInputStream::Checkpoint::isNull):
3552         (WebCore::BackgroundHTMLInputStream::Checkpoint::clear):
3553         * html/parser/BackgroundHTMLParser.cpp:
3554         (WebCore::BackgroundHTMLParser::passedCheckpoint):
3555         (WebCore):
3556         * html/parser/BackgroundHTMLParser.h:
3557         (BackgroundHTMLParser):
3558         * html/parser/HTMLDocumentParser.cpp:
3559         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
3560
3561 2013-03-08  Chandra Shekar Vallala  <brk376@motorola.com>
3562
3563         [chromium] Keydown event for 'shift+alt' returns win keycode instead of 'alt'
3564         https://bugs.webkit.org/show_bug.cgi?id=111112
3565
3566         Reviewed by Tony Chang.
3567
3568         Return windows keycode of Alt incase of GDK_META_L, GDK_META_R. This matches
3569         the firefox behaviour in linux platform.
3570
3571         Added Manual Test : ManualTests/shift-alt-key-event.html
3572         Try press Shift then alt key. The test passes if the shiftKey, altKey values
3573         of JSKeyEvent are true and keycode/which is 18.
3574
3575         * platform/chromium/KeyCodeConversionGtk.cpp:
3576         (WebCore::windowsKeyCodeForKeyEvent):
3577
3578 2013-03-08  Mike West  <mkwst@chromium.org>
3579
3580         CSP: 'eval()' is blocked in report-only mode.
3581         https://bugs.webkit.org/show_bug.cgi?id=111867
3582
3583         Reviewed by Adam Barth.
3584
3585         Setting a 'Content-Security-Policy-Report-Only' header should not have
3586         any effect on what a page actually executes. Currently, however, setting
3587         a 'script-src' directive that doesn't whitelist 'unsafe-eval' actually
3588         blocks 'eval()' on the page. This patch fixes that by checking whether
3589         we're in report-only mode before turning 'eval()' off inside the script
3590         engine.
3591
3592         This leaves us in a weird state, however. We don't currently have any
3593         mechanism of explaining to the VM that we just want to be notified of
3594         'eval()' usage. I've filed http://wkbug.com/111869 to cover this
3595         aspect.
3596
3597         Test: http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode.html
3598
3599         * page/ContentSecurityPolicy.cpp:
3600         (WebCore::ContentSecurityPolicy::didReceiveHeader):
3601             For each policy we parse, check that we're only turning off eval in
3602             the VM when we're in enforce mode. If we're in report-only mode,
3603             skip it.
3604
3605 2013-03-08  Christian Biesinger  <cbiesinger@chromium.org>
3606
3607         REGRESSION (r143643): <button> should support ::first-line and ::first-letter
3608         https://bugs.webkit.org/show_bug.cgi?id=111782
3609
3610         Reviewed by Ojan Vafai.
3611
3612         Test: fast/forms/button-first-line-first-letter.html
3613
3614         * rendering/RenderBlock.cpp:
3615         (WebCore::RenderBlock::firstLineBlock):
3616         (WebCore::findFirstLetterBlock):
3617         Add isRenderButton to the first-line and first-letter checks that
3618         don't allow ::first-* styles for flexbox.
3619
3620 2013-03-08  Geoffrey Garen  <ggaren@apple.com>
3621
3622         Removed an out-of-date comment from SharedTimer
3623         https://bugs.webkit.org/show_bug.cgi?id=111875
3624
3625         Reviewed by Mark Hahnenberg.
3626
3627         Even if we surround each call to an ObjC interface with an autorelease
3628         pool, it's still nice to have one at top-level entry points like
3629         timers, to avoid turning a single mistake into a long-term leak.
3630
3631         * platform/ios/SharedTimerIOS.mm:
3632         (WebCore::timerFired):
3633         * platform/mac/SharedTimerMac.mm:
3634         (WebCore::timerFired):
3635
3636 2013-03-08  Benjamin Poulain  <benjamin@webkit.org>
3637
3638         [Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
3639         https://bugs.webkit.org/show_bug.cgi?id=111297
3640
3641         Reviewed by Kenneth Rohde Christiansen.
3642
3643         The 'view-mode' Media Feature spec is implemented in WebCore but
3644         there is no WebKit support for it on Mac.
3645         Because of this, we always lie and report a windowed view mode.
3646
3647         This patch add a feature flag for the feature and disable it on
3648         Mac so that we stop reporting incorrect default values.
3649
3650         * WebCore.exp.in:
3651         * css/CSSValueKeywords.in:
3652         * css/MediaFeatureNames.h:
3653         (MediaFeatureNames):
3654         * css/MediaQueryEvaluator.cpp:
3655         * css/MediaQueryExp.cpp:
3656         (WebCore::featureWithCSSValueID):
3657         (WebCore::featureWithoutValue):
3658         * page/Page.cpp:
3659         (WebCore::Page::Page):
3660         * page/Page.h:
3661         (Page):
3662
3663 2013-03-08  Ryosuke Niwa  <rniwa@webkit.org>
3664
3665         After sending message, Mail changes formatting
3666         https://bugs.webkit.org/show_bug.cgi?id=111360
3667
3668         Reviewed by Enrica Casucci.
3669
3670         Added makeInsertedContentRoundTrippableWithHTMLTreeBuilder to move prohibited children (e.g. p, h1, etc...)
3671         out of paragraph elements to run immediately after the fragment insertion. This function splits trees and
3672         moves prohibited children out of paragraph elements to keep the tree isomorphic under HTML serialization and
3673         parsing. Unfortunately, there are many other DOM tree constructs we need to fix to make the subtree truly
3674         isomorphic but this is a step forward.
3675
3676         Test: editing/pasteboard/pasting-into-p-should-not-nest-p.html
3677
3678         * editing/ReplaceSelectionCommand.cpp:
3679         (WebCore::isProhibitedParagraphChild): Added. Matches the list at
3680         https://dvcs.w3.org/hg/editing/raw-file/57abe6d3cb60/editing.html#prohibited-paragraph-child
3681         except main element, which is currently missing in the specification.
3682         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder): Added.
3683         (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): Added.
3684         (WebCore::ReplaceSelectionCommand::doApply): Call moveProhibitedChildrenOutOfParagraphElements.
3685
3686         * editing/ReplaceSelectionCommand.h:
3687         (ReplaceSelectionCommand):
3688
3689 2013-03-08  Eric Seidel  <eric@webkit.org>
3690
3691         AtomicHTMLToken should not be heap allocated or RefCounted
3692         https://bugs.webkit.org/show_bug.cgi?id=111250
3693
3694         Reviewed by Adam Barth.
3695
3696         It was clearly an oversight on our part to ever make AtomicHTMLToken ref-counted.
3697         We don't need the actual "token" saved, just enough of it to recreate a fake token.
3698
3699         This removed many more mallocs than I thought it would, for a nice little speed win.
3700         Before:
3701         median= 450.482999993 ms, stdev= 7.2381436538 ms, min= 436.084999994 ms, max= 464.968999964 ms
3702         After:
3703         median= 436.41600004 ms, stdev= 5.71435647554 ms, min= 427.160999971 ms, max= 446.753000026 ms
3704
3705         * html/parser/AtomicHTMLToken.h:
3706         (AtomicHTMLToken):
3707         * html/parser/HTMLConstructionSite.cpp:
3708         (WebCore::HTMLConstructionSite::createElementFromSavedToken):
3709         * html/parser/HTMLDocumentParser.cpp:
3710         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
3711         (WebCore::HTMLDocumentParser::constructTreeFromCompactHTMLToken):
3712         * html/parser/HTMLElementStack.cpp:
3713         (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
3714         * html/parser/HTMLFormattingElementList.cpp:
3715         (WebCore):
3716         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
3717         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
3718         * html/parser/HTMLStackItem.h:
3719         (WebCore::HTMLStackItem::create):
3720         (WebCore::HTMLStackItem::localName):
3721         (WebCore::HTMLStackItem::attributes):
3722         (WebCore::HTMLStackItem::getAttributeItem):
3723         (HTMLStackItem):
3724         (WebCore::HTMLStackItem::hasLocalName):
3725         (WebCore::HTMLStackItem::hasTagName):
3726         (WebCore::HTMLStackItem::HTMLStackItem):
3727         * html/parser/HTMLTreeBuilder.cpp:
3728         (WebCore::HTMLTreeBuilder::processFakeStartTag):
3729         (WebCore::HTMLTreeBuilder::processFakeEndTag):
3730         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
3731         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3732         (WebCore::HTMLTreeBuilder::processStartTag):
3733         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
3734         (WebCore::HTMLTreeBuilder::processEndTag):
3735         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
3736         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
3737         (WebCore::HTMLTreeBuilder::defaultForInHead):
3738         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
3739         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
3740         * html/parser/TextDocumentParser.cpp:
3741         (WebCore::TextDocumentParser::insertFakePreElement):
3742
3743 2013-03-08  Roger Fong  <roger_fong@apple.com>
3744
3745         Makefile fixes.
3746
3747         * WebCore.vcxproj/WebCore.make:
3748
3749 2013-03-07  Emil A Eklund  <eae@chromium.org>
3750
3751         [sub-pixel] Rounding error in table cell height calculation causes unnecessary scrollbar
3752         https://bugs.webkit.org/show_bug.cgi?id=111794
3753
3754         Reviewed by Levi Weintraub.
3755         
3756         In RenderTableCell::logicalHeightForRowSizing the
3757         adjustedLogicalHeight is calculated from the logicalHeight and
3758         intrinsic padding and is then returned and floored. This can
3759         cause cause the cell to be slightly smaller (0.5px) than the
3760         element it contains.
3761
3762         Test: fast/sub-pixel/table-cell-height.html
3763
3764         * rendering/RenderTableCell.h:
3765         (WebCore::RenderTableCell::logicalHeightForRowSizing):
3766         Change to use pixelSnapped version of logicalHeight method and
3767         change signature to return int as the only caller immediately
3768         down-casts the result to an int.
3769
3770 2013-03-08  Christian Biesinger  <cbiesinger@chromium.org>
3771
3772         RenderFullScreen needs to clear override sizes when exiting full screen
3773         https://bugs.webkit.org/show_bug.cgi?id=111775
3774
3775         Reviewed by Ojan Vafai.
3776
3777         Test: fullscreen/full-screen-with-flex-item.html
3778
3779         * rendering/RenderFullScreen.cpp:
3780         (RenderFullScreen::unwrapRenderer):
3781         RenderFullScreen is a flexbox, so it will potentially set override
3782         sizes on its children while in fullscreen mode. When we exit
3783         fullscreen mode, we need to clear this override size, otherwise the
3784         the leftover override size may affect layout. See the testcase for an
3785         example.
3786
3787 2013-03-08  Julien Chaffraix  <jchaffraix@webkit.org>
3788
3789         [CSS Grid Layout] Handle 2 positions with one 'auto' properly
3790         https://bugs.webkit.org/show_bug.cgi?id=111653
3791
3792         Reviewed by Tony Chang.
3793
3794         The rendering code was making the assumption that we have one position.
3795         Thus it couldn't fully match what the specification wants as the 2 opposite
3796         positions are required to resolve either position in several cases (e.g.
3797         1 / span 2, auto / 'c').
3798
3799         This change introduces resolveGridPositionsFromStyle to do both opposite
3800         positions resolution in one pass and thus handling more cases.
3801
3802         Test: fast/css-grid-layout/grid-item-spanning-resolution.html
3803
3804         * rendering/RenderGrid.cpp:
3805         (WebCore::RenderGrid::maximumIndexInDirection):
3806         (WebCore::RenderGrid::placeItemsOnGrid):
3807         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
3808         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
3809         Updated the above functions to rely on resolveGridPositionsFromStyle.
3810
3811         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
3812         Added this new function that handle the correct resolution.
3813
3814         (WebCore::RenderGrid::resolveGridPositionFromStyle):
3815         Updated the ASSERT to match the new code flow.
3816
3817         * rendering/RenderGrid.h:
3818         (WebCore::RenderGrid::GridSpan::GridSpan):
3819         Introduced this new struct to hold the 2 positions along one axis.
3820
3821 2013-03-08  Dominic Cooney  <dominicc@chromium.org>
3822
3823         RenderTextControlSingleLine should not assume that its text element has a renderer
3824         https://bugs.webkit.org/show_bug.cgi?id=111826
3825
3826         Reviewed by Ojan Vafai.
3827
3828         Tests: fast/forms/search/search-autoscroll-hidden-decoration-container-crash.html
3829                fast/forms/search/search-hide-decoration-container-crash.html
3830                fast/forms/search/search-scroll-hidden-decoration-container-crash.html
3831
3832         * rendering/RenderTextControlSingleLine.cpp:
3833         (WebCore::RenderTextControlSingleLine::layout):
3834         (WebCore::RenderTextControlSingleLine::controlClipRect):
3835         (WebCore::RenderTextControlSingleLine::autoscroll):
3836         (WebCore::RenderTextControlSingleLine::scroll):
3837
3838 2013-03-08  Joshua Bell  <jsbell@chromium.org>
3839
3840         IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
3841         https://bugs.webkit.org/show_bug.cgi?id=111459
3842
3843         Reviewed by Adam Barth.
3844
3845         IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
3846         origin is opened, the backing store instance must be re-used). This was a map to raw
3847         pointers so that the backing store can be collected when all database references are
3848         dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
3849         would add/remove itself on creation/destruction.
3850
3851         Replace this with a HashMap<WeakPtr<T>>. This simplifies the plumbing; map entries
3852         "leak" but are purged on subsequent opens.
3853
3854         Added webkit_unit_test (Chromium port) to verify refcounts.
3855
3856         * Modules/indexeddb/IDBBackingStore.cpp:
3857         (WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
3858         (WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
3859         (WebCore::IDBBackingStore::open): Ditto.
3860         * Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
3861         (WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
3862         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
3863         (WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
3864         May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
3865         (WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
3866         * Modules/indexeddb/IDBFactoryBackendImpl.h:
3867         (IDBFactoryBackendImpl): Remove plumbing methods.
3868
3869 2013-03-08  John Mellor  <johnme@chromium.org>
3870
3871         @media queries do not take zooming into account
3872         https://bugs.webkit.org/show_bug.cgi?id=53186
3873
3874         Reviewed by Kenneth Rohde Christiansen.
3875
3876         Fixes @media width and height to take into account full page zoom, by
3877         adding code to MediaQueryEvaluator's width/heightMediaFeatureEval,
3878         corresponding to the existing code in Element::clientWidth which makes
3879         document.documentElement.clientWidth take into account page zoom.
3880
3881         Test: fast/media/mq-width-pagezoom.html
3882
3883         * css/MediaQueryEvaluator.cpp:
3884         (WebCore::heightMediaFeatureEval):
3885         (WebCore::widthMediaFeatureEval):
3886
3887 2013-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
3888
3889         [BlackBerry] Add stubs for DNSResolveQueue platform specific methods
3890         https://bugs.webkit.org/show_bug.cgi?id=111841
3891
3892         Reviewed by Rob Buis.
3893
3894         Add empty implementations of
3895         DNSResolveQueue::platformProxyIsEnabledInSystemPreferences() and
3896         DNSResolveQueue::platformResolve() to DNSBlackBerry.cpp to make it
3897         build.
3898
3899         * platform/network/blackberry/DNSBlackBerry.cpp:
3900         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
3901         (WebCore::DNSResolveQueue::platformResolve):
3902
3903 2013-03-08  Glenn Hartmann  <hartmanng@chromium.org>
3904
3905        Adding a hook to collect data for a Google UMA histogram to track when
3906        m_needsCompositedScrolling is turned on and off.
3907        https://bugs.webkit.org/show_bug.cgi?id=111725
3908
3909        Reviewed by Julien Chaffraix.
3910
3911        We want to keep track of this information to quantify the effects of a
3912        few patches that will cause us to opt in to composited scrolling.
3913        Specifically, we want to measure the effects of
3914        https://bugs.webkit.org/show_bug.cgi?id=109302,
3915        https://bugs.webkit.org/show_bug.cgi?id=109966,
3916        https://bugs.webkit.org/show_bug.cgi?id=109591, and
3917        https://bugs.webkit.org/show_bug.cgi?id=107618.
3918
3919        We do this by measuring a per-layer boolean value, and comparing the
3920        ratio between number of layers opted in and number of layers that remain
3921        uncomposited. We hope the relative number of layers opting in will
3922        increase after the relevant patches land and are enabled.
3923
3924        Unfortunately implementing extra statistics is impractical at the
3925        moment since most of the actionable relevant data is expensive to
3926        compute. For example, it would be useful to know if the layers that opt
3927        out do so because of invisible or non-overlapping layers that cause a
3928        potential stacking container's children to be discontiguous, because we
3929        would potentially be able to mitigate the problem. However, this would
3930        add considerable overhead to perform overlap testing just to gather
3931        data.
3932
3933        No new tests (no change in behaviour).
3934
3935        * rendering/RenderLayer.cpp:
3936        (WebCore::RenderLayer::updateNeedsCompositedScrolling):
3937
3938 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
3939
3940         [BlackBerry] GraphicsContext: rename addRoundedRectClip to clipRoundedRect
3941         https://bugs.webkit.org/show_bug.cgi?id=111852
3942
3943         Reviewed by Rob Buis.
3944
3945         This changed in r139353.
3946
3947         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
3948         (WebCore::GraphicsContext::clipRoundedRect):
3949
3950 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
3951
3952         [BlackBerry] Add BlendMode parameter to GraphicsContext::setPlatformCompositeOperation
3953         https://bugs.webkit.org/show_bug.cgi?id=111840
3954
3955         Reviewed by Rob Buis.
3956
3957         This parameter was added in r137011.
3958
3959         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
3960         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3961
3962 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
3963
3964         [BlackBerry] Remove unused GraphicsContext::addInnerRoundedRectClip()
3965         https://bugs.webkit.org/show_bug.cgi?id=111838
3966
3967         Reviewed by Rob Buis.
3968
3969         This was removed in r139138.
3970
3971         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
3972
3973 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
3974
3975         [BlackBerry] GraphicsContext: add fillRule parameter to clip() and canvasClip()
3976         https://bugs.webkit.org/show_bug.cgi?id=111836
3977
3978         Reviewed by Rob Buis.
3979
3980         This parameter was added in r139967.
3981
3982         * platform/graphics/blackberry/PathBlackBerry.cpp:
3983         (WebCore):
3984         (WebCore::GraphicsContext::clip):
3985         (WebCore::GraphicsContext::canvasClip):
3986
3987 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
3988
3989         Web Inspector: Get rid of file system ids and use file pathes as uri for file based uiSourceCodes.
3990         https://bugs.webkit.org/show_bug.cgi?id=111753
3991
3992         Reviewed by Pavel Feldman.
3993
3994         * inspector/front-end/FileSystemMapping.js:
3995         (WebInspector.FileSystemMappingImpl):
3996         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings.get this):
3997         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings):
3998         (WebInspector.FileSystemMappingImpl.prototype._saveToSettings):
3999         (WebInspector.FileSystemMappingImpl.prototype.set addFileSystemMapping):
4000         (WebInspector.FileSystemMappingImpl.prototype.removeFileSystemMapping):
4001         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPaths):
4002         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPathForPrefix):
4003         * inspector/front-end/FileSystemProjectDelegate.js:
4004         (WebInspector.FileSystemProjectDelegate.projectId):
4005         (WebInspector.FileSystemProjectDelegate.prototype.id):
4006         (WebInspector.FileSystemProjectDelegate.prototype.fileSystemPath):
4007         (WebInspector.FileSystemWorkspaceProvider):
4008         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
4009         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
4010         (WebInspector.FileSystemWorkspaceProvider.prototype.fileSystemPath):
4011         * inspector/front-end/IsolatedFileSystemManager.js:
4012         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
4013         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
4014         * inspector/front-end/Workspace.js:
4015         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
4016
4017 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
4018
4019         Web Inspector: Polish TabbedEditorContaner and ScriptsNavigator behavior.
4020         https://bugs.webkit.org/show_bug.cgi?id=111732
4021
4022         Reviewed by Pavel Feldman.
4023
4024         Resources matching inspectedPageURL are always expanded in NavigatorView now.
4025         Snippets tab in scripts navigator is not automatically opened anymore.
4026         Cleared saved TabbedEditorContainer history because it might have been corrupted due to errors in earlier versions.
4027         Snippets are not revealed in TabbedEditorContainer anymore unless they were actually selected by user or there is no other tabs opened.
4028
4029         * inspector/front-end/NavigatorView.js:
4030         (WebInspector.NavigatorView):
4031         (WebInspector.NavigatorView.prototype.addUISourceCode):
4032         (WebInspector.NavigatorView.prototype._inspectedURLChanged):
4033         (WebInspector.NavigatorView.prototype.revealUISourceCode):
4034         (WebInspector.NavigatorView.prototype.removeUISourceCode):
4035         (WebInspector.NavigatorFolderTreeElement.prototype.onattach):
4036         (WebInspector.NavigatorUISourceCodeTreeNode.prototype.uiSourceCode):
4037         (WebInspector.NavigatorUISourceCodeTreeNode.prototype.reveal):
4038         * inspector/front-end/ScriptsNavigator.js:
4039         (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
4040         * inspector/front-end/ScriptsPanel.js:
4041         (WebInspector.ScriptsPanel.prototype._showFile):
4042         * inspector/front-end/Settings.js:
4043         (WebInspector.VersionController.prototype._updateVersionFrom1To2):
4044         * inspector/front-end/TabbedEditorContainer.js:
4045         (WebInspector.TabbedEditorContainer.prototype.addUISourceCode.tabId.this._tabIds.get this):
4046         (WebInspector.TabbedEditorContainer.prototype.addUISourceCode):
4047         (WebInspector.TabbedEditorContainer.History.prototype._rebuildItemIndex):
4048
4049 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
4050
4051         Web Inspector: Add shortcut for running a snippet.
4052         https://bugs.webkit.org/show_bug.cgi?id=111680
4053
4054         Reviewed by Pavel Feldman.