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