[chromium] Set opaque flag for ImageLayerChromium
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-12-06  Dana Jansens  <danakj@chromium.org>
2
3         [chromium] Set opaque flag for ImageLayerChromium
4         https://bugs.webkit.org/show_bug.cgi?id=72964
5
6         Reviewed by James Robinson.
7
8         Unit test in tests/ImageLayerChromiumTest.cpp.
9
10         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
11         (WebCore::GraphicsLayerChromium::setContentsToImage):
12         * platform/graphics/chromium/GraphicsLayerChromium.h:
13         (WebCore::GraphicsLayerChromium::contentsLayer):
14         * platform/graphics/chromium/ImageLayerChromium.cpp:
15         (WebCore::ImageLayerChromium::setContents):
16
17 2011-12-06  Alexandre Elias  <aelias@google.com>
18
19         [chromium] Apply sent deltas on finishCommit
20         https://bugs.webkit.org/show_bug.cgi?id=73884
21
22         Reviewed by James Robinson.
23
24         This moves scroll and pageScale "sent" deltas to be applied to
25         the layer at the end of the commit, instead of the beginning.
26
27         This has several advantages, especially for page scale:
28         - When pageScale changes, no longer any need to change the scroll's
29         coordinate space at beginning of commit, which is complex and prone to
30         bugs (this fixes a problem where we were forgetting to modify the
31         scrollPosition before).
32         - No need for non-commit-related code to consider the "sent" values.
33         m_pageScale is now always the content scale factor, and
34         m_pageScaleDelta is the scale to be on the impl-side matrix.
35         - This will make it easy to send arbitrary fake or future delta
36         values for example while pinch zooming out.
37
38         The scroll logic is similarly altered for consistency's sake.  Note that
39         I also moved the tree synchronize to the beginning of finishCommit
40         in order to avoid having to change the pageScale coordinate space of
41         sentScrollDelta in adjustScrollsForPageScaleChange().
42
43         No new tests. (Refactoring of existing code.)
44
45         * platform/graphics/chromium/LayerChromium.cpp:
46         (WebCore::LayerChromium::pushPropertiesTo):
47         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
48         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
49         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
50         (WebCore::CCLayerTreeHostImpl::setPageScaleFactorAndLimits):
51         (WebCore::CCLayerTreeHostImpl::applyPageScaleDeltaToScrollLayer):
52         (WebCore::CCLayerTreeHostImpl::processScrollDeltas):
53
54 2011-12-06  Gavin Barraclough  <barraclough@apple.com>
55
56         https://bugs.webkit.org/show_bug.cgi?id=68328
57         The generator and intrinsic fields in HashTableValue/HashEntry and associated structures and methods are redundant
58
59         Reviewed by Geoff Garen.
60
61         Intrinsic is no longer in the DFG namespace, is always in the
62         hash table. Removed ThunkGenerator.
63
64         * bindings/scripts/CodeGeneratorJS.pm:
65         (GenerateHashTable):
66
67 2011-12-06  Dimitri Glazkov  <dglazkov@chromium.org>
68
69         Unreviewed, rolling out r102091.
70         http://trac.webkit.org/changeset/102091
71         https://bugs.webkit.org/show_bug.cgi?id=73711
72
73         Caused Clang Linux compile failure.
74
75         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
76         (WebCore::GraphicsLayerChromium::setAnchorPoint):
77         (WebCore::GraphicsLayerChromium::setTransform):
78         (WebCore::GraphicsLayerChromium::setChildrenTransform):
79         (WebCore::GraphicsLayerChromium::setMasksToBounds):
80         (WebCore::GraphicsLayerChromium::setBackgroundColor):
81         (WebCore::GraphicsLayerChromium::clearBackgroundColor):
82         (WebCore::GraphicsLayerChromium::setContentsOpaque):
83         (WebCore::GraphicsLayerChromium::setBackfaceVisibility):
84         (WebCore::GraphicsLayerChromium::setOpacity):
85         * platform/graphics/chromium/LayerChromium.cpp:
86         (WebCore::LayerChromium::setNeedsCommit):
87         * platform/graphics/chromium/LayerChromium.h:
88         (WebCore::LayerChromium::setAnchorPoint):
89         (WebCore::LayerChromium::setAnchorPointZ):
90         (WebCore::LayerChromium::setBackgroundColor):
91         (WebCore::LayerChromium::setMasksToBounds):
92         (WebCore::LayerChromium::setMaskLayer):
93         (WebCore::LayerChromium::setOpacity):
94         (WebCore::LayerChromium::setOpaque):
95         (WebCore::LayerChromium::setPosition):
96         (WebCore::LayerChromium::setSublayerTransform):
97         (WebCore::LayerChromium::setTransform):
98         (WebCore::LayerChromium::setScrollPosition):
99         (WebCore::LayerChromium::setScrollable):
100         (WebCore::LayerChromium::setDoubleSided):
101         (WebCore::LayerChromium::setReplicaLayer):
102         * platform/graphics/chromium/NonCompositedContentHost.cpp:
103         (WebCore::NonCompositedContentHost::notifySyncRequired):
104         * platform/graphics/chromium/NonCompositedContentHost.h:
105
106 2011-12-06  Dana Jansens  <danakj@chromium.org>
107
108         [Chromium] Make root layer always opaque
109         https://bugs.webkit.org/show_bug.cgi?id=70564
110
111         Reviewed by James Robinson.
112
113         * platform/graphics/chromium/NonCompositedContentHost.cpp:
114         (WebCore::NonCompositedContentHost::NonCompositedContentHost):
115         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
116         (WebCore::CCTiledLayerImpl::draw):
117
118 2011-12-06  Noel Gordon  <noel.gordon@gmail.com>
119
120         WebPImageDecoder computes image width and height multiple times
121         https://bugs.webkit.org/show_bug.cgi?id=73796
122
123         Reviewed by Adam Barth.
124
125         Once sufficient image data arrives, we can compute the decoded image height
126         and width from the WEBP image header data.
127
128         From then on, the decoded image size is known so there's no need to re-read
129         it from the WEBP image header again.
130
131         No change in behavior, so no new tests.
132
133         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
134         (WebCore::WEBPImageDecoder::decode):
135
136 2011-12-06  Mike Reed  <reed@google.com>
137
138         optimize TransformationMatrix::scale by not calling through to generic multiply
139         https://bugs.webkit.org/show_bug.cgi?id=73830
140
141         Reviewed by Kenneth Russell.
142
143         No new tests. Optimization only, existing tests exercise the code
144
145         * platform/graphics/transforms/TransformationMatrix.cpp:
146         (WebCore::TransformationMatrix::scaleNonUniform):
147         (WebCore::TransformationMatrix::scale3d):
148
149 2011-12-06  Eric Carlson  <eric.carlson@apple.com>
150
151         Revert WebCore track Settings changes made in r101977
152         https://bugs.webkit.org/show_bug.cgi?id=73879
153
154         Reviewed by Sam Weinig.
155
156         No new tests yet, still nothing to test.
157
158         * page/Settings.cpp: Move the preference setters back into the .h file.
159         * page/Settings.h:
160         (WebCore::Settings::setShouldDisplaySubtitles):
161         (WebCore::Settings::setShouldDisplayCaptions):
162         (WebCore::Settings::setShouldDisplayTextDescriptions):
163
164 2011-12-06  Andreas Kling  <kling@webkit.org>
165
166         MediaList: Remove constructor that takes a CSSImportRule*.
167         <http://webkit.org/b/73833>
168
169         Reviewed by Antti Koivisto.
170
171         * css/MediaList.h:
172         * css/MediaList.cpp:
173
174             Remove MediaList(CSSImportRule*, ...) constructor.
175
176         * css/CSSImportRule.cpp:
177         (WebCore::CSSImportRule::CSSImportRule):
178
179             Have CSSImportRule construct its MediaList by passing the parent
180             style sheet, which is exactly what the old constructor accomplished.
181             Also assert that we're always created with a non-null parent sheet.
182
183 2011-12-06  Jarred Nicholls  <jarred@sencha.com>
184
185         getComputedStyle returns wrong value for margin-*
186         https://bugs.webkit.org/show_bug.cgi?id=73334
187
188         margin-* getComputedStyle values should return the "used" absolute value when there is a renderer
189         and the specified value is relative (percentage, auto, etc.).
190         When there is no renderer, the specified value should be returned.
191         See http://dev.w3.org/csswg/cssom/#resolved-values.
192
193         Reviewed by Darin Adler.
194
195         Test: fast/css/getComputedStyle/getComputedStyle-resolved-values.html
196
197         * css/CSSComputedStyleDeclaration.cpp:
198         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
199
200 2011-12-06  Alexey Proskuryakov  <ap@apple.com>
201
202         REGRESSION (WebKit2): Kill ring is not cleared when selection changes
203         https://bugs.webkit.org/show_bug.cgi?id=73888
204         <rdar://problem/10532310>
205
206         Reviewed by Mark Rowe.
207
208         Test: editing/pasteboard/emacs-ctrl-k-with-move.html
209
210         * editing/Editor.cpp: (WebCore::Editor::respondToChangedSelection): Moved the code to clear
211         kill ring from Mac WebKit, as it's needed in all Mac ports at least.
212
213 2011-12-06  Darin Adler  <darin@apple.com>
214
215         Use HashMap<OwnPtr> in CollectionCache
216         https://bugs.webkit.org/show_bug.cgi?id=73784
217
218         Reviewed by Andreas Kling.
219
220         * html/CollectionCache.cpp:
221         (WebCore::CollectionCache::copyCacheMap): Use adoptPtr.
222         (WebCore::CollectionCache::reset): Removed now-unneeded calls to deleteAllValues.
223         (WebCore::append): Added. Helper function for appending elements to the maps from
224         the collection cache.
225
226         * html/CollectionCache.h: Changed mapped type in NodeCacheMap to OwnPtr.
227         Added append function.
228
229         * html/HTMLCollection.cpp:
230         (WebCore::nameShouldBeVisibleInDocumentAll): Added, to factor out common code in
231         two functions below.
232         (WebCore::HTMLCollection::checkForNameMatch): Changed to call nameShouldBeVisibleInDocumentAll.
233         (WebCore::HTMLCollection::updateNameCache): Ditto. Also updated cache code to use the append
234         function, so it will work with OwnPtr. Also eliminated an unneeded get call before
235         each hash table add; we do both at once in the new append function.
236         * html/HTMLFormCollection.cpp:
237         (WebCore::HTMLFormCollection::updateNameCache): More of the same.
238
239 2011-12-06  Yury Semikhatsky  <yurys@chromium.org>
240
241         [Chromium] Web Inspector: getFunctionLocation should return scriptId as String not as int
242         https://bugs.webkit.org/show_bug.cgi?id=73892
243
244         Reviewed by Pavel Feldman.
245
246         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
247         (WebCore::V8InjectedScriptHost::functionLocationCallback): scriptId should be a string not a number
248         * inspector/Inspector.json: removed unused parameter
249
250 2011-11-21  Balazs Kelemen  <kbalazs@webkit.org>
251
252         Enable ParallelJobs by default
253         https://bugs.webkit.org/show_bug.cgi?id=70032
254
255         Reviewed by Zoltan Herczeg.
256
257         Covered by existing tests.
258
259         According to measurements on Mac and Linux it is a
260         considerable speedup for SVG on multicore.
261
262         Remove the ENABLE(PARALLEL_JOBS) guard. Fix the Windows build
263         by qualifying ParallelJobs with the WTF namespace (otherwise
264         MSVC believes it belongs to WebCore which is likely a compiler bug).
265
266         * platform/graphics/filters/FEConvolveMatrix.cpp:
267         (WebCore::FEConvolveMatrix::setInteriorPixelsWorker):
268         (WebCore::FEConvolveMatrix::platformApplySoftware):
269         * platform/graphics/filters/FEConvolveMatrix.h:
270         * platform/graphics/filters/FEGaussianBlur.cpp:
271         (WebCore::FEGaussianBlur::platformApplyWorker):
272         (WebCore::FEGaussianBlur::platformApply):
273         * platform/graphics/filters/FEGaussianBlur.h:
274         * platform/graphics/filters/FELighting.cpp:
275         (WebCore::FELighting::platformApplyGenericWorker):
276         (WebCore::FELighting::platformApplyGeneric):
277         * platform/graphics/filters/FELighting.h:
278         * platform/graphics/filters/FEMorphology.cpp:
279         (WebCore::FEMorphology::platformApplyWorker):
280         (WebCore::FEMorphology::platformApply):
281         * platform/graphics/filters/FEMorphology.h:
282         * platform/graphics/filters/FETurbulence.cpp:
283         (WebCore::FETurbulence::fillRegionWorker):
284         (WebCore::FETurbulence::platformApplySoftware):
285         * platform/graphics/filters/FETurbulence.h:
286         * platform/graphics/filters/arm/FELightingNEON.cpp:
287         (WebCore::FELighting::platformApplyNeonWorker):
288         * platform/graphics/filters/arm/FELightingNEON.h:
289         (WebCore::FELighting::platformApplyNeon):
290
291 2011-12-06  Andreas Kling  <kling@webkit.org>
292
293         Unreviewed assertion fix for r102123.
294
295         * platform/KURL.cpp:
296         (WebCore::checkEncodedString):
297
298 2011-12-06  Benjamin Poulain  <benjamin@webkit.org>
299
300         Simplify KURL's checkEncodedString()
301         https://bugs.webkit.org/show_bug.cgi?id=73890
302
303         Reviewed by Andreas Kling.
304
305         The method was reimplementing String::containsOnlyASCII().
306         Use the method from String and we can remove the #if NDEBUG.
307
308         * platform/KURL.cpp:
309         (WebCore::checkEncodedString):
310
311 2011-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
312
313         Unreviewed, rolling out r102111.
314         http://trac.webkit.org/changeset/102111
315         https://bugs.webkit.org/show_bug.cgi?id=73902
316
317         Breaks compilation (Requested by vsevik on #webkit).
318
319         * editing/Editor.cpp:
320         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
321         * editing/Editor.h:
322
323 2011-12-06  Hajime Morrita  <morrita@chromium.org>
324
325         [Refactoring] Accessing Node::m_document should be minimized.
326         https://bugs.webkit.org/show_bug.cgi?id=73800
327
328         Reviewed by Kent Tamura.
329
330         No new tests. No behavioral change.
331
332         Replaced m_document reference with the document() accessor
333         or temporaril variables. This is a preparation for using
334         m_document space to point a shadow root pointer.
335
336         * dom/Document.h:
337         (WebCore::Node::Node):
338         * dom/Node.cpp:
339         (WebCore::Node::~Node):
340
341 2011-12-06  Shinya Kawanaka  <shinyak@google.com>
342
343         https://bugs.webkit.org/show_bug.cgi?id=73889
344         TextCheckingParagraph::offsetTo should not have a side effect.
345
346         Reviewed by Hajime Morita.
347
348         Since TextCheckingParagraph::offsetTo had a side effect, its cache often became inconsistent.
349         This is likely to cause a bug when changing SpellChecker and Editor.
350
351         No new tests. Covered by existing tests.
352
353         * editing/TextCheckingHelper.cpp:
354         (WebCore::TextCheckingParagraph::offsetTo):
355
356 2011-12-06  Eric Penner  <epenner@google.com>
357
358         [chromium] Set texture limits as multiples of viewport size instead of hardcoded values
359         https://bugs.webkit.org/show_bug.cgi?id=72202
360
361         Reviewed by James Robinson.
362
363         * platform/graphics/chromium/LayerRendererChromium.cpp: 
364         (WebCore::LayerRendererChromium::drawLayers): added viewport param
365         (WebCore::LayerRendererChromium::initializeSharedObjects): ditto 
366         * platform/graphics/chromium/TextureManager.cpp: 
367         (WebCore::TextureManager::highLimitBytes): calculated based on viewport
368         (WebCore::TextureManager::reclaimLimitBytes): ditto
369         (WebCore::TextureManager::lowLimitBytes): ditto
370         (WebCore::TextureManager::TextureManager): added viewport param
371         (WebCore::TextureManager::setMaxMemoryLimitBytes): changed name
372         (WebCore::TextureManager::setPreferredMemoryLimitBytes): added function
373         (WebCore::TextureManager::requestTexture): added viewport param
374         * platform/graphics/chromium/TextureManager.h: ditto
375         (WebCore::TextureManager::create): ditto
376         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: ditto
377         (WebCore::CCLayerTreeHost::initialize): ditto
378         (WebCore::CCLayerTreeHost::beginCommitOnImplThread): ditto
379         (WebCore::CCLayerTreeHost::setViewport): ditto
380         (WebCore::CCLayerTreeHost::setVisible): ditto
381         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread): ditto
382
383 2011-12-06  Huang Dongsung  <luxtella@company100.net>
384
385         [TexMap][QT] Draw the borders of media and webgl elements in TexMap.
386         https://bugs.webkit.org/show_bug.cgi?id=73817
387
388         GraphicsContext3D only draws the content of the WebGL canvas, not the additional
389         CSS such as the borders. TextureMapper should render the content of a
390         media/webgl layer before drawing the actual canvas.
391         This makes LayoutTests/compositing/webgl/webgl-reflection.html work.
392
393         Reviewed by Noam Rosenthal.
394
395         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
396         (WebCore::GraphicsLayerTextureMapper::setContentsNeedsDisplay):
397         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
398         * platform/graphics/texmap/TextureMapperNode.cpp:
399         (WebCore::TextureMapperNode::renderContent):
400         (WebCore::TextureMapperNode::paintSelf):
401
402 2011-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
403
404         Unreviewed, rolling out r102043.
405         http://trac.webkit.org/changeset/102043
406         https://bugs.webkit.org/show_bug.cgi?id=73898
407
408         Breaks chromium mac-cg compilation. (Requested by vsevik on
409         #webkit).
410
411         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
412         (WebCore::GraphicsLayerChromium::setContentsToImage):
413         * platform/graphics/chromium/GraphicsLayerChromium.h:
414         (WebCore::GraphicsLayerChromium::contentsLayer):
415         * platform/graphics/chromium/ImageLayerChromium.cpp:
416         (WebCore::ImageLayerChromium::setContents):
417
418 2011-12-06  Shinya Kawanaka  <shinyak@google.com>
419
420         Refactoring: Editor::markAllMisspellingsAndBadGrammarInRanges should be refactored.
421         https://bugs.webkit.org/show_bug.cgi?id=73628
422
423         Reviewed by Hajime Morita.
424
425         Extracted a code for adding markers and replacing misspelled words from WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges.
426
427         No new tests. covered by existing tests.
428
429         * editing/Editor.cpp:
430         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
431           Extracted a code for adding markers and replacing missplled words, and moved to markAndReplaceFor.
432         (WebCore::Editor::markAndReplaceFor):
433         * editing/Editor.h:
434
435 2011-12-05  Alexander Pavlov  <apavlov@chromium.org>
436
437         Web Inspector: [Audits] Implement "Stop" button and progress bar instead of spinner.
438         https://bugs.webkit.org/show_bug.cgi?id=73626
439
440         Reviewed by Yury Semikhatsky.
441
442         * English.lproj/localizedStrings.js:
443         * inspector/front-end/AuditLauncherView.js:
444         (WebInspector.AuditLauncherView):
445         (WebInspector.AuditLauncherView.prototype._setAuditRunning):
446         (WebInspector.AuditLauncherView.prototype._launchButtonClicked):
447         (WebInspector.AuditLauncherView.prototype._createLauncherUI):
448         (WebInspector.AuditLauncherView.prototype._updateResourceProgress):
449         (WebInspector.AuditLauncherView.prototype._updateButton):
450         * inspector/front-end/AuditRules.js:
451         (WebInspector.AuditRules.GzipRule.prototype.doRun):
452         (WebInspector.AuditRules.CombineExternalResourcesRule.prototype.doRun):
453         (WebInspector.AuditRules.MinimizeDnsLookupsRule.prototype.doRun):
454         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback):
455         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.documentLoaded):
456         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback):
457         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback):
458         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback):
459         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
460         (WebInspector.AuditRules.CacheControlRule.prototype.doRun):
461         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
462         (WebInspector.AuditRules.CssInHeadRule.prototype.doRun):
463         (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.externalStylesheetsReceived):
464         (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.inlineStylesReceived):
465         (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.onDocumentAvailable):
466         (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun):
467         (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.cssBeforeInlineReceived):
468         (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.lateStylesReceived):
469         (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.onDocumentAvailable):
470         (WebInspector.AuditRules.CookieRuleBase.prototype.doRun.resultCallback):
471         (WebInspector.AuditRules.CookieRuleBase.prototype.doRun):
472         * inspector/front-end/AuditsPanel.js:
473         (WebInspector.AuditsPanel):
474         (WebInspector.AuditsPanel.prototype._executeAudit.ruleResultReadyCallback):
475         (WebInspector.AuditsPanel.prototype._executeAudit):
476         (WebInspector.AuditsPanel.prototype._auditFinishedCallback):
477         (WebInspector.AuditsPanel.prototype.terminateAudit):
478         (WebInspector.AuditCategory.prototype.run):
479         (WebInspector.AuditRule.prototype.run):
480         (WebInspector.AuditRule.prototype.doRun):
481         (WebInspector.AuditProgressMonitor):
482         (WebInspector.AuditProgressMonitor.prototype.setTotalWork):
483         (WebInspector.AuditProgressMonitor.prototype.worked):
484         (WebInspector.AuditProgressMonitor.prototype.get indeterminate):
485         (WebInspector.AuditProgressMonitor.prototype.done):
486         (WebInspector.AuditProgressMonitor.prototype.get canceled):
487         (WebInspector.AuditProgressMonitor.prototype.set canceled):
488
489 2011-12-06  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
490
491         [Qt] [WK2] MiniBrowser assert on startup in debug build after r101713
492         https://bugs.webkit.org/show_bug.cgi?id=73874
493
494         This change partially reverts r101713 restoring original behaviour for
495         KUrl creation from empty string and fixes asserts in debug build.
496
497         Reviewed by Alexey Proskuryakov.
498
499         No new tests. Tests from r101713 pass.
500
501         * platform/KURL.cpp:
502         (WebCore::KURL::init):
503         (WebCore::KURL::parse):
504         * platform/KURL.h:
505
506 2011-12-06  Andreas Kling  <kling@webkit.org>
507
508         Use HashMap<OwnPtr> for EventListenerMap's internal map.
509         <http://webkit.org/b/73761>
510
511         Reviewed by Benjamin Poulain.
512
513         Changed the value type of EventListenerMap::m_hashMap to OwnPtr<EventListenerVector>.
514         This means we no longer need to manually delete the vectors when taking them out of
515         the map, which makes the code a little prettier.
516
517         A few tweaks were necessary; release() instead of leakPtr() when switching modes
518         and adoptPtr()/get() sprinkled as needed.
519
520         * dom/EventListenerMap.h:
521         * dom/EventListenerMap.cpp:
522         (WebCore::EventListenerMap::clear):
523         (WebCore::EventListenerMap::add):
524         (WebCore::EventListenerMap::remove):
525         (WebCore::EventListenerMap::find):
526         (WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup):
527         (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
528
529 2011-12-05  Rafael Weinstein  <rafaelw@chromium.org>
530
531         [MutationObservers] Support 'attributes' mutation records for element.removeAttribute
532         https://bugs.webkit.org/show_bug.cgi?id=73880
533
534         Reviewed by Ojan Vafai.
535
536         * dom/Element.cpp:
537         (WebCore::enqueueAttributesMutationRecord):
538         (WebCore::Element::removeAttribute):
539
540 2011-12-05  Dana Jansens  <danakj@chromium.org>
541
542         Set opaque flag for WebGLLayerChromium
543         https://bugs.webkit.org/show_bug.cgi?id=73876
544
545         Reviewed by James Robinson.
546
547         New unit test in tests/WebGLLayerChromiumTest.cpp
548
549         * platform/graphics/chromium/DrawingBufferChromium.cpp:
550         (WebCore::DrawingBuffer::platformLayer):
551
552 2011-12-05  Benjamin Poulain  <bpoulain@apple.com>
553
554         Upstream the Cursor implementation of iOS
555         https://bugs.webkit.org/show_bug.cgi?id=73724
556
557         Reviewed by David Kilzer.
558
559         iOS does not need to support the Cursor of WebKit. For compatibility, Cursor
560         is implemented as an empty class on the platform.
561
562         * Configurations/WebCore.xcconfig:
563         * WebCore.xcodeproj/project.pbxproj:
564         * platform/Cursor.h:
565         (WebCore::Cursor::Cursor):
566         * platform/ios/CursorIOS.cpp: Added.
567         (WebCore::cursor):
568         (WebCore::pointerCursor):
569         (WebCore::crossCursor):
570         (WebCore::handCursor):
571         (WebCore::moveCursor):
572         (WebCore::iBeamCursor):
573         (WebCore::waitCursor):
574         (WebCore::helpCursor):
575         (WebCore::eastResizeCursor):
576         (WebCore::northResizeCursor):
577         (WebCore::northEastResizeCursor):
578         (WebCore::northWestResizeCursor):
579         (WebCore::southResizeCursor):
580         (WebCore::southEastResizeCursor):
581         (WebCore::southWestResizeCursor):
582         (WebCore::westResizeCursor):
583         (WebCore::northSouthResizeCursor):
584         (WebCore::eastWestResizeCursor):
585         (WebCore::northEastSouthWestResizeCursor):
586         (WebCore::northWestSouthEastResizeCursor):
587         (WebCore::columnResizeCursor):
588         (WebCore::rowResizeCursor):
589         (WebCore::middlePanningCursor):
590         (WebCore::eastPanningCursor):
591         (WebCore::northPanningCursor):
592         (WebCore::northEastPanningCursor):
593         (WebCore::northWestPanningCursor):
594         (WebCore::southPanningCursor):
595         (WebCore::southEastPanningCursor):
596         (WebCore::southWestPanningCursor):
597         (WebCore::westPanningCursor):
598         (WebCore::verticalTextCursor):
599         (WebCore::cellCursor):
600         (WebCore::contextMenuCursor):
601         (WebCore::noDropCursor):
602         (WebCore::notAllowedCursor):
603         (WebCore::progressCursor):
604         (WebCore::aliasCursor):
605         (WebCore::zoomInCursor):
606         (WebCore::zoomOutCursor):
607         (WebCore::copyCursor):
608         (WebCore::noneCursor):
609         (WebCore::grabCursor):
610         (WebCore::grabbingCursor):
611         (WebCore::determineHotSpot):
612
613 2011-12-05  Noel Gordon  <noel.gordon@gmail.com>
614
615         [GTK] GIF image test crashes on 32- and 64-bit Release
616         https://bugs.webkit.org/show_bug.cgi?id=73812
617
618         Reviewed by Adam Barth.
619
620         Call resize() on the image pixel backing store after allocation to see if
621         that stops the GIF image decoder animation tests crashes on GTK.
622
623         No new tests, covered by exiting tests ...
624           fast/backgrounds/animated-gif-as-background.html
625           fast/images/dont-crash-with-null-gif-frames.html
626           fast/images/gif-loop-count.html
627
628         * platform/image-decoders/ImageDecoder.cpp:
629         (WebCore::ImageFrame::setSize):
630
631 2011-12-05  Erik Arvidsson  <arv@chromium.org>
632
633         Could save a lot of memory in CharacterData by not always storing a String
634         https://bugs.webkit.org/show_bug.cgi?id=72404
635
636         Reviewed by Ojan Vafai.
637
638         When a Text node is created by the parser we check if the string is all whitespace
639         and if so we put it in the AtomicString table so that all future identical whitespace
640         strings can share the StringImpl.
641
642         No new tests. Covered by existing tests.
643
644         * html/parser/HTMLConstructionSite.cpp:
645         (WebCore::HTMLNames::isAllWhitespace):
646         (WebCore::HTMLConstructionSite::insertTextNode):
647
648             If we do not know whether the string is all whitespace this now checks the string
649             If the string is all whitespace we create an AtomicString for it.
650
651         * html/parser/HTMLConstructionSite.h:
652         * html/parser/HTMLTreeBuilder.cpp:
653         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeadingNonWhitespace): We never cared about the return value here.
654         (WebCore::HTMLTreeBuilder::processCharacterBuffer): Pass WhitespaceMode in the case we know whether the string is all whitespace or not.
655         (WebCore::HTMLTreeBuilder::defaultForInTableText): Ditto.
656
657 2011-12-05  Benjamin Poulain  <benjamin@webkit.org>
658
659         Update KURL's copy copyASCII to avoid String::characters()
660         https://bugs.webkit.org/show_bug.cgi?id=73794
661
662         Reviewed by Andreas Kling.
663
664         When the String is already on 8 bits, we can simply copy the
665         data. In the 16 bits case, everything remains the same.
666
667         * platform/KURL.cpp:
668         (WebCore::copyASCII):
669         (WebCore::appendASCII):
670         (WebCore::KURL::init):
671         (WebCore::KURL::parse):
672         (WebCore::KURL::copyToBuffer):
673
674 2011-12-05  Yong Li  <yoli@rim.com>
675
676         https://bugs.webkit.org/show_bug.cgi?id=73683
677         Implement KeyframeValueList::operator=() and KeyframeValueList::swap().
678
679         Reviewed by Darin Adler.
680
681         No new tests as no functional change.
682
683         * platform/graphics/GraphicsLayer.h: 
684         (WebCore::KeyframeValueList::operator=): Added
685         (WebCore::KeyframeValueList::swap): Added
686
687 2011-12-05  Adrienne Walker  <enne@google.com>
688
689         [chromium] setNeedsCommit on non-composited host layers should trigger commit
690         https://bugs.webkit.org/show_bug.cgi?id=73711
691
692         Reviewed by James Robinson.
693
694         Pipe non-composited content host syncs to setNeedsCommit.
695
696         Since now the NonCompositedContentHost generates setNeedsCommit, don't
697         call it unnecessarily, e.g. calling setBackgroundColor to the same
698         color each frame should not retrigger more commits.
699
700         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
701         (WebCore::GraphicsLayerChromium::setAnchorPoint):
702         (WebCore::GraphicsLayerChromium::setTransform):
703         (WebCore::GraphicsLayerChromium::setChildrenTransform):
704         (WebCore::GraphicsLayerChromium::setMasksToBounds):
705         (WebCore::GraphicsLayerChromium::setBackgroundColor):
706         (WebCore::GraphicsLayerChromium::clearBackgroundColor):
707         (WebCore::GraphicsLayerChromium::setContentsOpaque):
708         (WebCore::GraphicsLayerChromium::setBackfaceVisibility):
709         (WebCore::GraphicsLayerChromium::setOpacity):
710         * platform/graphics/chromium/LayerChromium.cpp:
711         (WebCore::LayerChromium::setNeedsCommit):
712         (WebCore::LayerChromium::setAnchorPoint):
713         (WebCore::LayerChromium::setAnchorPointZ):
714         (WebCore::LayerChromium::setBackgroundColor):
715         (WebCore::LayerChromium::setMasksToBounds):
716         (WebCore::LayerChromium::setMaskLayer):
717         (WebCore::LayerChromium::setOpacity):
718         (WebCore::LayerChromium::setOpaque):
719         (WebCore::LayerChromium::setPosition):
720         (WebCore::LayerChromium::setSublayerTransform):
721         (WebCore::LayerChromium::setTransform):
722         (WebCore::LayerChromium::setScrollPosition):
723         (WebCore::LayerChromium::setScrollable):
724         (WebCore::LayerChromium::setDoubleSided):
725         * platform/graphics/chromium/LayerChromium.h:
726         (WebCore::LayerChromium::setReplicaLayer):
727         * platform/graphics/chromium/NonCompositedContentHost.cpp:
728         (WebCore::NonCompositedContentHost::notifySyncRequired):
729         * platform/graphics/chromium/NonCompositedContentHost.h:
730
731 2011-12-05  Tony Chang  <tony@chromium.org>
732
733         small refactor of RenderFlexibleBox
734         https://bugs.webkit.org/show_bug.cgi?id=73854
735
736         Reviewed by Darin Adler.
737
738         No new tests, just a refactor.
739
740         * rendering/RenderFlexibleBox.cpp:
741         (WebCore::RenderFlexibleBox::isLeftToRightFlow): Inline isReverseFlow since it's only used in one place.
742         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Rename startEdge
743         to mainAxisOffset.  Rename logicalTop to crossAxisOffset.  Get rid of
744         logicalLeft local variable since it's confusing.  Move shouldFlipMainAxis
745         out of the for loop to avoid computing it each iteration.
746         * rendering/RenderFlexibleBox.h:
747
748 2011-12-05  Florin Malita  <fmalita@google.com>
749
750         Heap-buffer-overflow in WebCore::HTMLTreeBuilder::processEndTag
751         https://bugs.webkit.org/show_bug.cgi?id=73765
752
753         Reviewed by Adam Barth.
754
755         Test: fast/parser/foreign-content-crash.html
756
757         Use m_tree.currentNode() instead of m_tree.currentElement() as the top node is not always an Element.
758
759         * html/parser/HTMLTreeBuilder.cpp:
760         (WebCore::HTMLTreeBuilder::processEndTag):
761
762 2011-12-05  Stephen White  <senorblanco@chromium.org>
763
764         Allow the ImageBuffers used by SVG filters to be accelerated
765         https://bugs.webkit.org/show_bug.cgi?id=73842
766
767         Reviewed by Kenneth Russell.
768
769         Regressions covered by existing SVG tests; new functionality to be
770         tested by the API exposed on Internals.
771
772         * page/Settings.cpp:
773         (WebCore::Settings::Settings):
774         * page/Settings.h:
775         (WebCore::Settings::setAcceleratedFiltersEnabled):
776         (WebCore::Settings::acceleratedFiltersEnabled):
777         * platform/graphics/filters/FETile.cpp:
778         (WebCore::FETile::platformApplySoftware):
779         * platform/graphics/filters/Filter.h:
780         (WebCore::Filter::Filter):
781         (WebCore::Filter::renderingMode):
782         (WebCore::Filter::setRenderingMode):
783         * platform/graphics/filters/FilterEffect.cpp:
784         (WebCore::FilterEffect::asImageBuffer):
785         (WebCore::FilterEffect::createImageBufferResult):
786         * platform/graphics/skia/ImageBufferSkia.cpp:
787         (WebCore::ImageBuffer::platformTransformColorSpace):
788         * rendering/svg/RenderSVGResourceClipper.cpp:
789         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
790         * rendering/svg/RenderSVGResourceFilter.cpp:
791         (WebCore::RenderSVGResourceFilter::applyResource):
792         * rendering/svg/RenderSVGResourceMasker.cpp:
793         (WebCore::RenderSVGResourceMasker::applyResource):
794         * rendering/svg/RenderSVGResourcePattern.cpp:
795         (WebCore::RenderSVGResourcePattern::createTileImage):
796         * rendering/svg/SVGImageBufferTools.cpp:
797         (WebCore::SVGImageBufferTools::createImageBuffer):
798         * rendering/svg/SVGImageBufferTools.h:
799         * testing/Internals.cpp:
800         (WebCore::Internals::setAcceleratedFiltersEnabled):
801         * testing/Internals.h:
802         * testing/Internals.idl:
803
804 2011-12-05  Benjamin Poulain  <bpoulain@apple.com>
805
806         Upstream htmlSelectMultipleItems needed for <select multiple> by iOS
807         https://bugs.webkit.org/show_bug.cgi?id=73734
808
809         Reviewed by David Kilzer.
810
811         * platform/DefaultLocalizationStrategy.cpp:
812         (WebCore::DefaultLocalizationStrategy::htmlSelectMultipleItems):
813         * platform/DefaultLocalizationStrategy.h:
814
815 2011-12-05  Darin Adler  <darin@apple.com>
816
817         Use HashMap<OwnPtr> in CrossOriginPreflightResultCache
818         https://bugs.webkit.org/show_bug.cgi?id=73785
819
820         Reviewed by Andreas Kling.
821
822         * loader/CrossOriginPreflightResultCache.cpp:
823         (WebCore::CrossOriginPreflightResultCache::appendEntry): Changed code to use set
824         instead of add, since it wants to replace existing entries. Also removed leakPtr
825         and removed the FIXME that documented the memory leak now fixed here.
826         (WebCore::CrossOriginPreflightResultCache::canSkipPreflight): Removed unneeded
827         std:: prefix here and also unneeded explicit delete call.
828         (WebCore::CrossOriginPreflightResultCache::empty): Removed unneeded deleteAllValues
829         call here.
830
831         * loader/CrossOriginPreflightResultCache.h: Make mapped value of the
832         CrossOriginPreflightResultHashMap be OwnPtr instead of raw pointer.
833
834 2011-12-05  Darin Adler  <darin@apple.com>
835
836         Some small improvements to ContainerNode.h
837         https://bugs.webkit.org/show_bug.cgi?id=73786
838
839         Reviewed by Alexey Proskuryakov.
840
841         * dom/ContainerNode.cpp:
842         (WebCore::ContainerNode::suspendPostAttachCallbacks): Added a FIXME comment about the
843         peculiar behavior of this function. Somehow the post-attach suspend state is both
844         global and specific to a certain Page object. That can't be right. If it was truly
845         global then this would be a static member function. If it was truly per-page, then
846         the related functions could not be static.
847
848         * dom/ContainerNode.h: Removed some unneeded argument names. Moved the hasChildNodes
849         function up with the other basic getters. Put the other getters, childNodeCount and
850         childNode, right after the basic getters. Used ASSERT_NO_EXCEPTION in all the basic
851         mutation functions so they can be used in a cleaner fashion in C++ code where we have
852         some reason to know an exception won't occur. Grouped all the overrides of functions
853         from Node into a single paragraph and used the OVERRIDE macro on all of them. Made the
854         queuePostAttachCallback and postAttachCallbacksAreSuspended functions protected.
855
856         * dom/Element.h: Moved the include of ExceptionCodePlaceholder.h into ContainerNode.h.
857
858         * dom/Node.cpp:
859         (WebCore::Node::lazyAttach): Use hasChildNodes instead of firstChild for clarity.
860         (WebCore::Node::isDescendantOf): Ditto.
861
862 2011-12-05  Benjamin Poulain  <benjamin@webkit.org>
863
864         Get rid of KURL::KURL(ParsedURLStringTag, const char*);
865         https://bugs.webkit.org/show_bug.cgi?id=73792
866
867         Reviewed by Andreas Kling.
868
869         In all cases where the constructor is used, the constructor
870         taking a String is as effective because the string is valid and converted
871         to String for m_string.
872
873         This patch remove the constructor KURL::KURL(ParsedURLStringTag, const char*)
874         and change the call sites that were using that constructor to build
875         empty URLs.
876
877         * dom/Document.cpp:
878         (WebCore::Document::initSecurityContext):
879         * loader/FrameLoader.cpp:
880         (WebCore::FrameLoader::init):
881         * loader/archive/cf/LegacyWebArchive.cpp:
882         (WebCore::LegacyWebArchive::create):
883         * page/DOMWindow.cpp:
884         (WebCore::DOMWindow::createWindow):
885         * platform/KURL.cpp:
886         * platform/KURL.h:
887         * platform/KURLGoogle.cpp:
888
889 2011-12-05  Benjamin Poulain  <benjamin@webkit.org>
890
891         Remove methods declared but never implemented with GOOGLEURL
892         https://bugs.webkit.org/show_bug.cgi?id=73795
893
894         Reviewed by Adam Barth.
895
896         * platform/KURL.h:
897
898 2011-12-05  Darin Adler  <darin@apple.com>
899
900         Change CSSFontSelector to use HashMap<OwnPtr>
901         https://bugs.webkit.org/show_bug.cgi?id=73781
902
903         Reviewed by Dan Bernstein.
904
905         * css/CSSFontSelector.cpp:
906         (WebCore::CSSFontSelector::~CSSFontSelector): Removed calls to deleteAllValues.
907         (WebCore::CSSFontSelector::addFontFaceRule): Updated to use OwnPtr instead of raw
908         pointer for the entry in m_fontFaces and m_locallyInstalledFontFaces.
909         (WebCore::CSSFontSelector::getFontData): Updated to use OwnPtr instead of raw
910         pointer for the entry in m_fonts. Also removed an unneeded std:: prefix.
911
912         * css/CSSFontSelector.h: Made m_fontFaces, m_locallyInstalledFontFaces, and m_fonts
913         be HashMap<OwnPtr>.
914
915 2011-12-05  Adam Klein  <adamk@chromium.org>
916
917         V8RecursionScope should call didLeaveScriptContext when recursionLevel reaches zero
918         https://bugs.webkit.org/show_bug.cgi?id=73867
919
920         Reviewed by Adam Barth.
921
922         Moved V8RecursionScope into its own file, and moved
923         V8Proxy::didLeaveScriptContext into that file, along with a static
924         recursionLevel accessor, hiding the V8BindingPerIsolateData methods
925         from V8Proxy.
926
927         This will make it easy and less error-prone to use V8RecursionScope
928         properly. I plan to make use of it in V8LazyEventListener to fix
929         https://bugs.webkit.org/show_bug.cgi?id=73492.
930
931         No new tests, refactoring only.
932
933         * Target.pri:
934         * UseV8.cmake:
935         * WebCore.gypi:
936         * bindings/v8/V8Binding.h:
937         (WebCore::V8BindingPerIsolateData::incrementRecursionLevel): return the new recursion level.
938         (WebCore::V8BindingPerIsolateData::decrementRecursionLevel): return the new recursion level.
939         * bindings/v8/V8Proxy.cpp: remove didLeaveScriptContext.
940         (WebCore::V8Proxy::runScript): remove explicit call to didLeaveScriptContext.
941         (WebCore::V8Proxy::instrumentedCallFunction): remove explicit call to didLeaveScriptContext.
942         * bindings/v8/V8Proxy.h: remove didLeaveScriptContext.
943         * bindings/v8/V8RecursionScope.cpp: Added.
944         (WebCore::V8RecursionScope::didLeaveScriptContext): copied from V8Proxy.cpp.
945         * bindings/v8/V8RecursionScope.h: Added.
946         (WebCore::V8RecursionScope::V8RecursionScope):
947         (WebCore::V8RecursionScope::~V8RecursionScope):
948         (WebCore::V8RecursionScope::recursionLevel):
949
950 2011-12-05  Benjamin Poulain  <bpoulain@apple.com>
951
952         Build fix for SecurityOrigin.cpp when neither BLOB nor FILE_SYSTEM are defined
953
954         Reviewed by David Kilzer.
955
956         When neither BLOB nor FILE_SYSTEM are defined, the parameter is unused.
957
958         * page/SecurityOrigin.cpp:
959         (WebCore::shouldUseInnerURL):
960
961 2011-12-05  Darin Adler  <darin@apple.com>
962
963         Change RuleSet to use HashMap<OwnPtr>
964         https://bugs.webkit.org/show_bug.cgi?id=73783
965
966         Reviewed by Andreas Kling.
967
968         * css/CSSStyleSelector.cpp: Make RuleSet::AtomRuleMap use OwnPtr for the mapped values.
969         (WebCore::RuleSet::addToRuleSet): Use add instead of get/set to set up a new entry in the
970         map or find the old entry in the map.
971
972 2011-12-05  Mario Sanchez Prada  <msanchez@igalia.com>
973
974         [GTK] Move emissions of AtkDocument signals down to WebCore
975         https://bugs.webkit.org/show_bug.cgi?id=73750
976
977         Reviewed by Chris Fleizach.
978
979         Implement the needed infrastructure to allow notifying
980         accessibility, in a cross-platform way, when a event related to
981         the load of a document happens. Added a generic method, which will
982         be called from the FrameLoader, and platform specific versions of
983         it so every port has a chance to decide what to do with those
984         notifications.
985
986         This patch doesn't include a new test because the one testing this
987         functionality is the GTK-specific unit test added along with patch
988         for bug 73746: testWebkitAtkDocumentLoadingEvents.
989
990         * accessibility/AXObjectCache.h:
991         (WebCore::AXObjectCache::frameLoadingEventNotification): New, called
992         from the FrameLoader to notify accessibility when an event happens.
993         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification): New,
994         platform specific function to let ports decide what to do.
995         * accessibility/AXObjectCache.cpp:
996         (WebCore::AXObjectCache::frameLoadingEventNotification): New.
997         * accessibility/chromium/AXObjectCacheChromium.cpp:
998         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
999         implementation of the platform specific function for chromium.
1000         * accessibility/gtk/AXObjectCacheAtk.cpp:
1001         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
1002         * accessibility/mac/AXObjectCacheMac.mm:
1003         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
1004         implementation of the platform specific function for the Mac.
1005         * accessibility/win/AXObjectCacheWin.cpp:
1006         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
1007         implementation of the platform specific function for Windows.
1008
1009         * loader/FrameLoader.cpp:
1010         (WebCore::FrameLoader::prepareForLoadStart): Notify accessibility
1011         by calling the new frameLoadingEventNotification() function.
1012         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Ditto.
1013
1014 2011-12-05  Benjamin Poulain  <benjamin@webkit.org>
1015
1016         Update String::containsOnlyASCII() to handle 8 bits strings
1017         https://bugs.webkit.org/show_bug.cgi?id=73799
1018
1019         Reviewed by Darin Adler.
1020
1021         When possible, change the call sites from charactersAreAllASCII()
1022         to the optimized version String::containsOnlyASCII().
1023
1024         * platform/KURL.cpp:
1025         (WebCore::KURL::init):
1026         * platform/cf/BinaryPropertyList.cpp:
1027         (WebCore::BinaryPropertyListPlan::writeStringObject):
1028         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
1029         (WebCore::FontCodepage::if):
1030
1031 2011-12-01  Vangelis Kokkevis  <vangelis@chromium.org>
1032
1033         [chromium] Use ANGLE's texture_usage and texture_storage extensions when allocating compositor textures
1034         https://bugs.webkit.org/show_bug.cgi?id=73621
1035
1036         When the extensions are available, compositor textures are allocated via
1037         glTexStorage2DEXT instead of glTexImage2D to eliminate creation of unnecessary
1038         mip levels on the service side. In addition, the GL_FRAMEBUFFER_ATTACHMENT_ANGLE
1039         is specified for all textures used by RenderSurfaces to eliminate the need for
1040         a system memory bitmap allocation.
1041
1042         Reviewed by Kenneth Russell.
1043
1044         * platform/graphics/chromium/Extensions3DChromium.h:
1045         * platform/graphics/chromium/LayerRendererChromium.cpp:
1046         (WebCore::LayerRendererChromium::initialize):
1047         (WebCore::LayerRendererChromium::initializeSharedObjects):
1048         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
1049         (WebCore::TrackingTextureAllocator::TrackingTextureAllocator):
1050         (WebCore::textureToStorageFormat):
1051         (WebCore::isTextureFormatSupportedForStorage):
1052         (WebCore::TrackingTextureAllocator::createTexture):
1053         * platform/graphics/chromium/TrackingTextureAllocator.h:
1054         (WebCore::TrackingTextureAllocator::setTextureUsageHint):
1055         (WebCore::TrackingTextureAllocator::setUseTextureStorageExt):
1056         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1057         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
1058
1059 2011-12-05  Chris Fleizach  <cfleizach@apple.com>
1060
1061         AX: aria-hidden doesn't work on iframe elements
1062         https://bugs.webkit.org/show_bug.cgi?id=73857
1063
1064         Reviewed by Darin Adler.
1065
1066         Test: platform/mac/accessibility/iframe-aria-hidden.html
1067
1068         * accessibility/AccessibilityRenderObject.cpp:
1069         (WebCore::AccessibilityRenderObject::addAttachmentChildren):
1070         (WebCore::AccessibilityRenderObject::addChildren):
1071         * accessibility/AccessibilityRenderObject.h:
1072         * accessibility/AccessibilityScrollView.cpp:
1073         (WebCore::AccessibilityScrollView::accessibilityIsIgnored):
1074         (WebCore::AccessibilityScrollView::addChildren):
1075         * accessibility/AccessibilityScrollView.h:
1076
1077 2011-12-05  Chris Fleizach  <cfleizach@apple.com>
1078
1079         AX: web search mechanism does not work with frames
1080         https://bugs.webkit.org/show_bug.cgi?id=73836
1081
1082         Reviewed by Beth Dakin.
1083
1084         This allows searching for, and within, frames for elements using the accessibility
1085         search mechanism.
1086
1087         Test: platform/mac/accessibility/search-with-frames.html
1088
1089         * accessibility/AccessibilityObject.cpp:
1090         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
1091         (WebCore::appendAccessibilityObject):
1092         (WebCore::appendChildrenToArray):
1093
1094 2011-12-05  Anders Carlsson  <andersca@apple.com>
1095
1096         Make LayerFlushSchedulerClient::flushLayers indicate whether the flush was successful or not
1097         https://bugs.webkit.org/show_bug.cgi?id=73862
1098
1099         Reviewed by Andy Estes.
1100
1101         Change LayerFlushSchedulerClient::flushLayers to return a boolean. If it returns true, the flush was
1102         successful and the run loop observer will be invalidated.
1103
1104         * platform/graphics/ca/LayerFlushScheduler.h:
1105         * platform/graphics/ca/LayerFlushSchedulerClient.h:
1106         * platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
1107         (WebCore::LayerFlushScheduler::runLoopObserverCallback):
1108
1109 2011-12-05  Dana Jansens  <danakj@chromium.org>
1110
1111         [chromium] Set opaque flag for ImageLayerChromium
1112         https://bugs.webkit.org/show_bug.cgi?id=72964
1113
1114         Reviewed by James Robinson.
1115
1116         New unit test in tests/ImageLayerChromiumTest.cpp.
1117
1118         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1119         (WebCore::GraphicsLayerChromium::setContentsToImage):
1120         * platform/graphics/chromium/GraphicsLayerChromium.h:
1121         (WebCore::GraphicsLayerChromium::contentsLayer):
1122         * platform/graphics/chromium/ImageLayerChromium.cpp:
1123         (WebCore::ImageLayerChromium::setContents):
1124
1125 2011-12-05  Julien Chaffraix  <jchaffraix@webkit.org>
1126
1127         TD width in precentage doesn't work.
1128         https://bugs.webkit.org/show_bug.cgi?id=34758
1129
1130         Reviewed by David Hyatt.
1131
1132         Test: fast/table/colspan-with-all-percent-cells.html
1133
1134         * rendering/AutoTableLayout.cpp:
1135         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
1136         In the case where all our columns have percent lengths, split the colspan
1137         logical width using the percentages from the lengths. This should be properly
1138         handled by the massive 'else' case but it is not and I did not feel like refactor
1139         that due to massive compatibility issues that would arise.
1140
1141 2011-12-05  Chris Fleizach  <cfleizach@apple.com>
1142
1143         platform/mac/accessibility/search-when-element-starts-in-table.html is failing
1144         https://bugs.webkit.org/show_bug.cgi?id=73751
1145
1146         When encountering a table, the rows() and not the cells() should be queried (otherwise
1147         we can end up finding the element we started with).
1148
1149         When searching in reverse, we also need to account for searching elements within the
1150         parent hierarchy. because technically it is "behind" the start element.
1151
1152         Reviewed by Darin Adler.
1153
1154         * accessibility/AccessibilityObject.cpp:
1155         (WebCore::appendChildrenToArray):
1156         (WebCore::AccessibilityObject::objectMatchesSearchCriteriaWithResultLimit):
1157         (WebCore::AccessibilityObject::findMatchingObjects):
1158         * accessibility/AccessibilityObject.h:
1159
1160 2011-12-02  Jer Noble  <jer.noble@apple.com>
1161
1162         <video> elements should disable the system and display sleep when playing on OS X.
1163         https://bugs.webkit.org/show_bug.cgi?id=73730
1164         <rdar://problem/9502155>
1165
1166         Reviewed by Alexey Proskuryakov.
1167
1168         No new tests; platform specific system behavior only.
1169
1170         Create a new DisplaySleepDisabler object when the playback rate becomes non-zero, and destroy
1171         that object when the playback rate drops back to zero.
1172
1173         * html/HTMLMediaElement.cpp:
1174         (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
1175         * html/HTMLMediaElement.h:
1176
1177 2011-12-05  Peter Beverloo  <peter@chromium.org>
1178
1179         [Chromium] Add Android keycodes and build Linux clipboard/filesystem files.
1180         https://bugs.webkit.org/show_bug.cgi?id=73672
1181
1182         Add the KeyCodeConversionAndroid.cpp file, which is a partial re-land
1183         of an older file from the Android port:
1184         http://trac.webkit.org/browser/trunk/WebCore/platform/android/KeyEventAndroid.cpp?rev=56704
1185
1186         Add IconChromiumAndroid.cpp which nullifies the rendering of icons in
1187         file upload boxes, which is not something we want to support now. Also
1188         include ClipboardChromiumLinux.cpp and FileSystemChromiumLinux.cpp
1189         as their functionality can be re-used for Android.
1190
1191         Reviewed by Adam Barth.
1192
1193         * WebCore.gyp/WebCore.gyp:
1194         * WebCore.gypi:
1195         * platform/chromium/KeyCodeConversionAndroid.cpp: Added.
1196         (WebCore::windowsKeyCodeForKeyEvent):
1197         * platform/graphics/chromium/IconChromiumAndroid.cpp: Added.
1198         (WebCore::Icon::Icon):
1199         (WebCore::Icon::~Icon):
1200         (WebCore::Icon::paint):
1201
1202 2011-12-05  Steve Falkenburg  <sfalken@apple.com>
1203
1204         Reviewed by Sam Weinig.
1205
1206         On Windows, filenames not properly preserved when copied into a file list exposed by Event.dataTransfer
1207         https://bugs.webkit.org/show_bug.cgi?id=73841
1208         <rdar://problem/10521879>
1209
1210         No test since repro case involves dropping a file onto the WebView.
1211         
1212         Calling characters() explicitly causes a non-terminated string buffer to get passed back
1213         to the String() constructor that expects a terminated buffer. The characters() call isn't
1214         necessary at all, since we have a String and the method we're calling expects a String.
1215
1216         * platform/win/ClipboardWin.cpp:
1217         (WebCore::ClipboardWin::files): Remove characters() since it doesn't null terminate.
1218
1219 2011-12-05  Timothy Hatcher  <timothy@apple.com>
1220
1221         Keep both InspectorBackend.js and InspectorBackendStub.js in Release builds after
1222         they have been combined into inspector.js.
1223
1224         The InspectorBackend.js file split out of the generated InspectorBackendStub.js
1225         in r101670, and both files are needed to be useful.
1226
1227         https://webkit.org/b/73839
1228
1229         Reviewed by Joseph Pecoraro and Brian Weinstein.
1230
1231         * WebCore.xcodeproj/project.pbxproj: Pass -not -name "InspectorBackend*.js" to find
1232         instead of -not -name InspectorBackendStub.js.
1233
1234 2011-12-05  Mikhail Naganov  <mnaganov@chromium.org>
1235
1236         Web Inspector: [Chromium] Heap profiler should designate weak references.
1237         https://bugs.webkit.org/show_bug.cgi?id=69948
1238
1239         Weak references are now ignored when tracing paths to GC roots.
1240
1241         Reviewed by Yury Semikhatsky.
1242
1243         * inspector/front-end/HeapSnapshot.js:
1244         (WebInspector.HeapSnapshotEdge.prototype.get isWeak):
1245         (WebInspector.HeapSnapshotEdge.prototype.toString):
1246         (WebInspector.HeapSnapshotEdge.prototype.get _hasStringName):
1247         (WebInspector.HeapSnapshotRetainerEdge.prototype.get isWeak):
1248         (WebInspector.HeapSnapshot.prototype._init):
1249         (WebInspector.HeapSnapshotPathFinder.prototype._fillRootChildren):
1250         (WebInspector.HeapSnapshotPathFinder.prototype._skipEdge):
1251
1252 2011-12-05  Sheriff Bot  <webkit.review.bot@gmail.com>
1253
1254         Unreviewed, rolling out r102004.
1255         http://trac.webkit.org/changeset/102004
1256         https://bugs.webkit.org/show_bug.cgi?id=73835
1257
1258         Breaks qt minimal release compilation (Requested by vsevik on
1259         #webkit).
1260
1261         * inspector/CodeGeneratorInspector.py:
1262         (Capitalizer.upper_camel_case_to_lower):
1263         (RawTypes.get):
1264         (RawTypes.String.get_c_param_type):
1265         (RawTypes.Object.get_c_param_type):
1266         (RawTypes.Object):
1267         (ParamType):
1268         (TypeData.__init__):
1269         (TypeData.get_raw_type):
1270         (TypeMap.__init__):
1271         (InspectorFrontend_h):
1272         (InspectorArray):
1273         (InspectorObject):
1274         (String):
1275         (InspectorBackendDispatcher_h):
1276         (Generator.process_command):
1277         * inspector/InspectorValues.h:
1278
1279 2011-12-05  Peter Rybin  <peter.rybin@gmail.com>
1280
1281         Web Inspector: [protocol] generate C++ classes for protocol JSON named types
1282         https://bugs.webkit.org/show_bug.cgi?id=72835
1283
1284         Reviewed by Yury Semikhatsky.
1285
1286         Extends python generator functionality.
1287         Makes constructor in InspectorObject public.
1288
1289         * inspector/CodeGeneratorInspector.py:
1290         * inspector/InspectorValues.h:
1291
1292 2011-12-05  Pavel Podivilov  <podivilov@chromium.org>
1293
1294         Web Inspector: fix fronted compilation.
1295         https://bugs.webkit.org/show_bug.cgi?id=73831
1296
1297         Reviewed by Yury Semikhatsky.
1298
1299         * inspector/front-end/CompilerSourceMapping.js:
1300         (WebInspector.ClosureCompilerSourceMappingPayload):
1301
1302 2011-12-05  Eric Carlson  <eric.carlson@apple.com>
1303
1304         Out-of-band text tracks may only load from same origin as the media element's Document's origin
1305         https://bugs.webkit.org/show_bug.cgi?id=73184
1306
1307         Reviewed by Sam Weinig.
1308
1309         Test: http/tests/security/text-track-crossorigin.html
1310
1311         * html/HTMLTrackElement.cpp:
1312         (WebCore::urlForLogging): Debug-only function for logging urls.
1313         (WebCore::HTMLTrackElement::scheduleLoad): Call canLoadUrl() before passing control off to
1314             the Track.
1315         (WebCore::HTMLTrackElement::canLoadUrl): Don't ask HTMLMediaElement to validate the url, the
1316             requirements for <track> are different from <video>.
1317         (WebCore::HTMLTrackElement::didCompleteLoad): Change bool param to enum.
1318         (WebCore::HTMLTrackElement::mediaElementCrossOriginAttribute): New, return parent 'crossorigin' 
1319             attribute value.
1320         * html/HTMLTrackElement.h:
1321
1322         * html/LoadableTextTrack.cpp:
1323         (WebCore::LoadableTextTrack::scheduleLoad): Add comments from the spec.
1324         (WebCore::LoadableTextTrack::loadTimerFired): Always cancel pending loads. Let the caller know 
1325             if the loader refuses the url immediately.
1326         (WebCore::LoadableTextTrack::cueLoadingStarted): The <track> deals with readyState.
1327         (WebCore::LoadableTextTrack::cueLoadingCompleted): HTMLTrackElement::didCompleteLoad takes
1328             an enum, not a bool.
1329
1330         * loader/TextTrackLoader.cpp:
1331         (WebCore::TextTrackLoader::corsPolicyPreventedLoad): New, log the error and set m_state.
1332         (WebCore::TextTrackLoader::notifyFinished): Check for CORS failure.
1333         (WebCore::TextTrackLoader::load): Take media element cross-origin attribute as a param so we
1334             can make the correct checks.
1335         * loader/TextTrackLoader.h:
1336
1337 2011-12-05  Roland Steiner  <rolandsteiner@chromium.org>
1338
1339         "Raw" pseudo selectors don't match if immediately after a child or descendant combinator
1340         https://bugs.webkit.org/show_bug.cgi?id=72933
1341
1342         Remove shortcut that prevents universal selectors from being created before shadow pseudo-elements.
1343
1344         Reviewed by Antti Koivisto.
1345
1346         * css/CSSParser.cpp:
1347         (WebCore::CSSParser::updateSpecifiersWithElementName):
1348
1349 2011-12-05  Sheriff Bot  <webkit.review.bot@gmail.com>
1350
1351         Unreviewed, rolling out r101983.
1352         http://trac.webkit.org/changeset/101983
1353         https://bugs.webkit.org/show_bug.cgi?id=73827
1354
1355         It broke all tests on GTK and on Qt in debug mode (Requested
1356         by Ossy on #webkit).
1357
1358         * dom/Document.h:
1359         (WebCore::Node::Node):
1360         * dom/Node.cpp:
1361         (WebCore::Node::~Node):
1362         * dom/Node.h:
1363         (WebCore::Node::inDocument):
1364
1365 2011-12-05  Roland Steiner  <rolandsteiner@chromium.org>
1366
1367         <style scoped>: Add 'scoped' attribute
1368         https://bugs.webkit.org/show_bug.cgi?id=67718
1369
1370         Add 'scoped' attribute to IDL and attribute list,
1371         implement and test setting/resetting of the attribute.
1372
1373         Reviewed by Antti Koivisto.
1374
1375         Test: fast/css/style-scoped/basic-attribute.html
1376
1377         * html/HTMLAttributeNames.in:
1378         * html/HTMLStyleElement.cpp:
1379         (WebCore::HTMLStyleElement::scoped):
1380         (WebCore::HTMLStyleElement::setScoped):
1381         (WebCore::HTMLStyleElement::scopingElement):
1382         * html/HTMLStyleElement.h:
1383         * html/HTMLStyleElement.idl:
1384
1385 2011-12-05  Hajime Morrita  <morrita@chromium.org>
1386
1387         [Refactoring] Accessing Node::m_document should be minimized.
1388         https://bugs.webkit.org/show_bug.cgi?id=73800
1389
1390         Reviewed by Kent Tamura.
1391
1392         No new tests. No behavioral change.
1393
1394         Replaced m_document reference with the document() accessor
1395         or temporaril variables. This is a preparation for using
1396         m_document space to point a shadow root pointer.
1397
1398         * dom/Document.h:
1399         (WebCore::Node::Node):
1400         * dom/Node.cpp:
1401         (WebCore::Node::~Node):
1402         * dom/Node.h:
1403         (WebCore::Node::inDocument):
1404
1405 2011-12-05  Shinya Kawanaka  <shinyak@google.com>
1406
1407         Asynchronous SpellChecker should consider multiple requests.
1408         https://bugs.webkit.org/show_bug.cgi?id=72939
1409
1410         Reviewed by Hajime Morita.
1411
1412         Now SpellChecker saves a request when it is processing the previous spellcheck request.
1413         If there is a request having the same root editable element, the older request is replaced by newer request
1414
1415         Test: editing/spelling/spellcheck-queue.html
1416
1417         * editing/SpellChecker.cpp:
1418         (WebCore::SpellChecker::SpellCheckRequest::SpellCheckRequest):
1419           A structure to have spell check request.
1420         (WebCore::SpellChecker::SpellCheckRequest::sequence):
1421         (WebCore::SpellChecker::SpellCheckRequest::range):
1422         (WebCore::SpellChecker::SpellCheckRequest::text):
1423         (WebCore::SpellChecker::SpellCheckRequest::mask):
1424         (WebCore::SpellChecker::SpellCheckRequest::rootEditableElement):
1425         (WebCore::SpellChecker::SpellChecker):
1426         (WebCore::SpellChecker::createRequest):
1427         (WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
1428           When timer is fired, queued request is processed if any.
1429         (WebCore::SpellChecker::canCheckAsynchronously):
1430         (WebCore::SpellChecker::requestCheckingFor):
1431           When the spellchecker is processing another request, the latest request is queued.
1432         (WebCore::SpellChecker::invokeRequest):
1433         (WebCore::SpellChecker::enqueueRequest):
1434           Enqueues a request. If there is an older request whose root editable element is the same as the request,
1435           it will be replaced.
1436         (WebCore::SpellChecker::didCheck):
1437         * editing/SpellChecker.h:
1438
1439 2011-12-05  Eric Carlson  <eric.carlson@apple.com>
1440
1441         WebCore part of: Add WebKit preferences for text track settings
1442         https://bugs.webkit.org/show_bug.cgi?id=73721
1443
1444         Reviewed by John Sullivan.
1445
1446         No new tests yet, still nothing to test.
1447
1448         * page/Settings.cpp:
1449         (WebCore::Settings::setShouldDisplaySubtitles): Move the setters to the .cpp file so they
1450             aren't inlined.
1451         (WebCore::Settings::setShouldDisplayCaptions): Ditto.
1452         (WebCore::Settings::setShouldDisplayTextDescriptions): Ditto.
1453         * page/Settings.h:
1454
1455 2011-12-05  Noel Gordon  <noel.gordon@gmail.com>
1456
1457         ImageDecoder setSize() should check for backing store allocation failure
1458         https://bugs.webkit.org/show_bug.cgi?id=72864
1459
1460         Reviewed by Adam Barth.
1461
1462         The backing store of a decoded image is a Vector<PixelData> on the affected
1463         ports. And Vector<> provides a resize capacity member that returns false if
1464         memory allocation fails.
1465
1466         setSize() should be called once only during an image decode - add an ASSERT
1467         for that. Resize the backing store capacity to the requested image size and
1468         return false if memory allocation fails.
1469
1470         ImageDecoder::isOverSize(width, height) is called to check that the decoded
1471         width and height won't overflow 'width x height x sizeof(PixelData)' before
1472         calls to setSize(). Refer to http://webkit.org/b/48634
1473
1474         No new tests. Covered by fast/images/size-failure.html
1475
1476         * platform/image-decoders/ImageDecoder.cpp:
1477         (WebCore::ImageFrame::setSize):
1478
1479 2011-12-04  Andreas Kling  <kling@webkit.org>
1480
1481         CSSStyleSheet can't be reparented, enforce this at compile time.
1482         <http://webkit.org/b/73793>
1483
1484         Reviewed by Benjamin Poulain.
1485
1486         * css/StyleSheet.h:
1487         (WebCore::StyleSheet::clearOwnerRule):
1488
1489             Changed setParentRule(CSSImportRule*) to clearOwnerRule() to document and
1490             enforce the fact that style sheets should never be reparented after creation.
1491
1492         (WebCore::StyleSheet::ownerRule):
1493
1494             Renamed parentRule() to ownerRule() to match the CSSOM name.
1495
1496         (WebCore::StyleSheet::ownerNode):
1497         (WebCore::StyleSheet::clearOwnerNode):
1498
1499             Also renamed StyleSheet::m_parentNode to m_ownerNode to match its accessors.
1500
1501         * css/CSSStyleSheet.h:
1502
1503             Removed ownerRule() as we now inherit it from StyleSheet.
1504
1505         * bindings/js/JSDOMBinding.h:
1506         (WebCore::root):
1507         * css/CSSImportRule.cpp:
1508         (WebCore::CSSImportRule::~CSSImportRule):
1509         (WebCore::CSSImportRule::setCSSStyleSheet):
1510         * css/StyleSheet.cpp:
1511         (WebCore::StyleSheet::StyleSheet):
1512         (WebCore::StyleSheet::parentStyleSheet):
1513         (WebCore::StyleSheet::baseURL):
1514         * inspector/InspectorStyleSheet.cpp:
1515         (WebCore::fillMediaListChain):
1516
1517             Update call sites to use the new names.
1518
1519 2011-12-04  Andreas Kling  <kling@webkit.org>
1520
1521         border-width: initial and border-color: initial cannot be removed via CSSOM.
1522         <http://webkit.org/b/68551>
1523
1524         Reviewed by Darin Adler.
1525
1526         Test: fast/css/cssom-remove-shorthand-property.html
1527
1528         When asked to remove a shorthand property, we should toss out both the
1529         sub-properties of that shorthand as well as the shorthand itself, should the
1530         declaration contain it. The latter part was missing in our implementation.
1531
1532         * css/CSSMutableStyleDeclaration.h:
1533         * css/CSSMutableStyleDeclaration.cpp:
1534         (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
1535         (WebCore::CSSMutableStyleDeclaration::removeShorthandProperty):
1536
1537             Changed to return true only if something was actually removed.
1538
1539 2011-12-04  Ryosuke Niwa  <rniwa@webkit.org>
1540
1541         HIERARCHY_REQUEST_ERR check in checkAcceptChild should be optimized for newChild without children
1542         https://bugs.webkit.org/show_bug.cgi?id=73737
1543
1544         Reviewed by Darin Adler.
1545
1546         It turned out that 50-70% of nodes inserted by DOM APIs such as insertBefore and appendChild
1547         don't have any descendent nodes. Optimize isDescendantOf which is used by checkAcceptChild for this case.
1548         On a test case attached on the bug, we see a 40% improvement.
1549
1550         Also optimize for cases where either new child or new parent but not both are in document as suggested
1551         by Erik Arvidsson. This appears to happen about 40-70% of the time, and the symmetric difference between
1552         the two cases is about 50% so it's worth implementing both optimizations.
1553
1554         Unfortunately no tests because we still have a O(n) algorithm somewhere.
1555
1556         * dom/Node.cpp:
1557         (WebCore::Node::isDescendantOf):
1558         (WebCore::Node::contains):
1559
1560 2011-12-04  Andreas Kling  <kling@webkit.org>
1561
1562         CSSValuePool: Inline trivial getters.
1563         <http://webkit.org/b/73763>
1564
1565         Reviewed by Anders Carlsson.
1566
1567         * css/CSSValuePool.cpp:
1568         * css/CSSValuePool.h:
1569         (WebCore::CSSValuePool::createInheritedValue): Inlined.
1570         (WebCore::CSSValuePool::createImplicitInitialValue): Ditto.
1571         (WebCore::CSSValuePool::createExplicitInitialValue): Ditto.
1572
1573 2011-12-03  Noel Gordon  <noel.gordon@gmail.com>
1574
1575         Fix WebPImageDecoder decoder leak.
1576         https://bugs.webkit.org/show_bug.cgi?id=73756
1577
1578         Reviewed by Andreas Kling.
1579
1580         Delete the m_decoder member in the destructor if needed with WebPIDelete.
1581
1582         No new tests, it's valgrind territory.
1583
1584         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
1585         (WebCore::WEBPImageDecoder::~WEBPImageDecoder):
1586
1587 2011-12-03  Andreas Kling  <kling@webkit.org>
1588
1589         CSSStyleSheet: Parent rule can only ever be @import, enforce this at compile time.
1590         <http://webkit.org/b/73725>
1591
1592         Reviewed by Darin Adler.
1593
1594         Made StyleSheet::m_parentRule a CSSImportRule* rather than a CSSRule*
1595         and updated getters, setters and constructors accordingly.
1596
1597         There is no change in behavior, this simply enforces the status quo.
1598
1599         * WebCore.xcodeproj/project.pbxproj:
1600         * bindings/js/JSDOMBinding.h:
1601         * bindings/scripts/CodeGeneratorV8.pm:
1602         (AddIncludesForType):
1603         * css/CSSStyleSheet.cpp:
1604         (WebCore::CSSStyleSheet::CSSStyleSheet):
1605         * css/CSSStyleSheet.h:
1606         (WebCore::CSSStyleSheet::create):
1607         (WebCore::CSSStyleSheet::ownerRule):
1608         * css/StyleSheet.cpp:
1609         (WebCore::StyleSheet::StyleSheet):
1610         * css/StyleSheet.h:
1611         (WebCore::StyleSheet::parentRule):
1612         (WebCore::StyleSheet::setParentRule):
1613
1614 2011-12-03  Andreas Kling  <kling@webkit.org>
1615
1616         Unreviewed, revert accidental change from r101932.
1617
1618         * bindings/scripts/CodeGeneratorV8.pm:
1619         (AddIncludesForType):
1620
1621 2011-12-03  Mary Wu  <mary.wu@torchmobile.com.cn>
1622
1623         Upstream 4 files into WebCore/platform/blackberry
1624         https://bugs.webkit.org/show_bug.cgi?id=73614
1625
1626         Reviewed by Eric Seidel.
1627
1628         * platform/blackberry/CursorBlackBerry.cpp: Added.
1629         (WebCore::AllCursors::AllCursors):
1630         (WebCore::getCursor):
1631         (WebCore::Cursor::Cursor):
1632         (WebCore::Cursor::~Cursor):
1633         (WebCore::Cursor::operator=):
1634         (WebCore::aliasCursor):
1635         (WebCore::cellCursor):
1636         (WebCore::columnResizeCursor):
1637         (WebCore::contextMenuCursor):
1638         (WebCore::copyCursor):
1639         (WebCore::crossCursor):
1640         (WebCore::eastResizeCursor):
1641         (WebCore::eastWestResizeCursor):
1642         (WebCore::grabbingCursor):
1643         (WebCore::grabCursor):
1644         (WebCore::handCursor):
1645         (WebCore::helpCursor):
1646         (WebCore::iBeamCursor):
1647         (WebCore::moveCursor):
1648         (WebCore::noDropCursor):
1649         (WebCore::noneCursor):
1650         (WebCore::northEastResizeCursor):
1651         (WebCore::northEastSouthWestResizeCursor):
1652         (WebCore::northResizeCursor):
1653         (WebCore::northSouthResizeCursor):
1654         (WebCore::northWestResizeCursor):
1655         (WebCore::northWestSouthEastResizeCursor):
1656         (WebCore::notAllowedCursor):
1657         (WebCore::pointerCursor):
1658         (WebCore::progressCursor):
1659         (WebCore::rowResizeCursor):
1660         (WebCore::southEastResizeCursor):
1661         (WebCore::southResizeCursor):
1662         (WebCore::southWestResizeCursor):
1663         (WebCore::verticalTextCursor):
1664         (WebCore::waitCursor):
1665         (WebCore::westResizeCursor):
1666         (WebCore::zoomInCursor):
1667         (WebCore::zoomOutCursor):
1668         (WebCore::middlePanningCursor):
1669         (WebCore::eastPanningCursor):
1670         (WebCore::northPanningCursor):
1671         (WebCore::northEastPanningCursor):
1672         (WebCore::northWestPanningCursor):
1673         (WebCore::southPanningCursor):
1674         (WebCore::southEastPanningCursor):
1675         (WebCore::southWestPanningCursor):
1676         (WebCore::westPanningCursor):
1677         * platform/blackberry/DragDataBlackBerry.cpp: Added.
1678         (WebCore::DragData::canSmartReplace):
1679         (WebCore::DragData::containsColor):
1680         (WebCore::DragData::containsCompatibleContent):
1681         (WebCore::DragData::containsFiles):
1682         (WebCore::DragData::containsPlainText):
1683         (WebCore::DragData::containsURL):
1684         (WebCore::DragData::asFilenames):
1685         (WebCore::DragData::asColor):
1686         (WebCore::DragData::asPlainText):
1687         (WebCore::DragData::asURL):
1688         (WebCore::DragData::asFragment):
1689         * platform/blackberry/DragImageBlackBerry.cpp: Added.
1690         (WebCore::createDragImageFromImage):
1691         (WebCore::createDragImageIconForCachedImage):
1692         (WebCore::deleteDragImage):
1693         (WebCore::dissolveDragImageToFraction):
1694         (WebCore::scaleDragImage):
1695         (WebCore::dragImageSize):
1696         * platform/blackberry/EventLoopBlackBerry.cpp: Added.
1697         (WebCore::EventLoop::platformInit):
1698         (WebCore::EventLoop::cycle):
1699
1700 2011-12-03  Andreas Kling  <kling@webkit.org>
1701
1702         Cache CSSInitialValue instances per-document.
1703         <http://webkit.org/b/73745>
1704
1705         Reviewed by Oliver Hunt.
1706
1707         Test: http/tests/security/cross-origin-css-primitive.html
1708
1709         Have CSSValuePool manage the caching of CSSInitialValue objects.
1710
1711         * css/CSSInitialValue.h:
1712         (WebCore::CSSInitialValue::createExplicit):
1713         (WebCore::CSSInitialValue::createImplicit):
1714         (WebCore::CSSInitialValue::CSSInitialValue):
1715         * css/CSSParser.cpp:
1716         (WebCore::CSSParser::parseValue):
1717         (WebCore::CSSParser::parseFillShorthand):
1718         (WebCore::CSSParser::parseAnimationShorthand):
1719         (WebCore::CSSParser::parseTransitionShorthand):
1720         (WebCore::CSSParser::parseShorthand):
1721         * css/CSSValuePool.cpp:
1722         (WebCore::CSSValuePool::CSSValuePool):
1723         (WebCore::CSSValuePool::createImplicitInitialValue):
1724         (WebCore::CSSValuePool::createExplicitInitialValue):
1725         * css/CSSValuePool.h:
1726
1727 2011-12-03  Andreas Kling  <kling@webkit.org>
1728
1729         Keep CSSInheritedValue in the CSS value pool.
1730         <http://webkit.org/b/73747>
1731
1732         Reviewed by Antti Koivisto.
1733
1734         We only need one CSSInheritedValue instance per document, so cache it
1735         in CSSValuePool and have the parser create it through there.
1736
1737         * css/CSSParser.cpp:
1738         (WebCore::CSSParser::parseValue):
1739         * css/CSSValuePool.cpp:
1740         (WebCore::CSSValuePool::CSSValuePool):
1741         (WebCore::CSSValuePool::createInheritedValue):
1742         * css/CSSValuePool.h:
1743
1744 2011-12-03  Andreas Kling  <kling@webkit.org>
1745
1746         Rename CSSPrimitiveValueCache to CSSValuePool.
1747         <http://webkit.org/b/73742>
1748
1749         Reviewed by Antti Koivisto.
1750
1751         CSSPrimitiveValueCache -> CSSValuePool
1752         Document::primitiveValueCache() -> Document::cssValuePool()
1753
1754         This is in preparation for sharing more than just primitive values.
1755
1756         * CMakeLists.txt:
1757         * GNUmakefile.list.am:
1758         * Target.pri:
1759         * WebCore.gypi:
1760         * WebCore.vcproj/WebCore.vcproj:
1761         * WebCore.xcodeproj/project.pbxproj:
1762         * bindings/scripts/CodeGeneratorV8.pm:
1763         (AddIncludesForType):
1764         * css/CSSComputedStyleDeclaration.cpp:
1765         (WebCore::valueForNinePieceImageSlice):
1766         (WebCore::valueForNinePieceImageQuad):
1767         (WebCore::valueForNinePieceImageRepeat):
1768         (WebCore::valueForNinePieceImage):
1769         (WebCore::zoomAdjustedPixelValue):
1770         (WebCore::zoomAdjustedNumberValue):
1771         (WebCore::zoomAdjustedPixelValueForLength):
1772         (WebCore::valueForReflection):
1773         (WebCore::getPositionOffsetValue):
1774         (WebCore::CSSComputedStyleDeclaration::currentColorOrValidColor):
1775         (WebCore::getBorderRadiusCornerValue):
1776         (WebCore::computedTransform):
1777         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
1778         (WebCore::valueForGridTrackList):
1779         (WebCore::getDelayValue):
1780         (WebCore::getDurationValue):
1781         (WebCore::createLineBoxContainValue):
1782         (WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword):
1783         (WebCore::CSSComputedStyleDeclaration::valueForShadow):
1784         (WebCore::valueForFamily):
1785         (WebCore::renderTextDecorationFlagsToCSSValue):
1786         (WebCore::fillRepeatToCSSValue):
1787         (WebCore::fillSizeToCSSValue):
1788         (WebCore::contentToCSSValue):
1789         (WebCore::counterToCSSValue):
1790         (WebCore::fontFamilyFromStyle):
1791         (WebCore::lineHeightFromStyle):
1792         (WebCore::fontSizeFromStyle):
1793         (WebCore::fontStyleFromStyle):
1794         (WebCore::fontVariantFromStyle):
1795         (WebCore::fontWeightFromStyle):
1796         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1797         * css/CSSParser.cpp:
1798         (WebCore::parseColorValue):
1799         (WebCore::parseSimpleLengthValue):
1800         (WebCore::CSSParser::setStyleSheet):
1801         (WebCore::CSSParser::createPrimitiveNumericValue):
1802         (WebCore::CSSParser::createPrimitiveStringValue):
1803         (WebCore::CSSParser::parseValidPrimitive):
1804         (WebCore::CSSParser::parseValue):
1805         (WebCore::parseBackgroundClip):
1806         (WebCore::CSSParser::parseFillShorthand):
1807         (WebCore::CSSParser::parsePage):
1808         (WebCore::CSSParser::parseSizeParameter):
1809         (WebCore::CSSParser::parseContent):
1810         (WebCore::CSSParser::parseAttr):
1811         (WebCore::CSSParser::parseBackgroundColor):
1812         (WebCore::CSSParser::parseFillPositionX):
1813         (WebCore::CSSParser::parseFillPositionY):
1814         (WebCore::CSSParser::parseFillPositionComponent):
1815         (WebCore::CSSParser::parseFillPosition):
1816         (WebCore::CSSParser::parseFillRepeat):
1817         (WebCore::CSSParser::parseFillSize):
1818         (WebCore::CSSParser::parseFillProperty):
1819         (WebCore::CSSParser::parseAnimationDirection):
1820         (WebCore::CSSParser::parseAnimationFillMode):
1821         (WebCore::CSSParser::parseAnimationIterationCount):
1822         (WebCore::CSSParser::parseAnimationName):
1823         (WebCore::CSSParser::parseAnimationPlayState):
1824         (WebCore::CSSParser::parseAnimationProperty):
1825         (WebCore::CSSParser::parseAnimationTimingFunction):
1826         (WebCore::CSSParser::parseGridTrackList):
1827         (WebCore::CSSParser::parseDashboardRegions):
1828         (WebCore::CSSParser::parseCounterContent):
1829         (WebCore::CSSParser::parseShape):
1830         (WebCore::CSSParser::parseWrapShape):
1831         (WebCore::CSSParser::parseFont):
1832         (WebCore::CSSParser::parseFontFamily):
1833         (WebCore::CSSParser::parseFontStyle):
1834         (WebCore::CSSParser::parseFontVariant):
1835         (WebCore::CSSParser::parseFontWeight):
1836         (WebCore::CSSParser::parseColor):
1837         (WebCore::ShadowParseContext::ShadowParseContext):
1838         (WebCore::ShadowParseContext::commitLength):
1839         (WebCore::ShadowParseContext::commitStyle):
1840         (WebCore::CSSParser::parseShadow):
1841         (WebCore::CSSParser::parseReflect):
1842         (WebCore::CSSParser::parseFlex):
1843         (WebCore::BorderImageParseContext::BorderImageParseContext):
1844         (WebCore::CSSParser::parseBorderImage):
1845         (WebCore::CSSParser::parseBorderImageRepeat):
1846         (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext):
1847         (WebCore::BorderImageSliceParseContext::commitNumber):
1848         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
1849         (WebCore::CSSParser::parseBorderImageSlice):
1850         (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext):
1851         (WebCore::BorderImageQuadParseContext::commitNumber):
1852         (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
1853         (WebCore::CSSParser::parseBorderImageQuad):
1854         (WebCore::CSSParser::parseBorderRadius):
1855         (WebCore::CSSParser::parseAspectRatio):
1856         (WebCore::CSSParser::parseCounter):
1857         (WebCore::parseDeprecatedGradientPoint):
1858         (WebCore::parseDeprecatedGradientColorStop):
1859         (WebCore::CSSParser::parseDeprecatedGradient):
1860         (WebCore::valueFromSideKeyword):
1861         (WebCore::parseGradientColorOrKeyword):
1862         (WebCore::CSSParser::parseLinearGradient):
1863         (WebCore::CSSParser::parseRadialGradient):
1864         (WebCore::CSSParser::parseCrossfade):
1865         (WebCore::CSSParser::parseCustomFilter):
1866         (WebCore::CSSParser::parseFilter):
1867         (WebCore::CSSParser::parseFlowThread):
1868         (WebCore::CSSParser::parseRegionThread):
1869         (WebCore::CSSParser::parseTextEmphasisStyle):
1870         (WebCore::CSSParser::parseFontFeatureSettings):
1871         * css/CSSParser.h:
1872         (WebCore::CSSParser::cssValuePool):
1873         * css/CSSValuePool.cpp: Renamed from Source/WebCore/css/CSSPrimitiveValueCache.cpp.
1874         (WebCore::CSSValuePool::CSSValuePool):
1875         (WebCore::CSSValuePool::~CSSValuePool):
1876         (WebCore::CSSValuePool::createIdentifierValue):
1877         (WebCore::CSSValuePool::createColorValue):
1878         (WebCore::CSSValuePool::createValue):
1879         * css/CSSValuePool.h: Renamed from Source/WebCore/css/CSSPrimitiveValueCache.h.
1880         (WebCore::CSSValuePool::create):
1881         (WebCore::CSSValuePool::createValue):
1882         * css/mediaControlsGtk.css:
1883         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
1884         * dom/Document.cpp:
1885         (WebCore::Document::cssValuePool):
1886         * dom/Document.h:
1887
1888 2011-12-03  Andreas Kling  <kling@webkit.org>
1889
1890         Shrink CSSValueList.
1891         <http://webkit.org/b/73732>
1892
1893         Reviewed by Antti Koivisto.
1894
1895         Packed CSSValueList::m_isSpaceSeparated into the CSSValue bit field
1896         and renamed it to m_isSpaceSeparatedValue, shrinking CSSValueList
1897         by one CPU word.
1898
1899         Also renamed CSSValue::m_isImplicit to m_isImplicitInitialValue
1900         for good measure.
1901
1902         * css/CSSInitialValue.h:
1903         (WebCore::CSSInitialValue::CSSInitialValue):
1904         * css/CSSValue.h:
1905         (WebCore::CSSValue::isImplicitInitialValue):
1906         (WebCore::CSSValue::CSSValue):
1907         * css/CSSValueList.cpp:
1908         (WebCore::CSSValueList::CSSValueList):
1909         (WebCore::CSSValueList::copy):
1910         (WebCore::CSSValueList::customCssText):
1911         * css/CSSValueList.h:
1912         (WebCore::CSSValueList::isSpaceSeparated):
1913
1914 2011-12-02  Philippe Normand  <pnormand@igalia.com>
1915
1916         [GStreamer] Fullscreen controller support for the new WebKit Fullscreen API
1917         https://bugs.webkit.org/show_bug.cgi?id=66968
1918
1919         Reviewed by Martin Robinson.
1920
1921         * GNUmakefile.am: Don't use the Quicktime fullscreen CSS anymore,
1922         it wasn't suited for GTK in the first place anyway.
1923         * platform/gtk/RenderThemeGtk.cpp:
1924         (WebCore::RenderThemeGtk::extraFullScreenStyleSheet): Simply reuse
1925         GTK CSS.
1926
1927 2011-12-03  Alejandro G. Castro  <alex@igalia.com>
1928
1929         [GTK] TextureMapperNode should not use Qt types and functions
1930         https://bugs.webkit.org/show_bug.cgi?id=73713
1931
1932         Replace qreal with double and qMin with std::min.
1933
1934         Reviewed by Noam Rosenthal.
1935
1936         * platform/graphics/texmap/TextureMapperNode.cpp:
1937         (WebCore::solveCubicBezierFunction):
1938         (WebCore::solveStepsFunction):
1939
1940 2011-12-03  Dan Winship  <danw@gnome.org>
1941
1942         [GTK] Remove lots of code that is now unnecessary after
1943         SoupRequestHTTP API changes.
1944         https://bugs.webkit.org/show_bug.cgi?id=71611
1945
1946         Reviewed by Martin Robinson.
1947
1948         No new tests; behavior is unchanged
1949
1950         * platform/network/ResourceHandleInternal.h:
1951         (WebCore::ResourceHandleInternal::ResourceHandleInternal): remove
1952         no-longer-needed fields.
1953         * platform/network/soup/ResourceHandleSoup.cpp:
1954         (WebCore::finishedCallback): remove this, and m_finished, which
1955         we no longer need to explicitly track
1956         (WebCore::statusWillBeHandledBySoup):
1957         (WebCore::soupErrorShouldCauseLoadFailure): No longer needed;
1958         SoupRequestHTTP's logic is now aligned with WebKit's.
1959         (WebCore::gotChunkCallback): remove gotChunkCallback, which
1960         is no longer needed
1961         (WebCore::startHTTPRequest):
1962         (WebCore::sendRequestCallback):
1963         (WebCore::gotHeadersCallback):
1964         (WebCore::contentSniffedCallback): merge the code from
1965         gotHeadersCallback and contentSniffedCallback into
1966         sendRequestCallback
1967         * platform/network/soup/ResourceResponseSoup.cpp:
1968         (WebCore::ResourceResponse::updateFromSoupMessage): move the
1969         sniffing override logic here
1970
1971 2011-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
1972
1973         Unreviewed, rolling out r101904.
1974         http://trac.webkit.org/changeset/101904
1975         https://bugs.webkit.org/show_bug.cgi?id=73739
1976
1977         It broke zillions of tests on all bot (Requested by
1978         Ossy_weekend on #webkit).
1979
1980         * bindings/js/JSDOMWindowCustom.cpp:
1981         (WebCore::handlePostMessage):
1982
1983 2011-12-02  Kentaro Hara  <haraken@chromium.org>
1984
1985         [Refactoring] Use join(", ", @arguments) to build a method argument string in CodeGenerator*.pm
1986         https://bugs.webkit.org/show_bug.cgi?id=73651
1987
1988         Reviewed by Darin Adler.
1989
1990         The code in CodeGenerator*.pm to build a method argument string is really dirty
1991         and error-prone. It is building an argument string incrementally judging whether
1992         ", " is necessary or not, like this:
1993
1994             my $method = ... ? "func(" : "func(a";
1995             if (...) {
1996                 $method .= $method =~ /\($/ ? "b" : ", b";
1997             }
1998             $method .= ")";
1999
2000         Alternatively, we can refactor the code as follows:
2001
2002             my $funcName = "func";
2003             my @arguments;
2004             push(@arguments, "a") if (...);
2005             push(@arguments, "b") if (...);
2006             my $method = $funcName . "(" . join(", ", @arguments) . ")";
2007
2008         This patch just refactors the code, and generated .h and .cpp files should be
2009         exactly the same as the current .h and .cpp files.
2010
2011         Tests: bindings/scripts/test/*
2012
2013         * bindings/scripts/CodeGenerator.pm:
2014         (GetterExpression):
2015         (SetterExpression):
2016         * bindings/scripts/CodeGeneratorCPP.pm:
2017         (GenerateImplementation):
2018         * bindings/scripts/CodeGeneratorGObject.pm:
2019         ():
2020         * bindings/scripts/CodeGeneratorJS.pm:
2021         (GenerateImplementation):
2022         * bindings/scripts/CodeGeneratorObjC.pm:
2023         (GenerateImplementation):
2024         * bindings/scripts/CodeGeneratorV8.pm:
2025         (GenerateNormalAttrGetter):
2026         (GenerateNormalAttrSetter):
2027
2028 2011-12-02  David Levin  <levin@chromium.org>
2029
2030         Rename WTF class from TemporarilyChange to TemporaryChange.
2031         https://bugs.webkit.org/show_bug.cgi?id=73479
2032
2033         Reviewed by Eric Seidel.
2034
2035         * ForwardingHeaders/wtf/TemporarilyChange.h: Removed.
2036         * ForwardingHeaders/wtf/TemporaryChange.h: Added.
2037         * page/FrameView.cpp:
2038         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
2039         (WebCore::FrameView::layout):
2040         (WebCore::FrameView::setScrollPosition):
2041         (WebCore::FrameView::autoSizeIfEnabled):
2042
2043 2011-12-02  Armand Navabi  <armand.navabi@gmail.com>
2044
2045         ASSERT fails in updateState ACTION_DRAW case
2046         https://bugs.webkit.org/show_bug.cgi?id=73351
2047
2048         Reviewed by James Robinson.
2049
2050         Changed ASSERT in CCSchedulerStateMachine to include ( || !m_visible) as discussed in bug 
2051         report. m_commitState is set to COMMIT_STATE_WAITING_FOR_FIRST_DRAW if m_needsCommit or
2052         !m_visible, so in ACTION_DRAW the assert should have both conditions.
2053
2054         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
2055         (WebCore::CCSchedulerStateMachine::updateState):
2056
2057 2011-12-02  Shawn Singh  <shawnsingh@chromium.org>
2058
2059         [chromium] Scissor rect optimization for chromium compositor
2060         https://bugs.webkit.org/show_bug.cgi?id=67341
2061
2062         Reviewed by James Robinson.
2063
2064         Mostly covered by damage tracker tests. Currently this relies on
2065         manually running layout tests, because this patch requires partial
2066         swaps that are not supported by DumpRenderTree. The feature
2067         automatically disables if partial swap is not supported.
2068
2069         * platform/graphics/chromium/LayerRendererChromium.cpp:
2070         (WebCore::LayerRendererChromium::initialize):
2071         (WebCore::LayerRendererChromium::trackDamageForAllSurfaces):
2072         (WebCore::LayerRendererChromium::drawLayersOntoRenderSurfaces):
2073         (WebCore::LayerRendererChromium::drawLayersInternal):
2074         (WebCore::LayerRendererChromium::swapBuffers):
2075         (WebCore::LayerRendererChromium::drawLayer):
2076         * platform/graphics/chromium/LayerRendererChromium.h:
2077         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2078         (WebCore::CCSettings::CCSettings):
2079         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
2080         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2081         (WebCore::CCRenderSurface::draw):
2082         * platform/graphics/chromium/cc/CCRenderSurface.h:
2083
2084 2011-12-02  Dmitry Lomov  <dslomov@google.com>
2085
2086         https://bugs.webkit.org/show_bug.cgi?id=73691
2087         [JSC] Implement correct order of window.postMessage arguments.
2088
2089         Reviewed by Geoffrey Garen.
2090
2091         * bindings/js/JSDOMWindowCustom.cpp:
2092         (WebCore::handlePostMessage):
2093
2094 2011-12-02  Stephen Chenney  <schenney@chromium.org>
2095
2096         REGRESSION (r91125): Polyline tool in google docs is broken
2097         https://bugs.webkit.org/show_bug.cgi?id=65796
2098
2099         Reviewed by Darin Adler.
2100
2101         Work around a bug in CoreGraphics, that caused incorrect bounds for paths
2102         consisting only of move-to elements. This causes problems in SVG, when the enormous
2103         bounds prevented the drawing of things behind.
2104
2105         Tests: svg/custom/path-moveto-only-rendering.svg
2106                svg/custom/subpaths-moveto-only-rendering.svg
2107
2108         * platform/graphics/cg/PathCG.cpp:
2109         (WebCore::PathIsEmptyOrSingleMoveTester::PathIsEmptyOrSingleMoveTester): Class to
2110         test for isEmpty accoridng ot the same rules as other platforms.
2111         (WebCore::PathIsEmptyOrSingleMoveTester::isEmpty): Query the result
2112         (WebCore::PathIsEmptyOrSingleMoveTester::testPathElement): Path iterator method
2113         (WebCore::PathHasOnlyMoveToTester::PathHasOnlyMoveToTester): Class to test whether a
2114         path contains only move-to elements, and hence should have null bounds.
2115         (WebCore::PathHasOnlyMoveToTester::hasOnlyMoveTo): Query the result
2116         (WebCore::PathHasOnlyMoveToTester::testPathElement): Path iterator method.
2117         (WebCore::Path::boundingRect): Modified to check for move-to only paths
2118         (WebCore::Path::fastBoundingRect): Modified to check for move-to only paths
2119         (WebCore::Path::isEmpty): Now uses the method that matches other platforms.
2120         (WebCore::Path::hasCurrentPoint): Now uses CGPathIsEmpty directly
2121         (WebCore::Path::transform) : Now uses CGPathIsEmpty directly
2122
2123 2011-12-02  Mihnea Ovidenie  <mihnea@adobe.com>
2124
2125         [CSSRegions]More renaming for region style rules.
2126         https://bugs.webkit.org/show_bug.cgi?id=73526
2127
2128         Reviewed by Eric Seidel.
2129
2130         Rename isRegionStyleRule() -> isRegionRule()
2131         WEBKIT_REGION_STYLE_RULE -> WEBKIT_REGION_RULE.
2132
2133         * bindings/objc/DOMCSS.mm:
2134         (kitClass):
2135         * bindings/v8/custom/V8CSSRuleCustom.cpp:
2136         (WebCore::toV8):
2137         * css/CSSGrammar.y:
2138         * css/CSSParser.cpp:
2139         (WebCore::CSSParser::createRegionRule):
2140         * css/CSSParser.h:
2141         * css/CSSRule.cpp:
2142         (WebCore::CSSRule::cssText):
2143         (WebCore::CSSRule::destroy):
2144         * css/CSSRule.h:
2145         (WebCore::CSSRule::isRegionRule):
2146         * css/CSSRule.idl:
2147         * css/CSSStyleSelector.cpp:
2148         (WebCore::CSSStyleSelector::addRegionRule):
2149         (WebCore::RuleSet::addRulesFromSheet):
2150         * css/CSSStyleSelector.h:
2151         * css/WebKitCSSRegionRule.cpp:
2152         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
2153         * css/tokenizer.flex:
2154
2155 2011-12-02  Tom Sepez  <tsepez@chromium.org>
2156
2157         XSSAuditor includes more terminating characters when truncating
2158         attribute values.
2159         https://bugs.webkit.org/show_bug.cgi?id=73684
2160
2161         Reviewed by Daniel Bates.
2162
2163         * html/parser/XSSAuditor.cpp:
2164         (WebCore::isTerminatingCharacter):
2165         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
2166
2167 2011-12-02  Tony Chang  <tony@chromium.org>
2168
2169         Need to implement flex-flow: column-reverse
2170         https://bugs.webkit.org/show_bug.cgi?id=73504
2171
2172         Reviewed by David Hyatt.
2173
2174         We can't just change the direction of the FlexOrderIterator because we want the overflow to be
2175         on the top. We can't just position them in the reverse location since we don't know where the
2176         bottom edge is until we've layed out the flex items. So we do an extra pass, but it should be
2177         fast since we're not laying out, just moving.
2178
2179         * rendering/RenderFlexibleBox.cpp:
2180         (WebCore::RenderFlexibleBox::flowAwareBorderEnd):
2181         (WebCore::RenderFlexibleBox::flowAwarePaddingEnd):
2182         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2183         (WebCore::RenderFlexibleBox::layoutColumnReverse): Do an extra pass to reposition flexitems in the reverse order.
2184         * rendering/RenderFlexibleBox.h:
2185
2186 2011-12-02  Stephen Chenney  <schenney@chromium.org>
2187
2188         Divide by zero for zero-length arcs
2189         https://bugs.webkit.org/show_bug.cgi?id=73021
2190
2191         Reviewed by Nikolas Zimmermann.
2192
2193         A zero-length path produces divide by zero, resulting in nothing being
2194         drawn. This change modifies the behavior to produce a zero-length line
2195         which will generate correct linecaps.
2196
2197         Test: svg/stroke/zero-length-arc-linecaps-rendering.svg
2198
2199         * svg/SVGPathParser.cpp:
2200         (WebCore::SVGPathParser::parseArcToSegment): Catch the case of
2201         zero-length arcs and convert them to lines (the same as would happen
2202         for zero arc radii).
2203
2204 2011-12-02  James Wei <james.wei@intel.com> & Xingnan Wang <xingnan.wang@intel.com>
2205
2206         -Implement the SSE optimization for vsmul and vadd.
2207         https://bugs.webkit.org/show_bug.cgi?id=73182
2208
2209         Reviewed by Kenneth Russell.
2210
2211         * platform/audio/VectorMath.cpp:
2212         (WebCore:VectorMath):
2213
2214 2011-12-02  David Grogan  <dgrogan@chromium.org>
2215
2216         Grant workers experimental access to IndexedDB.
2217         https://bugs.webkit.org/show_bug.cgi?id=73609
2218
2219         Reviewed by Nate Chapin.
2220
2221         No new tests - there will be chromium ui tests that depend on
2222         webkit.org/b/73297.
2223
2224         * storage/IDBFactory.cpp:
2225         (WebCore::IDBFactory::open): Call new function,
2226         IDBFactoryBackendInterface::openFromWorker.
2227         * storage/IDBFactoryBackendImpl.cpp:
2228         (WebCore::IDBFactoryBackendImpl::open):
2229         (WebCore::IDBFactoryBackendImpl::openFromWorker):
2230         (WebCore::IDBFactoryBackendImpl::openInternal):
2231         * storage/IDBFactoryBackendImpl.h:
2232         * storage/IDBFactoryBackendInterface.h:
2233         * workers/WorkerContext.cpp:
2234         (WebCore::WorkerContext::webkitIndexedDB): Stores
2235         IDBFactoryBackendInterface, implemented by IDBFactoryBackendProxy in
2236         chromium, in the WorkerContext.  For the Document case it is stored in
2237         the PageGroup.  Storing it in the WorkerContext causes more memory
2238         churn, but that should be trivial.  I don't know of any better
2239         alternatives.
2240         * workers/WorkerContext.h:
2241         * workers/WorkerContext.idl:
2242
2243 2011-12-02  Aaron Colwell  <acolwell@chromium.org>
2244
2245         Fix mixed content handling for video in Chromium by having
2246         CachedResourceLoader & SubresourceLoader use the 
2247         ResourceRequest::TargetType when determining if a RawResource can
2248         be requested.
2249         https://bugs.webkit.org/show_bug.cgi?id=72178
2250
2251         Reviewed by Adam Barth.
2252
2253         Tests: http/tests/security/mixedContent/insecure-video-in-iframe.html
2254                http/tests/security/mixedContent/insecure-video-in-main-frame.html
2255                http/tests/security/mixedContent/redirect-http-to-https-video-in-main-frame.html
2256                http/tests/security/mixedContent/redirect-https-to-http-video-in-main-frame.html
2257
2258         * loader/SubresourceLoader.cpp:
2259         (WebCore::SubresourceLoader::willSendRequest):
2260         * loader/cache/CachedRawResource.cpp:
2261         (WebCore::CachedRawResource::CachedRawResource):
2262         * loader/cache/CachedRawResource.h:
2263         * loader/cache/CachedResource.cpp:
2264         (WebCore::defaultPriorityForResourceType):
2265         (WebCore::cachedResourceTypeToTargetType):
2266         (WebCore::CachedResource::targetTypeToCachedResourceType):
2267         * loader/cache/CachedResource.h:
2268         * loader/cache/CachedResourceLoader.cpp:
2269         (WebCore::createResource):
2270         (WebCore::CachedResourceLoader::checkInsecureContent):
2271         (WebCore::CachedResourceLoader::canRequest):
2272         (WebCore::CachedResourceLoader::requestResource):
2273
2274 2011-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
2275
2276         Unreviewed, rolling out r101731.
2277         http://trac.webkit.org/changeset/101731
2278         https://bugs.webkit.org/show_bug.cgi?id=73706
2279
2280         Broke copy and paste in chromium. (Requested by dcheng on #webkit).
2281
2282         * editing/SpellChecker.cpp:
2283         (WebCore::SpellChecker::SpellChecker):
2284         (WebCore::SpellChecker::initRequest):
2285         (WebCore::SpellChecker::clearRequest):
2286         (WebCore::SpellChecker::canCheckAsynchronously):
2287         (WebCore::SpellChecker::isBusy):
2288         (WebCore::SpellChecker::isValid):
2289         (WebCore::SpellChecker::requestCheckingFor):
2290         (WebCore::SpellChecker::doRequestCheckingFor):
2291         (WebCore::SpellChecker::didCheck):
2292         * editing/SpellChecker.h:
2293
2294 2011-12-02  Fady Samuel  <fsamuel@chromium.org>
2295
2296         When page scaling is in use position:fixed has incorrect results
2297         https://bugs.webkit.org/show_bug.cgi?id=68617
2298
2299         Reviewed by Simon Fraser.
2300
2301         Add the option for position:fixed elements to be fixed to the frame
2302         instead of the layout rectangle of the document.
2303
2304         Tests: fast/repaint/fixed-in-page-scale.html
2305                fast/repaint/fixed-right-bottom-in-page-scale.html
2306                fast/repaint/fixed-right-in-page-scale.html
2307
2308         * WebCore.exp.in:
2309         * page/FrameView.cpp:
2310         (WebCore::FrameView::reset):
2311         (WebCore::FrameView::scrollXForFixedPosition):
2312         (WebCore::FrameView::scrollYForFixedPosition):
2313           If position:fixed elements are relative to the frame, disregard the
2314           drag factor.
2315         (WebCore::FrameView::setShouldLayoutFixedElementsRelativeToFrame):
2316         * page/FrameView.h:
2317         (WebCore::FrameView::shouldLayoutFixedElementsRelativeToFrame):
2318         * rendering/RenderBox.cpp:
2319         (WebCore::RenderBox::shouldLayoutFixedElementRelativeToFrame):
2320         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2321         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
2322           If position:fixed elements are relative to the frame, their container
2323           is the frame instead of the layout rect of the document. 
2324           This allows proper positioning of these elements to the right and
2325           bottom.
2326         * rendering/RenderBox.h:
2327         * testing/Internals.cpp:
2328         (WebCore::Internals::setShouldLayoutFixedElementsRelativeToFrame):
2329         * testing/Internals.h:
2330         * testing/Internals.idl:
2331           Allow enabling and disabling the new behavior in layout tests.
2332
2333 2011-12-02  Benjamin Poulain  <bpoulain@apple.com>
2334
2335         Build fix for SubresourceLoader when building with Core Foundation
2336         https://bugs.webkit.org/show_bug.cgi?id=73709
2337
2338         Reviewed by David Kilzer.
2339
2340         The patch r100311 removed SubresourceClient and merged it in SubresourceLoader.
2341         Consequently, m_client does not exist anymore and there is no need to do the check
2342         before invoking didReceiveData().
2343
2344         * loader/cf/SubresourceLoaderCF.cpp:
2345         (WebCore::SubresourceLoader::didReceiveDataArray):
2346
2347 2011-12-02  Andreas Kling  <kling@webkit.org>
2348
2349         StyledElement: Simplify addCSSColor().
2350         <http://webkit.org/b/73703>
2351
2352         Reviewed by Darin Adler.
2353
2354         The Color(const String&) constructor handles both named and 3/6-digit
2355         hex colors, so there's no need to handle those separately here.
2356         Also tweaked some comments and minor things.
2357
2358         * dom/StyledElement.cpp:
2359         (WebCore::StyledElement::addCSSColor):
2360
2361 2011-12-02  Benjamin Poulain  <bpoulain@apple.com>
2362
2363         Update platform/iphone to platform/ios
2364         https://bugs.webkit.org/show_bug.cgi?id=73708
2365
2366         Reviewed by Darin Adler.
2367
2368         The platform is now best known as iOS, update the platform layer accordingly.
2369
2370         * Configurations/WebCore.xcconfig:
2371         * WebCore.gypi:
2372         * WebCore.xcodeproj/project.pbxproj:
2373         * platform/cocoa/KeyEventCocoa.mm:
2374         * platform/ios/KeyEventCodesIOS.h: Renamed from Source/WebCore/platform/iphone/KeyEventCodesIPhone.h.
2375         * platform/ios/KeyEventIOS.mm: Renamed from Source/WebCore/platform/iphone/KeyEventIPhone.mm.
2376         (WebCore::keyIdentifierForKeyEvent):
2377         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2378         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2379         (WebCore::PlatformKeyboardEvent::currentCapsLockState):
2380         (WebCore::PlatformKeyboardEvent::getCurrentModifierState):
2381
2382 2011-12-02  Jonathan Backer  <backer@chromium.org>
2383
2384         [chromium] Eliminate unnecessary state on previous CL
2385         https://bugs.webkit.org/show_bug.cgi?id=73661
2386
2387         Reviewed by Kenneth Russell.
2388
2389         * platform/graphics/chromium/LayerRendererChromium.cpp:
2390         (WebCore::LayerRendererChromium::initialize):
2391         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2392         (WebCore::CCLayerTreeHost::initialize):
2393         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
2394         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2395         (WebCore::CCSettings::CCSettings):
2396         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
2397
2398 2011-12-02  Dan Bernstein  <mitz@apple.com>
2399
2400         <rdar://problem/10520670> REGRESSION (r91738): didFinishLoad is called before custom fonts have finished loading
2401         https://bugs.webkit.org/show_bug.cgi?id=73688
2402
2403         Reviewed by Darin Adler.
2404
2405         The problem was that after CSSFontFaceSource::getFontData() had scheduled a 0-delay timer to
2406         begin loading the font, but before that timer fired, the subresource loader appeared to have
2407         had no resources waiting to be loaded, and therefore didFinishLoad could be called. This change
2408         reworks the fix for <http://webkit.org/b/65123> so that while the load is still started on a
2409         0-delay timer, the subresource loader’s request count is incremented immediately, preventing
2410         it from hitting 0 while the font load is scheduled to begin. The delayed load mechanism is
2411         moved from CSSFontFaceSource into CSSFontSelector in order to safely handle the possibility of
2412         the latter being decommissioned while waiting for font loading to begin.
2413
2414         * css/CSSFontFaceSource.cpp:
2415         (WebCore::CSSFontFaceSource::CSSFontFaceSource): Removed initializer for m_loadStartTimer.
2416         (WebCore::CSSFontFaceSource::~CSSFontFaceSource): Removed stopping of m_loadStartTimer.
2417         (WebCore::CSSFontFaceSource::getFontData): Replaced code to schedule loading on a timer with
2418         a call to CSSFontSelector::beginLoadingFontSoon.
2419         * css/CSSFontFaceSource.h: Removed m_loadStartTimer and m_fontSelector member variables.
2420         * css/CSSFontSelector.cpp:
2421         (WebCore::CSSFontSelector::CSSFontSelector): Added initialized for m_beginLoadingTimer.
2422         (WebCore::CSSFontSelector::~CSSFontSelector): Added call to clearDocument(), to deal with
2423         anything remaining in m_fontsToBeginLoading at this time.
2424         (WebCore::CSSFontSelector::clearDocument): Now stops m_beginLoadingTimer and balances
2425         incrementRequestCount() calls for anything remaining in m_fontsToBeginLoading.
2426         (WebCore::CSSFontSelector::beginLoadingFontSoon): Added. Schedules the actual call to
2427         CachedFont::beginLoadingIfNeeded on a 0-delay timer, and meanwhile increments the request count
2428         on the CachedResourceLoader, which ensures that didFinishLoad will not be called while waiting
2429         for the timer to fire.
2430         (WebCore::CSSFontSelector::beginLoadTimerFired): Added. Actually calls
2431         CachedFont::beginLoadIfNeeded and balances the incrementRequestCount() made when the timer was
2432         scheduled.
2433         * css/CSSFontSelector.h:
2434
2435 2011-12-02  David Tseng  <dtseng@google.com>
2436
2437         Send an AXCheckedStateChanged notification when the aria-checked attribute changes.
2438         https://bugs.webkit.org/show_bug.cgi?id=72754
2439
2440         Reviewed by Chris Fleizach.
2441
2442         Test: accessibility/aria-checkbox-sends-notification.html
2443
2444         * accessibility/AXObjectCache.cpp:
2445         (WebCore::AXObjectCache::checkedStateChanged):
2446         * accessibility/AXObjectCache.h:
2447         * dom/Element.cpp:
2448         (WebCore::Element::updateAfterAttributeChanged):
2449         * html/HTMLInputElement.cpp:
2450         (WebCore::HTMLInputElement::setChecked):
2451
2452 2011-12-02  Grace Kloba  <klobag@chromium.org>
2453
2454         [chromium] Recycle tile-sized textures during commit to prevent reallocations
2455         https://bugs.webkit.org/show_bug.cgi?id=70645
2456
2457         Reviewed by James Robinson.
2458
2459         Currently texture request is capped by the high limit while we reclaim the
2460         textures in each commit. This triggers new tiles always allocated when scrolling.
2461         The proposal is to recycle the texture during request if the total used memory
2462         is about to exceed the reclaim limit.
2463
2464         * platform/graphics/chromium/ManagedTexture.cpp:
2465         (WebCore::ManagedTexture::reserve):
2466         * platform/graphics/chromium/TextureManager.cpp:
2467         (WebCore::TextureManager::setMemoryLimitBytes):
2468         (WebCore::TextureManager::replaceTexture):
2469         (WebCore::TextureManager::requestTexture):
2470         * platform/graphics/chromium/TextureManager.h:
2471
2472 2011-12-02  Kent Tamura  <tkent@chromium.org>
2473
2474         [Chromium] Show placeholder even if the element is focused
2475         https://bugs.webkit.org/show_bug.cgi?id=73629
2476
2477         Reviewed by Hajime Morita.
2478
2479         No new tests. Need to update some existing placeholder tests.
2480
2481         * rendering/RenderThemeChromiumMac.h: Add shouldShowPlaceholderWhenFocused().
2482         * rendering/RenderThemeChromiumMac.mm:
2483         (WebCore::RenderThemeChromiumMac::shouldShowPlaceholderWhenFocused):
2484         Returns true.
2485         * rendering/RenderThemeChromiumSkia.cpp:
2486         (WebCore::RenderThemeChromiumSkia::shouldShowPlaceholderWhenFocused): ditto.
2487         * rendering/RenderThemeChromiumSkia.h: Add shouldShowPlaceholderWhenFocused().
2488
2489 2011-12-02  Kent Tamura  <tkent@chromium.org>
2490
2491         [Lion][Windows] Both of placeholder and input text are shown in <input type=number>
2492         https://bugs.webkit.org/show_bug.cgi?id=73615
2493
2494         Reviewed by Joseph Pecoraro.
2495
2496         Placeholder visibility was checked by HTMLInputElement::value
2497         emptiness. It should be innerTextValue emptiness because it is
2498         possible that a number field has empty HTMLInputElement::value and
2499         non-empty innerTextValue.
2500
2501         Tests: fast/forms/number/number-placeholder-with-unacceptable-value.html
2502
2503         * html/HTMLInputElement.cpp:
2504         (WebCore::HTMLInputElement::updateInnerTextValue):
2505         We should update placeholder visiblity when the innerTextValue is updated.
2506         (WebCore::HTMLInputElement::subtreeHasChanged): ditto.
2507         (WebCore::HTMLInputElement::setSuggestedValue):
2508         We don't need to call updatePlaceholderVisibility() because updateInnerTextValue() calls it.
2509         (WebCore::HTMLInputElement::setValueFromRenderer):
2510         We don't need to call updatePlaceholderVisibility() because subtreeHasChanged() calls it.
2511         * html/HTMLInputElement.h: Checks innerTextValue emptiness.
2512         * html/TextFieldInputType.cpp:
2513         (WebCore::TextFieldInputType::setValue):
2514         We don't need to call updatePlaceholderVisibility() because updateInnerTextValue() calls it.
2515
2516 2011-12-01  Alok Priyadarshi  <alokp@chromium.org>
2517
2518         [chromium] CCLayerQuad does not return FloatQuad in correct order
2519         https://bugs.webkit.org/show_bug.cgi?id=73247
2520
2521         Reviewed by James Robinson.
2522
2523         Returned the FloatQuad coordinates in correct order.
2524         
2525         Covered by new unit tests in CCLayerQuadTest.cpp.
2526
2527         * platform/graphics/chromium/cc/CCLayerQuad.cpp:
2528         (WebCore::CCLayerQuad::floatQuad):
2529
2530 2011-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
2531
2532         Unreviewed, rolling out r101833.
2533         http://trac.webkit.org/changeset/101833
2534         https://bugs.webkit.org/show_bug.cgi?id=73678
2535
2536         test_expectations file invalid: run Tools/Scripts/new-run-
2537         webkit-tests --lint-test-files (Requested by scheib on
2538         #webkit).
2539
2540         * platform/graphics/chromium/cc/CCLayerQuad.cpp:
2541         (WebCore::CCLayerQuad::floatQuad):
2542
2543 2011-12-02  Alok Priyadarshi  <alokp@chromium.org>
2544
2545         [chromium] CCLayerQuad does not return FloatQuad in correct orientation
2546         https://bugs.webkit.org/show_bug.cgi?id=73247
2547
2548         Reviewed by James Robinson.
2549
2550         Returned the FloatQuad coordinates in correct order.
2551         
2552         Covered by new unit tests in CCLayerQuadTest.cpp.
2553
2554         * platform/graphics/chromium/cc/CCLayerQuad.cpp:
2555         (WebCore::CCLayerQuad::floatQuad):
2556
2557 2011-12-01  Dmitry Lomov  <dslomov@google.com>
2558
2559         https://bugs.webkit.org/show_bug.cgi?id=73589
2560         [V8][Chromium] Adjust postMessage to the latest "implementation-ready" spec.
2561         - postMessage should support transfer of MessagePorts
2562         - the order of arguments to Window::postMessage and Window::webkitPostMessage should be (msg, targetOrigin [, transfer])
2563
2564         Reviewed by David Levin.
2565
2566         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2567         (WebCore::handlePostMessageCallback):
2568         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
2569         (WebCore::handlePostMessageCallback):
2570         * bindings/v8/custom/V8MessagePortCustom.cpp:
2571         (WebCore::handlePostMessageCallback):
2572         * bindings/v8/custom/V8WorkerCustom.cpp:
2573         (WebCore::handlePostMessageCallback):
2574
2575 2011-12-02  Enrica Casucci  <enrica@apple.com>
2576
2577         https://bugs.webkit.org/show_bug.cgi?id=73497
2578         This is a followup to the patch submitted for the bug above.
2579         Tha patch was landed in r101575 and I missed to make one of the changes
2580         suggested by the reviewer that had pointed out that the code was still
2581         making use of the deprecatedNode method.
2582
2583         Unreviewed.
2584
2585         * editing/DeleteSelectionCommand.cpp:
2586         (WebCore::DeleteSelectionCommand::removeRedundantBlocks): Changed deprecatedNode to containerNode.
2587
2588 2011-12-02  Tom Sepez  <tsepez@chromium.org>
2589
2590         Content-security-policy script-src not enforced on workers.
2591         https://bugs.webkit.org/show_bug.cgi?id=73240
2592
2593         Reviewed by Adam Barth.
2594
2595         Add a CSP check in AbstractWorker.cpp as part of resolving URL.
2596         
2597         Test: http/tests/security/contentSecurityPolicy/worker-script-src.html
2598
2599         * workers/AbstractWorker.cpp:
2600         (WebCore::AbstractWorker::resolveURL):
2601
2602 2011-12-02  Daniel Cheng  <dcheng@chromium.org>
2603
2604         [chromium] Add plumbing for supporting custom MIME types in DataTransfer.
2605         https://bugs.webkit.org/show_bug.cgi?id=73594
2606
2607         Reviewed by David Levin.
2608
2609         Tests: editing/pasteboard/clipboard-customData.html
2610                fast/events/drag-customData.html
2611
2612         * platform/chromium/ChromiumDataObject.cpp:
2613         (WebCore::ChromiumDataObject::types):
2614         (WebCore::ChromiumDataObject::getData):
2615         (WebCore::ChromiumDataObject::setData):
2616         * platform/chromium/ChromiumDataObject.h:
2617         (WebCore::ChromiumDataObject::customData):
2618         * platform/chromium/PlatformSupport.h:
2619
2620 2011-12-02  Darin Adler  <darin@apple.com>
2621
2622         [Mac] Form stream data structures still not threadsafe
2623         https://bugs.webkit.org/show_bug.cgi?id=73674
2624
2625         Reviewed by Anders Carlsson.
2626
2627         * platform/network/mac/FormDataStreamMac.mm:
2628         (WebCore::streamFieldsMapMutex): Added. 
2629         (WebCore::associateStreamWithResourceHandle): Use streamFieldsMapMutex.
2630         (WebCore::formCreate): Ditto.
2631         (WebCore::formFinalize): Ditto.
2632         (WebCore::httpBodyFromStream): Ditto.
2633
2634 2011-12-02  Joshua Bell  <jsbell@chromium.org>
2635
2636         IndexedDB: Rename "multientry" to "multiEntry" per spec change
2637         https://bugs.webkit.org/show_bug.cgi?id=73578
2638
2639         Reviewed by Darin Fisher.
2640
2641         * storage/IDBIndex.h:
2642         (WebCore::IDBIndex::multiEntry):
2643         * storage/IDBIndex.idl:
2644         * storage/IDBIndexBackendImpl.cpp:
2645         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
2646         * storage/IDBIndexBackendImpl.h:
2647         (WebCore::IDBIndexBackendImpl::create):
2648         (WebCore::IDBIndexBackendImpl::multiEntry):
2649         * storage/IDBIndexBackendInterface.h:
2650         * storage/IDBLevelDBBackingStore.cpp:
2651         (WebCore::IDBLevelDBBackingStore::getIndexes):
2652         (WebCore::IDBLevelDBBackingStore::createIndex):
2653         * storage/IDBLevelDBCoding.cpp:
2654         * storage/IDBObjectStore.cpp:
2655         (WebCore::IDBObjectStore::createIndex):
2656         * storage/IDBObjectStoreBackendImpl.cpp:
2657         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2658         (WebCore::IDBObjectStoreBackendImpl::createIndex):
2659         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
2660         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
2661         * storage/IDBObjectStoreBackendImpl.h:
2662         * storage/IDBObjectStoreBackendInterface.h:
2663
2664 2011-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
2665
2666         Unreviewed, rolling out r101805.
2667         http://trac.webkit.org/changeset/101805
2668         https://bugs.webkit.org/show_bug.cgi?id=73670
2669
2670         Many canvas tests started failing due to the isEmpty change
2671         (Requested by darin on #webkit).
2672
2673         * platform/graphics/cg/PathCG.cpp:
2674         (WebCore::Path::boundingRect):
2675         (WebCore::Path::fastBoundingRect):
2676         (WebCore::Path::isEmpty):
2677
2678 2011-12-01  Darin Adler  <darin@apple.com>
2679
2680         [Mac] Reference count threading violation in FormDataStreamMac.mm
2681         https://bugs.webkit.org/show_bug.cgi?id=73627
2682
2683         Reviewed by Sam Weinig.
2684
2685         Shows up as a crash during existing layout test runs so no new tests are required.
2686
2687         * platform/network/mac/FormDataStreamMac.mm:
2688         (WebCore::streamFieldsMap): Replaced getStreamFormDataMap with this.
2689         Use an NSMapTable instead of a HashMap because we need to remove items from this
2690         on a non-main thread.
2691         (WebCore::associateStreamWithResourceHandle): Use NSMapGet instead of
2692         HashMap::contains here.
2693         (WebCore::formCreate): FormStreamFields now stores a RefPtr to the form data.
2694         Added the code to fill that in. Did it in a more modern way to avoid the leakRef
2695         and adoptRef that were used before. Replaced the code that set up the stream
2696         form data map entry with code that sets an entry in the streamFieldsMap.
2697         (WebCore::formFinishFinalizationOnMainThread): Added. Contains the work of
2698         finalization that must be done on the main thread, specifically, destroying the
2699         fields structure that contains objects with RefPtr in them. We can't touch these
2700         reference counts on non-main threads.
2701         (WebCore::formFinalize): Changed this to use NSMapRemove on the streamFieldsMap.
2702         Added a callOnMainThread to finish the finalization.
2703         (WebCore::setHTTPBody): Removed the leakRef, no longer needed, that used to be
2704         balanced by an adoptRef in formCreate.
2705         (WebCore::httpBodyFromStream): Changed to use NSMapGet.
2706
2707 2011-12-02  Antti Koivisto  <antti@apple.com>
2708
2709         https://bugs.webkit.org/show_bug.cgi?id=73520
2710         REGRESSION(r101524): Article titles invisible until hover on blaze.com
2711
2712         Reviewed by Darin Adler.
2713         
2714         We need to invalidate the matched declaration cache when new web fonts are loaded.
2715         Fonts in the cached RenderStyles may not be valid anymore.
2716         
2717         Also renamed m_matchStyleDeclarationCache -> m_matchedStyleDeclarationCache.
2718         
2719         Test reduction by the Reduction Fairy (aka kling).
2720
2721         Test: fast/css/font-face-cache-bug.html
2722
2723         * css/CSSFontSelector.cpp:
2724         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
2725         * css/CSSStyleSelector.cpp:
2726         (WebCore::CSSStyleSelector::findFromMatchedDeclarationCache):
2727         (WebCore::CSSStyleSelector::addToMatchedDeclarationCache):
2728         (WebCore::CSSStyleSelector::invalidateMatchedDeclarationCache):
2729         * css/CSSStyleSelector.h:
2730
2731 2011-11-02  Jer Noble  <jer.noble@apple.com>
2732
2733         MediaControls should use MediaController if present.
2734         https://bugs.webkit.org/show_bug.cgi?id=71410
2735
2736         Reviewed by Eric Carlson.
2737
2738         No new tests; covered by existing tests.
2739
2740         Add support for individual media controls to control the MediaController of their associated
2741         HTMLMediaElement, if present.
2742
2743         The video spec requires that UA provided media controls be implemented in terms of their 
2744         HTMLMediaElement's MediaController, if present.  So for each of the media controls, modify 
2745         their constructor to take a Document* instead of an HTMLMediaElement, and add an setter
2746         taking a MediaControllerInterface.
2747
2748         Now that MediaControls have an abstract interface instead of an HTMLMediaElement, use toParentMediaElement
2749         to find the controllingVideoElement.
2750         * accessibility/AccessibilityMediaControls.cpp:
2751         (WebCore::AccessibilityMediaControlsContainer::controllingVideoElement):
2752
2753         Pass the MediaController or the HTMLMediaElement when setting up the elements controls.
2754         * html/HTMLMediaElement.cpp:
2755         (WebCore::HTMLMediaElement::createMediaControls):
2756         (WebCore::HTMLMediaElement::setMediaController):
2757
2758         The following functions have only constructor changes:
2759         * html/shadow/MediaControlElements.cpp:
2760         (WebCore::MediaControlElement::MediaControlElement):
2761         (WebCore::MediaControlPanelElement::MediaControlPanelElement):
2762         (WebCore::MediaControlPanelElement::create):
2763         (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement):
2764         (WebCore::MediaControlTimelineContainerElement::create):
2765         (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement):
2766         (WebCore::MediaControlVolumeSliderContainerElement::create):
2767         (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement):
2768         (WebCore::MediaControlStatusDisplayElement::create):
2769         (WebCore::MediaControlInputElement::MediaControlInputElement):
2770         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement):
2771         (WebCore::MediaControlMuteButtonElement::defaultEventHandler):
2772         (WebCore::MediaControlPanelMuteButtonElement::MediaControlPanelMuteButtonElement):
2773         (WebCore::MediaControlPanelMuteButtonElement::create):
2774         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement):
2775         (WebCore::MediaControlVolumeSliderMuteButtonElement::create):
2776         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement):
2777         (WebCore::MediaControlPlayButtonElement::create):
2778         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement):
2779         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement):
2780         (WebCore::MediaControlSeekForwardButtonElement::create):
2781         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement):
2782         (WebCore::MediaControlSeekBackButtonElement::create):
2783         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement):
2784         (WebCore::MediaControlRewindButtonElement::create):
2785         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement):
2786         (WebCore::MediaControlReturnToRealtimeButtonElement::create):
2787         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
2788         (WebCore::MediaControlToggleClosedCaptionsButtonElement::create):
2789         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
2790         (WebCore::MediaControlTimelineElement::create):
2791         (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement):
2792         (WebCore::MediaControlVolumeSliderElement::create):
2793         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
2794         (WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement):
2795         (WebCore::MediaControlFullscreenVolumeSliderElement::create):
2796         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
2797         (WebCore::MediaControlFullscreenButtonElement::create):
2798         (WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement):
2799         (WebCore::MediaControlFullscreenVolumeMinButtonElement::create):
2800         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement):
2801         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create):
2802         (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
2803         (WebCore::MediaControlTimeRemainingDisplayElement::create):
2804         (WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement):
2805         (WebCore::MediaControlCurrentTimeDisplayElement::create):
2806         (WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement):
2807         * html/shadow/MediaControlRootElement.cpp:
2808         (WebCore::MediaControlRootElement::MediaControlRootElement):
2809         (WebCore::MediaControls::create):
2810         (WebCore::MediaControlRootElement::create):
2811         * html/shadow/MediaControlRootElement.h:
2812         * html/shadow/MediaControls.cpp:
2813         (WebCore::MediaControls::MediaControls):
2814         * html/shadow/MediaControls.h:
2815
2816         The following functions now call MediaControllerInterface instead of HTMLMediaElement directly:
2817         * html/shadow/MediaControlElements.h:
2818         (WebCore::MediaControlStatusDisplayElement::update):
2819         (WebCore::MediaControlMuteButtonElement::updateDisplayType):
2820         (WebCore::MediaControlPlayButtonElement::defaultEventHandler):
2821         (WebCore::MediaControlPlayButtonElement::updateDisplayType):
2822         (WebCore::MediaControlSeekButtonElement::startTimer):
2823         (WebCore::MediaControlSeekButtonElement::stopTimer):
2824         (WebCore::MediaControlSeekButtonElement::nextRate):
2825         (WebCore::MediaControlSeekButtonElement::seekTimerFired):
2826         (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
2827         (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler):
2828         (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
2829         (WebCore::MediaControlToggleClosedCaptionsButtonElement::updateDisplayType):
2830         (WebCore::MediaControlTimelineElement::defaultEventHandler):
2831         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
2832         (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler):
2833         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler):
2834         * html/shadow/MediaControlRootElement.cpp:
2835         (WebCore::MediaControlRootElement::reset):
2836         (WebCore::MediaControlRootElement::playbackStarted):
2837         (WebCore::MediaControlRootElement::playbackProgressed):
2838         (WebCore::MediaControlRootElement::playbackStopped):
2839         (WebCore::MediaControlRootElement::updateTimeDisplay):
2840         (WebCore::MediaControlRootElement::loadedMetadata):
2841         (WebCore::MediaControlRootElement::changedVolume):
2842         (WebCore::MediaControlRootElement::enteredFullscreen):
2843         (WebCore::MediaControlRootElement::showVolumeSlider):
2844         (WebCore::MediaControlRootElement::defaultEventHandler):
2845         (WebCore::MediaControlRootElement::startHideFullscreenControlsTimer):
2846         (WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired):
2847         * html/shadow/MediaControlRootElementChromium.cpp:
2848         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
2849         (WebCore::MediaControls::create):
2850         (WebCore::MediaControlRootElementChromium::create):
2851         (WebCore::MediaControlRootElementChromium::reset):
2852         (WebCore::MediaControlRootElementChromium::playbackStarted):
2853         (WebCore::MediaControlRootElementChromium::playbackProgressed):
2854         (WebCore::MediaControlRootElementChromium::playbackStopped):
2855         (WebCore::MediaControlRootElementChromium::updateTimeDisplay):
2856         (WebCore::MediaControlRootElementChromium::defaultEventHandler):
2857         (WebCore::MediaControlRootElementChromium::changedVolume):
2858         (WebCore::MediaControlRootElementChromium::showVolumeSlider):
2859         * html/shadow/MediaControlRootElementChromium.h:
2860
2861         The following functions set the current MediaControllerInterface.
2862         * html/shadow/MediaControlRootElement.cpp:
2863         (WebCore::MediaControlRootElement::setMediaController):
2864         * html/shadow/MediaControlElements.h:
2865         (WebCore::MediaControlElement::setMediaController):
2866         (WebCore::MediaControlElement::mediaController):
2867         (WebCore::MediaControlInputElement::setMediaController):
2868         (WebCore::MediaControlInputElement::mediaController):
2869         * html/shadow/MediaControlRootElementChromium.cpp:
2870         (WebCore::MediaControlRootElementChromium::setMediaController):
2871
2872 2011-12-02  Stephen Chenney  <schenney@chromium.org>
2873
2874         REGRESSION (r91125): Polyline tool in google docs is broken
2875         https://bugs.webkit.org/show_bug.cgi?id=65796
2876
2877         Reviewed by Darin Adler.
2878
2879         Work around a bug in CoreGraphics, that caused incorrect bounds for paths
2880         consisting only of move-to elements. This causes problems in SVG, when the enormous
2881         bounds prevented the drawing of things behind.
2882
2883         Tests: svg/custom/path-moveto-only-rendering.svg
2884                svg/custom/subpaths-moveto-only-rendering.svg
2885
2886         * platform/graphics/cg/PathCG.cpp:
2887         (WebCore::PathIsEmptyOrSingleMoveTester::PathIsEmptyOrSingleMoveTester): Class to
2888         test for isEmpty accoridng ot the same rules as other platforms.
2889         (WebCore::PathIsEmptyOrSingleMoveTester::isEmpty): Query the result
2890         (WebCore::PathIsEmptyOrSingleMoveTester::testPathElement): Path iterator method
2891         (WebCore::PathHasOnlyMoveToTester::PathHasOnlyMoveToTester): Class to test whether a
2892         path contains only move-to elements, and hence should have null bounds.
2893         (WebCore::PathHasOnlyMoveToTester::hasOnlyMoveTo): Query the result
2894         (WebCore::PathHasOnlyMoveToTester::testPathElement): Path iterator method.
2895         (WebCore::Path::boundingRect): Modified to check for move-to only paths
2896         (WebCore::Path::fastBoundingRect): Modified to check for move-to only paths
2897         (WebCore::Path::isEmpty): Now uses the method that matches other platforms.
2898
2899 2011-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
2900
2901         Unreviewed, rolling out r101794.
2902         http://trac.webkit.org/changeset/101794
2903         https://bugs.webkit.org/show_bug.cgi?id=73656
2904
2905         Broke win build (Requested by vsevik on #webkit).
2906
2907         * bindings/js/ScriptCallStackFactory.cpp:
2908         * bindings/js/ScriptCallStackFactory.h:
2909         * bindings/scripts/CodeGeneratorJS.pm:
2910         (GenerateParametersCheck):
2911         * bindings/scripts/CodeGeneratorV8.pm:
2912         (GenerateFunctionCallback):
2913         * bindings/scripts/test/JS/JSTestObj.cpp:
2914         (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
2915         * bindings/scripts/test/V8/V8TestObj.cpp:
2916         (WebCore::TestObjInternal::customArgsAndExceptionCallback):
2917         * bindings/v8/ScriptCallStackFactory.cpp:
2918         * bindings/v8/ScriptCallStackFactory.h:
2919         * inspector/InspectorInstrumentation.cpp:
2920         * inspector/InspectorInstrumentation.h:
2921         * inspector/WorkerInspectorController.h:
2922         * page/Console.cpp:
2923         (WebCore::Console::shouldCaptureFullStackTrace):
2924         * page/Console.h:
2925
2926 2011-12-02  Raphael Kubo da Costa  <kubo@profusion.mobi>
2927
2928         Unreviewed, revert r101347.
2929         https://bugs.webkit.org/show_bug.cgi?id=73580
2930
2931         It breaks the linking of Tools/ targets due to missing functions.
2932
2933         * PlatformEfl.cmake:
2934         * platform/graphics/GraphicsLayer.cpp:
2935         * platform/graphics/GraphicsLayer.h:
2936         * platform/graphics/efl/GraphicsLayerEfl.cpp: Added.
2937         (WebCore::GraphicsLayer::create):
2938         (WebCore::GraphicsLayerEfl::GraphicsLayerEfl):
2939         (WebCore::GraphicsLayerEfl::~GraphicsLayerEfl):
2940         (WebCore::GraphicsLayerEfl::setNeedsDisplay):
2941         (WebCore::GraphicsLayerEfl::setNeedsDisplayInRect):
2942         * platform/graphics/efl/GraphicsLayerEfl.h: Added.
2943         * platform/graphics/texmap/TextureMapperNode.cpp:
2944         (WebCore::solveCubicBezierFunction):
2945         (WebCore::solveStepsFunction):
2946
2947 2011-12-01  Vsevolod Vlasov  <vsevik@chromium.org>
2948
2949         Web Inspector: Extract default call stack creation and check for front-end from console.
2950         https://bugs.webkit.org/show_bug.cgi?id=73566
2951
2952         Reviewed by Yury Semikhatsky.
2953
2954         * bindings/js/ScriptCallStackFactory.cpp:
2955         (WebCore::createScriptCallStack):
2956         * bindings/js/ScriptCallStackFactory.h:
2957         * bindings/scripts/CodeGeneratorJS.pm:
2958         (GenerateParametersCheck):
2959         * bindings/scripts/CodeGeneratorV8.pm:
2960         (GenerateFunctionCallback):
2961         * bindings/scripts/test/JS/JSTestObj.cpp:
2962         (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
2963         * bindings/scripts/test/V8/V8TestObj.cpp:
2964         (WebCore::TestObjInternal::customArgsAndExceptionCallback):
2965         * bindings/v8/ScriptCallStackFactory.cpp:
2966         (WebCore::createScriptCallStack):
2967         * bindings/v8/ScriptCallStackFactory.h:
2968         * inspector/InspectorInstrumentation.cpp:
2969         (WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
2970         * inspector/InspectorInstrumentation.h:
2971         (WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
2972         * inspector/WorkerInspectorController.h:
2973         (WebCore::WorkerInspectorController::hasFrontend):
2974         * page/Console.cpp:
2975         * page/Console.h:
2976
2977 2011-12-02  Gavin Peters  <gavinp@chromium.org>
2978
2979         Remove instrumentation tracking a fixed bug
2980         https://bugs.webkit.org/show_bug.cgi?id=73471
2981
2982         The underlying bug is fixed (bug 72068), and this instrumentation was intrusive and using
2983         memory, plus the conditional compilation made me sad.
2984
2985         Reviewed by Nate Chapin.
2986
2987         No new tests.
2988
2989         * dom/ScriptElement.cpp:
2990         (WebCore::ScriptElement::ScriptElement):
2991         (WebCore::ScriptElement::requestScript):
2992         (WebCore::ScriptElement::stopLoadRequest):
2993         (WebCore::ScriptElement::notifyFinished):
2994         * dom/ScriptElement.h:
2995         * dom/ScriptRunner.cpp:
2996         (WebCore::ScriptRunner::queueScriptForExecution):
2997
2998 2011-12-02  Vsevolod Vlasov  <vsevik@chromium.org>
2999
3000         Web Inspector: Split view works weirdly in network panel when resizing, showing/hiding main element.
3001         https://bugs.webkit.org/show_bug.cgi?id=73650
3002
3003         Reviewed by Pavel Feldman.
3004
3005         * inspector/front-end/SplitView.js:
3006         (WebInspector.SplitView.prototype._updateResizer):
3007         (WebInspector.SplitView.prototype.hideMainElement):
3008         (WebInspector.SplitView.prototype.showMainElement):
3009         (WebInspector.SplitView.prototype.onResize):
3010         (WebInspector.SplitView.prototype._restoreSidebarWidth):
3011
3012 2011-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
3013
3014         Unreviewed, rolling out r101783.
3015         http://trac.webkit.org/changeset/101783
3016         https://bugs.webkit.org/show_bug.cgi?id=73652
3017
3018         Broke chromium win build. (Requested by vsevik on #webkit).
3019
3020         * WebCore.gyp/WebCore.gyp:
3021         * WebCore.gyp/scripts/action_derivedsourcesallinone.py:
3022         (main):
3023         * WebCore.gypi:
3024         * bindings/scripts/generate-bindings.pl:
3025         * page/DOMWindow.idl:
3026         * webaudio/DOMWindowWebAudio.idl: Removed.
3027
3028 2011-11-28  Alexander Pavlov  <apavlov@chromium.org>
3029
3030         Inline non-replaced elements are reported to have zero width and height
3031         https://bugs.webkit.org/show_bug.cgi?id=61117
3032
3033         Reviewed by Antti Koivisto.
3034
3035         According to http://www.w3.org/TR/CSS21/visudet.html, the "width" and "height" properties
3036         do not apply for inline non-replaced elements and should have their initial value of "auto"
3037         as their computed values.
3038
3039         * css/CSSComputedStyleDeclaration.cpp:
3040         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3041
3042 2011-12-02  Sami Kyostila  <skyostil@chromium.org>
3043
3044         [chromium] Make CCInputHandler scrolling stateful
3045         https://bugs.webkit.org/show_bug.cgi?id=73345
3046
3047         This change makes the scrolling part of CCInputHandler stateful by
3048         replacing scrollRootLayer() with scrollBegin(), scrollBy() and
3049         scrollEnd(). This is done in preparation for scrollable sublayers.
3050         Specifically, scrollBegin() will allow CCLayerTreeHostImpl to perform
3051         input event hit testing to find the layer to be scrolled.
3052
3053         Reviewed by Steve Block.
3054
3055         Tested in CCLayerTreeHostImplTest.
3056
3057         * platform/graphics/chromium/cc/CCInputHandler.h:
3058         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3059         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3060         (WebCore::CCLayerTreeHostImpl::currentTimeMs):
3061         (WebCore::CCLayerTreeHostImpl::setNeedsRedraw):
3062         (WebCore::findInnermostScrollableLayerAtPoint):
3063         (WebCore::CCLayerTreeHostImpl::scrollBegin):
3064         (WebCore::CCLayerTreeHostImpl::scrollBy):
3065         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3066
3067 2011-12-02  Kentaro Hara  <haraken@chromium.org>
3068
3069         Use the [Supplemental] IDL for webaudio attributes in Chromium
3070         https://bugs.webkit.org/show_bug.cgi?id=73394
3071
3072         Reviewed by Adam Barth.
3073
3074         - Overview: Using the [Supplemental] IDL, this patch moves the attribute
3075         declarations of webaudio from DOMWindow.idl into a new IDL file
3076         webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained
3077         feature (aka a module).
3078
3079         - This patch changes the build flow of WebCore.gyp as follows:
3080
3081             Previous build flow:
3082                 foreach $idl (all IDL files) {
3083                     generate-bindings.pl depends on $idl;
3084                     generate-bindings.pl reads $idl;
3085                     generate-bindings.pl generates .h and .cpp files for $idl;
3086                 }
3087
3088             New build flow (See the discussions in bug 72138 for more details):
3089                 resolve-supplemental.pl depends on all IDL files;
3090                 resolve-supplemental.pl reads all IDL files;
3091                 resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
3092                 resolve-supplemental.pl outputs supplemental_dependency.tmp;
3093                 foreach $idl (all IDL files) {
3094                     generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
3095                     generate-bindings.pl reads $idl;
3096                     generate-bindings.pl reads supplemental_dependency.tmp;
3097                     generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl;
3098                 }
3099
3100         - This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL
3101         will be removed after build scripts for all platforms support the [Supplemental] IDL.
3102         The motivation for the [Supplemented] IDL is as follows:
3103
3104         In order to support the [Supplemental] IDL, we need to
3105         (1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
3106         (2) and run generate-bindings.pl with the supplemental_dependency.tmp.
3107
3108         This build flow requires a change on the following build scripts,
3109         but changing all the build scripts all at once without any regression is too difficult:
3110
3111             - DerivedSources.make
3112             - DerivedSources.pri
3113             - GNUmakefile.am
3114             - PlatformBlackBerry.cmake
3115             - UseJSC.cmake
3116             - UseV8.cmake
3117             - WebCore.vcproj/MigrateScripts
3118             - WebCore.vcproj/WebCore.vcproj
3119             - bindings/gobject/GNUmakefile.am
3120             - WebCore.gyp/WebCore.gyp
3121
3122         Thus, we are planning to change the build scripts one by one, which implies that
3123         we need to allow the temporary state in which some build scripts support [Supplemental] IDL
3124         but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
3125         The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
3126         in another IDL file somewhere, like this:
3127
3128             DOMWindowWebAudio.idl:
3129                 interface [
3130                     Supplemental=DOMWindow
3131                 ] DOMWindowWebAudio {
3132                     attribute attr1;
3133                     attribute attr2;
3134                 };
3135
3136             DOMWindow.idl:
3137                 interface [
3138                 ] DOMWindow {
3139                     attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL
3140                     attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL.
3141                     attribute attr3;
3142                     attribute attr4;
3143                 };
3144
3145         Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:
3146
3147             - If a given build script supports the [Supplemental] IDL,
3148             generate-bindings.pl ignores all attributes with the [Supplemented] IDL.
3149             - Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
3150             as normal attributes and instead ignores all attributes with the [Supplemental] IDL
3151             (i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).
3152
3153         Tests: webaudio/*
3154
3155         * WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.
3156         * WebCore.gyp/scripts/action_derivedsourcesallinone.py:
3157         (main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file.
3158         * WebCore.gypi: Added DOMWindowWebAudio.idl.
3159         * bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL.
3160         * page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL.
3161         * webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.
3162
3163 2011-12-02  Vsevolod Vlasov  <vsevik@chromium.org>
3164
3165         Web Inspector: Network panel row highlighting does not work.
3166         https://bugs.webkit.org/show_bug.cgi?id=73644
3167
3168         Reviewed by Pavel Feldman.
3169
3170         * inspector/front-end/networkLogView.css:
3171         (.network-log-grid tr.highlighted-row):
3172         (from):
3173         (to):
3174
3175 2011-12-02  Pavel Feldman  <pfeldman@google.com>
3176
3177         Not reviewed: remove console.timeStamp from the inspector backend dispatcher.
3178
3179         * inspector/front-end/InspectorBackend.js:
3180         (InspectorBackendClass.prototype.sendMessageObjectToBackend):
3181
3182 2011-12-02  Hajime Morrita  <morrita@chromium.org>
3183
3184         Unreviewed, rolling out r101751 and r101775.
3185         http://trac.webkit.org/changeset/101751
3186         http://trac.webkit.org/changeset/101775
3187         https://bugs.webkit.org/show_bug.cgi?id=73191
3188
3189         breaks Windows build
3190
3191         * ForwardingHeaders/runtime/JSExportMacros.h: Removed.
3192         * ForwardingHeaders/wtf/ExportMacros.h: Removed.
3193         * WebCore.vcproj/QTMovieWinCommon.vsprops:
3194         * WebCore.xcodeproj/project.pbxproj:
3195         * config.h:
3196         * platform/PlatformExportMacros.h: Removed.
3197
3198 2011-12-02  Pavel Feldman  <pfeldman@google.com>
3199
3200         Web Inspector: introduce backend stub generation from JSON for the standalone development / remote front-ends.
3201         https://bugs.webkit.org/show_bug.cgi?id=73636
3202
3203         Reviewed by Yury Semikhatsky.
3204
3205         * inspector/front-end/DOMStorage.js:
3206         * inspector/front-end/Database.js:
3207         * inspector/front-end/InspectorBackend.js:
3208         (InspectorBackendClass):
3209         (InspectorBackendClass.prototype.registerCommand):
3210         (InspectorBackendClass.prototype.registerEvent):
3211         (InspectorBackendClass.prototype.runAfterPendingDispatches):
3212         (InspectorBackendClass.prototype.loadFromJSONIfNeeded):
3213         * inspector/front-end/TimelineManager.js:
3214         * inspector/front-end/inspector.js:
3215
3216 2011-12-02  MORITA Hajime  <morrita@google.com>
3217
3218         Unreviewed, another attempt to build fix for r101751:
3219         Adding an include path to make PlatformExportMacros.h visibile from QTMovieWin.
3220
3221         * WebCore.vcproj/QTMovieWinCommon.vsprops:
3222
3223 2011-12-02  Hajime Morrita  <morrita@chromium.org>
3224
3225         Unreviewed, rolling out r101772.
3226         http://trac.webkit.org/changeset/101772
3227
3228         It didn't fix the build failure
3229
3230         * WebCore.vcproj/QTMovieWinCommon.vsprops:
3231
3232 2011-12-02  MORITA Hajime  <morrita@google.com>
3233
3234         Unreviewed attempt to build fix for r101751:
3235         Adding an include path to make PlatformExportMacros.h visibile from QTMovieWin.
3236
3237         * WebCore.vcproj/QTMovieWinCommon.vsprops:
3238
3239 2011-12-01  Andrey Kosyakov  <caseq@chromium.org>
3240
3241         Web Inspector: [Extensions API] pass preferred resource line number to extension's open resource handler
3242         https://bugs.webkit.org/show_bug.cgi?id=73084
3243
3244         Reviewed by Pavel Feldman.
3245
3246         * inspector/front-end/ExtensionAPI.js:
3247         (injectedExtensionAPI.Panels.prototype.setOpenResourceHandler.else.callbackWrapper):
3248         (injectedExtensionAPI.Panels.prototype.setOpenResourceHandler):
3249         * inspector/front-end/ExtensionServer.js:
3250         (WebInspector.ExtensionServer.prototype._handleOpenURL):
3251         * inspector/front-end/HandlerRegistry.js:
3252         (get WebInspector.HandlerRegistry.prototype.set dispatch):
3253         * inspector/front-end/JavaScriptSourceFrame.js:
3254         (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
3255         * inspector/front-end/ResourcesPanel.js:
3256         (WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent):
3257         * inspector/front-end/SourceFrame.js:
3258         (WebInspector.SourceFrame.prototype.populateLineGutterContextMenu):
3259         (WebInspector.SourceFrame.prototype.populateTextAreaContextMenu):
3260         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateLineGutterContextMenu):
3261         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateTextAreaContextMenu):
3262         * inspector/front-end/TextViewer.js:
3263         (WebInspector.TextViewer.prototype._contextMenu):
3264         (WebInspector.TextViewerDelegate.prototype.populateLineGutterContextMenu):
3265         (WebInspector.TextViewerDelegate.prototype.populateTextAreaContextMenu):
3266         * inspector/front-end/externs.js:
3267         (WebInspector.populateResourceContextMenu):
3268         * inspector/front-end/inspector.js:
3269         (WebInspector.populateResourceContextMenu):
3270         (WebInspector._showAnchorLocation):
3271
3272 2011-12-01  Nayan Kumar K  <nayankk@motorola.com>
3273
3274         [GTK] Add compilation options to enable/disable Accelerated Compositing and to choose texture mapper implementation.
3275         https://bugs.webkit.org/show_bug.cgi?id=73458
3276
3277         Reviewed by Martin Robinson.
3278
3279         No new tests added as this patch doesn't affect any functionality.
3280
3281         * GNUmakefile.am: Guard the include files.
3282         * GNUmakefile.list.am: Guard the compilation of few files.
3283         * platform/graphics/GraphicsLayer.h: Guard the typedef of GraphicsLayer.
3284
3285 2011-12-01  Andrey Kosyakov  <caseq@chromium.org>
3286
3287         Web Inspector: use object properties, not element attributes to pass preferred panel/line/request id in linkified anchors
3288         https://bugs.webkit.org/show_bug.cgi?id=73556
3289
3290         Reviewed by Pavel Feldman.
3291
3292         * inspector/front-end/AuditFormatters.js:
3293         (WebInspector.AuditFormatters.resourceLink):
3294         * inspector/front-end/ConsoleMessage.js:
3295         (WebInspector.ConsoleMessageImpl.prototype._formatMessage.else.else.linkifier):
3296         (WebInspector.ConsoleMessageImpl.prototype._formatMessage):
3297         * inspector/front-end/DebuggerPresentationModel.js:
3298         (WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyLocation):
3299         (WebInspector.DebuggerPresentationModel.Linkifier.prototype._updateAnchor):
3300         * inspector/front-end/NetworkPanel.js:
3301         (WebInspector.NetworkPanel.prototype._resourceByAnchor):
3302         (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell):
3303         * inspector/front-end/ResourceUtils.js:
3304         (WebInspector.linkifyStringAsFragment):
3305         (WebInspector.linkifyResourceAsNode):
3306         (WebInspector.linkifyRequestAsNode):
3307         * inspector/front-end/ResourcesPanel.js:
3308         (WebInspector.ResourcesPanel.prototype.showAnchorLocation):
3309         * inspector/front-end/inspector.js:
3310         (WebInspector._showAnchorLocation):
3311
3312 2011-12-02  Pavel Feldman  <pfeldman@google.com>
3313
3314         Web Inspector: refactor InspectorBackendDispatcher so that it does not use JSON-serialized command templates.
3315         https://bugs.webkit.org/show_bug.cgi?id=73569
3316
3317         Reviewed by Yury Semikhatsky.
3318
3319         * inspector/CodeGeneratorInspector.py:
3320         (Generator.process_command):
3321         * inspector/Inspector.json:
3322         * inspector/front-end/InspectorBackend.js:
3323         (InspectorBackendClass.prototype._wrap.callback):
3324         (InspectorBackendClass.prototype._wrap):
3325         (InspectorBackendClass.prototype.registerCommand):
3326         (InspectorBackendClass.prototype._invoke):
3327         (InspectorBackendClass.prototype._sendMessageToBackend):
3328         (InspectorBackendClass.prototype._wrapCallbackAndSendMessageObject):
3329
3330 2011-12-02  Yosifumi Inoue  <yosin@chromium.org>
3331
3332         Range sliders and spin buttons don't work with multi-columns.
3333         https://bugs.webkit.org/show_bug.cgi?id=70898
3334
3335         Reviewed by Dan Bernstein.
3336
3337         This patch makes RenderBlock::hitTestColumns and
3338         RenderBoxModelObject::mapAbsoluteToLocal to handle point
3339         in multi-column same logic.
3340
3341         In multi-column, coordinate of box model rendering object is different
3342         from absolute coordinate.. Columns in box model rendering object spans
3343         vertically rather than horizontally.
3344
3345         When absolute point is represented in (column[i]+dx, column[0]+dy),
3346         it is (column[0]+dx, column[0] + columnHeight + dy) in box model
3347         rendering object coordinate.
3348
3349         Tests: fast/events/document-elementFromPoint.html
3350                fast/events/offsetX-offsetY.html
3351                fast/forms/number/spin-in-multi-column.html
3352                fast/forms/range/slider-in-multi-column.html
3353                fast/forms/select/listbox-in-multi-column.html
3354
3355         * rendering/RenderBlock.cpp:
3356         (WebCore::ColumnRectIterator::ColumnRectIterator): Added
3357         (WebCore::ColumnRectIterator::advance): Added
3358         (WebCore::ColumnRectIterator::columnRect): Added
3359         (WebCore::ColumnRectIterator::hasMore): Added
3360         (WebCore::ColumnRectIterator::adjust): Added
3361         (WebCore::ColumnRectIterator::update): Added
3362         (WebCore::RenderBlock::hitTestColumns): Use ColumnRectIterator.
3363         (WebCore::RenderBlock::adjustForColumnRect): Added
3364         * rendering/RenderBlock.h: Add adjustForColumnRect.
3365         * rendering/RenderBox.cpp:
3366         (WebCore::RenderBox::mapAbsoluteToLocalPoint): Call RenderBoxModelObject::mapAbsoluteToLocalPoint.
3367         * rendering/RenderBoxModelObject.cpp:
3368         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint): Move from RenderInline::mapAbsoluteToLocalPoint and call RenderBlock::adjustForColumnRect.
3369         * rendering/RenderBoxModelObject.h: add mapAbsoluteToLocalPoint.
3370         * rendering/RenderInline.cpp: Move mapAbsoluteToLocalPoint to RenderBoxModelObject.
3371         * rendering/RenderInline.h: remove mapAbsoluteToLocalPoint.
3372
3373 2011-12-02  Pavel Feldman  <pfeldman@google.com>
3374
3375         InspectorController destruction order leads to use-after-free
3376         https://bugs.webkit.org/show_bug.cgi?id=73582
3377
3378         Reviewed by Yury Semikhatsky.
3379
3380         * inspector/InspectorBaseAgent.h:
3381         (WebCore::InspectorBaseAgentInterface::discardAgent):
3382         * inspector/InspectorCSSAgent.cpp:
3383         (WebCore::InspectorCSSAgent::~InspectorCSSAgent):
3384         (WebCore::InspectorCSSAgent::discardAgent):
3385         * inspector/InspectorCSSAgent.h:
3386         * inspector/InspectorController.cpp:
3387         (WebCore::InspectorController::~InspectorController):
3388         * inspector/InspectorDOMDebuggerAgent.cpp:
3389         (WebCore::InspectorDOMDebuggerAgent::~InspectorDOMDebuggerAgent):
3390         (WebCore::InspectorDOMDebuggerAgent::discardAgent):
3391         * inspector/InspectorDOMDebuggerAgent.h:
3392
3393 2011-12-02  Leo Yang  <leo.yang@torchmobile.com.cn>
3394
3395         image element with src attribute can't be replaced by content: url() style
3396         https://bugs.webkit.org/show_bug.cgi?id=42840
3397
3398         ImageLoader were updating renderer even if the renderer's image is
3399         style generated content. This was wrong because if an image element
3400         with src attribute and style="content: url(...)" attribute the
3401         src image might override content image. The correct behavior should
3402         be showing content image.
3403
3404         This patch is differentiating style generated RenderImage from the
3405         normal RenderImage and keeps the RenderImageSource untouched if the
3406         renderer is generated content.
3407
3408         Reviewed by Darin Adler.
3409
3410         Test: fast/images/image-css3-content-data.html
3411
3412         * loader/ImageLoader.cpp:
3413         (WebCore::ImageLoader::renderImageResource):
3414         * rendering/RenderImage.cpp:
3415         (WebCore::RenderImage::RenderImage):
3416         * rendering/RenderImage.h:
3417         (WebCore::RenderImage::setIsGeneratedContent):
3418         (WebCore::RenderImage::isGeneratedContent):
3419         * rendering/RenderObject.cpp:
3420         (WebCore::RenderObject::createObject):
3421
3422 2011-12-01  David Levin  <levin@chromium.org>
3423
3424         Add a way to automatically size a single frame to fit its content.
3425         https://bugs.webkit.org/show_bug.cgi?id=73420
3426
3427         Reviewed by Dmitry Titov.
3428
3429         No new functionality exposed so no new tests. (There is a Chromium
3430         specific test in https://bugs.webkit.org/show_bug.cgi?id=73058.)
3431
3432         * page/FrameView.cpp:
3433         (WebCore::FrameView::FrameView): Initialized the new variables.
3434         (WebCore::FrameView::layout):
3435         (WebCore::FrameView::autoSizeIfEnabled):
3436         (WebCore::FrameView::enableAutoSizeMode):
3437         * page/FrameView.h:
3438
3439 2011-12-01  Hajime Morrita  <morrita@chromium.org>
3440
3441         JS_INLINE and WTF_INLINE should be visible from WebCore
3442         https://bugs.webkit.org/show_bug.cgi?id=73191
3443
3444         Reviewed by Kevin Ollivier.
3445
3446         - Moved export related definitions from config.h
3447           to ExportMacros.h, JSExportMacros.h and PlatformExportMacros.h
3448         - Added forwarding headers which are referred from config.h
3449
3450         No new tests. Only build related changes.
3451
3452         * ForwardingHeaders/runtime/JSExportMacros.h: Added.
3453         * ForwardingHeaders/wtf/ExportMacros.h: Added.
3454         * WebCore.xcodeproj/project.pbxproj:
3455         * config.h:
3456         * platform/PlatformExportMacros.h: Copied from Source/JavaScriptCore/wtf/ExportMacros.h.
3457
3458 2011-12-01  Jon Lee  <jonlee@apple.com>
3459
3460         [WK2] Add further support for notifications
3461         https://bugs.webkit.org/show_bug.cgi?id=73572
3462         <rdar://problem/10472195>
3463
3464         Reviewed by Darin Adler.
3465
3466         * WebCore.exp.in: Export constructor and dispatch functions
3467         * dom/EventNames.h: Add show event.
3468         * notifications/Notification.cpp:
3469         (WebCore::Notification::show): For the Mac platform, we just forward the show() call to the
3470         notification client and update the state, because we cannot get synchronous acknowledgment that the
3471         notification got delivered.
3472         (WebCore::Notification::dispatchShowEvent): Create simple events and dispatch to the notification.
3473         (WebCore::Notification::dispatchClickEvent): Ditto.
3474         (WebCore::Notification::dispatchCloseEvent): Ditto.
3475         (WebCore::Notification::dispatchErrorEvent): Ditto.
3476         * notifications/Notification.h: Add dispatch functions.
3477         * notifications/Not