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