Remove [LegacyParent] from CodeGeneratorGObject.pm, and rename it to [JSLegacyParent]
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-02-03  Kentaro Hara  <haraken@chromium.org>
2
3         Remove [LegacyParent] from CodeGeneratorGObject.pm, and rename it to [JSLegacyParent]
4         https://bugs.webkit.org/show_bug.cgi?id=77706
5
6         Reviewed by Adam Barth.
7
8         This patch removes dead code about [LegacyParent] from CodeGeneratorGObject.pm,
9         and renames [LegacyParent] to [JSLegacyParent].
10
11         No tests. No changes in behavior.
12
13         * bindings/scripts/CodeGeneratorGObject.pm:
14         (Generate):
15         * bindings/scripts/CodeGeneratorJS.pm:
16         (GetParentClassName):
17         (GenerateHeader):
18         (GenerateImplementation):
19         * page/DOMWindow.idl:
20         * workers/WorkerContext.idl:
21
22 2012-02-03  Pavel Feldman  <pfeldman@google.com>
23
24         Web Inspector: preserve elements panel selection upon node drag'n'drop
25         https://bugs.webkit.org/show_bug.cgi?id=77722
26
27         Reviewed by Vsevolod Vlasov.
28
29         Test: inspector/elements/move-node.html
30
31         * inspector/front-end/DOMAgent.js:
32         (WebInspector.DOMAgent.prototype._markRevision):
33         * inspector/front-end/ElementsTreeOutline.js:
34         (WebInspector.ElementsTreeOutline.prototype._ondrop):
35         (WebInspector.ElementsTreeOutline.prototype._doMove.callback):
36         (WebInspector.ElementsTreeOutline.prototype._doMove):
37
38 2012-02-03  Shinya Kawanaka  <shinyak@google.com>
39
40        Reimplement DETAILS and SUMMARY using selector query.
41         https://bugs.webkit.org/show_bug.cgi?id=75930
42
43         Reviewed by Hajime Morita.
44
45         DETAILS is reimplemented using content element and its fallback feature.
46         We don't need to recreate DOM even if SUMMARY is removed from or added into DETAILS.
47
48         No new tests, should be covered by existing tests.
49
50         * html/HTMLDetailsElement.cpp:
51         (WebCore::DetailsSummaryElement::fallbackSummary):
52           Takes fallback element of content summary.
53         (DetailsSummaryElement):
54         (WebCore::DetailsSummaryElement::create):
55           Creates a fallback element also.
56         (WebCore):
57         (WebCore::HTMLDetailsElement::create):
58         (WebCore::HTMLDetailsElement::HTMLDetailsElement):
59         (WebCore::HTMLDetailsElement::createShadowSubtree):
60         (WebCore::HTMLDetailsElement::findMainSummary):
61         (WebCore::HTMLDetailsElement::parseMappedAttribute):
62         (WebCore::HTMLDetailsElement::childShouldCreateRenderer):
63         (WebCore::HTMLDetailsElement::toggleOpen):
64         * html/HTMLDetailsElement.h:
65         (HTMLDetailsElement):
66         * html/HTMLSummaryElement.cpp:
67         (WebCore::HTMLSummaryElement::isMainSummary):
68
69 2012-02-03  Jochen Eisinger  <jochen@chromium.org>
70
71         Crash when trying to add a timer to a detached document.
72         https://bugs.webkit.org/show_bug.cgi?id=77692
73
74         Reviewed by Alexey Proskuryakov.
75
76         In http://webkit.org/b/77370, a timer is fired on a detached document.
77         Since a document clears all timers when it is detached, and it
78         shouldn't be possible to add a timer to a detached document, we crash
79         if this should happen anyway. This will hopefully result in an easier
80         to debug crash dump.
81
82         * page/DOMTimer.cpp:
83         (WebCore::DOMTimer::DOMTimer):
84
85 2012-02-03  Shinya Kawanaka  <shinyak@google.com>
86
87         Stop calling Element::ensureShadowRoot in Internals.
88         https://bugs.webkit.org/show_bug.cgi?id=77612
89
90         Reviewed by Hajime Morita.
91
92         We want to check a shadow root is built-in or created by users to support multiple shadow subtrees.
93         But Element::ensureShadowRoot() makes it difficult, because it doesn't care about the returning shadow element
94         is built-in or user generated, so let's remove Element::ensureShadowRoot().
95
96         As a first step, this patch removes ensureShadowRoot() in Internals.
97
98         No new tests, because no changes in behavior.
99
100         * WebCore.exp.in:
101         * testing/Internals.cpp:
102         (WebCore::Internals::ensureShadowRoot):
103
104 2012-02-02  Alexei Filippov  <alexeif@chromium.org>
105
106         Web Inspector: Always show percents together with counters in heap inspector.
107         https://bugs.webkit.org/show_bug.cgi?id=77434
108
109         Reviewed by Pavel Feldman.
110
111         * inspector/front-end/DetailedHeapshotGridNodes.js:
112         (WebInspector.HeapSnapshotGridNode.prototype._toPercentString):
113         (WebInspector.HeapSnapshotGridNode.prototype._createValueCell):
114         (WebInspector.HeapSnapshotGenericObjectNode.prototype.createCell):
115         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
116         (WebInspector.HeapSnapshotConstructorNode.prototype.createCell):
117         (WebInspector.HeapSnapshotConstructorNode.prototype.get data):
118         (WebInspector.HeapSnapshotDiffNode.prototype.get data):
119         * inspector/front-end/DetailedHeapshotView.js:
120         (WebInspector.HeapSnapshotContainmentDataGrid):
121         (WebInspector.HeapSnapshotConstructorsDataGrid):
122         (WebInspector.HeapSnapshotDiffDataGrid):
123         (WebInspector.HeapSnapshotDominatorsDataGrid):
124         (WebInspector.DetailedHeapshotView.prototype._mouseDownInContentsGrid):
125         (WebInspector.DetailedHeapshotView.prototype.get _isShowingAsPercent):
126         (WebInspector.DetailedHeapshotView.prototype._percentClicked):
127         * inspector/front-end/heapProfiler.css:
128         (.detailed-heapshot-view .data-grid span.percent-column):
129
130 2012-02-02  Matt Falkenhagen  <falken@chromium.org>
131
132         Use content-language from http-equiv to set document locale and font
133         https://bugs.webkit.org/show_bug.cgi?id=76701
134
135         Reviewed by Darin Adler.
136
137         So far, only content-language set through http-equiv is used; the HTTP Content-Language
138         header is not yet supported.
139
140         Tests: fast/text/content-language-case-insensitivity.html
141                fast/text/content-language-mapped-to-webkit-locale.html
142                fast/text/international/content-language-font-selection-expected.html
143                fast/text/international/content-language-font-selection.html
144                fast/text/international/content-language-with-subtags-expected.html
145                fast/text/international/content-language-with-subtags.html
146
147         * css/CSSStyleSelector.cpp:
148         (WebCore::CSSStyleSelector::styleForDocument): Use content language when selecting initial font.
149         * dom/Document.cpp:
150         (WebCore::Document::setContentLanguage): Recalculate style so language is taken into account.
151         (WebCore):
152         * dom/Document.h:
153         (Document):
154
155 2012-02-02  Sheriff Bot  <webkit.review.bot@gmail.com>
156
157         Unreviewed, rolling out r106620.
158         http://trac.webkit.org/changeset/106620
159         https://bugs.webkit.org/show_bug.cgi?id=77716
160
161         It broke non ENABLE(3D_RENDERING) builds (Requested by
162         Ossy_morning on #webkit).
163
164         * GNUmakefile.list.am:
165         * Target.pri:
166         * WebCore.gypi:
167         * platform/graphics/GraphicsContext.h:
168         (WebCore):
169         (GraphicsContext):
170         * platform/graphics/cairo/TextureMapperCairo.cpp:
171         (WebCore::TextureMapper::create):
172         (WebCore):
173         * platform/graphics/opengl/TextureMapperGL.cpp:
174         (Entry):
175         (DirectlyCompositedImageRepository):
176         (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::findOrCreate):
177         (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::deref):
178         (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::DirectlyCompositedImageRepository):
179         (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::~DirectlyCompositedImageRepository):
180         (TextureMapperGLData):
181         (BitmapTextureGL):
182         (WebCore::BitmapTextureGL::isOpaque):
183         (WebCore::BitmapTextureGL::pack):
184         (WebCore::BitmapTextureGL::unpack):
185         (WebCore::BitmapTextureGL::isPacked):
186         (WebCore::BitmapTextureGL::BitmapTextureGL):
187         (WebCore::TextureMapperGL::beginPainting):
188         (WebCore::BitmapTextureGL::reset):
189         (WebCore::BitmapTextureGL::beginPaint):
190         (WebCore::BitmapTextureGL::endPaint):
191         (WebCore):
192         (WebCore::BitmapTextureGL::updateContents):
193         (WebCore::BitmapTextureGL::updateRawContents):
194         (WebCore::BitmapTextureGL::setContentsToImage):
195         (WebCore::BitmapTextureGL::destroy):
196         (WebCore::TextureMapperGL::bindSurface):
197         * platform/graphics/opengl/TextureMapperGL.h:
198         (TextureMapperGL):
199         (WebCore::TextureMapperGL::allowSurfaceForRoot):
200         (BGRA32PremultimpliedBuffer):
201         (WebCore::BGRA32PremultimpliedBuffer::~BGRA32PremultimpliedBuffer):
202         (WebCore):
203         * platform/graphics/qt/GraphicsContext3DQt.cpp:
204         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
205         * platform/graphics/qt/GraphicsContextQt.cpp:
206         * platform/graphics/qt/TextureMapperQt.cpp: Added.
207         (WebCore):
208         (WebCore::BitmapTextureQt::destroy):
209         (WebCore::BitmapTextureQt::reset):
210         (WebCore::BitmapTextureQt::beginPaint):
211         (WebCore::BitmapTextureQt::endPaint):
212         (WebCore::BitmapTextureQt::updateContents):
213         (WebCore::BitmapTextureQt::save):
214         (WebCore::BitmapTextureQt::setContentsToImage):
215         (WebCore::BitmapTextureQt::pack):
216         (WebCore::BitmapTextureQt::unpack):
217         (WebCore::TextureMapperQt::beginClip):
218         (WebCore::TextureMapperQt::endClip):
219         (WebCore::TextureMapperQt::viewportSize):
220         (WebCore::TextureMapperQt::TextureMapperQt):
221         (WebCore::TextureMapperQt::setGraphicsContext):
222         (WebCore::TextureMapperQt::graphicsContext):
223         (WebCore::TextureMapperQt::bindSurface):
224         (WebCore::TextureMapperQt::drawTexture):
225         (WebCore::TextureMapper::create):
226         (WebCore::TextureMapperQt::createTexture):
227         (WebCore::BitmapTextureQt::BitmapTextureQt):
228         (WebCore::TextureMapperQt::beginPainting):
229         (WebCore::TextureMapperQt::endPainting):
230         (BGRA32PremultimpliedBufferQt):
231         (WebCore::BGRA32PremultimpliedBufferQt::beginPaint):
232         (WebCore::BGRA32PremultimpliedBufferQt::endPaint):
233         (WebCore::BGRA32PremultimpliedBufferQt::data):
234         (WebCore::BGRA32PremultimpliedBuffer::create):
235         (WebCore::uidForImage):
236         * platform/graphics/qt/TextureMapperQt.h: Added.
237         (WebCore):
238         (BitmapTextureQt):
239         (WebCore::BitmapTextureQt::~BitmapTextureQt):
240         (WebCore::BitmapTextureQt::size):
241         (WebCore::BitmapTextureQt::isValid):
242         (WebCore::BitmapTextureQt::sourceRect):
243         (WebCore::BitmapTextureQt::isPacked):
244         (WebCore::BitmapTextureQt::painter):
245         (TextureMapperQt):
246         (WebCore::TextureMapperQt::allowSurfaceForRoot):
247         (WebCore::TextureMapperQt::initialize):
248         (WebCore::TextureMapperQt::create):
249         (WebCore::TextureMapperQt::currentPainter):
250         * platform/graphics/texmap/TextureMapper.cpp:
251         * platform/graphics/texmap/TextureMapper.h:
252         (WebCore::BitmapTexture::BitmapTexture):
253         (WebCore::BitmapTexture::allowOfflineTextureUpload):
254         (BitmapTexture):
255         (WebCore::BitmapTexture::pack):
256         (WebCore::BitmapTexture::unpack):
257         (WebCore::BitmapTexture::isPacked):
258         (WebCore::BitmapTexture::updateRawContents):
259         (WebCore::BitmapTexture::beginPaintMedia):
260         (WebCore::BitmapTexture::save):
261         (WebCore::BitmapTexture::lock):
262         (WebCore::BitmapTexture::unlock):
263         (WebCore::BitmapTexture::isLocked):
264         (TextureMapper):
265         (WebCore::TextureMapper::viewportSize):
266         (WebCore::TextureMapper::setViewportSize):
267         (WebCore::TextureMapper::allowPartialUpdates):
268         (WebCore::TextureMapper::isOpenGLBacked):
269         (WebCore::TextureMapper::setTransform):
270         (WebCore::TextureMapper::transform):
271         * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Removed.
272         * platform/graphics/texmap/TextureMapperImageBuffer.h: Removed.
273         * platform/graphics/texmap/TextureMapperNode.cpp:
274         (WebCore::TextureMapperNode::renderContent):
275         (WebCore::TextureMapperNode::setContentsTileBackBuffer):
276         * platform/graphics/texmap/TextureMapperNode.h:
277         (TextureMapperNode):
278
279 2012-02-02  Keishi Hattori  <keishi@webkit.org>
280
281         ColorInputType needs to use ensureInlineStyleDecl
282         https://bugs.webkit.org/show_bug.cgi?id=77699
283
284         Reviewed by Kent Tamura.
285
286         Because WebCore internally should use the more specific CSSMutableStyleDeclaration
287         http://trac.webkit.org/changeset/105739
288
289         * html/ColorInputType.cpp:
290         (WebCore::ColorInputType::updateColorSwatch):
291
292 2012-02-02  Roland Steiner  <rolandsteiner@chromium.org>
293
294         Simplify SelectorChecker::checkSelector and checkOneSelector
295         https://bugs.webkit.org/show_bug.cgi?id=77697
296
297         Make use of Element::previous/nextElementSibling.
298         Made those methods inline.
299         Simplify code in checkSelector and checkOneSelector, esp. for first/nth/nth-last/last/only-child implementations.
300
301         Reviewed by Andreas Kling.
302
303         No new tests. (refactoring)
304
305         * css/SelectorChecker.cpp:
306         (WebCore::SelectorChecker::checkSelector):
307         (WebCore::SelectorChecker::checkOneSelector):
308         * dom/Element.cpp:
309         * dom/Element.h:
310         (WebCore::Element::previousElementSibling):
311         (WebCore):
312         (WebCore::Element::nextElementSibling):
313
314 2012-02-02  Keishi Hattori  <keishi@webkit.org>
315
316         ColorChooserClient is missing a virtual destructor
317         https://bugs.webkit.org/show_bug.cgi?id=77698
318
319         Reviewed by Kent Tamura.
320
321         * platform/ColorChooserClient.h:
322         (WebCore::ColorChooserClient::~ColorChooserClient): Added.
323
324 2012-02-02  Keishi Hattori  <keishi@webkit.org>
325
326         Remove OVERRIDE from ColorInputType::valueAsColor
327         https://bugs.webkit.org/show_bug.cgi?id=77701
328
329         Reviewed by Kent Tamura.
330
331         * html/ColorInputType.h:
332         (WebCore::ColorInputType::valueAsColor):
333
334 2012-02-02  Bear Travis  <betravis@adobe.com>
335
336         Support 'disabled' attribute on SVGStyleElement
337         https://bugs.webkit.org/show_bug.cgi?id=52130
338
339         Adding disabled property to SVGStyleElement, which
340         mirrors the functionality added to HTMLStyleElement
341         for DOM1. The disabled property reflects and sets
342         the disabled state of its style sheet.
343
344         Based off of patch for bug 25287
345
346         Reviewed by Dirk Schulze.
347
348         Test: svg/dom/SVGStyleElement/disable-svg-style-element.html
349
350         * svg/SVGStyleElement.cpp:
351         (WebCore::SVGStyleElement::disabled):
352         (WebCore):
353         (WebCore::SVGStyleElement::setDisabled):
354         * svg/SVGStyleElement.h:
355         (SVGStyleElement):
356         * svg/SVGStyleElement.idl:
357
358 2012-02-02  Hayato Ito  <hayato@chromium.org>
359
360         Make ShadowRoot interface inherit DocumentFragment interface in IDL.
361         https://bugs.webkit.org/show_bug.cgi?id=77511
362
363         Reviewed by Kentaro Hara.
364
365         This patch contains only the change of IDL to isolate issues.
366         Other changes, such as tests for querySelector of ShadowRoot, will be added in follow-up patches.
367
368         No tests. No change in behavior.
369
370         * dom/ShadowRoot.idl:
371
372 2012-02-02  Raymond Toy  <rtoy@google.com>
373
374         Check parameters to biquad filters
375         https://bugs.webkit.org/show_bug.cgi?id=71413
376
377         Reviewed by Kenneth Russell.
378
379         Tests added for each filter type and for the limiting cases for
380         each filter type.
381
382         * platform/audio/Biquad.cpp:
383         (WebCore::Biquad::setLowpassParams):
384         (WebCore::Biquad::setHighpassParams):
385         (WebCore::Biquad::setLowShelfParams):
386         (WebCore::Biquad::setHighShelfParams):
387         (WebCore::Biquad::setPeakingParams):
388         (WebCore::Biquad::setAllpassParams):
389         (WebCore::Biquad::setNotchParams):
390         (WebCore::Biquad::setBandpassParams):
391         Check for invalid parameters and clip them to something sensible.
392         Also check for the limiting cases and try to use the limiting form
393         of the z-transform for the biquad.  Some issues cannot be
394         consistently handled because the z-transform is not continuous as
395         the parameters approach the limit.
396
397 2012-02-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
398
399         [Qt][Texmap] Refactor TextureMapper API to use ImageBuffers when possible.
400         https://bugs.webkit.org/show_bug.cgi?id=77148
401
402         Reviewed by Martin Robinson.
403
404         Removed TextureMapperQt, and instead created a TextureMapperImageBuffer class,
405         which responds to an "Software" mode of TextureMapper, instead of creating subclasses
406         of TextureMapper directly. This allows using the software fallback of TextureMapper by any
407         sort.
408
409         To make the ImageBuffer backend easier, content updates to BitmapTexture can now use either
410         an image, or a raw data pointer. The raw data pointer is provided for performance reasons,
411         as converting data to/from Image references in Qt generates unnecessary deep copies of the
412         image data.
413
414         Also, functions that use TransformationMatrix were added to GraphicsContext, to allow for
415         3D transforms in cross platform code.
416         After this patch everything renders the same. An additional bug report was created to allow
417         ImageBuffer shallow image copies: https://bugs.webkit.org/show_bug.cgi?id=77689
418
419         Covered extensively by existing tests, no behavioral changes.
420
421         * Target.pri:
422         * platform/graphics/GraphicsContext.cpp:
423         * platform/graphics/GraphicsContext.h:
424         (WebCore):
425         (GraphicsContext):
426         * platform/graphics/cairo/TextureMapperCairo.cpp:
427         * platform/graphics/opengl/TextureMapperGL.cpp:
428         (TextureMapperGLData):
429         (BitmapTextureGL):
430         (WebCore::BitmapTextureGL::BitmapTextureGL):
431         (WebCore::TextureMapperGL::beginPainting):
432         (WebCore::BitmapTextureGL::reset):
433         (WebCore):
434         (WebCore::swizzleBGRAToRGBA):
435         (WebCore::BitmapTextureGL::updateContents):
436         (WebCore::BitmapTextureGL::destroy):
437         (WebCore::TextureMapperGL::bindSurface):
438         (WebCore::TextureMapper::platformCreateAccelerated):
439         * platform/graphics/opengl/TextureMapperGL.h:
440         (TextureMapperGL):
441         (WebCore::TextureMapperGL::accelerationMode):
442         (WebCore):
443         * platform/graphics/qt/GraphicsContext3DQt.cpp:
444         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
445         * platform/graphics/qt/GraphicsContextQt.cpp:
446         (WebCore):
447         (WebCore::GraphicsContext::get3DTransform):
448         (WebCore::GraphicsContext::concat3DTransform):
449         (WebCore::GraphicsContext::set3DTransform):
450         * platform/graphics/qt/TextureMapperQt.cpp: Removed.
451         * platform/graphics/qt/TextureMapperQt.h: Removed.
452         * platform/graphics/texmap/TextureMapper.cpp:
453         (WebCore):
454         (BitmapTextureImageBuffer):
455         (TextureMapperImageBuffer):
456         * platform/graphics/texmap/TextureMapper.h:
457         (WebCore::BitmapTexture::BitmapTexture):
458         (BitmapTexture):
459         (WebCore::BitmapTexture::bpp):
460         (WebCore::BitmapTexture::isOpaque):
461         (WebCore::TextureMapper::setGraphicsContext):
462         (WebCore::TextureMapper::graphicsContext):
463         (TextureMapper):
464         (WebCore::TextureMapper::TextureMapper):
465         (WebCore::TextureMapper::platformCreateAccelerated):
466         * platform/graphics/texmap/TextureMapperNode.cpp:
467         (WebCore::TextureMapperNode::renderContent):
468         (WebCore::TextureMapperNode::setContentsTileBackBuffer):
469         * platform/graphics/texmap/TextureMapperNode.h:
470         (TextureMapperNode):
471
472 2012-02-02  Adam Barth  <abarth@webkit.org>
473
474         Rename checkNodeSecurity and allowsAccessFromFrame to have sensible names
475         https://bugs.webkit.org/show_bug.cgi?id=75796
476
477         Reviewed by Eric Seidel.
478
479         As requested by Darin Adler, this patch renames these functions be
480         clear that we're asking whether the access should be allowed rather
481         than explicitly allowing the access.
482
483         * bindings/generic/BindingSecurity.h:
484         (BindingSecurity):
485         (WebCore::::shouldAllowAccessToNode):
486         (WebCore::::allowSettingFrameSrcToJavascriptUrl):
487         * bindings/js/JSDOMBinding.cpp:
488         (WebCore::shouldAllowAccessToNode):
489         (WebCore::shouldAllowAccessToFrame):
490         * bindings/js/JSDOMBinding.h:
491         (WebCore):
492         * bindings/js/JSHTMLFrameElementCustom.cpp:
493         (WebCore::allowSettingJavascriptURL):
494         * bindings/js/JSHistoryCustom.cpp:
495         (WebCore::JSHistory::getOwnPropertySlotDelegate):
496         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
497         (WebCore::JSHistory::putDelegate):
498         (WebCore::JSHistory::deleteProperty):
499         (WebCore::JSHistory::getOwnPropertyNames):
500         * bindings/js/JSLocationCustom.cpp:
501         (WebCore::JSLocation::getOwnPropertySlotDelegate):
502         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
503         (WebCore::JSLocation::putDelegate):
504         (WebCore::JSLocation::deleteProperty):
505         (WebCore::JSLocation::getOwnPropertyNames):
506         (WebCore::JSLocation::toStringFunction):
507         * bindings/js/ScriptController.cpp:
508         (WebCore::ScriptController::canAccessFromCurrentOrigin):
509         * bindings/scripts/CodeGeneratorJS.pm:
510         (GenerateGetOwnPropertyDescriptorBody):
511         (GenerateImplementation):
512         * bindings/scripts/CodeGeneratorV8.pm:
513         (GenerateNormalAttrGetter):
514         (GenerateFunctionCallback):
515         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
516         (WebCore::JSTestActiveDOMObject::getOwnPropertyDescriptor):
517         * bindings/scripts/test/JS/JSTestObj.cpp:
518         (WebCore::jsTestObjContentDocument):
519         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
520         * bindings/scripts/test/V8/V8TestObj.cpp:
521         (WebCore::TestObjInternal::contentDocumentAttrGetter):
522         (WebCore::TestObjInternal::getSVGDocumentCallback):
523
524 2012-02-02  Kalev Lember  <kalevlember@gmail.com>
525
526         [GTK] Make gtk+ symbols available to WidgetBackingStoreCairo.cpp
527         https://bugs.webkit.org/show_bug.cgi?id=77679
528
529         WidgetBackingStoreCairo.cpp uses GTK+ symbols, so we need it in
530         webcoregtk_sources instead of webcore_sources.
531
532         Reviewed by Martin Robinson.
533
534         * GNUmakefile.list.am: Move WidgetBackingStoreCairo.cpp to webcoregtk.
535
536 2012-02-02  Shinya Kawanaka  <shinyak@google.com>
537
538         StyleRecalc should occur when shadow root exists and light children are changed.
539         https://bugs.webkit.org/show_bug.cgi?id=76262
540
541         Reviewed by Hajime Morita.
542
543         When light children is changed, the element included in HTMLContentElement may also be changed.
544         So we have to recalculate inclusion of content element again.
545
546         Test: fast/dom/shadow/shadow-contents-fallback-dynamic.html
547
548         * dom/Element.cpp:
549         (WebCore::Element::childrenChanged):
550
551 2012-02-02  Ami Fischman  <fischman@chromium.org>
552
553         Avoid crashing renderer when GPU process dies by not caching textures between video frames.
554         https://bugs.webkit.org/show_bug.cgi?id=77654
555
556         Reviewed by James Robinson.
557
558         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
559         (WebCore::CCVideoLayerImpl::draw):
560
561 2012-02-02  Anders Carlsson  <andersca@apple.com>
562
563         Add ScrollingTree class
564         https://bugs.webkit.org/show_bug.cgi?id=77695
565
566         Reviewed by Andreas Kling.
567
568         * WebCore.xcodeproj/project.pbxproj:
569         Add new files.
570
571         * page/scrolling/ScrollingCoordinator.cpp:
572         (WebCore::ScrollingCoordinator::ScrollingCoordinator):
573         Create a scrolling tree.
574
575         (WebCore::ScrollingCoordinator::~ScrollingCoordinator):
576         Assert that the scrolling tree is null.
577
578         (WebCore::ScrollingCoordinator::pageDestroyed):
579         Null out the scrolling tree member variable and tell it to invalidate itself.
580
581         * page/scrolling/ScrollingTree.cpp: Added.
582
583         (WebCore::ScrollingTree::invalidate):
584         Null out the scrolling coordinator, breaking the reference cycle between the scrolling
585         coordinator and the scrolling tree.
586     
587         * page/scrolling/ScrollingTree.h: Added.
588
589 2012-02-02  Tim Dresser  <tdresser@chromium.org>
590
591         Refactor plugin drawing to be more data driven
592         https://bugs.webkit.org/show_bug.cgi?id=76715
593
594         Reviewed by James Robinson.
595
596         CCPluginLayerImpl no longer handles drawing itself, but produces a list of CCPluginDrawQuads.
597         These quads are then drawn by LayerRendererChromium.
598
599         CCLayerImpl::willDraw(LayerRendererChromium*) is called directly before appendQuads.
600         This allows for CCLayerImpl objects to allocate textures before appendQuads is called.
601
602         This is a refactor, so no new tests were added.
603         Flash was tested manually on Linux and Mac.
604
605         * platform/graphics/chromium/LayerRendererChromium.cpp:
606         (WebCore::PluginProgramBinding::set):
607         (PluginProgramBinding):
608         (WebCore):
609         (WebCore::TexStretchPluginProgramBinding::set):
610         (TexStretchPluginProgramBinding):
611         (WebCore::TexTransformPluginProgramBinding::set):
612         (TexTransformPluginProgramBinding):
613         (WebCore::LayerRendererChromium::drawPluginQuad):
614         * platform/graphics/chromium/cc/CCLayerImpl.h:
615         (WebCore::CCLayerImpl::willDraw):
616         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
617         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
618         * platform/graphics/chromium/cc/CCPluginDrawQuad.cpp:
619         (WebCore::CCPluginDrawQuad::create):
620         (WebCore::CCPluginDrawQuad::CCPluginDrawQuad):
621         * platform/graphics/chromium/cc/CCPluginDrawQuad.h:
622         (CCPluginDrawQuad):
623         (WebCore::CCPluginDrawQuad::uvRect):
624         (WebCore::CCPluginDrawQuad::textureId):
625         (WebCore::CCPluginDrawQuad::flipped):
626         (WebCore::CCPluginDrawQuad::ioSurfaceWidth):
627         (WebCore::CCPluginDrawQuad::ioSurfaceHeight):
628         (WebCore::CCPluginDrawQuad::ioSurfaceTextureId):
629         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
630         (WebCore::CCPluginLayerImpl::willDraw):
631         (WebCore::CCPluginLayerImpl::appendQuads):
632         * platform/graphics/chromium/cc/CCPluginLayerImpl.h:
633         (CCPluginLayerImpl):
634
635 2012-01-29  Pablo Flouret  <pablof@motorola.com>
636
637         V8 idl code generator doesn't handle SerializedScriptValue attributes properly.
638         https://bugs.webkit.org/show_bug.cgi?id=77295
639
640         Reviewed by Kentaro Hara.
641
642         Only the case of one (and only one) SerializedScriptValue attribute was
643         handled, and it was deserialized eagerly in the constructor instead of
644         generating getters/setters. This patch gets rid of that behavior and
645         generates the getters and setters instead (similar to what the JSC
646         generator does).
647         Also handle the case of SSV attributes with [CachedAttribute]
648         declaration, caching the deserialized value in a hidden attribute on the
649         object.
650
651         * bindings/scripts/CodeGeneratorV8.pm:
652         (GenerateNormalAttrGetter):
653         (GenerateNormalAttrSetter):
654         (GenerateConstructorCallback):
655         (GenerateNamedConstructorCallback):
656         (GenerateSingleBatchedAttribute):
657         (GenerateImplementation):
658         (GenerateToV8Converters):
659         (JSValueToNative):
660         (NativeToJSValue):
661         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
662         (WebDOMTestSerializedScriptValueInterface::setValue):
663         (WebDOMTestSerializedScriptValueInterface::readonlyValue):
664         (WebDOMTestSerializedScriptValueInterface::cachedValue):
665         (WebDOMTestSerializedScriptValueInterface::setCachedValue):
666         (WebDOMTestSerializedScriptValueInterface::cachedReadonlyValue):
667         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h:
668         (WebDOMTestSerializedScriptValueInterface):
669         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
670         (webkit_dom_test_serialized_script_value_interface_set_value):
671         (webkit_dom_test_serialized_script_value_interface_get_readonly_value):
672         (webkit_dom_test_serialized_script_value_interface_get_cached_value):
673         (webkit_dom_test_serialized_script_value_interface_set_cached_value):
674         (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
675         (webkit_dom_test_serialized_script_value_interface_get_property):
676         (webkit_dom_test_serialized_script_value_interface_class_init):
677         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
678         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
679         ():
680         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
681         (WebCore):
682         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
683         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
684         (WebCore::JSTestSerializedScriptValueInterface::put):
685         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
686         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
687         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
688         (JSTestSerializedScriptValueInterface):
689         (JSTestSerializedScriptValueInterfacePrototype):
690         (WebCore):
691         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
692         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
693         (-[DOMTestSerializedScriptValueInterface setValue:]):
694         (-[DOMTestSerializedScriptValueInterface readonlyValue]):
695         (-[DOMTestSerializedScriptValueInterface cachedValue]):
696         (-[DOMTestSerializedScriptValueInterface setCachedValue:]):
697         (-[DOMTestSerializedScriptValueInterface cachedReadonlyValue]):
698         * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
699         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
700         (WebCore::TestSerializedScriptValueInterfaceInternal::valueAttrGetter):
701         (TestSerializedScriptValueInterfaceInternal):
702         (WebCore::TestSerializedScriptValueInterfaceInternal::valueAttrSetter):
703         (WebCore::TestSerializedScriptValueInterfaceInternal::readonlyValueAttrGetter):
704         (WebCore::TestSerializedScriptValueInterfaceInternal::cachedValueAttrGetter):
705         (WebCore::TestSerializedScriptValueInterfaceInternal::cachedValueAttrSetter):
706         (WebCore::TestSerializedScriptValueInterfaceInternal::cachedReadonlyValueAttrGetter):
707         ():
708         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
709         (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate):
710         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
711
712 2012-02-02  Adam Barth  <abarth@webkit.org>
713
714         BMW Car Configuration Page doesn't work (Only manifests in Chromium)
715         https://bugs.webkit.org/show_bug.cgi?id=77312
716
717         Reviewed by Dimitri Glazkov.
718
719         When we autogenerated the event factory, we missed the check for
720         whether touch events were enabled at runtime:
721         http://trac.webkit.org/changeset/97933/trunk/Source/WebCore/dom/Document.cpp
722
723         This patch adds the check back.
724
725         Unfortunately, there isn't a testing frame work for
726         RuntimeEnabledFeatures.  The main difficulty is that these static bools
727         need to be set when WebKit is initialized and can't be changed (which
728         is why they're not part of WebCore::Settings).  To test them properly,
729         we'd need a testing framework that booted up WebKit for each test.
730
731         We could test this particular change (which doesn't need the bool to be
732         constant through the runtime of WebKit), but that would create a
733         sandtrap for future patches who might thing that this testing framework
734         can really be used to test RuntimeEnabledFeatures.
735
736         The net result is that Chromium is going to end up living with the
737         non-default codepath for these settings being untested, which will lead
738         to regressions like this one.  If we ened up with a bunch of these
739         regressions, we'll likely end up with a testing framework similar to
740         Chromium's browsers_tests, which create a fresh subprocess for each
741         test.
742
743         * dom/EventFactory.in:
744         * dom/make_event_factory.pl:
745         (defaultItemFactory):
746         (generateImplementation):
747
748 2012-02-02  Justin Novosad  <junov@chromium.org>
749
750         [Chromium] Use SkCanvas::flush in skia port
751         https://bugs.webkit.org/show_bug.cgi?id=77463
752
753         Reviewed by Stephen White.
754
755         Code cleanup in skia port. Using SkCanvas::flush to remove
756         unnecessary dependency on GrContext.  Removed unnecessary inclusions
757         and forward declarations of GrContext in several source files.
758
759         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
760         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
761         * platform/graphics/chromium/LayerRendererChromium.cpp:
762         * platform/graphics/chromium/LayerRendererChromium.h:
763         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
764         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
765         * platform/graphics/chromium/cc/CCProxy.h:
766         * platform/graphics/skia/PlatformContextSkia.cpp:
767
768 2012-02-02  Chris Marrin  <cmarrin@apple.com>
769
770         Turn on CSS Filters on Windows
771         https://bugs.webkit.org/show_bug.cgi?id=76667
772
773         Turning on CSS_FILTERS flag for Windows and fixed a couple of resultant build errors
774
775         Reviewed by Adele Peterson.
776
777         * WebCore.vcproj/copyForwardingHeaders.cmd:
778         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
779         (PlatformCALayer::setFilters):
780         (PlatformCALayer::filtersCanBeComposited):
781
782 2012-02-02  Jon Lee  <jonlee@apple.com>
783
784         Clear shown notifications when context is no longer active
785         https://bugs.webkit.org/show_bug.cgi?id=77363
786         <rdar://problem/10568907>
787
788         Reviewed by Darin Adler.
789
790         * notifications/NotificationPresenter.h: Add new virtual function to clear notifications
791         associated with a given execution context. By default the notifications are left alone, as
792         before. Individual implementations can override to allow notifications to clear them.
793
794         * notifications/NotificationCenter.cpp:
795         (WebCore::NotificationCenter::disconnectFrame): When disconnecting the page from the frame, we
796         call clearNotifications().
797         * page/Frame.cpp:
798         (WebCore::Frame::pageDestroyed): When the page is destroyed, tell the DOM window to reset notifications.
799
800 2012-02-02  Anders Carlsson  <andersca@apple.com>
801
802         The overhang area layer should have a linen background
803         https://bugs.webkit.org/show_bug.cgi?id=77670
804         <rdar://problem/10797727>
805
806         Reviewed by Andreas Kling.
807
808         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
809         (WebCore::ScrollingCoordinator::scrollByOnScrollingThread):
810         Add an #ifdef so that scroll position clamping can be disabled. This will be
811         removed once rubber-banding works properly.
812
813         * platform/ScrollbarTheme.h:
814         (WebCore::ScrollbarTheme::setUpOverhangAreasLayerContents):
815         Add new empty function.
816
817         * platform/mac/ScrollbarThemeMac.h:
818         (ScrollbarThemeMac):
819         * platform/mac/ScrollbarThemeMac.mm:
820         (WebCore::linenBackgroundColor):
821         Helper function for getting the CGColorRef that represents the linen background color.
822
823         (WebCore::ScrollbarThemeMac::setUpOverhangAreasLayerContents):
824         Set the linen background color as the overhang areas layer background color.
825
826         * rendering/RenderLayerCompositor.cpp:
827         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
828         Call ScrollbarTheme::setUpOverhangAreasLayerContents.
829
830 2012-02-02  Sheriff Bot  <webkit.review.bot@gmail.com>
831
832         Unreviewed, rolling out r106566.
833         http://trac.webkit.org/changeset/106566
834         https://bugs.webkit.org/show_bug.cgi?id=77673
835
836         Broke the Windows build (Requested by jessieberlin on
837         #webkit).
838
839         * WebCore.vcproj/copyForwardingHeaders.cmd:
840         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
841
842 2012-02-02  Tommy Widenflycht  <tommyw@google.com>
843
844         [chromium] MediaStream API: Adding the embedding code for MediaStreamCenter
845         https://bugs.webkit.org/show_bug.cgi?id=73130
846
847         Reviewed by Darin Fisher.
848
849         Tests for the Media Stream API will be provided by the bug 56587, pending enough landed code.
850
851         * mediastream/UserMediaClient.h:
852         (UserMediaClient):
853         * mediastream/UserMediaRequest.cpp:
854         (WebCore::UserMediaRequest::didCompleteQuery):
855         * mediastream/UserMediaRequest.h:
856         (UserMediaRequest):
857         (WebCore::UserMediaRequest::audio):
858         (WebCore::UserMediaRequest::video):
859         (WebCore::UserMediaRequest::cameraPreferenceUser):
860         (WebCore::UserMediaRequest::cameraPreferenceEnvironment):
861         * platform/mediastream/MediaStreamCenter.cpp:
862         (WebCore):
863         (WebCore::MediaStreamCenter::queryMediaStreamSources):
864         * platform/mediastream/MediaStreamCenter.h:
865         (WebCore):
866         (MediaStreamSourcesQueryClient):
867         (MediaStreamCenter):
868
869 2012-02-02  Raymond Toy  <rtoy@google.com>
870
871         Constant values to set "distanceModel" are undefined
872         https://bugs.webkit.org/show_bug.cgi?id=74273
873
874         Reviewed by Kenneth Russell.
875
876         Tests: webaudio/distance-exponential.html
877                webaudio/distance-inverse.html
878                webaudio/distance-linear.html
879
880         * webaudio/AudioPannerNode.h: Define enum for the new constants
881         for the distance models.
882         * webaudio/AudioPannerNode.idl: Define matching constants for the
883         distance models.
884
885 2012-02-02  Raymond Toy  <rtoy@google.com>
886
887         Illegal panner model values should throw an exception
888         https://bugs.webkit.org/show_bug.cgi?id=77235
889
890         Reviewed by Kenneth Russell.
891
892         Modified existing panner-set-model test to catch exceptions.
893         Debug build should not crash anymore.
894
895         * webaudio/AudioPannerNode.cpp:
896         (WebCore::AudioPannerNode::setPanningModel):  Throw exception for
897         invalid model values.
898         * webaudio/AudioPannerNode.h:
899         (AudioPannerNode): Update declaration
900         * webaudio/AudioPannerNode.idl: Setting panner model can throw
901         exception. 
902
903 2012-02-02  Kentaro Hara  <haraken@chromium.org>
904
905         Rename [ConvertUndefinedOrNullToNullString] to
906         [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString]
907         https://bugs.webkit.org/show_bug.cgi?id=77611
908
909         Reviewed by Adam Barth.
910
911         This patch renames [ConvertUndefinedOrNullToNullString] to
912         [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString], according to the spec
913         (http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs,
914         http://dev.w3.org/2006/webapi/WebIDL/#TreatUndefinedAs).
915
916         No tests. No changes in behavior.
917
918         * bindings/scripts/CodeGeneratorJS.pm:
919         (JSValueToNative):
920         * bindings/scripts/CodeGeneratorV8.pm:
921         (GetNativeTypeFromSignature):
922         * dom/DOMImplementation.idl:
923         * dom/Document.idl:
924         * fileapi/Blob.idl:
925         * fileapi/DirectoryEntry.idl:
926         * fileapi/DirectoryEntrySync.idl:
927         * fileapi/Entry.idl:
928         * fileapi/EntrySync.idl:
929         * fileapi/WebKitBlobBuilder.idl:
930         * html/HTMLButtonElement.idl:
931         * html/HTMLCanvasElement.idl:
932         * html/HTMLFieldSetElement.idl:
933         * html/HTMLInputElement.idl:
934         * html/HTMLKeygenElement.idl:
935         * html/HTMLObjectElement.idl:
936         * html/HTMLOutputElement.idl:
937         * html/HTMLSelectElement.idl:
938         * html/HTMLTextAreaElement.idl:
939         * page/Console.idl:
940         * page/DOMWindow.idl:
941
942         * bindings/scripts/test/TestObj.idl: No changes in run-bindings-tests results.
943
944 2012-02-02  Anders Carlsson  <andersca@apple.com>
945
946         NPAPI will not send mouse up events when mouse is outside plugin area
947         https://bugs.webkit.org/show_bug.cgi?id=77657
948         <rdar://problem/10160674>
949
950         Reviewed by Andreas Kling.
951
952         Export EventHandler::setCapturingMouseEventsNode.
953
954         * WebCore.exp.in:
955
956 2012-02-02  Antti Koivisto  <antti@apple.com>
957
958         Move remaining implementation from CSSStyleDeclaration to subclasses 
959         https://bugs.webkit.org/show_bug.cgi?id=77621
960
961         Reviewed by Andreas Kling.
962
963         This leaves CSSStyleDeclaration a near-pure CSSOM interface.
964
965         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
966         (WebCore::isCSSPropertyName):
967         (WebCore::JSCSSStyleDeclaration::putDelegate):
968         * css/CSSComputedStyleDeclaration.cpp:
969         (WebCore::CSSComputedStyleDeclaration::parentRule):
970         (WebCore):
971         * css/CSSComputedStyleDeclaration.h:
972         (CSSComputedStyleDeclaration):
973         * css/CSSMutableStyleDeclaration.cpp:
974         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
975         (WebCore::CSSMutableStyleDeclaration::contextStyleSheet):
976         (WebCore):
977         (WebCore::CSSMutableStyleDeclaration::parentRule):
978         * css/CSSMutableStyleDeclaration.h:
979         (WebCore::CSSMutableStyleDeclaration::isInlineStyleDeclaration):
980         (WebCore::CSSMutableStyleDeclaration::parentRuleInternal):
981         (WebCore::CSSMutableStyleDeclaration::clearParentRule):
982         (CSSMutableStyleDeclaration):
983         (WebCore::CSSMutableStyleDeclaration::parentElement):
984         (WebCore::CSSMutableStyleDeclaration::clearParentElement):
985         (WebCore::CSSMutableStyleDeclaration::parentStyleSheet):
986         * css/CSSParser.cpp:
987         (WebCore::parseColorValue):
988         (WebCore::parseSimpleLengthValue):
989         (WebCore::CSSParser::parseValue):
990         (WebCore::CSSParser::parseDeclaration):
991         * css/CSSStyleDeclaration.cpp:
992         (WebCore):
993         * css/CSSStyleDeclaration.h:
994         (CSSStyleDeclaration):
995         (WebCore::CSSStyleDeclaration::parentStyleSheet):
996         (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
997         * css/CSSStyleRule.cpp:
998         (WebCore::CSSStyleRule::setSelectorText):
999                             
1000             Eliminate unnecessary call to CSSMutableStyleDeclaration::parentStyleSheet()
1001
1002         * css/CSSStyleRule.h:
1003         (WebCore::CSSStyleRule::setDeclaration):
1004         * css/CSSStyleSelector.cpp:
1005         (WebCore::isInsideRegionRule):
1006         (WebCore::CSSStyleSelector::applyDeclaration):
1007         * css/WebKitCSSKeyframeRule.cpp:
1008         (WebCore::WebKitCSSKeyframeRule::setDeclaration):
1009         * page/PageSerializer.cpp:
1010         (WebCore::PageSerializer::serializeFrame):
1011         (WebCore::PageSerializer::serializeCSSStyleSheet):
1012         (WebCore::PageSerializer::retrieveResourcesForCSSRule):
1013         (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration):
1014         * page/PageSerializer.h:
1015         
1016             Eliminate unnecessary call to CSSMutableStyleDeclaration::parentStyleSheet()
1017         
1018         (WebCore):
1019         (PageSerializer):
1020
1021 2012-02-02  Chris Marrin  <cmarrin@apple.com>
1022
1023         Turn on CSS Filters on Windows
1024         https://bugs.webkit.org/show_bug.cgi?id=76667
1025
1026         Turning on CSS_FILTERS flag for Windows and fixed a couple of resultant build errors
1027
1028         Reviewed by Adele Peterson.
1029
1030         * WebCore.vcproj/copyForwardingHeaders.cmd:
1031         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1032         (PlatformCALayer::setFilters):
1033         (PlatformCALayer::filtersCanBeComposited):
1034
1035 2012-02-02  Anders Carlsson  <andersca@apple.com>
1036
1037         Move ScrollingThread to its own file
1038         https://bugs.webkit.org/show_bug.cgi?id=77652
1039
1040         Reviewed by Sam Weinig.
1041
1042         This just shuffles some classes around and makes ScrollingCoordinator call into ScrollingThread.
1043         Hopefully we'll be able to make ScrollingThread use the new WebCore::RunLoop class eventually.
1044
1045         * WebCore.xcodeproj/project.pbxproj:
1046         * page/scrolling/ScrollingCoordinator.cpp:
1047         (WebCore::ScrollingCoordinator::handleWheelEvent):
1048         * page/scrolling/ScrollingCoordinator.h:
1049         (ScrollingCoordinator):
1050         * page/scrolling/ScrollingThread.cpp: Added.
1051         (WebCore):
1052         (WebCore::ScrollingThread::ScrollingThread):
1053         (WebCore::ScrollingThread::isCurrentThread):
1054         (WebCore::ScrollingThread::dispatch):
1055         (WebCore::ScrollingThread::shared):
1056         (WebCore::ScrollingThread::createThreadIfNeeded):
1057         (WebCore::ScrollingThread::threadCallback):
1058         (WebCore::ScrollingThread::threadBody):
1059         (WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread):
1060         * page/scrolling/ScrollingThread.h: Added.
1061         (WebCore):
1062         (ScrollingThread):
1063         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1064         (WebCore::ScrollingCoordinator::scrollByOnScrollingThread):
1065         (WebCore::ScrollingCoordinator::updateMainFrameScrollLayerPositionOnScrollingThread):
1066         * page/scrolling/mac/ScrollingThreadMac.mm: Added.
1067         (WebCore):
1068         (WebCore::ScrollingThread::initializeRunLoop):
1069         (WebCore::ScrollingThread::wakeUpRunLoop):
1070         (WebCore::ScrollingThread::threadRunLoopSourceCallback):
1071
1072 2012-02-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1073
1074         Unreviewed, rolling out r106551.
1075         http://trac.webkit.org/changeset/106551
1076         https://bugs.webkit.org/show_bug.cgi?id=77648
1077
1078         Breaking mac and gtk tests due to font differences. (Requested
1079         by _pdr_ on #webkit).
1080
1081         * platform/graphics/SVGGlyph.cpp:
1082         (WebCore::charactersWithArabicForm):
1083         * svg/SVGFontData.cpp:
1084         (WebCore::SVGFontData::applySVGGlyphSelection):
1085         * svg/SVGFontData.h:
1086         (SVGFontData):
1087
1088 2012-02-02  Alexander Pavlov  <apavlov@chromium.org>
1089
1090         Web Inspector: [REGRESSION] Slow continuous DOM traversal with Up/Down keys
1091         https://bugs.webkit.org/show_bug.cgi?id=77643
1092
1093         Reviewed by Pavel Feldman.
1094
1095         Test: inspector/styles/updates-during-dom-traversal.html
1096
1097         * inspector/front-end/StylesSidebarPane.js:
1098         (WebInspector.StylesSidebarPane.prototype._executeRebuildUpdate):
1099
1100 2012-02-02  Claudio Saavedra  <csaavedra@igalia.com> and Martin Robinson  <mrobinson@igalia.com>
1101
1102         [GTK] WebKitWebView won't work in a GtkOffscreenWindow
1103         https://bugs.webkit.org/show_bug.cgi?id=76911
1104
1105         Reviewed by Philippe Normand.
1106
1107         * platform/gtk/GtkUtilities.cpp:
1108         (WebCore::widgetIsOnscreenToplevelWindow): Added this helper.
1109         * platform/gtk/GtkUtilities.h:
1110         (WebCore): Added helper declaration.
1111
1112 2012-02-02  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1113
1114         Update active and hover state on touch release.
1115         https://bugs.webkit.org/show_bug.cgi?id=77620
1116
1117         Reviewed by Kenneth Rohde Christiansen.
1118
1119         * rendering/HitTestRequest.h:
1120         (WebCore::HitTestRequest::move):
1121         (WebCore::HitTestRequest::release):
1122         (WebCore::HitTestRequest::touchEvent):
1123         (WebCore::HitTestRequest::mouseEvent):
1124         (WebCore::HitTestRequest::touchMove):
1125         (WebCore::HitTestRequest::touchRelease):
1126             Rename the enum values in HitTestRequest to be mouse/touch
1127             agnostic, and add value for recognizing touch events.
1128         * rendering/RenderFrameSet.cpp:
1129         (WebCore::RenderFrameSet::nodeAtPoint): Update for HitTestRequest rename.
1130         * rendering/RenderLayer.cpp:
1131         (WebCore::RenderLayer::hitTest): ditto
1132         (WebCore::RenderLayer::updateHoverActiveState): Reset hoverstate on touch release.
1133         * page/EventHandler.cpp:
1134         (WebCore::EventHandler::updateSelectionForMouseDrag): Update for HitTestRequest rename.
1135         (WebCore::EventHandler::handleMouseMoveEvent): ditto
1136         (WebCore::EventHandler::handleMouseReleaseEvent): ditto
1137         (WebCore::EventHandler::hoverTimerFired): ditto
1138         (WebCore::EventHandler::dragSourceEndedAt): ditto
1139         (WebCore::EventHandler::handleTouchEvent): Hittest touch release to reset
1140             active and hover states and add touch enum to all touch hittests.
1141
1142 2012-02-02  Pavel Feldman  <pfeldman@google.com>
1143
1144         Web Inspector: enable editing of selected rows on single click in elements panel.
1145         https://bugs.webkit.org/show_bug.cgi?id=77627
1146
1147         Reviewed by Vsevolod Vlasov.
1148
1149         * inspector/front-end/ElementsTreeOutline.js:
1150         (WebInspector.ElementsTreeElement.prototype.onattach):
1151         (WebInspector.ElementsTreeElement.prototype.onselect):
1152         (WebInspector.ElementsTreeElement.prototype._mouseDown):
1153         * inspector/front-end/treeoutline.js:
1154         (TreeElement.prototype.selectOnMouseDown):
1155         (TreeElement.prototype.select):
1156
1157 2012-02-02  Philip Rogers  <pdr@google.com>
1158
1159         Fix mirroring with SVG fonts
1160         https://bugs.webkit.org/show_bug.cgi?id=77067
1161
1162         Reviewed by Nikolas Zimmermann.
1163
1164         SVG fonts were incorrectly handling mirrored characters in bidi text.
1165         In this change I added the function createStringWithMirroredCharacters
1166         which handles mirroring the characters when selecting glyphs for SVG
1167         fonts. I also made a small cosmetic change in the function
1168         charactersWithArabicForm, changing the bool parameter "mirror" to "rtl"
1169         which better reflects what it actually does.
1170
1171         Several new tests were added to test mirroring with SVG fonts in the
1172         presence of Arabic forms and non-BMP characters.
1173
1174         Tests: svg/custom/glyph-selection-arabic-forms.svg
1175                svg/custom/glyph-selection-bidi-mirror.svg
1176                svg/custom/glyph-selection-non-bmp.svg
1177
1178         * platform/graphics/SVGGlyph.cpp:
1179         (WebCore::charactersWithArabicForm):
1180         * svg/SVGFontData.cpp:
1181         (WebCore::SVGFontData::applySVGGlyphSelection):
1182         (WebCore::SVGFontData::createStringWithMirroredCharacters):
1183         * svg/SVGFontData.h:
1184         (SVGFontData):
1185
1186 2012-02-02  Pavel Feldman  <pfeldman@google.com>
1187
1188         Web Inspector: add experiment for single click styles editing.
1189         https://bugs.webkit.org/show_bug.cgi?id=77624
1190
1191         Reviewed by Vsevolod Vlasov.
1192
1193         * inspector/front-end/Settings.js:
1194         (WebInspector.ExperimentsSettings):
1195         * inspector/front-end/StylesSidebarPane.js:
1196         (WebInspector.StylePropertiesSection):
1197         (WebInspector.StylePropertyTreeElement.prototype.onattach):
1198         (WebInspector.StylePropertyTreeElement.prototype._mouseDown):
1199         (WebInspector.StylePropertyTreeElement.prototype._resetMouseDownElement):
1200         (WebInspector.StylePropertyTreeElement.prototype):
1201         (WebInspector.StylePropertyTreeElement.prototype.selectElement.context):
1202
1203 2012-02-02  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1204
1205         Make the tap highlighting work for all test cases
1206         https://bugs.webkit.org/show_bug.cgi?id=77626
1207
1208         Reviewed by Simon Hausmann.
1209
1210         Clean up of the current code to make it more generic. Now uses
1211         addFocusRingRects for finding the areas to highlight.
1212
1213         Tested by current manual tests.
1214
1215         * page/GestureTapHighlighter.cpp:
1216         (WebCore::GestureTapHighlighter::pathForNodeHighlight):
1217
1218 2012-02-02  Mario Sanchez Prada  <msanchez@igalia.com>
1219
1220         [Gtk] atk_text_get_text_at_offset() sometimes fails to provide the correct line
1221         https://bugs.webkit.org/show_bug.cgi?id=72382
1222
1223         Reviewed by Martin Robinson.
1224
1225         Do not add unnecesary blanks at the end of a line of text.
1226
1227         * accessibility/gtk/WebKitAccessibleInterfaceText.cpp:
1228         (textForRenderer): Do not just append a '\n' at the end of a line
1229         if the linebreak for that line was already considered.
1230
1231 2012-02-02  Raul Hudea  <rhudea@adobe.com>
1232
1233         Regions should ignore the saved currentRenderFlowThread during repainting
1234         because if there are imbricated flow threads, it might end using the wrong one.
1235
1236         [CSSRegions] Assert failure in RenderView::computeRectForRepaint
1237         https://bugs.webkit.org/show_bug.cgi?id=77430
1238
1239         Reviewed by David Hyatt.
1240
1241         Test: fast/regions/imbricated-flow-threads-crash.html
1242
1243         * rendering/RenderFlowThread.cpp:
1244         (CurrentRenderFlowThreadDisabler):
1245         (WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler):
1246         (WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler):
1247         (WebCore):
1248         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1249
1250 2012-02-02  Kinuko Yasuda  <kinuko@chromium.org>
1251
1252         Cleanup: Move chrome-specific filesystem type handling code (for FileSystem API) under chromium directory (re-landing r105395)
1253         https://bugs.webkit.org/show_bug.cgi?id=76551
1254
1255         Reviewed by David Levin.
1256
1257         Moved the implementation of crackFileSystemURL() and toURL() from
1258         WebCore/fileapi/DOMFileSystemBase into WebCore/platform/AsyncFileSystem
1259         so that each platform can extend/implement their behavior if necessary.
1260
1261         No new tests as it has no functional changes.
1262
1263         * fileapi/DOMFileSystemBase.cpp: Moved crackFileSystemURL() to AsyncFileSystem.
1264         * fileapi/DOMFileSystemBase.h:
1265         (DOMFileSystemBase):
1266         * fileapi/EntryBase.cpp: Moved toURL() to AsyncFileSystem.
1267         (WebCore::EntryBase::toURL):
1268         * page/DOMWindow.cpp: Made corresponding callsite changes.
1269         (WebCore::DOMWindow::webkitRequestFileSystem):
1270         (WebCore::DOMWindow::webkitResolveLocalFileSystemURL):
1271         * page/DOMWindow.h:
1272         * platform/AsyncFileSystem.cpp:
1273         (WebCore::AsyncFileSystem::isValidType): Added.
1274         * platform/AsyncFileSystem.h:
1275         (AsyncFileSystem):
1276         * workers/WorkerContext.cpp: Made corresponding callsite changes.
1277         (WebCore::WorkerContext::webkitRequestFileSystem):
1278         (WebCore::WorkerContext::webkitRequestFileSystemSync):
1279         (WebCore::WorkerContext::webkitResolveLocalFileSystemURL):
1280         (WebCore::WorkerContext::webkitResolveLocalFileSystemSyncURL):
1281         * workers/WorkerContext.h:
1282
1283 2012-02-02  Yury Semikhatsky  <yurys@chromium.org>
1284
1285         Web Inspector: pause on uncaugh exceptions state is not properly restored
1286         https://bugs.webkit.org/show_bug.cgi?id=77558
1287
1288         'Pause on exceptions' state is now stored in InspectorState object so that it is
1289         properly restored on inspected process change.
1290
1291         Reviewed by Vsevolod Vlasov.
1292
1293         * inspector/InspectorDebuggerAgent.cpp:
1294         (DebuggerAgentState):
1295         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
1296         (WebCore::InspectorDebuggerAgent::disable):
1297         (WebCore::InspectorDebuggerAgent::restore):
1298         (WebCore::InspectorDebuggerAgent::setPauseOnExceptions):
1299         (WebCore):
1300         (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsImpl):
1301         * inspector/InspectorDebuggerAgent.h:
1302         (InspectorDebuggerAgent):
1303
1304 2012-02-02  Kentaro Hara  <haraken@chromium.org>
1305
1306         The third argument of addEventListener/removeEventListener of PeerConnection should be optional
1307         https://bugs.webkit.org/show_bug.cgi?id=77606
1308
1309         Reviewed by Adam Barth.
1310
1311         This patch corrects a typo in PeerConnection.idl, i.e. [optional] => [Optional].
1312
1313         Test: fast/mediastream/peerconnection-eventlistener-optional-argument.html
1314
1315         * mediastream/PeerConnection.idl:
1316
1317 2012-02-02  Rakesh KN  <rakesh.kn@motorola.com>
1318
1319         hidden attribute on <input type=file /> suppresses the file selection dialog
1320         https://bugs.webkit.org/show_bug.cgi?id=58208
1321
1322         Reviewed by Ryosuke Niwa.
1323
1324         We want to allow opening file dialog on hidden element when click() is called
1325         on the element. The behaviour is similar to Firefox and IE.
1326
1327         Added manual test as the file dialog opens only on user gesture.
1328
1329         * html/FileInputType.cpp:
1330         (WebCore::FileInputType::handleDOMActivateEvent):
1331         Removed renderer check as input can be hidden.
1332
1333 2012-02-01  Philippe Normand  <pnormand@igalia.com>
1334
1335         [GStreamer] FFTFrame implementation
1336         https://bugs.webkit.org/show_bug.cgi?id=73545
1337
1338         Reviewed by Chris Rogers.
1339
1340         FFTFrame implementation based on GStreamer's FFT processing
1341         library.
1342
1343         No new tests, existing WebAudio tests cover this.
1344
1345         * GNUmakefile.am:
1346         * GNUmakefile.list.am:
1347         * platform/audio/FFTFrame.h:
1348         * platform/audio/FFTFrameStub.cpp:
1349         * platform/audio/gstreamer/FFTFrameGStreamer.cpp: Added.
1350         (WebCore::FFTFrame::FFTFrame):
1351         (WebCore::FFTFrame::initialize):
1352         (WebCore::FFTFrame::cleanup):
1353         (WebCore::FFTFrame::~FFTFrame):
1354         (WebCore::FFTFrame::multiply):
1355         (WebCore::FFTFrame::doFFT):
1356         (WebCore::FFTFrame::doInverseFFT):
1357         (WebCore::FFTFrame::realData):
1358         (WebCore::FFTFrame::imagData):
1359
1360 2012-02-02  Kentaro Hara  <haraken@chromium.org>
1361
1362         Rename [CheckFrameSecurity] and [SVGCheckSecurity] to [CheckAccessToNode]
1363         https://bugs.webkit.org/show_bug.cgi?id=77601
1364
1365         Reviewed by Adam Barth.
1366
1367         [CheckFrameSecurity] and [SVGCheckSecurity] have the same meaning; i.e. generate code
1368         to check allowAccessToNode() for a given attribute or method. This patch renames them
1369         to [CheckAccessToNode].
1370
1371         No tests. No changes in behavior.
1372
1373         * bindings/scripts/CodeGeneratorJS.pm:
1374         (GenerateImplementation):
1375         * bindings/scripts/CodeGeneratorV8.pm:
1376         (GenerateNormalAttrGetter):
1377         (GenerateFunctionCallback):
1378         * html/HTMLEmbedElement.idl:
1379         * html/HTMLFrameElement.idl:
1380         * html/HTMLIFrameElement.idl:
1381         * html/HTMLObjectElement.idl:
1382
1383         * bindings/scripts/test/TestObj.idl:
1384         * bindings/scripts/test/V8/V8TestObj.cpp: Updated the test results.
1385         (WebCore):
1386
1387 2012-02-01  Kentaro Hara  <haraken@chromium.org>
1388
1389         Rename [V8DisallowShadowing] to [V8Unforgeable]
1390         https://bugs.webkit.org/show_bug.cgi?id=77599
1391
1392         Reviewed by Adam Barth.
1393
1394         This patch renames [V8DisallowShadowing] to [V8Unforgeable], following the Web IDL
1395         spec (http://dev.w3.org/2006/webapi/WebIDL/#Unforgeable).
1396
1397         No tests. No change in behavior.
1398
1399         * bindings/scripts/CodeGeneratorV8.pm:
1400         (GenerateNormalAttrGetter):
1401         (GenerateSingleBatchedAttribute):
1402         (GenerateImplementation):
1403         * page/DOMWindow.idl:
1404         * page/Location.idl:
1405
1406 2012-02-01  Kentaro Hara  <haraken@chromium.org>
1407
1408         Rename [ConvertNullToNullString] to [TreatNullAs=EmptyString]
1409         https://bugs.webkit.org/show_bug.cgi?id=77602
1410
1411         Reviewed by Adam Barth.
1412
1413         This patch renames [ConvertNullToNullString] to [TreatNullAs=EmptyString],
1414         according to the spec (http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs).
1415
1416         No tests. No changes in behavior.
1417
1418         * bindings/scripts/CodeGeneratorJS.pm:
1419         (JSValueToNative):
1420         * bindings/scripts/CodeGeneratorV8.pm:
1421         (GetNativeTypeFromSignature):
1422
1423         * css/CSSCharsetRule.idl:
1424         * css/CSSPageRule.idl:
1425         * css/CSSRule.idl:
1426         * css/CSSStyleDeclaration.idl:
1427         * css/CSSStyleRule.idl:
1428         * css/CSSValue.idl:
1429         * css/MediaList.idl:
1430         * css/WebKitCSSKeyframesRule.idl:
1431         * dom/Attr.idl:
1432         * dom/CharacterData.idl:
1433         * dom/DOMImplementation.idl:
1434         * dom/Document.idl:
1435         * dom/Element.idl:
1436         * dom/NamedNodeMap.idl:
1437         * dom/Node.idl:
1438         * dom/ProcessingInstruction.idl:
1439         * dom/ShadowRoot.idl:
1440         * html/HTMLAnchorElement.idl:
1441         * html/HTMLButtonElement.idl:
1442         * html/HTMLDocument.idl:
1443         * html/HTMLElement.idl:
1444         * html/HTMLFormElement.idl:
1445         * html/HTMLFrameElement.idl:
1446         * html/HTMLInputElement.idl:
1447         * html/HTMLMediaElement.idl:
1448         * html/HTMLOutputElement.idl:
1449         * html/HTMLScriptElement.idl:
1450         * html/HTMLSelectElement.idl:
1451         * html/HTMLTextAreaElement.idl:
1452         * html/HTMLTitleElement.idl:
1453         * html/canvas/CanvasRenderingContext2D.idl:
1454         * page/DOMWindow.idl:
1455         * storage/StorageEvent.idl:
1456         * svg/SVGAngle.idl:
1457         * svg/SVGElement.idl:
1458         * svg/SVGLength.idl:
1459         * svg/SVGScriptElement.idl:
1460
1461         * bindings/scripts/test/TestObj.idl: No change in the run-bindings-tests results.
1462
1463 2012-02-01  Kentaro Hara  <haraken@chromium.org>
1464
1465         Remove [GenerateConstructor] from IDL files
1466         https://bugs.webkit.org/show_bug.cgi?id=77598
1467
1468         Reviewed by Adam Barth.
1469
1470         [GenerateConstructor] is used in some IDL files but it is not implemented
1471         in code generators. I could not find any history about [GenerateConstructor]
1472         in code generators. This patch removes them from IDL files.
1473
1474         Maybe we want to replace [GenerateConstructor] with [Constructor] eventually,
1475         but currently no tests are written for their constructors (e.g. "new DOMTokenList()").
1476         So simply removing them would make sense.
1477
1478         No new tests. No change in behavior.
1479
1480         * dom/DOMStringList.idl:
1481         * html/DOMSettableTokenList.idl:
1482         * html/DOMTokenList.idl:
1483         * svg/SVGFEConvolveMatrixElement.idl:
1484         * webaudio/AudioPannerNode.idl:
1485
1486 2012-02-01  Eric Carlson  <eric.carlson@apple.com>
1487
1488         Consider user's preferred language when choosing text tracks
1489         https://bugs.webkit.org/show_bug.cgi?id=74121
1490
1491         Reviewed by Alexey Proskuryakov.
1492
1493         Tests: media/track/track-language-preference.html
1494                media/track/track-prefer-captions.html
1495
1496         * html/HTMLMediaElement.cpp:
1497         (WebCore::HTMLMediaElement::loadTimerFired): configureTextTracks -> configureNewTextTracks.
1498         (WebCore::HTMLMediaElement::textTracksAreReady): Add more comments.
1499         (WebCore::HTMLMediaElement::textTrackModeChanged): Ditto.
1500         (WebCore::HTMLMediaElement::showingTrackWithSameKind): Minor restructuring.
1501         (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Renamed from userIsInterestedInThisTrack,
1502             don't consider user's language preference.
1503         (WebCore::HTMLMediaElement::configureTextTrackGroup): New, configure all tracks in a group, 
1504             considering user's kind and language preferences.
1505         (WebCore::HTMLMediaElement::configureNewTextTracks): New, configure all newly added tracks.
1506         * html/HTMLMediaElement.h:
1507         (WebCore::HTMLMediaElement::TrackGroup::TrackGroup):
1508         (TrackGroup):
1509
1510         * platform/Language.cpp:
1511         (WebCore::canonicalLanguageIdentifier): New, create a canonicalized version of a language string.
1512         (WebCore::bestMatchingLanguage): New, return the language from the list that best matches the 
1513             specified language.
1514         (WebCore::preferredLanguageFromList): New, return the language in the specified list that best
1515             matches the user's language preference.
1516         * platform/Language.h:
1517
1518         * testing/Internals.cpp:
1519         (WebCore::Internals::setShouldDisplayTrackType): New, allow DRT to set the track type preference.
1520         (WebCore::Internals::shouldDisplayTrackType): New, allow DRT to read the track type preference.
1521         * testing/Internals.h:
1522         * testing/Internals.idl:
1523
1524 2012-02-01  Hayato Ito  <hayato@chromium.org>
1525
1526         Change class hierarycy so that ShadowRoot can inherit DocumentFragment.
1527         https://bugs.webkit.org/show_bug.cgi?id=76693
1528
1529         Reviewed by Darin Adler.
1530
1531         Make ShadowRoot inherit DocumentFragment so that it matches the class hierarchy of IDL in the spec.
1532         TreeScope becomes a separated class, which is now inherited by Document and ShadowRoot using multiple-inheritance.
1533         This patch is pre-requirement for coming IDL change.
1534
1535         No tests. No change in behavior.
1536
1537         * dom/Document.cpp:
1538         (WebCore::Document::Document):
1539         (WebCore::Document::~Document):
1540         (WebCore::Document::buildAccessKeyMap):
1541         (WebCore::Document::childrenChanged):
1542         (WebCore::Document::attach):
1543         (WebCore::Document::detach):
1544         * dom/Document.h:
1545         (Document):
1546         * dom/DocumentFragment.cpp:
1547         (WebCore::DocumentFragment::DocumentFragment):
1548         * dom/DocumentFragment.h:
1549         (DocumentFragment):
1550         * dom/DocumentOrderedMap.cpp:
1551         (WebCore::DocumentOrderedMap::get):
1552         * dom/ShadowRoot.cpp:
1553         (WebCore::ShadowRoot::ShadowRoot):
1554         (WebCore::ShadowRoot::~ShadowRoot):
1555         (WebCore::ShadowRoot::attach):
1556         * dom/ShadowRoot.h:
1557         * dom/TreeScope.cpp:
1558         (WebCore::TreeScope::TreeScope):
1559         (WebCore::TreeScope::~TreeScope):
1560         (WebCore::TreeScope::setParentTreeScope):
1561         (WebCore::TreeScope::getImageMap):
1562         (WebCore::TreeScope::findAnchor):
1563         * dom/TreeScope.h:
1564         (WebCore):
1565         (WebCore::TreeScope::rootNode):
1566         (TreeScope):
1567         * dom/TreeScopeAdopter.cpp:
1568         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1569         * page/DragController.cpp:
1570         (WebCore::asFileInput):
1571         * page/FocusController.cpp:
1572         (WebCore::ownerOfTreeScope):
1573         (WebCore::FocusController::nextFocusableNode):
1574         (WebCore::FocusController::previousFocusableNode):
1575
1576 2012-02-01  Benjamin Poulain  <bpoulain@apple.com>
1577
1578         WorkerScriptController::evaluate() should not return anything
1579         https://bugs.webkit.org/show_bug.cgi?id=77587
1580
1581         Reviewed by Adam Barth.
1582
1583         Remove the return value from WorkerScriptController as it is
1584         (and should be) unused.
1585
1586         * bindings/js/WorkerScriptController.cpp:
1587         (WebCore::WorkerScriptController::evaluate):
1588         * bindings/js/WorkerScriptController.h:
1589         (WorkerScriptController):
1590         * bindings/v8/WorkerScriptController.cpp:
1591         (WebCore::WorkerScriptController::evaluate):
1592         * bindings/v8/WorkerScriptController.h:
1593         (WorkerScriptController):
1594
1595 2012-02-01  Kentaro Hara  <haraken@chromium.org>
1596
1597         Remove [DelegatingPrototypeGetOwnPropertySlot], [HasCustomIndexGetter],
1598         [HasIndexSetter], [JSConstructorTemplate] and [NonEmpty] from code generators
1599         https://bugs.webkit.org/show_bug.cgi?id=77585
1600
1601         Reviewed by Adam Barth.
1602
1603         This patch removes [DelegatingPrototypeGetOwnPropertySlot], [HasCustomIndexGetter],
1604         [HasIndexSetter], [JSConstructorTemplate] and [NonEmpty] from code generators,
1605         since they are not used by no IDL files.
1606
1607         No tests. No change in behavior.
1608
1609         * bindings/scripts/CodeGenerator.pm:
1610         (GetterExpression):
1611         * bindings/scripts/CodeGeneratorJS.pm:
1612         (GenerateGetOwnPropertySlotBody):
1613         (GenerateGetOwnPropertyDescriptorBody):
1614         (GenerateHeader):
1615         (GenerateImplementation):
1616         (IsConstructable):
1617         (IsConstructorTemplate):
1618
1619         * bindings/scripts/test/TestObj.idl:
1620         * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated the run-bindings-tests results.
1621         * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
1622         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
1623         (webkit_dom_test_obj_set_property):
1624         (webkit_dom_test_obj_get_property):
1625         (webkit_dom_test_obj_class_init):
1626         * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
1627         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
1628         (WebCore):
1629         * bindings/scripts/test/JS/JSTestObj.h: Ditto.
1630         (WebCore):
1631         * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
1632         * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
1633         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
1634         (WebCore):
1635
1636 2012-02-01  Shinya Kawanaka  <shinyak@google.com>
1637
1638         Select attribute of HTMLContentElement should be able be changed dynamically.
1639         https://bugs.webkit.org/show_bug.cgi?id=76261
1640
1641         Reviewed by Hajime Morita.
1642
1643         When select attribute is changed, the flag to recalc style is set.
1644
1645         Test: fast/dom/shadow/content-element-select-dynamic.html
1646
1647         * html/shadow/HTMLContentElement.cpp:
1648         (WebCore::HTMLContentElement::parseMappedAttribute):
1649           Sets recalc style when select is changed.
1650         * html/shadow/HTMLContentElement.h:
1651         (HTMLContentElement):
1652
1653 2012-02-01  Kentaro Hara  <haraken@chromium.org>
1654
1655         Remove [ImplementationUUID] and [InterfaceUUID] from html/canvas/*.idl
1656         https://bugs.webkit.org/show_bug.cgi?id=77589
1657
1658         Reviewed by Adam Barth.
1659
1660         [ImplementationUUID] and [InterfaceUUID] are used in html/canvas/*.idl,
1661         but they are not implemented in code generators and thus have no meaning.
1662         This patch removes them.
1663
1664         No tests. No change in behavior.
1665
1666         * html/canvas/CanvasGradient.idl:
1667         * html/canvas/CanvasPattern.idl: The file is now empty though.
1668         * html/canvas/CanvasRenderingContext.idl:
1669         * html/canvas/CanvasRenderingContext2D.idl:
1670         * html/canvas/WebGLRenderingContext.idl:
1671
1672 2012-02-01  Sheriff Bot  <webkit.review.bot@gmail.com>
1673
1674         Unreviewed, rolling out r106408.
1675         http://trac.webkit.org/changeset/106408
1676         https://bugs.webkit.org/show_bug.cgi?id=77592
1677
1678         crashes in chromium mac release tests (Requested by japhet on
1679         #webkit).
1680
1681         * platform/graphics/Region.cpp:
1682         * platform/graphics/Region.h:
1683         (Region):
1684         (Shape):
1685
1686 2012-02-01  No'am Rosenthal  <noam.rosenthal@nokia.com>
1687
1688         [Texmap] Use glScissors for clipping in TextureMapperGL when possible
1689         https://bugs.webkit.org/show_bug.cgi?id=77575
1690
1691         Reviewed by Martin Robinson.
1692
1693         Maintain a clipping stack, that helps us use stencils in conjunction with scissors.
1694         We apply scissors when the clip region is rectalinear, and stencil when it's not.
1695
1696         No behavior changes so no new tests.
1697
1698         * platform/graphics/opengl/TextureMapperGL.cpp:
1699         (SharedGLData):
1700         (WebCore::TextureMapperGLData::SharedGLData::SharedGLData):
1701         (WebCore::TextureMapperGL::drawTexture):
1702         (WebCore::TextureMapperGL::bindSurface):
1703         (WebCore):
1704         (WebCore::scissorClip):
1705         (WebCore::TextureMapperGL::beginScissorClip):
1706         (WebCore::TextureMapperGL::endScissorClip):
1707         (WebCore::TextureMapperGL::beginClip):
1708         (WebCore::TextureMapperGL::endClip):
1709         * platform/graphics/opengl/TextureMapperGL.h:
1710         (TextureMapperGL):
1711
1712 2012-02-01  Anders Carlsson  <andersca@apple.com>
1713
1714         Move the scrolling coordinator to page/scrolling
1715         https://bugs.webkit.org/show_bug.cgi?id=77590
1716
1717         Reviewed by Dan Bernstein.
1718
1719         Put scrolling related files in page/scrolling to avoid cluttering the page directory.
1720
1721         * WebCore.xcodeproj/project.pbxproj:
1722         * page/scrolling/ScrollingCoordinator.cpp: Renamed from Source/WebCore/page/ScrollingCoordinator.cpp.
1723         * page/scrolling/ScrollingCoordinator.h: Renamed from Source/WebCore/page/ScrollingCoordinator.h.
1724         * page/scrolling/mac/ScrollingCoordinatorMac.mm: Renamed from Source/WebCore/page/mac/ScrollingCoordinatorMac.mm.
1725
1726 2012-02-01  Kentaro Hara  <haraken@chromium.org>
1727
1728         Remove [ObjCPrefix], [V8ConstructorTemplate], [allowAccessToNode],
1729         [v8implname] and [v8referenceattr] from code generators
1730         https://bugs.webkit.org/show_bug.cgi?id=77588
1731
1732         Reviewed by Adam Barth.
1733
1734         This patch removes [ObjCPrefix], [V8ConstructorTemplate], [allowAccessToNode],
1735         [v8implname] and [v8referenceattr] from code generators, since they are not used
1736         by any IDL files.
1737
1738         No tests. No changes in behavior.
1739
1740         * bindings/scripts/CodeGeneratorJS.pm:
1741         (GenerateImplementation):
1742         * bindings/scripts/CodeGeneratorObjC.pm:
1743         (GenerateHeader):
1744         (GenerateImplementation):
1745         * bindings/scripts/CodeGeneratorV8.pm:
1746         (IsConstructable):
1747         (IsConstructorTemplate):
1748         (GenerateNormalAttrGetter):
1749         (GenerateFunctionCallString):
1750
1751 2012-02-01  Pablo Flouret  <pablof@motorola.com>
1752
1753         Support targetOrigin = "/" in postMessage for sending messages to same origin as source document.
1754         https://bugs.webkit.org/show_bug.cgi?id=77580
1755
1756         Reviewed by Adam Barth.
1757
1758         No new tests. Modified http/tests/security/postMessage/target-origin.html
1759         to test this case as well.
1760
1761         * page/DOMWindow.cpp:
1762         (WebCore::DOMWindow::postMessage):
1763
1764 2012-02-01  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1765
1766         Avoid creating NamedNodeMap unnecessarily
1767         https://bugs.webkit.org/show_bug.cgi?id=77574
1768
1769         Reviewed by Ryosuke Niwa.
1770
1771         The method Element::attributes() was being used for multiple things in our
1772         codebase: (1) as the getter for NamedNodeMap exposed to DOM, (2) as a way to other WebCore
1773         code get the "attribute storage" (currently inside NamedNodeMap), and (3) as a way to
1774         get the attribute storage creating one if necessary.
1775
1776         This commit separate the jobs in different functions:
1777
1778         1) attributes() keeps being the DOM getter, and loses its boolean parameter.
1779
1780         2) updatedAttributes() updates the invalid attributes and returns the attribute
1781         storage. If we don't have one, return 0.
1782
1783         3) ensureUpdatedAttributes() updates the invalid attributes and forces the
1784         creation of attribute storage to return.
1785
1786         There is also another way to get to the attribute storage currently, via
1787         attributeMap(), which doesn't update the attributes for possible changes in Style
1788         or SVG attributes.
1789
1790         Note that the new functions are not available in Node class, so C++ code manipulating
1791         attributes should cast to Element.
1792
1793         This separation also made easier to spot and fix some places where we do not
1794         need to create the attribute storage if it doesn't exist.
1795
1796         No new tests, this commit shouldn't change the behavior of existing code.
1797
1798         * css/SelectorChecker.cpp:
1799         (WebCore::SelectorChecker::checkOneSelector):
1800         * dom/DatasetDOMStringMap.cpp:
1801         (WebCore::DatasetDOMStringMap::getNames):
1802         (WebCore::DatasetDOMStringMap::item):
1803         (WebCore::DatasetDOMStringMap::contains):
1804         * dom/Document.cpp:
1805         (WebCore::Document::importNode):
1806         * dom/Element.cpp:
1807         (WebCore::Element::setAttribute):
1808         (WebCore::Element::hasAttributes):
1809         (WebCore::Element::setAttributeNode):
1810         (WebCore::Element::setAttributeNodeNS):
1811         (WebCore::Element::removeAttributeNode):
1812         (WebCore::Element::getAttributeNode):
1813         (WebCore::Element::getAttributeNodeNS):
1814         (WebCore::Element::hasAttribute):
1815         (WebCore::Element::hasAttributeNS):
1816         (WebCore::Element::normalizeAttributes):
1817         * dom/Element.h:
1818         (Element):
1819         (WebCore::Element::attributes):
1820         (WebCore::Element::ensureAttributeData):
1821         (WebCore::Element::ensureUpdatedAttributes):
1822         (WebCore::Element::updatedAttributes):
1823         (WebCore::Element::setAttributesFromElement):
1824         (WebCore::Element::ensureAttributeMap): Made const to be reused by ensureUpdatedAttributes().
1825         (WebCore::Element::updateInvalidAttributes):
1826         (WebCore):
1827         * dom/NamedNodeMap.cpp:
1828         (WebCore::NamedNodeMap::mapsEquivalent): Having no attributes is equivalent to
1829         not having an attribute storage because the attribute storage is lazily created.
1830         * dom/Node.cpp:
1831         (WebCore::Node::isEqualNode): Do not force the creation of attribute storage to
1832         compare two nodes.
1833         (WebCore::Node::isDefaultNamespace): Use updatedAttributes(). Since we iterate
1834         using length, it's OK if the attribute storage is empty.
1835         (WebCore::Node::lookupNamespaceURI): Ditto.
1836         (WebCore::Node::lookupNamespacePrefix): Ditto.
1837         (WebCore::Node::compareDocumentPosition): Ditto.
1838         * editing/ApplyStyleCommand.cpp:
1839         (WebCore::hasNoAttributeOrOnlyStyleAttribute):
1840         (WebCore::isEmptyFontTag):
1841         * editing/CompositeEditCommand.cpp:
1842         (WebCore::CompositeEditCommand::isRemovableBlock): Use isElementNode() explicitly
1843         to identify non-Element nodes, then use hasAttributes() if is Element.
1844         * editing/InsertParagraphSeparatorCommand.cpp:
1845         (WebCore::highestVisuallyEquivalentDivBelowRoot):
1846         * editing/MarkupAccumulator.cpp:
1847         (WebCore::MarkupAccumulator::appendElement): Do not create the attribute storage
1848         unnecessarily.
1849         * editing/htmlediting.cpp:
1850         (WebCore::areIdenticalElements): Do not create the attribute storage
1851         unnecessarily. Use mapsEquivalent() for comparing the attributes.
1852         * editing/markup.cpp:
1853         (WebCore::completeURLs): Do not create the attribute storage unnecessarily.
1854         (WebCore::StyledMarkupAccumulator::appendElement): Ditto.
1855         (WebCore::isPlainTextMarkup): hasAttributes() will avoid creating the attribute
1856         storage unnecessarily.
1857         * html/HTMLEmbedElement.cpp:
1858         (WebCore::HTMLEmbedElement::parametersForPlugin):
1859         * html/HTMLObjectElement.cpp:
1860         (WebCore::HTMLObjectElement::parametersForPlugin):
1861         * html/HTMLParamElement.cpp:
1862         (WebCore::HTMLParamElement::isURLAttribute): Do not create the attribute storage
1863         unnecessarily.
1864         * html/parser/HTMLConstructionSite.cpp:
1865         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement): Use
1866         ensureUpdatedAttributes() since we will add new attributes.
1867         (WebCore):
1868         * inspector/InspectorCSSAgent.cpp:
1869         (WebCore::InspectorCSSAgent::buildArrayForAttributeStyles):
1870         * inspector/InspectorDOMAgent.cpp:
1871         (WebCore::InspectorDOMAgent::setAttributesAsText):
1872         (WebCore::InspectorDOMAgent::performSearch):
1873         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
1874         * page/PageSerializer.cpp:
1875         (WebCore::isCharsetSpecifyingNode): Do not assume attributeMap will exist.
1876         * svg/properties/SVGAnimatedPropertySynchronizer.h: Use ensureUpdatedAttributes()
1877         since we will add new attributes.
1878         * xml/XPathFunctions.cpp:
1879         (WebCore::XPath::FunLang::evaluate): Do not create the attribute storage
1880         unnecessarily.
1881         * xml/XPathNodeSet.cpp:
1882         (WebCore::XPath::NodeSet::traversalSort):
1883         * xml/XPathStep.cpp:
1884         (WebCore::XPath::Step::nodesInAxis): Use isElementNode() instead of comparing
1885         nodeType() manually. Do not create the attribute storage unnecessarily.
1886         * xml/parser/XMLDocumentParserLibxml2.cpp:
1887         (WebCore::XMLDocumentParser::XMLDocumentParser): Do not create the attribute
1888         storage unnecessarily.
1889         * xml/parser/XMLDocumentParserQt.cpp:
1890         (WebCore::XMLDocumentParser::XMLDocumentParser): Ditto.
1891         * xml/parser/XMLTreeBuilder.cpp:
1892         (WebCore::XMLTreeBuilder::XMLTreeBuilder): Ditto.
1893
1894 2012-02-01  Adam Barth  <abarth@webkit.org>
1895
1896         contentDispositionType misparses the Content-Disposition header in some obscure corner cases
1897         https://bugs.webkit.org/show_bug.cgi?id=77577
1898
1899         Reviewed by Eric Seidel.
1900
1901         The contentDispositionType extracts the disposition-type from the
1902         Content-Disposition header.  According to RFC 6266 (and previous RFCs),
1903         the disposition-type must be an RFC 2616 token.  Rather than enforce
1904         this general rule, we had special-cased some examples (including
1905         name=foo and filename=bar).  This patch generalizes our check to
1906         properly validate that the disposition-type is an RFC 2616 token.
1907
1908         In conjunction with some other work in the Chromium network stack, this
1909         causes Chromium to pass the following tests:
1910
1911           http://greenbytes.de/tech/tc2231/#inlonlyquoted
1912           http://greenbytes.de/tech/tc2231/#attonlyquoted
1913
1914         Without this patch, these test cases neither trigger a navigation nor a
1915         download in Chromium.  This patch does not appear to cause any visible
1916         change in Safari.  (Safari passes these tests both before and after
1917         this patch.)
1918
1919         * platform/network/HTTPParsers.cpp:
1920         (WebCore::isRFC2616Token):
1921         (WebCore::contentDispositionType):
1922             - This patch also adds a comment to
1923               filenameFromHTTPContentDisposition, which explains some of the
1924               was this function incorrectly implements the requirements in
1925               RFC 6266.  Resolving these issues is a subject for a future
1926               patch.
1927         * platform/network/HTTPParsers.h:
1928
1929 2012-02-01  Dan Bernstein  <mitz@apple.com>
1930
1931         WebCore part of <rdar://problem/10442663> Paginated display does not respect page-break-{before,after}
1932         https://bugs.webkit.org/show_bug.cgi?id=77505
1933
1934         Reviewed by Darin Adler.
1935
1936         * page/Page.h:
1937         (WebCore::Page::Pagination::Pagination): Added initializer for the behavesLikeColumns member
1938         variable.
1939         (WebCore::Page::Pagination::operator==): Added comparison of behavesLikeColumns values.
1940         (Pagination): Added behavesLikeColumns member variable. When set to false (the default),
1941         paginated display respects the page-break-{before,after} properties rather than the
1942         column-break-{before,after} ones.
1943         * rendering/ColumnInfo.h:
1944         (WebCore::ColumnInfo::ColumnInfo): Added initializer for the m_paginationUnit member.
1945         (WebCore::ColumnInfo::paginationUnit): Added this getter.
1946         (WebCore::ColumnInfo::setPaginationUnit): Added this setter.
1947         (ColumnInfo): Added m_paginationUnit member. It defaults to Column.
1948         * rendering/LayoutState.h:
1949         (WebCore::LayoutState::isPaginatingColumns): Changed to check the pagination unit.
1950         * rendering/RenderBlock.cpp:
1951         (WebCore::RenderBlock::layoutBlock): Added code to set the pagination unit in the ColumnInfo.
1952         (WebCore::RenderBlock::paginationUnit): Added. The base class implementation returns Column.
1953         * rendering/RenderBlock.h:
1954         * rendering/RenderView.cpp:
1955         (WebCore::RenderView::paginationUnit): Added this override that returns Page, unless
1956         this is the RenderView for the main frame and pagination is set to behave like columns.
1957         * rendering/RenderView.h:
1958
1959 2012-02-01  Florin Malita  <fmalita@google.com>
1960
1961         Backgrounds in HTML inside foreignObject don't draw
1962         https://bugs.webkit.org/show_bug.cgi?id=23111
1963
1964         Reviewed by Eric Seidel.
1965
1966         Test: svg/foreignObject/body-background.svg
1967
1968         * rendering/RenderBox.cpp:
1969         (WebCore::RenderBox::paintBackground):
1970         Tweak the <body> background inhibiting logic to allow drawing when the element is embedded in FOs.
1971
1972
1973 2012-02-01  Gustavo Lima Chaves  <glima@profusion.mobi>
1974
1975         Make one able to set the local storage (tracker) database dir's path
1976         https://bugs.webkit.org/show_bug.cgi?id=77006
1977
1978         Reviewed by Darin Adler.
1979
1980         There are no behavior changes with the diff, so no need for new tests.
1981
1982         * storage/StorageTracker.cpp:
1983         (WebCore::StorageTracker::setDatabaseDirectoryPath):
1984         (WebCore):
1985         (WebCore::StorageTracker::databaseDirectoryPath):
1986         * storage/StorageTracker.h:
1987         (StorageTracker):
1988
1989 2012-02-01  Anders Carlsson  <andersca@apple.com>
1990
1991         Fix Window build.
1992
1993         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1994         (WebCore::LayerClient::platformCALayerDidCreateTiles):
1995         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1996         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDidCreateTiles):
1997
1998 2012-02-01  John Yani  <vanuan@gmail.com>
1999
2000         GetMIMEDescription should return const char *
2001         https://bugs.webkit.org/show_bug.cgi?id=77297
2002
2003         Reviewed by Alexey Proskuryakov.
2004
2005         No new tests. No change in behaviour.
2006
2007         * plugins/blackberry/PluginPackageBlackBerry.cpp:
2008         (WebCore::PluginPackage::fetchInfo):
2009         * plugins/efl/PluginPackageEfl.cpp:
2010         (WebCore):
2011         (WebCore::PluginPackage::fetchInfo):
2012         * plugins/npapi.h:
2013         * plugins/npfunctions.h:
2014         * plugins/qt/PluginPackageQt.cpp:
2015         (WebCore::PluginPackage::fetchInfo):
2016
2017 2012-02-01  Timothy Hatcher  <timothy@apple.com>
2018
2019         Consolidate duplicate "willHide" functions in DetailedHeapshotView.js to fix
2020         a syntax error in JSC and make the Inspector open again in Release builds.
2021
2022         https://webkit.org/b/77424
2023
2024         Reviewed by Brian Weinstein.
2025
2026         * inspector/front-end/DetailedHeapshotView.js:
2027         (WebInspector.DetailedHeapshotView.prototype.willHide): Consolidated.
2028         (WebInspector.DetailedHeapshotView.prototype.willHide): Removed.
2029
2030 2012-02-01  Justin Novosad  <junov@chromium.org>
2031
2032         [Chromium] Enable deferred canvas rendering in the skia port
2033         https://bugs.webkit.org/show_bug.cgi?id=76732
2034
2035         Reviewed by Stephen White.
2036
2037         No new tests: covered by existing canvas layout tests
2038
2039         Adding a new setting to enable deferred 2d canvas rendering.
2040         Added support for deferred 2d canvas rendering in ImageBufferSkia
2041         and Canvas2DLayerChromium, mostly plumbing. Deffered rendering
2042         implementation is provided by skia (class SkDeferredCanvas).
2043
2044         * html/HTMLCanvasElement.cpp:
2045         (WebCore::HTMLCanvasElement::shouldDefer):
2046         (WebCore):
2047         (WebCore::HTMLCanvasElement::createImageBuffer):
2048         * html/HTMLCanvasElement.h:
2049         (HTMLCanvasElement):
2050         * page/Settings.cpp:
2051         (WebCore::Settings::Settings):
2052         (WebCore::Settings::setAccelerated2dCanvasEnabled):
2053         (WebCore):
2054         (WebCore::Settings::setDeferred2dCanvasEnabled):
2055         * page/Settings.h:
2056         (Settings):
2057         (WebCore::Settings::deferred2dCanvasEnabled):
2058         * platform/graphics/ImageBuffer.h:
2059         (WebCore::ImageBuffer::create):
2060         (ImageBuffer):
2061         * platform/graphics/cairo/ImageBufferCairo.cpp:
2062         (WebCore::ImageBuffer::ImageBuffer):
2063         * platform/graphics/cg/ImageBufferCG.cpp:
2064         (WebCore::ImageBuffer::ImageBuffer):
2065         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2066         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
2067         (WebCore):
2068         (WebCore::Canvas2DLayerChromium::setCanvas):
2069         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
2070         * platform/graphics/chromium/Canvas2DLayerChromium.h:
2071         (Canvas2DLayerChromium):
2072         * platform/graphics/qt/ImageBufferQt.cpp:
2073         (WebCore::ImageBuffer::ImageBuffer):
2074         * platform/graphics/skia/ImageBufferSkia.cpp:
2075         (AcceleratedDeviceContext):
2076         (WebCore::AcceleratedDeviceContext::AcceleratedDeviceContext):
2077         (WebCore::AcceleratedDeviceContext::prepareForDraw):
2078         (WebCore::AcceleratedDeviceContext::flush):
2079         (WebCore):
2080         (WebCore::createAcceleratedCanvas):
2081         (WebCore::ImageBuffer::ImageBuffer):
2082         * platform/graphics/wince/ImageBufferWinCE.cpp:
2083         (WebCore::ImageBuffer::ImageBuffer):
2084         * platform/graphics/wx/ImageBufferWx.cpp:
2085         (WebCore::ImageBuffer::ImageBuffer):
2086
2087 2012-02-01  Ryosuke Niwa  <rniwa@webkit.org>
2088
2089         Gcc build fix after r106482.
2090
2091         * platform/graphics/ca/GraphicsLayerCA.h:
2092         (GraphicsLayerCA):
2093
2094 2012-02-01  Beth Dakin  <bdakin@apple.com>
2095
2096         https://bugs.webkit.org/show_bug.cgi?id=77383
2097         Add a different didFirstVisuallNonEmptyLayout heuristic to experiment with
2098         -and corresponding-
2099         <rdar://problem/10709560>
2100
2101         Reviewed by Sam Weinig.
2102
2103         The goal is to re-vamp didFirstVisuallyNonEmptyLayout to be more accurate. 
2104         This patch adds a new heuristic called didNewFirstVisuallNonEmptyLayout and 
2105         leaves the old one for the time being. That is temporary.
2106
2107         The heuristic for didNewFirstVisuallNonEmptyLayout is to count relevant 
2108         painted RenderObjects on Page.
2109         * page/Page.cpp:
2110         (WebCore::Page::Page):
2111         (WebCore::Page::setPaintedObjectsCounterThreshold):
2112         (WebCore::Page::addRelevantRepaintedObject):
2113         * page/Page.h:
2114         (WebCore):
2115         (Page):
2116         (WebCore::Page::startCountingRepaintedObjects):
2117         * WebCore.exp.in:
2118
2119         Start counting relevant painted RenderObjects on the page once the first 
2120         layout is complete.
2121         * page/FrameView.cpp:
2122         (WebCore::FrameView::performPostLayoutTasks):
2123
2124         Machinery for firing didNewFirstVisuallNonEmptyLayout.
2125         * loader/EmptyClients.h:
2126         (WebCore::EmptyFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout):
2127         * loader/FrameLoader.cpp:
2128         (WebCore::FrameLoader::didNewFirstVisuallyNonEmptyLayout):
2129         (WebCore):
2130         * loader/FrameLoader.h:
2131         (FrameLoader):
2132         * loader/FrameLoaderClient.h:
2133         (WebCore::FrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout):
2134
2135         These RenderObjects are the ones that this api currently consider to be 
2136         relevant. If their repaint rects intersect with the viewRect, then they are 
2137         added to the relevant objects set on the Page.
2138         * rendering/InlineBox.cpp:
2139         (WebCore::InlineBox::paint):
2140         * rendering/InlineTextBox.cpp:
2141         (WebCore::InlineTextBox::paint):
2142         * rendering/RenderEmbeddedObject.cpp:
2143         (WebCore::RenderEmbeddedObject::paintReplaced):
2144         * rendering/RenderHTMLCanvas.cpp:
2145         (WebCore::RenderHTMLCanvas::paintReplaced):
2146         * rendering/RenderImage.cpp:
2147         (WebCore::RenderImage::paintReplaced):
2148         * rendering/RenderRegion.cpp:
2149         (WebCore::RenderRegion::paintReplaced):
2150         * rendering/RenderReplaced.cpp:
2151         (WebCore::RenderReplaced::paint):
2152         * rendering/RenderVideo.cpp:
2153         (WebCore::RenderVideo::paintReplaced):
2154         * rendering/svg/RenderSVGRoot.cpp:
2155         (WebCore::RenderSVGRoot::paintReplaced):
2156
2157 2012-02-01  Alexis Menard  <alexis.menard@openbossa.org>
2158
2159         CSSStyleDeclaration.getPropertyPriority() fails for CSS shorthand properties with 'important' priority
2160         https://bugs.webkit.org/show_bug.cgi?id=49058
2161
2162         Reviewed by Andreas Kling.
2163
2164         CSSMutableStyleDeclaration::getPropertyPriority was not handling shorthands properly. Shorthands are
2165         not part of the property list of the style so we need to query the longhands which are the one added
2166         in the list. Only if the longhands have equal priority the shorthand priority is known. I also renamed
2167         getPropertyPriority (not the CSSOM exposed method) to something more consistent with WebKit naming guidelines.
2168
2169         Test: fast/css/shorthand-priority.html
2170
2171         * css/CSSMutableStyleDeclaration.cpp:
2172         (WebCore::CSSMutableStyleDeclaration::propertyIsImportant):
2173         (WebCore::CSSMutableStyleDeclaration::addParsedProperty):
2174         (WebCore::CSSMutableStyleDeclaration::getPropertyPriority):
2175         * css/CSSMutableStyleDeclaration.h:
2176         (CSSMutableStyleDeclaration):
2177         * editing/EditingStyle.cpp:
2178         (WebCore::EditingStyle::extractAndRemoveTextDirection):
2179         (WebCore::EditingStyle::collapseTextDecorationProperties):
2180         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
2181         (WebCore::setTextDecorationProperty):
2182         * editing/RemoveCSSPropertyCommand.cpp:
2183         (WebCore::RemoveCSSPropertyCommand::doApply):
2184
2185 2012-02-01  Ryosuke Niwa  <rniwa@webkit.org>
2186
2187         Crash in EventHandler::updateDragAndDrop
2188         https://bugs.webkit.org/show_bug.cgi?id=77569
2189
2190         Reviewed by Alexey Proskuryakov.
2191
2192         Test: fast/events/remove-target-with-shadow-in-drag.html
2193
2194         * page/EventHandler.cpp:
2195         (WebCore::EventHandler::updateDragAndDrop):
2196
2197 2012-02-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2198
2199         Unreviewed, rolling out r106382.
2200         http://trac.webkit.org/changeset/106382
2201         https://bugs.webkit.org/show_bug.cgi?id=77571
2202
2203         Causing chromium crashes in PNGImageDecoder (Requested by
2204         japhet on #webkit).
2205
2206         * bindings/v8/V8Proxy.cpp:
2207         (WebCore::V8Proxy::evaluate):
2208         * page/Console.cpp:
2209         (WebCore::Console::time):
2210         (WebCore::Console::timeEnd):
2211         * platform/chromium/PlatformSupport.h:
2212         * platform/chromium/TraceEvent.h:
2213         (internal):
2214         (ScopeTracer):
2215         (WebCore::internal::ScopeTracer::ScopeTracer):
2216         (WebCore::internal::ScopeTracer::~ScopeTracer):
2217
2218 2012-02-01  Anders Carlsson  <andersca@apple.com>
2219
2220         Reviewed by Darin Adler.
2221
2222         Simplify the code that creates a new tile layer by getting a reference to the RetainPtr<WebTileLayer>&
2223         slot in the hash map and assign directly into it.
2224
2225         * platform/graphics/ca/mac/TileCache.mm:
2226         (WebCore::TileCache::revalidateTiles):
2227
2228 2012-02-01  Anders Carlsson  <andersca@apple.com>
2229
2230         Tile cache doesn't have an upper limit
2231         https://bugs.webkit.org/show_bug.cgi?id=77564
2232         <rdar://problem/10710744>
2233
2234         Reviewed by Darin Adler.
2235
2236         Cache enough tiles to cover 3x the visible height and 2x the visible width of the page,
2237         and drop tiles that are outside that area.
2238
2239         * platform/graphics/ca/GraphicsLayerCA.cpp:
2240         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
2241         Call GraphicsLayerClient::notifySyncRequired here, which will schedule a layer flush and ensure that
2242         the page layout is up to date before the new tiles are painted.
2243
2244         * platform/graphics/ca/PlatformCALayerClient.h:
2245         Add platformCALayerDidCreateTiles member function.
2246
2247         * platform/graphics/ca/mac/TileCache.h:
2248         Update for new/removed member functions and member variables.
2249
2250         * platform/graphics/ca/mac/TileCache.mm:
2251         (WebCore::TileCache::TileCache):
2252         Initialize the tile revalidation timer.
2253
2254         (WebCore::TileCache::tileCacheLayerBoundsChanged):
2255         If we don't have any tiles at all right now, revalidate the tiles immediately. Otherwise,
2256         schedule the revalidation timer.
2257
2258         (WebCore::TileCache::setNeedsDisplayInRect):
2259         Return early if we have no tiles.
2260
2261         (WebCore::TileCache::visibleRectChanged):
2262         Schedule tile revalidation.
2263
2264         (WebCore::TileCache::rectForTileIndex):
2265         New helper function that returns the bounds rect of a tile given its tile index.
2266
2267         (WebCore::TileCache::getTileIndexRangeForRect):
2268         Clamp the rect to the bounds of the tile cache layer.
2269
2270         (WebCore::TileCache::scheduleTileRevalidation):
2271         Schedule the revalidation timer if it hasn't already been scheduled.
2272
2273         (WebCore::TileCache::tileRevalidationTimerFired):
2274         Call revalidateTiles.
2275
2276         (WebCore::TileCache::revalidateTiles):
2277         Compute the tile coverage rect and remove all tiles that are outside. Create new tiles for any
2278         parts of the tile coverage rect that don't have tiles already.
2279
2280         (WebCore::TileCache::tileLayerAtIndex):
2281         Remove invalid assertions.
2282
2283 2012-02-01  Max Vujovic  <mvujovic@adobe.com>
2284
2285         Add support for fixed and percent min-width on the table element for table-layout: auto to
2286         match Firefox and Opera's behavior.
2287
2288         In FixedTableLayout.cpp, the computePreferredLogicalWidths method looks like it has
2289         issues based on the comment: "FIXME: This entire calculation is incorrect for both
2290         minwidth and maxwidth." (minwidth and maxwidth refer to the preferred widths, not the
2291         min-width and max-width styles). I have not implemented min-width for FixedTableLayout
2292         in this patch since it requires some more research around that comment.
2293
2294         min-width and max-width on the table element was discussed on the www-style list:
2295         http://lists.w3.org/Archives/Public/www-style/2012Jan/0684.html
2296
2297         min-width is not implemented on <table> for table-layout: auto
2298         https://bugs.webkit.org/show_bug.cgi?id=76553
2299
2300         Reviewed by Julien Chaffraix.
2301
2302         Test: fast/table/min-width.html
2303
2304         * rendering/AutoTableLayout.cpp:
2305         (WebCore::AutoTableLayout::computePreferredLogicalWidths):
2306
2307             If the min or max preferred logical width is less than a fixed min width style, it is
2308             set to the fixed min width style. Like a percent width style, a percent min-width style
2309             does not affect the min or max preferred logical widths computed by the table layout
2310             algorithm. RenderTable's computeLogicalWidth method handles percent min-width styles.
2311
2312             min-width for the table-layout: fixed case has been split out into this bug:
2313             https://bugs.webkit.org/show_bug.cgi?id=76948
2314
2315         * rendering/RenderTable.cpp:
2316         (WebCore::RenderTable::computeLogicalWidth):
2317
2318             If the RenderStyle's logical min width is defined and greater than the logical width
2319             calculation, this method sets the logical width to the logical min width.
2320
2321         (WebCore::RenderTable::convertStyleWidthToComputedWidth):
2322
2323             This new method generalizes and factors out logic from RenderTable::computeLogicalWidth
2324             that converted the width style to a computed value in the fixed and percent case.
2325             RenderTable::computeLogicalWidth now calls this method to determine the computed values
2326             for both the width style and the min-width style. In the future, it can also be used for
2327             the max-width style.
2328
2329             Note that this method handles the special CSS table case, which requires borders and
2330             paddings to be included in the computed width calculation. This applies to all width
2331             styles, including width, min-width, and max-width. Before, this special case was handled
2332             in RenderTable::computeLogicalWidth.
2333
2334         * rendering/RenderTable.h:
2335
2336 2012-02-01  Brian Salomon  <bsalomon@google.com>
2337
2338         [SKIA/CHROMIUM] Perform getImageData format conversions using Skia
2339         https://bugs.webkit.org/show_bug.cgi?id=77553
2340
2341         Reviewed by Stephen White.
2342
2343         Many existing canvas tests exercise this functionality.
2344
2345         * platform/graphics/skia/ImageBufferSkia.cpp:
2346         (WebCore::getImageData):
2347
2348 2012-02-01  Nate Chapin  <japhet@chromium.org>
2349
2350         preventDefault() in a mousedown in a subframe should not
2351         prevent the scrollbar from handling mouse movements if the
2352         cursor leaves the subframe.
2353         https://bugs.webkit.org/show_bug.cgi?id=73097
2354
2355         Reviewed by Darin Adler.
2356
2357         Test: fast/events/scroll-div-with-prevent-default-in-subframe.html
2358
2359         * page/EventHandler.cpp:
2360         (WebCore::EventHandler::handleMousePressEvent):
2361
2362 2012-02-01  Mario Sanchez Prada  <msanchez@igalia.com>
2363
2364         [GTK] editing/inserting/4960120-2.html flaky crash
2365         https://bugs.webkit.org/show_bug.cgi?id=76815
2366
2367         Reviewed by Martin Robinson.
2368
2369         Check if the node for the first parent object not ignoring
2370         accessibility is null before using it. This might happen with
2371         certain kind of accessibility objects, such as the root one (the
2372         scroller containing the webArea object as its only child).
2373
2374         * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
2375         (objectFocusedAndCaretOffsetUnignored): Add missing null check.
2376
2377 2012-02-01  Antti Koivisto  <antti@apple.com>
2378
2379         Make CSSMappedAttributeDeclaration have CSSMutableStyleDeclaration instead of being one
2380         https://bugs.webkit.org/show_bug.cgi?id=77545
2381
2382         Reviewed by Andreas Kling.
2383
2384         This is the easiest path for eliminating the last remaining subclass of CSSMutableStyleDeclaration.
2385         
2386         On negative side this increases memory use of CSSMappedAttributeDeclaration by one ptr and refcount
2387         (it loses the vptr) in total.
2388         
2389         This is not meant to be the end state, just an intermediate refactoring step. CSSMappedAttributeDeclaration
2390         should clearly be renamed too but this patch doesn't do that. It might not exist in its current form
2391         much longer.
2392
2393         * css/CSSMutableStyleDeclaration.cpp:
2394         (WebCore::CSSMutableStyleDeclaration::setProperty):
2395         (WebCore::CSSMutableStyleDeclaration::merge):
2396         * css/CSSMutableStyleDeclaration.h:
2397
2398             Remove protected section. No subclasses remain.        
2399             Rename setPropertyInternal() to setProperty(). All public methods here are internal.
2400         
2401         (CSSMutableStyleDeclaration):
2402         * css/CSSParser.cpp:
2403         (WebCore::CSSParser::parseMappedAttributeValue):
2404         * dom/Attribute.cpp:
2405         (WebCore::Attribute::clone):
2406         * dom/Attribute.h:
2407         (Attribute):
2408         (WebCore::Attribute::decl):
2409         (WebCore::Attribute::mappedAttributeDeclaration):
2410         (WebCore::Attribute::setMappedAttributeDeclaration):
2411         (WebCore::Attribute::Attribute):
2412         * dom/CSSMappedAttributeDeclaration.cpp:
2413         (WebCore::CSSMappedAttributeDeclaration::setMappedImageProperty):
2414         (WebCore::CSSMappedAttributeDeclaration::setMappedProperty):
2415         (WebCore::CSSMappedAttributeDeclaration::removeMappedProperty):
2416         * dom/CSSMappedAttributeDeclaration.h:
2417         (CSSMappedAttributeDeclaration):
2418         (WebCore::CSSMappedAttributeDeclaration::declaration):
2419         (WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration):
2420         
2421             Make CSSMutableStyleDeclaration a member instead of the base class.
2422         
2423         * dom/StyledElement.cpp:
2424         (WebCore::StyledElement::attributeChanged):
2425         (WebCore::StyledElement::removeCSSProperty):
2426         (WebCore::StyledElement::addCSSProperty):
2427         (WebCore::StyledElement::addCSSImageProperty):
2428         (WebCore::StyledElement::addCSSLength):
2429         (WebCore::StyledElement::addCSSColor):
2430         (WebCore::StyledElement::createMappedDecl):
2431         * svg/SVGStyledElement.cpp:
2432         (WebCore::SVGStyledElement::getPresentationAttribute):
2433
2434 2012-02-01  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2435
2436         [Qt] Set all PlatformTouchPoint values possible from a QTouch event.
2437         https://bugs.webkit.org/show_bug.cgi?id=77442
2438
2439         Reviewed by Kenneth Rohde Christiansen.
2440
2441         * platform/qt/PlatformTouchPointQt.cpp:
2442         (WebCore::PlatformTouchPoint::PlatformTouchPoint):
2443
2444 2012-02-01  Peter Rybin  <peter.rybin@gmail.com>
2445
2446         Web Inspector: CodeGeneratorInspector.py: move type builder code to dedicated InspectorTypeBuilder .h/.cpp
2447         https://bugs.webkit.org/show_bug.cgi?id=77471
2448
2449         Reviewed by Yury Semikhatsky.
2450
2451         Code is moved physically to other file -- generator is changed accrodingly.
2452
2453         * inspector/CodeGeneratorInspector.py:
2454         (String):
2455         (provides):
2456         (typename):
2457         (Array):
2458
2459 2012-02-01  Yury Semikhatsky  <yurys@chromium.org>
2460
2461         Web Inspector: debugger reports wrong sources when paused in inline script on page reload
2462         https://bugs.webkit.org/show_bug.cgi?id=77548
2463
2464         V8 returns treats each script source as ending with \n, now we take
2465         this into account when reporting script line count to the inspector
2466         front-end.
2467
2468         Reviewed by Vsevolod Vlasov.
2469
2470         Test: inspector/debugger/pause-in-inline-script.html
2471
2472         * bindings/js/ScriptDebugServer.cpp:
2473         (WebCore::ScriptDebugServer::dispatchDidParseSource):
2474         * bindings/v8/DebuggerScript.js:
2475
2476 2012-02-01  Shinya Kawanaka  <shinyak@google.com>
2477
2478         Content element should be able to be dynamically added/removed/replaced in a shadow tree.
2479         https://bugs.webkit.org/show_bug.cgi?id=76611
2480
2481         Reviewed by Hajime Morita
2482
2483         When a content element is added/removed/replaced in a shadow tree, we have to recreate
2484         the shadow tree to recalculate inclusions of content elements. Currently we didn't recalculate it
2485         when content element is removed. (When added, it is recalculated.)
2486         This patch enables us to recalcurate the shadow tree when content element is removed.
2487
2488         Test: fast/dom/shadow/content-element-move.html
2489
2490         * dom/Element.cpp:
2491         (WebCore::Element::attach):
2492           If a shadow root exists, attaches shadow tree before attaching child elements.
2493         * dom/ShadowRoot.cpp:
2494           Added a flag to recalculate shadow tree.
2495         (WebCore::ShadowRoot::ShadowRoot):
2496         (WebCore::ShadowRoot::recalcShadowTreeStyle):
2497           Recalculates light children and shadow tree.
2498         (WebCore::ShadowRoot::setNeedsReattachHostChildrenAndShadow):
2499         (WebCore::ShadowRoot::reattachHostChildrenAndShadow):
2500           Detaches shadow tree and host light children, and attaches them again.
2501         * dom/ShadowRoot.h:
2502         (WebCore::ShadowRoot::clearNeedsReattachHostChildrenAndShadow):
2503         (WebCore::ShadowRoot::needsReattachHostChildrenAndShadow):
2504         * html/shadow/HTMLContentElement.cpp:
2505         (WebCore::HTMLContentElement::attach):
2506           Does not need to detach included elements, because they are not attached in ContainerNode anymore.
2507         (WebCore::HTMLContentElement::detach):
2508           When a content element detached, reattaches a shadow tree.
2509
2510 2012-02-01  Peter Beverloo  <peter@chromium.org>
2511
2512         getIntersectionList causes transforms to be recalculated in SVG
2513         https://bugs.webkit.org/show_bug.cgi?id=77179
2514
2515         Reviewed by Nikolas Zimmermann.
2516
2517         Introduce a local variable to store the element's local-to-parent
2518         transformation matrix in, removing the need for the const_cast and
2519         stopping us from modifying any matrices elsewhere.
2520
2521         Test: svg/custom/intersection-list-transforms.svg
2522
2523         * rendering/svg/RenderSVGModelObject.cpp:
2524         (WebCore::getElementCTM):
2525
2526 2012-02-01  Vsevolod Vlasov  <vsevik@chromium.org>
2527
2528         Web Inspector: [InspectorIndexedDB] Add tests for database names and database structure requests.
2529         https://bugs.webkit.org/show_bug.cgi?id=77439
2530
2531         Reviewed by Pavel Feldman.
2532
2533         Tests: http/tests/inspector/indexeddb/database-names.html
2534                http/tests/inspector/indexeddb/database-structure.html
2535
2536         * inspector/front-end/IndexedDBModel.js:
2537         (WebInspector.IndexedDBModel.prototype.refreshDatabase):
2538
2539 2012-01-31  Vsevolod Vlasov  <vsevik@chromium.org>
2540
2541         Web Inspector: Scripts navigator becomes empty after "show folders" settings change.
2542         https://bugs.webkit.org/show_bug.cgi?id=77441
2543
2544         Reviewed by Pavel Feldman.
2545
2546         * inspector/front-end/ScriptsNavigator.js:
2547         (WebInspector.ScriptsNavigator.prototype._reset):
2548         * inspector/front-end/utilities.js:
2549
2550 2012-02-01  Shawn Singh  <shawnsingh@chromium.org>
2551
2552         Fix the semantics of passing contentsVisible flag to GraphicsLayers
2553         https://bugs.webkit.org/show_bug.cgi?id=76975
2554
2555         Reviewed by Simon Fraser.
2556
2557         This patch is covered by existing tests, in particular
2558         compositing/visibility/layer-visible-content.html; its
2559         expectations are rebaselined.
2560
2561         * rendering/RenderLayerBacking.cpp:
2562         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2563
2564 2012-02-01  Philippe Normand  <pnormand@igalia.com>
2565
2566         Unreviewed, another GTK build fix after r106446.
2567
2568         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2569         Restore webKitWebSrcGetProtocols as it was before r106446.
2570
2571 2012-02-01  Philippe Normand  <pnormand@igalia.com>
2572
2573         Unreviewed, GTK build fix after r106446.
2574
2575         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2576
2577 2012-02-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2578
2579         Unreviewed, rolling out r106432.
2580         http://trac.webkit.org/changeset/106432
2581         https://bugs.webkit.org/show_bug.cgi?id=77529
2582
2583         it breaks tests (Requested by shinyak on #webkit).
2584
2585         * dom/Element.cpp:
2586         (WebCore::Element::attach):
2587         * dom/ShadowRoot.cpp:
2588         (WebCore::ShadowRoot::recalcShadowTreeStyle):
2589         * dom/ShadowRoot.h:
2590         (ShadowRoot):
2591         * html/shadow/HTMLContentElement.cpp:
2592         (WebCore::HTMLContentElement::attach):
2593         (WebCore::HTMLContentElement::detach):
2594
2595 2012-02-01  Hayato Ito  <hayato@chromium.org>
2596
2597         Remove unnecessary [OldStyleObjC] from ShadowRoot.idl.
2598         https://bugs.webkit.org/show_bug.cgi?id=77516
2599
2600         Reviewed by Kentaro Hara.
2601
2602         No new tests. No change in behavior.
2603
2604         * dom/ShadowRoot.idl:
2605
2606 2012-01-26  Philippe Normand  <pnormand@igalia.com>
2607
2608         [GStreamer] 0.11 webkitwebsrc
2609         https://bugs.webkit.org/show_bug.cgi?id=77086
2610
2611         Port the webkitwebsrc element to GStreamer 0.11 APIs.
2612
2613         Reviewed by Gustavo Noronha Silva.
2614
2615         No new tests, existing http media layout tests should cover this.
2616
2617         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2618         (webkit_web_src_class_init):
2619
2620 2012-01-31  Hans Wennborg  <hans@chromium.org>
2621
2622         Speech Input: Report speech element rect relative to window rather than frame
2623         https://bugs.webkit.org/show_bug.cgi?id=76443
2624
2625         Reviewed by Darin Fisher.
2626
2627         When requesting speech input, report the speech element rect relative
2628         to the window rather than the frame. The embedder will typically use
2629         this position to show a bubble indicating that speech recognition is
2630         in progress.
2631
2632         Test: fast/speech/bubble-position.html
2633
2634         * html/shadow/TextControlInnerElements.cpp:
2635         (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
2636
2637 2012-01-31  Andreas Kling  <awesomekling@apple.com>
2638
2639         Make elements that don't have attributes smaller.
2640         <http://webkit.org/b/76876>
2641
2642         Reviewed by Sam Weinig and Antti Koivisto.
2643
2644         Move the inline style declaration from StyledElement to ElementAttributeData, since having
2645         an inline style declaration also implies having a style attribute on the element.
2646         This saves one CPU word per element that has no attributes.
2647
2648         This reduces memory consumption by 412 kB (on 64-bit) when viewing the full
2649         HTML5 spec at <http://whatwg.org/c>.
2650
2651         This was rolled out once because of a performance regression which has been averted this
2652         time around by adding an Element::ensureAttributeMap() so we can force creation of the
2653         NamedNodeMap without also serializing the inline style for the "style" attribute.
2654
2655         * dom/Element.h:
2656         (Element):
2657         (WebCore::Element::ensureAttributeMap):
2658         (WebCore):
2659         * dom/ElementAttributeData.h:
2660         (ElementAttributeData):
2661         * dom/NamedNodeMap.cpp:
2662         (WebCore::NamedNodeMap::ensureInlineStyleDecl):
2663         (WebCore):
2664         (WebCore::NamedNodeMap::destroyInlineStyleDecl):
2665         * dom/NamedNodeMap.h:
2666         (WebCore::NamedNodeMap::inlineStyleDecl):
2667         (NamedNodeMap):
2668         * dom/StyledElement.cpp:
2669         (WebCore::StyledElement::addSubresourceAttributeURLs):
2670         * dom/StyledElement.h:
2671         (WebCore::StyledElement::inlineStyleDecl):
2672         (WebCore::StyledElement::ensureInlineStyleDecl):
2673         (StyledElement):
2674         (WebCore::StyledElement::destroyInlineStyleDecl):
2675
2676 2012-01-31  Hayato Ito  <hayato@chromium.org>
2677
2678         Add APIs, getElementsByXXX family, to ShadowRoot IDL.
2679         https://bugs.webkit.org/show_bug.cgi?id=77323
2680
2681         Reviewed by Dimitri Glazkov.
2682
2683         Add APIs (getElementById, getElemesntByTagName, getElementsByClassName and getElementsByTagNameNS)
2684         to ShadowRoot IDL.
2685
2686         * dom/ShadowRoot.idl:
2687
2688 2012-01-31  Shinya Kawanaka  <shinyak@google.com>
2689
2690         Content element should be able to be dynamically added/removed/replaced in a shadow tree.
2691         https://bugs.webkit.org/show_bug.cgi?id=76611
2692
2693         Reviewed by Hajime Morita.
2694
2695         When a content element is added/removed/replaced in a shadow tree, we have to recreate
2696         the shadow tree to recalculate inclusions of content elements. Currently we didn't recalculate it
2697         when content element is removed. (When added, it is recalculated.)
2698         This patch enables us to recalcurate the shadow tree when content element is removed.
2699
2700         Test: fast/dom/shadow/content-element-move.html
2701
2702         * dom/Element.cpp:
2703         (WebCore::Element::attach):
2704           If a shadow root exists, attaches shadow tree before attaching child elements.
2705         * dom/ShadowRoot.cpp:
2706         (WebCore::ShadowRoot::recalcShadowTreeStyle):
2707           Recalculates light children and shadow tree.
2708         (WebCore::ShadowRoot::reattachHostChildrenAndShadow):
2709           Detaches shadow tree and host light children, and attaches them again.
2710         * dom/ShadowRoot.h:
2711           Added a flag to recalculate shadow tree.
2712         (WebCore::ShadowRoot::setNeedsShadowTreeStyleRecalc):
2713         (WebCore::ShadowRoot::clearNeedsShadowTreeStyleRecalc):
2714         (WebCore::ShadowRoot::needsShadowTreeStyleRecalc):
2715         * html/shadow/HTMLContentElement.cpp:
2716         (WebCore::HTMLContentElement::attach):
2717           Does not need to detach included elements, because they are not attached in ContainerNode anymore.
2718         (WebCore::HTMLContentElement::detach):
2719           When a content element detached, reattaches a shadow tree.
2720
2721 2012-01-31  Joe Thomas  <joethomas@motorola.com>
2722
2723         https://bugs.webkit.org/show_bug.cgi?id=76801
2724         Listboxes incorrectly display contents when cleared and then re-populated.
2725
2726         Whenever the number of items in the listbox is less than the size of listbox (number of visible items the listbox can accomodate),
2727         we set the listbox scroll-offset to zero. The scroll-offset of the Scrollbar should also be set to 0 so that when the listbox is re-populated,
2728         scrollbar position and the content inside the listbox are in sync.
2729
2730         Reviewed by Andreas Kling.
2731
2732         Tests: fast/forms/listbox-clear-restore.html
2733
2734         * rendering/RenderListBox.cpp:
2735         (WebCore::RenderListBox::computeLogicalHeight): Setting the scroll-offset of the Scrollbar to 0 when scrollbar is not needed.
2736
2737 2012-01-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2738
2739         Unreviewed. Fix build break after r106373.
2740
2741         * CMakeLists.txt:
2742
2743 2012-01-31  Adam Barth  <abarth@webkit.org>
2744
2745         HTMLPreloadScanner should understand the <base> element
2746         https://bugs.webkit.org/show_bug.cgi?id=77231
2747
2748         Reviewed by Eric Seidel.
2749
2750         Previously, the HTMLPreloadScanner would ignore the <base> element when
2751         preloading resources.  If there was a <base> tag, this could cause the
2752         preload scanner to make a bunch of useless requests.
2753
2754         This patch teaches the preload scanner to use <base> tags to better
2755         predict which URLs will be used by the document.
2756
2757         Tests: fast/preloader/first-base-tag-scanned-wins.html
2758                fast/preloader/first-base-tag-wins.html
2759                fast/preloader/understands-base-tag.html
2760
2761         * dom/Document.cpp:
2762         (WebCore::Document::completeURL):
2763         (WebCore):
2764         * dom/Document.h:
2765         (Document):
2766         (WebCore::Document::baseElementURL):
2767         * html/parser/HTMLPreloadScanner.cpp:
2768         (WebCore::HTMLNames::PreloadTask::PreloadTask):
2769         (WebCore::HTMLNames::PreloadTask::processAttributes):
2770         (WebCore::HTMLNames::PreloadTask::preload):
2771         (WebCore::HTMLNames::PreloadTask::baseElementHref):
2772         (PreloadTask):
2773         (WebCore::HTMLPreloadScanner::scan):
2774         (WebCore::HTMLPreloadScanner::processToken):
2775         (WebCore::HTMLPreloadScanner::updatePredictedBaseElementURL):
2776         (WebCore):
2777         * html/parser/HTMLPreloadScanner.h:
2778         (HTMLPreloadScanner):
2779
2780 2012-01-31  Raymond Liu  <raymond.liu@intel.com>
2781
2782         Dynamic allocate AudioBus with required number of channels for AudioNodeInput
2783         https://bugs.webkit.org/show_bug.cgi?id=76516
2784
2785         Reviewed by Kenneth Russell.
2786
2787         No new tests required.
2788
2789         * webaudio/AudioBasicProcessorNode.cpp:
2790         (WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput):
2791         * webaudio/AudioChannelMerger.cpp:
2792         (WebCore::AudioChannelMerger::checkNumberOfChannelsForInput):
2793         * webaudio/AudioGainNode.cpp:
2794         (WebCore::AudioGainNode::checkNumberOfChannelsForInput):
2795         * webaudio/AudioNode.cpp:
2796         (WebCore::AudioNode::checkNumberOfChannelsForInput):
2797         * webaudio/AudioNode.h:
2798         * webaudio/AudioNodeInput.cpp:
2799         (WebCore::AudioNodeInput::AudioNodeInput):
2800         (WebCore::AudioNodeInput::updateInternalBus):
2801         (WebCore::AudioNodeInput::internalSummingBus):
2802         * webaudio/AudioNodeInput.h:
2803
2804 2012-01-31  Alexey Proskuryakov  <ap@apple.com>
2805
2806         REGRESSION (WebKit2): event.keyCode is always zero when typing in Russian
2807         https://bugs.webkit.org/show_bug.cgi?id=77473
2808         <rdar://problem/10751357>
2809
2810         Reviewed by Darin Adler.
2811
2812         Test: platform/mac/fast/events/non-roman-key-code.html
2813
2814         * WebCore.exp.in:
2815         * platform/mac/PlatformEventFactoryMac.h:
2816         * platform/mac/PlatformEventFactoryMac.mm:
2817         (WebCore::keyIdentifierForKeyEvent):
2818         (WebCore::windowsKeyCodeForKeyEvent):
2819         Export functions for reuse in WebKit2. I did not attempt any larger refactoring at this time.
2820
2821 2012-01-31  Gregg Tavares  <gman@google.com>
2822
2823         Make WebGL put synthesized errors in the JS console
2824         https://bugs.webkit.org/show_bug.cgi?id=77267
2825
2826         Reviewed by Kenneth Russell.
2827
2828         No new functionality so no new tests.
2829
2830         * html/canvas/WebGLCompressedTextures.cpp:
2831         (WebCore::WebGLCompressedTextures::validateCompressedTexFuncData):
2832         (WebCore::WebGLCompressedTextures::compressedTexImage2D):
2833         (WebCore::WebGLCompressedTextures::compressedTexSubImage2D):
2834         * html/canvas/WebGLCompressedTextures.h:
2835         (WebGLCompressedTextures):
2836         * html/canvas/WebGLDebugShaders.cpp:
2837         (WebCore::WebGLDebugShaders::getTranslatedShaderSource):
2838         * html/canvas/WebGLRenderingContext.cpp:
2839         (WebCore::WebGLRenderingContext::activeTexture):
2840         (WebCore::WebGLRenderingContext::attachShader):
2841         (WebCore::WebGLRenderingContext::bindAttribLocation):
2842         (WebCore::WebGLRenderingContext::checkObjectToBeBound):
2843         (WebCore::WebGLRenderingContext::bindBuffer):
2844         (WebCore::WebGLRenderingContext::bindFramebuffer):
2845         (WebCore::WebGLRenderingContext::bindRenderbuffer):
2846         (WebCore::WebGLRenderingContext::bindTexture):
2847         (WebCore::WebGLRenderingContext::blendEquation):
2848         (WebCore::WebGLRenderingContext::blendEquationSeparate):
2849         (WebCore::WebGLRenderingContext::blendFunc):
2850         (WebCore::WebGLRenderingContext::blendFuncSeparate):
2851         (WebCore::WebGLRenderingContext::bufferData):
2852         (WebCore::WebGLRenderingContext::bufferSubData):
2853         (WebCore::WebGLRenderingContext::checkFramebufferStatus):
2854         (WebCore::WebGLRenderingContext::clear):
2855         (WebCore::WebGLRenderingContext::compileShader):
2856         (WebCore::WebGLRenderingContext::compressedTexImage2D):
2857         (WebCore::WebGLRenderingContext::compressedTexSubImage2D):
2858         (WebCore::WebGLRenderingContext::copyTexImage2D):
2859         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
2860         (WebCore::WebGLRenderingContext::createShader):
2861         (WebCore::WebGLRenderingContext::deleteObject):
2862         (WebCore::WebGLRenderingContext::depthRange):
2863         (WebCore::WebGLRenderingContext::detachShader):
2864         (WebCore::WebGLRenderingContext::disable):
2865         (WebCore::WebGLRenderingContext::disableVertexAttribArray):
2866         (WebCore::WebGLRenderingContext::validateWebGLObject):
2867         (WebCore::WebGLRenderingContext::drawArrays):
2868         (WebCore::WebGLRenderingContext::drawElements):
2869         (WebCore::WebGLRenderingContext::enable):
2870         (WebCore::WebGLRenderingContext::enableVertexAttribArray):
2871         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
2872         (WebCore::WebGLRenderingContext::framebufferTexture2D):
2873         (WebCore::WebGLRenderingContext::generateMipmap):
2874         (WebCore::WebGLRenderingContext::getActiveAttrib):
2875         (WebCore::WebGLRenderingContext::getActiveUniform):
2876         (WebCore::WebGLRenderingContext::getAttachedShaders):
2877         (WebCore::WebGLRenderingContext::getAttribLocation):
2878         (WebCore::WebGLRenderingContext::getBufferParameter):
2879         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
2880         (WebCore::WebGLRenderingContext::getParameter):
2881         (WebCore::WebGLRenderingContext::getProgramParameter):
2882         (WebCore::WebGLRenderingContext::getProgramInfoLog):
2883         (WebCore::WebGLRenderingContext::getRenderbufferParameter):
2884         (WebCore::WebGLRenderingContext::getShaderParameter):
2885         (WebCore::WebGLRenderingContext::getShaderInfoLog):
2886         (WebCore::WebGLRenderingContext::getShaderSource):
2887         (WebCore::WebGLRenderingContext::getTexParameter):
2888         (WebCore::WebGLRenderingContext::getUniform):
2889         (WebCore::WebGLRenderingContext::getUniformLocation):
2890         (WebCore::WebGLRenderingContext::getVertexAttrib):
2891         (WebCore::WebGLRenderingContext::hint):
2892         (WebCore::WebGLRenderingContext::isEnabled):
2893         (WebCore::WebGLRenderingContext::linkProgram):
2894         (WebCore::WebGLRenderingContext::pixelStorei):
2895         (WebCore::WebGLRenderingContext::readPixels):
2896         (WebCore::WebGLRenderingContext::renderbufferStorage):
2897         (WebCore::WebGLRenderingContext::scissor):
2898         (WebCore::WebGLRenderingContext::shaderSource):
2899         (WebCore::WebGLRenderingContext::stencilFunc):
2900         (WebCore::WebGLRenderingContext::stencilFuncSeparate):
2901         (WebCore::WebGLRenderingContext::stencilMaskSeparate):
2902         (WebCore::WebGLRenderingContext::texImage2DBase):
2903         (WebCore::WebGLRenderingContext::texImage2DImpl):
2904         (WebCore::WebGLRenderingContext::texImage2D):
2905         (WebCore::WebGLRenderingContext::videoFrameToImage):
2906         (WebCore::WebGLRenderingContext::texParameter):
2907         (WebCore::WebGLRenderingContext::texSubImage2DBase):
2908         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
2909         (WebCore::WebGLRenderingContext::texSubImage2D):
2910         (WebCore::WebGLRenderingContext::uniform1f):
2911         (WebCore::WebGLRenderingContext::uniform1fv):
2912         (WebCore::WebGLRenderingContext::uniform1i):
2913         (WebCore::WebGLRenderingContext::uniform1iv):
2914         (WebCore::WebGLRenderingContext::uniform2f):
2915         (WebCore::WebGLRenderingContext::uniform2fv):
2916         (WebCore::WebGLRenderingContext::uniform2i):
2917         (WebCore::WebGLRenderingContext::uniform2iv):
2918         (WebCore::WebGLRenderingContext::uniform3f):
2919         (WebCore::WebGLRenderingContext::uniform3fv):
2920         (WebCore::WebGLRenderingContext::uniform3i):
2921         (WebCore::WebGLRenderingContext::uniform3iv):
2922         (WebCore::WebGLRenderingContext::uniform4f):
2923         (WebCore::WebGLRenderingContext::uniform4fv):
2924         (WebCore::WebGLRenderingContext::uniform4i):
2925         (WebCore::WebGLRenderingContext::uniform4iv):
2926         (WebCore::WebGLRenderingContext::uniformMatrix2fv):
2927         (WebCore::WebGLRenderingContext::uniformMatrix3fv):
2928         (WebCore::WebGLRenderingContext::uniformMatrix4fv):
2929         (WebCore::WebGLRenderingContext::useProgram):
2930         (WebCore::WebGLRenderingContext::validateProgram):
2931         (WebCore::WebGLRenderingContext::vertexAttrib1f):
2932         (WebCore::WebGLRenderingContext::vertexAttrib1fv):
2933         (WebCore::WebGLRenderingContext::vertexAttrib2f):
2934         (WebCore::WebGLRenderingContext::vertexAttrib2fv):
2935         (WebCore::WebGLRenderingContext::vertexAttrib3f):
2936         (WebCore::WebGLRenderingContext::vertexAttrib3fv):
2937         (WebCore::WebGLRenderingContext::vertexAttrib4f):
2938         (WebCore::WebGLRenderingContext::vertexAttrib4fv):
2939         (WebCore::WebGLRenderingContext::vertexAttribPointer):
2940         (WebCore::WebGLRenderingContext::viewport):
2941         (WebCore::WebGLRenderingContext::forceLostContext):
2942         (WebCore::WebGLRenderingContext::loseContextImpl):
2943         (WebCore::WebGLRenderingContext::forceRestoreContext):
2944         (WebCore::WebGLRenderingContext::validateTextureBinding):
2945         (WebCore::WebGLRenderingContext::validateLocationLength):
2946         (WebCore::WebGLRenderingContext::validateSize):
2947         (WebCore::WebGLRenderingContext::validateString):
2948         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
2949         (WebCore::WebGLRenderingContext::validateTexFuncLevel):
2950         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
2951         (WebCore::WebGLRenderingContext::validateTexFuncData):
2952         (WebCore::WebGLRenderingContext::validateDrawMode):
2953         (WebCore::WebGLRenderingContext::validateStencilSettings):
2954         (WebCore::WebGLRenderingContext::validateStencilFunc):
2955         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
2956         (WebCore::WebGLRenderingContext::validateBlendEquation):
2957         (WebCore::WebGLRenderingContext::validateBlendFuncFactors):
2958         (WebCore::WebGLRenderingContext::validateCapability):
2959         (WebCore::WebGLRenderingContext::validateUniformParameters):
2960         (WebCore::WebGLRenderingContext::validateUniformMatrixParameters):
2961         (WebCore::WebGLRenderingContext::validateBufferDataParameters):
2962         (WebCore::WebGLRenderingContext::validateHTMLImageElement):
2963         (WebCore::WebGLRenderingContext::vertexAttribfImpl):
2964         (WebCore::WebGLRenderingContext::vertexAttribfvImpl):
2965         (WebCore::WebGLRenderingContext::maybeRestoreContext):
2966         (WebCore):
2967         (WebCore::WebGLRenderingContext::synthesizeGLError):
2968         * html/canvas/WebGLRenderingContext.h:
2969         (WebGLRenderingContext):
2970
2971 2012-01-31  Raymond Liu  <raymond.liu@intel.com>
2972
2973         Clean up m_processLock logic in AudioBasicProcessorNode and AudioGainNode
2974         https://bugs.webkit.org/show_bug.cgi?id=76772
2975
2976         Reviewed by Kenneth Russell.
2977
2978         No new tests required.
2979
2980         * webaudio/AudioBasicProcessorNode.cpp:
2981         (WebCore::AudioBasicProcessorNode::process):
2982         (WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput):
2983         * webaudio/AudioBasicProcessorNode.h:
2984         * webaudio/AudioGainNode.cpp:
2985         (WebCore::AudioGainNode::process):
2986         (WebCore::AudioGainNode::checkNumberOfChannelsForInput):
2987         * webaudio/AudioGainNode.h:
2988         (AudioGainNode):
2989
2990 2012-01-31  Adam Klein  <adamk@chromium.org>
2991
2992         ProcessingInstruction should not be a ContainerNode
2993         https://bugs.webkit.org/show_bug.cgi?id=75141
2994
2995         Reviewed by Darin Adler.
2996
2997         Per the DOM spec, ProcessingInstruction can't have any children.
2998         And the WebCore behavior already matches the spec by always returning
2999         false for childTypeAllowed(). This change simplifies
3000         ProcessingInstruction's implementation by making it subclass Node
3001         instead of ContainerNode.
3002
3003         Test: fast/dom/processing-instruction-appendChild-exceptions.xhtml
3004
3005         * dom/ContainerNode.cpp: Moved dispatchBeforeLoadEvent up to Node.
3006         * dom/ContainerNode.h:
3007         * dom/Node.cpp:
3008         (WebCore::Node::dispatchBeforeLoadEvent): Moved up from ContainerNode
3009         since it's used both by ProcessingInstruction and various Element
3010         subclasses.
3011         * dom/Node.h:
3012         * dom/ProcessingInstruction.cpp:
3013         (WebCore::ProcessingInstruction::ProcessingInstruction): Call Node constructor.
3014         (WebCore::ProcessingInstruction::insertedIntoDocument): Call Node impl.
3015         (WebCore::ProcessingInstruction::removedFromDocument): ditto.
3016         (WebCore::ProcessingInstruction::finishParsingChildren): ditto.
3017         * dom/ProcessingInstruction.h:
3018
3019 2012-01-31  Matthew Delaney  <mdelaney@apple.com>
3020
3021         Failing 2d.shadow.enable.off.2.html on Lion
3022         https://bugs.webkit.org/show_bug.cgi?id=77489
3023
3024         Reviewed by Dan Bernstein.
3025
3026         The canvas spec requires that shadows not be drawn under certain
3027         circumstances outlined here: http://www.whatwg.org/specs/web-apps/current-work/#shadows
3028         This patch adds in those checks which allows us to pass now (on Lion)
3029         the philip canvas test that was checking that constraint.
3030
3031         No new tests. Unskipping the test on Lion that this patch fixes.
3032
3033         * html/canvas/CanvasRenderingContext2D.cpp:
3034         (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault):
3035         (WebCore::CanvasRenderingContext2D::setShadow):
3036         (WebCore::CanvasRenderingContext2D::applyShadow):
3037         (WebCore::CanvasRenderingContext2D::shouldDrawShadows):
3038         * html/canvas/CanvasRenderingContext2D.h:
3039         (CanvasRenderingContext2D):
3040
3041 2012-01-31  Anders Carlsson  <andersca@apple.com>
3042
3043         TileCache::setNeedsDisplayInRect cleanup
3044         https://bugs.webkit.org/show_bug.cgi?id=77486
3045
3046         Reviewed by Andreas Kling.
3047
3048         * platform/graphics/ca/mac/TileCache.h:
3049         * platform/graphics/ca/mac/TileCache.mm:
3050         (WebCore::TileCache::setNeedsDisplayInRect):
3051         TileCache::tileLayerAtIndex can in the future return nil, so cope with that. Also, replace
3052         nested if statements with continue statements.
3053
3054         (WebCore::TileCache::getTileIndexRangeForRect):
3055         Rename this to better indicate that it returns a range of indices.
3056
3057 2012-01-31  Dana Jansens  <danakj@chromium.org>
3058
3059         Add contains() test to Region
3060         https://bugs.webkit.org/show_bug.cgi?id=72294
3061
3062         Reviewed by Anders Carlsson.
3063
3064         * platform/graphics/Region.cpp:
3065         (WebCore::Region::contains):
3066         (WebCore):
3067         * platform/graphics/Region.h:
3068         (Region):
3069         (Shape):
3070         (WebCore::operator==):
3071         (WebCore):
3072
3073 2012-01-31  Sami Kyostila  <skyostil@chromium.org>
3074
3075         [chromium] Compositor debug borders are not scaled correctly
3076         https://bugs.webkit.org/show_bug.cgi?id=77468
3077
3078         Use CCLayerImpl::contentBounds() instead of CCLayerImpl::bounds() to calculate debug
3079         border geometry so that the borders are properly scaled.
3080
3081         Reviewed by James Robinson.
3082
3083         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3084         (WebCore::CCLayerImpl::appendDebugBorderQuad):
3085
3086 2012-01-31  Sheriff Bot  <webkit.review.bot@gmail.com>
3087
3088         Unreviewed, rolling out r106376.
3089         http://trac.webkit.org/changeset/106376
3090         https://bugs.webkit.org/show_bug.cgi?id=77481
3091
3092         Broke WebGLLayerChromiumTest in webkit_unit_tests (Requested
3093         by kbr_google on #webkit).
3094
3095         * platform/graphics/gpu/DrawingBuffer.cpp:
3096         (WebCore):
3097         (WebCore::DrawingBuffer::reset):
3098
3099 2012-01-31  Mihnea Ovidenie  <mihnea@adobe.com>
3100
3101         [CSSRegions]Reduce the cases when the box style in region is computed
3102         https://bugs.webkit.org/show_bug.cgi?id=77446
3103
3104         Reviewed by David Hyatt.
3105
3106         Covered by existing region style tests.
3107
3108         * rendering/RenderRegion.cpp:
3109         (WebCore::RenderRegion::setRegionBoxesRegionStyle):
3110         (WebCore::RenderRegion::restoreRegionBoxesOriginalStyle):
3111
3112 2012-01-31  Anders Carlsson  <andersca@apple.com>
3113
3114         Put tiles in a HashMap
3115         https://bugs.webkit.org/show_bug.cgi?id=77480
3116
3117         Reviewed by Antti Koivisto.
3118
3119         Put tiles in a hash map keyed off the tile index.
3120
3121         * platform/graphics/ca/mac/TileCache.h:
3122         Shuffle member variables around so the order makes more sense.
3123         Add the tile map.
3124
3125         * platform/graphics/ca/mac/TileCache.mm:
3126         (WebCore::TileCache::TileCache):
3127         Update member initializers.
3128
3129         (WebCore::TileCache::setNeedsDisplayInRect):
3130         Call tileLayerAtIndex instead of tileLayerAtPosition.
3131
3132         (WebCore::TileCache::setAcceleratesDrawing):
3133         (WebCore::TileCache::setTileDebugBorderWidth):
3134         (WebCore::TileCache::setTileDebugBorderColor):
3135         Iterate over the hash map instead of the sublayers.
3136
3137         (WebCore::TileCache::resizeTileGrid):
3138         Add the created layers to the map.
3139
3140         (WebCore::TileCache::tileLayerAtIndex):
3141         Rename from tileLayerAtPoint to better reflect that this member function
3142         returns a tile layer at the given index and not the given point.
3143
3144 2012-01-31  Antti Koivisto  <antti@apple.com>
3145
3146         Make CSSOM style() return CSSStyleDeclaration*
3147         https://bugs.webkit.org/show_bug.cgi?id=77475
3148
3149         Reviewed by Anders Carlsson
3150
3151         CSSStyleRule::style() and some other places return CSSMutableStyleDeclaration. 
3152         They should return the plain CSSOM type instead.
3153         
3154         CSSMutableStyleDeclaration* should be available through non-CSSOM function.
3155
3156         * css/CSSFontFaceRule.h:
3157         (WebCore::CSSFontFaceRule::style):
3158         (WebCore::CSSFontFaceRule::declaration):
3159         * css/CSSFontSelector.cpp:
3160         (WebCore::CSSFontSelector::addFontFaceRule):
3161         * css/CSSStyleRule.h:
3162         (WebCore::CSSStyleRule::style):
3163         (WebCore::CSSStyleRule::declaration):
3164         * css/CSSStyleSelector.cpp:
3165         (WebCore::CSSStyleSelector::styleForKeyframe):
3166         * css/WebKitCSSKeyframeRule.h:
3167         (WebCore):
3168         (WebCore::WebKitCSSKeyframeRule::style):
3169         (WebCore::WebKitCSSKeyframeRule::declaration):
3170         (WebKitCSSKeyframeRule):
3171         * editing/EditingStyle.cpp:
3172         (WebCore::styleFromMatchedRulesForElement):
3173         * inspector/InspectorStyleSheet.cpp:
3174         (WebCore::InspectorStyleSheet::revalidateStyle):
3175         * page/PageSerializer.cpp:
3176         (WebCore::PageSerializer::retrieveResourcesForCSSRule):
3177         * svg/SVGFontFaceElement.cpp:
3178         (WebCore::SVGFontFaceElement::parseMappedAttribute):
3179         (WebCore::SVGFontFaceElement::fontFamily):
3180         (WebCore::SVGFontFaceElement::rebuildFontFace):
3181
3182 2012-01-31  Scott Graham  <scottmg@chromium.org>
3183
3184         [Chromium] Remove references to gyp cygwin build target
3185         https://bugs.webkit.org/show_bug.cgi?id=77253
3186
3187         Reviewed by Julien Chaffraix.
3188
3189         Target dependency is no longer required, it's done earlier in the
3190         build process.
3191
3192         * WebCore.gyp/WebCore.gyp:
3193
3194 2012-01-31  Jon Lee  <jonlee@apple.com>
3195
3196         Hidden form elements do not save their state prior to form submission
3197         https://bugs.webkit.org/show_bug.cgi?id=77391
3198         <rdar://problem/10563108>
3199
3200         Reviewed by Brady Eidson.
3201
3202         Test: fast/forms/state-restore-hidden.html
3203
3204         * html/HiddenInputType.cpp: Teach hidden inputs to save and restore their state.
3205         (WebCore::HiddenInputType::saveFormControlState):
3206         (WebCore::HiddenInputType::restoreFormControlState):
3207         * html/HiddenInputType.h:
3208         (HiddenInputType):
3209
3210 2012-01-31  Joshua Bell  <jsbell@chromium.org>
3211
3212         IndexedDB: IDBCursor.update() should raise exception if key changed
3213         https://bugs.webkit.org/show_bug.cgi?id=76952
3214
3215         Move the test from the async task to the synchronous call, per spec. Also re-ordered the tests
3216         done during the synchronous call and the asynchronous task to follow the spec order.
3217
3218         Reviewed by Tony Chang.
3219
3220         Tests: storage/indexeddb/cursor-update.html
3221
3222         * storage/IDBObjectStoreBackendImpl.cpp:
3223         (WebCore::IDBObjectStoreBackendImpl::put): Added check during update() call, order checks per spec.
3224         (WebCore::IDBObjectStoreBackendImpl::putInternal): Move effective key calculation inline.
3225         * storage/IDBObjectStoreBackendImpl.h: Removed selectKeyForPut method.
3226
3227 2012-01-31  Anders Carlsson  <andersca@apple.com>
3228
3229         Inform the tile cache whenever the visible rect changes
3230         https://bugs.webkit.org/show_bug.cgi?id=77470
3231
3232         Reviewed by Andreas Kling.
3233
3234         * platform/graphics/GraphicsLayer.h:
3235         (WebCore::GraphicsLayer::visibleRectChanged):
3236         Add empty function.
3237
3238         * platform/graphics/ca/GraphicsLayerCA.cpp:
3239         (WebCore::GraphicsLayerCA::visibleRectChanged):
3240         Call through to the PlatformCALayer.
3241
3242         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3243         (PlatformCALayer::visibleRectChanged):
3244         Call through to the underlying WebTileCacheLayer.
3245
3246         * platform/graphics/ca/mac/TileCache.mm:
3247         (WebCore::TileCache::visibleRectChanged):
3248         Add empty stub.
3249
3250         (WebCore::TileCache::visibleRect):
3251         Add new (currently unused) helper function that returns the visible rect of the
3252         tile cache layer.
3253
3254         * platform/graphics/ca/mac/WebTileCacheLayer.h:
3255         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
3256         (-[WebTileCacheLayer visibleRectChanged]):
3257         Call through to the TielCache object.
3258
3259         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3260         (PlatformCALayer::visibleRectChanged):
3261         Add stub.
3262
3263         * rendering/RenderLayerCompositor.cpp:
3264         (WebCore::RenderLayerCompositor::frameViewDidScroll):
3265         Call GraphicsLayer::visibleRectChanged.
3266
3267 2012-01-31  Antti Koivisto  <antti@apple.com>
3268
3269         Remove CSSStyleDeclaration isElementStyleDeclaration bit
3270         https://bugs.webkit.org/show_bug.cgi?id=77460
3271
3272         Reviewed by Andreas Kling.
3273
3274         Inline style declaration is now the only type of style declaration with element parent.
3275         We can remove the bit and the associated logic.
3276
3277         * bindings/js/JSDOMBinding.h:
3278         (WebCore::root):
3279         * css/CSSMutableStyleDeclaration.cpp:
3280         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
3281         (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
3282         * css/CSSMutableStyleDeclaration.h:
3283         (WebCore::CSSMutableStyleDeclaration::createInline):
3284         (CSSMutableStyleDeclaration):
3285         * css/CSSStyleDeclaration.cpp:
3286         (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
3287         (WebCore):
3288         (WebCore::CSSStyleDeclaration::parentStyleSheet):
3289         * css/CSSStyleDeclaration.h:
3290         (WebCore::CSSStyleDeclaration::parentRule):
3291         (WebCore::CSSStyleDeclaration::clearParentRule):
3292         (WebCore::CSSStyleDeclaration::parentElement):
3293         (WebCore::CSSStyleDeclaration::clearParentElement):
3294         (CSSStyleDeclaration):
3295
3296 2012-01-31  Dana Jansens  <danakj@chromium.org>
3297
3298         [chromium] Compute occlusion during paint loop
3299         https://bugs.webkit.org/show_bug.cgi?id=76858
3300
3301         Reviewed by James Robinson.
3302
3303         New unit tests in TiledLayerChromiumTest.cpp, CCLayerTreeHostCommonTest.cpp, CCLayerTreeHostTest.cpp
3304
3305         * platform/graphics/FloatRect.cpp:
3306         (WebCore::enclosedIntRect):
3307         (WebCore):
3308         * platform/graphics/FloatRect.h:
3309         (WebCore):
3310         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
3311         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
3312         * platform/graphics/chromium/Canvas2DLayerChromium.h:
3313         (Canvas2DLayerChromium):
3314         * platform/graphics/chromium/ContentLayerChromium.cpp:
3315         (WebCore::ContentLayerChromium::paintContentsIfDirty):
3316         * platform/graphics/chromium/ContentLayerChromium.h:
3317         (ContentLayerChromium):
3318         * platform/graphics/chromium/ImageLayerChromium.cpp:
3319         (WebCore::ImageLayerChromium::paintContentsIfDirty):
3320         * platform/graphics/chromium/ImageLayerChromium.h:
3321         (ImageLayerChromium):
3322         * platform/graphics/chromium/LayerChromium.cpp:
3323         (WebCore::LayerChromium::contentToScreenSpaceTransform):
3324         (WebCore):
3325         (WebCore::LayerChromium::addSelfToOccludedScreenSpace):
3326         (WebCore::LayerChromium::isPaintedAxisAlignedInScreen):
3327         * platform/graphics/chromium/LayerChromium.h:
3328         (WebCore):
3329         (WebCore::LayerChromium::paintContentsIfDirty):
3330         (LayerChromium):
3331         * platform/graphics/chromium/RenderSurfaceChromium.h:
3332         (RenderSurfaceChromium):
3333         * platform/graphics/chromium/TiledLayerChromium.cpp:
3334         (WebCore::TiledLayerChromium::addSelfToOccludedScreenSpace):
3335         * platform/graphics/chromium/TiledLayerChromium.h:
3336         (WebCore):
3337         ():
3338         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3339         (WebCore::CCLayerTreeHost::paintContentsIfDirty):
3340         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
3341         (RenderSurfaceRegion):
3342         (WebCore):
3343         (WebCore::pushTargetRenderSurfaceRegion):
3344         (WebCore::popAndPushTargetRenderSurfaceRegion):
3345         (WebCore::CCLayerTreeHost::paintLayerContents):
3346         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3347         (WebCore):
3348         ():
3349         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
3350
3351 2012-01-31  John Bates  <jbates@google.com>
3352
3353         [Chromium] Add chromium-style tracing support
3354         https://bugs.webkit.org/show_bug.cgi?id=76885
3355
3356         Reviewed by Darin Fisher.
3357
3358         This code enables WebKit trace events to pass through more data to the
3359         chromium platform tracing API and generally to use the full tracing
3360         API provided by chromium.
3361
3362         * bindings/v8/V8Proxy.cpp:
3363         (WebCore::V8Proxy::evaluate): Replace old tracing API.
3364         * page/Console.cpp:
3365         (WebCore::Console::time): Replace old tracing API.
3366         (WebCore::Console::timeEnd): Replace old tracing API.
3367         * platform/chromium/PlatformSupport.h:
3368         * platform/chromium/TraceEvent.h:
3369         (WebCore::TraceEvent::TraceID::TraceID):
3370         (WebCore::TraceEvent::TraceID::data):
3371         (WebCore::TraceEvent::TraceStringWithCopy::TraceStringWithCopy):
3372         (WebCore::TraceEvent::TraceStringWithCopy::operator const char* ):
3373         (WebCore::TraceEvent::setTraceValue):
3374         (WebCore::TraceEvent::addTraceEvent):
3375         (WebCore::TraceEvent::TraceEndOnScopeClose::TraceEndOnScopeClose):
3376         (WebCore::TraceEvent::TraceEndOnScopeClose::~TraceEndOnScopeClose):
3377         (WebCore::TraceEvent::TraceEndOnScopeClose::initialize):
3378         (WebCore::TraceEvent::TraceEndOnScopeClose::addEventIfEnabled):
3379         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::TraceEndOnScopeCloseThreshold):
3380         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::~TraceEndOnScopeCloseThreshold):
3381         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::initialize):
3382         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::addEventIfEnabled):
3383
3384 2012-01-31  Ryosuke Niwa  <rniwa@webkit.org>
3385
3386         Crash in DeleteSelectionCommand::handleGeneralDelete when attempting to delete the start block
3387         https://bugs.webkit.org/show_bug.cgi?id=77077
3388
3389         Reviewed by Enrica Casucci.
3390
3391         The crash was caused by a missing null check after removing the position out of the start block.
3392         Fixed the bug by adding an early return.
3393
3394         Tests: editing/deleting/delete-start-block.html
3395                editing/selection/move-into-empty-root-inline-box.html
3396
3397         * editing/DeleteSelectionCommand.cpp:
3398         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
3399
3400 2012-01-31  Rafael Brandao  <rafael.lobo@openbossa.org>
3401
3402         HTMLIsIndexElement should not expose HTMLInputElement properties
3403         https://bugs.webkit.org/show_bug.cgi?id=76095
3404
3405         Reviewed by Eric Seidel.
3406
3407         This is a buildfix for r106373.
3408
3409         * DerivedSources.pri: Removed reference to HTMLIsIndexElement.idl
3410
3411 2012-01-31  Yongsheng Zhu  <yongsheng.zhu@intel.com>
3412
3413         WebGL must allocate smaller drawing buffer when the allocation fails. 
3414         https://bugs.webkit.org/show_bug.cgi?id=76654
3415
3416         Reviewed by Kenneth Russell.
3417
3418         Test: fast/canvas/webgl/drawingbuffer-test.html
3419
3420         * platform/graphics/gpu/DrawingBuffer.cpp:
3421         (WebCore):
3422         (WebCore::DrawingBuffer::create):
3423         (WebCore::DrawingBuffer::reset):
3424
3425 2012-01-25  Eric Seidel  <eric@webkit.org>
3426
3427         HTMLIsIndexElement should not expose HTMLInputElement properties
3428         https://bugs.webkit.org/show_bug.cgi?id=76095
3429
3430         Reviewed by Adam Barth.
3431
3432         document.createElement("isindex") should produce an HTMLUnknownElement
3433         per the HTML5 spec.  The parser automagically translates <isindex> into
3434         a whole dom tree roughly representing what <isindex> used to do 15 years ago. :)
3435
3436         This patch just removes our support for HTMLIsIndexElement.  The parser
3437         support was already in.  Having support for HTMLIsIndexElement was causing
3438         one of the IE TestCenter tests to fail.
3439
3440         Test: fast/dom/HTMLIsIndexElement/prototype-chain.html
3441
3442         * DerivedSources.cpp:
3443         * DerivedSources.make:
3444         * DerivedSources.pri:
3445         * GNUmakefile.list.am:
3446         * Target.pri:
3447         * WebCore.exp.in:
3448         * WebCore.gypi:
3449         * WebCore.order:
3450         * WebCore.vcproj/WebCore.vcproj:
3451         * WebCore.xcodeproj/project.pbxproj:
3452         * bindings/gobject/GNUmakefile.am:
3453         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
3454         (WebKit::createHTMLElementWrapper):
3455         * bindings/objc/DOM.mm:
3456         (WebCore::createElementClassMap):
3457         * bindings/objc/DOMHTML.h:
3458         * bindings/objc/PublicDOMInterfaces.h:
3459         * html/HTMLElementsAllInOne.cpp:
3460         * html/HTMLIsIndexElement.cpp: Removed.
3461         * html/HTMLIsIndexElement.h: Removed.
3462         * html/HTMLIsIndexElement.idl: Removed.
3463         * html/HTMLTagNames.in:
3464         * page/DOMWindow.idl:
3465
3466 2012-01-31  Alexis Menard  <alexis.menard@openbossa.org>
3467
3468         Unreviewed include cleanup.
3469
3470         Tested locally on Qt and Chromium port.
3471
3472         * dom/Node.cpp:
3473
3474 2012-01-31  Arko Saha  <arko@motorola.com>
3475
3476         The spec renamed addTrack() to addTextTrack().
3477         https://bugs.webkit.org/show_bug.cgi?id=77381
3478
3479         Reviewed by Eric Carlson.
3480
3481         Renamed addTrack() to addTextTrack().
3482         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#media-elements
3483
3484         * html/HTMLMediaElement.cpp:
3485         (WebCore::HTMLMediaElement::addTextTrack):
3486         * html/HTMLMediaElement.h:
3487         (WebCore::HTMLMediaElement::addTextTrack):
3488         * html/HTMLMediaElement.idl:
3489
3490 2012-01-31  Peter Rybin  <peter.rybin@gmail.com>
3491
3492         Web Inspector: CodeGeneratorInspector.py: reimplement generated array types
3493         https://bugs.webkit.org/show_bug.cgi?id=77289
3494
3495         Reviewed by Vsevolod Vlasov.
3496
3497         Arrays are now rendered as a single template class. Its type-specific
3498         details are provided by an additional ArrayItemHelper class that is
3499         defined using C++ specialization technique.
3500
3501         * inspector/CodeGeneratorInspector.py:
3502         (RawTypes.String):
3503         (RawTypes.String.get_array_item_raw_c_type_text):
3504         (RawTypes.Int):
3505         (RawTypes.Int.get_array_item_raw_c_type_text):
3506         (RawTypes.Number):
3507         (RawTypes.Number.get_array_item_raw_c_type_text):
3508         (RawTypes.Bool):
3509