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