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