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