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