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