[Qt] Assert in GestureTapHighlighter.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-26  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2
3         [Qt] Assert in GestureTapHighlighter.
4         https://bugs.webkit.org/show_bug.cgi?id=82187
5
6         Reviewed by Kenneth Rohde Christiansen.
7
8         Adjust the boundaries of the center-rect before performing the intersection test,
9         since adjusting the boundary may cause a new intersection.
10
11         * page/GestureTapHighlighter.cpp:
12
13 2012-03-26  Antti Koivisto  <antti@apple.com>
14
15         Split MediaList into internal and CSSOM types
16         https://bugs.webkit.org/show_bug.cgi?id=82149
17
18         Reviewed by Andread Kling.
19
20         MediaList is a CSSOM type and should not be used internally.
21         
22         - Use new type MediaQuerySet internally to represent a collection of media queries.
23         - Create MediaList wrapper on-demand for CSSOM purposes only.
24         
25         This moves us forward in separating CSSOM from the internal stylesheet implementation.
26         
27         MediaQuerySet really belongs to a file of its own but that is not part of this patch.
28         
29         * css/CSSGrammar.y:
30         * css/CSSImportRule.cpp:
31         (WebCore::CSSImportRule::create):
32         (WebCore):
33         (WebCore::CSSImportRule::CSSImportRule):
34         (WebCore::CSSImportRule::~CSSImportRule):
35         (WebCore::CSSImportRule::media):
36         (WebCore::CSSImportRule::cssText):
37         * css/CSSImportRule.h:
38         (WebCore):
39         (CSSImportRule):
40         (WebCore::CSSImportRule::mediaQueries):
41         * css/CSSMediaRule.cpp:
42         (WebCore::CSSMediaRule::CSSMediaRule):
43         (WebCore::CSSMediaRule::~CSSMediaRule):
44         (WebCore::CSSMediaRule::cssText):
45         * css/CSSMediaRule.h:
46         (WebCore::CSSMediaRule::create):
47         (WebCore::CSSMediaRule::media):
48         (WebCore::CSSMediaRule::mediaQueries):
49         (CSSMediaRule):
50         * css/CSSParser.cpp:
51         (WebCore::CSSParser::parseMediaQuery):
52         (WebCore::CSSParser::createMediaQuerySet):
53         (WebCore::CSSParser::createImportRule):
54         (WebCore::CSSParser::createMediaRule):
55         (WebCore::CSSParser::updateLastMediaLine):
56         * css/CSSParser.h:
57         (WebCore):
58         (CSSParser):
59         * css/CSSStyleSelector.cpp:
60         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
61         * css/CSSStyleSheet.cpp:
62         (WebCore):
63         (WebCore::CSSStyleSheet::media):
64         (WebCore::CSSStyleSheet::setMediaQueries):
65         * css/CSSStyleSheet.h:
66         (WebCore):
67         (CSSStyleSheet):
68         (WebCore::CSSStyleSheet::mediaQueries):
69         * css/MediaList.cpp:
70         (WebCore):
71         (WebCore::MediaQuerySet::MediaQuerySet):
72         (WebCore::MediaQuerySet::~MediaQuerySet):
73         (WebCore::parseMediaDescriptor):
74         (WebCore::MediaQuerySet::parse):
75         (WebCore::MediaQuerySet::add):
76         (WebCore::MediaQuerySet::remove):
77         (WebCore::MediaQuerySet::addMediaQuery):
78         (WebCore::MediaQuerySet::mediaText):
79         (WebCore::MediaQuerySet::ensureMediaList):
80         
81             - Use OwnPtr<> for MediaQuery ownership.
82             - Move the appropriate functions to MediaQuerySet.
83             - Clean up a bit to make this more readable and better aligned to WebKit style.
84         
85         (WebCore::MediaList::MediaList):
86         (WebCore::MediaList::~MediaList):
87         (WebCore::MediaList::setMediaText):
88         (WebCore::MediaList::item):
89         (WebCore::MediaList::deleteMedium):
90         (WebCore::MediaList::appendMedium):
91         * css/MediaList.h:
92         (WebCore):
93         (WebCore::MediaQuerySet::create):
94         (WebCore::MediaQuerySet::createAllowingDescriptionSyntax):
95         (MediaQuerySet):
96         (WebCore::MediaQuerySet::queryVector):
97         (WebCore::MediaQuerySet::lastLine):
98         (WebCore::MediaQuerySet::setLastLine):
99         (MediaList):
100         (WebCore::MediaList::ref):
101         (WebCore::MediaList::deref):
102         (WebCore::MediaList::length):
103         (WebCore::MediaList::mediaText):
104         (WebCore::MediaList::queries):
105         * css/MediaQueryEvaluator.cpp:
106         (WebCore::MediaQueryEvaluator::eval):
107         * css/MediaQueryEvaluator.h:
108         (WebCore):
109         (MediaQueryEvaluator):
110         * css/MediaQueryList.cpp:
111         (WebCore::MediaQueryList::create):
112         (WebCore::MediaQueryList::MediaQueryList):
113         * css/MediaQueryList.h:
114         (WebCore):
115         (MediaQueryList):
116         * css/MediaQueryMatcher.cpp:
117         (WebCore::MediaQueryMatcher::evaluate):
118         (WebCore::MediaQueryMatcher::matchMedia):
119         * css/MediaQueryMatcher.h:
120         (WebCore):
121         (MediaQueryMatcher):
122         * css/StyleMedia.cpp:
123         (WebCore::StyleMedia::matchMedium):
124         * css/StyleSheet.cpp:
125         (WebCore::StyleSheet::~StyleSheet):
126         
127             Move the media query ownership to CSSStyleSheet where it belongs.
128         
129         (WebCore):
130         * css/StyleSheet.h:
131         (WebCore::StyleSheet::media):
132         (StyleSheet):
133         * dom/DOMImplementation.cpp:
134         (WebCore::DOMImplementation::createCSSStyleSheet):
135         * dom/ProcessingInstruction.cpp:
136         (WebCore::ProcessingInstruction::setCSSStyleSheet):
137         * dom/StyleElement.cpp:
138         (WebCore::StyleElement::createSheet):
139         * html/HTMLLinkElement.cpp:
140         (WebCore::HTMLLinkElement::process):
141         (WebCore::HTMLLinkElement::setCSSStyleSheet):
142         * html/HTMLMediaElement.cpp:
143         (WebCore::HTMLMediaElement::selectNextSourceChild):
144         * html/parser/HTMLPreloadScanner.cpp:
145         (WebCore::HTMLNames::PreloadTask::linkMediaAttributeIsScreen):
146         * inspector/InspectorStyleSheet.cpp:
147         (WebCore::buildMediaObject):
148
149 2012-03-26  Zeno Albisser  <zeno@webkit.org>
150
151         [Qt]WK2] TextureMapperShaderManager should query the program map before creating new shader program instances.
152         https://bugs.webkit.org/show_bug.cgi?id=82178
153
154         If TextureMapperShaderManager already has a reference to an instance of the
155         requested shader program type, this instance should be reused instead of
156         creating a new one.
157
158         Reviewed by Noam Rosenthal.
159
160         * platform/graphics/texmap/TextureMapperShaderManager.h:
161         (WebCore::TextureMapperShaderManager::getShaderProgram):
162
163 2012-03-26  Yury Semikhatsky  <yurys@chromium.org>
164
165         [Chromium] Web Inspector: dedicated worker inspector is empty
166         https://bugs.webkit.org/show_bug.cgi?id=82181
167
168         "beforeunload" event for worker inspector front-end is ingnored if the
169         window url is "about:blank" as it is just unload of the default content
170         before the front-end page load.
171
172         Reviewed by Pavel Feldman.
173
174         * inspector/front-end/WorkerManager.js:
175         (WebInspector.WorkerManager.prototype._workerInspectorClosing):
176
177 2012-03-22  Yury Semikhatsky  <yurys@chromium.org>
178
179         Web Inspector: split nodes and containment edges into two different arrays
180         https://bugs.webkit.org/show_bug.cgi?id=81930
181
182         Extract heap profile nodes and edges into two separate arrays. This
183         way we will have a continuous array of the heap graph nodes and can
184         aviod additional mapping between node index and its position in the
185         heap snapshot.
186
187         Reviewed by Pavel Feldman.
188
189         * inspector/front-end/HeapSnapshot.js:
190         (WebInspector.HeapSnapshot.prototype._init):
191         (WebInspector.HeapSnapshot.prototype._buildContinuousNodeArray):
192         (WebInspector.HeapSnapshot.prototype._createOnlyNodesArray):
193         (WebInspector.HeapSnapshot.prototype._restoreNodeTypes):
194         (WebInspector.HeapSnapshot.prototype._createRetainmentEdgesArray):
195         (WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray):
196         * inspector/front-end/HeapSnapshotProxy.js:
197         (WebInspector.HeapSnapshotWorker):
198
199 2012-03-22  Pavel Podivilov  <podivilov@chromium.org>
200
201         Web Inspector: move resource loading logic from SourceMapParser to CompilerScriptMapping.
202         https://bugs.webkit.org/show_bug.cgi?id=81897
203
204         Reviewed by Vsevolod Vlasov.
205
206         SourceMapParser should only deal with payload parsing.
207
208         * inspector/front-end/CompilerScriptMapping.js:
209         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
210         (WebInspector.CompilerScriptMapping.prototype.addScript):
211         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
212         (WebInspector.SourceMapPayload):
213         (WebInspector.SourceMapParser):
214         (WebInspector.SourceMapParser.prototype.sourceContent):
215         (WebInspector.SourceMapParser.prototype.findEntry):
216         (WebInspector.SourceMapParser.prototype.findEntryReversed):
217         * inspector/front-end/ContentProviders.js:
218         (WebInspector.CompilerSourceMappingContentProvider):
219         (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent):
220
221 2012-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
222
223         Web Inspector: replace indexOf('a text') === 0 with RegExp because it is much faster.
224         https://bugs.webkit.org/show_bug.cgi?id=82175
225
226         We were using aString.indexOf("Window") but it is not effective from performance point of view.
227         I'm replaced it with RegExp.
228
229         Reviewed by Yury Semikhatsky.
230
231         * inspector/front-end/HeapSnapshot.js:
232         (WebInspector.HeapSnapshotNode.prototype.get isWindow):
233         (WebInspector.HeapSnapshotNode.prototype.get isDetachedDOMTree):
234
235 2012-03-26  Pavel Feldman  <pfeldman@chromium.org>
236
237         Web Inspector: breakpoints should be disabled while live editing JavaScript.
238         https://bugs.webkit.org/show_bug.cgi?id=81947
239
240         Reviewed by Yury Semikhatsky.
241
242         This change disables (removes from the backend) the breakpoints while editing script.
243         Undoing or committing the change restores the breakpoints. Main logic is implemented within
244         JavaScriptSourceFrame, but it required minor tweaking of the text editor: more correct
245         undo/redo wrapper and better detection of the noop opterations.
246
247         * inspector/front-end/JavaScriptSourceFrame.js:
248         (WebInspector.JavaScriptSourceFrame):
249         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
250         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
251         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
252         (WebInspector.JavaScriptSourceFrame.prototype.addBreakpoint):
253         (WebInspector.JavaScriptSourceFrame.prototype.removeBreakpoint):
254         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
255         * inspector/front-end/TextEditorModel.js:
256         (WebInspector.TextEditorModel.endsWithBracketRegex.):
257         * inspector/front-end/TextViewer.js:
258         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.before):
259         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.after):
260         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
261         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
262
263 2012-03-25  Nat Duca  <nduca@chromium.org>
264
265         [chromium] Route willBeginFrame from compositor to WebWidget
266         https://bugs.webkit.org/show_bug.cgi?id=82171
267
268         Reviewed by Darin Fisher.
269
270         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
271         (CCLayerTreeHostClient):
272         (WebCore::CCLayerTreeHost::willBeginFrame):
273         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
274         (WebCore::CCThreadProxy::beginFrame):
275
276 2012-03-25  Hayato Ito  <hayato@chromium.org>
277
278         [Shadow DOM] Add Reified DOM Tree traversal internal APIs.
279         https://bugs.webkit.org/show_bug.cgi?id=79197
280
281         Reviewed by Dimitri Glazkov.
282
283         Add internal APIs which can be used to traverse Reified DOM tree, which is
284         a result of node distribution algorithm explained in Shadow DOM spec.
285         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
286
287         Every public functions defined in ReifiedTreeTraversal are static
288         functions and are named in a similar way to ones defined in WebCore::Node class.
289         The only difference is that ReifiedTreeTraversal APIs consider shadow
290         hosts and also traverse nodes is Shadow DOM subtrees, crossing shadow's upper and lower boundary
291         transparently.
292
293         There is no actual client which uses these APIs. Follow-up patches for FocusNavigation
294         and EventDispatcher will use the APIs so that they can traverse node in reified tree order.
295
296         Test: fast/dom/shadow/reified-tree-traversal.html
297
298         * CMakeLists.txt:
299         * GNUmakefile.list.am:
300         * Target.pri:
301         * WebCore.exp.in:
302         * WebCore.gypi:
303         * WebCore.vcproj/WebCore.vcproj:
304         * WebCore.xcodeproj/project.pbxproj:
305         * dom/ReifiedTreeTraversal.cpp: Added.
306         (WebCore):
307         (WebCore::isShadowHost):
308         (WebCore::shadowTreeFor):
309         (WebCore::shadowTreeOfParent):
310         (WebCore::ReifiedTreeTraversal::firstChild):
311         (WebCore::ReifiedTreeTraversal::lastChild):
312         (WebCore::ReifiedTreeTraversal::lastChildWithoutCrossingUpperBoundary):
313         (WebCore::ReifiedTreeTraversal::traverseChild):
314         (WebCore::ReifiedTreeTraversal::traverseLightChildren):
315         (WebCore::ReifiedTreeTraversal::traverseNode):
316         (WebCore::ReifiedTreeTraversal::nextSibling):
317         (WebCore::ReifiedTreeTraversal::previousSibling):
318         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToInsertionPoint):
319         (WebCore::ReifiedTreeTraversal::traverseSiblingInCurrentTree):
320         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToYoungerShadowRoot):
321         (WebCore::ReifiedTreeTraversal::escapeFallbackContentElement):
322         (WebCore::ReifiedTreeTraversal::traverseNodeEscapingFallbackContents):
323         (WebCore::ReifiedTreeTraversal::parentNode):
324         (WebCore::ReifiedTreeTraversal::parentNodeWithoutCrossingUpperBoundary):
325         (WebCore::ReifiedTreeTraversal::parentNodeOrBackToInsertionPoint):
326         (WebCore::ReifiedTreeTraversal::parentNodeInCurrentTree):
327         (WebCore::ReifiedTreeTraversal::parentNodeBackToYoungerShadowRootOrHost):
328         (WebCore::ReifiedTreeTraversal::adjustedParentNode):
329         (WebCore::ReifiedTreeTraversal::traverseNextNode):
330         (WebCore::ReifiedTreeTraversal::traverseNextNodeWithoutCrossingUpperBoundary):
331         (WebCore::ReifiedTreeTraversal::traversePreviousNode):
332         (WebCore::ReifiedTreeTraversal::traversePreviousNodeWithoutCrossingUpperBoundary):
333         * dom/ReifiedTreeTraversal.h: Added.
334         (WebCore):
335         (ReifiedTreeTraversal):
336         * dom/ShadowTree.cpp:
337         (WebCore::ShadowTree::insertionPointFor):
338         (WebCore::ShadowTree::selectionFor):
339         (WebCore):
340         * dom/ShadowTree.h:
341         (WebCore):
342         (ShadowTree):
343         * html/shadow/HTMLContentSelector.cpp:
344         (WebCore::HTMLContentSelector::findFor):
345         * html/shadow/HTMLContentSelector.h:
346         (HTMLContentSelectionSet):
347         (WebCore::HTMLContentSelectionSet::find):
348         (HTMLContentSelector):
349         * html/shadow/InsertionPoint.h:
350         (WebCore::isInsertionPoint):
351         (WebCore::toInsertionPoint):
352         (WebCore):
353         * testing/Internals.cpp:
354         (WebCore::Internals::nextSiblingInReifiedTree):
355         (WebCore):
356         (WebCore::Internals::firstChildInReifiedTree):
357         (WebCore::Internals::lastChildInReifiedTree):
358         (WebCore::Internals::traverseNextNodeInReifiedTree):
359         (WebCore::Internals::traversePreviousNodeInReifiedTree):
360         * testing/Internals.h:
361         (Internals):
362         * testing/Internals.idl:
363
364 2012-03-25  Nikita Vasilyev  <me@elv1s.ru>
365
366         Web Inspector: Indenting fully selected line should not indent the line next to it
367         https://bugs.webkit.org/show_bug.cgi?id=81758
368
369         In the editor, you can select a whole line by moving caret at 0 column
370         position and pressing Shift + Arrow Down/Up. After that, pressing Tab
371         indents 2 lines: fully selected one and the line next to it. The patch
372         changes this behaviour to indent only fully selected line since that is
373         what pretty-match all the other code editors do.
374
375         Reviewed by Pavel Feldman.
376
377         Test: inspector/editor/indentation.html
378
379         * inspector/front-end/TextViewer.js:
380         (WebInspector.TextEditorMainPanel.prototype._indentLines):
381             Do not insert indent at the begging of the last line if a selection
382             ends on its 0 column.
383         (WebInspector.TextEditorMainPanel.prototype._unindentLines):
384             Do not remove indent at the begging of the last line if a selection
385             ends on its 0 column.
386
387 2012-03-25  Abhishek Arya  <inferno@chromium.org>
388
389         Crash in ContainerNode::resumePostAttachCallbacks.
390         https://bugs.webkit.org/show_bug.cgi?id=82159
391
392         Reviewed by Hajime Morita.
393
394         Test: plugins/object-onfocus-mutation-crash.html
395
396         * dom/ContainerNode.cpp:
397         (WebCore::ContainerNode::resumePostAttachCallbacks): dispatching post attach
398         callbacks when our attach depth is 1 can fire mutation events such as onfocus
399         which can blow away |this|. Need to protect it with a RefPtr.
400         * html/HTMLPlugInImageElement.cpp:
401         (WebCore::HTMLPlugInImageElement::attach): add calls to suspend attach callbacks
402         until the function completes.
403
404 2012-03-25  Dana Jansens  <danakj@chromium.org>
405
406         [chromium] Layers with animating transforms should prepaint even if they are not visible yet
407         https://bugs.webkit.org/show_bug.cgi?id=82117
408
409         Reviewed by Adrienne Walker.
410
411         For animating transforms, instead of early-outing when the layer's
412         visible rect is empty, let it prepaint regardless.
413
414         For now, we just only paint the outermost tiles, and only for small
415         layers, with at most 9 tiles.
416
417         This changes the behaviour of ContentLayerChromium's
418         idlePaintContentsIfDirty() so I've guarded the behaviour of the two
419         prepainting functions that it calls to ensure the old behaviour holds
420         without animations, and the new behaviour works with them.
421
422         Unit test: TiledLayerChromiumTest.idlePaintZeroSizedLayer
423                    TiledLayerChromiumTest.idlePaintZeroSizedAnimatingLayer
424                    TiledLayerChromiumTest.idlePaintNonVisibleLayers
425                    TiledLayerChromiumTest.idlePaintNonVisibleAnimatingLayers
426
427         * platform/graphics/chromium/ContentLayerChromium.cpp:
428         (WebCore::ContentLayerChromium::idlePaintContentsIfDirty):
429         * platform/graphics/chromium/TiledLayerChromium.cpp:
430         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
431         (WebCore::TiledLayerChromium::needsIdlePaint):
432         (WebCore::TiledLayerChromium::idlePaintRect):
433         * platform/graphics/chromium/TiledLayerChromium.h:
434         (WebCore::TiledLayerChromium::numPaintedTiles):
435         (TiledLayerChromium):
436
437 2012-03-25  Antti Koivisto  <antti@apple.com>
438
439         Don't use CSSRuleList for child rule ownership
440         https://bugs.webkit.org/show_bug.cgi?id=82127
441
442         Reviewed by Andreas Kling.
443
444         CSSMediaRule, WebKitCSSKeyframesRule and WebKitRegionRule use CSSRuleList for storing children. 
445         They should use a simple rule vector instead. CSSRuleList is a CSSOM type that should be 
446         instantiated on-demand for API purposes only.
447         
448         - Use Vector<RefPtr<CSSRule>> for storing the rule children of CSSMediaRule, WebKitCSSKeyframesRule 
449           and WebKitRegionRule.
450         - Add direct accessors, use internally instead of CSSRuleList.
451         - Make CSSRuleList an abstract base. Add concrete subclasses for dealing with the underlying storage.
452         - Instantiate CSSRuleLists on-demand.
453         - Make CSSStyleSheet.cssRules always return the same object instance. This matches Firefox and the rest
454           of our CSSOM implementation. Tested by fast/dom/gc-9.html.
455           
456         The patch decouples internals from the external API. It simplifies the child rule ownership and reduces 
457         indirection. Memory use of css rules with children is reduced (by a ptr, refcount and heap allocation overhead).
458
459         * css/CSSGrammar.y:
460         * css/CSSMediaRule.cpp:
461         (WebCore::CSSMediaRule::CSSMediaRule):
462         (WebCore::CSSMediaRule::~CSSMediaRule):
463         (WebCore::CSSMediaRule::append):
464         (WebCore::CSSMediaRule::insertRule):
465         (WebCore::CSSMediaRule::deleteRule):
466         (WebCore::CSSMediaRule::cssText):
467         (WebCore::CSSMediaRule::cssRules):
468         * css/CSSMediaRule.h:
469         (WebCore::CSSMediaRule::create):
470         (CSSMediaRule):
471         (WebCore::CSSMediaRule::ruleCount):
472         (WebCore::CSSMediaRule::ruleAt):
473         * css/CSSParser.cpp:
474         (WebCore::CSSParser::createMediaRule):
475         (WebCore::CSSParser::createRuleList):
476         (WebCore::CSSParser::createRegionRule):
477         * css/CSSParser.h:
478         (WebCore):
479         * css/CSSRuleList.cpp:
480         (WebCore):
481         (WebCore::StaticCSSRuleList::StaticCSSRuleList):
482         (WebCore::StaticCSSRuleList::~StaticCSSRuleList):
483         (WebCore::StaticCSSRuleList::deref):
484         (WebCore::StaticCSSRuleList::item):        
485         * css/CSSRuleList.h:
486         (CSSRuleList):
487
488             Turn CSSRuleList into abstract interface.
489                     
490         (StaticCSSRuleList):
491         (WebCore::StaticCSSRuleList::create):
492         (WebCore::StaticCSSRuleList::ref):
493         (WebCore::StaticCSSRuleList::rules):
494         (WebCore::StaticCSSRuleList::styleSheet):
495         (WebCore::StaticCSSRuleList::length):
496         
497             Concrete implementation for fixed list of rules.
498     
499         (WebCore):
500         (LiveCSSRuleList):
501         (WebCore::LiveCSSRuleList::LiveCSSRuleList):
502         (WebCore::LiveCSSRuleList::ref):
503         (WebCore::LiveCSSRuleList::deref):
504         (WebCore::LiveCSSRuleList::length):
505         (WebCore::LiveCSSRuleList::item):
506         (WebCore::LiveCSSRuleList::styleSheet):
507         
508             Concrete implemenation for live list backed by the underlying container rule.
509             LiveCSSRuleList is owned by the underlying rule. Refcount is forwarded. 
510         
511         * css/CSSStyleSelector.cpp:
512         (WebCore::CSSStyleSelector::sortAndTransferMatchedRules):
513         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
514         * css/CSSStyleSelector.h:
515         (CSSStyleSelector):
516         * css/CSSStyleSheet.cpp:
517         
518             The same scheme for CSSStyleSheet.cssRule as with container rules.
519         
520         (StyleSheetCSSRuleList):
521         (WebCore::StyleSheetCSSRuleList::StyleSheetCSSRuleList):
522         (WebCore::StyleSheetCSSRuleList::ref):
523         (WebCore::StyleSheetCSSRuleList::deref):
524         (WebCore::StyleSheetCSSRuleList::length):
525         (WebCore::StyleSheetCSSRuleList::item):
526         (WebCore::StyleSheetCSSRuleList::styleSheet):
527         (WebCore):
528         (WebCore::CSSStyleSheet::rules):
529         (WebCore::CSSStyleSheet::cssRules):
530         * css/CSSStyleSheet.h:
531         (CSSStyleSheet):
532         * css/WebKitCSSKeyframesRule.cpp:
533         (WebCore::WebKitCSSKeyframesRule::WebKitCSSKeyframesRule):
534         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
535         (WebCore):
536         (WebCore::WebKitCSSKeyframesRule::append):
537         (WebCore::WebKitCSSKeyframesRule::deleteRule):
538         (WebCore::WebKitCSSKeyframesRule::findRule):
539         (WebCore::WebKitCSSKeyframesRule::findRuleIndex):
540         (WebCore::WebKitCSSKeyframesRule::cssText):
541         (WebCore::WebKitCSSKeyframesRule::cssRules):
542         * css/WebKitCSSKeyframesRule.h:
543         (WebKitCSSKeyframesRule):
544         (WebCore::WebKitCSSKeyframesRule::ruleCount):
545         (WebCore::WebKitCSSKeyframesRule::ruleAt):
546         (WebCore::WebKitCSSKeyframesRule::length):
547         (WebCore::WebKitCSSKeyframesRule::item):
548         * css/WebKitCSSRegionRule.cpp:
549         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
550         (WebCore::WebKitCSSRegionRule::~WebKitCSSRegionRule):
551         (WebCore::WebKitCSSRegionRule::cssText):
552         (WebCore::WebKitCSSRegionRule::cssRules):
553         * css/WebKitCSSRegionRule.h:
554         * inspector/InspectorStyleSheet.cpp:
555         (WebCore::asCSSRuleList):
556         (WebCore::InspectorStyleSheet::addRule):
557         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
558
559 2012-03-25  Kentaro Hara  <haraken@chromium.org>
560
561         Remove duplicated GenerateConditionalString() from code generators
562         https://bugs.webkit.org/show_bug.cgi?id=82148
563
564         Reviewed by Adam Barth.
565
566         Previously GenerateConditionalString()s were defined in each code generator,
567         and they were doing the same thing. This patch puts GenerateConditionalString()
568         in CodeGenerator.pm and removes duplicated GenerateConditionalString()s.
569
570         No tests. No change in the generated code.
571
572         * bindings/scripts/CodeGenerator.pm:
573         (GenerateConditionalString):
574         * bindings/scripts/CodeGeneratorCPP.pm:
575         (GenerateHeader):
576         (GenerateImplementation):
577         * bindings/scripts/CodeGeneratorGObject.pm:
578         (GenerateProperty):
579         (GenerateProperties):
580         (GenerateFunction):
581         (WriteData):
582         * bindings/scripts/CodeGeneratorJS.pm:
583         (GenerateHeaderContentHeader):
584         (GenerateImplementationContentHeader):
585         (GenerateHeader):
586         (GenerateImplementation):
587         (GenerateCallbackHeader):
588         (GenerateCallbackImplementation):
589         * bindings/scripts/CodeGeneratorObjC.pm:
590         (GenerateHeader):
591         (GenerateImplementation):
592         * bindings/scripts/CodeGeneratorV8.pm:
593         (GenerateHeader):
594         (GenerateNormalAttrGetter):
595         (GenerateNormalAttrSetter):
596         (GenerateOverloadedFunctionCallback):
597         (GenerateFunctionCallback):
598         (GenerateBatchedAttributeData):
599         (GenerateImplementation):
600         (GenerateHeaderContentHeader):
601         (GenerateImplementationContentHeader):
602         (GenerateCallbackHeader):
603         (GenerateCallbackImplementation):
604
605 2012-03-25  Kentaro Hara  <haraken@chromium.org>
606
607         Move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*, and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.*
608         https://bugs.webkit.org/show_bug.cgi?id=82146
609
610         Reviewed by Adam Barth.
611
612         Now SQLDatabase is renamed to WebDatabase (See Modules/webdatabase/).
613         We should move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*,
614         and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.*.
615         We'll rename the SQL_DATABASE flag to the WEB_DATABASE flag in a follow-up patch.
616
617         No tests. No change in behavior.
618
619         * Modules/webdatabase/DOMWindowWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.cpp.
620         (WebCore):
621         (WebCore::DOMWindowWebDatabase::openDatabase):
622         * Modules/webdatabase/DOMWindowWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.h.
623         (WebCore):
624         (DOMWindowWebDatabase):
625         (WebCore::DOMWindowWebDatabase::DOMWindowWebDatabase):
626         (WebCore::DOMWindowWebDatabase::~DOMWindowWebDatabase):
627         * Modules/webdatabase/DOMWindowWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.idl.
628         * Modules/webdatabase/WorkerContextWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.cpp.
629         (WebCore):
630         (WebCore::WorkerContextWebDatabase::openDatabase):
631         (WebCore::WorkerContextWebDatabase::openDatabaseSync):
632         * Modules/webdatabase/WorkerContextWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.h.
633         (WebCore):
634         (WorkerContextWebDatabase):
635         (WebCore::WorkerContextWebDatabase::WorkerContextWebDatabase):
636         (WebCore::WorkerContextWebDatabase::~WorkerContextWebDatabase):
637         * Modules/webdatabase/WorkerContextWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.idl.
638
639         * DerivedSources.make:
640         * DerivedSources.pri:
641         * GNUmakefile.list.am:
642         * Target.pri:
643         * WebCore.gypi:
644         * WebCore.vcproj/WebCore.vcproj:
645         * WebCore.xcodeproj/project.pbxproj:
646
647 2012-03-25  Philip Rogers  <pdr@google.com>
648
649         Avoid race condition when iterating over pending resources
650         https://bugs.webkit.org/show_bug.cgi?id=82115
651
652         Reviewed by Nikolas Zimmermann.
653
654         We can hit a race condition in SVGStyledElement::buildPendingResourcesIfNeeded
655         where pending elements can become non-pending while we iterate over them.
656
657         This patch cleans up buildPendingResourcesIfNeeded and re-works how pending
658         resources are removed. Because pending resources can be modified while
659         iterating over them, we introduce m_pendingResourcesForRemoval that
660         holds pending resources that are marked for removal. Instead of iterating
661         over this list we simply remove each pending resource from
662         m_pendingResourcesForRemoval; if a pending resource is modified or removed
663         during the processing of another pending resource this list is updated before
664         the next element can be accessed.
665
666         This change also removes removePendingResourceForElement which is no longer
667         referenced.
668
669         Test: http/tests/svg/change-id-with-pending-resources.html
670
671         * svg/SVGDocumentExtensions.cpp:
672         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
673         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
674         (WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
675         (WebCore):
676         (WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval):
677         (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
678         * svg/SVGDocumentExtensions.h:
679         (SVGDocumentExtensions):
680         * svg/SVGStyledElement.cpp:
681         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
682
683 2012-03-25  Arvid Nilsson  <anilsson@rim.com>
684
685         [BlackBerry] Accelerated compositing layers fail to render when using WebPageCompositor
686         https://bugs.webkit.org/show_bug.cgi?id=82104
687         RIM PR: 145963
688
689         Reviewed by Rob Buis.
690
691         The embedder may use vertex buffers, which affected the interpretation
692         our vertex array pointers from memory pointers to offsets into a vertex
693         buffer. The resulting geometry often resulted in no visible layers on
694         screen.
695
696         Fixed by getting rid of any bound buffer when we enter
697         LayerRenderer::drawLayers().
698
699         * platform/graphics/blackberry/LayerRenderer.cpp:
700         (WebCore::LayerRenderer::drawLayers):
701
702 2012-03-24  Nat Duca  <nduca@chromium.org>
703
704         [chromium] Instrument gesture animations with async traces
705         https://bugs.webkit.org/show_bug.cgi?id=82076
706
707         Reviewed by Adrienne Walker.
708
709         * platform/ActivePlatformGestureAnimation.cpp:
710         (WebCore::ActivePlatformGestureAnimation::~ActivePlatformGestureAnimation):
711         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
712         * platform/PlatformGestureCurve.h:
713         (PlatformGestureCurve):
714         * platform/TouchpadFlingPlatformGestureCurve.h:
715         (WebCore::TouchpadFlingPlatformGestureCurve::debugName):
716         * platform/WheelFlingPlatformGestureCurve.h:
717         (WebCore::WheelFlingPlatformGestureCurve::debugName):
718         * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp:
719         (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
720         (WebCore::CCActiveGestureAnimation::~CCActiveGestureAnimation):
721         * platform/graphics/chromium/cc/CCGestureCurve.h:
722         (CCGestureCurve):
723
724 2012-03-24  Jeffrey Pfau  <jpfau@apple.com>
725
726         XML error document creation should not fire mutation events
727         https://bugs.webkit.org/show_bug.cgi?id=80765
728
729         Reviewed by Adam Barth.
730
731         Broke two tests that expected the old behavior, which have now been updated.
732
733         * xml/XMLErrors.cpp:
734         (WebCore::createXHTMLParserErrorHeader):
735         (WebCore::XMLErrors::insertErrorMessageBlock):
736
737 2012-03-24  Florin Malita  <fmalita@google.com>
738
739         ForeignObject content is zoomed two times
740         https://bugs.webkit.org/show_bug.cgi?id=76282
741
742         Reviewed by Nikolas Zimmermann.
743
744         Test: svg/zoom/page/zoom-foreign-content.svg
745
746         Reset the effective zoom property for FO-nested content to avoid
747         having the zoom factor applied multiple times (zooming is handled by
748         the top level SVG root element).
749
750         * css/CSSStyleSelector.cpp:
751         (WebCore::CSSStyleSelector::adjustRenderStyle):
752
753 2012-03-24  Chris Fleizach  <cfleizach@apple.com>
754
755         AX: Support solution to handle invalid ax text marker
756         https://bugs.webkit.org/show_bug.cgi?id=82023
757
758         Reviewed by Oliver Hunt.
759
760         This provides methods to better use text markers so that assistive technologies
761         can know when they are valid, and can convert them to and from absolute positions.
762
763         Test: platform/mac/accessibility/textmarker-routines.html
764
765         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
766         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
767         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
768         (-[WebAccessibilityObjectWrapper _indexForTextMarker:]):
769         (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
770         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
771
772 2012-03-24  Victor Carbune  <vcarbune@adobe.com>
773
774         Quick fix for rendering controls regression.
775         https://bugs.webkit.org/show_bug.cgi?id=82125
776
777         Reviewed by Eric Carlson.
778
779         Only temporary fix. Tests to cover the problem should be added
780
781         * html/shadow/MediaControlElements.cpp:
782         (WebCore::MediaControlPanelElement::makeOpaque): The display:none
783         property should be toggled only by the media element now.
784         (WebCore::MediaControlPanelElement::makeTransparent): The timer
785         that toggles the dispalay:none shouldn't be used now.
786
787 2012-03-24  Kevin Ollivier  <kevino@theolliviers.com>
788
789         [wx] Unreviewed. Add header needed for compilation.
790
791         * html/shadow/TextFieldDecorationElement.cpp:
792
793 2012-03-24  Abhishek Arya  <inferno@chromium.org>
794
795         Crash in ApplyStyleCommand::applyInlineStyleToNodeRange.
796         https://bugs.webkit.org/show_bug.cgi?id=81959
797
798         Reviewed by Ryosuke Niwa.
799
800         Test: editing/execCommand/apply-style-command-crash.html
801
802         * editing/ApplyStyleCommand.cpp:
803         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): RefPtr the weak
804         node iterator |node|.
805         * editing/ApplyStyleCommand.h:
806         (ApplyStyleCommand): convert |startNode| and |pastEndNode| into PassRefPtr.
807
808 2012-03-24  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
809
810         Unreviewed, build fix since we use "-Werror=unused-but-set-variable".
811
812         The variable 'it' was set at TextureMapperShaderManager.h:110 but never used.
813
814         * platform/graphics/texmap/TextureMapperShaderManager.h:
815         (WebCore::TextureMapperShaderManager::getShaderProgram):
816
817 2012-03-24  Zeno Albisser  <zeno@webkit.org>
818
819         [Qt][WK2] Make TextureMapperShaderManager::getShaderProgram() not be a template.
820         https://bugs.webkit.org/show_bug.cgi?id=82049
821
822         Change the getShaderProgram() function to not be a template.
823         This is a workaround for a compiler bug that leads to an assert
824         when compiling in debug mode on mac.
825
826         Reviewed by Noam Rosenthal.
827
828         * platform/graphics/texmap/TextureMapperGL.cpp:
829         (WebCore::TextureMapperGL::drawTexture):
830         (WebCore::TextureMapperGL::beginClip):
831         * platform/graphics/texmap/TextureMapperShaderManager.h:
832         (TextureMapperShaderProgram):
833         (WebCore::TextureMapperShaderManager::getShaderProgram):
834         (TextureMapperShaderManager):
835
836 2012-03-23  Shawn Singh  <shawnsingh@chromium.org>
837
838         [chromium] Incorrect replica originTransform used in CCDamageTracker
839         https://bugs.webkit.org/show_bug.cgi?id=82118
840
841         Reviewed by Adrienne Walker.
842
843         Unit test added to CCDamageTrackerTest.cpp
844
845         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
846         (WebCore::CCDamageTracker::extendDamageForRenderSurface):
847
848 2012-03-23  Dana Jansens  <danakj@chromium.org>
849
850         [chromium] When prepainting fails, tiles dirty rects may be cleared
851         https://bugs.webkit.org/show_bug.cgi?id=82107
852
853         Reviewed by Adrienne Walker.
854
855         When prepainting, if a tile is unable to be reserved due to memory
856         limits, we bail out of prepareToUpdateTiles. But we would have
857         cleared the dirty rect of any previous tiles. This leaves them
858         in a bad state where their textures are reserved, but their textureIds
859         are set to 0, and they are not marked dirty. This means that they will
860         not be updated and displayed if they become visible, since it is
861         assumed that valid textures with zero textureId must have a dirty
862         region.
863
864         We fix this by not clearing the dirty rects until we know we are
865         going to update the layer.
866
867         Unit test: TiledLayerChromiumTest.pushTilesAfterIdlePaintFailed
868
869         * platform/graphics/chromium/TiledLayerChromium.cpp:
870         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
871         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
872         (WebCore::CCTiledLayerImpl::hasTextureIdForTileAt):
873         (WebCore):
874         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
875         (CCTiledLayerImpl):
876
877 2012-03-23  Stephanie Lewis  <slewis@apple.com>
878
879         https://bugs.webkit.org/show_bug.cgi?id=81963 WebProcess can get stuck in GC during many low memory signals.
880         <rdar://problem/11094830> WebProcess appears to get stuck in its GC handler (81963).
881         Remove the call to garbage collect  in low memory signal handler.  Did some testing with hitting the low memory handler
882         during Membuster and we would get back at most 100k - 200k.  That isn't enough to help the system, and in 
883         that state the GC collection can take a substantial amount of time.
884
885         Reviewed by Geoff Garen.
886
887         Performance Change, no change in behavior.
888
889         * platform/mac/MemoryPressureHandlerMac.mm:
890         (WebCore::MemoryPressureHandler::releaseMemory):
891
892 2012-03-23  W. James MacLean  <wjmaclean@chromium.org>
893
894         [chromium] CCLayerTreeHostImpl::scrollBegin() should return ScrollFailed for CCInputHandlerClient::Gesture type when wheel handlers found.
895         https://bugs.webkit.org/show_bug.cgi?id=82106
896
897         Reviewed by Adrienne Walker.
898
899         Existing unit tests updated.
900
901         With gesture scroll events now being handled as mouse wheel events, we should not start a gesture scroll when
902         wheel handlers are present.
903
904         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
905         (WebCore::CCLayerTreeHostImpl::scrollBegin):
906
907 2012-03-23  Adam Barth  <abarth@webkit.org>
908
909         Move Notifications APIs from WorkerContext.idl to WorkerContextNotifications.idl
910         https://bugs.webkit.org/show_bug.cgi?id=79635
911
912         Reviewed by Kentaro Hara.
913
914         This patch moves the NotificationCenter from WorkerContext to
915         WorkerContextNotificiations, reducing clutter in WorkerContext.  After
916         this patch, Notifications are almost entirely contained in the
917         notifications directory.
918
919         * CMakeLists.txt:
920         * DerivedSources.make:
921         * DerivedSources.pri:
922         * GNUmakefile.list.am:
923         * Target.pri:
924         * WebCore.gypi:
925         * WebCore.vcproj/WebCore.vcproj:
926         * WebCore.xcodeproj/project.pbxproj:
927         * workers/WorkerContext.cpp:
928         (WebCore::WorkerContext::~WorkerContext):
929         * workers/WorkerContext.h:
930         (WebCore):
931         (WorkerContext):
932         * workers/WorkerContext.idl:
933
934 2012-03-23  Michal Mocny  <mmocny@google.com>
935
936         [chromium] RootLayer was not being checked for null causing segfaults very rarely.
937         https://bugs.webkit.org/show_bug.cgi?id=82111
938
939         Reviewed by Adrienne Walker.
940
941         * platform/graphics/chromium/LayerRendererChromium.cpp:
942         (WebCore::LayerRendererChromium::beginDrawingFrame):
943         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
944         (WebCore::CCLayerTreeHostImpl::drawLayers):
945
946 2012-03-23  Shawn Singh  <shawnsingh@chromium.org>
947
948         [chromium] Fix race bug that clobbers CCLayerImpl updateRect
949         https://bugs.webkit.org/show_bug.cgi?id=82109
950
951         Reviewed by Dirk Pranke.
952
953         If the main thread commits twice before the impl thread actually
954         draws, then the updateRect of the first frame gets lost forever,
955         and not propagated to the damage tracker.
956
957         The solution is to accumulate the updateRect. The CCLayerImpl
958         updateRect is already being correctly cleared at the appropriate
959         time after drawing.
960
961         Unit test added to LayerChromiumTest.cpp.
962
963         * platform/graphics/chromium/LayerChromium.cpp:
964         (WebCore::LayerChromium::pushPropertiesTo):
965
966 2012-03-23  Rafael Weinstein  <rafaelw@chromium.org>
967
968         [MutationObservers] attributeFilter should be case sensitive at all times
969         https://bugs.webkit.org/show_bug.cgi?id=81822
970
971         Reviewed by Ryosuke Niwa.
972
973         This removes the behavior in MutationObserverRegistration which treats
974         attributeFilter as case insensitive for HTML elements in HTML documents.
975
976         Relevant tests have been updated.
977
978         * dom/MutationObserverRegistration.cpp:
979         (WebCore::MutationObserverRegistration::resetObservation):
980         (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom):
981         * dom/MutationObserverRegistration.h:
982         (MutationObserverRegistration):
983
984 2012-03-23  Kentaro Hara  <haraken@chromium.org>
985
986         Move WebSocket APIs from WorkerContext.idl to WorkerContextWebSocket.idl
987         https://bugs.webkit.org/show_bug.cgi?id=79663
988
989         Reviewed by Adam Barth.
990
991         For WebKit modularization, this patch moves WebSocket APIs from WorkerContext.idl
992         to WorkerContextWebSocket.idl.
993
994         Tests: http/tests/websocket/tests/hybi/workers/* (No change in test results)
995
996         * CMakeLists.txt:
997         * DerivedSources.make:
998         * DerivedSources.pri:
999         * GNUmakefile.list.am:
1000         * Modules/websockets/WorkerContextWebSocket.idl: Added.
1001         * WebCore.gypi:
1002         * WebCore.xcodeproj/project.xcodeproj:
1003         * workers/WorkerContext.idl:
1004
1005 2012-03-23  Parag Radke  <parag@motorola.com>
1006
1007         REGRESSION: can select text of an input button
1008         https://bugs.webkit.org/show_bug.cgi?id=13624
1009
1010         Reviewed by Ryosuke Niwa.
1011
1012         Text in a button should never have a selection background of its own painted
1013         but if the button is inside an editable area, then the whole button should
1014         have it's selection background painted.
1015
1016         Test: editing/selection/selection-button-text.html
1017
1018         * rendering/RenderButton.h:
1019         Added implementation for the virtual function canBeSelectionLeaf()
1020         which returns true if the button renderer is editable, false other wise.
1021         * rendering/RenderTextFragment.h:
1022         Added implementation for the virtual function canBeSelectionLeaf()
1023         which returns true if the text fragment renderer is editable, false other wise.
1024
1025 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
1026
1027         Remove unnecessary ASSERT from LoadableTextTrack::trackElementIndex
1028         https://bugs.webkit.org/show_bug.cgi?id=82095
1029
1030         Reviewed by Dan Bernstein.
1031
1032         No new tests, removed a bogus ASSERT that was sometimes triggered by tests.
1033
1034         * html/track/LoadableTextTrack.cpp:
1035         (WebCore::LoadableTextTrack::trackElementIndex): Remove ASSERT.
1036
1037 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
1038
1039         Layout Test media/video-source-load.html is failing
1040         https://bugs.webkit.org/show_bug.cgi?id=82094
1041
1042         Reviewed by Alexey Proskuryakov.
1043
1044         No new tests, tested by media/video-source-load.html.
1045
1046         * html/HTMLMediaElement.cpp:
1047         (WebCore::HTMLMediaElement::sourceWasAdded): Set m_nextChildNodeToConsider when called 
1048             with networkState == NETWORK_EMPTY because the resource selection algorithm has
1049             not started yet.
1050
1051 2012-03-23  Alexey Proskuryakov  <ap@apple.com>
1052
1053         [Mac] No need for platform-specific ENABLE_BLOB values
1054         https://bugs.webkit.org/show_bug.cgi?id=82102
1055
1056         Reviewed by David Kilzer.
1057
1058         * Configurations/FeatureDefines.xcconfig:
1059
1060 2012-03-23  Kent Tamura  <tkent@chromium.org>
1061
1062         Add TextFieldDecorator and TextFieldDecorationElement
1063         https://bugs.webkit.org/show_bug.cgi?id=80580
1064
1065         Reviewed by Dimitri Glazkov.
1066
1067         These classes will be used to add a decoration icon to a text field
1068         <input> from outside of WebCore. We have a plan to use them in Chromium
1069         port. So this patch doesn't add TextFieldDecorationElement.{cpp,h} to
1070         non-Chromium build files.
1071
1072         How it works:
1073         When a shadow subtree for a text field is created, we ask ChromeClient
1074         to decorate it. ChromeClient appends a TextFieldDecorationElement to the
1075         existing shadow subtree or another shadow tree. A TextFieldDecorator is
1076         associated to a TextFieldDecorationElement, and it provides decoration
1077         icon images and a click handler.
1078
1079         No new tests. This patch won't make any behavior change for now.
1080
1081         * WebCore.gypi: Add TextFieldDecorationElement.cpp and TextFieldDecorationElement.h
1082         * dom/Element.h:
1083         (WebCore::Element::isTextFieldDecoration):
1084         * html/TextFieldInputType.cpp:
1085         (WebCore::TextFieldInputType::createShadowSubtree):
1086         Calls ChromeClient::willAddTextFieldDecorationsTo() and addTextFieldDecorationsTo().
1087         * html/shadow/TextFieldDecorationElement.cpp: Added.
1088         (WebCore::TextFieldDecorator::~TextFieldDecorator):
1089         (WebCore::TextFieldDecorationElement::TextFieldDecorationElement):
1090         (WebCore::TextFieldDecorationElement::create):
1091         (WebCore::TextFieldDecorationElement::isTextFieldDecoration):
1092         (WebCore::TextFieldDecorationElement::updateImage):
1093         (WebCore::TextFieldDecorationElement::customStyleForRenderer):
1094         Sets the size to a square of the font-size.
1095         (WebCore::TextFieldDecorationElement::createRenderer):
1096         Always creates a RenderImage.
1097         (WebCore::TextFieldDecorationElement::attach):
1098         Sets an image for appropriate state.
1099         (WebCore::TextFieldDecorationElement::isMouseFocusable):
1100         (WebCore::TextFieldDecorationElement::defaultEventHandler):
1101         Delegate a click event to the corresponding function of TextFieldDecorator.
1102         * html/shadow/TextFieldDecorationElement.h: Added.
1103         (TextFieldDecorator): Added.
1104         (TextFieldDecorationElement): Added.
1105         (WebCore::toTextFieldDecorationElement): Added.
1106         * page/ChromeClient.h:
1107         (WebCore::ChromeClient::willAddTextFieldDecorationsTo): Add an empty implementation.
1108         (WebCore::ChromeClient::addTextFieldDecorationsTo): ditto.
1109
1110 2012-03-23  Adam Klein  <adamk@chromium.org>
1111
1112         Match DOM4 spec with respect to DocumentFragment insertion
1113         https://bugs.webkit.org/show_bug.cgi?id=82089
1114
1115         Reviewed by Ryosuke Niwa.
1116
1117         DOM4 specifies the behavior of appendChild, insertBefore, and replaceChild
1118         in terms of "mutation algorithms":
1119
1120         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#mutation-algorithms
1121
1122         This change updates WebKit to match, in particular with regard to DocumentFragments.
1123         Previously, ContainerNode would remove nodes one at a time, then add them to the new parent.
1124         When combined with MutationObservers, this results in overly-verbose mutation records.
1125         Now we create as few records as possible, matching the spec as well as Gecko's implementation
1126         of MutationObservers.
1127
1128         Note that we still need to check validity each time through the loop,
1129         since inserting a node may dispatch events. In a future change, I hope
1130         to move these events so that they fire only after all nodes are inserted,
1131         but that's too much to tackle all in one.
1132
1133         Tests: fast/mutation/document-fragment-insertion.html
1134
1135         * dom/ContainerNode.cpp:
1136         (WebCore::collectChildrenAndRemoveFromOldParent): New helper method
1137         combining collectTargetNodes() with the removal of the collected nodes from
1138         their old parent, if any.
1139         (WebCore::ContainerNode::insertBefore): Use new helper method instead
1140         of removing nodes one at a time from the fragment.
1141         (WebCore::ContainerNode::replaceChild): ditto. Also removed some redundant asserts
1142         and moved the "do nothing" check out of the loop.
1143         (WebCore::ContainerNode::appendChild): Use new helper method.
1144
1145 2012-03-23  Stephen White  <senorblanco@chromium.org>
1146
1147         [skia] Switch to Skia's implementation of the feMorphology filter.
1148         https://bugs.webkit.org/show_bug.cgi?id=82085
1149
1150         Reviewed by Dirk Schulze.
1151
1152         Covered by existing tests in svg/filters/.
1153
1154         * WebCore.gypi:
1155         * platform/graphics/filters/FEMorphology.h:
1156         (FEMorphology):
1157         * platform/graphics/filters/skia/FEMorphologySkia.cpp: Added.
1158         (WebCore):
1159         (WebCore::FEMorphology::platformApplySkia):
1160
1161 2012-03-23  Adam Barth  <abarth@webkit.org>
1162
1163         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 3)
1164         https://bugs.webkit.org/show_bug.cgi?id=82027
1165
1166         Reviewed by Kentaro Hara.
1167
1168         Rather than watching for willDetachPage, NotificationCenter can just
1169         override ActiveDOMObject::stop directly to be notified when it needs to
1170         stop.
1171
1172         Switching NotificationCenter over to using ActiveDOMObject callbacks
1173         frees DOMWindowNotification to implement reconnectFrame.  However, this
1174         is only really a victory in princple because NotificationCenter always
1175         returns false for canSuspend(), which means we'll never actually use
1176         the reconnectFrame functionality.  However, this patch does move us
1177         closer to the time when NotificationCenter can implement
1178         ActiveDOMObject::suspend/resume to play nice with the PageCache.
1179
1180         * notifications/DOMWindowNotifications.cpp:
1181         (WebCore::DOMWindowNotifications::disconnectFrame):
1182         (WebCore::DOMWindowNotifications::reconnectFrame):
1183         * notifications/DOMWindowNotifications.h:
1184         (DOMWindowNotifications):
1185         * notifications/NotificationCenter.cpp:
1186         (WebCore::NotificationCenter::NotificationCenter):
1187         (WebCore::NotificationCenter::stop):
1188         * notifications/NotificationCenter.h:
1189         (NotificationCenter):
1190
1191 2012-03-23  Daniel Cheng  <dcheng@chromium.org>
1192
1193         [chromium] Support file drag out using DataTransferItemList::add(File)
1194         https://bugs.webkit.org/show_bug.cgi?id=81261
1195
1196         Reviewed by Tony Chang.
1197
1198         Original patch by Varun Jain <varunjain@chromium.org>.
1199         I've updated the original patch to remove 'downloadurl' handling since it's not tested, nor
1200         is it necessary for File objects, since File objects correspond to a native filesystem path.
1201
1202         Test: fast/events/drag-dataTransferItemList-file-handling.html
1203
1204         * platform/chromium/DataTransferItemListChromium.cpp:
1205         (WebCore::DataTransferItemListChromium::add):
1206
1207 2012-03-23  Zan Dobersek  <zandobersek@gmail.com>
1208
1209         [GObject bindings] Supplemental interfaces are not disabled with the "Conditional" attribute
1210         https://bugs.webkit.org/show_bug.cgi?id=80030
1211
1212         Reviewed by Martin Robinson.
1213
1214         Changes in CodeGeneratorGObject.pm:
1215         - group implementation of private helpers and guard them inside
1216         an ifdef if a root conditional attribute is present.
1217         - always define the type of a GObject binding, even if the root
1218         conditional feature is not enabled
1219         - the methods are generated as well, but are simply stubs if the
1220         feature is not enabled, throwing a warning upon interaction.
1221         - if the method itself is guarded by a conditional attribute,
1222         the stub implementation gains one more level of depth, throwing
1223         a warning if the method's conditional feature is not enabled
1224         but the root conditional feature is.
1225         - small style fixes in random places.
1226
1227         Also changed are GObject baselines for binding tests.
1228
1229         No new tests - no new testable functionality.
1230
1231         * bindings/gobject/GNUmakefile.am:
1232         * bindings/scripts/CodeGeneratorGObject.pm:
1233         (HumanReadableConditional):
1234         (GenerateConditionalWarn):
1235         (GenerateProperty):
1236         (GenerateProperties):
1237         (GenerateFunction):
1238         (GenerateFunctions):
1239         (GenerateCFile):
1240         (GenerateEventTargetIface):
1241         (Generate):
1242         (WriteData):
1243         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
1244         (WebKit):
1245         (WebKit::kit):
1246         (WebKit::wrapFloat64Array):
1247         (webkit_dom_float64array_finalize):
1248         (webkit_dom_float64array_foo):
1249         * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h:
1250         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
1251         (WebKit):
1252         (WebKit::kit):
1253         (WebKit::wrapTestActiveDOMObject):
1254         (webkit_dom_test_active_dom_object_finalize):
1255         (webkit_dom_test_active_dom_object_exciting_function):
1256         (webkit_dom_test_active_dom_object_post_message):
1257         (webkit_dom_test_active_dom_object_get_exciting_attr):
1258         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h:
1259         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1260         (WebKit):
1261         (WebKit::kit):
1262         (WebKit::core):
1263         (WebKit::wrapTestCallback):
1264         (webkit_dom_test_callback_finalize):
1265         (webkit_dom_test_callback_callback_with_no_param):
1266         (webkit_dom_test_callback_callback_with_class1param):
1267         (webkit_dom_test_callback_callback_with_class2param):
1268         (webkit_dom_test_callback_callback_with_non_bool_return_type):
1269         (webkit_dom_test_callback_callback_with_string_list):
1270         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
1271         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
1272         (WebKit):
1273         (WebKit::kit):
1274         (WebKit::wrapTestCustomNamedGetter):
1275         (webkit_dom_test_custom_named_getter_finalize):
1276         (webkit_dom_test_custom_named_getter_another_function):
1277         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetterPrivate.h:
1278         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
1279         (WebKit):
1280         (WebKit::kit):
1281         (WebKit::wrapTestEventConstructor):
1282         (webkit_dom_test_event_constructor_finalize):
1283         (webkit_dom_test_event_constructor_get_attr1):
1284         (webkit_dom_test_event_constructor_get_attr2):
1285         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h:
1286         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1287         (WebKit):
1288         (WebKit::core):
1289         (WebKit::wrapTestEventTarget):
1290         (webkit_dom_test_event_target_finalize):
1291         (webkit_dom_test_event_target_item):
1292         (webkit_dom_test_event_target_dispatch_event):
1293         * bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h:
1294         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1295         (WebKit):
1296         (WebKit::kit):
1297         (WebKit::core):
1298         (WebKit::wrapTestInterface):
1299         (webkit_dom_test_interface_finalize):
1300         (webkit_dom_test_interface_supplemental_method1):
1301         (webkit_dom_test_interface_supplemental_method2):
1302         (webkit_dom_test_interface_supplemental_method4):
1303         (webkit_dom_test_interface_get_supplemental_str1):
1304         (webkit_dom_test_interface_get_supplemental_str2):
1305         (webkit_dom_test_interface_set_supplemental_str2):
1306         (webkit_dom_test_interface_get_supplemental_node):
1307         (webkit_dom_test_interface_set_supplemental_node):
1308         * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h:
1309         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
1310         (WebKit):
1311         (WebKit::kit):
1312         (WebKit::wrapTestMediaQueryListListener):
1313         (webkit_dom_test_media_query_list_listener_finalize):
1314         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h:
1315         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
1316         (WebKit):
1317         (WebKit::kit):
1318         (WebKit::wrapTestNamedConstructor):
1319         (webkit_dom_test_named_constructor_finalize):
1320         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:
1321         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1322         (WebKit):
1323         (WebKit::kit):
1324         (WebKit::core):
1325         (WebKit::wrapTestObj):
1326         (webkit_dom_test_obj_finalize):
1327         (webkit_dom_test_obj_set_property):
1328         (webkit_dom_test_obj_get_property):
1329         (webkit_dom_test_obj_constructed):
1330         (webkit_dom_test_obj_class_init):
1331         (webkit_dom_test_obj_init):
1332         (webkit_dom_test_obj_void_method):
1333         (webkit_dom_test_obj_void_method_with_args):
1334         (webkit_dom_test_obj_int_method):
1335         (webkit_dom_test_obj_int_method_with_args):
1336         (webkit_dom_test_obj_obj_method):
1337         (webkit_dom_test_obj_obj_method_with_args):
1338         (webkit_dom_test_obj_method_with_sequence_arg):
1339         (webkit_dom_test_obj_method_that_requires_all_args_and_throws):
1340         (webkit_dom_test_obj_serialized_value):
1341         (webkit_dom_test_obj_idb_key):
1342         (webkit_dom_test_obj_options_object):
1343         (webkit_dom_test_obj_method_with_exception):
1344         (webkit_dom_test_obj_with_script_state_void):
1345         (webkit_dom_test_obj_with_script_state_obj):
1346         (webkit_dom_test_obj_with_script_state_void_exception):
1347         (webkit_dom_test_obj_with_script_state_obj_exception):
1348         (webkit_dom_test_obj_with_script_execution_context):
1349         (webkit_dom_test_obj_with_script_execution_context_and_script_state):
1350         (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception):
1351         (webkit_dom_test_obj_with_script_execution_context_and_script_state_with_spaces):
1352         (webkit_dom_test_obj_method_with_optional_arg):
1353         (webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg):
1354         (webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args):
1355         (webkit_dom_test_obj_method_with_optional_string):
1356         (webkit_dom_test_obj_method_with_optional_string_is_undefined):
1357         (webkit_dom_test_obj_method_with_optional_string_is_null_string):
1358         (webkit_dom_test_obj_conditional_method1):
1359         (webkit_dom_test_obj_conditional_method2):
1360         (webkit_dom_test_obj_conditional_method3):
1361         (webkit_dom_test_obj_class_method):
1362         (webkit_dom_test_obj_class_method_with_optional):
1363         (webkit_dom_test_obj_overloaded_method1):
1364         (webkit_dom_test_obj_convert1):
1365         (webkit_dom_test_obj_convert2):
1366         (webkit_dom_test_obj_convert3):
1367         (webkit_dom_test_obj_convert4):
1368         (webkit_dom_test_obj_convert5):
1369         (webkit_dom_test_obj_mutable_point_function):
1370         (webkit_dom_test_obj_immutable_point_function):
1371         (webkit_dom_test_obj_orange):
1372         (webkit_dom_test_obj_strict_function):
1373         (webkit_dom_test_obj_get_read_only_int_attr):
1374         (webkit_dom_test_obj_get_read_only_string_attr):
1375         (webkit_dom_test_obj_get_read_only_test_obj_attr):
1376         (webkit_dom_test_obj_get_short_attr):
1377         (webkit_dom_test_obj_set_short_attr):
1378         (webkit_dom_test_obj_get_unsigned_short_attr):
1379         (webkit_dom_test_obj_set_unsigned_short_attr):
1380         (webkit_dom_test_obj_get_int_attr):
1381         (webkit_dom_test_obj_set_int_attr):
1382         (webkit_dom_test_obj_get_long_long_attr):
1383         (webkit_dom_test_obj_set_long_long_attr):
1384         (webkit_dom_test_obj_get_unsigned_long_long_attr):
1385         (webkit_dom_test_obj_set_unsigned_long_long_attr):
1386         (webkit_dom_test_obj_get_string_attr):
1387         (webkit_dom_test_obj_set_string_attr):
1388         (webkit_dom_test_obj_get_test_obj_attr):
1389         (webkit_dom_test_obj_set_test_obj_attr):
1390         (webkit_dom_test_obj_get_xml_obj_attr):
1391         (webkit_dom_test_obj_set_xml_obj_attr):
1392         (webkit_dom_test_obj_get_create):
1393         (webkit_dom_test_obj_set_create):
1394         (webkit_dom_test_obj_get_reflected_string_attr):
1395         (webkit_dom_test_obj_set_reflected_string_attr):
1396         (webkit_dom_test_obj_get_reflected_integral_attr):
1397         (webkit_dom_test_obj_set_reflected_integral_attr):
1398         (webkit_dom_test_obj_get_reflected_unsigned_integral_attr):
1399         (webkit_dom_test_obj_set_reflected_unsigned_integral_attr):
1400         (webkit_dom_test_obj_get_reflected_boolean_attr):
1401         (webkit_dom_test_obj_set_reflected_boolean_attr):
1402         (webkit_dom_test_obj_get_reflected_url_attr):
1403         (webkit_dom_test_obj_set_reflected_url_attr):
1404         (webkit_dom_test_obj_get_reflected_custom_integral_attr):
1405         (webkit_dom_test_obj_set_reflected_custom_integral_attr):
1406         (webkit_dom_test_obj_get_reflected_custom_boolean_attr):
1407         (webkit_dom_test_obj_set_reflected_custom_boolean_attr):
1408         (webkit_dom_test_obj_get_reflected_custom_url_attr):
1409         (webkit_dom_test_obj_set_reflected_custom_url_attr):
1410         (webkit_dom_test_obj_get_attr_with_getter_exception):
1411         (webkit_dom_test_obj_set_attr_with_getter_exception):
1412         (webkit_dom_test_obj_get_attr_with_setter_exception):
1413         (webkit_dom_test_obj_set_attr_with_setter_exception):
1414         (webkit_dom_test_obj_get_string_attr_with_getter_exception):
1415         (webkit_dom_test_obj_set_string_attr_with_getter_exception):
1416         (webkit_dom_test_obj_get_string_attr_with_setter_exception):
1417         (webkit_dom_test_obj_set_string_attr_with_setter_exception):
1418         (webkit_dom_test_obj_get_with_script_state_attribute):
1419         (webkit_dom_test_obj_set_with_script_state_attribute):
1420         (webkit_dom_test_obj_get_with_script_execution_context_attribute):
1421         (webkit_dom_test_obj_set_with_script_execution_context_attribute):
1422         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
1423         (webkit_dom_test_obj_set_with_script_state_attribute_raises):
1424         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
1425         (webkit_dom_test_obj_set_with_script_execution_context_attribute_raises):
1426         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute):
1427         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute):
1428         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises):
1429         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute_raises):
1430         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_with_spaces_attribute):
1431         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_with_spaces_attribute):
1432         (webkit_dom_test_obj_get_conditional_attr1):
1433         (webkit_dom_test_obj_set_conditional_attr1):
1434         (webkit_dom_test_obj_get_conditional_attr2):
1435         (webkit_dom_test_obj_set_conditional_attr2):
1436         (webkit_dom_test_obj_get_conditional_attr3):
1437         (webkit_dom_test_obj_set_conditional_attr3):
1438         (webkit_dom_test_obj_get_content_document):
1439         (webkit_dom_test_obj_get_mutable_point):
1440         (webkit_dom_test_obj_set_mutable_point):
1441         (webkit_dom_test_obj_get_immutable_point):
1442         (webkit_dom_test_obj_set_immutable_point):
1443         (webkit_dom_test_obj_get_strict_float):
1444         (webkit_dom_test_obj_set_strict_float):
1445         (webkit_dom_test_obj_get_description):
1446         (webkit_dom_test_obj_get_id):
1447         (webkit_dom_test_obj_set_id):
1448         (webkit_dom_test_obj_get_hash):
1449         * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h:
1450         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1451         (WebKit):
1452         (WebKit::kit):
1453         (WebKit::core):
1454         (WebKit::wrapTestSerializedScriptValueInterface):
1455         (webkit_dom_test_serialized_script_value_interface_finalize):
1456         (webkit_dom_test_serialized_script_value_interface_accept_transfer_list):
1457         (webkit_dom_test_serialized_script_value_interface_multi_transfer_list):
1458         (webkit_dom_test_serialized_script_value_interface_get_value):
1459         (webkit_dom_test_serialized_script_value_interface_set_value):
1460         (webkit_dom_test_serialized_script_value_interface_get_readonly_value):
1461         (webkit_dom_test_serialized_script_value_interface_get_cached_value):
1462         (webkit_dom_test_serialized_script_value_interface_set_cached_value):
1463         (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
1464         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h:
1465
1466 2012-03-23  Dana Jansens  <danakj@chromium.org>
1467
1468         [chromium] Record painted pixel counts for measuring effectiveness of per-tile painting
1469         https://bugs.webkit.org/show_bug.cgi?id=82057
1470
1471         Reviewed by Adrienne Walker.
1472
1473         Adds painted pixel metrics to CCOverdrawMetrics class, and calls in
1474         to report painted areas when updating tiles in the TiledLayerChromium
1475         class.
1476
1477         Unit test: TiledLayerChromiumTest.opaqueContentsRegion
1478                    TiledLayerChromiumTest.pixelsPaintedMetrics
1479
1480         * platform/graphics/chromium/TiledLayerChromium.cpp:
1481         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
1482         * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
1483         (WebCore::CCOverdrawMetrics::CCOverdrawMetrics):
1484         (WebCore::CCOverdrawMetrics::didPaint):
1485         (WebCore):
1486         (WebCore::CCOverdrawMetrics::recordMetricsInternal):
1487         * platform/graphics/chromium/cc/CCOverdrawMetrics.h:
1488         (CCOverdrawMetrics):
1489         (WebCore::CCOverdrawMetrics::pixelsPainted):
1490
1491 2012-03-23  Abhishek Arya  <inferno@chromium.org>
1492
1493         Crash in RenderBlock::splitBlocks.
1494         https://bugs.webkit.org/show_bug.cgi?id=81926
1495
1496         Reviewed by Julien Chaffraix.
1497
1498         We are updating the :after content before calling splitFlow. The :after content
1499         gets blown away since it will go to the continuation. beforeChild was earlier
1500         set to the first child. Being the last anonymous block, its children gets pulled
1501         up in collapseAnonymousBoxChild and it gets destroyed. So, we need to update
1502         beforeChild value. 
1503
1504         Test: fast/multicol/span/update-after-content-before-child-crash.html
1505
1506         * rendering/RenderBlock.cpp:
1507         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
1508
1509 2012-03-23  Dana Jansens  <danakj@chromium.org>
1510
1511         [chromium] Improved composited debug borders
1512         https://bugs.webkit.org/show_bug.cgi?id=82071
1513
1514         Reviewed by Adrienne Walker.
1515
1516         Fix the problem with missing debug borders. Since we append quads
1517         to the list front to back now, we draw the quads in the list from
1518         back to front of the list. Which means if the debug quad is added
1519         after the layer it is drawing around, the layer can draw over top
1520         of its debug quad. Reverse the ordering when appending to fix it.
1521
1522         Make the border red around tiles that are checkerboarded. Missing
1523         tiles in non-root layers are drawn clear, so this makes them more
1524         visible.
1525
1526         Put a blue border around each render surface, and a purple border
1527         on their replicas.
1528
1529         No new tests.
1530
1531         * platform/graphics/chromium/cc/CCRenderPass.cpp:
1532         (WebCore):
1533         (WebCore::CCRenderPass::appendQuadsForLayer):
1534         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
1535         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1536         (WebCore::CCRenderSurface::hasReplica):
1537         (WebCore):
1538         (WebCore::CCRenderSurface::createReplicaSharedQuadState):
1539         * platform/graphics/chromium/cc/CCRenderSurface.h:
1540         (CCRenderSurface):
1541         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1542         (WebCore):
1543         (WebCore::CCTiledLayerImpl::appendQuads):
1544
1545 2012-03-23  Simon Fraser  <simon.fraser@apple.com>
1546
1547         Move code that calls setAcceleratesDrawing() on GraphicsLayers into RenderLayerBacking
1548         https://bugs.webkit.org/show_bug.cgi?id=82092
1549
1550         Reviewed by Dean Jackson.
1551
1552         A RenderLayerBacking manages several GraphicsLayers, but RenderLayerCompositor
1553         was only calling setAcceleratesDrawing() on the one it knows about. Fix by moving
1554         this setting code down into RenderLayerBacking.
1555         
1556         RenderLayerCompositor now caches the setAcceleratesDrawing setting, as it does
1557         for other compositing-related settings, so that RenderLayerBacking doesn't have
1558         to grovel for Settings every time.
1559
1560         * rendering/RenderLayerBacking.cpp:
1561         (WebCore::RenderLayerBacking::createGraphicsLayer):
1562         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1563         * rendering/RenderLayerCompositor.cpp:
1564         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
1565         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
1566         (WebCore::RenderLayerCompositor::updateBacking):
1567         * rendering/RenderLayerCompositor.h:
1568         (WebCore::RenderLayerCompositor::acceleratedDrawingEnabled):
1569         (RenderLayerCompositor):
1570
1571 2012-03-23  Beth Dakin  <bdakin@apple.com>
1572
1573         https://bugs.webkit.org/show_bug.cgi?id=82083
1574
1575         Rubber-stamped by Simon Fraser.
1576
1577         This patch is just a name change. getExistingScrollAnimator() (which was 
1578         added earlier today) is now existingScrollAnimator().
1579         * loader/FrameLoader.cpp:
1580         (WebCore::FrameLoader::transitionToCommitted):
1581         * page/EventHandler.cpp:
1582         (WebCore::EventHandler::handleGestureTapDown):
1583         * page/FrameView.cpp:
1584         (WebCore::FrameView::setAnimatorsAreActive):
1585         * platform/ScrollView.cpp:
1586         (WebCore::ScrollView::updateScrollbars):
1587         * platform/ScrollableArea.cpp:
1588         (WebCore::ScrollableArea::willStartLiveResize):
1589         (WebCore::ScrollableArea::willEndLiveResize):
1590         (WebCore::ScrollableArea::contentAreaWillPaint):
1591         (WebCore::ScrollableArea::mouseEnteredContentArea):
1592         (WebCore::ScrollableArea::mouseExitedContentArea):
1593         (WebCore::ScrollableArea::mouseMovedInContentArea):
1594         (WebCore::ScrollableArea::contentAreaDidShow):
1595         (WebCore::ScrollableArea::contentAreaDidHide):
1596         (WebCore::ScrollableArea::contentsResized):
1597         (WebCore::ScrollableArea::serviceScrollAnimations):
1598         * platform/ScrollableArea.h:
1599         (WebCore::ScrollableArea::existingScrollAnimator):
1600
1601 2012-03-23  Abhishek Arya  <inferno@chromium.org>
1602
1603         Crash due to accessing removed parent lineboxes when clearing selection.
1604         https://bugs.webkit.org/show_bug.cgi?id=81359
1605
1606         Reviewed by Eric Seidel.
1607
1608         Similar to r110323, adds the canUpdateSelectionOnRootLineBoxes
1609         check to more places.
1610
1611         Test: editing/selection/clear-selection-crash.html
1612
1613         * rendering/RenderObject.cpp:
1614         (WebCore::RenderObject::canUpdateSelectionOnRootLineBoxes):
1615         * rendering/RenderSelectionInfo.h:
1616         (WebCore::RenderSelectionInfo::RenderSelectionInfo):
1617         (WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo):
1618
1619 2012-03-23  Beth Dakin  <bdakin@apple.com>
1620
1621         https://bugs.webkit.org/show_bug.cgi?id=82083
1622         Too many ScrollAnimators are allocated on pages with frames
1623
1624         Reviewed by Geoffrey Garen.
1625
1626         This patch adds a new getter to ScrollableArea called 
1627         getExistingScrollAnimator() unlike scrollAnimator() this new function will 
1628         just return null if there is not already a ScrollAnimator. Callers should use 
1629         this new function when they have business with ScrollAnimator that does not 
1630         need to do anything when there are no scrollbars.
1631         * loader/FrameLoader.cpp:
1632         (WebCore::FrameLoader::transitionToCommitted):
1633         * page/EventHandler.cpp:
1634         (WebCore::EventHandler::handleGestureTapDown):
1635         * page/FrameView.cpp:
1636         (WebCore::FrameView::setAnimatorsAreActive):
1637         * platform/ScrollView.cpp:
1638         (WebCore::ScrollView::updateScrollbars):
1639         * platform/ScrollableArea.cpp:
1640         (WebCore::ScrollableArea::willStartLiveResize):
1641         (WebCore::ScrollableArea::willEndLiveResize):
1642         (WebCore::ScrollableArea::contentAreaWillPaint):
1643         (WebCore::ScrollableArea::mouseEnteredContentArea):
1644         (WebCore::ScrollableArea::mouseExitedContentArea):
1645         (WebCore::ScrollableArea::mouseMovedInContentArea):
1646         (WebCore::ScrollableArea::contentAreaDidShow):
1647         (WebCore::ScrollableArea::contentAreaDidHide):
1648         (WebCore::ScrollableArea::willRemoveHorizontalScrollbar):
1649         (WebCore::ScrollableArea::contentsResized):
1650         (WebCore::ScrollableArea::serviceScrollAnimations):
1651         * platform/ScrollableArea.h:
1652         (ScrollableArea):
1653         (WebCore::ScrollableArea::getExistingScrollAnimator):
1654
1655 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
1656
1657         Deal with DOM modifications when evaluating source elements.
1658         https://bugs.webkit.org/show_bug.cgi?id=81163
1659
1660         Reviewed by Alexey Proskuryakov.
1661
1662         Test: media/video-beforeload-remove-source.html
1663
1664         * dom/ContainerNode.cpp: Make NodeVector and collectNodes public, renamed as getChildNodes.
1665         (WebCore::ContainerNode::takeAllChildrenFrom): collectNodes -> getChildNodes.
1666         (WebCore::ContainerNode::willRemove): collectNodes -> getChildNodes.
1667         (WebCore::ContainerNode::willRemoveChildren): collectNodes -> getChildNodes.
1668         (WebCore::ContainerNode::insertedIntoDocument): collectNodes -> getChildNodes.
1669         (WebCore::ContainerNode::removedFromDocument): collectNodes -> getChildNodes.
1670         * dom/ContainerNode.h:
1671         (WebCore::getChildNodes):
1672
1673         * editing/ReplaceSelectionCommand.cpp: Remove unused NodeVector declaration.
1674
1675         * html/HTMLMediaElement.cpp:
1676         (WebCore::HTMLMediaElement::HTMLMediaElement): m_nextChildNodeToConsider and m_currentSourceNode
1677             are now RefPtrs.
1678         (WebCore::HTMLMediaElement::loadTimerFired): Protect HTMLMediaElement from being deleted during
1679             a DOM modification during an event callback.
1680         (WebCore::HTMLMediaElement::load): Ditto.
1681         (WebCore::HTMLMediaElement::selectMediaResource): Set m_nextChildNodeToConsider to the first
1682             child node, it will be the first node considered.
1683         (WebCore::HTMLMediaElement::havePotentialSourceChild): m_nextChildNodeToConsider and m_currentSourceNode
1684             are now RefPtrs.
1685         (WebCore::HTMLMediaElement::selectNextSourceChild): Collect all child nodes in a vector before
1686             looking for <source> nodes because 'beforeload' event handlers can mutate the DOM. Don't
1687             use a <source> that is no longer a child node after 'beforeload'. Use 0 to represent the end
1688             of the child node list because m_nextChildNodeToConsider is now a RefPtr so using the previous 
1689             sentinel, "this", would cause a retain cycle.
1690         (WebCore::HTMLMediaElement::sourceWasAdded):  m_nextChildNodeToConsider and m_currentSourceNode
1691             are now RefPtrs.
1692         (WebCore::HTMLMediaElement::sourceWillBeRemoved): Ditto.
1693         (WebCore::HTMLMediaElement::getPluginProxyParams): Protect HTMLMediaElement from being deleted during
1694             a DOM modification during an event callback.
1695         * html/HTMLMediaElement.h:
1696
1697 2012-03-23  Dean Jackson  <dino@apple.com>
1698
1699         Disable CSS_SHADERS in Apple builds
1700         https://bugs.webkit.org/show_bug.cgi?id=81996
1701
1702         Reviewed by Simon Fraser.
1703
1704         Remove ENABLE_CSS_SHADERS from FeatureDefines. It's now in Platform.h.
1705
1706         * Configurations/FeatureDefines.xcconfig:
1707
1708 2012-03-23  Dave Michael  <dmichael@chromium.org>
1709
1710         Relanding(r111754): HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called
1711         https://bugs.webkit.org/show_bug.cgi?id=80428
1712
1713         Reviewed by Eric Seidel and Ryosuke Niwa.
1714
1715         Make HTMLPluginElement release its m_NPObject in detach() to break a
1716         reference-counting cycle that happens on reload or navigation. With this
1717         change, HTMLPlugInElement::removedFromDocument is unnecessary, so it
1718         was removed. Note that Releasing m_NPObject does not result in a call to
1719         the plugin; it simply releases a reference count on the wrapper object
1720         for this HTMLPlugInElement. (The plugin's NPP_Deallocate is invoked
1721         when the render tree is destroyed, when PluginView calls
1722         PluginPackage::unload.) Thus, it is safe to release m_NPObject in
1723         detach, because it can not result in layout or style changes.
1724
1725         Also added numberOfLiveNodes() and numberOfLiveDocuments() to
1726         window.internals to enable testing.
1727
1728         Test: plugins/netscape-dom-access-and-reload.html
1729
1730         * WebCore.exp.in:
1731         * html/HTMLPlugInElement.cpp:
1732         (WebCore::HTMLPlugInElement::detach):
1733         * html/HTMLPlugInElement.h:
1734         (HTMLPlugInElement):
1735         * testing/Internals.cpp:
1736         (WebCore):
1737         (WebCore::Internals::numberOfLiveNodes):
1738         (WebCore::Internals::numberOfLiveDocuments):
1739         * testing/Internals.h:
1740         (Internals):
1741         * testing/Internals.idl:
1742
1743 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
1744
1745         CSSParser doesn't set border-*-width/style/color to initial by border shorthand property
1746         https://bugs.webkit.org/show_bug.cgi?id=82040
1747
1748         Reviewed by Antti Koivisto.
1749
1750         The border shorthand property sets values for border-width, border-style, and border-color shorthand properties.
1751         While CSSParser::parseValue can process these shorthand properties properly and set the longhand properties
1752         such as border-top-width, border-right-width, ... border-left-color, CSSParser::addProperty can't and the
1753         initialization in parseShorthand fails for the border property.
1754
1755         Fixed the bug by explicitly initializing longhand properties.
1756
1757         Changing the behavior here is unlikely to break the Web since our behavior already differs from that of Firefox
1758         and Internet Explorer. Both of those browsers return the actual initial values such as "medium" and "currentColor".
1759         This discrepancy is tracked by https://bugs.webkit.org/show_bug.cgi?id=82078.
1760
1761         Test: fast/css/border-shorthand-initialize-longhands.html
1762
1763         * css/CSSParser.cpp:
1764         (WebCore::CSSParser::parseValue): Uses borderAbridgedLonghand.
1765         (WebCore::CSSParser::parseShorthand): Uses longhand properties for initialization if one is available.
1766         This allows us to initialize multiple properties (e.g. border-*-color) for a single property missing in the set.
1767         * css/CSSPropertyLonghand.cpp:
1768         (WebCore::borderAbridgedLonghand): Added. The longhand here (border-width, border-style, border-color) is
1769         "abridged" in the sense that they're still shorthands.
1770         * css/CSSPropertyLonghand.h:
1771         (WebCore::CSSPropertyLonghand::CSSPropertyLonghand):
1772         (CSSPropertyLonghand): Added the version that takes longhand instances for initialization purposes.
1773         (WebCore::CSSPropertyLonghand::longhandsForInitialization):
1774
1775 2012-03-23  Tony Chang  <tony@chromium.org>
1776
1777         [chromium] rename newwtf target back to wtf
1778         https://bugs.webkit.org/show_bug.cgi?id=82064
1779
1780         Reviewed by Adam Barth.
1781
1782         No new tests, only renaming a build target.
1783
1784         * WebCore.gyp/WebCore.gyp:
1785
1786 2012-03-23  Adrienne Walker  <enne@google.com>
1787
1788         [chromium] Turn off painting of scrollbars on compositor thread for unsupported platforms
1789         https://bugs.webkit.org/show_bug.cgi?id=82066
1790
1791         Reviewed by James Robinson.
1792
1793         With threaded compositing, OSX will crash and Windows will have black
1794         scrollbars. Fix that by reverting to the previosu behavior of updating
1795         scrollbars on the main thread instead.
1796
1797         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
1798         (WebCore::scrollbarLayerDidChange):
1799
1800 2012-03-23  Dan Bernstein  <mitz@apple.com>
1801
1802         <rdar://problem/7883987> ASSERTION FAILED: ASSERT(input == AnimationStateInputEndTimerFired || input == AnimationStateInputPlayStatePaused) in AnimationBase::updateStateMachine causing multiple "crashes" on Lion Intel Debug WebKit testers
1803         https://bugs.webkit.org/show_bug.cgi?id=81351
1804
1805         Rubber-stamped by Jessie Berlin.
1806
1807         * page/animation/AnimationBase.cpp:
1808         (WebCore::AnimationBase::updateStateMachine): Replaced the assertion with a LOG_ERROR so that
1809         the issue is still noticeable, but it does not automatically make the debug bots red.
1810
1811 2012-03-23  Mike Lawther  <mikelawther@chromium.org>
1812
1813         CSS3 calc: image sizing works with mixed percentage/absolute
1814         https://bugs.webkit.org/show_bug.cgi?id=82017
1815
1816         Reviewed by Ojan Vafai.
1817
1818         Test: css3/calc/img-size-expected.html
1819
1820         * rendering/RenderBox.cpp:
1821         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1822         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1823
1824 2012-03-23  Julien Chaffraix  <jchaffraix@webkit.org>
1825
1826         REGRESSION(107971): Google Voice contact list is broken in WebKit due to badly allocating the extra height
1827         https://bugs.webkit.org/show_bug.cgi?id=81826
1828
1829         Reviewed by Tony Chang.
1830
1831         Covered by tables/mozilla/bugs/bug27038-{1|2}.html.
1832
1833         This partly reverts r107971: the extra logical height distribution change was not needed
1834         to fix the bug (it is needed by the test though). We revert to giving all the extra height
1835         to the first tbody and not the first section.
1836
1837         This is broken but unfortunately some websites are relying on that. Getting a real
1838         distribution algorithm is covered by bug 81824. However this is super tricky to get
1839         right and I did not want to add more compatibility risks until I have something solid.
1840
1841         * rendering/RenderTable.cpp:
1842         (WebCore::RenderTable::distributeExtraLogicalHeight):
1843
1844 2012-03-23  Xingnan Wang  <xingnan.wang@intel.com>
1845
1846         Optimize for IPP in DirectConvolver::process()
1847         https://bugs.webkit.org/show_bug.cgi?id=80255
1848
1849         Reviewed by Chris Rogers.
1850
1851         Increase ~2X performance by conv() in IPP.
1852
1853         * platform/audio/DirectConvolver.cpp:
1854         (WebCore::DirectConvolver::DirectConvolver):
1855         (WebCore::DirectConvolver::process):
1856         * platform/audio/DirectConvolver.h:
1857         (DirectConvolver):
1858
1859 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
1860
1861         MediaStream API (JSEP): Introducing PeerConnection00 and IceCallback
1862         https://bugs.webkit.org/show_bug.cgi?id=81657
1863
1864         Reviewed by Adam Barth.
1865
1866         Last major WebCore patch for the JSEP PeerConnection, together with the associated
1867         IceCallback (they both depend on each other and IceCallback has very few lines of real code).
1868
1869         My next patch after this one will do a major overhaul of the existing layout tests
1870         and add a few new ones.
1871
1872         * GNUmakefile.list.am:
1873         * Modules/mediastream/DOMWindowMediaStream.idl:
1874         * Modules/mediastream/IceCallback.h: Added.
1875         (WebCore):
1876         (IceCallback):
1877         (WebCore::IceCallback::~IceCallback):
1878         * Modules/mediastream/IceCallback.idl: Added.
1879         * Modules/mediastream/PeerConnection00.cpp: Added.
1880         (WebCore):
1881         (WebCore::PeerConnection00::create):
1882         (WebCore::PeerConnection00::PeerConnection00):
1883         (WebCore::PeerConnection00::~PeerConnection00):
1884         (WebCore::PeerConnection00::hasLocalAudioTrack):
1885         (WebCore::PeerConnection00::hasLocalVideoTrack):
1886         (WebCore::PeerConnection00::parseMediaHints):
1887         (WebCore::PeerConnection00::createOffer):
1888         (WebCore::PeerConnection00::createAnswer):
1889         (WebCore::PeerConnection00::setLocalDescription):
1890         (WebCore::PeerConnection00::setRemoteDescription):
1891         (WebCore::PeerConnection00::localDescription):
1892         (WebCore::PeerConnection00::remoteDescription):
1893         (WebCore::PeerConnection00::startIce):
1894         (WebCore::PeerConnection00::processIceMessage):
1895         (WebCore::PeerConnection00::readyState):
1896         (WebCore::PeerConnection00::iceState):
1897         (WebCore::PeerConnection00::addStream):
1898         (WebCore::PeerConnection00::removeStream):
1899         (WebCore::PeerConnection00::localStreams):
1900         (WebCore::PeerConnection00::remoteStreams):
1901         (WebCore::PeerConnection00::close):
1902         (WebCore::PeerConnection00::didGenerateIceCandidate):
1903         (WebCore::PeerConnection00::didChangeReadyState):
1904         (WebCore::PeerConnection00::didChangeIceState):
1905         (WebCore::PeerConnection00::didAddRemoteStream):
1906         (WebCore::PeerConnection00::didRemoveRemoteStream):
1907         (WebCore::PeerConnection00::interfaceName):
1908         (WebCore::PeerConnection00::scriptExecutionContext):
1909         (WebCore::PeerConnection00::stop):
1910         (WebCore::PeerConnection00::eventTargetData):
1911         (WebCore::PeerConnection00::ensureEventTargetData):
1912         (WebCore::PeerConnection00::changeReadyState):
1913         (WebCore::PeerConnection00::changeIceState):
1914         * Modules/mediastream/PeerConnection00.h: Added.
1915         (WebCore):
1916         (PeerConnection00):
1917         (WebCore::PeerConnection00::refEventTarget):
1918         (WebCore::PeerConnection00::derefEventTarget):
1919         * Modules/mediastream/PeerConnection00.idl: Added.
1920         * WebCore.gypi:
1921         * bindings/generic/RuntimeEnabledFeatures.h:
1922         (WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled):
1923         * bindings/js/JSPeerConnection00Custom.cpp: Added.
1924         (WebCore):
1925         (WebCore::JSPeerConnection00Constructor::constructJSPeerConnection00):
1926         * dom/EventTargetFactory.in:
1927
1928 2012-03-23  Adrienne Walker  <enne@google.com>
1929
1930         [chromium] Fix scrollbarLayerLostContext flaky test crash on 10.6
1931         https://bugs.webkit.org/show_bug.cgi?id=82062
1932
1933         Reviewed by James Robinson.
1934
1935         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
1936         (CCScrollbarLayerImpl):
1937
1938 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
1939
1940         [chromium] MediaStream API (JSEP): Extending WebMediaStreamCenter
1941         https://bugs.webkit.org/show_bug.cgi?id=81924
1942
1943         Reviewed by Adam Barth.
1944
1945         Nothing to test, just moving methods.
1946
1947         * platform/mediastream/MediaStreamCenter.cpp:
1948         (WebCore::MediaStreamCenter::constructSDP):
1949         (WebCore):
1950
1951 2012-03-23  Sami Kyostila  <skyostil@chromium.org>
1952
1953         Reuse buffer allocation if canvas size does not change
1954         https://bugs.webkit.org/show_bug.cgi?id=80871
1955
1956         Reviewed by Stephen White.
1957
1958         If the user changes the width or height attributes of a canvas element,
1959         the contents of the canvas should be cleared and the context state
1960         should be reset. This has become a common idiom to clear the canvas
1961         "efficiently" at the start of a frame.
1962
1963         Previously, this code path triggered a full reallocation of the image
1964         buffer backing the canvas, leading to reduced performance. This patch
1965         implements an optimization where we reuse the previous image buffer
1966         allocation if the size of the canvas did not change. Also, instead of
1967         clearing the canvas every time its dimensions are touched, we only clear
1968         if anything has been drawn into the canvas since it was previously
1969         cleared.
1970
1971         Note that for now this optimization only applies for 2D canvases,
1972         since it is not entirely clear how touching the dimensions of a WebGL
1973         canvas should work.
1974
1975         Test: fast/canvas/canvas-resize-after-paint-without-layout.html +
1976               existing layout tests for canvas resetting.
1977
1978         * html/HTMLCanvasElement.cpp:
1979         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1980         (WebCore::HTMLCanvasElement::reset):
1981         (WebCore::HTMLCanvasElement::createImageBuffer): Save the initial
1982         graphics context state so we can restore it without creating a new
1983         context.
1984         (WebCore::HTMLCanvasElement::clearImageBuffer):
1985         (WebCore):
1986         (WebCore::HTMLCanvasElement::clearCopiedImage):
1987         * html/HTMLCanvasElement.h:
1988         (HTMLCanvasElement):
1989         * html/canvas/CanvasRenderingContext2D.cpp:
1990         (WebCore::CanvasRenderingContext2D::reset): No need to notify the
1991         compositor when the context is reset, because clearing the image buffer
1992         does the same thing. We can also skip the notification if we did not
1993         have an image buffer at the time of the reset, because the reset will
1994         not have any visual impact in this case. Finally, if the canvas size
1995         did change, the notification is also unnecessary because of the call
1996         to RenderObject::repaint() from HTMLCanvasElement::reset().
1997
1998 2012-03-22  Martin Robinson  <mrobinson@igalia.com>
1999
2000         Fix some code generation warnings on GTK+.
2001
2002         Reviewed by Gustavo Noronha Silva.
2003
2004         No new tests. This just fixes warnings.
2005
2006         * GNUmakefile.am: Remove nonexistent directories from the list IDL directories.
2007
2008 2012-03-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2009
2010         Unreviewed, rolling out r111751.
2011         http://trac.webkit.org/changeset/111751
2012         https://bugs.webkit.org/show_bug.cgi?id=82060
2013
2014         caused 15% page cycler regression for chromium-linux
2015         (Requested by eae on #webkit).
2016
2017         * css/CSSStyleSelector.cpp:
2018         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2019
2020 2012-03-23  Kentaro Hara  <haraken@chromium.org>
2021
2022         Support [ImplementedAs] for attributes
2023         https://bugs.webkit.org/show_bug.cgi?id=81605
2024
2025         Reviewed by Adam Barth.
2026
2027         [ImplementedAs] just supports methods. [ImplementedAs] should support
2028         attributes too.
2029
2030         Explained here: https://trac.webkit.org/wiki/WebKitIDL#ImplementedAs
2031
2032         Test: bindings/scripts/test/TestObj.idl
2033
2034         * bindings/scripts/CodeGenerator.pm: Modified to support [ImplementedAs] for attributes.
2035         (AttributeNameForGetterAndSetter):
2036
2037         * bindings/scripts/test/TestObj.idl: Added a test case.
2038
2039         * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results.
2040         (WebDOMTestObj::strawberry):
2041         (WebDOMTestObj::setStrawberry):
2042         * bindings/scripts/test/CPP/WebDOMTestObj.h:
2043         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2044         (webkit_dom_test_obj_get_strawberry):
2045         (webkit_dom_test_obj_set_strawberry):
2046         (webkit_dom_test_obj_get_property):
2047         (webkit_dom_test_obj_class_init):
2048         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2049         * bindings/scripts/test/JS/JSTestObj.cpp:
2050         (WebCore):
2051         (WebCore::jsTestObjStrawberry):
2052         (WebCore::setJSTestObjStrawberry):
2053         * bindings/scripts/test/JS/JSTestObj.h:
2054         (WebCore):
2055         * bindings/scripts/test/ObjC/DOMTestObj.h:
2056         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2057         (-[DOMTestObj strawberry]):
2058         (-[DOMTestObj setStrawberry:]):
2059         * bindings/scripts/test/V8/V8TestObj.cpp:
2060         (WebCore::TestObjInternal::strawberryAttrGetter):
2061         (TestObjInternal):
2062         (WebCore::TestObjInternal::strawberryAttrSetter):
2063         (WebCore):
2064
2065 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
2066
2067         The JSC code generator doesn't generate correct code for Constructors
2068         https://bugs.webkit.org/show_bug.cgi?id=82046
2069
2070         Reviewed by Kentaro Hara.
2071
2072         The main bulk of generated code for constructors uses the name jsConstructor
2073         for the created object, and then calls GenerateParametersCheck which generates
2074         code that uses the name castedThis.
2075
2076         * bindings/scripts/CodeGeneratorJS.pm:
2077         (GenerateConstructorDefinition):
2078         * bindings/scripts/test/JS/JSTestInterface.cpp:
2079         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
2080         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2081         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
2082         * bindings/scripts/test/JS/JSTestObj.cpp:
2083         (WebCore::JSTestObjConstructor::finishCreation):
2084         (WebCore::JSTestObjConstructor::constructJSTestObj):
2085         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2086         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
2087         * bindings/scripts/test/TestObj.idl:
2088         * bindings/scripts/test/V8/V8TestObj.cpp:
2089         (WebCore::V8TestObj::constructorCallback):
2090
2091 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
2092
2093         The JSC code generator can't handle boolean arguments for Callbacks
2094         https://bugs.webkit.org/show_bug.cgi?id=82045
2095
2096         Reviewed by Kentaro Hara.
2097
2098         CodeGeneratorJS.pm only handles DOMStrings and objects as arguments
2099         for a Callback, so I added support for boolean values as well.
2100
2101         * bindings/scripts/CodeGeneratorJS.pm:
2102         (GenerateCallbackImplementation):
2103         * bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
2104         (WebDOMTestCallback::callbackWithBoolean):
2105         * bindings/scripts/test/CPP/WebDOMTestCallback.h:
2106         (WebDOMTestCallback):
2107         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2108         (webkit_dom_test_callback_callback_with_boolean):
2109         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
2110         * bindings/scripts/test/JS/JSTestCallback.cpp:
2111         (WebCore::JSTestCallback::callbackWithBoolean):
2112         (WebCore):
2113         * bindings/scripts/test/JS/JSTestCallback.h:
2114         (JSTestCallback):
2115         * bindings/scripts/test/ObjC/DOMTestCallback.h:
2116         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
2117         (-[DOMTestCallback callbackWithBoolean:]):
2118         * bindings/scripts/test/TestCallback.idl:
2119         * bindings/scripts/test/V8/V8TestCallback.cpp:
2120         (WebCore::V8TestCallback::callbackWithBoolean):
2121         (WebCore):
2122         * bindings/scripts/test/V8/V8TestCallback.h:
2123         (V8TestCallback):
2124
2125 2012-03-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2126
2127         Touch adjustment forgets some subtarget quads.
2128         https://bugs.webkit.org/show_bug.cgi?id=82044
2129
2130         Reviewed by Kenneth Rohde Christiansen.
2131
2132         Do not uncritically skip all nodes that are ancestors to other test results.
2133         Instead return the inner-most element if multiple nodes have the same distance.
2134
2135         Test: touchadjustment/block-testing.html
2136
2137         * page/TouchAdjustment.cpp:
2138         (WebCore::TouchAdjustment::compileSubtargetList):
2139         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
2140
2141 2012-03-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2142
2143         TouchAdjustment does not correct for frame position
2144         https://bugs.webkit.org/show_bug.cgi?id=82043
2145
2146         Reviewed by Kenneth Rohde Christiansen.
2147
2148         Convert geometry to window coordinates before calculating distance.
2149
2150         Test: touchadjustment/iframe.html
2151
2152         * page/TouchAdjustment.cpp:
2153         (WebCore::TouchAdjustment::distanceSquaredToTargetCenterLine):
2154
2155 2012-03-23  Vlad Voicu  <vladv@rosedu.org>
2156
2157         Fixed minor WebInspector display issue
2158         Clicking on disabled sections in Styles Sidebar Pane creates new elements.
2159         https://bugs.webkit.org/show_bug.cgi?id=81925
2160
2161         Reviewed by Timothy Hatcher
2162
2163         No new tests should be required.
2164
2165         * inspector/front-end/StylesSidebarPane.js:
2166         (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick):
2167         (WebInspector.StylePropertyTreeElement.prototype):
2168
2169 2012-03-23  Kentaro Hara  <haraken@chromium.org>
2170
2171         Unreviewed, rebaselined run-bindings-tests results.
2172
2173         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
2174         * bindings/scripts/test/CPP/WebDOMTestObj.h:
2175         * bindings/scripts/test/JS/JSTestObj.cpp:
2176         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
2177         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
2178         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
2179         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
2180         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2181         * bindings/scripts/test/V8/V8TestObj.cpp:
2182         (WebCore::TestObjInternal::methodWithCallbackArgCallback):
2183         (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback):
2184         (WebCore::TestObjInternal::methodWithCallbackAndOptionalArgCallback):
2185         (WebCore::TestObjInternal::overloadedMethod5Callback):
2186         (WebCore::TestObjInternal::overloadedMethodCallback):
2187
2188 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
2189
2190         cssText should use StringBuilder
2191         https://bugs.webkit.org/show_bug.cgi?id=82028
2192
2193         Reviewed by Hajime Morita.
2194
2195         Make StylePropertySet::asText more efficient by deploying StringBuilder;
2196         avoids heap churn by String::operator+ and String::operator+=.
2197
2198         * css/StylePropertySet.cpp:
2199         (WebCore::StylePropertySet::asText):
2200
2201 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
2202
2203         REGRESSION(r111754): plugins/reloadplugins-and-pages.html fails on all platforms
2204         https://bugs.webkit.org/show_bug.cgi?id=82035
2205
2206         Rollout r111754 since it caused a test to fail and the test added by the patch
2207         is failing on Mac WebKit 2.
2208
2209         * WebCore.exp.in:
2210         * html/HTMLPlugInElement.cpp:
2211         (WebCore::HTMLPlugInElement::detach):
2212         (WebCore):
2213         (WebCore::HTMLPlugInElement::removedFromDocument):
2214         * html/HTMLPlugInElement.h:
2215         (HTMLPlugInElement):
2216         * testing/Internals.cpp:
2217         * testing/Internals.h:
2218         (Internals):
2219         * testing/Internals.idl:
2220
2221 2012-03-23  Adam Barth  <abarth@webkit.org>
2222
2223         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 2)
2224         https://bugs.webkit.org/show_bug.cgi?id=82026
2225
2226         Reviewed by Kentaro Hara.
2227
2228         This patch removes DOMWindow::resetNotifications, which was unneeded
2229         special-case logic for clearing the notifications center.  The previous
2230         patch that tried to accomplish the same thing did not override
2231         willDetachPage, which is why it caused crashes.
2232
2233         There's actually a cleaner way to handle these cases, which will let us
2234         implement reconnectFrame, but that will need to wait for the next
2235         patch.
2236
2237         * notifications/DOMWindowNotifications.cpp:
2238         (WebCore::DOMWindowNotifications::DOMWindowNotifications):
2239         (WebCore::DOMWindowNotifications::from):
2240         (WebCore::DOMWindowNotifications::webkitNotifications):
2241         (WebCore):
2242         (WebCore::DOMWindowNotifications::disconnectFrame):
2243         (WebCore::DOMWindowNotifications::willDetachPage):
2244         (WebCore::DOMWindowNotifications::reset):
2245         * notifications/DOMWindowNotifications.h:
2246         (DOMWindowNotifications):
2247         * page/DOMWindow.cpp:
2248         (WebCore::DOMWindow::willDetachPage):
2249         (WebCore::DOMWindow::disconnectDOMWindowProperties):
2250         (WebCore::DOMWindow::clearDOMWindowProperties):
2251         * page/DOMWindow.h:
2252         (DOMWindow):
2253         * page/Frame.cpp:
2254         (WebCore::Frame::willDetachPage):
2255
2256 2012-03-22  Adam Barth  <abarth@webkit.org>
2257
2258         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 1)
2259         https://bugs.webkit.org/show_bug.cgi?id=82015
2260
2261         Reviewed by Kentaro Hara.
2262
2263         This patch moves DOMWindow.webkitNotifications from DOMWindow.idl to
2264         DOMWindowNotificiations.idl in preparation for moving notificiations
2265         into Modules.
2266
2267         A future patch will remove DOMWindow::resetNotificaitions in favor of
2268         more general mechanisms.
2269
2270         * CMakeLists.txt:
2271         * DerivedSources.make:
2272         * DerivedSources.pri:
2273         * GNUmakefile.list.am:
2274         * Target.pri:
2275         * WebCore.gypi:
2276         * WebCore.vcproj/WebCore.vcproj:
2277         * WebCore.xcodeproj/project.pbxproj:
2278         * notifications/DOMWindowNotifications.cpp: Added.
2279         (WebCore):
2280         (WebCore::DOMWindowNotifications::DOMWindowNotifications):
2281         (WebCore::DOMWindowNotifications::~DOMWindowNotifications):
2282         (WebCore::DOMWindowNotifications::from):
2283         (WebCore::DOMWindowNotifications::webkitNotifications):
2284         (WebCore::DOMWindowNotifications::reset):
2285         (WebCore::DOMWindowNotifications::supplementName):
2286         * notifications/DOMWindowNotifications.h: Added.
2287         (WebCore):
2288         (DOMWindowNotifications):
2289         * notifications/DOMWindowNotifications.idl: Added.
2290         * page/DOMWindow.cpp:
2291         (WebCore::DOMWindow::~DOMWindow):
2292         (WebCore):
2293         (WebCore::DOMWindow::resetNotifications):
2294         * page/DOMWindow.h:
2295         (WebCore):
2296         (DOMWindow):
2297         * page/DOMWindow.idl:
2298
2299 2012-03-22  Li Yin  <li.yin@intel.com>
2300
2301         A client MUST close a connection if it detects a masked frame
2302         https://bugs.webkit.org/show_bug.cgi?id=81361
2303
2304         Reviewed by Kent Tamura.
2305
2306         A server must not mask any frames that it sends to the client.
2307         Change the test case, not mask the frames from server to client.
2308         
2309         Test: http/tests/websocket/tests/hybi/invalid-masked-frames-from-server.html
2310
2311         * Modules/websockets/WebSocketChannel.cpp:
2312         (WebCore::WebSocketChannel::processFrame):
2313
2314 2012-03-22  Li Yin  <li.yin@intel.com>
2315
2316         [WebSocket]The minimal number of bytes MUST be used to encode the length
2317         https://bugs.webkit.org/show_bug.cgi?id=81443
2318
2319         Reviewed by Kent Tamura.
2320
2321         From RFC 6455 http://tools.ietf.org/html/rfc6455#section-5.2
2322         the minimal number of bytes MUST be used to encode the length
2323         
2324         New test case : http/tests/websocket/tests/hybi/invalid-encode-length.html
2325
2326         * Modules/websockets/WebSocketChannel.cpp:
2327         (WebCore::WebSocketChannel::parseFrame):
2328
2329 2012-03-22  Adam Barth  <abarth@webkit.org>
2330
2331         Unreviewed.  Sort xcodeproj file.
2332
2333         * WebCore.xcodeproj/project.pbxproj:
2334
2335 2012-03-22  Mao Yujie  <yujie.mao@intel.com>
2336
2337         Implement strict testing criterion for callback function definition
2338         https://bugs.webkit.org/show_bug.cgi?id=80005
2339
2340         Reviewed by Adam Barth.
2341
2342         Callback function should be defined as the function type instead of
2343         the object type.
2344
2345         LayoutTest: fast/dom/MediaStream/argument-types.html
2346
2347         * bindings/scripts/CodeGeneratorJS.pm:
2348         (GenerateParametersCheckExpression):
2349         (GenerateParametersCheck):
2350         * bindings/scripts/CodeGeneratorV8.pm:
2351         (GenerateParametersCheckExpression):
2352         (GenerateParametersCheck):
2353
2354 2012-03-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2355
2356         Convert hasGrammarMarker to use Internals interface
2357         https://bugs.webkit.org/show_bug.cgi?id=82004
2358
2359         Reviewed by Ryosuke Niwa.
2360
2361         Remove hasGrammarMarker functions, because it is able to work in the
2362         cross-port way through the Internals interface.
2363
2364         No new tests, since we are improving here the infra-structure
2365         for testing a specific method.
2366
2367         * testing/Internals.cpp:
2368         (WebCore::Internals::hasGrammarMarker):
2369         (WebCore):
2370         * testing/Internals.h:
2371         (Internals):
2372         * testing/Internals.idl:
2373
2374 2012-03-22  Xingnan Wang  <xingnan.wang@intel.com>
2375
2376         Add exception for the setter of "fftSize" in RealtimeAnalyserNode
2377         https://bugs.webkit.org/show_bug.cgi?id=81748
2378
2379         Reviewed by Chris Rogers.
2380
2381         * Modules/webaudio/RealtimeAnalyser.cpp:
2382         (WebCore::RealtimeAnalyser::setFftSize):
2383         * Modules/webaudio/RealtimeAnalyser.h:
2384         (RealtimeAnalyser):
2385         * Modules/webaudio/RealtimeAnalyserNode.cpp:
2386         (WebCore::RealtimeAnalyserNode::setFftSize):
2387         (WebCore):
2388         * Modules/webaudio/RealtimeAnalyserNode.h:
2389         (RealtimeAnalyserNode):
2390         * Modules/webaudio/RealtimeAnalyserNode.idl:
2391
2392 2012-03-22  Leo Yang  <leo.yang@torchmobile.com.cn>
2393
2394         [BlackBerry] Add HistoryItemViewState for BlackBerry port
2395         https://bugs.webkit.org/show_bug.cgi?id=81867
2396
2397         Reviewed by Rob Buis.
2398
2399         HistoryItemViewState is the blackberry specific field of HistoryItem.
2400         It's used to maintain the porting specific view state.
2401
2402         No new test because the port can't be built yet.
2403
2404         * history/HistoryItem.h:
2405         (HistoryItem):
2406         (WebCore::HistoryItem::viewState):
2407
2408 2012-03-22  SravanKumar Sandela  <ssandela@innominds.com>
2409
2410         Fieldset unexpectedly stretches to minimum intrinsic width
2411         https://bugs.webkit.org/show_bug.cgi?id=79128
2412
2413         Reviewed by Julien Chaffraix.
2414
2415         Fieldset element width will now check if css width is specified explicitly
2416         before stretching to minimum intrinsic width. The reference
2417         can be taken from IE9, instead of FF(FF acknowledged the broken behavior). 
2418
2419         Tests: fast/forms/fieldset-width-nostretch-ifspecified-expected.html
2420                fast/forms/fieldset-width-nostretch-ifspecified.html
2421
2422         * rendering/RenderFieldset.cpp:
2423         (WebCore::RenderFieldset::stretchesToMinIntrinsicLogicalWidth):
2424         (WebCore):
2425         * rendering/RenderFieldset.h:
2426         (RenderFieldset):
2427
2428 2012-03-22  Shawn Singh  <shawnsingh@chromium.org>
2429
2430         [chromium] Target surface should be damaged for a new layers even when layer had no changes
2431         https://bugs.webkit.org/show_bug.cgi?id=81879
2432
2433         Reviewed by Adrienne Walker.
2434
2435         Unit test added to CCDamageTrackerTest.
2436
2437         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
2438         (WebCore::CCDamageTracker::removeRectFromCurrentFrame): added a
2439         boolean arg to detect if the layer is new on this update.
2440
2441         (WebCore::CCDamageTracker::extendDamageForLayer): added logic that
2442         damages the target surface if the layer is new.
2443
2444         (WebCore::CCDamageTracker::extendDamageForRenderSurface): added
2445         logic that damages the target surface if the descendant surface is
2446         new; similar logic for the surface's replica if the replica is new.
2447
2448         * platform/graphics/chromium/cc/CCDamageTracker.h:
2449         (CCDamageTracker):
2450
2451 2012-03-22  Charles Wei  <charles.wei@torchmobile.com.cn>
2452
2453         [BlackBerry] Need to store the meta info of a page in the ViewState of the history
2454         https://bugs.webkit.org/show_bug.cgi?id=82000
2455
2456         Reviewed by Rob Buis.
2457
2458         Internally reviewed by George Staikos.
2459
2460         No new tests, BlackBerry porting doesn't build yet upstreaming.
2461
2462         * history/blackberry/HistoryItemViewState.h:
2463         (WebCore::HistoryItemViewState::HistoryItemViewState):
2464         (HistoryItemViewState):
2465
2466 2012-03-22  Adam Klein  <adamk@chromium.org>
2467
2468         [v8] wrapSlow methods should ref underlying object before creating wrapper
2469         https://bugs.webkit.org/show_bug.cgi?id=81919
2470
2471         Reviewed by Adam Barth.
2472
2473         Because instatiating the wrapper can trigger GC, it's important that
2474         wrapSlow() hold a reference to an object when creating a wrapper for
2475         that object. Once the V8 wrapper exists and is associated with the object,
2476         the reference can be handed off (via leakRef) to be handled by the normal
2477         binding code logic (where derefObject is called if the handle is GCed).
2478
2479         Binding tests have been updated to reflect this change.
2480
2481         Testing the change directly is hard. Any test landed today would only
2482         be a valid test until V8's logic about when to GC changes, at which point
2483         it would become dead weight. So I don't think it's worth landing a
2484         layout test along with this.
2485
2486         * bindings/scripts/CodeGeneratorV8.pm:
2487         (GenerateHeader): Make wrapSlow take a PassRefPtr for RefCounted objects.
2488         (GenerateToV8Converters): Get rid of the explicit call to ref() and
2489         instead call leakRef() when adding a RefCounted object to the DOM map.
2490         (GetPassRefPtrType): Helper to generate "PassRefPtr<T>", or "PassRefPtr<T<U> >" as appropriate.
2491         * bindings/scripts/test/V8/V8Float64Array.cpp:
2492         (WebCore::V8Float64Array::wrapSlow):
2493         * bindings/scripts/test/V8/V8Float64Array.h:
2494         (V8Float64Array):
2495         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2496         (WebCore::V8TestActiveDOMObject::wrapSlow):
2497         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2498         (V8TestActiveDOMObject):
2499         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2500         (WebCore::V8TestCustomNamedGetter::wrapSlow):
2501         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2502         (V8TestCustomNamedGetter):
2503         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2504         (WebCore::V8TestEventConstructor::wrapSlow):
2505         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2506         (V8TestEventConstructor):
2507         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2508         (WebCore::V8TestEventTarget::wrapSlow):
2509         * bindings/scripts/test/V8/V8TestEventTarget.h:
2510         (V8TestEventTarget):
2511         * bindings/scripts/test/V8/V8TestInterface.cpp:
2512         (WebCore::V8TestInterface::wrapSlow):
2513         * bindings/scripts/test/V8/V8TestInterface.h:
2514         (V8TestInterface):
2515         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2516         (WebCore::V8TestMediaQueryListListener::wrapSlow):
2517         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2518         (V8TestMediaQueryListListener):
2519         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2520         (WebCore::V8TestNamedConstructor::wrapSlow):
2521         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2522         (V8TestNamedConstructor):
2523         * bindings/scripts/test/V8/V8TestObj.cpp:
2524         (WebCore::V8TestObj::wrapSlow):
2525         * bindings/scripts/test/V8/V8TestObj.h:
2526         (V8TestObj):
2527         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2528         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
2529         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2530         (V8TestSerializedScriptValueInterface):
2531
2532 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2533
2534         [BlackBerry] add interface clearCredentials() and clearNeverRememberSites()
2535         https://bugs.webkit.org/show_bug.cgi?id=81887
2536
2537         Reviewed by Rob Buis.
2538
2539         Fixed SQL issue when clearing table logins and table never_remember.
2540
2541         No new tests.
2542
2543         * platform/network/blackberry/CredentialBackingStore.cpp:
2544         (WebCore::CredentialBackingStore::clearLogins):
2545         (WebCore::CredentialBackingStore::clearNeverRemember):
2546
2547 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2548
2549         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
2550         https://bugs.webkit.org/show_bug.cgi?id=80135
2551
2552         Reviewed by Rob Buis.
2553
2554         Modified the interface function authenticationChallenge() in class
2555         PageClientBlackBerry, moved Credential from return value to the
2556         function's reference parameter, and returned a bool to indicate if
2557         user pressed Ok button or not.
2558         Removed the logic which checks m_currentWebChallenge not null,
2559         because we should challenge user again if the last provided credential
2560         is not valid; also added the logic that will popup challenge
2561         dialog again immediately if user press Ok buttton directly without
2562         inputting anything.
2563
2564         No new tests.
2565
2566         * platform/blackberry/PageClientBlackBerry.h:
2567         * platform/network/blackberry/NetworkJob.cpp:
2568         (WebCore::NetworkJob::handleAuthHeader):
2569         (WebCore::NetworkJob::sendRequestWithCredentials):
2570
2571 2012-03-22  Jason Liu  <jason.liu@torchmobile.com.cn>
2572
2573         [BlackBerry] Synchronize platform/network/blackberry
2574         https://bugs.webkit.org/show_bug.cgi?id=81874
2575
2576         We changed a lot in these files locally. But the changes are not upstreamed.
2577         It is not convenient to do the other upstreaming work based on these differences.
2578         So upstream these changes.
2579
2580         Reviewed by Rob Buis.
2581
2582         No new tests. Just synchronize codes.
2583
2584         * platform/network/blackberry/NetworkJob.cpp:
2585         (WebCore::NetworkJob::NetworkJob):
2586         (WebCore::NetworkJob::initialize):
2587         (WebCore::NetworkJob::handleNotifyHeaderReceived):
2588         (WebCore::NetworkJob::handleNotifyDataReceived):
2589         (WebCore::NetworkJob::sendResponseIfNeeded):
2590         (WebCore::NetworkJob::sendRequestWithCredentials):
2591         (WebCore::NetworkJob::handleAbout):
2592         * platform/network/blackberry/NetworkJob.h:
2593         (WebCore::NetworkJob::isError):
2594         (NetworkJob):
2595         * platform/network/blackberry/NetworkManager.cpp:
2596         (WebCore::NetworkManager::startJob):
2597         * platform/network/blackberry/ResourceRequest.h:
2598         (WebCore::ResourceRequest::ResourceRequest):
2599         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
2600         (WebCore::platformTargetTypeForRequest):
2601
2602 2012-03-22  Tom Sepez  <tsepez@chromium.org>
2603
2604         XSS Auditor bypass via script tag src=data:, URLS.
2605         https://bugs.webkit.org/show_bug.cgi?id=81948
2606
2607         Reviewed by Adam Barth.
2608
2609         This change fixes an XSSAuditor bypass wherby a script with a data: URL src
2610         attribute could evade detection by using characters from the page to create
2611         a snippet for matching not found in the URL's reflected vector.  This change 
2612         terminates the snippet for matching earlier in these cases.
2613         
2614         Test: http/tests/security/xssAuditor/script-tag-with-source-data-url2.html
2615
2616         * html/parser/XSSAuditor.cpp:
2617         (WebCore::XSSAuditor::decodedSnippetForAttribute):
2618
2619 2012-03-22  Dana Jansens  <danakj@chromium.org>
2620
2621         [chromium] Incorrect assert on animating opacity for a surface
2622         https://bugs.webkit.org/show_bug.cgi?id=81994
2623
2624         Reviewed by Adrienne Walker.
2625
2626         Draw opacity and animation state match on the surface itself. A
2627         surface with animating opacity always has an owning layer without
2628         animation, as the surface does the animation for it.
2629
2630         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2631         (WebCore::CCLayerTreeHost::paintLayerContents):
2632
2633 2012-03-22  Dana Jansens  <danakj@chromium.org>
2634
2635         [chromium] Skip frames when checkerboarding an animation
2636         https://bugs.webkit.org/show_bug.cgi?id=81716
2637
2638         Reviewed by Adrienne Walker.
2639
2640         This will stop drawing frames when prepareToDraw fails, if the draw is
2641         not forced. The expected behaviour is outlined below by the unit tests.
2642
2643         When a draw fails, we:
2644         1. Set m_needsRedraw to try again next vsync
2645         2. Set m_needsCommit because we need more data from webkit to succeed
2646         3. Set m_drawIfPossibleFailed. This allows us to try draw again within
2647         the same vsync *if* a commit finishes during this time.
2648
2649         Unit test: CCSchedulerTest.RequestRedrawInsideFailedDraw
2650                    CCSchedulerTest.RequestCommitInsideFailedDraw
2651                    CCSchedulerTest.NoBeginFrameWhenDrawFails
2652                    CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain
2653                    CCSchedulerStateMachineTest.TestSetNeedsRedrawDuringFailedDrawDoesNotRemoveNeedsRedraw
2654                    CCSchedulerStateMachineTest.TestCommitAfterFailedDrawAllowsDrawInSameFrame
2655                    CCSchedulerStateMachineTest.TestCommitAfterFailedAndSuccessfulDrawDoesNotAllowDrawInSameFrame
2656                    CCSchedulerStateMachineTest.TestFailedDrawIsRetriedNextVSync
2657
2658         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2659         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
2660         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
2661         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2662         (CCLayerTreeHostImpl):
2663         * platform/graphics/chromium/cc/CCScheduler.cpp:
2664         (WebCore::CCScheduler::processScheduledActions):
2665         * platform/graphics/chromium/cc/CCScheduler.h:
2666         (CCSchedulerClient):
2667         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
2668         (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine):
2669         (WebCore::CCSchedulerStateMachine::nextAction):
2670         (WebCore::CCSchedulerStateMachine::updateState):
2671         (WebCore::CCSchedulerStateMachine::didDrawIfPossibleCompleted):
2672         (WebCore):
2673         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
2674         (CCSchedulerStateMachine):
2675         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2676         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
2677         (WebCore):
2678         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapIfPossible):
2679         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapForced):
2680         * platform/graphics/chromium/cc/CCThreadProxy.h:
2681         (CCThreadProxy):
2682
2683 2012-03-22  W. James MacLean  <wjmaclean@chromium.org>
2684
2685         [chromium] Force update of nonFastScrollableRegion if target CCLayerImpl has been freshly created.
2686         https://bugs.webkit.org/show_bug.cgi?id=81968
2687
2688         Reviewed by Adrienne Walker.
2689
2690         Added unit test to existing tests for TreeSynchronizer.
2691
2692         When creating a new CCLayerImpl during tree synchronization, make sure we transfer the nonFastScrollableRegion as
2693         the new CCLayerImpl will default to an empty region.
2694
2695         * platform/graphics/chromium/LayerChromium.h:
2696         (WebCore::LayerChromium::nonFastScrollableRegion):
2697         (WebCore::LayerChromium::setNonFastScrollableRegionChanged):
2698         * platform/graphics/chromium/TreeSynchronizer.cpp:
2699         (WebCore::TreeSynchronizer::reuseOrCreateCCLayerImpl):
2700
2701 2012-03-22  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
2702
2703         [CMake] Unreviewed build fix after r111778.
2704
2705         * CMakeLists.txt: Replace ${JAVASCRIPTCORE_DIR}/wtf includes with
2706         ${WTF_DIR}/wtf ones.
2707
2708 2012-03-22  Tony Chang  <tony@chromium.org>
2709
2710         Unreviewed, fix chromium build after wtf move.
2711
2712         Only use newwtf, remove references to wtf.
2713
2714         * WebCore.gyp/WebCore.gyp:
2715
2716 2012-03-22  Benjamin Poulain  <bpoulain@apple.com>
2717
2718         Remove an obsolete comment regarding magic frames from Geolocation
2719         https://bugs.webkit.org/show_bug.cgi?id=81871
2720
2721         Reviewed by Alexey Proskuryakov.
2722
2723         Moving a frame into another document is no longer possible after r111361. The comment
2724         is now irrelevant.
2725
2726         * Modules/geolocation/Geolocation.cpp:
2727         (WebCore::Geolocation::stop):
2728
2729 2012-03-22  Csaba Osztrogonác  <ossy@webkit.org>
2730
2731         Actually move WTF files to their new home
2732         https://bugs.webkit.org/show_bug.cgi?id=81844
2733
2734         [Qt] Unreviewed buildfix after r111778.
2735
2736         * Target.pri:
2737
2738 2012-03-22  Kentaro Hara  <haraken@chromium.org>
2739
2740         run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl
2741         https://bugs.webkit.org/show_bug.cgi?id=81852
2742
2743         Reviewed by Adam Barth.
2744
2745         run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl:
2746
2747         Use of uninitialized value in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2743.
2748         Use of uninitialized value $name in substitution (s///) at WebCore/bindings/scripts/CodeGenerator.pm line 119.
2749         Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2969.
2750         Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2972.
2751         Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 367.
2752         Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 368.
2753         ...
2754
2755         This is because [Constructor(...)] does not yet support [Optional] arguments.
2756         It just supports [Optional=DefaultIsUndefined] and [Optional=DefaultIsNullString] arguments:
2757         https://trac.webkit.org/wiki/WebKitIDL#Constructor
2758
2759         This patch replaces [Optional] with [Optional=DefaultIsUndefined]
2760         in TestSerializedScriptValueInterface.idl.
2761
2762         Test: bindings/scripts/test/TestSerializedScriptValueInterface.idl
2763
2764         * bindings/scripts/CodeGeneratorJS.pm:
2765         (GenerateConstructorDefinition):
2766         * bindings/scripts/CodeGeneratorV8.pm:
2767         (GenerateConstructorCallback):
2768         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2769         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
2770         * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
2771         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2772         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
2773
2774 2012-03-22  Michal Mocny  <mmocny@google.com>
2775
2776         [chromium] LayerRendererChromium should use GpuMemoryAllocationChanged callback to explicitly manage framebuffer.
2777         https://bugs.webkit.org/show_bug.cgi?id=81823
2778
2779         Reviewed by Adrienne Walker.
2780
2781         New UnitTests: LayerRendererChromiumTest
2782
2783         * platform/graphics/chromium/LayerRendererChromium.cpp:
2784         (LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
2785         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::create):
2786         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::~LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
2787         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChanged):
2788         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
2789         (WebCore):
2790         (WebCore::LayerRendererChromium::LayerRendererChromium):
2791         (WebCore::LayerRendererChromium::initialize):
2792         (WebCore::LayerRendererChromium::~LayerRendererChromium):
2793         (WebCore::LayerRendererChromium::setVisible):
2794         (WebCore::LayerRendererChromium::swapBuffers):
2795         (WebCore::LayerRendererChromium::discardFramebuffer):
2796         (WebCore::LayerRendererChromium::ensureFramebuffer):
2797         * platform/graphics/chromium/LayerRendererChromium.h:
2798         (WebCore):
2799         (LayerRendererChromiumClient):
2800         (LayerRendererChromium):
2801         (WebCore::LayerRendererChromium::isFramebufferDiscarded):
2802         (ScopedEnsureFramebufferAllocation):
2803         (WebCore::ScopedEnsureFramebufferAllocation::ScopedEnsureFramebufferAllocation):
2804         (WebCore::ScopedEnsureFramebufferAllocation::~ScopedEnsureFramebufferAllocation):
2805         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2806         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
2807         (LayerRendererCapabilities):
2808         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2809         (WebCore::CCLayerTreeHostImpl::setVisible):
2810         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2811         (CCLayerTreeHostImpl):
2812         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2813         (WebCore::CCSingleThreadProxy::compositeAndReadback):
2814         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2815         (WebCore::CCThreadProxy::compositeAndReadback):
2816
2817 2012-03-22  Adam Barth  <abarth@webkit.org>
2818
2819         ContainerNode::insertedIntoTree and removedFromTree use weak iteration patterns
2820         https://bugs.webkit.org/show_bug.cgi?id=80570
2821
2822         Reviewed by Ryosuke Niwa.
2823
2824         These functions use weak iteration patterns, but as far as I can tell,
2825         we never execute script below these functions.  This patch adds ASSERTs
2826         to help us avoid adding events in the future.
2827
2828         * dom/ContainerNode.cpp:
2829         (WebCore::ContainerNode::insertedIntoTree):
2830         (WebCore::ContainerNode::removedFromTree):
2831         * html/HTMLMediaElement.cpp:
2832         (WebCore::HTMLMediaElement::loadInternal):
2833             - There's a somewhat complex call chain from insertedIntoTree into
2834               HTMLMediaElement, and somewhat complex control flow below
2835               loadInternal that eventually leads to the BeforeLoad event being
2836               fired.  In studying this code, I don't see a way for the
2837               BeforeLoad event to be fired during insertedIntoTree, but I've
2838               added this assert here to make sure we don't call loadInternal
2839               when we're not supposed to dispatch events.  This ASSERT should
2840               help us catch these BeforeLoad errors more quickly.
2841
2842 2012-03-22  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
2843
2844         Crash in fast/dom/navigator-detached-nocrash.html
2845         https://bugs.webkit.org/show_bug.cgi?id=81773
2846
2847         Reviewed by Adam Barth.
2848
2849         BatteryManager::create() blindly assumes the Navigator* it
2850         receives has a valid Frame, which is not always the case, as made
2851         evident by the crashing test.
2852
2853         Follow abarth's suggestion and just stop
2854         NavigatorBattery::webkitBattery() before it reaches the call to
2855         BatteryManager::create() if that's the case.
2856
2857         No new tests, covered by fast/dom/navigator-detached-nocrash.html.
2858
2859         * Modules/battery/NavigatorBattery.cpp:
2860         (WebCore::NavigatorBattery::webkitBattery):
2861
2862 2012-03-22  Emil A Eklund  <eae@chromium.org>
2863
2864         Unreviewed, add missing include statement for CSSValueList.h.
2865
2866         * css/CSSStyleSelector.h:
2867
2868 2012-03-22  Tony Chang  <tony@chromium.org>
2869
2870         flexbox flexing implementation should match the spec
2871         https://bugs.webkit.org/show_bug.cgi?id=70796
2872
2873         Reviewed by Ojan Vafai.
2874
2875         Match the algorithm in the spec. Handling min/max constraints are slightly improved.
2876         http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths
2877
2878         New test cases in css3/flexbox/flex-algorithm-min-max.html.
2879
2880         * rendering/RenderFlexibleBox.cpp:
2881         (WebCore::adjustFlexSizeForMinAndMax): Step 5 of resolving flexible lengths.
2882         (WebCore):
2883         (WebCore::RenderFlexibleBox::Violation::Violation):
2884         (RenderFlexibleBox::Violation):
2885         (WebCore::RenderFlexibleBox::freezeViolations): Used by step 6.
2886         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
2887         * rendering/RenderFlexibleBox.h:
2888
2889 2012-03-22  Emil A Eklund  <eae@chromium.org>
2890
2891         Unreviewed, add missing import.
2892
2893         * rendering/RenderThemeMac.mm:
2894
2895 2012-03-22  Anders Carlsson  <andersca@apple.com>
2896
2897         ASSERT(!needsLayout) in RenderView.cpp when visiting http://www.panic.com/blog/
2898         https://bugs.webkit.org/show_bug.cgi?id=81953
2899         <rdar://problem/11086998>
2900
2901         Reviewed by Sam Weinig.
2902
2903         If a page ends up creating CATiledLayers, CA transactions can be committed outside of the normal
2904         CA run loop observer, so we can't call setNeedsDisplay on tile cache layers directly because then
2905         we'll end up calling into painting code before all the layers have been flushed.
2906
2907         Fix this by adding a list of dirty rects to platformCALayerDidCreateTiles and change GraphicsLayerCA to
2908         mark them as dirty. This ensures that any CA transaction commits won't cause newly added layers to be painted.
2909
2910         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2911         (WebCore::LayerClient::platformCALayerDidCreateTiles):
2912         * platform/graphics/ca/GraphicsLayerCA.cpp:
2913         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
2914         * platform/graphics/ca/GraphicsLayerCA.h:
2915         (GraphicsLayerCA):
2916         * platform/graphics/ca/PlatformCALayerClient.h:
2917         (PlatformCALayerClient):
2918         * platform/graphics/ca/mac/TileCache.mm:
2919         (WebCore::TileCache::setScale):
2920         (WebCore::TileCache::revalidateTiles):
2921         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2922         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDidCreateTiles):
2923
2924 2012-03-19  Robert Hogan  <robert@webkit.org>
2925
2926         Text should overflow when list item height set to 0
2927         https://bugs.webkit.org/show_bug.cgi?id=78726
2928
2929         Reviewed by Julien Chaffraix.
2930
2931         Tests: css2.1/20110323/height-applies-to-010a-expected.html
2932                fast/css/heightless-list-item-expected.html
2933                fast/css/heightless-list-item.html
2934
2935         * rendering/RenderListItem.cpp:
2936         (WebCore::RenderListItem::paint):
2937            If the list item has height:0, only paint it if the list item allows any block or inline content 
2938            to overflow unclipped. The zero-height check is a shortcut to avoid unnecessary painting and 
2939            this seems to be the only case where there's something to do.
2940
2941 2012-03-22  Dave Michael  <dmichael@chromium.org>
2942
2943         HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called
2944         https://bugs.webkit.org/show_bug.cgi?id=80428
2945
2946         Reviewed by Eric Seidel.
2947
2948         Make HTMLPluginElement release its m_NPObject in detach() to break a
2949         reference-counting cycle that happens on reload or navigation. With this
2950         change, HTMLPlugInElement::removedFromDocument is unnecessary, so it
2951         was removed. Note that Releasing m_NPObject does not result in a call to
2952         the plugin; it simply releases a reference count on the wrapper object
2953         for this HTMLPlugInElement. (The plugin's NPP_Deallocate is invoked
2954         when the render tree is destroyed, when PluginView calls
2955         PluginPackage::unload.) Thus, it is safe to release m_NPObject in
2956         detach, because it can not result in layout or style changes.
2957
2958         Also added numberOfLiveNodes() and numberOfLiveDocuments() to
2959         window.internals to enable testing.
2960
2961         Test: plugins/netscape-dom-access-and-reload.html
2962
2963         * WebCore.exp.in:
2964         * html/HTMLPlugInElement.cpp:
2965         (WebCore::HTMLPlugInElement::detach):
2966         * html/HTMLPlugInElement.h:
2967         (HTMLPlugInElement):
2968         * testing/Internals.cpp:
2969         (WebCore::Internals::numberOfLiveDocuments):
2970         (WebCore::Internals::numberOfLiveNodes):
2971         (WebCore):
2972         * testing/Internals.h:
2973         (Internals):
2974         * testing/Internals.idl:
2975
2976 2012-03-22  Shawn Singh  <shawnsingh@chromium.org>
2977
2978         [chromium] Make CCDamageTracker robust to empty layer lists
2979         https://bugs.webkit.org/show_bug.cgi?id=81831
2980
2981         Reviewed by Adrienne Walker.
2982
2983         Added a unit test in CCDamageTrackerTest that causes a crash in
2984         the old code. With this patch applied, the crash will not occur.
2985         In theory, that crash should never occur anyway, unless there is a
2986         bug outside the damage tracker, but for robustness it's
2987         appropriate to handle it properly.
2988
2989         In addition to this fix, performed some trivial maintenance on the
2990         damage tracker code.
2991
2992         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
2993         (WebCore::CCDamageTracker::updateDamageTrackingState): removed
2994         unclean code that accessed the targetSurface to get necessary
2995         information. Instead, we now pass those args through the damage
2996         tracker's API.
2997
2998         * platform/graphics/chromium/cc/CCDamageTracker.h:
2999         (CCDamageTracker): modified args passed to damage tracker on update.
3000
3001         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3002         (WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces):
3003         modified args passed to damage tracker on update.
3004
3005 2012-03-22  Julien Chaffraix  <jchaffraix@webkit.org>
3006
3007         Enable style sharing for elements with a style attribute
3008         https://bugs.webkit.org/show_bug.cgi?id=81523
3009
3010         Reviewed by Antti Koivisto.
3011
3012         Memory improvement change only.
3013
3014         Overall, this is a performance wash (some benchmarks may regress a bit due to the increase in time taken
3015         by CSSStyleSelector::locateSharedStyle as we try more nodes, others increase their performance due to style sharing).
3016
3017         Instrumenting our style sharing, this should give us some nice memory shavings on some benchmarks:
3018         - HTML5 isn't impacted as it doesn't use much inline style
3019         - page cyclers' intl1 showed a 6% increase in style sharing.
3020
3021         * css/CSSStyleSelector.cpp:
3022         (WebCore::CSSStyleSelector::canShareStyleWithElement):
3023         This method now handles inline style like presentation attributes on the element.
3024
3025         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3026         (WebCore::CSSStyleSelector::locateSharedStyle):
3027         Don't bail out for an element with an inline style declaration.
3028
3029         (WebCore::CSSStyleSelector::stylesEqual):
3030         Generalized attributeStylesEqual to share the logic between attribute and
3031         inline style property set. This means that attribute checks are actually
3032         doing a little extra more work but that didn't impact our benchmarks.
3033
3034 2012-03-22  Kevin Ollivier  <kevino@theolliviers.com>
3035
3036         [wx] Unreviewed. WebDOM build fix after array type changes.
3037
3038         * bindings/scripts/CodeGeneratorCPP.pm:
3039         (ShouldSkipType):
3040
3041 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
3042
3043         Web Inspector: text gutter decorations should move upon edits.
3044         https://bugs.webkit.org/show_bug.cgi?id=81932
3045
3046         Reviewed by Vsevolod Vlasov.
3047
3048         Decorations set by the line number now shift as editing inserts / removes lines.
3049
3050         * inspector/front-end/TextViewer.js:
3051         (WebInspector.TextViewer.prototype._syncLineHeight):
3052         (WebInspector.TextEditorGutterPanel):
3053         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
3054         (WebInspector.TextEditorGutterPanel.prototype.syncClientHeight):
3055         (WebInspector.TextEditorGutterPanel.prototype.addDecoration):
3056         (WebInspector.TextEditorGutterPanel.prototype.removeDecoration):
3057
3058 2012-03-21  Robert Hogan  <robert@webkit.org>
3059
3060         CSS 2.1 failure: fixed-table-layout-006 fails
3061         https://bugs.webkit.org/show_bug.cgi?id=78412
3062
3063         Reviewed by Julien Chaffraix.
3064
3065         Tests: css2.1/20110323/fixed-table-layout-006.htm
3066                fast/css/fixed-table-layout-cell-padding.htm
3067
3068         In fixed tables, positive width specified on a column should include borders and padding.
3069         See the thread at http://lists.w3.org/Archives/Public/www-style/2011Oct/0502.html. The discussion
3070         there resulted in a whole new set of tests for section 17.5.2.1 in the CSS 2.1 spec. See 
3071         http://test.csswg.org/harness/test/CSS21_DEV/section/17.5.2.1/. This patch allows WebKit
3072         to pass all of them, and all tests for the 17.5.2.1 section as a whole. I'll land them all separately.
3073     
3074         * rendering/FixedTableLayout.cpp:
3075         (WebCore::FixedTableLayout::calcWidthArray): Include border width and cell padding in the width of the column.
3076          Note that borderAndPaddingLogicalWidth() returns the border width for separate and collapsed borders as appropriate.
3077
3078 2012-03-22  Simon Fraser  <simon.fraser@apple.com>
3079
3080         Factor compositing layer updates after scroll into a new method
3081         https://bugs.webkit.org/show_bug.cgi?id=81943
3082
3083         Reviewed by Dean Jackson.
3084
3085         Move some code that updates compositing layers after scrolling
3086         into its own method, for cleanliness.
3087
3088         * rendering/RenderLayer.cpp:
3089         (WebCore::RenderLayer::scrollTo):
3090         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
3091         (WebCore):
3092         * rendering/RenderLayer.h:
3093         (RenderLayer):
3094
3095 2012-03-22  Gavin Barraclough  <barraclough@apple.com>
3096
3097         Add JSValue::isFunction
3098         https://bugs.webkit.org/show_bug.cgi?id=81935
3099
3100         Reviewed by Geoff Garen.
3101
3102         This would be useful in the WebCore bindings code.
3103         Also, remove asFunction, replace with jsCast<JSFunction*>.
3104
3105         * bindings/js/JSInjectedScriptHostCustom.cpp:
3106         (WebCore::JSInjectedScriptHost::functionDetails):
3107         * bindings/js/ScriptCallStackFactory.cpp:
3108         (WebCore::createScriptCallStack):
3109
3110 2012-03-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3111
3112         TiledBackingStore: Fix test regressions that appeared with r111560.
3113         https://bugs.webkit.org/show_bug.cgi?id=81519
3114
3115         Reviewed by Kenneth Rohde Christiansen.
3116
3117         The visible rect wasn't intersected with the contents rect anymore which
3118         could lead to an astronomical layer size to check for intersecting tiles.
3119
3120         Add a visibleContentsRect that doesn't do the conversion and use it
3121         in visibleAreaIsCovered.
3122
3123         * platform/graphics/TiledBackingStore.cpp:
3124         (WebCore::TiledBackingStore::visibleContentsRect):
3125         (WebCore):
3126         (WebCore::TiledBackingStore::visibleRect):
3127         (WebCore::TiledBackingStore::visibleAreaIsCovered):
3128         * platform/graphics/TiledBackingStore.h:
3129         (TiledBackingStore):
3130
3131 2012-03-22  Joe Thomas  <joethomas@motorola.com>
3132
3133         Make Length Calculation functions non-inline
3134         https://bugs.webkit.org/show_bug.cgi?id=81733
3135
3136         Currently length calculation functions in LengthFunctions.h are inline. These functions are pretty big to be inline.
3137         And these functions are expected to grow again when new length units will be introduced in bug 27160.
3138
3139         A decent rule of thumb is to not inline a function if it is more than 10 lines long. Also it's typically not cost effective to inline
3140         functions with loops or switch statements. (Reference: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Inline_Functions).
3141
3142         Ran PerformanceTests/Parser/html5-full-render.html on Mac Snow-Leopard with and without the patch and did not see much performance difference.
3143
3144         Reviewed by Antti Koivisto.
3145
3146         * CMakeLists.txt:
3147         * GNUmakefile.list.am:
3148         * Target.pri:
3149         * WebCore.gypi:
3150         * WebCore.vcproj/WebCore.vcproj:
3151         * WebCore.xcodeproj/project.pbxproj:
3152         * css/LengthFunctions.cpp: Added.
3153         (WebCore):
3154         (WebCore::miminumValueForLength):
3155         (WebCore::valueForLength):
3156         (WebCore::floatValueForLength):
3157         * css/LengthFunctions.h:
3158         (WebCore):
3159
3160 2012-03-22  Alexis Menard  <alexis.menard@openbossa.org>
3161
3162         Increase code sharing between CSSParser and CSSPropertyLonghand.
3163         https://bugs.webkit.org/show_bug.cgi?id=81587
3164
3165         Reviewed by Antti Koivisto.
3166
3167         Expose the longhands declaration for a given shorthand in CSSPropertyLonghand and
3168         make CSSParser use them. It will make the declaration of longhands in one place only.
3169         Remove the map of CSSPropertyLonghand and replace it by a regular switch/case.
3170         The map doesn't bring much here and it's cleaner and faster to use the switch.
3171         It also shows a little performance improvement in CSS/CSSPropertySetterGetter.html.
3172
3173         No new tests : no behavior change.
3174
3175         * css/CSSParser.cpp:
3176         (WebCore::CSSParser::parseValue):
3177         (WebCore::CSSParser::parseAnimationShorthand):
3178         (WebCore::CSSParser::parseTransitionShorthand):
3179         (WebCore::CSSParser::parseShorthand):
3180         Modify the prototype of this function to directly use the CSSPropertyLonghand.
3181         * css/CSSParser.h:
3182         (WebCore):
3183         (CSSParser):
3184         * css/CSSPropertyLonghand.cpp:
3185         (WebCore):
3186         (WebCore::backgroundLonghand):
3187         (WebCore::backgroundPositionLonghand):
3188         (WebCore::backgroundRepeatLonghand):
3189         (WebCore::borderLonghand):
3190         (WebCore::borderBottomLonghand):
3191         (WebCore::borderColorLonghand):
3192         (WebCore::borderImageLonghand):
3193         (WebCore::borderLeftLonghand):
3194         (WebCore::borderRadiusLonghand):
3195         (WebCore::borderRightLonghand):
3196         (WebCore::borderSpacingLonghand):
3197         (WebCore::borderStyleLonghand):
3198         (WebCore::borderTopLonghand):
3199         (WebCore::borderWidthLonghand):
3200         (WebCore::listStyleLonghand):
3201         (WebCore::fontLonghand):
3202         (WebCore::marginLonghand):
3203         (WebCore::outlineLonghand):
3204         (WebCore::overflowLonghand):
3205         (WebCore::paddingLonghand):
3206         (WebCore::webkitAnimationLonghand):
3207         (WebCore::webkitBorderAfterLonghand):
3208         (WebCore::webkitBorderBeforeLonghand):
3209         (WebCore::webkitBorderEndLonghand):
3210         (WebCore::webkitBorderStartLonghand):
3211         (WebCore::webkitColumnsLonghand):
3212         (WebCore::webkitColumnRuleLonghand):
3213         (WebCore::webkitFlexFlowLonghand):
3214         (WebCore::webkitMarginCollapseLonghand):
3215         (WebCore::webkitMarqueeLonghand):
3216         (WebCore::webkitMaskLonghand):
3217         (WebCore::webkitMaskPositionLonghand):
3218         (WebCore::webkitMaskRepeatLonghand):
3219         (WebCore::webkitTextEmphasisLonghand):
3220         (WebCore::webkitTextStrokeLonghand):
3221         (WebCore::webkitTransitionLonghand):
3222         (WebCore::webkitTransformOriginLonghand):
3223         (WebCore::webkitWrapLonghand):
3224         (WebCore::longhandForProperty):
3225         * css/CSSPropertyLonghand.h:
3226         (WebCore):
3227
3228 2012-03-22  Emil A Eklund  <eae@chromium.org>
3229
3230         Unreviewed, touching file to force bots to pick up CSS_SHADERS flag change. 
3231
3232         * css/CSSStyleSelector.h:
3233         (CSSStyleSelector):
3234
3235 2012-03-22  Xingnan Wang  <xingnan.wang@intel.com>
3236
3237         ReverbConvolver::latencyFrames() should return 0.
3238         https://bugs.webkit.org/show_bug.cgi?id=81806
3239
3240         Reviewed by Chris Rogers.
3241
3242         * platform/audio/ReverbConvolver.cpp:
3243         (WebCore::ReverbConvolver::latencyFrames):
3244
3245 2012-03-22  Tony Chang  <tony@chromium.org>
3246
3247         refactor flexbox in preparation for flex-line-pack
3248         https://bugs.webkit.org/show_bug.cgi?id=81843
3249
3250         Reviewed by Ojan Vafai.
3251
3252         Replace WrapReverseContext with a vector of LineContexts that contain
3253         the same information, plus values needed for flex-align.
3254
3255         alignChildren has been moved to after all the lines have been
3256         positioned. We want to align children after flex-line-pack has changed
3257         the size of each line to avoid unnecessary layouts.
3258
3259         Take 2: Remove the assert. If there are no children, then there are no
3260         flex lines. Instead, assert that child is not null.
3261
3262         No new tests, just refactoring.
3263
3264         * rendering/RenderFlexibleBox.cpp:
3265         (WebCore::RenderFlexibleBox::LineContext::LineContext): New struct,
3266         holds information needed for wrap-reverse and aligning children.
3267         (RenderFlexibleBox::LineContext):
3268         (WebCore::RenderFlexibleBox::layoutFlexItems): alignChildren after layout out all the lines rather than after each line.
3269         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): don't alignChildren
3270         (WebCore::RenderFlexibleBox::alignChildren): align all flex items, not just a line at a time.
3271         (WebCore::RenderFlexibleBox::flipForWrapReverse): Update to use LineContext
3272         * rendering/RenderFlexibleBox.h:
3273
3274 2012-03-22  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3275
3276         Event dispatching in XMLHttpRequestProgressEventThrottle should go through XMLHttpRequestProgressEventThrottle::dispatchEvent
3277         https://bugs.webkit.org/show_bug.cgi?id=46743
3278
3279         Reviewed by Julien Chaffraix
3280         Based on original patch by Anton D'Auria
3281
3282         In preparation for platform-specific queuing of XMLHttpRequest events,
3283         this patch changes all calls to m_target->dispatchEvent to
3284         XMLHttpRequestProgressEventThrottle::dispatchEvent.
3285         Currently, we queue only one progress event on suspend() if we have
3286         throttled progress events. We should be able to queue all XHR events
3287         that can be generated after suspend(), if the platform network layer
3288         continues to receive data.
3289         XMLHttpRequest uses XMLHttpRequestProgressEventThrottle to dispatch only
3290         download events, so this doesn't change behavior of upload events, which
3291         aren't throttled or queued.
3292
3293         * xml/XMLHttpRequest.cpp:
3294         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
3295         * xml/XMLHttpRequestProgressEventThrottle.cpp:
3296         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchReadyStateChangeEvent):
3297         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEvent):
3298         (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent):
3299         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchPausedEvent):
3300         (WebCore::XMLHttpRequestProgressEventThrottle::fired):
3301         * xml/XMLHttpRequestProgressEventThrottle.h:
3302         (XMLHttpRequestProgressEventThrottle):
3303
3304 2012-03-22  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
3305
3306         [EFL] Map BackSpace key code to Unicode value
3307         https://bugs.webkit.org/show_bug.cgi?id=81130
3308
3309         Reviewed by Gustavo Noronha Silva.
3310
3311         Test: fast/events/backspace-navigates-back.html
3312
3313         * platform/efl/EflKeyboardUtilities.cpp:
3314         (WebCore::createKeyMap): Map BackSpace to Unicode value
3315
3316 2012-03-22  Abhishek Arya  <inferno@chromium.org>
3317
3318         Incorrect beforeChild parent calculation in RenderRubyBase::moveChildren.
3319         https://bugs.webkit.org/show_bug.cgi?id=80297
3320
3321         Reviewed by Julien Chaffraix.
3322
3323         beforeChild might share the same anonymous block parent with other previous
3324         siblings. Before moving the children across ruby bases, we need to make sure
3325         to split the tree across the beforeChild correctly.
3326
3327         Test: fast/ruby/ruby-text-before-child-split.html
3328
3329         * rendering/RenderRubyBase.cpp:
3330         (WebCore::RenderRubyBase::moveChildren):
3331
3332 2012-03-22  Kristóf Kosztyó  <kkristof@inf.u-szeged.hu>
3333
3334         [Qt] Fix Qt minimal build after r111692
3335
3336         Reviewed by Csaba Osztrogonác.
3337
3338         * bindings/js/JSScriptProfileNodeCustom.cpp:
3339
3340 2012-03-22  Adrienne Walker  <enne@google.com>
3341
3342         [chromium] Fix scrollbar layers holding onto invalid textures after lost context
3343         https://bugs.webkit.org/show_bug.cgi?id=81841
3344
3345         Reviewed by James Robinson.
3346
3347         Unit test: CCLayerTreeHostImplTest.scrollbarLayerLostContext
3348
3349         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
3350         (WebCore::CCScrollbarLayerImpl::willDraw):
3351
3352 2012-03-22  Philippe Normand  <pnormand@igalia.com>
3353
3354         [GTK] ASSERT bug in WebAudio (AudioFileReader)
3355         https://bugs.webkit.org/show_bug.cgi?id=81777
3356
3357         Reviewed by Martin Robinson.
3358
3359         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
3360         (WebCore::AudioFileReader::decodeAudioForBusCreation): Don't steal
3361         the GstBus floating reference.
3362         (WebCore::AudioFileReader::createBus): Ditto.
3363
3364 2012-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
3365
3366         Unreviewed: Web Inspector: fix syntax error in text.
3367
3368         * English.lproj/localizedStrings.js:
3369         * inspector/front-end/HeapSnapshotProxy.js:
3370         (WebInspector.HeapSnapshotWorker.prototype._messageReceived):
3371
3372 2012-03-22  Sheriff Bot  <webkit.review.bot@gmail.com>
3373
3374         Unreviewed, rolling out r111688.
3375         http://trac.webkit.org/changeset/111688
3376         https://bugs.webkit.org/show_bug.cgi?id=81912
3377
3378         "Heap profiler test fails" (Requested by yurys on #webkit).
3379
3380         * inspector/front-end/HeapSnapshot.js:
3381         (WebInspector.HeapSnapshot.prototype._buildRetainers):
3382
3383 2012-03-22  Dana Jansens  <danakj@chromium.org>
3384
3385         [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame
3386         https://bugs.webkit.org/show_bug.cgi?id=81437
3387
3388         Reviewed by Adrienne Walker.
3389
3390         Split CCLayerTreeHostImpl::drawLayers() into two phases:
3391         prepareToDraw() and drawLayers().
3392
3393         When calculating a RenderPass, and we checkerboard a quad on a
3394         layer, bubble this info back up to CCLayerTreeHostImpl. If the
3395         layer is transforming in an animation, then abort the prepareToDraw()
3396         phase and cause it to return false back to the thread proxy.
3397
3398         Unit test: CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard
3399
3400         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3401         (WebCore::CCLayerImpl::appendQuads):
3402         * platform/graphics/chromium/cc/CCLayerImpl.h:
3403         (CCLayerImpl):
3404         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3405         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3406         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
3407         (WebCore):
3408         (WebCore::CCLayerTreeHostImpl::drawLayers):
3409         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3410         (CCLayerTreeHostImpl):
3411         (FrameData):
3412         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
3413         (WebCore::CCQuadCuller::append):
3414         * platform/graphics/chromium/cc/CCQuadCuller.h:
3415         (CCQuadCuller):
3416         * platform/graphics/chromium/cc/CCRenderPass.cpp:
3417         (WebCore::CCRenderPass::appendQuadsForLayer):
3418         * platform/graphics/chromium/cc/CCRenderPass.h:
3419         (CCRenderPass):
3420         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
3421         (WebCore::CCScrollbarLayerImpl::appendQuads):
3422         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
3423         (CCScrollbarLayerImpl):
3424         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3425         (WebCore::CCSingleThreadProxy::doComposite):
3426         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
3427         (WebCore::CCSolidColorLayerImpl::appendQuads):
3428         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
3429         (CCSolidColorLayerImpl):
3430         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
3431         (WebCore::CCTextureLayerImpl::appendQuads):
3432         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
3433         (CCTextureLayerImpl):
3434         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3435         (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
3436         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3437         (WebCore::CCTiledLayerImpl::appendQuads):
3438         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3439         (CCTiledLayerImpl):
3440         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3441         (WebCore::CCVideoLayerImpl::appendQuads):
3442         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
3443         (CCVideoLayerImpl):
3444
3445 2012-03-22  Levi Weintraub  <leviw@chromium.org>
3446
3447         Correct LayoutUnit usage in Accessibility code
3448         https://bugs.webkit.org/show_bug.cgi?id=81789
3449
3450         Reviewed by Eric Seidel.
3451
3452         Reverting Accessibility hit testing code back to integers. Accessibility hit tests originate from
3453         the embedder and don't accumulate offsets, so we get nothing from using LayoutUnits, and needlessly
3454         expose them to the embedder.
3455
3456         No new tests. No change in behavior.
3457
3458         * accessibility/AccessibilityListBox.cpp:
3459         (WebCore::AccessibilityListBox::elementAccessibilityHitTest): See above.
3460         * accessibility/AccessibilityListBox.h:
3461         (AccessibilityListBox):
3462         * accessibility/AccessibilityObject.cpp:
3463         (WebCore::AccessibilityObject::clickPoint): This value is only ever used to display a context menu,
3464         which is always done with integer coordinates.
3465         (WebCore::AccessibilityObject::boundingBoxForQuads): This is a bounding box built from floats. We
3466         don't pixel snap floats, so we return an integer bounding box.
3467         (WebCore::AccessibilityObject::elementAccessibilityHitTest): See above.