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