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