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