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