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