[Chromium] Incremental texture updates are not atomic.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-01-21  David Reveman  <reveman@chromium.org>
2
3         [Chromium] Incremental texture updates are not atomic.
4         https://bugs.webkit.org/show_bug.cgi?id=72672
5
6         Reviewed by Adam Barth.
7
8         Use a new set of textures for each commit when incremental
9         texture updates are enabled.
10
11         This patch is tested by the following unit test:
12         - CCLayerTreeHostTestAtomicCommit.runMultiThread
13
14         * platform/graphics/chromium/ManagedTexture.cpp:
15         (WebCore::ManagedTexture::ManagedTexture):
16         (WebCore::ManagedTexture::steal):
17         * platform/graphics/chromium/ManagedTexture.h:
18         * platform/graphics/chromium/TiledLayerChromium.cpp:
19         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
20         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
21         (WebCore::CCLayerTreeHost::initialize):
22         (WebCore::CCLayerTreeHost::commitComplete):
23         (WebCore::CCLayerTreeHost::deleteTextureAfterCommit):
24         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
25         (WebCore::CCSettings::CCSettings):
26         * platform/graphics/chromium/cc/CCProxy.h:
27         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
28         (WebCore::CCSingleThreadProxy::partialTextureUpdateCapability):
29         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
30         (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources):
31         (WebCore::CCThreadProxy::partialTextureUpdateCapability):
32         * platform/graphics/chromium/cc/CCThreadProxy.h:
33
34 2012-01-21  Pablo Flouret  <pablof@motorola.com>
35
36         Add .url attribute alongside .URL in EventSource and WebSocket to comply with the specs but not break existing usage.
37         https://bugs.webkit.org/show_bug.cgi?id=40899
38
39         Reviewed by Adam Barth.
40
41         Tests: fast/eventsource/eventsource-url-attribute.html
42                http/tests/websocket/tests/hixie76/url-attribute.html
43                http/tests/websocket/tests/hybi/url-attribute.html
44
45         * page/EventSource.idl:
46         * websockets/WebSocket.idl:
47
48 2012-01-21  Sheriff Bot  <webkit.review.bot@gmail.com>
49
50         Unreviewed, rolling out r105564.
51         http://trac.webkit.org/changeset/105564
52         https://bugs.webkit.org/show_bug.cgi?id=76792
53
54         Does not compile on Chromium Mac (Requested by abarth on
55         #webkit).
56
57         * platform/graphics/chromium/ManagedTexture.cpp:
58         * platform/graphics/chromium/ManagedTexture.h:
59         * platform/graphics/chromium/TiledLayerChromium.cpp:
60         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
61         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
62         (WebCore::CCLayerTreeHost::initialize):
63         (WebCore::CCLayerTreeHost::commitComplete):
64         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
65         (WebCore::CCSettings::CCSettings):
66         * platform/graphics/chromium/cc/CCProxy.h:
67         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
68         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
69         (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources):
70         * platform/graphics/chromium/cc/CCThreadProxy.h:
71
72 2012-01-20  Chris Marrin  <cmarrin@apple.com>
73
74         Implement hardware accelerated Brightness and contrast filters
75         https://bugs.webkit.org/show_bug.cgi?id=75521
76         https://bugs.webkit.org/show_bug.cgi?id=76719
77
78         Reviewed by Simon Fraser.
79
80         Implemented hardware accelerated brightness and contrast filters. This also fixes
81         the bug where grayscale filter was accidentally never getting hardware accelerated.
82         It also complies with proposed spec changes for the brightness filter to be additive 
83         rather than multiplicative, according to https://bugs.webkit.org/show_bug.cgi?id=76719. 
84         Had to make both fixes in the same patch because I had to change the allowed brightness
85         values for the hardware version, so I had to change the software version as well.
86
87         Tests: css3/filters/effect-brightness-hw.html
88                css3/filters/effect-contrast-hw.html
89
90         * css/CSSParser.cpp:
91         (WebCore::CSSParser::parseBuiltinFilterArguments):
92         * css/CSSStyleSelector.cpp:
93         (WebCore::CSSStyleSelector::createFilterOperations):
94         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
95         (PlatformCALayer::setFilters):
96         (PlatformCALayer::filtersCanBeComposited):
97         * rendering/FilterEffectRenderer.cpp:
98         (WebCore::FilterEffectRenderer::build):
99
100 2012-01-21  Nikolas Zimmermann  <nzimmermann@rim.com>
101
102         <feImage> ignores preserveAspectRatio="none"
103         https://bugs.webkit.org/show_bug.cgi?id=76780
104
105         Reviewed by Antti Koivisto.
106
107         preserveAspectRatio="none" was ignored in SVGFEImage. It always called transformRect() w/o checking
108         whether it was supposed to transform the rect or not - move code from RenderSVGImage right into
109         transformRect(), to do nothing if preserveAspectRatio="none" was given.
110
111         Test: svg/filters/feImage-preserveAspectratio.svg
112
113         * rendering/svg/RenderSVGImage.cpp:
114         (WebCore::RenderSVGImage::paint):
115         * svg/SVGPreserveAspectRatio.cpp:
116         (WebCore::SVGPreserveAspectRatio::transformRect):
117
118 2012-01-21  Jochen Eisinger  <jochen@chromium.org>
119
120         history.replaceState should update the HistoryItem to use a GET method if previously non-GET (POST)
121         https://bugs.webkit.org/show_bug.cgi?id=76721
122
123         Reviewed by Mihai Parparita.
124
125         Tests: http/tests/history/replacestate-post-to-get-2.html
126                http/tests/history/replacestate-post-to-get.html
127
128         * loader/HistoryController.cpp:
129         (WebCore::HistoryController::replaceState):
130
131 2012-01-21  Florin Malita  <fmalita@google.com>
132
133         Null dereference in SVGDocumentExtensions::removePendingResource when updating <use>'s href
134         https://bugs.webkit.org/show_bug.cgi?id=69284
135
136         Reviewed by Nikolas Zimmermann.
137
138         Test: svg/custom/use-crash-pending-resource.svg
139
140         The crash is caused by assumptions in SVGUseElement that xlink:href is the only
141         pending resource. This patch adds support for dealing with multiple pending resources.
142
143         * rendering/svg/RenderSVGResourceContainer.cpp:
144         (WebCore::RenderSVGResourceContainer::registerResource):
145         * svg/SVGDocumentExtensions.cpp:
146         (WebCore::SVGDocumentExtensions::hasPendingResource):
147         (WebCore::SVGDocumentExtensions::isElementPendingResources):
148         (WebCore::SVGDocumentExtensions::isElementPendingResource):
149         (WebCore::SVGDocumentExtensions::removePendingResourceForElement):
150         * svg/SVGDocumentExtensions.h:
151         * svg/SVGStyledElement.cpp:
152         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
153         (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible):
154         Renamed SVGDocumentExtensions::hasPendingResources -> Renamed SVGDocumentExtensions::hasPendingResource.
155         Renamed SVGDocumentExtensions::isElementInPendingResources -> SVGDocumentExtensions::isElementPendingResources.
156         Added support for querying and removing pending resources for a specific element.
157
158         * svg/SVGUseElement.cpp:
159         (WebCore::SVGUseElement::svgAttributeChanged):
160         (WebCore::SVGUseElement::buildPendingResource):
161         Refactored to support multiple pending resources.
162
163 2012-01-21  Stephen Chenney  <schenney@chromium.org>
164
165         REGRESSION (Safari 5.0.5 - ToT): crash in SVG test http://dev.w3.org/SVG/profiles/1.1F2/test/harness/htmlObjectApproved/animate-elem-39-t.html
166         https://bugs.webkit.org/show_bug.cgi?id=64671
167
168         Reviewed by Nikolas Zimmermann.
169
170         No new tests. This change is to fix crashes in existing tests.
171
172         * svg/animation/SVGSMILElement.cpp:
173         (WebCore::SVGSMILElement::beginListChanged): If the new begin time is
174         later than the current end time, and the event time is also after then
175         end time (but we have not yet updated to that time) and the animation
176         is active, we need to make the animation inactive explicitly.
177
178 2012-01-21  Benjamin Poulain  <bpoulain@apple.com>
179
180         PopupMenuClient::multiple() should be const
181         https://bugs.webkit.org/show_bug.cgi?id=76771
182
183         Reviewed by Kent Tamura.
184
185         * platform/PopupMenuClient.h:
186         (WebCore::PopupMenuClient::multiple):
187         * rendering/RenderMenuList.cpp:
188         (WebCore::RenderMenuList::multiple):
189         * rendering/RenderMenuList.h:
190
191 2012-01-20  Mark Pilgrim  <pilgrim@chromium.org>
192
193         Switch indexeddb to use supplemental IDL for DOMWindow
194         https://bugs.webkit.org/show_bug.cgi?id=76723
195
196         Reviewed by Adam Barth.
197
198         No new tests required, all existing tests pass.
199
200         * Modules/indexeddb: Added.
201         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp: Added. webkitIndexedDB() method previously in DOMWindow.cpp
202         (WebCore::DOMWindowIndexedDatabase::DOMWindowIndexedDatabase):
203         (WebCore::DOMWindowIndexedDatabase::~DOMWindowIndexedDatabase):
204         (WebCore::DOMWindowIndexedDatabase::webkitIndexedDB):
205         * Modules/indexeddb/DOMWindowIndexedDatabase.h: Added.
206         * Modules/indexeddb/DOMWindowIndexedDatabase.idl: Added. attributes previously in DOMWindow.idl
207         * WebCore.gyp/WebCore.gyp: add Modules/indexeddb/ directory
208         * WebCore.gypi: add Modules/indexeddb/*
209         * page/DOMWindow.cpp: remove webkitIndexedDB() method, add accessor methods for m_idbFactory
210         (WebCore::DOMWindow::getIDBFactory):
211         (WebCore::DOMWindow::setIDBFactory):
212         * page/DOMWindow.h:
213         * page/DOMWindow.idl:
214
215 2012-01-20  David Levin  <levin@chromium.org>
216
217         Allow isContextThread to be called while in ~ScriptExecutionContext.
218         https://bugs.webkit.org/show_bug.cgi?id=76756
219
220         Reviewed by Adam Barth.
221
222         It is possible for objects to get torn down or get called from ~ScriptExecutionContext
223         and in turn call isContextThread. The resulting behavior is undefined. This change defines
224         the behavior. I don't know of any places that do this but I have a test that is rarely
225         failing due to isContextThread being false. This is my best guess as to why, and I
226         don't see a reason to try to avoid calling isContextThread at this point.
227
228         No new functionality exposed so no new tests.
229
230         * dom/ScriptExecutionContext.h:
231         (WebCore::ScriptExecutionContext::isContextThread):
232
233 2012-01-20  Alexandre Elias  <aelias@google.com>
234
235         [chromium] Write unit tests for compositor-thread zooming
236         https://bugs.webkit.org/show_bug.cgi?id=71529
237
238         Reviewed by James Robinson.
239
240         Add unit tests for pinch zoom and page scale animation.  Includes
241         small cleanups in CCLayerTreeHostImpl for testability.
242
243         * platform/graphics/chromium/cc/CCInputHandler.h:
244         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
245         (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation):
246         (WebCore::CCLayerTreeHostImpl::setViewportSize):
247         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
248
249 2012-01-20  David Reveman  <reveman@chromium.org>
250
251         [Chromium] Incremental texture updates are not atomic.
252         https://bugs.webkit.org/show_bug.cgi?id=72672
253
254         Reviewed by James Robinson.
255
256         Use a new set of textures for each commit when incremental
257         texture updates are enabled.
258
259         This patch is tested by the following unit test:
260         - CCLayerTreeHostTestAtomicCommit.runMultiThread
261
262         * platform/graphics/chromium/ManagedTexture.cpp:
263         (WebCore::ManagedTexture::ManagedTexture):
264         (WebCore::ManagedTexture::steal):
265         * platform/graphics/chromium/ManagedTexture.h:
266         * platform/graphics/chromium/TiledLayerChromium.cpp:
267         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
268         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
269         (WebCore::CCLayerTreeHost::initialize):
270         (WebCore::CCLayerTreeHost::commitComplete):
271         (WebCore::CCLayerTreeHost::deleteTextureAfterCommit):
272         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
273         (WebCore::CCSettings::CCSettings):
274         * platform/graphics/chromium/cc/CCProxy.h:
275         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
276         (WebCore::CCSingleThreadProxy::partialTextureUpdateCapability):
277         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
278         (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources):
279         (WebCore::CCThreadProxy::partialTextureUpdateCapability):
280         * platform/graphics/chromium/cc/CCThreadProxy.h:
281
282 2012-01-20  Chris Rogers  <crogers@google.com>
283
284         De-zippering incorrectly snaps to target gain
285         https://bugs.webkit.org/show_bug.cgi?id=76741
286
287         Reviewed by Kenneth Russell.
288
289         * platform/audio/AudioBus.cpp:
290
291 2012-01-20  Dana Jansens  <danakj@chromium.org>
292
293         [chromium] Partially filled pixels do not occlude pixels below them.
294         https://bugs.webkit.org/show_bug.cgi?id=76658
295
296         Reviewed by James Robinson.
297
298         Test: compositing/culling/tile-occlusion-boundaries.html
299
300         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
301         (WebCore::enclosedIntRect):
302         (WebCore::CCQuadCuller::cullOccludedQuads):
303
304 2012-01-20  Ami Fischman  <fischman@chromium.org>
305
306         Small cleanup of {get,put}CurrentFrame for  WebMediaPlayerClientImpl/CCVideoLayerImpl.
307         https://bugs.webkit.org/show_bug.cgi?id=76332
308
309         Reviewed by James Robinson.
310
311         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
312         (WebCore::CCVideoLayerImpl::draw):
313
314 2012-01-20  Brady Eidson  <beidson@apple.com>
315
316         <rdar://problem/9328684> and https://bugs.webkit.org/show_bug.cgi?id=62764
317         Frequent crashes due to null frame below ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
318
319         Reviewed by Sam Weinig.
320
321         No way to reproduce without special malloc debugging and that doesn't even reproduce on all platforms.  So still no test.
322
323         * loader/DocumentLoader.cpp:
324         (WebCore::DocumentLoader::detachFromFrame): Protect m_frame for the duration of this method.
325
326 2012-01-20  Alexey Proskuryakov  <ap@apple.com>
327
328         WebCore should not send invalid URLs to client createWindow methods.
329         https://bugs.webkit.org/show_bug.cgi?id=39017
330
331         Unreviewed test fix.
332
333         * page/DOMWindow.cpp: (WebCore::DOMWindow::createWindow): Let empty URLs through.
334
335 2012-01-20  Sam Weinig  <sam@webkit.org>
336
337         Make WebCore RunLoop work for WebKit1
338         https://bugs.webkit.org/show_bug.cgi?id=76739
339
340         Reviewed by Anders Carlsson.
341
342         * platform/RunLoop.cpp:
343         Specialize RunLoop initialization for Mac, where it can happen on any thread.
344         
345         * platform/RunLoop.h:
346         Add RunLoop constructor that takes a CFRunLoopRef on the mac for initializing
347         the main thread.
348
349         * platform/mac/RunLoopMac.mm:
350         (WebCore::RunLoop::initializeMainRunLoop):
351         Add new implementation that can work from any thread (and multiple threads at the
352         same time if necessary).
353
354         (WebCore::RunLoop::current):
355         Treat the main thread specially, not storing it in thread specific data.
356
357         (WebCore::RunLoop::main):
358         Copy main accessor since it needs access to the file static.
359
360         (WebCore::RunLoop::RunLoop):
361         Add constructor which takes a CFRunLoopRef.
362
363 2012-01-20  Tim Horton  <timothy_horton@apple.com>
364
365         Crash in RenderSVGResourceContainer::markAllClientsForInvalidation
366         https://bugs.webkit.org/show_bug.cgi?id=76606
367         <rdar://problem/10720970>
368
369         Reviewed by Dirk Schulze.
370
371         Notify SVGResourcesCache and superclass when RenderSVGInline is about
372         to be destroyed, preventing a crash.
373
374         Test: svg/custom/crash-inline-container-client.html
375
376         * rendering/svg/RenderSVGInline.cpp:
377         (WebCore::RenderSVGInline::willBeDestroyed):
378         * rendering/svg/RenderSVGInline.h:
379
380 2012-01-20  Alexey Proskuryakov  <ap@apple.com>
381
382         WebCore should not send invalid URLs to client createWindow methods.
383         https://bugs.webkit.org/show_bug.cgi?id=39017
384
385         Reviewed by Sam Weinig.
386
387         Test: fast/dom/window/open-invalid-url.html
388
389         * page/DOMWindow.cpp: (WebCore::DOMWindow::createWindow): Bail out early for invalid URLs.
390
391 2012-01-20  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
392
393         Remove unused variable in RenderReplaced after r105513
394         https://bugs.webkit.org/show_bug.cgi?id=76742
395
396         Reviewed by Daniel Bates.
397
398         * rendering/RenderReplaced.cpp:
399         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
400         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
401
402 2012-01-20  Jonathan Backer  <backer@chromium.org>
403
404         [chromium] Plumb damage from accelerated canvas 2D.
405         https://bugs.webkit.org/show_bug.cgi?id=76728
406
407         Reviewed by Kenneth Russell.
408
409         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
410         (WebCore::Canvas2DLayerChromium::contentChanged):
411
412 2012-01-20  Julien Chaffraix  <jchaffraix@webkit.org>
413
414         Crash in RenderTable::borderBefore
415         https://bugs.webkit.org/show_bug.cgi?id=75215
416
417         Reviewed by David Hyatt.
418
419         Test: fast/table/crash-beforeBorder-dirty-section.html
420
421         This is a regression from r97661 that added some calls to get the object's borders but tables are a
422         special case and they may need to recompute some sections' pointers.
423
424         The whole sections' pointers lazy recomputation logic is unfortunately far from being bullet proof and
425         this change is only a mitigation for the current crash.
426
427         * rendering/RenderTable.cpp:
428         (WebCore::RenderTable::borderBefore):
429         (WebCore::RenderTable::borderAfter):
430         Make sure we recompute our sections. The change was made here to avoid hitting the
431         path used inside the table code (ie outerBorder{Before|After}) that shouldn't be
432         affected.
433
434         * rendering/RenderTable.h:
435         (WebCore::RenderTable::topSection):
436         Added an ASSERT to catch more bad use in the future.
437
438 2012-01-20  Marc-Andre Decoste  <mad@chromium.org>
439
440         Add proper offset to position right click to simulate a context menu invocation.
441         https://bugs.webkit.org/show_bug.cgi?id=76421
442
443         Reviewed by Ojan Vafai.
444
445         Manual tests only because DRT doesn't support context menu key.
446
447         * page/EventHandler.cpp:
448         (WebCore::EventHandler::sendContextMenuEventForKey):
449
450 2012-01-20  Sheriff Bot  <webkit.review.bot@gmail.com>
451
452         Unreviewed, rolling out r105426.
453         http://trac.webkit.org/changeset/105426
454         https://bugs.webkit.org/show_bug.cgi?id=76726
455
456         Might have caused a 20% regression in the PLT (Requested by
457         abarth|gardener on #webkit).
458
459         * rendering/RenderObject.h:
460         (WebCore::RenderObject::style):
461
462 2012-01-20  Sadrul Habib Chowdhury  <sadrul@chromium.org>
463
464         [chromium] Revert a couple of changes in fileapi/ that break tests in chromeos.
465         https://bugs.webkit.org/show_bug.cgi?id=76718
466
467         Reviewed by Darin Fisher.
468
469         * fileapi/BlobURL.cpp:
470         (WebCore::BlobURL::getIdentifier):
471         (WebCore::BlobURL::createBlobURL):
472         * fileapi/BlobURL.h:
473         (WebCore::BlobURL::blobProtocol):
474         * fileapi/DOMFileSystemBase.cpp:
475         (WebCore::DOMFileSystemBase::crackFileSystemURL):
476         * fileapi/DOMFileSystemBase.h:
477         * fileapi/EntryBase.cpp:
478         (WebCore::EntryBase::toURL):
479         * fileapi/FileWriter.cpp:
480         (WebCore::FileWriter::write):
481         (WebCore::FileWriter::truncate):
482         * page/DOMWindow.cpp:
483         (WebCore::DOMWindow::webkitRequestFileSystem):
484         * page/DOMWindow.h:
485         * platform/AsyncFileSystem.cpp:
486         * platform/AsyncFileSystem.h:
487         * workers/WorkerContext.cpp:
488         (WebCore::WorkerContext::webkitRequestFileSystem):
489         (WebCore::WorkerContext::webkitRequestFileSystemSync):
490
491 2012-01-20  Tim Dresser  <tdresser@chromium.org>
492
493         Refactor canvas drawing to be more data driven
494         https://bugs.webkit.org/show_bug.cgi?id=76635
495
496         CCCanvasLayerImpl no longer handles drawing itself, but produces a list of CCCanvasDrawQuads.
497         These quads are then drawn by LayerRendererChromium.
498
499         This is a refactor, so no new tests were added.
500
501         Reviewed by James Robinson.
502
503         * platform/graphics/chromium/LayerRendererChromium.cpp:
504         (WebCore::LayerRendererChromium::drawCanvasQuad):
505         * platform/graphics/chromium/cc/CCCanvasDrawQuad.cpp:
506         (WebCore::CCCanvasDrawQuad::create):
507         (WebCore::CCCanvasDrawQuad::CCCanvasDrawQuad):
508         * platform/graphics/chromium/cc/CCCanvasDrawQuad.h:
509         (WebCore::CCCanvasDrawQuad::textureId):
510         (WebCore::CCCanvasDrawQuad::hasAlpha):
511         (WebCore::CCCanvasDrawQuad::premultipliedAlpha):
512         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
513         (WebCore::CCCanvasLayerImpl::appendQuads):
514         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
515
516 2012-01-19  Abhishek Arya  <inferno@chromium.org>
517
518         Crash in xsltParseGlobalVariable.
519         https://bugs.webkit.org/show_bug.cgi?id=75978
520
521         Reviewed by Andreas Kling.
522
523         The code missed to reset the stylesheet pointer after we fail
524         to compile the XSLT stylesheet. As a result, the stylesheet gets
525         reused with a removed document in the next transformToFragment call.
526
527         Test: fast/xsl/xslt-transform-to-fragment-crash.html
528
529         * xml/XSLTProcessorLibxslt.cpp:
530         (WebCore::XSLTProcessor::transformToString):
531
532 2012-01-20  Nikolas Zimmermann  <nzimmermann@rim.com>
533
534         REGRESSION (r98852): apple.com navigation bar is broken under full-page zoom
535         https://bugs.webkit.org/show_bug.cgi?id=76249
536
537         Reviewed by Andreas Kling.
538
539         Fix regression with full-page zoom & border-image. paintNinePieceImage() expects local, unzoomed coordinates.
540         Restore the behaviour as it was before r98852, fixing the regression.
541
542         Test: fast/borders/scaled-border-image.html
543
544         * rendering/RenderBoxModelObject.cpp:
545         (WebCore::RenderBoxModelObject::paintNinePieceImage):
546
547 2012-01-20  Mihnea Ovidenie  <mihnea@adobe.com>
548
549         [CSSRegion]Expose DOM interface for WebKitCSSRegionRule
550         https://bugs.webkit.org/show_bug.cgi?id=73985
551
552         Reviewed by Antti Koivisto.
553
554         Start by exposing the interface and the cssRules attribute of type CSSRuleList.
555         Test: fast/regions/webkit-region-rule.html
556
557         * CMakeLists.txt:
558         * DerivedSources.cpp:
559         * DerivedSources.make:
560         * DerivedSources.pri:
561         * GNUmakefile.list.am:
562         * WebCore.gypi:
563         * WebCore.vcproj/WebCore.vcproj:
564         * WebCore.xcodeproj/project.pbxproj:
565         * bindings/js/JSCSSRuleCustom.cpp:
566         (WebCore::toJS):
567         * bindings/objc/DOMCSS.mm:
568         (kitClass):
569         * bindings/v8/custom/V8CSSRuleCustom.cpp:
570         (WebCore::toV8):
571         * css/WebKitCSSRegionRule.cpp:
572         * css/WebKitCSSRegionRule.h:
573         * css/WebKitCSSRegionRule.idl:
574         * page/DOMWindow.idl:
575
576 2012-01-20  Nikolas Zimmermann  <nzimmermann@rim.com>
577
578         Differentiate between SVG/CSS width/height attributes/properties
579         https://bugs.webkit.org/show_bug.cgi?id=76447
580
581         Reviewed by Antti Koivisto.
582
583         Remove a gazillion of hacks out of our SVG implementation, by correctly differentiating between the
584         SVG width/height attributes and the CSS width/height properties. They need to be treated independently
585         when handling the intrinsic size negotiation, according to both CSS 2.1 & SVG 1.1 2nd Edition specs.
586
587         Fixes several bugs in the LayoutTests/svg/custom/*object*sizing tests, we now match Opera perfectly. FF still has some bugs, and IE9 as well.
588
589         * css/svg.css: Remove hardcoded, width/height: 100% on <svg>.
590         * rendering/RenderBox.h:
591         (WebCore::RenderBox::computeIntrinsicRatioInformation): Make 'intrinsicRatio' a float, and add 'intrinsicSize' as seperated FloatSize, to avoid confusion.
592         * rendering/RenderBoxModelObject.cpp:
593         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): Add forgotton case for percentage intrinsic sizes, that lead to workarounds in other places, that can now be removed.
594         * rendering/RenderImage.cpp:
595         (WebCore::RenderImage::computeReplacedLogicalWidth): Directly use imageHasRelativeWidth/Height(), it does differentiate between SVG/CSS width/height attributes/properties now.
596         (WebCore::RenderImage::computeIntrinsicRatioInformation): Adapt to 'intrinsicRatio' argument change.
597         * rendering/RenderImage.h: Ditto.
598         * rendering/RenderReplaced.cpp: Refactor existing code, break out firstContainingBlockWithLogicalWidth/hasReplacedLogicalWidth/hasReplacedLogicalHeight/hasAutoHeightOrContainingBlockWithAutoHeight.
599         (WebCore::firstContainingBlockWithLogicalWidth): Refactored.
600         (WebCore::RenderReplaced::hasReplacedLogicalWidth): Refactored, and exported, so SVGSVGElement::widthAttributeEstablishesViewport() can use it.
601         (WebCore::hasAutoHeightOrContainingBlockWithAutoHeight): Refactored.
602         (WebCore::RenderReplaced::hasReplacedLogicalHeight): Refactored, and exported, so SVGSVGElement::heightAttributeEstablishesViewport() can use it.
603         (WebCore::RenderReplaced::computeReplacedLogicalWidth): Adapt to 'intrinsicRatio' changes ('intrinsicSize' is now decoupled from it). Refactor so that RenderSVGRoot can directly use it as well!
604         (WebCore::RenderReplaced::computeReplacedLogicalHeight): Ditto.
605         * rendering/RenderReplaced.h:
606         * rendering/svg/RenderSVGRoot.cpp:
607         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation): Only determine the intrinsic size & ratio using the SVG width/height attributes, not the CSS width/height properties, as it's specified.
608         (WebCore::resolveLengthAttributeForSVG): Helper function for computeReplacedLogicalWidth/Height, that scales Length values that come from SVG width/height attributes.
609         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Finally remove home-brewn size computation logic - it can be fully shared with RenderReplaced now that we inherit from it.
610         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
611         * rendering/svg/RenderSVGRoot.h:
612         * rendering/svg/RenderSVGViewportContainer.h:
613         (WebCore::RenderSVGViewportContainer::viewport): Export viewport() for easier length resolution.
614         * svg/SVGLengthContext.cpp:
615         (WebCore::SVGLengthContext::determineViewport): Finally clean up this hell, and make it easy to understand. Only need to resolve lengths against either RenderSVGRoot or RenderSVGViewportContainer now.
616         * svg/SVGSVGElement.cpp: 
617         (WebCore::SVGSVGElement::viewport): Remove wrong code and disable this. Its not used, and we have no test coverage for it. Its current implementation didn't make any sense.
618         (WebCore::SVGSVGElement::parseMappedAttribute): Remove hacks mapping SVG width/height attributes to CSS properties.
619         (WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
620         (WebCore::SVGSVGElement::localCoordinateSpaceTransform): Refactored.
621         (WebCore::SVGSVGElement::currentViewBoxRect): Ditto.
622         (WebCore::SVGSVGElement::currentViewportSize): Ditto.
623         (WebCore::SVGSVGElement::widthAttributeEstablishesViewport): Main logic determining if the SVG or CSS properties establish the viewport -  a direct transliteration from the spec.
624         (WebCore::SVGSVGElement::heightAttributeEstablishesViewport): Ditto.
625         (WebCore::SVGSVGElement::intrinsicWidth): Helper.
626         (WebCore::SVGSVGElement::intrinsicHeight): Ditto.
627         * svg/SVGSVGElement.h:
628         * svg/graphics/SVGImage.cpp:
629         (WebCore::SVGImage::size): Cleanup code.
630         (WebCore::SVGImage::hasRelativeWidth): Added, avoids hacks in RenderBoxModelObject.
631         (WebCore::SVGImage::hasRelativeHeight): Ditto.
632         (WebCore::SVGImage::computeIntrinsicDimensions): Make use of new SVGSVGElement::computeIntrinsicDimensions.
633         * svg/graphics/SVGImage.h:
634
635 2012-01-20  Sami Kyostila  <skyostil@chromium.org>
636
637         window.innerWidth/Height should not include page scale
638         https://bugs.webkit.org/show_bug.cgi?id=76555
639
640         The DOM attributes window.innerWidth and window.innerHeight should be in
641         CSS pixels instead of device pixels. Currently the text zoom factor is
642         cancelled out when calculating these values, but the same also needs to
643         be done for the page scale.
644
645         There is an additional subtlety concerning frames/iframes since their
646         visible content rectangle is already in (unscaled) CSS pixels. By using
647         Frame::frameScaleFactor() we avoid unnecessarily cancelling out the page
648         scale factor in this case.
649
650         Reviewed by Kenneth Rohde Christiansen.
651
652         Tests: fast/dom/iframe-inner-size-scaling.html
653                fast/dom/window-inner-size-scaling.html
654
655         * page/DOMWindow.cpp:
656         (WebCore::DOMWindow::innerHeight):
657         (WebCore::DOMWindow::innerWidth):
658
659 2012-01-20  Kinuko Yasuda  <kinuko@chromium.org>
660
661         Add DataTransferItems support for drag-and-drop'ed files and texts
662         https://bugs.webkit.org/show_bug.cgi?id=76367
663
664         Reviewed by Tony Chang.
665
666         Per http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-datatransfer-interface
667         the new interface should also support drag-and-dropped files and texts in
668         addition to pasted texts/images.  The user apps should also be able to add
669         texts/files to the drag store by calling event.dataTransfer.items.add().
670
671         This patch adds drag-and-drop'ed items support in DataTransferItem and
672         DataTransferItemList so that they work for dropped files and texts (as well as
673         the copy-pasted texts/images).
674
675         This patch also adds customized toJS()/toV8() code to Blob/File javascript
676         binding so that the JS code can get either Blob or File underlying object
677         where the API returns Blob. This change is necessary since we return Blob
678         from DataTransferItem.getAsFile() for pasted images but want to return File
679         for dropped files.
680
681         Tests: editing/pasteboard/data-transfer-items-drag-drop-file.html
682                editing/pasteboard/data-transfer-items-drag-drop-string.html
683
684         * GNUmakefile.list.am: Added entries for the new {JS,V8}BlobCustom.
685         * Target.pri: Ditto.
686         * UseJSC.cmake: Ditto.
687         * WebCore.gypi: Ditto.
688         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
689         * bindings/js/JSBlobCustom.cpp: Added toJS custom code that returns File or
690         Blob depending on the return value of isFile().
691         (WebCore::toJS):
692         * bindings/v8/custom/V8BlobCustom.cpp: Added toV8 custom code.
693         (WebCore::toV8):
694         * dom/DataTransferItem.h: Added a new create() method which takes File.
695         * dom/DataTransferItemList.cpp: Added add(File) method.
696         (WebCore::DataTransferItemList::add):
697         * dom/DataTransferItemList.h: Ditto.
698         * dom/DataTransferItemList.idl: Ditto.
699         * fileapi/Blob.idl: Added CustomToJS for toJS/toV8.
700         * platform/chromium/ClipboardChromium.cpp: Added code for drag-and-drop'ed items.
701         (WebCore::ClipboardChromium::items): Revised.
702         (WebCore::ClipboardChromium::mayUpdateItems): Added.
703         (WebCore::ClipboardChromium::isStorageUpdated): Added.
704         * platform/chromium/ClipboardChromium.h:
705         * platform/chromium/DataTransferItemChromium.cpp: Added a new constructor that
706         takes File and updated getAsFile() to make it support dropped files.
707         (WebCore::DataTransferItem::create):
708         (WebCore::DataTransferItemChromium::DataTransferItemChromium):
709         (WebCore::DataTransferItemChromium::getAsFile):
710         * platform/chromium/DataTransferItemChromium.h:
711         * platform/chromium/DataTransferItemListChromium.cpp:
712         (WebCore::DataTransferItemListChromium::addInternalItem):
713         * platform/chromium/DataTransferItemListChromium.cpp: Added overrides implementation for m_item accessors to make them reflect the changes in the owner clipboard.
714         (WebCore::DataTransferItemListChromium::length):
715         (WebCore::DataTransferItemListChromium::item):
716         (WebCore::DataTransferItemListChromium::deleteItem):
717         (WebCore::DataTransferItemListChromium::clear):
718         (WebCore::DataTransferItemListChromium::add):
719         (WebCore::DataTransferItemListChromium::mayUpdateItems): Added.
720         * platform/qt/DataTransferItemQt.cpp: Added a new constructor that takes File and updated
721         getAsFile() to make it support dropped files.
722         (WebCore::DataTransferItem::create):
723         (WebCore::DataTransferItemQt::DataTransferItemQt):
724         (WebCore::DataTransferItemQt::getAsFile):
725         * platform/qt/DataTransferItemQt.h:
726
727 2012-01-20  Alexis Menard  <alexis.menard@openbossa.org>
728
729         remove CSSBorderImageValue
730         https://bugs.webkit.org/show_bug.cgi?id=75563
731
732         Reviewed by Tony Chang.
733
734         Remove CSSBorderImageValue as border-image is a shorthand therefore we don't
735         need a dedicated CSS class type for it. CSSBorderImageValue was here for
736         -webkit-border-image which is not a shorthand. This is the first step to move border-image
737         close to a correct shorthand implementation while keeping -webkit-border-image being a regular
738         CSS property.
739
740         No new tests : It's a refactor, existing tests should cover it.
741
742         * CMakeLists.txt:
743         * GNUmakefile.list.am:
744         * Target.pri:
745         * WebCore.gypi:
746         * WebCore.order:
747         * WebCore.vcproj/WebCore.vcproj:
748         * WebCore.xcodeproj/project.pbxproj:
749         * css/CSSAllInOne.cpp:
750         * css/CSSBorderImage.cpp: Added.
751         (WebCore::createBorderImageValue):
752         * css/CSSBorderImage.h: Added.
753         * css/CSSBorderImageValue.cpp: Removed.
754         * css/CSSBorderImageValue.h: Removed.
755         * css/CSSComputedStyleDeclaration.cpp:
756         (WebCore::valueForNinePieceImage):
757         * css/CSSParser.cpp:
758         (WebCore::BorderImageParseContext::commitBorderImage):
759         * css/CSSStyleSelector.cpp:
760         (WebCore::CSSStyleSelector::mapNinePieceImage):
761         * css/CSSValue.cpp:
762         (WebCore::CSSValue::addSubresourceStyleURLs):
763         (WebCore::CSSValue::cssText):
764         (WebCore::CSSValue::destroy):
765         * css/CSSValue.h:
766
767 2012-01-20  Hayato Ito  <hayato@chromium.org>
768
769         Add ShadowRoot.idl which is enabled by newly introduced SHADOW_DOM flag.
770         https://bugs.webkit.org/show_bug.cgi?id=76353
771
772         Reviewed by Hajime Morita.
773
774         Add ShadowRoot.idl, which is enabled only on chromium port since this is
775         under development feature.
776         ShadowRoot.idl contains minimum API so that we can test it.
777         Other APIs should be added on other changes so that we can isolate issues.
778
779         Test: fast/dom/shadow/shadow-root-js-api.html
780
781         * WebCore.gypi:
782         * bindings/generic/RuntimeEnabledFeatures.cpp:
783         * bindings/generic/RuntimeEnabledFeatures.h:
784         (WebCore::RuntimeEnabledFeatures::shadowDOMEnabled):
785         (WebCore::RuntimeEnabledFeatures::setShadowDOMEnabled):
786         * dom/ShadowRoot.h:
787         (WebCore::ShadowRoot::host):
788         * dom/ShadowRoot.idl: Added.
789         * testing/Internals.cpp:
790         (WebCore::Internals::ensureShadowRoot):
791         (WebCore::Internals::shadowRoot):
792         * testing/Internals.h:
793         * testing/Internals.idl:
794
795 2012-01-19  Kent Tamura  <tkent@chromium.org>
796
797         Change LocalizedNumber interface
798         https://bugs.webkit.org/show_bug.cgi?id=76613
799
800         Reviewed by Hajime Morita.
801
802         Change the functions of LocalizedNumber from:
803           double parseLocalizedNumber(const String&);
804           String formatLocalizedNumber(double, unsigned fractionDigits);
805         To:
806           String convertToLocalizedNumber(const String&, usnigned fractionDigits);
807           String convertFromLocalizedNumber(const String&);
808         in order that we can avoid conversion from/to a double value.
809
810         The fractionDigits argumetn of convertToLocalizedNumber() will be
811         removed in the future.  We need it because we'd like to recycle the old
812         functions to implement new functions for now and functions in
813         LocalizedNumber can't call functions in HTMLParserIdioms.cpp.
814
815         No new tests because the change doesn't make any behavior change.
816
817         * html/NumberInputType.cpp:
818         (WebCore::NumberInputType::visibleValue):
819         Use convertToLocalizedNumber.
820         (WebCore::NumberInputType::convertFromVisibleValue):
821         Use convertFromLocalizedNumber.
822         (WebCore::NumberInputType::isAcceptableValue): ditto.
823         * platform/text/LocalizedNumber.h:
824         Remove parseLocalizedNumber and formatLocalizedNumber, and
825         introduce convertToLocalizedNumber and convertFromLocalizedNumber.
826         * platform/text/LocalizedNumberICU.cpp:
827         (WebCore::parseLocalizedNumber): Make this static.
828         (WebCore::formatLocalizedNumber): Make this static.
829         (WebCore::convertToLocalizedNumber): Implement this with formatLocalizedNumber.
830         (WebCore::convertFromLocalizedNumber): Implement this with parseLocalizedNumber.
831         * platform/text/LocalizedNumberNone.cpp:
832         (WebCore::convertToLocalizedNumber):
833         Implement this as a function returning the input string.
834         (WebCore::convertFromLocalizedNumber): ditto.
835         * platform/text/mac/LocalizedNumberMac.mm:
836         (WebCore::parseLocalizedNumber): Make this static.
837         (WebCore::formatLocalizedNumber): Make this static.
838         (WebCore::convertToLocalizedNumber): Implement this with formatLocalizedNumber.
839         (WebCore::convertFromLocalizedNumber): Implement this with parseLocalizedNumber.
840
841 2012-01-19  Pavel Feldman  <pfeldman@google.com>
842
843         Web Inspector: problem with Ctrl - <arrows> shortcuts in Scripts panel
844         https://bugs.webkit.org/show_bug.cgi?id=76622
845
846         Reviewed by Yury Semikhatsky.
847
848         * inspector/front-end/InspectorView.js:
849         (WebInspector.InspectorView.prototype._keyDown):
850         * inspector/front-end/TextViewer.js:
851         (WebInspector.TextViewer.prototype.set readOnly):
852         (WebInspector.TextViewer.prototype._cancelEditing):
853         (WebInspector.TextViewer.prototype.wasShown):
854         (WebInspector.TextViewer.prototype.willHide):
855         * inspector/front-end/UIUtils.js:
856         (WebInspector.isInEditMode):
857         * inspector/front-end/inspector.js:
858         (WebInspector.documentKeyDown):
859
860 2012-01-19  Kaustubh Atrawalkar  <kaustubh@motorola.com> & Erik Arvidsson  <arv@chromium.org>
861
862         Migrate createObjectURL & revokeObjectURL to static (Class) methods.
863         https://bugs.webkit.org/show_bug.cgi?id=74386
864
865         Reviewed by Adam Barth.
866
867         Test: fast/dom/DOMURL/check-instanceof-domurl-functions.html
868         Already Existing -
869             fast/files/revoke-blob-url.html
870             fast/dom/window-domurl-crash.html
871             fast/files/apply-blob-url-to-img.html
872             fast/files/create-blob-url-crash.html
873             fast/files/workers/inline-worker-via-blob-url.html
874
875         * html/DOMURL.cpp: Added HashMap for local static objects.
876         (WebCore::PublicURLManager::PublicURLManager):
877         (WebCore::PublicURLManager::contextDestroyed):
878         (WebCore::PublicURLManager::blobURLs):
879         (WebCore::PublicURLManager::streamURLs):
880         (WebCore::publicURLManagerMap):
881         (WebCore::publicURLManager):
882         (WebCore::publicBlobURLs):
883         (WebCore::publicStreamURLs):
884         (WebCore::DOMURL::createObjectURL): Changed to static.
885         (WebCore::DOMURL::revokeObjectURL): ditto.
886         * html/DOMURL.h:
887         (WebCore::DOMURL::create):
888         (WebCore::DOMURL::~DOMURL):
889         (WebCore::DOMURL::DOMURL):
890         * html/DOMURL.idl:
891         * page/DOMWindow.cpp: Removed object initialization for DOMURL.
892         * page/DOMWindow.h: ditto.
893         * page/DOMWindow.idl: ditto.
894         * workers/WorkerContext.cpp: ditto.
895         * workers/WorkerContext.h: ditto.
896         * workers/WorkerContext.idl: ditto.
897
898 2012-01-20  Alexandru Chiculita  <achicu@adobe.com>
899
900         CSS Shaders: Add a Settings flag to enable/disable CSS Shaders at runtime
901         https://bugs.webkit.org/show_bug.cgi?id=76444
902         
903         Added setCSSCustomFilterEnabled/isCSSCustomFilterEnabled that is false by default.
904         I've enabled it by default on Apple Mac, to make sure there's no behavior change. Anyway, CSS shaders need
905         WebGL enabled, so it ends up being disabled by default.
906
907         Reviewed by Nikolas Zimmermann.
908
909         Test: css3/filters/effect-custom-disabled.html
910
911         * css/CSSParser.cpp:
912         (WebCore::CSSParser::parseFilter):
913             Do not parse the custom() function when shaders are disabled.
914             
915         * css/CSSStyleSelector.cpp:
916         (WebCore::CSSStyleSelector::applyProperty):
917             Do not overwrite the old style->filter() if parsing fails.
918             
919         (WebCore::CSSStyleSelector::createFilterOperations):
920             Do not continue if one custom() filter fails to parse.
921             
922         * page/Settings.cpp:
923         (WebCore::Settings::Settings):
924         * page/Settings.h:
925         (WebCore::Settings::setCSSCustomFilterEnabled):
926         (WebCore::Settings::isCSSCustomFilterEnabled):
927         * rendering/FilterEffectRenderer.cpp:
928         (WebCore::isCSSCustomFilterEnabled):
929         (WebCore::FilterEffectRenderer::build):
930             Avoid creating the filter when shaders are disabled. It may happen to get here if shaders were disabled between parsing and rendering.
931         
932 2012-01-19  Shinya Kawanaka  <shinyak@google.com>
933
934         Node::canHaveLightChildRendererWithShadow is not used anywhere.
935         https://bugs.webkit.org/show_bug.cgi?id=76627
936
937         Reviewed by Darin Adler.
938
939         Since Node::canHaveLightChildRendererWithShadow is not overriden anywhere, and it returns always false.
940         We can remove it.
941
942         No new tests, because no change in behavior.
943
944         * dom/Node.h:
945         * dom/NodeRenderingContext.cpp:
946         (WebCore::NodeRenderingContext::shouldCreateRenderer):
947
948 2012-01-19  Kinuko Yasuda  <kinuko@chromium.org>
949
950         Cleanup: make constant variable names in fileapi/ conform to WebKit's coding guideline
951         https://bugs.webkit.org/show_bug.cgi?id=76625
952
953         Reviewed by David Levin.
954
955         No new tests as this patch has no functional changes.
956
957         * fileapi/BlobURL.cpp:
958         (WebCore::BlobURL::getIdentifier):
959         (WebCore::BlobURL::createBlobURL):
960         * fileapi/BlobURL.h:
961         * fileapi/FileWriter.cpp:
962         (WebCore::FileWriter::write):
963         (WebCore::FileWriter::truncate):
964         * platform/AsyncFileSystem.cpp:
965         (WebCore::AsyncFileSystem::crackFileSystemURL):
966         (WebCore::AsyncFileSystem::toURL):
967         (WebCore::AsyncFileSystem::isAvailable):
968         * platform/AsyncFileSystem.h:
969
970 2012-01-18  Sam Weinig  <sam@webkit.org>
971
972         Move RunLoop to WebCore/platform
973         https://bugs.webkit.org/show_bug.cgi?id=76471
974
975         Reviewed by Anders Carlsson.
976
977         * GNUmakefile.list.am:
978         * Target.pri:
979         * WebCore.exp.in:
980         * WebCore.vcproj/WebCore.vcproj:
981         * WebCore.xcodeproj/project.pbxproj:
982         Add newly moved files.
983
984         * platform/RunLoop.cpp: Moved from Source/WebKit2/Platform/RunLoop.cpp.
985         * platform/RunLoop.h: Moved from Source/WebKit2/Platform/RunLoop.h.
986         * platform/gtk/RunLoopGtk.cpp: Moved from Source/WebKit2/Platform/gtk/RunLoopGtk.cpp.
987         * platform/mac/RunLoopMac.mm: Moved from Source/WebKit2/Platform/mac/RunLoopMac.mm.
988         * platform/qt/RunLoopQt.cpp: Moved from Source/WebKit2/Platform/qt/RunLoopQt.cpp.
989         * platform/win/RunLoopWin.cpp: Moved from Source/WebKit2/Platform/win/RunLoopWin.cpp.
990         Move the files.
991
992 2012-01-19  Pablo Flouret  <pablof@motorola.com>
993
994         Fix inconsistent text selection behavior with option-shift-left/right/up/down.
995         https://bugs.webkit.org/show_bug.cgi?id=75652
996
997         Reviewed by Enrica Casucci.
998
999         On Mac, selecting backwards by word, line or paragraph from the middle
1000         of some text, and then going forward leaves the caret back in the middle
1001         with no selection, instead of directly selecting to the other end of the
1002         word/line/paragraph (Unix/Windows behavior). Fix this by adding a new
1003         editing behavior to control whether the selection should go across the
1004         initial position of the caret directly or not in situations like the one
1005         outlined above.
1006
1007         Test: editing/selection/selection-extend-should-not-move-across-caret-on-mac.html
1008
1009         * editing/EditingBehavior.h:
1010         (WebCore::EditingBehavior::shouldExtendSelectionByWordOrLineAcrossCaret):
1011         * editing/FrameSelection.cpp:
1012         (WebCore::FrameSelection::modify):
1013
1014 2012-01-19  Simon Fraser  <simon.fraser@apple.com>
1015
1016         Regression (r98735): Video chat moles in Gmail render incorrectly on Mac OS
1017         https://bugs.webkit.org/show_bug.cgi?id=75682
1018
1019         Reviewed by James Robinson.
1020         
1021         RenderLayerBacking::isSimpleContainerCompositingLayer() gave incorret
1022         results in the case where the layer itself was visibility:hidden, but
1023         where it had visible, non-composited descendant layers.
1024         
1025         Fix by breaking RenderLayerBacking::hasVisibleNonCompositingDescendants()
1026         into two methods, one that tests for renderers in this layer which
1027         render stuff (and are thus affected by visibility on this layer), and
1028         another which walks descendant, non-composited layers looking for those
1029         which are visible.
1030         
1031         Removed an early return in the "renderObject->node()->isDocumentNode()"
1032         clause, because we want to run the same code that we run for non-document
1033         nodes.
1034
1035         Test: compositing/visibility/layer-visible-content.html
1036
1037         * rendering/RenderLayerBacking.cpp:
1038         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
1039         (WebCore::RenderLayerBacking::containsNonEmptyRenderers):
1040         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
1041         * rendering/RenderLayerBacking.h:
1042
1043 2012-01-19  Alexandre Elias  <aelias@google.com>
1044
1045         [chromium] Draw gutter quads outside root content layer
1046         https://bugs.webkit.org/show_bug.cgi?id=76328
1047
1048         Reviewed by James Robinson.
1049
1050         Add new layer property "backgroundCoversViewport".  If the content
1051         layers don't fully cover the render surface, this code calculates the
1052         difference between the root clip rect and the root content layer and
1053         draws up to four background-color quads in exactly the area that would
1054         be undrawn.
1055
1056         Test: CCTiledLayerImplTest::backgroundCoversViewport
1057
1058         * platform/graphics/chromium/LayerChromium.cpp:
1059         (WebCore::LayerChromium::LayerChromium):
1060         (WebCore::LayerChromium::setBackgroundCoversViewport):
1061         (WebCore::LayerChromium::pushPropertiesTo):
1062         * platform/graphics/chromium/LayerChromium.h:
1063         (WebCore::LayerChromium::backgroundCoversViewport):
1064         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1065         (WebCore::CCLayerImpl::CCLayerImpl):
1066         (WebCore::CCLayerImpl::setBackgroundCoversViewport):
1067         * platform/graphics/chromium/cc/CCLayerImpl.h:
1068         (WebCore::CCLayerImpl::backgroundCoversViewport):
1069         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1070         (WebCore::CCTiledLayerImpl::appendQuads):
1071
1072 2012-01-19  Cary Clark  <caryclark@google.com>
1073
1074         [Skia Mac] Match style of platform error underline for misspellings
1075         https://bugs.webkit.org/show_bug.cgi?id=76556
1076
1077         Reviewed by Stephen White.
1078
1079         Add Darwin-specific code in Skia to draw the error underline so that
1080         it matches the CoreGraphics style.
1081
1082         Many existing layout tests inadvertantly trigger the misspelling
1083         underline by including the word 'foo' in an editable field. Those
1084         tests are temporarily suppressed separately in an edit to
1085         test_expectations.txt.
1086
1087         * platform/graphics/skia/GraphicsContextSkia.cpp:
1088         (WebCore::GraphicsContext::drawLineForTextChecking):
1089
1090 2012-01-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
1091
1092         [Texmap] TextureMapper creates two many big intermediate surfaces
1093         https://bugs.webkit.org/show_bug.cgi?id=76336
1094
1095         Reviewed by Simon Hausmann.
1096
1097         The following has been done to optimize surface allocation:
1098         1. Instead of using a viewport-size surface, use a surface in the size of the layer's
1099            bounding rect and apply the transform after the content has been rendered into it.
1100         2. Avoid generating intermediate surface for occasions where they're not necessary,
1101            such as nested reflections without opacity.
1102         3. Releasing of textures from the pool is now implicit, based on refCount.
1103         4. Do not use intermediate surfaces for preserve-3d layers. This is in alignment with
1104            other ports.
1105
1106         Tests in LayoutTests/compositing/masks and LayoutTests/compositing/reflection cover this.
1107
1108         * platform/graphics/texmap/TextureMapper.cpp:
1109         (WebCore::TextureMapper::acquireTextureFromPool):
1110         * platform/graphics/texmap/TextureMapper.h:
1111         * platform/graphics/texmap/TextureMapperNode.cpp:
1112         (WebCore::TextureMapperNode::paintSelf):
1113         (WebCore::TextureMapperNode::paintSelfAndChildren):
1114         (WebCore::TextureMapperNode::intermediateSurfaceRect):
1115         (WebCore::TextureMapperNode::shouldPaintToIntermediateSurface):
1116         (WebCore::TextureMapperNode::isVisible):
1117         (WebCore::TextureMapperNode::paintSelfAndChildrenWithReplica):
1118         (WebCore::TextureMapperNode::paintRecursive):
1119         (WebCore::TextureMapperNode::syncCompositingStateSelf):
1120         (WebCore::TextureMapperNode::syncCompositingState):
1121         * platform/graphics/texmap/TextureMapperNode.h:
1122         (WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions):
1123
1124 2012-01-19  Eric Seidel  <eric@webkit.org>
1125
1126         Assertion failure in WebCore::HTMLFrameElementBase::insertedIntoDocument()
1127         https://bugs.webkit.org/show_bug.cgi?id=50312
1128
1129         Reviewed by Alexey Proskuryakov.
1130
1131         Removed the ASSERT and updated the comment.
1132
1133         Test: fast/frames/assert-on-insertedIntoDocument.html
1134
1135         * html/HTMLFrameElementBase.cpp:
1136         (WebCore::HTMLFrameElementBase::insertedIntoDocument):
1137
1138 2012-01-19  James Robinson  <jamesr@chromium.org>
1139
1140         [chromium] Remove CCLayerDelegate, add ContentLayerDelegate for painting
1141         https://bugs.webkit.org/show_bug.cgi?id=76663
1142
1143         Reviewed by Kenneth Russell.
1144
1145         CCLayerDelegate used to be an interface with a half-dozen callbacks on it, but now it has only one call -
1146         paintContents() - and that one call is only valid for one subclass of LayerChromium, ContentLayerChromium. This
1147         removes the CCLayerDelegate pointer from LayerChromium and adds a ContentLayerDelegate for the paint call.
1148
1149         The majority of the code changes in this patch are removing the nil parameter from various places that construct
1150         LayerChromium instances. Also tightens the type of GraphicsLayerChromium::m_layer to ContentLayerChromium.
1151
1152         Refactoring/removing dead code, so no new tests.
1153
1154         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1155         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
1156         * platform/graphics/chromium/CanvasLayerChromium.cpp:
1157         (WebCore::CanvasLayerChromium::CanvasLayerChromium):
1158         * platform/graphics/chromium/CanvasLayerChromium.h:
1159         * platform/graphics/chromium/ContentLayerChromium.cpp:
1160         (WebCore::ContentLayerPainter::create):
1161         (WebCore::ContentLayerPainter::ContentLayerPainter):
1162         (WebCore::ContentLayerChromium::create):
1163         (WebCore::ContentLayerChromium::ContentLayerChromium):
1164         * platform/graphics/chromium/ContentLayerChromium.h:
1165         (WebCore::ContentLayerDelegate::~ContentLayerDelegate):
1166         (WebCore::ContentLayerChromium::clearDelegate):
1167         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1168         (WebCore::DrawingBuffer::platformLayer):
1169         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1170         (WebCore::GraphicsLayerChromium::~GraphicsLayerChromium):
1171         (WebCore::GraphicsLayerChromium::setContentsToImage):
1172         (WebCore::GraphicsLayerChromium::setContentsToCanvas):
1173         (WebCore::GraphicsLayerChromium::setContentsToMedia):
1174         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
1175         * platform/graphics/chromium/GraphicsLayerChromium.h:
1176         * platform/graphics/chromium/ImageLayerChromium.cpp:
1177         (WebCore::ImageLayerChromium::create):
1178         (WebCore::ImageLayerChromium::ImageLayerChromium):
1179         * platform/graphics/chromium/ImageLayerChromium.h:
1180         * platform/graphics/chromium/LayerChromium.cpp:
1181         (WebCore::LayerChromium::create):
1182         (WebCore::LayerChromium::LayerChromium):
1183         * platform/graphics/chromium/LayerChromium.h:
1184         * platform/graphics/chromium/PluginLayerChromium.cpp:
1185         (WebCore::PluginLayerChromium::create):
1186         (WebCore::PluginLayerChromium::PluginLayerChromium):
1187         * platform/graphics/chromium/PluginLayerChromium.h:
1188         * platform/graphics/chromium/TiledLayerChromium.cpp:
1189         (WebCore::TiledLayerChromium::TiledLayerChromium):
1190         (WebCore::TiledLayerChromium::drawsContent):
1191         * platform/graphics/chromium/TiledLayerChromium.h:
1192         * platform/graphics/chromium/VideoLayerChromium.cpp:
1193         (WebCore::VideoLayerChromium::create):
1194         (WebCore::VideoLayerChromium::VideoLayerChromium):
1195         * platform/graphics/chromium/VideoLayerChromium.h:
1196         * platform/graphics/chromium/WebGLLayerChromium.cpp:
1197         (WebCore::WebGLLayerChromium::create):
1198         (WebCore::WebGLLayerChromium::WebGLLayerChromium):
1199         * platform/graphics/chromium/WebGLLayerChromium.h:
1200
1201 2012-01-19  Greg Billock  <gbillock@google.com>
1202
1203         [Coverity] Fix uninitialized constructor defects in .../html
1204         https://bugs.webkit.org/show_bug.cgi?id=74965
1205
1206         Reviewed by Simon Fraser.
1207
1208         Test: fast/canvas/script-tests/canvas-webkitLineDash.js
1209
1210         * html/HTMLFormCollection.cpp:
1211         (WebCore::HTMLFormCollection::HTMLFormCollection):
1212         * html/StepRange.cpp:
1213         (WebCore::StepRange::StepRange):
1214         * html/canvas/CanvasRenderingContext2D.cpp:
1215         (WebCore::CanvasRenderingContext2D::State::State):
1216         * html/canvas/CanvasStyle.h:
1217         (WebCore::CanvasStyle::CMYKAValues::CMYKAValues):
1218         * html/canvas/WebGLGetInfo.cpp:
1219         (WebCore::WebGLGetInfo::WebGLGetInfo):
1220         * html/parser/CSSPreloadScanner.cpp:
1221         (WebCore::CSSPreloadScanner::CSSPreloadScanner):
1222         * html/track/WebVTTParser.cpp:
1223         (WebCore::WebVTTParser::WebVTTParser):
1224
1225 2012-01-19  Alexandru Chiculita  <achicu@adobe.com>
1226
1227         CSS Shaders: Remove the setTimeout from the layout tests
1228         https://bugs.webkit.org/show_bug.cgi?id=76535
1229
1230         Reviewed by Tony Chang.
1231
1232         We had setTimeout on old tests because the snapshot picture was taken too early, before the shaders were loaded.
1233         The problem was that the RenderLayer was notified that the shader was loaded only after the onload event was triggered,
1234         so a simple setTimeout(0) would have fixed the issue, but better than that would be to to always call CachedResource::data 
1235         in CachedShader::data, which notifies the load earlier (before onload).
1236
1237         No new tests, just removed the setTimeout from old ones.
1238
1239         * loader/cache/CachedShader.cpp:
1240         (WebCore::CachedShader::data):
1241
1242 2012-01-19  Min Qin  <qinmin@google.com>
1243
1244         Improve touch handling performance by reusing the hitTest result
1245         https://bugs.webkit.org/show_bug.cgi?id=75506
1246
1247         Reviewed by Adam Barth.
1248
1249         This is a performance optimization and should not cause behavior changes. Existing tests should cover it.
1250
1251         * page/EventHandler.cpp:
1252         (WebCore::EventHandler::handleTouchEvent):
1253
1254 2012-01-19  Jon Lee  <jonlee@apple.com>
1255
1256         Add text-overflow support that allows placeholder and value text to show an ellipsis when not focused
1257         https://bugs.webkit.org/show_bug.cgi?id=76118
1258         <rdar://problem/9271742>
1259
1260         Reviewed by Dan Bernstein.
1261
1262         Tests: fast/css/text-overflow-input-focus-placeholder-expected.html
1263                fast/css/text-overflow-input-focus-placeholder.html
1264                fast/css/text-overflow-input-focus-value-expected.html
1265                fast/css/text-overflow-input-focus-value.html
1266                fast/css/text-overflow-input.html
1267
1268         * rendering/RenderTextControlSingleLine.cpp:
1269         (WebCore::RenderTextControlSingleLine::styleDidChange): When the style of the text control
1270         changes, we update the text overflow property of the placeholder.
1271         (WebCore::RenderTextControlSingleLine::createInnerTextStyle): When the style of the text control
1272         changes, we update the text overflow property of the inner text block.
1273         (WebCore::RenderTextControlSingleLine::textShouldBeTruncated): The text of the value and placeholder should
1274         only contain the ellipsis if the input's text-overflow property is set to ellipsis, and the input is not focused.
1275         * rendering/RenderTextControlSingleLine.h:
1276
1277 2012-01-19  Mark Hahnenberg  <mhahnenberg@apple.com>
1278
1279         Implement a new allocator for backing stores
1280         https://bugs.webkit.org/show_bug.cgi?id=75181
1281
1282         Reviewed by Filip Pizlo.
1283
1284         No new tests.
1285
1286         Added forwarding header for new CheckedBoolean used in the bump allocator.
1287
1288         * ForwardingHeaders/wtf/CheckedBoolean.h: Added.
1289
1290 2012-01-13  Ryosuke Niwa  <rniwa@webkit.org>
1291
1292         Crash in CompositeEditCommand::ensureComposition
1293         https://bugs.webkit.org/show_bug.cgi?id=76207
1294
1295         Reviewed by Chang Shu.
1296
1297         The crash was caused by TypingCommand not kept alive when new editing commands are executed
1298         during adding more typings to the open last typing command since m_lastEditCommand is replaced
1299         by the new command. Fixed the bug by keeping them alive a little longer with RefPtr.
1300
1301         Test: editing/execCommand/editing-command-while-executing-typing-command-crash.html
1302
1303         * editing/FrameSelection.cpp:
1304         (WebCore::shouldStopBlinkingDueToTypingCommand):
1305         (WebCore::FrameSelection::updateAppearance):
1306         * editing/TypingCommand.cpp:
1307         (WebCore::TypingCommand::deleteSelection):
1308         (WebCore::TypingCommand::deleteKeyPressed):
1309         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1310         (WebCore::TypingCommand::insertText):
1311         (WebCore::TypingCommand::insertLineBreak):
1312         (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
1313         (WebCore::TypingCommand::insertParagraphSeparator):
1314         (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
1315         (WebCore::TypingCommand::closeTyping):
1316         * editing/TypingCommand.h:
1317
1318 2012-01-19  Andreas Kling  <awesomekling@apple.com>
1319
1320         Unreviewed debug build fix.
1321
1322         Remove ASSERT that the cached match is cacheable (we don't store that flag anymore.)
1323
1324         * css/CSSStyleSelector.cpp:
1325         (WebCore::CSSStyleSelector::findFromMatchedDeclarationCache):
1326
1327 2012-01-19  Robert Hogan  <robert@webkit.org>
1328
1329         Fix Debug build after r105433
1330
1331         Unreviewed, build fix.
1332
1333         * rendering/RenderTable.cpp:
1334         (WebCore::RenderTable::recalcCollapsedBorders):
1335
1336 2012-01-19  Andreas Kling  <awesomekling@apple.com>
1337
1338         CSSStyleSelector: Factor 'isCacheable' flag out of MatchedResult.
1339         <http://webkit.org/b/76376>
1340
1341         Reviewed by Antti Koivisto.
1342
1343         Break up the MatchResult struct into MatchResult and MatchRanges. The matched
1344         declaration cache only needs the ranges, so we save 4 bytes per entry.
1345
1346         * css/CSSStyleSelector.cpp:
1347         (WebCore::CSSStyleSelector::matchAllRules):
1348         (WebCore::CSSStyleSelector::matchUARules):
1349         (WebCore::CSSStyleSelector::pseudoStyleForElement):
1350         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement):
1351         (WebCore::operator==):
1352         (WebCore::operator!=):
1353         (WebCore::CSSStyleSelector::findFromMatchedDeclarationCache):
1354         (WebCore::CSSStyleSelector::addToMatchedDeclarationCache):
1355         (WebCore::CSSStyleSelector::applyMatchedDeclarations):
1356         * css/CSSStyleSelector.h:
1357         (WebCore::CSSStyleSelector::MatchRanges::MatchRanges):
1358         (WebCore::CSSStyleSelector::MatchResult::MatchResult):
1359
1360 2012-01-19  Eric Carlson  <eric.carlson@apple.com>
1361
1362         https://bugs.webkit.org/show_bug.cgi?id=75192
1363
1364         Reviewed by Darin Adler.
1365
1366         Notify the media element when tracks are added to and removed from a document instead of
1367         a tree because we don't want to trigger loading unless a track element is in the document.
1368
1369         Test: media/track/track-delete-during-setup.html
1370
1371         * html/HTMLMediaElement.cpp:
1372         (WebCore::HTMLMediaElement::trackWasRemoved): Renamed from trackWillBeRemoved because it is
1373             now called after removal.
1374         * html/HTMLMediaElement.h:
1375
1376         * html/HTMLTrackElement.cpp:
1377         (WebCore::HTMLTrackElement::insertedIntoDocument): Was insertedIntoTree. Use this instead
1378             because we care about when a track is inserted and removed from a document, not a tree.
1379         (WebCore::HTMLTrackElement::removedFromDocument): Ditto.
1380         * html/HTMLTrackElement.h:
1381
1382 2012-01-18  Robert Hogan  <robert@webkit.org>
1383
1384         Hit ASSERTION FAILED: table()->collapseBorders() on techcrunch.com
1385         https://bugs.webkit.org/show_bug.cgi?id=76405
1386
1387         Reviewed by Julien Chaffraix.
1388
1389         Tests: fast/css/nested-table-with-collapsed-borders.html
1390
1391         Change recalcCollapsedBorders() so that it only collects border values for the current
1392         table. Calculating the borders for nested tables was wrong as well as wasting cycles, though it would never
1393         have impacted rendering since a cell only paints the borders that match its own.
1394
1395         * rendering/RenderTable.cpp:
1396         (WebCore::RenderTable::recalcCollapsedBorders):
1397
1398 2012-01-18  Jer Noble  <jer.noble@apple.com>
1399
1400         Make WebAudio API const-correct.
1401         https://bugs.webkit.org/show_bug.cgi?id=76573
1402
1403         Reviewed by Daniel Bates.
1404
1405         No new tests; no net change in functionality, so covered by existing tests.
1406
1407         The non-const data() accessor was renamed mutableData() to expose const-correctness
1408         bugs during compile time:
1409         * platform/audio/AudioChannel.h:
1410         (WebCore::AudioChannel::mutableData):
1411
1412         The following functions were made const correct:
1413         * platform/audio/AudioArray.h:
1414         (WebCore::AudioArray::copyToRange):
1415         * platform/audio/AudioBus.h:
1416         (WebCore::AudioBus::createBufferFromRange):
1417         (WebCore::AudioBus::createBySampleRateConverting):
1418         (WebCore::AudioBus::createByMixingToMono):
1419         * platform/audio/FFTConvolver.cpp:
1420         (WebCore::FFTConvolver::process):
1421         * platform/audio/FFTConvolver.h:
1422         * platform/audio/FFTFrame.cpp:
1423         (WebCore::FFTFrame::doPaddedFFT):
1424         (WebCore::FFTFrame::doFFT):
1425         * platform/audio/FFTFrame.h:
1426         * platform/audio/ReverbConvolverStage.cpp:
1427         (WebCore::ReverbConvolverStage::ReverbConvolverStage):
1428         (WebCore::ReverbConvolverStage::process):
1429         * platform/audio/ReverbConvolverStage.h:
1430         * platform/audio/ReverbInputBuffer.cpp:
1431         (WebCore::ReverbInputBuffer::write):
1432         * platform/audio/ReverbInputBuffer.h:
1433         * platform/audio/SincResampler.cpp:
1434         (WebCore::SincResampler::process):
1435         * platform/audio/SincResampler.h:
1436         * platform/audio/ZeroPole.cpp:
1437         (WebCore::ZeroPole::process):
1438         * platform/audio/ZeroPole.h:
1439         * platform/audio/AudioBus.cpp:
1440         (WebCore::AudioBus::channelByType):
1441         * platform/audio/AudioBus.h:
1442         (WebCore::AudioBus::gain):
1443         * platform/audio/AudioDSPKernelProcessor.cpp:
1444         (WebCore::AudioDSPKernelProcessor::process):
1445         * platform/audio/AudioDSPKernelProcessor.h:
1446         * platform/audio/AudioProcessor.h:
1447         * platform/audio/DynamicsCompressor.cpp:
1448         (WebCore::DynamicsCompressor::process):
1449         * platform/audio/DynamicsCompressor.h:
1450         * platform/audio/DynamicsCompressorKernel.cpp:
1451         (WebCore::DynamicsCompressorKernel::process):
1452         * platform/audio/DynamicsCompressorKernel.h:
1453         * platform/audio/EqualPowerPanner.cpp:
1454         (WebCore::EqualPowerPanner::pan):
1455         * platform/audio/EqualPowerPanner.h:
1456         * platform/audio/HRTFElevation.h:
1457         (WebCore::HRTFElevation::numberOfAzimuths):
1458         * platform/audio/HRTFPanner.cpp:
1459         (WebCore::HRTFPanner::pan):
1460         * platform/audio/HRTFPanner.h:
1461         * platform/audio/Panner.h:
1462         * platform/audio/Reverb.cpp:
1463         (WebCore::Reverb::process):
1464         * platform/audio/Reverb.h:
1465         * platform/audio/ReverbConvolver.cpp:
1466         (WebCore::ReverbConvolver::process):
1467         * platform/audio/ReverbConvolver.h:
1468         * platform/audio/ffmpeg/FFTFrameFFMPEG.cpp:
1469         (WebCore::FFTFrame::doFFT):
1470         * platform/audio/mkl/FFTFrameMKL.cpp:
1471         (WebCore::FFTFrame::doFFT):
1472
1473         The following functions were modified to use the renamed mutableData() accessor:
1474         * platform/audio/AudioBus.cpp:
1475         (WebCore::AudioBus::processWithGainFromMonoStereo):
1476         (WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom):
1477         * platform/audio/AudioChannel.cpp:
1478         (WebCore::AudioChannel::scale):
1479         (WebCore::AudioChannel::copyFrom):
1480         (WebCore::AudioChannel::copyFromRange):
1481         (WebCore::AudioChannel::sumFrom):
1482         * platform/audio/AudioDSPKernelProcessor.cpp:
1483         (WebCore::AudioDSPKernelProcessor::process):
1484         * platform/audio/AudioResampler.cpp:
1485         (WebCore::AudioResampler::process):
1486         * platform/audio/DynamicsCompressor.cpp:
1487         (WebCore::DynamicsCompressor::process):
1488         * platform/audio/EqualPowerPanner.cpp:
1489         (WebCore::EqualPowerPanner::pan):
1490         * platform/audio/HRTFKernel.cpp:
1491         (WebCore::extractAverageGroupDelay):
1492         (WebCore::HRTFKernel::HRTFKernel):
1493         (WebCore::HRTFKernel::createImpulseResponse):
1494         * platform/audio/HRTFPanner.cpp:
1495         (WebCore::HRTFPanner::pan):
1496         * platform/audio/MultiChannelResampler.cpp:
1497         (WebCore::MultiChannelResampler::process):
1498         * platform/audio/Reverb.cpp:
1499         (WebCore::Reverb::process):
1500         * platform/audio/ReverbConvolver.cpp:
1501         (WebCore::ReverbConvolver::ReverbConvolver):
1502         (WebCore::ReverbConvolver::process):
1503         * platform/audio/mac/AudioFileReaderMac.cpp:
1504         (WebCore::AudioFileReader::createBus):
1505         * platform/audio/mac/FFTFrameMac.cpp:
1506         (WebCore::FFTFrame::doFFT):
1507         * webaudio/AudioBufferSourceNode.cpp:
1508         (WebCore::AudioBufferSourceNode::process):
1509         (WebCore::AudioBufferSourceNode::renderFromBuffer):
1510         * webaudio/BiquadProcessor.cpp:
1511         (WebCore::BiquadProcessor::process):
1512         * webaudio/JavaScriptAudioNode.cpp:
1513         (WebCore::JavaScriptAudioNode::process):
1514         * webaudio/OfflineAudioDestinationNode.cpp:
1515         (WebCore::OfflineAudioDestinationNode::render):
1516         * webaudio/RealtimeAnalyser.cpp:
1517         (WebCore::RealtimeAnalyser::writeInput):
1518         * webaudio/WaveShaperProcessor.cpp:
1519         (WebCore::WaveShaperProcessor::process):
1520
1521 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
1522
1523         Unreviewed, inspector closure compilation fix.
1524
1525         * inspector/front-end/ScriptsPanel.js:
1526         * inspector/front-end/TabbedEditorContainer.js:
1527
1528 2012-01-19  David Hyatt  <hyatt@apple.com>
1529
1530         https://bugs.webkit.org/show_bug.cgi?id=76644
1531
1532         Before landing support for centering, fix the keyword value to match the latest draft.
1533         The new keyword is "contain" instead of "bounds."
1534
1535         Revised the existing parsing tests to reflect the updated value.
1536
1537         Reviewed by Dan Bernstein.
1538
1539         * css/CSSParser.cpp:
1540         (WebCore::CSSParser::parseValue):
1541         * css/CSSPrimitiveValueMappings.h:
1542         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1543         (WebCore::CSSPrimitiveValue::operator LineGridSnap):
1544         * css/CSSValueKeywords.in:
1545         * rendering/style/RenderStyleConstants.h:
1546
1547 2012-01-19  Joi Sigurdsson  <joi@chromium.org>
1548
1549         Enable use of precompiled headers in Chromium port on Windows.
1550
1551         Bug 76381 - Use precompiled headers in Chromium port on Windows
1552         https://bugs.webkit.org/show_bug.cgi?id=76381
1553
1554         Reviewed by Tony Chang.
1555
1556         No new tests needed; if the change builds and existing tests pass
1557         that should provide enough coverage.
1558
1559         * WebCore.gyp/WebCore.gyp: Include WinPrecompile.gypi.
1560
1561 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
1562
1563         Web Inspector: Switching tabs in TabbedEditorContainer should reveal selected script in navigator.
1564         https://bugs.webkit.org/show_bug.cgi?id=76636
1565
1566         Reviewed by Pavel Feldman.
1567
1568         Renamed FileSelector's ScriptSelected event into FileSelected, added EditorSelected
1569         event to EditorContainer.
1570         Renamed _showSourceFrame into _showFile.
1571         Made _uiSourceCodeRemoved reuse _removeSourceFrame.
1572
1573         * inspector/front-end/ScriptsNavigator.js:
1574         (WebInspector.ScriptsNavigator.prototype.scriptSelected):
1575         * inspector/front-end/ScriptsPanel.js:
1576         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
1577         (WebInspector.ScriptsPanel.prototype._showAndRevealInFileSelector):
1578         (WebInspector.ScriptsPanel.prototype._editorSelected):
1579         (WebInspector.ScriptsPanel.prototype._fileSelected):
1580         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goBack):
1581         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goForward):
1582         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._filesSelectChanged):
1583         * inspector/front-end/TabbedEditorContainer.js:
1584         (WebInspector.TabbedEditorContainer):
1585         (WebInspector.TabbedEditorContainer.prototype._tabSelected):
1586
1587 2012-01-19  Mihnea Ovidenie  <mihnea@adobe.com>
1588
1589         [CSSRegions]Add support for background-color in region styling
1590         https://bugs.webkit.org/show_bug.cgi?id=71488
1591
1592         Reviewed by David Hyatt.
1593
1594         This patch enables region styling again. The region styling tests were also added back. 
1595         With the improvements from https://bugs.webkit.org/show_bug.cgi?id=76265, hopefully we will not see the same 3% regressions
1596         in performance.
1597
1598         * rendering/RenderObject.h:
1599         (WebCore::RenderObject::style):
1600
1601 2012-01-16  Jer Noble  <jer.noble@apple.com>
1602
1603         Crash at WebCore::MediaControlRootElement::makeOpaque + 97
1604         https://bugs.webkit.org/show_bug.cgi?id=76391
1605
1606         Reviewed by John Sullivan.
1607
1608         No new tests; Speculative fix for crash.
1609
1610         Crash report data suggests this crash is occurring as the document is being
1611         closed.  Check the nullity of document()->page() before deref-ing.
1612
1613         * html/shadow/MediaControlElements.cpp:
1614         (WebCore::MediaControlPanelElement::makeOpaque):
1615
1616 2012-01-19  Ken Buchanan <kenrb@chromium.org>
1617
1618         Layout Test fast/text/international/spaces-combined-in-vertical-text.html is failing
1619         https://bugs.webkit.org/show_bug.cgi?id=75787
1620
1621         Reviewed by Simon Fraser.
1622
1623         This is a tweak to my patch in r104322. On some platforms
1624         RenderCombineText::combineText() can abort early during inline
1625         iteration, causing this loop in skipLeadingWhitespace to spin,
1626         hence the layout test timeouts. This patch accounts for that
1627         condition and makes the loop iteration more robust.
1628
1629         No new test because this is fixing a failure on an existing test.
1630
1631         * rendering/RenderBlockLineLayout.cpp:
1632         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
1633
1634 2012-01-19  Jer Noble  <jer.noble@apple.com>
1635
1636         HRTFPanner not rendering correctly on mac port
1637         https://bugs.webkit.org/show_bug.cgi?id=76397
1638
1639         Reviewed by Eric Carlson.
1640
1641         No new tests; HRTF results are currently not testable.
1642
1643         Re-generate the Composite.wav file from its constituent azimuth & elevation files.
1644
1645         * platform/audio/resources/Composite.wav:
1646
1647 2012-01-19  David Hyatt  <hyatt@apple.com>
1648
1649         https://bugs.webkit.org/show_bug.cgi?id=76577
1650         
1651         Fix crash when nested line grids are used. Make sure to bail out if no line grid
1652         is found rather than crashing.
1653
1654         Reviewed by Dan Bernstein.
1655
1656         Added fast/line-grid/line-grid-nested.html.
1657
1658         * rendering/LayoutState.cpp:
1659         (WebCore::LayoutState::establishLineGrid):
1660
1661 2012-01-18  Enrica Casucci  <enrica@apple.com>
1662
1663         editingAttributedStringFromRange in WebHTMLConverter does not handle NSUnderlineStyleAttributeName.
1664         https://bugs.webkit.org/show_bug.cgi?id=76588
1665         <rdar://problem/9325183>
1666
1667         Reviewed by Dan Bernstein.
1668
1669         Added TestWebKitAPI test.
1670
1671         * platform/mac/HTMLConverter.mm:
1672         (+[WebHTMLConverter editingAttributedStringFromRange:]):
1673
1674 2012-01-18  Alexander Pavlov  <apavlov@chromium.org>
1675
1676         Web Inspector: Implement screen resolution emulation backend
1677         https://bugs.webkit.org/show_bug.cgi?id=76532
1678
1679         Reviewed by Pavel Feldman.
1680
1681         The emulation affects [min-|max-]device-(width|height) media queries, window.screen.(width|height),
1682         and window.inner(Width|Height).
1683
1684         Test: inspector/styles/override-screen-size.html
1685
1686         * css/MediaQueryEvaluator.cpp:
1687         (WebCore::device_heightMediaFeatureEval): Apply device-height override if necessary.
1688         (WebCore::device_widthMediaFeatureEval): Apply device-width override if necessary.
1689         * inspector/Inspector.json:
1690         * inspector/InspectorCSSAgent.cpp:
1691         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
1692         (WebCore::InspectorCSSAgent::startSelectorProfiler):
1693         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
1694         (WebCore::InspectorCSSAgent::willMatchRule):
1695         (WebCore::InspectorCSSAgent::didMatchRule):
1696         (WebCore::InspectorCSSAgent::willProcessRule):
1697         (WebCore::InspectorCSSAgent::didProcessRule):
1698         * inspector/InspectorInstrumentation.cpp:
1699         (WebCore::InspectorInstrumentation::applyScreenWidthOverrideImpl):
1700         (WebCore::InspectorInstrumentation::applyScreenHeightOverrideImpl):
1701         * inspector/InspectorInstrumentation.h:
1702         (WebCore::InspectorInstrumentation::applyScreenWidthOverride):
1703         (WebCore::InspectorInstrumentation::applyScreenHeightOverride):
1704         * inspector/InspectorPageAgent.cpp:
1705         (WebCore::InspectorPageAgent::InspectorPageAgent):
1706         (WebCore::InspectorPageAgent::restore):
1707         (WebCore::InspectorPageAgent::disable):
1708         (WebCore::InspectorPageAgent::setScreenSizeOverride):
1709         (WebCore::InspectorPageAgent::applyScreenWidthOverride):
1710         (WebCore::InspectorPageAgent::applyScreenHeightOverride):
1711         (WebCore::InspectorPageAgent::updateFrameViewFixedLayout):
1712         (WebCore::InspectorPageAgent::clearFrameViewFixedLayout):
1713         (WebCore::InspectorPageAgent::setFrameViewFixedLayout):
1714         * inspector/InspectorPageAgent.h:
1715         * page/DOMWindow.cpp:
1716         (WebCore::DOMWindow::innerHeight): Apply height override if necessary.
1717         (WebCore::DOMWindow::innerWidth): Apply width override if necessary.
1718         * page/Screen.cpp:
1719         (WebCore::Screen::height): Apply height override if necessary.
1720         (WebCore::Screen::width): Apply width override if necessary.
1721
1722 2012-01-18  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1723
1724         [Qt] Handle the layers visible rect calculation on the web process.
1725         https://bugs.webkit.org/show_bug.cgi?id=74720
1726
1727         Reviewed by Noam Rosenthal.
1728
1729         Remove all visible rect calculation related code from TextureMapperNode.
1730
1731         * platform/graphics/texmap/TextureMapperNode.cpp:
1732         * platform/graphics/texmap/TextureMapperNode.h:
1733
1734 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
1735
1736         Web Inspector: Improve focus switching in scripts panel.
1737         https://bugs.webkit.org/show_bug.cgi?id=76628
1738
1739         Reviewed by Pavel Feldman.
1740
1741         * inspector/front-end/Dialog.js:
1742         (WebInspector.Dialog.prototype._hide):
1743         * inspector/front-end/FilteredItemSelectionDialog.js:
1744         (WebInspector.FilteredItemSelectionDialog.prototype.onEnter):
1745         (WebInspector.JavaScriptOutlineDialog.prototype.selectItem):
1746         * inspector/front-end/ScriptsNavigator.js:
1747         (WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement):
1748         * inspector/front-end/ScriptsPanel.js:
1749         (WebInspector.ScriptsPanel.prototype._showSourceLine):
1750
1751 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
1752
1753         Web Inspector: Add isSelfOrAnsector and isSelfOrDescendant methods to utilities.
1754         https://bugs.webkit.org/show_bug.cgi?id=76618
1755
1756         Added isSelfOrAncestor, isSelfOrDescendant and WebInspector.restoreFocusFromElement methods.
1757
1758         Reviewed by Pavel Feldman.
1759
1760         * inspector/front-end/Drawer.js:
1761         * inspector/front-end/HelpScreen.js:
1762         (WebInspector.HelpScreen.prototype._onBlur):
1763         * inspector/front-end/MetricsSidebarPane.js:
1764         (WebInspector.MetricsSidebarPane.prototype._handleKeyDown):
1765         * inspector/front-end/Popover.js:
1766         * inspector/front-end/ScriptsPanel.js:
1767         (WebInspector.ScriptsPanel.prototype.showUISourceCode):
1768         * inspector/front-end/StylesSidebarPane.js:
1769         ():
1770         * inspector/front-end/TextPrompt.js:
1771         (WebInspector.TextPrompt.prototype.detach):
1772         (WebInspector.TextPrompt.prototype.isCaretAtEndOfPrompt):
1773         * inspector/front-end/TextViewer.js:
1774         (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing):
1775         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
1776         * inspector/front-end/UIUtils.js:
1777         (WebInspector.startEditing.cleanUpAfterEditing):
1778         (WebInspector.restoreFocusFromElement):
1779         * inspector/front-end/utilities.js:
1780         (Element.prototype.isInsertionCaretInside):
1781         ():
1782
1783 2012-01-19  Andreas Kling  <awesomekling@apple.com>
1784
1785         DynamicNodeList: Simplify internal Caches object.
1786         <http://webkit.org/b/76600>
1787
1788         Reviewed by Ryosuke Niwa.
1789
1790         Move m_caches from DynamicSubtreeNodeList and ChildNodeList up into DynamicNodeList.
1791         Remove the inheritance from RefCounted and store it simply as "Caches m_caches"
1792         This avoids one heap allocation per DynamicNodeList. Also reordered the Caches members
1793         to pack slightly better on 64-bit.
1794
1795         * dom/ChildNodeList.cpp:
1796         (WebCore::ChildNodeList::ChildNodeList):
1797         (WebCore::ChildNodeList::length):
1798         (WebCore::ChildNodeList::item):
1799         * dom/ChildNodeList.h:
1800         * dom/DynamicNodeList.cpp:
1801         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
1802         (WebCore::DynamicSubtreeNodeList::length):
1803         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
1804         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
1805         (WebCore::DynamicSubtreeNodeList::item):
1806         * dom/DynamicNodeList.h:
1807         (WebCore::DynamicNodeList::invalidateCache):
1808         * dom/Node.cpp:
1809         (WebCore::NodeRareData::clearChildNodeListCache):
1810
1811 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
1812
1813         Web Inspector: TabbedPane closeAllTabs does not close all tabs.
1814         https://bugs.webkit.org/show_bug.cgi?id=76624
1815
1816         Reviewed by Pavel Feldman.
1817
1818         * inspector/front-end/ScriptsPanel.js:
1819         * inspector/front-end/TabbedPane.js:
1820         (WebInspector.TabbedPane.prototype.closeAllTabs):
1821
1822 2012-01-18  Rob Buis  <rbuis@rim.com>
1823
1824         image/pjpeg not supported for decoding on BlackBerry platform
1825         https://bugs.webkit.org/show_bug.cgi?id=76595
1826
1827         Reviewed by Antonio Gomes.
1828
1829         Add image/pjpeg as one of the supported types for image decoding on BlackBerry platform.
1830
1831         * platform/MIMETypeRegistry.cpp:
1832         (WebCore::initializeSupportedImageMIMETypes):
1833
1834 2012-01-19  Sheriff Bot  <webkit.review.bot@gmail.com>
1835
1836         Unreviewed, rolling out r105402.
1837         http://trac.webkit.org/changeset/105402
1838         https://bugs.webkit.org/show_bug.cgi?id=76623
1839
1840         Layout test problems (Requested by WildFox on #webkit).
1841
1842         * css/svg.css:
1843         (svg):
1844         * rendering/RenderBox.h:
1845         (WebCore::RenderBox::computeIntrinsicRatioInformation):
1846         * rendering/RenderBoxModelObject.cpp:
1847         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
1848         * rendering/RenderImage.cpp:
1849         (WebCore::RenderImage::computeReplacedLogicalWidth):
1850         (WebCore::RenderImage::computeIntrinsicRatioInformation):
1851         * rendering/RenderImage.h:
1852         * rendering/RenderReplaced.cpp:
1853         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1854         (WebCore::RenderReplaced::logicalHeightIsAuto):
1855         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
1856         * rendering/RenderReplaced.h:
1857         * rendering/svg/RenderSVGRoot.cpp:
1858         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
1859         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
1860         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
1861         * rendering/svg/RenderSVGRoot.h:
1862         * rendering/svg/RenderSVGViewportContainer.h:
1863         * svg/SVGLengthContext.cpp:
1864         (WebCore::SVGLengthContext::determineViewport):
1865         * svg/SVGSVGElement.cpp:
1866         (WebCore::SVGSVGElement::viewport):
1867         (WebCore::SVGSVGElement::parseMappedAttribute):
1868         (WebCore::updateCSSForAttribute):
1869         (WebCore::SVGSVGElement::svgAttributeChanged):
1870         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
1871         (WebCore::SVGSVGElement::currentViewBoxRect):
1872         * svg/SVGSVGElement.h:
1873         * svg/graphics/SVGImage.cpp:
1874         (WebCore::SVGImage::size):
1875         (WebCore::SVGImage::computeIntrinsicDimensions):
1876         * svg/graphics/SVGImage.h:
1877
1878 2012-01-19  Alexis Menard  <alexis.menard@openbossa.org>
1879
1880         Strange Result for getComputedStyle on borderWidth set in em
1881         https://bugs.webkit.org/show_bug.cgi?id=18294
1882
1883         Reviewed by Tony Chang.
1884
1885         BorderValue stores its width on a 12 bits unsigned. This patch 
1886         increase it to 27. The patch also modify the way to set the 
1887         width or to get it, we now use a unsigned rather than a short.
1888
1889         Test: fast/css/border-width-large.html
1890
1891         * css/CSSPrimitiveValue.cpp:
1892         (WebCore::CSSPrimitiveValue::computeLength):
1893         * css/CSSStyleApplyProperty.cpp:
1894         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
1895         * page/animation/AnimationBase.cpp:
1896         (WebCore::blendFunc):
1897         (WebCore::AnimationBase::ensurePropertyMap):
1898         * platform/animation/AnimationUtilities.h:
1899         (WebCore::blend):
1900         * rendering/RenderTheme.cpp:
1901         (WebCore::RenderTheme::adjustStyle):
1902         * rendering/style/BorderData.h:
1903         (WebCore::BorderData::borderLeftWidth):
1904         (WebCore::BorderData::borderRightWidth):
1905         (WebCore::BorderData::borderTopWidth):
1906         (WebCore::BorderData::borderBottomWidth):
1907         * rendering/style/BorderValue.h:
1908         (WebCore::BorderValue::width):
1909         * rendering/style/RenderStyle.cpp:
1910         * rendering/style/RenderStyle.h:
1911         (WebCore::RenderStyleBitfields::borderLeftWidth):
1912         (WebCore::RenderStyleBitfields::borderRightWidth):
1913         (WebCore::RenderStyleBitfields::borderTopWidth):
1914         (WebCore::RenderStyleBitfields::borderBottomWidth):
1915         (WebCore::RenderStyleBitfields::setBorderLeftWidth):
1916         (WebCore::RenderStyleBitfields::setBorderRightWidth):
1917         (WebCore::RenderStyleBitfields::setBorderTopWidth):
1918         (WebCore::RenderStyleBitfields::setBorderBottomWidth):
1919         (WebCore::RenderStyleBitfields::initialBorderWidth):
1920         (WebCore::RenderStyleBitfields::initialColumnRuleWidth):
1921         (WebCore::RenderStyleBitfields::initialOutlineWidth):
1922
1923 2012-01-18  Nikolas Zimmermann  <nzimmermann@rim.com>
1924
1925         Differentiate between SVG/CSS width/height attributes/properties
1926         https://bugs.webkit.org/show_bug.cgi?id=76447
1927
1928         Reviewed by Antti Koivisto.
1929
1930         Remove a gazillion of hacks out of our SVG implementation, by correctly differentiating between the
1931         SVG width/height attributes and the CSS width/height properties. They need to be treated independently
1932         when handling the intrinsic size negotiation, according to both CSS 2.1 & SVG 1.1 2nd Edition specs.
1933
1934         Fixes several bugs in the LayoutTests/svg/custom/*object*sizing tests, we now match Opera perfectly. FF still has some bugs, and IE9 as well.
1935
1936         * css/svg.css: Remove hardcoded, width/height: 100% on <svg>.
1937         * rendering/RenderBox.h:
1938         (WebCore::RenderBox::computeIntrinsicRatioInformation): Make 'intrinsicRatio' a float, and add 'intrinsicSize' as seperated FloatSize, to avoid confusion.
1939         * rendering/RenderBoxModelObject.cpp:
1940         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): Add forgotton case for percentage intrinsic sizes, that lead to workarounds in other places, that can now be removed.
1941         * rendering/RenderImage.cpp:
1942         (WebCore::RenderImage::computeReplacedLogicalWidth): Directly use imageHasRelativeWidth/Height(), it does differentiate between SVG/CSS width/height attributes/properties now.
1943         (WebCore::RenderImage::computeIntrinsicRatioInformation): Adapt to 'intrinsicRatio' argument change.
1944         * rendering/RenderImage.h: Ditto.
1945         * rendering/RenderReplaced.cpp: Refactor existing code, break out firstContainingBlockWithLogicalWidth/hasReplacedLogicalWidth/hasReplacedLogicalHeight/hasAutoHeightOrContainingBlockWithAutoHeight.
1946         (WebCore::firstContainingBlockWithLogicalWidth): Refactored.
1947         (WebCore::RenderReplaced::hasReplacedLogicalWidth): Refactored, and exported, so SVGSVGElement::widthAttributeEstablishesViewport() can use it.
1948         (WebCore::hasAutoHeightOrContainingBlockWithAutoHeight): Refactored.
1949         (WebCore::RenderReplaced::hasReplacedLogicalHeight): Refactored, and exported, so SVGSVGElement::heightAttributeEstablishesViewport() can use it.
1950         (WebCore::RenderReplaced::computeReplacedLogicalWidth): Adapt to 'intrinsicRatio' changes ('intrinsicSize' is now decoupled from it). Refactor so that RenderSVGRoot can directly use it as well!
1951         (WebCore::RenderReplaced::computeReplacedLogicalHeight): Ditto.
1952         * rendering/RenderReplaced.h:
1953         * rendering/svg/RenderSVGRoot.cpp:
1954         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation): Only determine the intrinsic size & ratio using the SVG width/height attributes, not the CSS width/height properties, as it's specified.
1955         (WebCore::resolveLengthAttributeForSVG): Helper function for computeReplacedLogicalWidth/Height, that scales Length values that come from SVG width/height attributes.
1956         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Finally remove home-brewn size computation logic - it can be fully shared with RenderReplaced now that we inherit from it.
1957         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
1958         * rendering/svg/RenderSVGRoot.h:
1959         * rendering/svg/RenderSVGViewportContainer.h:
1960         (WebCore::RenderSVGViewportContainer::viewport): Export viewport() for easier length resolution.
1961         * svg/SVGLengthContext.cpp:
1962         (WebCore::SVGLengthContext::determineViewport): Finally clean up this hell, and make it easy to understand. Only need to resolve lengths against either RenderSVGRoot or RenderSVGViewportContainer now.
1963         * svg/SVGSVGElement.cpp: 
1964         (WebCore::SVGSVGElement::viewport): Remove wrong code and disable this. Its not used, and we have no test coverage for it. Its current implementation didn't make any sense.
1965         (WebCore::SVGSVGElement::parseMappedAttribute): Remove hacks mapping SVG width/height attributes to CSS properties.
1966         (WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
1967         (WebCore::SVGSVGElement::localCoordinateSpaceTransform): Refactored.
1968         (WebCore::SVGSVGElement::currentViewBoxRect): Ditto.
1969         (WebCore::SVGSVGElement::currentViewportSize): Ditto.
1970         (WebCore::SVGSVGElement::widthAttributeEstablishesViewport): Main logic determining if the SVG or CSS properties establish the viewport -  a direct transliteration from the spec.
1971         (WebCore::SVGSVGElement::heightAttributeEstablishesViewport): Ditto.
1972         (WebCore::SVGSVGElement::intrinsicWidth): Helper.
1973         (WebCore::SVGSVGElement::intrinsicHeight): Ditto.
1974         * svg/SVGSVGElement.h:
1975         * svg/graphics/SVGImage.cpp:
1976         (WebCore::SVGImage::size): Cleanup code.
1977         (WebCore::SVGImage::hasRelativeWidth): Added, avoids hacks in RenderBoxModelObject.
1978         (WebCore::SVGImage::hasRelativeHeight): Ditto.
1979         (WebCore::SVGImage::computeIntrinsicDimensions): Make use of new SVGSVGElement::computeIntrinsicDimensions.
1980         * svg/graphics/SVGImage.h:
1981
1982 2012-01-19  Ryosuke Niwa  <rniwa@webkit.org>
1983
1984         drop event isn't fired for contentEditable in edit drag
1985         https://bugs.webkit.org/show_bug.cgi?id=57185
1986
1987         Reviewed by Adam Barth.
1988
1989         Dispatch drop and dragend events after edit drag per HTML5 spec:
1990         http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#drag-and-drop-processing-model
1991
1992         There are two major differences between the spec and WebKit's new behavior:
1993
1994         While the spec says we have to insert the dragged contents immediately after dispatching drop event
1995         and delete the source in the default event handler of dragend event, doing so in WebKit is extremely
1996         difficult because of the way we manage the selection. Instead, we continue to delete the source
1997         and insert the dragged contents immediately after the drop event; this behavior matches that of Firefox 9.
1998
1999         When the dragged contents and the destination of the move is in the same text node, ReplaceSelectionCommand
2000         may end up replacing it with a new text node. But this removal causes a problem when EventHandler uses
2001         the node to dispatch dragend event because the node is "orphaned" from its parent at that point. To mitigate
2002         this issue, we update the dragState's m_dragSrc when the node is orphaned by the edit drag. While this behavior
2003         may differ from the spec and other browsers, not delivering dragend to the editing host seems strictly worse than
2004         dispatching it at the slightly wrong target.
2005
2006         Tests: fast/events/moving-text-should-fire-drop-and-dragend-events-2.html
2007                fast/events/moving-text-should-fire-drop-and-dragend-events.html
2008
2009         * page/DragController.cpp:
2010         (WebCore::DragController::performDrag): Dispatch drop event even when m_isHandlingDrag is true as long
2011         as DragDestinationActionDHTML is an acceptable action.
2012         (WebCore::DragController::concludeEditDrag): Call updateDragStateAfterEditDragIfNeeded after inserting
2013         the dragged contents. This is necessary when ReplaceSelectionCommand or MoveSelectionCommand modifies
2014         the source node while inserting the dragged contents.
2015         * page/EventHandler.cpp:
2016         (WebCore::EventHandler::performDragAndDrop): Clear the drag state only if drop event's default action
2017         was prevented so that we dispatch dragevent event later.
2018         (WebCore::EventHandler::updateDragStateAfterEditDragIfNeeded): Update dragState's m_dragSrc when the node
2019         is orphaned. See above for the rationale.
2020         * page/EventHandler.h:
2021
2022 2012-01-18  Kinuko Yasuda  <kinuko@chromium.org>
2023
2024         Cleanup: Move chrome-specific filesystem type handling code (for FileSystem API) under chromium directory
2025         https://bugs.webkit.org/show_bug.cgi?id=76551
2026
2027         Reviewed by Darin Fisher.
2028
2029         Moved the implementation of crackFileSystemURL() and toURL() from
2030         WebCore/fileapi/DOMFileSystemBase into WebCore/platform/AsyncFileSystem
2031         so that each platform can extend/implement their behavior if necessary.
2032
2033         No new tests since this patch has no functionality changes. (Existing
2034         tests should pass)
2035
2036         * fileapi/DOMFileSystemBase.cpp: Moved the implementation of
2037         crackFileSystemURL() to AsyncFileSystem
2038         (WebCore::DOMFileSystemBase::crackFileSystemURL):
2039         * fileapi/DOMFileSystemBase.h:
2040         * fileapi/EntryBase.cpp: Moved the implementation of toURL() to AsyncFileSystem
2041         (WebCore::EntryBase::toURL):
2042         * page/DOMWindow.cpp: Removed chrome-specific type handling code.
2043         (WebCore::DOMWindow::webkitRequestFileSystem):
2044         * page/DOMWindow.h: Removed chrome-specific filesystem type
2045         (EXTERNAL).
2046         * platform/AsyncFileSystem.cpp: Added default implementation of toURL() and crackFileSystemURL()
2047         (WebCore::AsyncFileSystem::toURL):
2048         (WebCore::AsyncFileSystem::crackFileSystemURL):
2049         * platform/AsyncFileSystem.h:
2050         * workers/WorkerContext.cpp: Removed chrome-specific type handling code.
2051         (WebCore::WorkerContext::webkitRequestFileSystem):
2052         (WebCore::WorkerContext::webkitRequestFileSystemSync):
2053
2054 2012-01-19  Mihnea Ovidenie  <mihnea@adobe.com>
2055
2056         Cache RenderStyle pointer as a method to avoid performance regression for region styling
2057         https://bugs.webkit.org/show_bug.cgi?id=76265
2058
2059         Reviewed by David Hyatt.
2060
2061         No new tests since this is just refactoring.
2062         When region styling was enabled in https://bugs.webkit.org/show_bug.cgi?id=71488,
2063         it introduced a performance regression due to the change of RenderObject::style() method.
2064         This patch tries to avoid a new performance regression when region styling will be enabled again.
2065
2066         * rendering/RenderBlock.cpp:
2067         (WebCore::RenderBlock::MarginInfo::MarginInfo):
2068         (WebCore::RenderBlock::styleWillChange):
2069         (WebCore::RenderBlock::layoutBlock):
2070         (WebCore::RenderBlock::layoutBlockChildren):
2071         (WebCore::RenderBlock::layoutBlockChild):
2072         (WebCore::RenderBlock::computePreferredLogicalWidths):
2073         (WebCore::getBorderPaddingMargin):
2074         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2075         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
2076         * rendering/RenderBlockLineLayout.cpp:
2077         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2078         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
2079         * rendering/RenderBox.cpp:
2080         (WebCore::RenderBox::willBeDestroyed):
2081         (WebCore::RenderBox::styleWillChange):
2082         (WebCore::RenderBox::styleDidChange):
2083         (WebCore::RenderBox::updateBoxModelInfoFromStyle):
2084         (WebCore::RenderBox::computeRectForRepaint):
2085         (WebCore::RenderBox::computeLogicalWidthInRegion):
2086         (WebCore::RenderBox::computeLogicalWidthUsing):
2087         (WebCore::RenderBox::computeLogicalHeight):
2088         (WebCore::RenderBox::computePercentageLogicalHeight):
2089         (WebCore::RenderBox::computePositionedLogicalHeight):
2090         * rendering/RenderBoxModelObject.cpp:
2091         (WebCore::RenderBoxModelObject::styleWillChange):
2092         (WebCore::RenderBoxModelObject::updateBoxModelInfoFromStyle):
2093         * rendering/RenderInline.cpp:
2094         (WebCore::RenderInline::styleDidChange):
2095         * rendering/RenderText.cpp:
2096         (WebCore::RenderText::styleDidChange):
2097         (WebCore::RenderText::computePreferredLogicalWidths):
2098
2099 2012-01-19  Kazuhiro Inaba  <kinaba@chromium.org>
2100
2101         [Chromium] Random characters got rendered as empty boxes or with incorrect glyphs even when a font is present
2102         https://bugs.webkit.org/show_bug.cgi?id=76508
2103
2104         Reviewed by Kent Tamura.
2105
2106         Wrapped GetGlyphIndices() API calls so that when they failed we trigger font
2107         loading outside the sandbox and retry the call.
2108
2109         No new auto tests since the bug involves the system's occasional cache behavior
2110         and thus there's no reliable way to reproduce and test the situation.
2111
2112         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
2113         (WebCore::getGlyphIndices):
2114         GDI call wrapper ensuring fonts to be loaded.
2115         (WebCore::initSpaceGlyph):
2116         Changed to use the wrapper function.
2117         (WebCore::fillBMPGlyphs):
2118         Changed to use the wrapper function.
2119         Introduced scoped HDC management by HWndDC.
2120         (WebCore::GlyphPage::fill):
2121
2122 2012-01-19  Adam Barth  <abarth@webkit.org>
2123
2124         createAttributeNS should understand that "xmlns" is allowed in the http://www.w3.org/2000/xmlns/
2125         https://bugs.webkit.org/show_bug.cgi?id=76579
2126
2127         Reviewed by Eric Seidel.
2128
2129         This patch cleans up a tiny corner case involving the (somewhat
2130         magical) xmlns attribute that we uncovered when working on
2131         setAttributeNS.
2132
2133         Tests: fast/dom/Document/createAttributeNS-namespace-err.html
2134
2135         * dom/Document.cpp:
2136         (WebCore::Document::importNode):
2137         (WebCore::Document::hasValidNamespaceForElements):
2138         (WebCore::Document::hasValidNamespaceForAttributes):
2139         (WebCore::Document::createElementNS):
2140         (WebCore::Document::createAttributeNS):
2141         * dom/Document.h:
2142         * dom/Element.cpp:
2143         (WebCore::Element::setAttributeNS):
2144
2145 2012-01-19  Roland Steiner  <rolandsteiner@chromium.org>
2146
2147         Unreviewed build fix for DEBUG: remove comparison of an unsigned variable with '>= 0' in ASSERT.
2148
2149         No new tests. (no functionality change)
2150
2151         * webaudio/AudioNodeOutput.cpp:
2152         (WebCore::AudioNodeOutput::AudioNodeOutput):
2153
2154 2012-01-18  Li Yin  <li.yin@intel.com>
2155
2156         [v8] Low efficiency of writing long string from web application to plugin.
2157         https://bugs.webkit.org/show_bug.cgi?id=76592
2158
2159         The efficiency will be improved by 300 times in the best case, when the
2160         size of string reaches 1MB.
2161
2162         Reviewed by Adam Barth.
2163
2164         * bindings/v8/V8NPUtils.cpp:
2165         (WebCore::convertV8ObjectToNPVariant):
2166
2167 2012-01-18  Adam Barth  <abarth@webkit.org>
2168
2169         Assigning to Element.prefix should throw exception when using illegal characters
2170         https://bugs.webkit.org/show_bug.cgi?id=76589
2171
2172         Reviewed by Eric Seidel.
2173
2174         This patch fixes a FIXME and implements the INVALID_CHARACTER_ERR
2175         exception described in
2176         http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSPrefix
2177
2178         Tests: fast/dom/Element/prefix-setter-exception.html
2179
2180         * dom/Node.cpp:
2181         (WebCore::isValidNameStartCharacter):
2182         (WebCore::isValidNameCharacter):
2183         (WebCore::hasInvalidValidNameCharacters):
2184         (WebCore::Node::checkSetPrefix):
2185
2186 2012-01-18  Shinya Kawanaka  <shinyak@google.com>
2187
2188         ShadowContent query should be able to have fallback elements.
2189         https://bugs.webkit.org/show_bug.cgi?id=75306
2190
2191         Reviewed by Hajime Morita.
2192
2193         When no elements are selected by a shadow content element selector query,
2194         light children are selected as a fallback elements.
2195
2196         Test: fast/dom/shadow/shadow-contents-fallback.html
2197
2198         * dom/NodeRenderingContext.cpp:
2199         (WebCore::NodeRenderingContext::NodeRenderingContext):
2200           Considers fallback phase. When no elements are chosen, the phase is set to 'fallback'.
2201         (WebCore::NodeRenderingContext::nextRenderer):
2202           Takes fallback phase into account.
2203         (WebCore::NodeRenderingContext::previousRenderer): ditto.
2204         * dom/NodeRenderingContext.h:
2205         * html/shadow/HTMLContentElement.cpp:
2206         (WebCore::HTMLContentElement::attach):
2207           Calculates inclusions before attaching light children.
2208         * html/shadow/HTMLContentElement.h:
2209         (WebCore::HTMLContentElement::hasInclusion):
2210
2211 2012-01-18  Kent Tamura  <tkent@chromium.org>
2212
2213         REGRESSION(r100111): A 'change' event does not fire when a mouse drag
2214         occurs to switch elements in a listbox <select>
2215         https://bugs.webkit.org/show_bug.cgi?id=76244
2216
2217         Reviewed by Hajime Morita.
2218
2219         Test: fast/forms/select/listbox-drag-in-non-multiple.html
2220
2221         * html/HTMLSelectElement.cpp:
2222         (WebCore::HTMLSelectElement::updateSelectedState):
2223         Do not update m_activeSelectionState for non-multiple <select>.
2224         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2225         Use setActiveSelection*Index() and updateListBoxSelection(true) instead
2226         of updateSelectedState() because updateSelectedState() updates
2227         m_lastOnChangeSelection and will prevent the mouseup handler from
2228         dispatching 'change' event.
2229         We should not call listBoxOnChange() in the mousemove handler in order
2230         to align the behavior of IE and Firefox.
2231
2232 2012-01-18  Eric Seidel  <eric@webkit.org>
2233
2234         setAttributeNS should comply with the obscure rules of DOM2, just like createAttributeNS and createElementNS do
2235         https://bugs.webkit.org/show_bug.cgi?id=76143
2236
2237         Reviewed by Adam Barth.
2238
2239         Test: fast/dom/Element/setAttributeNS-namespace-err.html
2240
2241         * dom/Element.cpp:
2242         (WebCore::Element::setAttributeNS):
2243
2244 2012-01-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2245
2246         Unreviewed, rolling out r105376.
2247         http://trac.webkit.org/changeset/105376
2248         https://bugs.webkit.org/show_bug.cgi?id=76601
2249
2250         Roll 76493 back in after discussion with jsbell (Requested by
2251         rolandsteiner on #webkit).
2252
2253         * bindings/v8/IDBBindingUtilities.cpp:
2254         (WebCore::injectIDBKeyIntoSerializedValue):
2255
2256 2012-01-18  Ian Vollick  <vollick@chromium.org>
2257
2258         [chromium] Create a base-class CCAnimation to represent compositor animations
2259         https://bugs.webkit.org/show_bug.cgi?id=73233
2260
2261         Adds a kernel for running animations on the chromium compositor
2262         thread.
2263
2264         Reviewed by Kenneth Russell.
2265
2266         * WebCore.gypi:
2267         * platform/graphics/chromium/cc/CCActiveAnimation.cpp: Added.
2268         (WebCore::CCActiveAnimation::CCActiveAnimation):
2269         (WebCore::CCActiveAnimation::setRunState):
2270         (WebCore::CCActiveAnimation::isFinishedAt):
2271         (WebCore::CCActiveAnimation::trimTimeToCurrentIteration):
2272         * platform/graphics/chromium/cc/CCActiveAnimation.h: Added.
2273         (WebCore::CCActiveAnimation::create):
2274         (WebCore::CCActiveAnimation::~CCActiveAnimation):
2275         (WebCore::CCActiveAnimation::group):
2276         (WebCore::CCActiveAnimation::targetProperty):
2277         (WebCore::CCActiveAnimation::runState):
2278         (WebCore::CCActiveAnimation::iterations):
2279         (WebCore::CCActiveAnimation::setIterations):
2280         (WebCore::CCActiveAnimation::startTime):
2281         (WebCore::CCActiveAnimation::setStartTime):
2282         (WebCore::CCActiveAnimation::isFinished):
2283         (WebCore::CCActiveAnimation::animationCurve):
2284         * platform/graphics/chromium/cc/CCAnimationCurve.cpp: Added.
2285         (WebCore::CCAnimationCurve::toFloatAnimationCurve):
2286         (WebCore::CCAnimationCurve::toTransformAnimationCurve):
2287         * platform/graphics/chromium/cc/CCAnimationCurve.h: Added.
2288         (WebCore::CCAnimationCurve::~CCAnimationCurve):
2289         (WebCore::CCFloatAnimationCurve::~CCFloatAnimationCurve):
2290         (WebCore::CCFloatAnimationCurve::type):
2291         (WebCore::CCTransformAnimationCurve::~CCTransformAnimationCurve):
2292         (WebCore::CCTransformAnimationCurve::type):
2293         * platform/graphics/chromium/cc/CCLayerAnimationControllerImpl.cpp: Added.
2294         (WebCore::CCLayerAnimationControllerImpl::create):
2295         (WebCore::CCLayerAnimationControllerImpl::CCLayerAnimationControllerImpl):
2296         (WebCore::CCLayerAnimationControllerImpl::animate):
2297         (WebCore::CCLayerAnimationControllerImpl::add):
2298         (WebCore::CCLayerAnimationControllerImpl::getActiveAnimation):
2299         (WebCore::CCLayerAnimationControllerImpl::hasActiveAnimation):
2300         (WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForNextTick):
2301         (WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForStartTime):
2302         (WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForTargetAvailability):
2303         (WebCore::CCLayerAnimationControllerImpl::resolveConflicts):
2304         (WebCore::CCLayerAnimationControllerImpl::purgeFinishedAnimations):
2305         (WebCore::CCLayerAnimationControllerImpl::tickAnimations):
2306         * platform/graphics/chromium/cc/CCLayerAnimationControllerImpl.h: Added.
2307         (WebCore::CCLayerAnimationControllerImplClient::~CCLayerAnimationControllerImplClient):
2308
2309 2012-01-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2310
2311         Unreviewed, rolling out r105331.
2312         http://trac.webkit.org/changeset/105331
2313         https://bugs.webkit.org/show_bug.cgi?id=76599
2314
2315         May have broken Chromium InjectIDBKey browser_test (Requested
2316         by rolandsteiner on #webkit).
2317
2318         * bindings/v8/IDBBindingUtilities.cpp:
2319         (WebCore::injectIDBKeyIntoSerializedValue):
2320
2321 2012-01-18  Raymond Liu  <raymond.liu@intel.com>
2322
2323         Remove some unused code in AudioContext
2324         https://bugs.webkit.org/show_bug.cgi?id=76506
2325
2326         Reviewed by Kenneth Russell.
2327
2328         No new tests required.
2329
2330         * webaudio/AudioContext.cpp:
2331         (WebCore::AudioContext::constructCommon):
2332         (WebCore::AudioContext::uninitialize):
2333         * webaudio/AudioContext.h:
2334
2335 2012-01-18  Raymond Liu  <raymond.liu@intel.com>
2336
2337         Only create AudioBus with required number of channels for AudioNodeOutput
2338         https://bugs.webkit.org/show_bug.cgi?id=76417
2339
2340         Reviewed by Kenneth Russell.
2341
2342         No new tests required.
2343
2344         * webaudio/AudioNodeOutput.cpp:
2345         (WebCore::AudioNodeOutput::AudioNodeOutput):
2346         (WebCore::AudioNodeOutput::setNumberOfChannels):
2347         (WebCore::AudioNodeOutput::updateInternalBus):
2348         (WebCore::AudioNodeOutput::updateNumberOfChannels):
2349         (WebCore::AudioNodeOutput::pull):
2350         * webaudio/AudioNodeOutput.h:
2351
2352 2012-01-18  Andreas Kling  <awesomekling@apple.com>
2353
2354         Cache and reuse the NodeList returned by Node::childNodes().
2355         <http://webkit.org/b/76591>
2356
2357         Reviewed by Ryosuke Niwa.
2358
2359         Instead of only caching the DynamicNodeList::Caches for .childNodes on NodeRareData,
2360         cache the full ChildNodeList object. Lifetime management is left to wrappers who
2361         invalidate the cached (raw) pointer via Node::removeCachedChildNodeList(), called
2362         from ~ChildNodeList().
2363
2364         This is a slight behavior change, in that Node.childNodes === Node.childNodes will
2365         now be true. This matches the behavior of both Firefox and Opera.
2366
2367         This reduces memory consumption by 192 kB (on 32-bit) when viewing the full
2368         HTML5 spec at <http://whatwg.org/c>
2369
2370         Test: fast/dom/gc-9.html
2371               fast/dom/node-childNodes-idempotence.html
2372
2373         * dom/Node.cpp:
2374         (WebCore::Node::childNodes):
2375         * dom/NodeRareData.h:
2376         (WebCore::NodeRareData::NodeRareData):
2377         (WebCore::NodeRareData::childNodeList):
2378         (WebCore::NodeRareData::setChildNodeList):
2379
2380             Only construct one ChildNodeList per Node and store it on NodeRareData for
2381             retrieval across childNodes() calls.
2382
2383         * dom/ChildNodeList.h:
2384         (WebCore::ChildNodeList::create):
2385         * dom/ChildNodeList.cpp:
2386         (WebCore::ChildNodeList::ChildNodeList):
2387
2388             Construct the Caches at creation instead of passing it to the constructor.
2389
2390         (WebCore::ChildNodeList::reset):
2391
2392             Added, resets the internal cache.
2393
2394         (WebCore::ChildNodeList::~ChildNodeList):
2395
2396             Call Node::removeCachedChildNodeList().
2397
2398         * dom/DynamicNodeList.cpp:
2399         * dom/DynamicNodeList.h:
2400
2401             Have DynamicNodeList (and subclasses) respond "true" to isDynamicNodeList().
2402             Previously only DynamicSubtreeNodeList (and subclasses) were doing this.
2403             Without it, JSC may GC our ChildNodeLists prematurely (due to NodeList's
2404             isReachableFromOpaqueRoots() implementation checking isDynamicNodeList().)
2405
2406         * dom/Node.h:
2407         * dom/Node.cpp:
2408         (WebCore::Node::removeCachedChildNodeList):
2409
2410             Added for ~ChildNodeList() to remove the pointer to itself from the Node.
2411
2412         (WebCore::NodeRareData::clearChildNodeListCache):
2413
2414             Call ChildNodeList::reset().
2415
2416 2012-01-18  James Robinson  <jamesr@chromium.org>
2417
2418         Unreviewed, rolling out r105366.
2419         http://trac.webkit.org/changeset/105366
2420         https://bugs.webkit.org/show_bug.cgi?id=76015
2421
2422         Breaks CCLayerTreeHostImplTest unit test
2423
2424         * platform/graphics/chromium/TiledLayerChromium.cpp:
2425         (WebCore::TiledLayerChromium::pushPropertiesTo):
2426         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
2427         * platform/graphics/chromium/cc/CCDrawQuad.h:
2428         (WebCore::CCDrawQuad::drawsOpaque):
2429         (WebCore::CCDrawQuad::needsBlending):
2430         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2431         (WebCore::CCQuadCuller::cullOccludedQuads):
2432         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp:
2433         (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
2434         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
2435         (WebCore::CCTileDrawQuad::create):
2436         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
2437         * platform/graphics/chromium/cc/CCTileDrawQuad.h:
2438         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2439         (WebCore::CCTiledLayerImpl::appendQuads):
2440         (WebCore::CCTiledLayerImpl::syncTextureId):
2441         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2442
2443 2012-01-18  Thiago Marcos P. Santos  <tmpsantos@gmail.com>
2444
2445         Save two ID checks on CSS Min/Width property validation
2446         https://bugs.webkit.org/show_bug.cgi?id=76565
2447
2448         The same validation is done again in the next case statement. Check for
2449         CSSValueIntrinsic and CSSValueMinIntrinsic was done twice when the value
2450         is a number.
2451
2452         Reviewed by Andreas Kling.
2453
2454         * css/CSSParser.cpp:
2455         (WebCore::CSSParser::parseValue):
2456
2457 2012-01-18  Dana Jansens  <danakj@chromium.org>
2458
2459         [chromium] Use region reported painted opaque for draw culling
2460         https://bugs.webkit.org/show_bug.cgi?id=76015
2461
2462         Reviewed by James Robinson.
2463
2464         New unit tests in CCQuadCullerTest.cpp and CCTiledLayerImplTest.cpp
2465
2466         * platform/graphics/chromium/TiledLayerChromium.cpp:
2467         (WebCore::TiledLayerChromium::pushPropertiesTo):
2468         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
2469         * platform/graphics/chromium/cc/CCDrawQuad.h:
2470         (WebCore::CCDrawQuad::opaqueRect):
2471         (WebCore::CCDrawQuad::needsBlending):
2472         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2473         (WebCore::CCQuadCuller::cullOccludedQuads):
2474         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
2475         (WebCore::CCTileDrawQuad::create):
2476         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
2477         * platform/graphics/chromium/cc/CCTileDrawQuad.h:
2478         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2479         (WebCore::DrawableTile::opaqueRect):
2480         (WebCore::DrawableTile::setOpaqueRect):
2481         (WebCore::CCTiledLayerImpl::appendQuads):
2482         (WebCore::CCTiledLayerImpl::pushTileProperties):
2483         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2484
2485 2012-01-18  Victoria Kirst  <vrk@chromium.org>
2486
2487         HTMLMediaElement should fire 'progress' event before 'idle' if it was previously loading
2488         https://bugs.webkit.org/show_bug.cgi?id=76568
2489
2490         Reviewed by Eric Carlson.
2491
2492         This fires a progress event when going from a non-empty state to idle,
2493         for the same reason that a progress event is fired when going from a
2494         non-idle state to loaded. Also consolidated logic in a single helper method.
2495
2496         No new tests because the decision of if/when a user agent sets the network state
2497         to idle is up to the user agent in this scenario.
2498
2499         * html/HTMLMediaElement.cpp:
2500         (WebCore::HTMLMediaElement::setNetworkState):
2501         (WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle):
2502         * html/HTMLMediaElement.h:
2503
2504 2012-01-18  Jon Lee  <jonlee@apple.com>
2505
2506         [WK2] Sync call for notifications permissions causes flashes on gmail.com
2507         https://bugs.webkit.org/show_bug.cgi?id=76570
2508         <rdar://problem/10647155>
2509
2510         Reviewed by Anders Carlsson and Sam Weinig.
2511
2512         * WebCore.exp.in: Export SecurityOrigin::toString().
2513
2514         Add runtime setting to enable/disable notifications.
2515
2516         * page/Settings.cpp:
2517         (WebCore::Settings::Settings):
2518         * page/Settings.h: Add new bit for whether notifications are enabled.
2519         (WebCore::Settings::setNotificationsEnabled):
2520         (WebCore::Settings::notificationsEnabled):
2521
2522 2012-01-18  Eric Carlson  <eric.carlson@apple.com>
2523
2524         Provide access to user's list of preferred languages
2525         https://bugs.webkit.org/show_bug.cgi?id=76138
2526
2527         Reviewed by Timothy Hatcher.
2528
2529         No new tests, tested by fast/harness/user-preferred-language.html.
2530
2531         * platform/mac/Language.mm:
2532         (WebCore::platformUserPreferredLanguages): Don't over-release a the CFStrings returned by 
2533             CFLocaleCopyPreferredLanguages.
2534
2535 2012-01-18  Joshua Bell  <jsbell@chromium.org>
2536
2537         IndexedDB: Implement create-intermediate-objects semantics when injecting values via keyPaths
2538         https://bugs.webkit.org/show_bug.cgi?id=76493
2539
2540         Reviewed by Tony Chang.
2541
2542         Tests: storage/indexeddb/objectstore-autoincrement.html
2543
2544         * bindings/v8/IDBBindingUtilities.cpp:
2545         (WebCore::injectIDBKeyIntoSerializedValue):
2546
2547 2012-01-18  Joshua Bell  <jsbell@chromium.org>
2548
2549         IndexedDB: Invalid keys yielded by key paths should raise exceptions, not error callbacks
2550         https://bugs.webkit.org/show_bug.cgi?id=76075
2551
2552         Reviewed by Tony Chang.
2553
2554         Tests: storage/indexeddb/objectstore-basics.html
2555
2556         * storage/IDBObjectStoreBackendImpl.cpp:
2557         (WebCore::IDBObjectStoreBackendImpl::put):
2558
2559 2012-01-18  Dana Jansens  <danakj@chromium.org>
2560
2561         [chromium] Fix compile error from bug #76211
2562         https://bugs.webkit.org/show_bug.cgi?id=76575
2563
2564         Reviewed by James Robinson.
2565
2566         No new tests. Fixing compile only.
2567
2568         * platform/graphics/chromium/ImageLayerChromium.cpp:
2569         (WebCore::ImageLayerTextureUpdater::prepareToUpdate):
2570
2571 2012-01-18  Adam Barth  <abarth@webkit.org>
2572
2573         REGRESSION (r104000): AdBlock extension fails to load/function
2574         https://bugs.webkit.org/show_bug.cgi?id=75554
2575
2576         Reviewed by Andy Estes.
2577
2578         Previously, we would claim the documentElement was available before
2579         we'd actually attached it to the DOM (which we now do via the
2580         attachment queue).  This issue was noted in the code with a FIXME
2581         comment, but there was no test coverage for the issue.  This patch
2582         resolves the FIXME and adds a test.
2583
2584         Test: userscripts/document-element-available-at-start.html
2585
2586         * html/parser/HTMLConstructionSite.cpp:
2587         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
2588
2589 2012-01-18  Eric Carlson  <eric.carlson@apple.com>
2590
2591         Provide access to user's list of preferred languages
2592         https://bugs.webkit.org/show_bug.cgi?id=76138
2593
2594         Reviewed by Alexey Proskuryakov.
2595
2596         Test: fast/harness/user-preferred-language.html
2597
2598         * WebCore.exp.in: Export the new functions.
2599         * WebCore.order: Ditto.
2600
2601         * Target.pri: Include new files.
2602         * WebCore.gypi: Ditto.
2603         * WebCore.vcproj/WebCoreTestSupport.vcproj: Ditto.
2604         * WebCore.xcodeproj/project.pbxproj: Ditto.
2605
2606         * platform/Language.cpp:
2607         (WebCore::defaultLanguage): Return userPreferredLanguages[0].
2608         (WebCore::preferredLanguagesOverride): New, return the languages override.
2609         (WebCore::overrideUserPreferredLanguages): New, set the languages override.
2610         (WebCore::userPreferredLanguages): New, return the languages array.
2611         * platform/Language.h:
2612
2613         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2614         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
2615         (WebCore::platformUserPreferredLanguages): New.
2616
2617         * platform/chromium/LanguageChromium.cpp:
2618         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
2619         (WebCore::platformUserPreferredLanguages): New.
2620
2621         * platform/efl/LanguageEfl.cpp:
2622         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
2623         (WebCore::platformUserPreferredLanguages): New.
2624
2625         * platform/gtk/LanguageGtk.cpp:
2626         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
2627         (WebCore::platformUserPreferredLanguages): New.
2628
2629         * platform/mac/Language.mm:
2630         (+[WebLanguageChangeObserver _webkit_languagePreferencesDidChange]): Flag the user languages
2631             as invalid.
2632         (WebCore::platformLanguage): Removed.
2633         (WebCore::platformUserPreferredLanguages): New, return the list of user preferred languages.
2634
2635         * platform/qt/LanguageQt.cpp:
2636         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
2637         (WebCore::platformUserPreferredLanguages): New.
2638
2639         * platform/win/LanguageWin.cpp:
2640         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
2641         (WebCore::platformUserPreferredLanguages): New.
2642
2643         * testing/Internals.cpp:
2644         (WebCore::Internals::userPreferredLanguages): New, return the platform's user preferred languages.
2645         (WebCore::Internals::setUserPreferredLanguages): New, override the user's preferred languages.
2646         * testing/Internals.h:
2647         * testing/Internals.idl: Add userPreferredLanguages.
2648
2649         * testing/js/JSInternalsCustom.cpp:
2650         (WebCore::JSInternals::userPreferredLanguages): New.
2651         (WebCore::JSInternals::setUserPreferredLanguages): New.
2652
2653         * testing/v8/V8InternalsCustom.cpp:
2654         (WebCore::V8Internals::userPreferredLanguagesAccessorGetter): New.
2655         (WebCore::V8Internals::userPreferredLanguagesAccessorSetter): New.
2656
2657 2012-01-18  Dana Jansens  <danakj@chromium.org>
2658
2659         [chromium] Enable tracking opaque region in Skia graphics context, return it from LayerTextureUpdater
2660         https://bugs.webkit.org/show_bug.cgi?id=76211
2661
2662         Reviewed by James Robinson.
2663
2664         New unit tests in LayerTextureUpdaterTest.cpp
2665
2666         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
2667         (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
2668         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
2669         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
2670         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
2671         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
2672         * platform/graphics/chromium/ContentLayerChromium.cpp:
2673         (WebCore::ContentLayerChromium::createTextureUpdater):
2674         * platform/graphics/chromium/LayerTextureUpdater.h:
2675         (WebCore::LayerTextureUpdater::prepareToUpdate):
2676         * platform/graphics/chromium/PlatformCanvas.h:
2677         (WebCore::PlatformCanvas::Painter::skiaContext):
2678         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
2679         (WebCore::SkPictureCanvasLayerTextureUpdater::SkPictureCanvasLayerTextureUpdater):
2680         (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
2681         (WebCore::SkPictureCanvasLayerTextureUpdater::setOpaque):
2682         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
2683         * platform/graphics/chromium/TiledLayerChromium.cpp:
2684         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
2685
2686 2012-01-18  Tim Dresser  <tdresser@chromium.org>
2687
2688         [chromium] Refactor canvas, plugin, and video drawing to be more data-driven
2689         https://bugs.webkit.org/show_bug.cgi?id=76274
2690
2691         Reviewed by James Robinson.
2692
2693         This is the first step in refactoring canvas, plugin, and video drawing.
2694         The CCCustomLayerDrawQuad implementation has been copied to CCCanvasDrawQuad, CCPluginDrawQuad and CCVideoDrawQuad.
2695         All references to CustomLayer have been removed.
2696
2697         As this is a refactor, no new tests were added. CCLayerTreeHostImplTest.blendingOffWhenDrawingOpaqueLayers was modified to
2698         no longer test culling.
2699
2700         * WebCore.gypi:
2701         * platform/graphics/chromium/LayerRendererChromium.cpp:
2702         (WebCore::LayerRendererChromium::drawQuad):
2703         (WebCore::LayerRendererChromium::drawCanvasQuad):
2704         (WebCore::LayerRendererChromium::drawVideoQuad):
2705         (WebCore::LayerRendererChromium::drawPluginQuad):
2706         * platform/graphics/chromium/LayerRendererChromium.h:
2707         * platform/graphics/chromium/cc/CCCanvasDrawQuad.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp.
2708         (WebCore::CCCanvasDrawQuad::create):
2709         (WebCore::CCCanvasDrawQuad::CCCanvasDrawQuad):
2710         * platform/graphics/chromium/cc/CCCanvasDrawQuad.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h.
2711         (WebCore::CCCanvasDrawQuad::layer):
2712         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
2713         (WebCore::CCCanvasLayerImpl::appendQuads):
2714         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
2715         * platform/graphics/chromium/cc/CCDrawQuad.cpp:
2716         (WebCore::CCDrawQuad::toCanvasDrawQuad):
2717         (WebCore::CCDrawQuad::toVideoDrawQuad):
2718         (WebCore::CCDrawQuad::toPluginDrawQuad):
2719         * platform/graphics/chromium/cc/CCDrawQuad.h:
2720         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2721         (WebCore::CCLayerImpl::appendQuads):
2722         * platform/graphics/chromium/cc/CCPluginDrawQuad.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp.
2723         (WebCore::CCPluginDrawQuad::create):
2724         (WebCore::CCPluginDrawQuad::CCPluginDrawQuad):
2725         * platform/graphics/chromium/cc/CCPluginDrawQuad.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h.
2726         (WebCore::CCPluginDrawQuad::layer):
2727         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
2728         (WebCore::CCPluginLayerImpl::appendQuads):
2729         * platform/graphics/chromium/cc/CCPluginLayerImpl.h:
2730         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2731         * platform/graphics/chromium/cc/CCVideoDrawQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp.
2732         (WebCore::CCVideoDrawQuad::create):
2733         (WebCore::CCVideoDrawQuad::CCVideoDrawQuad):
2734         * platform/graphics/chromium/cc/CCVideoDrawQuad.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h.
2735         (WebCore::CCVideoDrawQuad::layer):
2736         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2737         (WebCore::CCVideoLayerImpl::appendQuads):
2738         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
2739
2740 2012-01-18  Vsevolod Vlasov  <vsevik@chromium.org>
2741
2742         Web Inspector: Unsafe cross origin access errors should show stack trace in console.
2743         https://bugs.webkit.org/show_bug.cgi?id=73099
2744
2745         Reviewed by Pavel Feldman.
2746
2747         Test: http/tests/inspector/console-cross-origin-iframe-logging.html
2748
2749         * bindings/v8/V8Proxy.cpp:
2750         (WebCore::V8Proxy::reportUnsafeAccessTo):
2751         * dom/ScriptExecutionContext.cpp:
2752         (WebCore::ScriptExecutionContext::addConsoleMessage):
2753         * dom/ScriptExecutionContext.h:
2754         * loader/FrameLoader.cpp:
2755         (WebCore::FrameLoader::shouldAllowNavigation):
2756         * page/Console.cpp:
2757         (WebCore::Console::addMessage):
2758         * page/Console.h:
2759         * page/DOMWindow.cpp:
2760         (WebCore::PostMessageTimer::PostMessageTimer):
2761         (WebCore::PostMessageTimer::stackTrace):
2762         (WebCore::DOMWindow::postMessage):
2763         (WebCore::DOMWindow::postMessageTimerFired):
2764         (WebCore::DOMWindow::printErrorMessage):
2765
2766 2012-01-18  Pablo Flouret  <pablof@motorola.com>
2767
2768         Add [CallWith] support for attributes in JSC/V8 idl code generators.
2769         Part of https://bugs.webkit.org/show_bug.cgi?id=76035
2770
2771         Reviewed by Adam Barth.
2772
2773         * bindings/scripts/CodeGeneratorJS.pm:
2774         (GenerateImplementation):
2775         (GenerateAttributeCallWith):
2776         * bindings/scripts/CodeGeneratorV8.pm:
2777         (GenerateNormalAttrGetter):
2778         (GenerateNormalAttrSetter):
2779         (GenerateAttributeCallWith):
2780         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
2781         (WebDOMTestObj::withScriptStateAttribute):
2782         (WebDOMTestObj::setWithScriptStateAttribute):
2783         (WebDOMTestObj::withScriptExecutionContextAttribute):
2784         (WebDOMTestObj::setWithScriptExecutionContextAttribute):
2785         (WebDOMTestObj::withScriptStateAttributeRaises):
2786         (WebDOMTestObj::setWithScriptStateAttributeRaises):
2787         (WebDOMTestObj::withScriptExecutionContextAttributeRaises):
2788         (WebDOMTestObj::setWithScriptExecutionContextAttributeRaises):
2789         * bindings/scripts/test/CPP/WebDOMTestObj.h:
2790         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2791         (webkit_dom_test_obj_get_with_script_state_attribute):
2792         (webkit_dom_test_obj_set_with_script_state_attribute):
2793         (webkit_dom_test_obj_get_with_script_execution_context_attribute):
2794         (webkit_dom_test_obj_set_with_script_execution_context_attribute):
2795         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
2796         (webkit_dom_test_obj_set_with_script_state_attribute_raises):
2797         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
2798         (webkit_dom_test_obj_set_with_script_execution_context_attribute_raises):
2799         (webkit_dom_test_obj_set_property):
2800         (webkit_dom_test_obj_get_property):
2801         (webkit_dom_test_obj_class_init):
2802         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2803         * bindings/scripts/test/JS/JSTestObj.cpp:
2804         (WebCore::jsTestObjWithScriptStateAttribute):
2805         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
2806         (WebCore::jsTestObjWithScriptStateAttributeRaises):
2807         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
2808         (WebCore::setJSTestObjWithScriptStateAttribute):
2809         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
2810         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
2811         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
2812         * bindings/scripts/test/JS/JSTestObj.h:
2813         * bindings/scripts/test/ObjC/DOMTestObj.h:
2814         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2815         (-[DOMTestObj withScriptStateAttribute]):
2816         (-[DOMTestObj setWithScriptStateAttribute:]):
2817         (-[DOMTestObj withScriptExecutionContextAttribute]):
2818         (-[DOMTestObj setWithScriptExecutionContextAttribute:]):
2819         (-[DOMTestObj withScriptStateAttributeRaises]):
2820         (-[DOMTestObj setWithScriptStateAttributeRaises:]):
2821         (-[DOMTestObj withScriptExecutionContextAttributeRaises]):
2822         (-[DOMTestObj setWithScriptExecutionContextAttributeRaises:]):
2823         * bindings/scripts/test/TestObj.idl:
2824         * bindings/scripts/test/V8/V8TestObj.cpp:
2825         (WebCore::TestObjInternal::withScriptStateAttributeAttrGetter):
2826         (WebCore::TestObjInternal::withScriptStateAttributeAttrSetter):
2827         (WebCore::TestObjInternal::withScriptExecutionContextAttributeAttrGetter):
2828         (WebCore::TestObjInternal::withScriptExecutionContextAttributeAttrSetter):
2829         (WebCore::TestObjInternal::withScriptStateAttributeRaisesAttrGetter):
2830         (WebCore::TestObjInternal::withScriptStateAttributeRaisesAttrSetter):
2831         (WebCore::TestObjInternal::withScriptExecutionContextAttributeRaisesAttrGetter):
2832         (WebCore::TestObjInternal::withScriptExecutionContextAttributeRaisesAttrSetter):
2833
2834 2012-01-18  Tim Horton  <timothy_horton@apple.com>
2835
2836         [CG] Rasterized scaling of transformed SVG shapes with gradient fill and -webkit-svg-shadow applied
2837         https://bugs.webkit.org/show_bug.cgi?id=76482
2838         <rdar://problem/10415483>
2839
2840         Reviewed by Simon Fraser.
2841
2842         Scale the CGLayer used when filling or stroking a shadowed path or rect with
2843         a gradient in GraphicsContextCG. Previously, the CGLayer was created and rendered
2844         into at the untransformed size of the shape, leading to pixelation when it was
2845         then scaled up and drawn into the destination.
2846
2847         Add AffineTransform::mapSize() to map a size through a transformation.
2848
2849         Test: svg/custom/transform-with-shadow-and-gradient.svg
2850
2851         * platform/graphics/cg/GraphicsContextCG.cpp:
2852         (WebCore::GraphicsContext::fillPath):
2853         (WebCore::GraphicsContext::strokePath):
2854         (WebCore::GraphicsContext::fillRect):
2855         (WebCore::GraphicsContext::strokeRect):
2856         * platform/graphics/transforms/AffineTransform.cpp:
2857         (WebCore::AffineTransform::mapSize): Added.
2858         * platform/graphics/transforms/AffineTransform.h:
2859
2860 2012-01-18  Dominic Mazzoni  <dmazzoni@google.com>
2861
2862         Accessibility: Chromium needs methods to scroll an object into view or to a specific location.
2863         https://bugs.webkit.org/show_bug.cgi?id=73460
2864
2865         Reviewed by Chris Fleizach.
2866
2867         Tests: platform/chromium/accessibility/scroll-to-global-point-main-window.html
2868                platform/chromium/accessibility/scroll-to-global-point-nested.html
2869                platform/chromium/accessibility/scroll-to-global-point-iframe.html
2870                platform/chromium/accessibility/scroll-to-global-point-iframe-nested.html
2871                platform/chromium/accessibility/scroll-to-make-visible-div-overflow.html
2872                platform/chromium/accessibility/scroll-to-make-visible-iframe.html
2873                platform/chromium/accessibility/scroll-to-make-visible-main-window.html
2874                platform/chromium/accessibility/scroll-to-make-visible-nested.html
2875                platform/chromium/accessibility/scroll-to-make-visible-with-subfocus.html
2876
2877         * accessibility/AccessibilityObject.cpp:
2878         (WebCore::computeBestScrollOffset):
2879         (WebCore::AccessibilityObject::scrollToMakeVisible):
2880         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
2881         (WebCore::AccessibilityObject::scrollToGlobalPoint):
2882         * accessibility/AccessibilityObject.h:
2883         (WebCore::AccessibilityObject::getScrollableAreaIfScrollable):
2884         (WebCore::AccessibilityObject::scrollTo):
2885         * accessibility/AccessibilityRenderObject.cpp:
2886         (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
2887         (WebCore::AccessibilityRenderObject::scrollTo):
2888         * accessibility/AccessibilityRenderObject.h:
2889         * accessibility/AccessibilityScrollView.cpp:
2890         (WebCore::AccessibilityScrollView::getScrollableAreaIfScrollable):
2891         (WebCore::AccessibilityScrollView::scrollTo):
2892         * accessibility/AccessibilityScrollView.h:
2893
2894 2012-01-17  Alexey Proskuryakov  <ap@apple.com>
2895
2896         file:// doesn't work as base URL
2897         https://bugs.webkit.org/show_bug.cgi?id=76496
2898
2899         Reviewed by Darin Adler.
2900
2901         Test: fast/url/degenerate-file-base.html
2902
2903         * platform/KURL.cpp: (WebCore::KURL::parse): Handle degenerate file URLs properly.
2904
2905 2012-01-18  Ilya Tikhonovsky  <loislo@chromium.org>
2906
2907         [chromium] Web Inspector: highlight DOM nodes from detached DOM trees.
2908         https://bugs.webkit.org/show_bug.cgi?id=76545
2909
2910         Reviewed by Yury Semikhatsky.
2911
2912         * inspector/front-end/DetailedHeapshotGridNodes.js:
2913         (WebInspector.HeapSnapshotGenericObjectNode):
2914         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
2915         * inspector/front-end/HeapSnapshot.js:
2916         (WebInspector.HeapSnapshotNode.prototype.get isNativeRoot):
2917         (WebInspector.HeapSnapshotNode.prototype.get isDetachedDOMTree):
2918         (WebInspector.HeapSnapshot.prototype._init):
2919         (WebInspector.HeapSnapshot.prototype._markDetachedDOMTreeNodes):
2920         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
2921         (WebInspector.HeapSnapshot.prototype._calculateFlags):
2922         * inspector/front-end/heapProfiler.css:
2923         (.detached-dom-tree-node):
2924
2925 2012-01-18  Pavel Feldman  <pfeldman@google.com>
2926
2927         Web Inspector: there should be a way to set HTML for given frame.
2928         https://bugs.webkit.org/show_bug.cgi?id=76548
2929
2930         Reviewed by Yury Semikhatsky.
2931
2932         * inspector/Inspector.json:
2933         * inspector/InspectorPageAgent.cpp:
2934         (WebCore::InspectorPageAgent::setDocumentContent):
2935         * inspector/InspectorPageAgent.h:
2936         * inspector/front-end/DOMAgent.js:
2937         (WebInspector.DOMModelResourceBinding.prototype.setContent.callbackWrapper):
2938         (WebInspector.DOMModelResourceBinding.prototype.setContent):
2939
2940 2012-01-18  Sergio Villar Senin  <svillar@igalia.com>
2941
2942         [GTK] [regression] A couple of tests failing after r105253
2943         https://bugs.webkit.org/show_bug.cgi?id=76549
2944
2945         Reviewed by Gustavo Noronha Silva.
2946
2947         Fixes a regression added by r105253. The method that
2948         RenderThemeGtk needs to overwrite is popsMenuBySpaceOrReturn()
2949         instead of popsMenuByArrowKeys().
2950
2951         No new tests as it's already covered by
2952         fast/forms/select-popup-pagekeys.html and
2953         fast/forms/select/menulist-onchange-fired-with-key-up-down.html
2954         that started to fail after the revision mentioned above.
2955
2956         * platform/gtk/RenderThemeGtk.h:
2957         (WebCore::RenderThemeGtk::popsMenuBySpaceOrReturn):
2958
2959 2012-01-18  Andrey Kosyakov  <caseq@chromium.org>
2960
2961         Web Inspector: omit compression field in HAR entries for resources coming from cache
2962         https://bugs.webkit.org/show_bug.cgi?id=76543
2963
2964         Reviewed by Yury Semikhatsky.
2965
2966         * inspector/front-end/HAREntry.js:
2967         (WebInspector.HAREntry.prototype._buildContent):
2968         (WebInspector.HAREntry.prototype.get responseCompression):
2969
2970 2012-01-18  Mihnea Ovidenie  <mihnea@adobe.com>
2971
2972         [CSSRegions]Fix region style code in CSSStyleSelector
2973         https://bugs.webkit.org/show_bug.cgi?id=76453
2974
2975         Reviewed by Antti Koivisto.
2976
2977         Follow up after comments in https://bugs.webkit.org/show_bug.cgi?id=76064.
2978         With the new approach, the css rule specificity is correctly taken into account
2979         when applying the region style rule.
2980         No new tests, the region style tests are still disabled.
2981
2982         * css/CSSStyleSelector.cpp:
2983         (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
2984         (WebCore::CSSStyleSelector::CSSStyleSelector):
2985         (WebCore::CSSStyleSelector::addMatchedDeclaration):
2986         (WebCore::CSSStyleSelector::collectMatchingRules):
2987         (WebCore::CSSStyleSelector::collectMatchingRulesForRegion):
2988         (WebCore::CSSStyleSelector::matchRules):
2989         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2990         (WebCore::CSSStyleSelector::matchAllRules):
2991         (WebCore::CSSStyleSelector::styleForElement):
2992         (WebCore::CSSStyleSelector::pseudoStyleForElement):
2993         (WebCore::CSSStyleSelector::checkRegionStyle):
2994         (WebCore::CSSStyleSelector::checkRegionSelector):
2995         (WebCore::RuleData::RuleData):
2996         (WebCore::RuleSet::RuleSet):
2997         (WebCore::RuleSet::addRule):
2998         (WebCore::RuleSet::addRegionRule):
2999         (WebCore::RuleSet::addRulesFromSheet):
3000         (WebCore::isInsideRegionRule):
3001         (WebCore::CSSStyleSelector::applyDeclaration):
3002         (WebCore::CSSStyleSelector::applyDeclarations):
3003         (WebCore::CSSStyleSelector::isValidRegionStyleProperty):
3004         (WebCore::CSSStyleSelector::applyProperty):
3005         * css/CSSStyleSelector.h:
3006
3007 2012-01-17  Jer Noble  <jer.noble@apple.com>
3008
3009         Mac fails to fire an 'error' event for a <video> <source> having an URL with no file extension
3010         https://bugs.webkit.org/show_bug.cgi?id=76494
3011
3012         Reviewed by Eric Carlson.
3013
3014         No new tests; fixes compositing/video/video-with-invalid-source.html. Modified 
3015         media/video-source-error-no-candidate.html to check error condition.
3016
3017         When we run out of media engines for a given resource, inform the media player client
3018         that resource loading failed by calling mediaPlayerResourceNotSupported().
3019
3020         * html/HTMLMediaElement.cpp:
3021         (WebCore::HTMLMediaElement::mediaPlayerResourceNotSupported):
3022         * html/HTMLMediaElement.h:
3023         * platform/graphics/MediaPlayer.cpp:
3024         (WebCore::MediaPlayer::loadWithNextMediaEngine):
3025         * platform/graphics/MediaPlayer.h:
3026         (WebCore::MediaPlayerClient::mediaPlayerResourceNotSupported):
3027
3028 2012-01-18  Alexandru Chiculita  <achicu@adobe.com>
3029
3030         CSS Shaders: Parse float parameters for the custom() filter syntax
3031         https://bugs.webkit.org/show_bug.cgi?id=76253
3032
3033         Reviewed by Nikolas Zimmermann.
3034
3035         Custom CSS filters allow passing parameters from CSS to the underlying rendering technology (in this case WebGL Shaders).
3036         This patch adds support for parameters of types float, vec2, vec3 and vec4.
3037
3038         https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html#feCustomParamsAttribute
3039
3040         Tests: css3/filters/effect-custom-combined-missing.html
3041                css3/filters/effect-custom-parameters.html
3042
3043         * GNUmakefile.list.am:
3044         * Target.pri:
3045         * WebCore.gypi:
3046         * WebCore.vcproj/WebCore.vcproj:
3047         * WebCore.xcodeproj/project.pbxproj:
3048             Added CustomFilterParameter.h, CustomFilterNumberParameter.h and CustomFilterOperation.cpp to the projects.
3049
3050         * css/CSSComputedStyleDeclaration.cpp:
3051         (WebCore::CSSComputedStyleDeclaration::valueForCustomFilterNumberParameter):
3052         (WebCore::CSSComputedStyleDeclaration::valueForCustomFilterParameter):
3053         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
3054             Added the computed parameters in alphabetic order (CustomFilterOperation always keeps the parameters sorted).
3055         * css/CSSComputedStyleDeclaration.h:
3056         * css/CSSStyleSelector.cpp:
3057         (WebCore::sortParametersByNameComparator):
3058         (WebCore::CSSStyleSelector::parseCustomFilterNumberParamter):
3059         (WebCore::CSSStyleSelector::parseCustomFilterParameterList):
3060         (WebCore::CSSStyleSelector::createCustomFilterOperation):
3061             Added parsing for float, vec2, vec3 and vec4. The values are space separated.
3062
3063         * css/CSSStyleSelector.h:
3064         * platform/graphics/filters/CustomFilterNumberParameter.h: Added.
3065         (WebCore::CustomFilterNumberParameter::create):
3066         (WebCore::CustomFilterNumberParameter::size):
3067         (WebCore::CustomFilterNumberParameter::valueAt):
3068         (WebCore::CustomFilterNumberParameter::addValue):
3069         (WebCore::CustomFilterNumberParameter::CustomFilterNumberParameter):
3070
3071         * platform/graphics/filters/CustomFilterOperation.cpp: Added.
3072         (WebCore::CustomFilterOperation::CustomFilterOperation):
3073         (WebCore::CustomFilterOperation::~CustomFilterOperation):
3074             Moved constructor and destructor in CustomFilterOperation.cpp to avoid including CustomFilterParameter everywhere.
3075         (WebCore::CustomFilterOperation::hasSortedParameterList):
3076             Debug runtime check that we always have parameters in alphabetic order.
3077
3078         * platform/graphics/filters/CustomFilterOperation.h:
3079         (WebCore::CustomFilterOperation::create):
3080         (WebCore::CustomFilterOperation::parameters):
3081             Just added the parameters list. Not using a map, but keeping the items sorted by name. We need them sorted
3082             to make it easy and fast to merge two CustomFilterOperations during animations.
3083
3084         * platform/graphics/filters/CustomFilterParameter.h: Added.
3085         (WebCore::CustomFilterParameter::~CustomFilterParameter):
3086         (WebCore::CustomFilterParameter::parameterType):
3087         (WebCore::CustomFilterParameter::name):
3088         (WebCore::CustomFilterParameter::CustomFilterParameter):
3089         * platform/graphics/filters/CustomFilterShader.cpp:
3090         (WebCore::CustomFilterShader::uniformLocationByName):
3091         * platform/graphics/filters/CustomFilterShader.h:
3092
3093         * platform/graphics/filters/FECustomFilter.cpp:
3094         (WebCore::FECustomFilter::FECustomFilter):
3095         (WebCore::FECustomFilter::create):
3096         (WebCore::FECustomFilter::platformApplySoftware):
3097         (WebCore::FECustomFilter::bindProgramNumberParameters):
3098         (WebCore::FECustomFilter::bindProgramParameters):
3099             Added code that maps the parameters from CSS to WebGL.
3100         (WebCore::FECustomFilter::bindProgramAndBuffers):
3101         * platform/graphics/filters/FECustomFilter.h:
3102
3103         * rendering/FilterEffectRenderer.cpp:
3104         (WebCore::FilterEffectRenderer::build):
3105             Fixed a case when the filter was not created, letting the filter add itself as a source of its own. 
3106             Also added a test case for this particular case: css3/filters/effect-custom-combined-missing.html.
3107
3108 2012-01-18  Andrey Kosyakov  <caseq@chromium.org>
3109
3110         Web Inspector: resource tree model leaks frames
3111         https://bugs.webkit.org/show_bug.cgi?id=76533
3112
3113         Reviewed by Pavel Feldman.
3114
3115         * inspector/front-end/ResourceTreeModel.js:
3116         (WebInspector.ResourceTreeModel.prototype._frameDetached):
3117         (WebInspector.ResourceTreeModel.prototype._removeFrame):
3118         (WebInspector.ResourceTreeFrame.prototype._removeChildFrame):
3119
3120 2012-01-17  Vsevolod Vlasov  <vsevik@chromium.org>
3121
3122         Web Inspector: Enable support for Open Script dialog based on FilteredItemSelectionDialog.
3123         https://bugs.webkit.org/show_bug.cgi?id=76466
3124
3125         Reviewed by Pavel Feldman.
3126
3127         * English.lproj/localizedStrings.js:
3128         * inspector/front-end/FilteredItemSelectionDialog.js:
3129         (WebInspector.JavaScriptOutlineDialog.createShortcut):
3130         (WebInspector.OpenResourceDialog.filterOutEmptyURLs):
3131         (WebInspector.OpenResourceDialog):
3132         (WebInspector.OpenResourceDialog.install):
3133         (WebInspector.OpenResourceDialog._show):
3134         (WebInspector.OpenResourceDialog.createShortcut):
3135         (WebInspector.OpenResourceDialog.prototype.itemTitleAt):
3136         (WebInspector.OpenResourceDialog.prototype.itemKeyAt):
3137         (WebInspector.OpenResourceDialog.prototype.itemsCount):
3138         (WebInspector.OpenResourceDialog.prototype.requestItems):
3139         (WebInspector.OpenResourceDialog.prototype.selectItem):
3140         * inspector/front-end/ScriptsPanel.js:
3141         (WebInspector.ScriptsPanel.prototype.showUISourceCode):
3142
3143 2012-01-18  Pavel Feldman  <pfeldman@google.com>
3144
3145         Not reviewed: follow up to r105262, fixing front-end compilation.
3146
3147         * inspector/front-end/DOMAgent.js:
3148         (WebInspector.DOMDocument):
3149         (WebInspector.DOMModelResourceBinding.prototype.setContent.setOuterHTML):
3150
3151 2012-01-17  Pavel Feldman  <pfeldman@google.com>
3152
3153         Web Inspector: track HTML revisions when editing DOM and / or upon free flow edits.
3154         https://bugs.webkit.org/show_bug.cgi?id=76457
3155
3156         Reviewed by Yury Semikhatsky.
3157
3158         Test: inspector/elements/set-html-via-resource.html
3159
3160         * inspector/DOMEditor.cpp:
3161         (WebCore::DOMEditor::patchNode):
3162         * inspector/InspectorDOMAgent.cpp:
3163         (WebCore::InspectorDOMAgent::getOuterHTML):
3164         (WebCore::InspectorDOMAgent::setOuterHTML):
3165         (WebCore::InspectorDOMAgent::buildObjectForNode):
3166         * inspector/front-end/DOMAgent.js:
3167         (WebInspector.DOMNode):
3168         (WebInspector.DOMNode.prototype.setNodeName):
3169         (WebInspector.DOMNode.prototype.setNodeValue):
3170         (WebInspector.DOMNode.prototype.setAttribute):
3171         (WebInspector.DOMNode.prototype.setAttributeValue):
3172         (WebInspector.DOMNode.prototype.removeAttribute):
3173         (WebInspector.DOMNode.prototype.getChildNodes.mycallback):
3174         (WebInspector.DOMNode.prototype.getChildNodes):
3175         (WebInspector.DOMNode.prototype.setOuterHTML):
3176         (WebInspector.DOMNode.prototype.removeNode):
3177         (WebInspector.DOMNode.prototype.moveTo):
3178         (WebInspector.DOMDocument):
3179         (WebInspector.DOMAgent):
3180         (WebInspector.DOMAgent.prototype._setDocument):
3181         (WebInspector.DOMAgent.prototype._buildHighlightConfig):
3182         (WebInspector.DOMAgent.prototype._markRevision):
3183         (WebInspector.DOMAgent.prototype._captureDOM.callback):
3184         (WebInspector.DOMAgent.prototype._captureDOM):
3185         (WebInspector.DOMModelResourceBinding.prototype.setContent):
3186         (WebInspector.DOMModelResourceBinding.prototype.setContent.setOuterHTML):
3187         (WebInspector.DOMModelResourceBinding.prototype.setContent.withDocument):
3188         * inspector/front-end/ElementsTreeOutline.js:
3189         (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
3190
3191 2012-01-18  Andrey Kosyakov  <caseq@chromium.org>
3192
3193         Web Inspector: Popover does not disappear, causes debugger failure.
3194         https://bugs.webkit.org/show_bug.cgi?id=71363
3195
3196         Reviewed by Pavel Feldman.
3197
3198         This is a work-around simple enough for a merge. The real fix would
3199         be to get TextViewer to manage the highlight on its own, so it's not
3200         accidently removed while re-building DOM for the text chunk.
3201
3202         * inspector/front-end/JavaScriptSourceFrame.js:
3203         (WebInspector.JavaScriptSourceFrame.prototype._onHidePopover):
3204
3205 2012-01-18  Shinya Kawanaka  <shinyak@google.com>
3206
3207         Unreviewed build fix.
3208         https://bugs.webkit.org/show_bug.cgi?id=76525
3209
3210         Removed missing build headers.
3211
3212         * WebCore.xcodeproj/project.pbxproj:
3213
3214 2012-01-18  Jun Mukai  <mukai@chromium.org>
3215
3216         Use RenderTheme in HTMLSelectElement instead of #defines.
3217         <http://webkit.org/b/76519>
3218
3219         Reviewed by Kent Tamura.
3220
3221         Tests: no new tests because of no behavioral changes.
3222
3223         * html/HTMLSelectElement.cpp:
3224         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
3225         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
3226         * platform/gtk/RenderThemeGtk.h:
3227         (WebCore::RenderThemeGtk::popsMenuByArrowKeys):
3228         * rendering/RenderTheme.h:
3229         (WebCore::RenderTheme::popsMenuByArrowKeys):
3230         (WebCore::RenderTheme::popsMenuBySpaceOrReturn):
3231         * rendering/RenderThemeChromiumLinux.h:
3232         (WebCore::RenderThemeChromiumLinux::popsMenuBySpaceOrReturn):
3233         * rendering/RenderThemeMac.h:
3234         (WebCore::RenderThemeMac::popsMenuByArrowKeys):
3235
3236 2012-01-18  Abhishek Arya  <inferno@chromium.org>
3237
3238         Crash in FrameView::forceLayoutParentViewIfNeeded.        
3239         https://bugs.webkit.org/show_bug.cgi?id=76309
3240
3241         Reviewed by Nikolas Zimmermann.
3242
3243         updateWidgetPositions can blow away the owning renderer
3244         and its frameview, so need to protect it with refptr.
3245
3246         Test: svg/dom/parent-view-layout-crash.html
3247
3248         * page/FrameView.cpp:
3249         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
3250
3251 2012-01-18  Shinya Kawanaka  <shinyak@google.com>
3252
3253         Move ShadowContentElement from dom/ to html/ and make ShadowContentElement subclass of HTMLElement.
3254         https://bugs.webkit.org/show_bug.cgi?id=76241
3255
3256         Reviewed by Dimitri Glazkov.
3257
3258         Renamed ShadowContentElement to HTMLContentElement, and move it from dom/ to html/.
3259         Also, ShadowInclusionSelector and ShadowContentSelectorQuery are renamed to
3260         Content InclusionSelector and ContentSelectorQuery respectively.
3261
3262         No new tests, because no change in behavior.
3263
3264         * CMakeLists.txt:
3265         * GNUmakefile.list.am:
3266         * Target.pri:
3267         * WebCore.exp.in:
3268         * WebCore.gypi:
3269         * WebCore.vcproj/WebCore.vcproj:
3270         * WebCore.xcodeproj/project.pbxproj:
3271         * dom/DOMAllInOne.cpp:
3272         * dom/NodeRenderingContext.cpp:
3273         (WebCore::nextRendererOf):
3274         (WebCore::previousRendererOf):
3275         (WebCore::firstRendererOf):
3276         (WebCore::lastRendererOf):
3277         (WebCore::NodeRenderingContext::nextRenderer):
3278         (WebCore::NodeRenderingContext::previousRenderer):
3279         * dom/NodeRenderingContext.h:
3280         (WebCore::NodeRenderingContext::includer):
3281         * dom/ShadowRoot.cpp:
3282         (WebCore::ShadowRoot::includerFor):
3283         (WebCore::ShadowRoot::inclusions):
3284         (WebCore::ShadowRoot::ensureInclusions):
3285         * dom/ShadowRoot.h:
3286         * html/HTMLDetailsElement.cpp:
3287         (WebCore::DetailsContentElement::DetailsContentElement):
3288         (WebCore::DetailsSummaryElement::DetailsSummaryElement):
3289         * html/HTMLElementsAllInOne.cpp:
3290         * html/HTMLSummaryElement.cpp:
3291         (WebCore::SummaryContentElement::SummaryContentElement):
3292         * html/shadow/ContentInclusionSelector.cpp: Renamed from Source/WebCore/dom/ShadowInclusionSelector.cpp.
3293         (WebCore::ShadowInclusion::append):
3294         (WebCore::ShadowInclusion::unlink):
3295         (WebCore::ShadowInclusionList::ShadowInclusionList):
3296         (WebCore::ShadowInclusionList::~ShadowInclusionList):
3297         (WebCore::ShadowInclusionList::find):
3298         (WebCore::ShadowInclusionList::clear):
3299         (WebCore::ShadowInclusionList::append):
3300         (WebCore::ContentInclusionSelector::ContentInclusionSelector):
3301         (WebCore::ContentInclusionSelector::~ContentInclusionSelector):
3302         (WebCore::ContentInclusionSelector::select):
3303         (WebCore::ContentInclusionSelector::unselect):
3304         (WebCore::ContentInclusionSelector::findFor):
3305         (WebCore::ContentInclusionSelector::didSelect):
3306         (WebCore::ContentInclusionSelector::willSelectOver):
3307         * html/shadow/ContentInclusionSelector.h: Renamed from Source/WebCore/dom/ShadowInclusionSelector.h.
3308         (WebCore::ShadowInclusion::includer):
3309         (WebCore::ShadowInclusion::content):
3310         (WebCore::ShadowInclusion::next):
3311         (WebCore::ShadowInclusion::previous):
3312         (WebCore::ShadowInclusion::ShadowInclusion):
3313         (WebCore::ShadowInclusion::create):
3314         (WebCore::ShadowInclusionList::first):
3315         (WebCore::ShadowInclusionList::last):
3316         (WebCore::ShadowInclusionList::isEmpty):
3317         (WebCore::ShadowInclusionSet::add):
3318         (WebCore::ShadowInclusionSet::remove):
3319         (WebCore::ShadowInclusionSet::isEmpty):
3320         (WebCore::ShadowInclusionSet::Translator::hash):
3321         (WebCore::ShadowInclusionSet::Translator::equal):
3322         (WebCore::ShadowInclusionSet::Hash::hash):
3323         (WebCore::ShadowInclusionSet::Hash::equal):
3324         (WebCore::ShadowInclusionSet::find):
3325         (WebCore::ContentInclusionSelector::hasCandidates):
3326         * html/shadow/ContentSelectorQuery.cpp: Renamed from Source/WebCore/dom/ShadowContentSelectorQuery.cpp.
3327         (WebCore::ContentSelectorQuery::ContentSelectorQuery):
3328         (WebCore::ContentSelectorQuery::matches):
3329         * html/shadow/ContentSelectorQuery.h: Renamed from Source/WebCore/dom/ShadowContentSelectorQuery.h.
3330         * html/shadow/HTMLContentElement.cpp: Renamed from Source/WebCore/dom/ShadowContentElement.cpp.
3331         (WebCore::HTMLContentElement::create):
3332         (WebCore::HTMLContentElement::HTMLContentElement):
3333         (WebCore::HTMLContentElement::~HTMLContentElement):
3334         (WebCore::HTMLContentElement::attach):
3335         (WebCore::HTMLContentElement::detach):
3336         (WebCore::HTMLContentElement::select):
3337         (WebCore::HTMLContentElement::setSelect):
3338         * html/shadow/HTMLContentElement.h: Renamed from Source/WebCore/dom/ShadowContentElement.h.
3339         (WebCore::HTMLContentElement::inclusions):
3340         (WebCore::HTMLContentElement::isContentElement):
3341         (WebCore::HTMLContentElement::rendererIsNeeded):
3342         (WebCore::HTMLContentElement::createRenderer):
3343         (WebCore::toHTMLContentElement):
3344         * testing/Internals.cpp:
3345         (WebCore::Internals::createContentElement):
3346         * testing/Internals.h:
3347         * testing/Internals.idl:
3348
3349 2012-01-17  Nikolas Zimmermann  <nzimmermann@rim.com>
3350
3351         RenderSVGRoot should inherit from RenderReplaced
3352         https://bugs.webkit.org/show_bug.cgi?id=76446
3353
3354         Reviewed by Zoltan Herczeg.
3355
3356         Let RenderSVGRoot inherit from RenderReplaced, instead of faking RenderReplaced, by inherting from RenderBox
3357         and calling setReplaced(true) in the constructor. The outermost <svg> element is a replaced element in the
3358         sense of CSS, and thus this is just a logical move. It fixes some issues where the <svg> root appeared
3359         as selection leaf, covered by existing tests.
3360
3361         It allows us to simplify the painting, as outlines, etc. are painted by RenderReplaced now.
3362         While I was it, speed up the local to border box computations by caching the result.
3363
3364         * rendering/RenderReplaced.cpp:
3365         (WebCore::RenderReplaced::paint):
3366         * rendering/svg/RenderSVGRoot.cpp:
3367         (WebCore::RenderSVGRoot::RenderSVGRoot):
3368         (WebCore::RenderSVGRoot::layout):
3369         (WebCore::RenderSVGRoot::paintReplaced):
3370         (WebCore::RenderSVGRoot::willBeDestroyed):
3371         (WebCore::RenderSVGRoot::styleWillChange):
3372         (WebCore::RenderSVGRoot::styleDidChange):
3373         (WebCore::RenderSVGRoot::updateFromElement):
3374         (WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
3375         (WebCore::RenderSVGRoot::localToParentTransform):
3376         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
3377         (WebCore::RenderSVGRoot::mapLocalToContainer):
3378         (WebCore::RenderSVGRoot::nodeAtPoint):
3379         * rendering/svg/RenderSVGRoot.h:
3380         (WebCore::RenderSVGRoot::canHaveChildren):
3381         (WebCore::RenderSVGRoot::canBeSelectionLeaf):
3382         * svg/SVGSVGElement.cpp:
3383         (WebCore::SVGSVGElement::setupInitialView):
3384
3385 2012-01-17  Sheriff Bot  <webkit.review.bot@gmail.com>
3386
3387         Unreviewed, rolling out r105244.
3388         http://trac.webkit.org/changeset/105244
3389         https://bugs.webkit.org/show_bug.cgi?id=76518
3390
3391         broke Chromium Mac (Requested by rolandsteiner on #webkit).
3392
3393         * accessibility/AccessibilityObject.cpp:
3394         (WebCore::AccessibilityObject::checkboxOrRadioValue):
3395         * accessibility/AccessibilityObject.h:
3396         * accessibility/AccessibilityRenderObject.cpp:
3397         * accessibility/AccessibilityRenderObject.h:
3398         * accessibility/AccessibilityScrollView.cpp:
3399         * accessibility/AccessibilityScrollView.h:
3400
3401 2012-01-17  Hajime Morrita  <morrita@chromium.org>
3402
3403         [Internals] Should be able to access corresponding Document object.
3404         https://bugs.webkit.org/show_bug.cgi?id=76425
3405
3406         Reviewed by Adam Barth.
3407
3408         - Allow FrameDestructionObserver to re-setting the Frame reference.
3409         - Make Internals a subclass of FrameDestructionObserver.
3410
3411         Since Internals::reset() is called for each test, we can access
3412         the acive Frame object during the test. The frame reference will be
3413         used by coming changes.
3414
3415         No new tests. Covered by existing tests.
3416
3417         * WebCore.exp.in:
3418         * page/FrameDestructionObserver.cpp:
3419         (WebCore::FrameDestructionObserver::FrameDestructionObserver):
3420         (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
3421         (WebCore::FrameDestructionObserver::observe):
3422         * page/FrameDestructionObserver.h:
3423         * testing/Internals.cpp:
3424         (WebCore::Internals::Internals):
3425         (WebCore::Internals::reset):
3426         * testing/Internals.h:
3427
3428 2012-01-17  Dominic Mazzoni  <dmazzoni@google.com>
3429
3430         Accessibility: Chromium needs methods to scroll an object into view or to a specific location.
3431         https://bugs.webkit.org/show_bug.cgi?id=73460
3432
3433         Reviewed by Chris Fleizach.
3434
3435         Tests: platform/chromium/accessibility/scroll-to-global-point-main-window.html
3436                platform/chromium/accessibility/scroll-to-global-point-nested.html
3437                platform/chromium/accessibility/scroll-to-make-visible-div-overflow.html
3438                platform/chromium/accessibility/scroll-to-make-visible-iframe.html
3439                platform/chromium/accessibility/scroll-to-make-visible-main-window.html
3440                platform/chromium/accessibility/scroll-to-make-visible-nested.html
3441                platform/chromium/accessibility/scroll-to-make-visible-with-subfocus.html
3442
3443         * accessibility/AccessibilityObject.cpp:
3444         (WebCore::computeBestScrollOffset):
3445         (WebCore::AccessibilityObject::scrollToMakeVisible):
3446         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
3447         (WebCore::AccessibilityObject::scrollToGlobalPoint):
3448         * accessibility/AccessibilityObject.h:
3449         (WebCore::AccessibilityObject::getScrollableAreaIfScrollable):
3450         (WebCore::AccessibilityObject::scrollTo):
3451         * accessibility/AccessibilityRenderObject.cpp:
3452         (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
3453         (WebCore::AccessibilityRenderObject::scrollTo):