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