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