32238dbe7a47b3685bd913566045a1db0f695d1e
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-05-24  Andy Estes  <aestes@apple.com>
2
3         Reviewed by Geoffrey Garen.
4
5         REGRESSION (r70748): WebKit cannot play QuickTime movies on Mac OS X Wiki Server pages
6         https://bugs.webkit.org/show_bug.cgi?id=61229
7
8         This site-specific hack maintains compatibility with Mac OS X Wiki Server,
9         which embeds QuickTime movies using an object tag containing QuickTime's
10         ActiveX classid. Treat this classid as valid only if OS X Server's unique
11         'generator' meta tag is present. Only apply this quirk if there is no
12         fallback content, which ensures the quirk will disable itself if Wiki
13         Server is updated to generate an alternate embed tag as fallback content.
14
15         * html/HTMLObjectElement.cpp:
16         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Return
17         true if site-specific quirks are enabled, the object element has no
18         fallback content, the classid attribute matches QuickTime's classid and
19         the document has a 'generator' meta tag matching Mac OS X Web Services
20         Server's unique generator string.
21         (WebCore::HTMLObjectElement::hasValidClassId): Call
22         shouldAllowQuickTimeClassIdQuirk()
23         * html/HTMLObjectElement.h:
24
25 2011-05-24  Nate Chapin  <japhet@chromium.org>
26
27         Reviewed by Adam Barth.
28
29         Change CachedResources to take a ResourceRequest instead of
30         a url in their constructors and provide a very minimal set of
31         cases for avoiding reusing a CachedResource. The ResourceRequest
32         part of this change requires pushing responsibility
33         for calling Document::completeURL() to the caller, instead of
34         CachedResourceLoader, since ResourceRequest ASSERTs if it
35         is constructed with an invalid url.
36
37         https://bugs.webkit.org/show_bug.cgi?id=61318
38
39         Refactor, no new tests.
40
41         * css/CSSFontSelector.cpp:
42         (WebCore::CSSFontSelector::addFontFaceRule):
43         * css/CSSImageValue.cpp:
44         (WebCore::CSSImageValue::cachedImage):
45         * css/CSSImportRule.cpp:
46         (WebCore::CSSImportRule::insertedIntoParent):
47         * dom/ProcessingInstruction.cpp:
48         (WebCore::ProcessingInstruction::checkStyleSheet):
49         * dom/ScriptElement.cpp:
50         (WebCore::ScriptElement::requestScript):
51         * html/HTMLLinkElement.cpp:
52         (WebCore::HTMLLinkElement::process):
53         * loader/ImageLoader.cpp:
54         (WebCore::ImageLoader::updateFromElement):
55         * loader/cache/CachedCSSStyleSheet.cpp:
56         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
57         (WebCore::CachedCSSStyleSheet::didAddClient):
58         (WebCore::CachedCSSStyleSheet::checkNotify):
59         * loader/cache/CachedCSSStyleSheet.h:
60         * loader/cache/CachedFont.cpp:
61         (WebCore::CachedFont::CachedFont):
62         * loader/cache/CachedFont.h:
63         * loader/cache/CachedImage.cpp:
64         (WebCore::CachedImage::CachedImage):
65         (WebCore::CachedImage::checkShouldPaintBrokenImage):
66         * loader/cache/CachedImage.h:
67         * loader/cache/CachedResource.cpp:
68         (WebCore::CachedResource::CachedResource):
69         (WebCore::reuseRequest):
70         (WebCore::CachedResource::allowReuseOfRequest):
71         (WebCore::CachedResource::removeClient):
72         (WebCore::CachedResource::canUseCacheValidator):
73         * loader/cache/CachedResource.h:
74         (WebCore::CachedResource::resourceRequest):
75         (WebCore::CachedResource::url):
76         * loader/cache/CachedResourceLoader.cpp:
77         * loader/cache/CachedResourceLoader.h:
78         * loader/cache/CachedResourceRequest.cpp:
79         (WebCore::CachedResourceRequest::load):
80         * loader/cache/CachedScript.cpp:
81         (WebCore::CachedScript::CachedScript):
82         * loader/cache/CachedScript.h:
83         * loader/cache/CachedXSLStyleSheet.cpp:
84         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
85         (WebCore::CachedXSLStyleSheet::didAddClient):
86         (WebCore::CachedXSLStyleSheet::checkNotify):
87         * loader/cache/CachedXSLStyleSheet.h:
88         * svg/SVGFEImageElement.cpp:
89         (WebCore::SVGFEImageElement::requestImageResource):
90         * svg/SVGFontFaceUriElement.cpp:
91         (WebCore::SVGFontFaceUriElement::loadFont):
92         * xml/XSLImportRule.cpp:
93         (WebCore::XSLImportRule::loadSheet):
94
95 2011-05-24  Kent Tamura  <tkent@chromium.org>
96
97         Reviewed by Dimitri Glazkov.
98
99         Use Element::shadowPseudoId() for text field decoration elements
100         https://bugs.webkit.org/show_bug.cgi?id=61351
101
102         No new tests. Covered by existing tests.
103
104         * css/CSSSelector.cpp: Remove support for the following static pseudo selectors:
105           - -webkit-inner-spin-button
106           - -webkit-input-speech-button
107           - -webkit-outer-spin-button
108           - -webkit-search-cancel-button
109           - -webkit-search-decoration
110           - -webkit-search-results-button
111           - -webkit-search-results-decoration
112         (WebCore::CSSSelector::pseudoId):
113         (WebCore::nameToPseudoTypeMap):
114         (WebCore::CSSSelector::extractPseudoType):
115         * css/CSSSelector.h: ditto.
116         * css/CSSStyleSelector.cpp:
117         (WebCore::CSSStyleSelector::matchRules):
118           Store shadowPseudoId() result in a local variable because
119           SearchFieldResultsButtonElement::shadowPseudoId() is a little expensive.
120         * html/shadow/TextControlInnerElements.cpp:
121          Override Element::shadowPseudoId() instead of Element::styleForRenderer().
122         (WebCore::SearchFieldResultsButtonElement::shadowPseudoId):
123         (WebCore::SearchFieldCancelButtonElement::shadowPseudoId):
124         (WebCore::SpinButtonElement::shadowPseudoId):
125         (WebCore::InputFieldSpeechButtonElement::shadowPseudoId):
126         * html/shadow/TextControlInnerElements.h: Update declarations.
127         * rendering/RenderTextControlSingleLine.cpp: Remove createFooStyle() functions.
128         * rendering/RenderTextControlSingleLine.h: ditto.
129         * rendering/style/RenderStyleConstants.h: Remove unused pseudo IDs.
130
131 2011-05-24  Dimitri Glazkov  <dglazkov@chromium.org>
132
133         Sorted WebCore.xcodeproj again.
134
135         * WebCore.xcodeproj/project.pbxproj: Ran sort-XCode-project-file.
136
137 2011-05-24  Stephanie Lewis  <slewis@apple.com>
138
139         Reviewed by Geoff Garen.
140
141         https://bugs.webkit.org/show_bug.cgi?id=61345
142         part of <rdar://problem/8675177>
143         Don't initialize ResourceResponse.m_suggestedFilename until we want to use it.  Initializing it requires reading in and parsing a plist.  
144         Add new initialization state CommonAndUncommonFields to ResourceResponse.  This will be for all the header fields.
145         Move suggestedFilename initialization to AllFields so it is never initialized unless we ask for it. 
146         Add "Content-Type" to common headers since it is looked for by every CSS sheet load.
147
148         No new tests because functionality has not changed.
149
150         * platform/network/ResourceResponseBase.cpp:
151         (WebCore::ResourceResponseBase::adopt):
152         (WebCore::ResourceResponseBase::suggestedFilename):
153         (WebCore::ResourceResponseBase::setSuggestedFilename):
154         (WebCore::ResourceResponseBase::httpStatusText):
155         (WebCore::ResourceResponseBase::setHTTPStatusText):
156         (WebCore::ResourceResponseBase::httpHeaderField):
157         (WebCore::ResourceResponseBase::setHTTPHeaderField):
158         (WebCore::ResourceResponseBase::httpHeaderFields):
159         (WebCore::ResourceResponseBase::isAttachment):
160         (WebCore::ResourceResponseBase::setLastModifiedDate):
161         (WebCore::ResourceResponseBase::lastModifiedDate):
162         (WebCore::ResourceResponseBase::wasCached):
163         (WebCore::ResourceResponseBase::connectionReused):
164         (WebCore::ResourceResponseBase::setConnectionReused):
165         (WebCore::ResourceResponseBase::connectionID):
166         (WebCore::ResourceResponseBase::setConnectionID):
167         (WebCore::ResourceResponseBase::resourceLoadTiming):
168         (WebCore::ResourceResponseBase::setResourceLoadTiming):
169         (WebCore::ResourceResponseBase::resourceLoadInfo):
170         (WebCore::ResourceResponseBase::setResourceLoadInfo):
171         * platform/network/ResourceResponseBase.h:
172         * platform/network/cf/ResourceResponse.h:
173         (WebCore::ResourceResponse::ResourceResponse):
174         * platform/network/cf/ResourceResponseCFNet.cpp:
175         (WebCore::ResourceResponse::platformLazyInit):
176         * platform/network/mac/ResourceResponseMac.mm:
177         (WebCore::ResourceResponse::platformLazyInit):
178
179 2011-05-24  Michael Saboff  <msaboff@apple.com>
180
181         Reviewed by Geoffrey Garen.
182
183         Improve handling in WebCore of low memory situations
184         https://bugs.webkit.org/show_bug.cgi?id=61222
185
186         Added new class, MemoryPressureHandler, to platform to respond to low
187         system memory events. Added Mac specific implementation that reduces the
188         page cache, NSURL cache, WebCore cache by half their current usage
189         and then garbage collects.  This can allow Safari to continue operating
190         in a low memory situation with minimal paging.
191         Split up prune operations in MemoryCache to allow for pruning to a
192         specific actual size to support this change.
193
194         No tests added as the functionality of WebKit wasn't changed.
195
196         * GNUmakefile.list.am:
197         * WebCore.exp.in:
198         * WebCore.gypi:
199         * WebCore.pro:
200         * WebCore.vcproj/WebCore.vcproj:
201         * WebCore.xcodeproj/project.pbxproj:
202         * loader/cache/MemoryCache.cpp:
203         (WebCore::MemoryCache::pruneLiveResources):
204         (WebCore::MemoryCache::forcePruneLiveResources):
205         (WebCore::MemoryCache::pruneLiveResourcesToTarget):
206         (WebCore::MemoryCache::pruneDeadResources):
207         (WebCore::MemoryCache::forcePruneDeadResources):
208         (WebCore::MemoryCache::pruneDeadResourcesToTarget):
209         * loader/cache/MemoryCache.h:
210         (WebCore::MemoryCache::forcePrune):
211         * platform/MemoryPressureHandler.cpp: Added.
212         (WebCore::memoryPressureHandler):
213         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
214         (WebCore::MemoryPressureHandler::install):
215         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
216         * platform/MemoryPressureHandler.h: Added.
217         * platform/mac/MemoryPressureHandler.mm: Added.
218         (WebCore::MemoryPressureHandler::install):
219         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
220
221 2011-05-24  Kent Tamura  <tkent@chromium.org>
222
223         Reviewed by Dimitri Glazkov.
224
225         Node::shadowAncestorNode() and shadowTreeRootNode() should be const.
226         https://bugs.webkit.org/show_bug.cgi?id=61398
227
228         shadowAncestorNode() and shadowTreeRootNode() should be const
229         though they can return 'this' pointer.
230
231         No new tests. This doesn't change any visible behavior.
232
233         * dom/Node.cpp:
234         (WebCore::Node::shadowAncestorNode): Make this const.
235         (WebCore::Node::shadowTreeRootNode): ditto.
236         * dom/Node.h: Update declarations.
237         * html/shadow/TextControlInnerElements.h:
238         (WebCore::SpinButtonElement::isEnabledFormControl): Need no const_cast<>.
239         (WebCore::SpinButtonElement::isReadOnlyFormControl): ditto.
240
241 2011-05-24  James Simonsen  <simonjam@chromium.org>
242
243         Reviewed by Eric Seidel.
244
245         ASSERT_NOT_REACHED reached with broken ideograph and system fallback
246         https://bugs.webkit.org/show_bug.cgi?id=53528
247
248         Test: fast/text/justify-ideograph-vertical.html (on chromium linux)
249
250         * platform/graphics/FontFastPath.cpp:
251         (WebCore::Font::glyphDataForCharacter): Identify and handle broken ideographs as any other variant.
252         * platform/graphics/SimpleFontData.h:
253         (WebCore::SimpleFontData::variantFontData): Added BrokenIdeographVariant.
254
255 2011-05-24  Syed Idris Shah  <syed.idris-shah@nokia.com>
256
257         Reviewed by Andreas Kling.
258
259         [Qt] fast/canvas/webgl/gl-uniform-arrays.html failing for Qt on Linux
260         https://bugs.webkit.org/show_bug.cgi?id=60377 
261
262         LayoutTests/fast/canvas/webgl/gl-uniform-arrays.html
263
264         We do not need assert for the useProgram as program can be null.
265
266         * platform/graphics/qt/GraphicsContext3DQt.cpp:
267         (WebCore::GraphicsContext3D::useProgram): Program can be null. Removing assert.
268
269 2011-05-24  Ryosuke Niwa  <rniwa@webkit.org>
270
271         Reviewed by Darin Adler.
272
273         Undo gets broken in contenteditable area when a text field's value is set by script
274         https://bugs.webkit.org/show_bug.cgi?id=61340
275
276         The bug was caused by RenderTextControl::setInnerTextValue's clearing undo stack by
277         calling clearUndoRedoOperations whenever script sets new value to input or textarea.
278
279         Fixed the bug by removing the offending call to clearUndoRedoOperations. While this call
280         was added by r15565 to fix a crash, SimpleEditCommands have since become much more robust
281         and the test added by r15565 (fast/forms/text-field-setvalue-crash.html) still passes.
282
283         Test: editing/undo/undo-after-setting-value.html
284
285         * rendering/RenderTextControl.cpp:
286         (WebCore::RenderTextControl::setInnerTextValue):
287
288 2011-05-24  Dan Bernstein  <mitz@apple.com>
289
290         Reviewed by Dave Hyatt.
291
292         Move code to discover if a CTFont has vertical glyphs out of SimpleFontData::platformInit()
293         https://bugs.webkit.org/show_bug.cgi?id=61392
294
295         * platform/graphics/mac/SimpleFontDataMac.mm:
296         (WebCore::fontHasVerticalGlyphs): Moved code here...
297         (WebCore::SimpleFontData::platformInit): ...from here.
298
299 2011-05-24  Kenneth Russell  <kbr@google.com>
300
301         Reviewed by James Robinson.
302
303         Implement Float64Array
304         https://bugs.webkit.org/show_bug.cgi?id=39144
305
306         Implemented Float64Array based on the existing Float32Array sources.
307         Built and tested in Chromium on Linux and Mac OS X and Safari on Mac OS X.
308
309         * CMakeLists.txt:
310         * CodeGenerators.pri:
311         * DerivedSources.cpp:
312         * DerivedSources.make:
313         * GNUmakefile.list.am:
314         * UseJSC.cmake:
315         * WebCore.gypi:
316         * WebCore.pro:
317         * WebCore.vcproj/WebCore.vcproj:
318         * WebCore.xcodeproj/project.pbxproj:
319         * bindings/js/JSBindingsAllInOne.cpp:
320         * bindings/js/JSDOMWindowCustom.cpp:
321         (WebCore::JSDOMWindow::float64Array):
322         * bindings/js/JSFloat64ArrayCustom.cpp: Added.
323         (WebCore::JSFloat64Array::indexSetter):
324         (WebCore::toJS):
325         (WebCore::JSFloat64Array::set):
326         (WebCore::JSFloat64ArrayConstructor::constructJSFloat64Array):
327         * bindings/v8/custom/V8Float64ArrayCustom.cpp: Added.
328         (WebCore::V8Float64Array::constructorCallback):
329         (WebCore::V8Float64Array::setCallback):
330         (WebCore::toV8):
331         * html/canvas/ArrayBufferView.h:
332         (WebCore::ArrayBufferView::isDoubleArray):
333         * html/canvas/Float64Array.cpp: Added.
334         (WebCore::Float64Array::create):
335         (WebCore::Float64Array::Float64Array):
336         (WebCore::Float64Array::subarray):
337         * html/canvas/Float64Array.h: Added.
338         (WebCore::Float64Array::set):
339         (WebCore::Float64Array::item):
340         (WebCore::Float64Array::isDoubleArray):
341         * html/canvas/Float64Array.idl: Added.
342         * page/DOMWindow.idl:
343         * workers/WorkerContext.idl:
344
345 2011-05-24  Simon Fraser  <simon.fraser@apple.com>
346
347         Reviewed by Chris Marrin.
348
349         Add ability to set compositing layer bounds origin
350         https://bugs.webkit.org/show_bug.cgi?id=61381
351
352         On Core Animation layers, the origin of the bounds
353         rectangle affects where layer content is rendered, as well
354         as the offset of sublayers. Currently we always set the
355         bounds offset to a zero point, but may need to make use
356         of the bounds offset in future, so expose it via GraphicsLayer.
357
358         * platform/graphics/GraphicsLayer.h:
359         (WebCore::GraphicsLayer::boundsOrigin):
360         (WebCore::GraphicsLayer::setBoundsOrigin):
361         * platform/graphics/ca/GraphicsLayerCA.cpp:
362         (WebCore::GraphicsLayerCA::setSize):
363         (WebCore::GraphicsLayerCA::setBoundsOrigin):
364         (WebCore::GraphicsLayerCA::setAllowTiledLayer):
365         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
366         (WebCore::GraphicsLayerCA::updateBounds):
367         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
368         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
369         * platform/graphics/ca/GraphicsLayerCA.h:
370
371 2011-05-24  Leandro Pereira  <leandro@profusion.mobi>
372
373         [EFL] Build fix.
374
375         * CMakeLists.txt: Also build platform/network/ContentTypeParser.cpp,
376         added by r86289.
377
378 2011-05-24  Leandro Pereira  <leandro@profusion.mobi>
379
380         [EFL] Build fix.
381
382         * bridge/runtime_root.cpp: Include <heap/Weak.h> instead of
383         <JavaScriptCore/Weak.h>.
384
385 2011-05-24  Jay Civelli  <jcivelli@chromium.org>
386
387         Reviewed by Adam Barth.
388
389         Adding MHTML reading support. That required some basic MIME header parsing.
390         Modified DocumentLoader to keep a reference to the currently Archive loaded,
391         so we can have different policies for loading subresources depending on the
392         archive type.
393         https://bugs.webkit.org/show_bug.cgi?id=7168
394
395         * CMakeLists.txt:
396         * Configurations/FeatureDefines.xcconfig:
397         * GNUmakefile.am:
398         * GNUmakefile.list.am:
399         * WebCore.gyp/WebCore.gyp:
400         * WebCore.gypi:
401         * WebCore.pro:
402         * WebCore.vcproj/WebCore.vcproj:
403         * WebCore.xcodeproj/project.pbxproj:
404         * features.pri:
405         * loader/DocumentLoader.cpp:
406         (WebCore::DocumentLoader::commitLoad):
407         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
408         (WebCore::DocumentLoader::popArchiveForSubframe):
409         (WebCore::DocumentLoader::scheduleArchiveLoad):
410         * loader/DocumentLoader.h:
411         * loader/FrameLoader.cpp:
412         (WebCore::FrameLoader::loadURLIntoChildFrame):
413         (WebCore::FrameLoader::loadArchive):
414         (WebCore::FrameLoader::stopAllLoaders):
415         (WebCore::FrameLoader::finishedLoadingDocument):
416         * loader/FrameLoader.h:
417         (WebCore::FrameLoader::archive):
418         * loader/MainResourceLoader.cpp:
419         (WebCore::MainResourceLoader::continueAfterContentPolicy):
420         * loader/ResourceLoader.cpp:
421         (WebCore::ResourceLoader::start):
422         * loader/archive/Archive.cpp: Added.
423         * loader/archive/Archive.h:
424         (WebCore::Archive::mainResource):
425         * loader/archive/ArchiveFactory.cpp:
426         (WebCore::archiveFactoryCreate):
427         (WebCore::archiveMIMETypes):
428         (WebCore::ArchiveFactory::create):
429         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
430         * loader/archive/ArchiveFactory.h:
431         * loader/archive/ArchiveResourceCollection.cpp:
432         (WebCore::ArchiveResourceCollection::addAllResources):
433         (WebCore::ArchiveResourceCollection::popSubframeArchive):
434         * loader/archive/ArchiveResourceCollection.h:
435         * loader/archive/cf/LegacyWebArchive.cpp:
436         (WebCore::LegacyWebArchive::create):
437         (WebCore::LegacyWebArchive::type):
438         * loader/archive/cf/LegacyWebArchive.h:
439         * loader/archive/mhtml/MHTMLArchive.cpp: Added.
440         * loader/archive/mhtml/MHTMLArchive.h: Added.
441         * loader/archive/mhtml/MHTMLParser.cpp: Added.
442         * loader/archive/mhtml/MHTMLParser.h: Added.
443         * platform/MIMETypeRegistry.cpp:
444         (WebCore::initializeSupportedNonImageMimeTypes):
445         * platform/mac/PasteboardMac.mm:
446         (WebCore::Pasteboard::documentFragment):
447         * platform/network/MIMEHeader.cpp: Added.
448         * platform/network/MIMEHeader.h: Added.
449
450 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
451
452         Try to fix some builds: #include Weak.h for Weak<T>.
453
454         * bridge/runtime_root.h:
455
456 2011-05-24  Sam Weinig  <sam@webkit.org>
457
458         Reviewed by Beth Dakin.
459
460         Can't scroll scaled page that has overflow:hidden on its root
461         <rdar://problem/9029189>
462         https://bugs.webkit.org/show_bug.cgi?id=61339
463
464         Test: fast/events/scroll-in-scaled-page-with-overflow-hidden.html
465
466         * page/FrameView.cpp:
467         (WebCore::FrameView::applyOverflowToViewport):
468         Scrollbars should be enabled for the viewport when scaled, even if overflow:hidden
469         is specified.
470
471 2011-05-24  Adam Roben  <aroben@apple.com>
472
473         Leopard build fix
474
475         * bridge/runtime_root.cpp: Added a missing #include.
476
477 2011-05-24  Jian Li  <jianli@chromium.org>
478
479         Reviewed by Kenneth Russell.
480
481         Make start parameter of Blob.slice optional.
482         https://bugs.webkit.org/show_bug.cgi?id=59628
483
484         The start parameter should be optional per the latest FILE API
485         spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob.
486
487         * fileapi/Blob.h:
488         * fileapi/Blob.idl: Make start parameter optional.
489
490 2011-05-24  Adam Roben  <aroben@apple.com>
491
492         Invalidate RuntimeObjects when they are finalized
493
494         This will cause the underlying NPObject to be released at finalization time, rather than at
495         destruction time (which is unpredictable and could occur after the plugin has been
496         unloaded).
497
498         Test: plugins/npobject-js-wrapper-destroyed-after-plugin-unload.html
499
500         Fixes <http://webkit.org/b/61317> <rdar://problem/9489829> Crash in _NPN_DeallocateObject
501         when reloading yahoo.com webarchive in WebKit1
502
503         Reviewed by Oliver Hunt.
504
505         * bridge/runtime_object.cpp:
506         (JSC::Bindings::RuntimeObject::~RuntimeObject): Assert that we've already been invalidated.
507
508         * bridge/runtime_root.cpp:
509         (JSC::Bindings::RootObject::invalidate):
510         (JSC::Bindings::RootObject::addRuntimeObject):
511         Updated for m_runtimeObjects type change.
512
513         (JSC::Bindings::RootObject::finalize): Added. Invalidates the RuntimeObject and removes it
514         from the map.
515
516         * bridge/runtime_root.h: Now inherits from WeakHandleOwner.
517         Changed m_runtimeObjects from a WeakGCMap to a HashMap of JSC::Weak objects so that we will
518         be notified when the RuntimeObjects are finalized.
519
520 2011-05-24  Mike Reed  <reed@google.com>
521
522         Reviewed by Kenneth Russell.
523
524         skia: fix stroking of zero-height rectangles
525         https://bugs.webkit.org/show_bug.cgi?id=61284
526
527         Tests: canvas/philip/tests/2d.line.miter.lineedge.html
528                canvas/philip/tests/2d.strokeRect.zero.4.html
529
530         * platform/graphics/skia/GraphicsContextSkia.cpp:
531         (WebCore::GraphicsContext::strokeRect):
532
533 2011-05-24  Zan Dobersek  <zandobersek@gmail.com> and Philippe Normand  <pnormand@igalia.com>
534
535         Reviewed by Kenneth Russell.
536
537         Enable FloatArray usage outside WebGL guards
538         https://bugs.webkit.org/show_bug.cgi?id=61356
539
540         * webaudio/AudioBuffer.cpp:
541         * webaudio/AudioBuffer.idl:
542         * webaudio/RealtimeAnalyser.cpp:
543         * webaudio/RealtimeAnalyser.h:
544         * webaudio/RealtimeAnalyserNode.h:
545         * webaudio/RealtimeAnalyserNode.idl:
546
547 2011-05-24  Adam Klein  <adamk@chromium.org>
548
549         Unreviewed, rolling out r87145.
550         http://trac.webkit.org/changeset/87145
551         https://bugs.webkit.org/show_bug.cgi?id=61194
552
553         Regression in LayoutTests/inspector/debugger/scripts-panel.html on Chromium Win & Linux.
554
555         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
556         (WebCore::V8InjectedScriptHost::evaluateCallback):
557
558 2011-05-24  Matthew Delaney  <mdelaney@apple.com>
559
560         Reviewed by Simon Fraser.
561
562         Clamp coordinates to integers for canvas create/getImageData routines
563         https://bugs.webkit.org/show_bug.cgi?id=61135
564
565         Test: fast/canvas/canvas-getImageData-largeNonintegralDimensions.html
566
567         * html/HTMLCanvasElement.cpp:
568         (WebCore::HTMLCanvasElement::convertLogicalToDevice): clamp to ints
569         * html/canvas/CanvasRenderingContext2D.cpp:
570         (WebCore::CanvasRenderingContext2D::createImageData):
571         (WebCore::CanvasRenderingContext2D::getImageData):
572         * platform/graphics/cg/ImageBufferDataCG.cpp:
573         (WebCore::ImageBufferData::getData):
574
575 2011-05-24  Robin Dunn  <robin@alldunn.com>
576
577         Reviewed by Kevin Ollivier.
578
579         [wx] Make sure x and y adjustments are applied to all operations, and fix the calculations
580         for the height and width checks to take into account x and y offsets.
581         
582         https://bugs.webkit.org/show_bug.cgi?id=61367
583
584         * platform/graphics/wx/ImageWx.cpp:
585         (WebCore::Image::drawPattern):
586
587 2011-05-24  Tony Chang  <tony@chromium.org>
588
589         Reviewed by James Robinson.
590
591         fix render overflow computation for input type=range
592         https://bugs.webkit.org/show_bug.cgi?id=61132
593
594         Test: fast/forms/slider-hit-testing.html
595
596         We need to clear m_overflow otherwise we use the first
597         size of the slider for hit testing (i.e., changes to the size
598         cause problems).  This only shows up if the thumb isn't contained
599         in the bounds of the slider.  Making the range have a smaller height
600         than the thumb shows the bug.
601
602         * rendering/RenderSlider.cpp:
603         (WebCore::RenderSlider::layout): Clear the overflow during layout
604             so we re-compute the overflow based on the current size of the
605             slider.
606
607 2011-05-24  Alok Priyadarshi  <alokp@chromium.org>
608
609         Reviewed by James Robinson.
610
611         Enable skia gpu rendering for content layers
612         https://bugs.webkit.org/show_bug.cgi?id=56749
613
614         This patch adds gpu accelerated rendering for content and root layers.
615         Layer textures are updated in two stages:
616         1. Paint: The non-accelerated path paints the layer contents into a bitmap.
617                   The accelerated path paints into an SkPicture, which is essentially a display list.
618         2. Upload: The non-accelerated path uploads the pixels obtained in the first stage to a texture.
619                    The accelerated path renders the picture directly into the texture.
620
621         The accelerated path can be enabled by --enable-accelerated-drawing command-line flag in chromium.
622         Note that this patch does not accelerate the CG path on mac. We have two options here - use skia or accelrate CG path.
623         Any bugs should be caught by layout tests.
624
625         * platform/graphics/chromium/ContentLayerChromium.cpp:
626         (WebCore::ContentLayerChromium::createTextureUpdater):
627         * platform/graphics/chromium/LayerRendererChromium.cpp:
628         (WebCore::LayerRendererChromium::create):
629         (WebCore::LayerRendererChromium::LayerRendererChromium):
630         (WebCore::LayerRendererChromium::skiaContext):
631         (WebCore::LayerRendererChromium::updateAndDrawLayers):
632         (WebCore::LayerRendererChromium::createRootLayerTextureUpdater):
633         * platform/graphics/chromium/LayerRendererChromium.h:
634         (WebCore::LayerRendererChromium::acceleratedDrawing):
635         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
636         (WebCore::LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture):
637         (WebCore::LayerTextureUpdaterSkPicture::~LayerTextureUpdaterSkPicture):
638         (WebCore::LayerTextureUpdaterSkPicture::prepareToUpdate):
639         (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
640         (WebCore::LayerTextureUpdaterSkPicture::deleteFrameBuffer):
641         (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer):
642         (WebCore::LayerTextureUpdaterSkPicture::clearFrameBuffer):
643         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
644         (WebCore::LayerTextureUpdaterSkPicture::orientation):
645         * platform/graphics/chromium/LayerTilerChromium.cpp:
646         (WebCore::LayerTilerChromium::updateRect):
647         (WebCore::LayerTilerChromium::draw):
648
649 2011-05-24  Pavel Podivilov  <podivilov@chromium.org>
650
651         Reviewed by Yury Semikhatsky.
652
653         Web Inspector: display keyboard shortcuts in scripts panel sidebar buttons tooltip text.
654         https://bugs.webkit.org/show_bug.cgi?id=61358
655
656         * English.lproj/localizedStrings.js:
657         * inspector/front-end/CallStackSidebarPane.js:
658         (WebInspector.CallStackSidebarPane.prototype._selectedPlacardByIndex):
659         (WebInspector.CallStackSidebarPane.prototype.registerShortcuts):
660         * inspector/front-end/Panel.js:
661         (WebInspector.Panel.prototype.registerShortcut):
662         * inspector/front-end/ScriptsPanel.js:
663         (WebInspector.ScriptsPanel):
664         (WebInspector.ScriptsPanel.prototype._createSidebarButtons):
665         (WebInspector.ScriptsPanel.prototype._createSidebarButtonAndRegisterShortcuts):
666
667 2011-05-24  Philippe Normand  <pnormand@igalia.com>
668
669         Reviewed by Andres Kling.
670
671         JSAudioContextCustom doesn't encode errors
672         https://bugs.webkit.org/show_bug.cgi?id=61357
673
674         Fix AudioContext return values
675
676         * bindings/js/JSAudioContextCustom.cpp:
677         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
678
679 2011-05-24  Rob Buis  <rbuis@rim.com>
680
681         Rubber-stamped by Dirk Schulze.
682
683         Remove requiresLayer inlines, already provided by RenderSVGModelObject.
684
685         * rendering/svg/RenderSVGHiddenContainer.h:
686         (WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
687         * rendering/svg/RenderSVGImage.h:
688
689 2011-05-24  Nikolas Zimmermann  <nzimmermann@rim.com>
690
691         Not reviewed, build fix.
692
693         Remove platform layering violation: TextRun stores RenderObjects for SVG Fonts support
694         https://bugs.webkit.org/show_bug.cgi?id=60254
695
696         Forgot to rename the destructor.
697
698         * platform/graphics/SimpleFontData.h:
699         (WebCore::SimpleFontData::AdditionalFontData::~AdditionalFontData):
700
701 2011-05-24  Nikolas Zimmermann  <nzimmermann@rim.com>
702
703         Not reviewed, build fix.
704
705         Remove platform layering violation: TextRun stores RenderObjects for SVG Fonts support
706         https://bugs.webkit.org/show_bug.cgi?id=60254
707
708         Rename SimpleFontData::FontData subclass to AdditionalFontData, to avoid clashes with the WebCore::FontData class, which breaks the win build.
709
710         * platform/graphics/SimpleFontData.cpp:
711         (WebCore::SimpleFontData::SimpleFontData):
712         * platform/graphics/SimpleFontData.h:
713         (WebCore::SimpleFontData::fontData):
714         * svg/SVGFontData.h:
715
716 2011-05-24  Nikolas Zimmermann  <nzimmermann@rim.com>
717
718         Reviewed by Antti Koivisto.
719
720         Remove platform layering violation: TextRun stores RenderObjects for SVG Fonts support
721         https://bugs.webkit.org/show_bug.cgi?id=60254
722
723         First part:
724         Remove a long-standing layering violation in TextRun: it stores RenderObject/RenderSVGResource pointers for SVG Fonts support.
725         Replace the two Render* pointers with a single RefPtr<AbstractRenderingContext>. AbstractRenderingContext is a helper class,
726         that can be derived from in order to associate additional data with a TextRun. This effectively reduces the memory consumption of TextRun.
727
728         Introduce rendering/TextRunRenderingContext.h, which inherits from TextRun::AbstractRenderingContext and holds additional data.
729         If the primary font in use is a SVG Font then allocate a TextRunRenderingContext object and store it in the RefPtr<AbstractRenderingContext>
730         in TextRun. If the primary font is not a SVG Font, don't even allocate the TextRunRenderingContext structure, as we won't need the context data.
731         SVG Fonts glyph matching only works within a context, so we need access to the RenderObject that's drawing the text.
732
733         This is the main preparation patch for the SVG Fonts rewrite, that will allow us to share the simple text code path for SVG Fonts as well,
734         making all CSS text properties work for HTML text using SVG Fonts, and allows proper integration within the GlyphPage concept. Soon
735         we can intermix WOFF/SVG & native fonts, within segment font declarations.
736
737         Second part:
738         Remove a long-standing layering violation in SimpleFontData: it stores SVGFontData objects, that are living in svg/.
739         Use the same concept as above, introduce SimpleFontData::AbstractFontData, and let SVGFontData inherit from AbstractFontData and extent it.
740         If SVG Fonts are used, CSSFontFaceSource will create a SVGFontData object and pass it as PassOwnPtr<AbstractFontData> to SimpleFontData.
741
742         All layering violations are gone now, SVG Fonts are cleanly integrated now.
743         Doesn't affect any tests yet, refactoring only.
744
745         * CMakeLists.txt:
746         * GNUmakefile.list.am:
747         * WebCore.gypi:
748         * WebCore.pro:
749         * WebCore.vcproj/WebCore.vcproj:
750         * WebCore.xcodeproj/project.pbxproj:
751         * css/CSSFontFaceSource.cpp:
752         (WebCore::CSSFontFaceSource::getFontData):
753         * platform/graphics/Font.cpp:
754         (WebCore::Font::drawText):
755         (WebCore::Font::width):
756         (WebCore::Font::selectionRectForText):
757         (WebCore::Font::offsetForPosition):
758         * platform/graphics/Font.h:
759         * platform/graphics/SimpleFontData.cpp:
760         (WebCore::SimpleFontData::SimpleFontData):
761         (WebCore::SimpleFontData::~SimpleFontData):
762         * platform/graphics/SimpleFontData.h:
763         (WebCore::SimpleFontData::FontData::~FontData):
764         (WebCore::SimpleFontData::fontMetrics):
765         (WebCore::SimpleFontData::setMaxCharWidth):
766         (WebCore::SimpleFontData::setAvgCharWidth):
767         (WebCore::SimpleFontData::setSpaceWidth):
768         (WebCore::SimpleFontData::setSpaceGlyph):
769         (WebCore::SimpleFontData::setZeroWidthSpaceGlyph):
770         (WebCore::SimpleFontData::fontData):
771         (WebCore::SimpleFontData::isSVGFont):
772         (WebCore::SimpleFontData::setMissingGlyphData):
773         * platform/graphics/TextRun.h:
774         (WebCore::TextRun::TextRun):
775         (WebCore::TextRun::setAllowTabs):
776         (WebCore::TextRun::setXPos):
777         (WebCore::TextRun::RenderingContext::~RenderingContext):
778         (WebCore::TextRun::renderingContext):
779         (WebCore::TextRun::setRenderingContext):
780         * rendering/EllipsisBox.cpp:
781         (WebCore::EllipsisBox::paint):
782         (WebCore::EllipsisBox::selectionRect):
783         (WebCore::EllipsisBox::paintSelection):
784         * rendering/InlineTextBox.cpp:
785         (WebCore::InlineTextBox::selectionRect):
786         (WebCore::InlineTextBox::paint):
787         (WebCore::InlineTextBox::paintSelection):
788         (WebCore::InlineTextBox::paintCompositionBackground):
789         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
790         (WebCore::InlineTextBox::paintTextMatchMarker):
791         (WebCore::InlineTextBox::computeRectForReplacementMarker):
792         (WebCore::InlineTextBox::offsetForPosition):
793         (WebCore::InlineTextBox::positionForOffset):
794         (WebCore::InlineTextBox::constructTextRun):
795         * rendering/InlineTextBox.h:
796         * rendering/RenderBlock.cpp:
797         (WebCore::stripTrailingSpace):
798         (WebCore::RenderBlock::constructTextRun):
799         * rendering/RenderBlock.h:
800         * rendering/RenderBlockLineLayout.cpp:
801         (WebCore::setLogicalWidthForTextRun):
802         (WebCore::textWidth):
803         (WebCore::tryHyphenating):
804         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
805         (WebCore::RenderBlock::checkLinesForTextOverflow):
806         * rendering/RenderCombineText.cpp:
807         (WebCore::RenderCombineText::combineText):
808         * rendering/RenderFileUploadControl.cpp:
809         (WebCore::RenderFileUploadControl::paintObject):
810         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
811         * rendering/RenderFlexibleBox.cpp:
812         (WebCore::RenderFlexibleBox::applyLineClamp):
813         * rendering/RenderImage.cpp:
814         (WebCore::RenderImage::setImageSizeForAltText):
815         (WebCore::RenderImage::paintReplaced):
816         * rendering/RenderListBox.cpp:
817         (WebCore::RenderListBox::updateFromElement):
818         * rendering/RenderListMarker.cpp:
819         (WebCore::RenderListMarker::paint):
820         (WebCore::RenderListMarker::computePreferredLogicalWidths):
821         (WebCore::RenderListMarker::getRelativeMarkerRect):
822         * rendering/RenderText.cpp:
823         (WebCore::RenderText::widthFromCache):
824         (WebCore::RenderText::trimmedPrefWidths):
825         (WebCore::RenderText::computePreferredLogicalWidths):
826         (WebCore::RenderText::width):
827         * rendering/RenderTextControl.cpp:
828         (WebCore::RenderTextControl::getAvgCharWidth):
829         * rendering/svg/RenderSVGAllInOne.cpp:
830         * rendering/svg/SVGInlineTextBox.cpp:
831         (WebCore::SVGInlineTextBox::offsetForPositionInFragment):
832         (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
833         (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
834         (WebCore::SVGInlineTextBox::constructTextRun):
835         (WebCore::SVGInlineTextBox::paintText):
836         * rendering/svg/SVGTextLayoutEngineSpacing.cpp:
837         (WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning):
838         * rendering/svg/SVGTextMetrics.cpp:
839         (WebCore::constructTextRun):
840         (WebCore::SVGTextMetrics::measureCharacterRange):
841         * rendering/svg/SVGTextRunRenderingContext.cpp: Copied from svg/SVGFont.cpp.
842         (WebCore::svgFontAndFontFaceElementForFontData):
843         (WebCore::firstParentRendererForNonTextNode):
844         (WebCore::referencingRenderObjectFromRun):
845         (WebCore::activePaintingResourceFromRun):
846         (WebCore::SVGTextRunWalker::walk):
847         (WebCore::floatWidthMissingGlyphCallback):
848         (WebCore::floatWidthOfSubStringUsingSVGFont):
849         (WebCore::SVGTextRunRenderingContext::floatWidthUsingSVGFont):
850         (WebCore::SVGTextRunRenderingContext::drawTextUsingSVGFont):
851         (WebCore::SVGTextRunRenderingContext::selectionRectForTextUsingSVGFont):
852         (WebCore::SVGTextRunRenderingContext::offsetForPositionForTextUsingSVGFont):
853         * rendering/svg/SVGTextRunRenderingContext.h: Added.
854         (WebCore::SVGTextRunRenderingContext::create):
855         (WebCore::SVGTextRunRenderingContext::context):
856         (WebCore::SVGTextRunRenderingContext::activePaintingResource):
857         (WebCore::SVGTextRunRenderingContext::setActivePaintingResource):
858         (WebCore::SVGTextRunRenderingContext::SVGTextRunRenderingContext):
859         (WebCore::textRunNeedsRenderingContext):
860         * svg/SVGAllInOne.cpp:
861         * svg/SVGFont.cpp: Removed.
862         * svg/SVGFontData.cpp:
863         (WebCore::SVGFontData::initializeFontData):
864         * svg/SVGFontData.h:
865         (WebCore::SVGFontData::create):
866         (WebCore::SVGFontData::isSVGFontData):
867         * svg/SVGGlyphElement.cpp:
868         (WebCore::SVGGlyphElement::SVGGlyphElement):
869         (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
870         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
871         * svg/SVGHKernElement.cpp:
872         (WebCore::SVGHKernElement::SVGHKernElement):
873         (WebCore::SVGHKernElement::buildHorizontalKerningPair):
874         * svg/SVGVKernElement.cpp:
875         (WebCore::SVGVKernElement::SVGVKernElement):
876         (WebCore::SVGVKernElement::buildVerticalKerningPair):
877         * svg/SVGVKernElement.h:
878
879 2011-05-24  Ryuan Choi  <ryuan.choi@samsung.com>
880
881         Reviewed by Andreas Kling.
882
883         [GTK] Implement GraphicsContextCairo::imageInterpolationQuality().
884         https://bugs.webkit.org/show_bug.cgi?id=60827
885
886         Implement getter/setter of imageInterpolationQuality and logic to change
887         interpolation algorithm when drawing image.
888         Mac and Qt already implemented it.
889
890         * platform/graphics/cairo/GraphicsContextCairo.cpp:
891         (WebCore::GraphicsContext::setImageInterpolationQuality):
892         (WebCore::GraphicsContext::imageInterpolationQuality):
893         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
894         * platform/graphics/cairo/PlatformContextCairo.cpp:
895         (WebCore::PlatformContextCairo::drawSurfaceToContext):
896         * platform/graphics/cairo/PlatformContextCairo.h:
897         (WebCore::PlatformContextCairo::setImageInterpolationQuality): Added.
898         (WebCore::PlatformContextCairo::imageInterpolationQuality): Added.
899
900 2011-05-24  Leandro Gracia Gil  <leandrogracia@chromium.org>
901
902         Reviewed by Tony Gentilcore.
903
904         Media Stream API: adding Stream and GeneratedStream classes.
905         https://bugs.webkit.org/show_bug.cgi?id=56666
906
907         Add the code for the Stream and GeneratedStream classes and integrate it
908         with the existing stream generation requests.
909
910         Tests for the Media Stream API will be provided by the bug 56587.
911
912         * CMakeLists.txt:
913         * CodeGenerators.pri:
914         * DerivedSources.cpp:
915         * DerivedSources.make:
916         * GNUmakefile.list.am:
917         * WebCore.gypi:
918         * WebCore.pro:
919         * WebCore.vcproj/WebCore.vcproj:
920         * WebCore.xcodeproj/project.pbxproj:
921         * bindings/js/JSEventTarget.cpp:
922         (WebCore::toJS):
923         * bindings/v8/V8DOMWrapper.cpp:
924         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
925         * dom/DOMAllInOne.cpp:
926         * dom/EventTarget.cpp:
927         (WebCore::EventTarget::toStream):
928         (WebCore::EventTarget::toGeneratedStream):
929         * dom/EventTarget.h:
930         * dom/GeneratedStream.cpp: Added.
931         (WebCore::GeneratedStream::DispatchUpdateTask::create):
932         (WebCore::GeneratedStream::DispatchUpdateTask::performTask):
933         (WebCore::GeneratedStream::DispatchUpdateTask::DispatchUpdateTask):
934         (WebCore::GeneratedStream::create):
935         (WebCore::GeneratedStream::GeneratedStream):
936         (WebCore::GeneratedStream::~GeneratedStream):
937         (WebCore::GeneratedStream::toGeneratedStream):
938         (WebCore::GeneratedStream::detachEmbedder):
939         (WebCore::GeneratedStream::stop):
940         (WebCore::GeneratedStream::onStop):
941         * dom/GeneratedStream.h: Added.
942         * dom/GeneratedStream.idl: Added.
943         * dom/Stream.cpp: Added.
944         (WebCore::Stream::create):
945         (WebCore::Stream::Stream):
946         (WebCore::Stream::~Stream):
947         (WebCore::Stream::toStream):
948         (WebCore::Stream::streamEnded):
949         (WebCore::Stream::scriptExecutionContext):
950         (WebCore::Stream::eventTargetData):
951         (WebCore::Stream::ensureEventTargetData):
952         * dom/Stream.h: Added.
953         (WebCore::Stream::readyState):
954         (WebCore::Stream::label):
955         (WebCore::Stream::refEventTarget):
956         (WebCore::Stream::derefEventTarget):
957         * dom/Stream.idl: Added.
958         * page/CallbackTask.h:
959         (WebCore::CallbackTask1::Scheduler::~Scheduler):
960         * page/MediaStreamClient.h:
961         * page/MediaStreamController.cpp:
962         (WebCore::MediaStreamController::stopGeneratedStream):
963         (WebCore::MediaStreamController::streamFailed):
964         * page/MediaStreamController.h:
965         * page/MediaStreamFrameController.cpp:
966         (WebCore::MediaStreamFrameController::Request::Request):
967         (WebCore::MediaStreamFrameController::GenerateStreamRequest::create):
968         (WebCore::MediaStreamFrameController::GenerateStreamRequest::abort):
969         (WebCore::MediaStreamFrameController::GenerateStreamRequest::GenerateStreamRequest):
970         (WebCore::MediaStreamFrameController::unregister):
971         (WebCore::MediaStreamFrameController::getStreamFromLabel):
972         (WebCore::MediaStreamFrameController::generateStream):
973         (WebCore::MediaStreamFrameController::stopGeneratedStream):
974         (WebCore::MediaStreamFrameController::streamGenerated):
975         (WebCore::MediaStreamFrameController::streamGenerationFailed):
976         (WebCore::MediaStreamFrameController::streamFailed):
977         * page/MediaStreamFrameController.h:
978         (WebCore::MediaStreamFrameController::StreamClient::StreamClient):
979         (WebCore::MediaStreamFrameController::StreamClient::isGeneratedStream):
980         * page/NavigatorUserMediaError.h:
981         (WebCore::NavigatorUserMediaError::create):
982         (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
983         * page/NavigatorUserMediaSuccessCallback.h:
984         * page/NavigatorUserMediaSuccessCallback.idl:
985
986 2011-05-23  Antti Koivisto  <antti@apple.com>
987
988         Reviewed by Oliver Hunt.
989     
990         REGRESSION (r45620): Node list caches never deleted
991         https://bugs.webkit.org/show_bug.cgi?id=61268
992         <rdar://problem/9467379>
993         
994         NodeListsNodeData::isEmpty() tests if RefCounted objects have refcount of zero which is impossible.
995         As a results NodeList caches are never deleted, causing bad performance in DOM mutating operations as
996         they repeatedly invalidate caches.
997
998         * dom/Node.cpp:
999         (WebCore::Node::childNodes):
1000             Construct m_childNodeListCaches lazily.
1001
1002         (WebCore::Node::unregisterDynamicNodeList):
1003         (WebCore::Node::notifyLocalNodeListsAttributeChanged):
1004         (WebCore::Node::notifyLocalNodeListsChildrenChanged):
1005         (WebCore::Node::removeNodeListCacheIfPossible): 
1006             Add a helper.
1007
1008         (WebCore::NodeListsNodeData::invalidateCaches):
1009             Invalidate m_childNodeListCaches by clearing it if there are no additional clients
1010
1011         (WebCore::NodeListsNodeData::isEmpty):
1012             Test emptiness of various NodeListCaches simply by testing hash emptiness instead of testing for non-zero ref count of items.
1013             m_childNodeListCaches is empty if it is null.
1014
1015         * dom/Node.h: 
1016         * dom/NodeRareData.h:
1017         (WebCore::NodeListsNodeData::NodeListsNodeData):
1018             Construct m_childNodeListCaches lazily.
1019
1020 2011-05-24  Mikhail Naganov  <mnaganov@chromium.org>
1021
1022         Reviewed by Yury Semikhatsky.
1023
1024         Web Inspector: Reorganize InspectorBackendDispatch code to eliminate duplication
1025         https://bugs.webkit.org/show_bug.cgi?id=61300
1026
1027         * inspector/CodeGeneratorInspector.pm:
1028
1029 2011-05-23  Yury Semikhatsky  <yurys@chromium.org>
1030
1031         Reviewed by Adam Barth.
1032
1033         Chromium DevTools: Tab crashes with "Aw, snap!" on entering "(new Image())." in console
1034         https://bugs.webkit.org/show_bug.cgi?id=61194
1035
1036         Test: inspector/console/console-eval-syntax-error.html
1037
1038         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1039         (WebCore::V8InjectedScriptHost::evaluateCallback): return immediately in case of syntax error
1040
1041 2011-04-13  Steve Block  <steveblock@google.com>
1042
1043         Reviewed by Eric Seidel.
1044
1045         Geolocation callbacks should make use of new callback generation mechanism
1046         https://bugs.webkit.org/show_bug.cgi?id=40065
1047
1048         No new tests, refactoring only.
1049
1050         * Android.derived.jscbindings.mk:
1051         * Android.derived.v8bindings.mk:
1052         * Android.jscbindings.mk:
1053         * Android.v8bindings.mk:
1054         * CMakeLists.txt:
1055         * CodeGenerators.pri:
1056         * DerivedSources.cpp:
1057         * DerivedSources.make:
1058         * GNUmakefile.list.am:
1059         * UseJSC.cmake:
1060         * WebCore.gypi:
1061         * WebCore.order:
1062         * WebCore.pro:
1063         * WebCore.vcproj/WebCore.vcproj:
1064         * WebCore.xcodeproj/project.pbxproj:
1065         * bindings/js/JSBindingsAllInOne.cpp:
1066         * bindings/js/JSCustomPositionCallback.cpp: Removed.
1067         * bindings/js/JSCustomPositionCallback.h: Removed.
1068         * bindings/js/JSCustomPositionErrorCallback.cpp: Removed.
1069         * bindings/js/JSCustomPositionErrorCallback.h: Removed.
1070         * bindings/js/JSGeolocationCustom.cpp:
1071         (WebCore::JSGeolocation::getCurrentPosition):
1072         (WebCore::JSGeolocation::watchPosition):
1073         * bindings/v8/custom/V8CustomPositionCallback.cpp: Removed.
1074         * bindings/v8/custom/V8CustomPositionCallback.h: Removed.
1075         * bindings/v8/custom/V8CustomPositionErrorCallback.cpp: Removed.
1076         * bindings/v8/custom/V8CustomPositionErrorCallback.h: Removed.
1077         * bindings/v8/custom/V8GeolocationCustom.cpp:
1078         (WebCore::V8Geolocation::getCurrentPositionCallback):
1079         (WebCore::V8Geolocation::watchPositionCallback):
1080         * page/PositionCallback.h:
1081         * page/PositionCallback.idl: Added.
1082         * page/PositionErrorCallback.h:
1083         * page/PositionErrorCallback.idl: Added.
1084
1085 2011-05-23  Pavel Podivilov  <podivilov@chromium.org>
1086
1087         Reviewed by Yury Semikhatsky.
1088
1089         Web Inspector: watched expressions buttons do not match inspector styles.
1090         https://bugs.webkit.org/show_bug.cgi?id=30554
1091
1092         * WebCore.gypi:
1093         * inspector/front-end/BreakpointsSidebarPane.js:
1094         (WebInspector.XHRBreakpointsSidebarPane):
1095         * inspector/front-end/Images/deleteIcon.png: Added.
1096         * inspector/front-end/Images/paneRefreshButtons.png: Added.
1097         * inspector/front-end/WatchExpressionsSidebarPane.js:
1098         (WebInspector.WatchExpressionsSidebarPane.prototype.reset):
1099         (WebInspector.WatchExpressionsSidebarPane.prototype._addButtonClicked):
1100         (WebInspector.WatchExpressionsSidebarPane.prototype._refreshButtonClicked):
1101         (WebInspector.WatchExpressionsSidebarPane.prototype.refreshExpressions):
1102         (WebInspector.WatchExpressionsSection):
1103         (WebInspector.WatchExpressionsSection.prototype.update.appendResult):
1104         (WebInspector.WatchExpressionsSection.prototype.update):
1105         (WebInspector.WatchExpressionsSection.prototype.saveExpressions):
1106         (WebInspector.WatchExpressionsSection.prototype._mouseMove):
1107         (WebInspector.WatchExpressionsSection.prototype._mouseOut):
1108         (WebInspector.WatchExpressionsSection.prototype._updateHoveredElement):
1109         (WebInspector.WatchExpressionsSection.CompareProperties):
1110         (WebInspector.WatchExpressionTreeElement.prototype.update):
1111         (WebInspector.WatchExpressionTreeElement.prototype.editingCancelled):
1112         * inspector/front-end/WebKit.qrc:
1113         * inspector/front-end/inspector.css:
1114         (.properties-tree.watch-expressions):
1115         (.properties-tree.watch-expressions li):
1116         (.section .properties .delete-button):
1117         (.section .properties li.hovered .delete-button):
1118         (.pane > .title > .pane-title-button):
1119         (.pane > .title > .pane-title-button:hover):
1120         (.pane > .title > .pane-title-button:active):
1121         (.pane > .title > .pane-title-button.add):
1122         (.pane > .title > .pane-title-button.refresh):
1123
1124 2011-05-24  Yuta Kitamura  <yutak@chromium.org>
1125
1126         Reviewed by Kent Tamura.
1127
1128         WebSocket: Add fail() to WebSocketChannel and its family
1129         https://bugs.webkit.org/show_bug.cgi?id=61277
1130
1131         This is the first part of refactoring effort described in bug 61115.
1132         Existing error reports will be modified to use fail() in a later patch.
1133
1134         No change in behavior, thus no new tests.
1135
1136         * websockets/ThreadableWebSocketChannel.h:
1137         * websockets/WebSocketChannel.cpp:
1138         (WebCore::WebSocketChannel::fail):
1139         * websockets/WebSocketChannel.h:
1140         * websockets/WorkerThreadableWebSocketChannel.cpp:
1141         (WebCore::WorkerThreadableWebSocketChannel::fail):
1142         (WebCore::WorkerThreadableWebSocketChannel::Peer::fail):
1143         (WebCore::WorkerThreadableWebSocketChannel::mainThreadFail):
1144         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
1145         * websockets/WorkerThreadableWebSocketChannel.h:
1146
1147 2011-05-24  Andras Becsi  <abecsi@webkit.org>
1148
1149         Reviewed by Csaba Osztrogon√°c.
1150
1151         [Qt][V8] REGRESSION (r87063): Fix the build.
1152         https://bugs.webkit.org/show_bug.cgi?id=61290
1153
1154         No new tests needed.
1155
1156         * bindings/scripts/CodeGeneratorV8.pm: disable the unsupported call
1157         tracked in: https://bugs.webkit.org/show_bug.cgi?id=61291
1158
1159 2011-05-24  Naoki Takano  <takano.naoki@gmail.com>
1160
1161         Reviewed by Kent Tamura.
1162
1163         [Chromium]Add clipping for listBox in popup window to fix wrong location display when the autofill item is really long.
1164         https://bugs.webkit.org/show_bug.cgi?id=61252
1165         http://code.google.com/p/chromium/issues/detail?id=83539
1166
1167         Manual test: manual-tests/autofill-popup-location.html.
1168
1169         * manual-tests/autofill-popup-location.html: With long long text, test the shown location is correct.
1170         * platform/chromium/PopupMenuChromium.cpp:
1171         (WebCore::PopupListBox::setBaseWidth): Clip width with m_maxWindowWidth.
1172         (WebCore::PopupListBox::PopupListBox): Add m_maxWindowWidth initialization.
1173         (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Call setMaxWidthAndLayout() when the width is clipped with screen size.
1174         (WebCore::PopupListBox::setMaxWidthAndLayout): Set m_maxWindowWidth and call layout().
1175         (WebCore::PopupListBox::layout): Compare renewed windowWidth and m_maxWindowWidth, and clip the it.
1176
1177 2011-05-24  James Robinson  <jamesr@chromium.org>
1178
1179         Reviewed by Kenneth Russell.
1180
1181         [chromium] Properly handle huge initial dimensions for 2d canvas when accelerated 2d canvas is enabled
1182         https://bugs.webkit.org/show_bug.cgi?id=60077
1183
1184         Return NULL from DrawingBuffer::create() if the initial dimensions are larger than we can support in hardware so
1185         that we properly use the software canvas path and not enable the compositor for the canvas.
1186
1187         compositing/tiling/huge-layer-img.html triggers this case by trying to create a 20000 pixel high canvas.  The
1188         failure was previously masked by other bugs fixed by r85661.
1189
1190         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1191         (WebCore::DrawingBuffer::DrawingBuffer):
1192             Return NULL from DrawingBuffer::create() if resize() fails.
1193
1194 2011-05-24  Fumitoshi Ukai  <ukai@chromium.org>
1195
1196         Reviewed by Adam Barth.
1197
1198         close before open WebSocket doesn't fire close event.
1199         https://bugs.webkit.org/show_bug.cgi?id=57301
1200
1201         In platformClose(), m_readStream may be 0 until proxy is resolved.
1202         It should callback didClose() in such case.
1203         
1204         Test: http/tests/websocket/tests/close-before-open.html
1205
1206         * platform/network/cf/SocketStreamHandleCFNet.cpp:
1207         (WebCore::SocketStreamHandle::platformClose):
1208
1209 2011-05-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1210
1211         Unreviewed, rolling out r87118.
1212         http://trac.webkit.org/changeset/87118
1213         https://bugs.webkit.org/show_bug.cgi?id=61347
1214
1215         patch breaks layout tests
1216         (https://bugs.webkit.org/show_bug.cgi?id=61342), and chromium
1217         tests (browser_test MacTestCmdUp and ui_test Scrollbar)
1218         (Requested by ukai_ on #webkit).
1219
1220         * WebCore.gyp/WebCore.gyp:
1221         * WebCore.gypi:
1222         * platform/ScrollAnimator.cpp:
1223         * platform/chromium/ScrollAnimatorChromiumMac.h: Removed.
1224         * platform/chromium/ScrollAnimatorChromiumMac.mm: Removed.
1225         * platform/graphics/IntPoint.h:
1226
1227 2011-05-23  Julien Chaffraix  <jchaffraix@codeaurora.org>
1228
1229         Reviewed by Adam Barth.
1230
1231         Remove Node::deprecatedParserAddChild
1232         https://bugs.webkit.org/show_bug.cgi?id=60818
1233
1234         No new tests as this is just a removal.
1235
1236         * dom/ContainerNode.cpp:
1237         * dom/ContainerNode.h:
1238         * dom/Node.cpp:
1239         * dom/Node.h:
1240         Removed the method now that the last instance got removed as part of the <input>
1241         shadow DOM refactoring.
1242
1243 2011-05-23  Dirk Schulze  <krit@webkit.org>
1244
1245         Reviewed by Darin Adler.
1246
1247         SVGTextPositioning attributes are marked as NumberList instead of LengthList
1248         https://bugs.webkit.org/show_bug.cgi?id=61301
1249
1250         SVGTextPositioningElement attributes x, y, dx and dy were marked as AnimatedNumberList
1251         instead of AnimatedLengthList.
1252         See specification http://www.w3.org/TR/SVG/text.html#InterfaceSVGTextPositioningElement
1253
1254         This does not affect the behavior, since we do not respect SVG units in SMIL animation yet.
1255         No new tests added.
1256
1257         * svg/SVGTextPositioningElement.cpp:
1258         (WebCore::SVGTextPositioningElement::fillPassedAttributeToPropertyTypeMap):
1259
1260 2011-05-19  MORITA Hajime  <morrita@google.com>
1261
1262         Reviewed by Dimitri Glazkov.
1263
1264         [Refactoring] Pass NodeRenderingContext to Node::rendererIsNeeded()
1265         https://bugs.webkit.org/show_bug.cgi?id=61114
1266
1267         - Extracted NodeRenderingContext from NodeRendererFactory, giving separate files to it.
1268         - Changed signature rendererIsNeeded(RenderStyle*) 
1269           to rendererIsNeeded(const NodeRenderingContext&).
1270           The style object is retrieved from NodeRendererFactory::style()
1271           This will allow rendererIsNeeded() to access contextual
1272           information like attaching phase and rendering-parent.
1273         
1274         No new tests. No behaviour change.
1275         
1276         * CMakeLists.txt:
1277         * GNUmakefile.list.am:
1278         * WebCore.gypi:
1279         * WebCore.pro:
1280         * WebCore.vcproj/WebCore.vcproj:
1281         * WebCore.xcodeproj/project.pbxproj:
1282         * dom/CharacterData.cpp:
1283         (WebCore::CharacterData::updateRenderer): Pass unresolved NodeRenderingContext& to rendererIsNeeded()
1284         (WebCore::CharacterData::rendererIsNeeded):
1285         * dom/CharacterData.h:
1286         * dom/DOMAllInOne.cpp:
1287         * dom/EditingText.cpp:
1288         (WebCore::EditingText::rendererIsNeeded):
1289         * dom/EditingText.h:
1290         * dom/Node.cpp:
1291         (WebCore::Node::parentNodeForRenderingAndStyle):
1292         (WebCore::Node::rendererIsNeeded):
1293         * dom/Node.h:
1294         * dom/NodeRenderingContext.cpp: Added.
1295         (WebCore::NodeRenderingContext::NodeRenderingContext):
1296         (WebCore::NodeRenderingContext::~NodeRenderingContext):
1297         (WebCore::NodeRenderingContext::setStyle):
1298         (WebCore::NodeRenderingContext::releaseStyle):
1299         (WebCore::NodeRenderingContext::nextRenderer):
1300         (WebCore::NodeRenderingContext::parentRenderer):
1301         (WebCore::NodeRenderingContext::hostChildrenChanged):
1302         (WebCore::NodeRenderingContext::shouldCreateRenderer):
1303         (WebCore::NodeRendererFactory::NodeRendererFactory):
1304         (WebCore::NodeRendererFactory::createRendererAndStyle):
1305         (WebCore::wrapWithRenderFullScreen):
1306         (WebCore::NodeRendererFactory::createRendererIfNeeded):
1307         * dom/NodeRenderingContext.h: Added.
1308         (WebCore::NodeRenderingContext::node):
1309         (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle):
1310         (WebCore::NodeRenderingContext::style):
1311         (WebCore::NodeRendererFactory::context):
1312         * dom/ShadowContentElement.h:
1313         * dom/Text.cpp:
1314         * dom/Text.h:
1315         * html/HTMLAppletElement.cpp:
1316         * html/HTMLAppletElement.h:
1317         * html/HTMLElement.cpp:
1318         * html/HTMLElement.h:
1319         * html/HTMLEmbedElement.cpp:
1320         * html/HTMLEmbedElement.h:
1321         * html/HTMLFormElement.cpp:
1322         * html/HTMLFormElement.h:
1323         * html/HTMLFrameElement.cpp:
1324         * html/HTMLFrameElement.h:
1325         * html/HTMLFrameSetElement.cpp:
1326         * html/HTMLFrameSetElement.h:
1327         * html/HTMLIFrameElement.cpp:
1328         * html/HTMLIFrameElement.h:
1329         * html/HTMLInputElement.cpp:
1330         * html/HTMLInputElement.h:
1331         * html/HTMLMediaElement.cpp:
1332         * html/HTMLMediaElement.h:
1333         * html/HTMLNoScriptElement.h:
1334         * html/HTMLObjectElement.cpp:
1335         * html/HTMLObjectElement.h:
1336         * html/HTMLOptGroupElement.h:
1337         * html/HTMLOptionElement.h:
1338         * html/HTMLVideoElement.cpp:
1339         * html/HTMLVideoElement.h:
1340         * html/shadow/DetailsMarkerControl.cpp:
1341         * html/shadow/DetailsMarkerControl.h:
1342         * html/shadow/MeterShadowElement.cpp:
1343         * html/shadow/MeterShadowElement.h:
1344         * html/shadow/ProgressShadowElement.cpp:
1345         * html/shadow/ProgressShadowElement.h:
1346         * svg/SVGDescElement.h:
1347         * svg/SVGElement.h:
1348         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1349         * svg/SVGFilterPrimitiveStandardAttributes.h:
1350         * svg/SVGFontElement.h:
1351         * svg/SVGGElement.cpp:
1352         * svg/SVGGElement.h:
1353         * svg/SVGGlyphElement.h:
1354         * svg/SVGHKernElement.h:
1355         * svg/SVGMarkerElement.h:
1356         * svg/SVGMissingGlyphElement.h:
1357         * svg/SVGSVGElement.h:
1358         * svg/SVGStyledElement.cpp:
1359         * svg/SVGStyledElement.h:
1360         * svg/SVGSymbolElement.h:
1361         * svg/SVGTRefElement.cpp:
1362         * svg/SVGTRefElement.h:
1363         * svg/SVGTSpanElement.cpp:
1364         * svg/SVGTSpanElement.h:
1365         * svg/SVGTextPathElement.cpp:
1366         * svg/SVGTextPathElement.h:
1367         * svg/SVGTitleElement.h:
1368         * svg/SVGVKernElement.h:
1369         * svg/SVGViewElement.h:
1370
1371 2011-05-20  MORITA Hajime  <morrita@google.com>
1372
1373         Reviewed by Dimitri Glazkov.
1374         
1375         [Refactoring] attach() following detach() should be replaced with Node::reattach()
1376         https://bugs.webkit.org/show_bug.cgi?id=61011
1377
1378         - Renamed forceReattach() to reattach()
1379         - Introduced reattachIfAttached() as a variant.
1380         
1381         No new tests. No behavior change.
1382
1383         * dom/CharacterData.cpp:
1384         (WebCore::CharacterData::updateRenderer):
1385         * dom/Element.cpp:
1386         (WebCore::Element::recalcStyle):
1387         * dom/Node.h:
1388         (WebCore::Node::reattach):
1389         (WebCore::Node::reattachIfAttached):
1390         * dom/Text.cpp:
1391         (WebCore::Text::recalcStyle):
1392         * html/HTMLDetailsElement.cpp:
1393         (WebCore::HTMLDetailsElement::refreshMainSummary):
1394         (WebCore::HTMLDetailsElement::parseMappedAttribute):
1395         * html/HTMLInputElement.cpp:
1396         (WebCore::HTMLInputElement::parseMappedAttribute):
1397         * html/HTMLObjectElement.cpp:
1398         (WebCore::HTMLObjectElement::renderFallbackContent):
1399         * html/HTMLPlugInImageElement.cpp:
1400         (WebCore::HTMLPlugInImageElement::recalcStyle):
1401         * html/HTMLSelectElement.cpp:
1402         (WebCore::HTMLSelectElement::parseMappedAttribute):
1403
1404 2011-05-23  Mark Rowe  <mrowe@apple.com>
1405
1406         Build fix after r87117.
1407
1408         When moving #defines out in to separate files I find that code is more likely to compile
1409         when the new header file is actually #included.
1410
1411         * editing/SpellingCorrectionController.h:
1412
1413 2011-05-23  Mike Lawther  <mikelawther@chromium.org>
1414
1415         Reviewed by James Robinson.
1416
1417         implement image-rendering: optimize-contrast (with a vendor prefix) as defined in CSS3 image values
1418         https://bugs.webkit.org/show_bug.cgi?id=56627
1419
1420         Tests: css3/images/optimize-contrast-canvas.html
1421                css3/images/optimize-contrast-image.html
1422
1423         * WebCore.xcodeproj/project.pbxproj:
1424         * css/CSSComputedStyleDeclaration.cpp:
1425         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1426         * css/CSSParser.cpp:
1427         (WebCore::CSSParser::parseValue):
1428         * css/CSSPrimitiveValueMappings.h:
1429         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1430         (WebCore::CSSPrimitiveValue::operator EImageRendering):
1431         * css/CSSPropertyNames.in:
1432         * css/CSSStyleSelector.cpp:
1433         (WebCore::CSSStyleSelector::applyProperty):
1434         * css/CSSValueKeywords.in:
1435         * css/SVGCSSComputedStyleDeclaration.cpp:
1436         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
1437         * css/SVGCSSPropertyNames.in:
1438         * css/SVGCSSStyleSelector.cpp:
1439         (WebCore::CSSStyleSelector::applySVGProperty):
1440         * css/SVGCSSValueKeywords.in:
1441         * html/HTMLCanvasElement.cpp:
1442         (WebCore::HTMLCanvasElement::paint):
1443         * html/HTMLCanvasElement.h:
1444         * platform/graphics/ImageRenderingMode.h: Added.
1445         * rendering/RenderBoxModelObject.cpp:
1446         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1447         * rendering/RenderHTMLCanvas.cpp:
1448         (WebCore::RenderHTMLCanvas::paintReplaced):
1449         * rendering/style/RenderStyle.cpp:
1450         (WebCore::RenderStyle::diff):
1451         * rendering/style/RenderStyle.h:
1452         (WebCore::InheritedFlags::imageRendering):
1453         (WebCore::InheritedFlags::setImageRendering):
1454         (WebCore::InheritedFlags::initialImageRendering):
1455         * rendering/style/RenderStyleConstants.h:
1456         * rendering/style/SVGRenderStyle.cpp:
1457         (WebCore::SVGRenderStyle::diff):
1458         * rendering/style/SVGRenderStyle.h:
1459         (WebCore::SVGRenderStyle::InheritedFlags::operator==):
1460         (WebCore::SVGRenderStyle::setBitDefaults):
1461         * rendering/style/SVGRenderStyleDefs.h:
1462         * rendering/svg/SVGRenderTreeAsText.cpp:
1463         (WebCore::writeStyle):
1464
1465 2011-05-23  Sailesh Agrawal  <sail@chromium.org>
1466
1467         Reviewed by James Robinson.
1468
1469         Chromium Mac: Use ScrollAnimatorMac.mm for overlay scrollbar support
1470         https://bugs.webkit.org/show_bug.cgi?id=59753
1471
1472         No new tests. Just forking ScrollAnimatorMac to ScrollAnimatorChromiumMac.
1473
1474         * WebCore.gyp/WebCore.gyp:
1475         * WebCore.gypi:
1476         * platform/ScrollAnimator.cpp:
1477         * platform/chromium/ScrollAnimatorChromiumMac.h: Added.
1478         (WebCore::ScrollAnimatorChromiumMac::setIsDrawingIntoLayer):
1479         (WebCore::ScrollAnimatorChromiumMac::isDrawingIntoLayer):
1480         (WebCore::ScrollAnimatorChromiumMac::haveScrolledSincePageLoad):
1481         * platform/chromium/ScrollAnimatorChromiumMac.mm: Added. Forked from ScrollAnimatorMac and replaced all instances of ScrollAnimatorMac with ScrollAnimatorChromiumMac and ScrollbarThemeMac with ScrollbarThemeChromiumMac. Removed the ENABLE(SMOOTH_SCROLLING) around the file.
1482         (abs):
1483         (-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]):
1484         (-[ScrollAnimationHelperDelegate scrollAnimatorDestroyed]):
1485         (-[ScrollAnimationHelperDelegate bounds]):
1486         (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]):
1487         (-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]):
1488         (-[ScrollAnimationHelperDelegate convertSizeToBase:]):
1489         (-[ScrollAnimationHelperDelegate convertSizeFromBase:]):
1490         (-[ScrollAnimationHelperDelegate convertSizeToBacking:]):
1491         (-[ScrollAnimationHelperDelegate convertSizeFromBacking:]):
1492         (-[ScrollAnimationHelperDelegate superview]):
1493         (-[ScrollAnimationHelperDelegate documentView]):
1494         (-[ScrollAnimationHelperDelegate window]):
1495         (-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]):
1496         (-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]):
1497         (-[ScrollbarPainterControllerDelegate scrollAnimatorDestroyed]):
1498         (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
1499         (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
1500         (-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]):
1501         (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
1502         (-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
1503         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
1504         (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]):
1505         (-[ScrollbarPartAnimation setCurrentProgress:]):
1506         (-[ScrollbarPartAnimation scrollAnimatorDestroyed]):
1507         (-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]):
1508         (-[ScrollbarPainterDelegate cancelAnimations]):
1509         (-[ScrollbarPainterDelegate convertRectToBacking:]):
1510         (-[ScrollbarPainterDelegate convertRectFromBacking:]):
1511         (-[ScrollbarPainterDelegate layer]):
1512         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
1513         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
1514         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
1515         (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
1516         (-[ScrollbarPainterDelegate scrollAnimatorDestroyed]):
1517         (WebCore::ScrollAnimator::create):
1518         (WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac):
1519         (WebCore::ScrollAnimatorChromiumMac::~ScrollAnimatorChromiumMac):
1520         (WebCore::ScrollAnimatorChromiumMac::scroll):
1521         (WebCore::ScrollAnimatorChromiumMac::scrollToOffsetWithoutAnimation):
1522         (WebCore::ScrollAnimatorChromiumMac::adjustScrollXPositionIfNecessary):
1523         (WebCore::ScrollAnimatorChromiumMac::adjustScrollYPositionIfNecessary):
1524         (WebCore::ScrollAnimatorChromiumMac::adjustScrollPositionIfNecessary):
1525         (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
1526         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX):
1527         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY):
1528         (WebCore::ScrollAnimatorChromiumMac::notityPositionChanged):
1529         (WebCore::ScrollAnimatorChromiumMac::contentAreaWillPaint):
1530         (WebCore::ScrollAnimatorChromiumMac::mouseEnteredContentArea):
1531         (WebCore::ScrollAnimatorChromiumMac::mouseExitedContentArea):
1532         (WebCore::ScrollAnimatorChromiumMac::mouseMovedInContentArea):
1533         (WebCore::ScrollAnimatorChromiumMac::willStartLiveResize):
1534         (WebCore::ScrollAnimatorChromiumMac::contentsResized):
1535         (WebCore::ScrollAnimatorChromiumMac::willEndLiveResize):
1536         (WebCore::ScrollAnimatorChromiumMac::contentAreaDidShow):
1537         (WebCore::ScrollAnimatorChromiumMac::contentAreaDidHide):
1538         (WebCore::ScrollAnimatorChromiumMac::didBeginScrollGesture):
1539         (WebCore::ScrollAnimatorChromiumMac::didEndScrollGesture):
1540         (WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar):
1541         (WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar):
1542         (WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar):
1543         (WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar):
1544         (WebCore::ScrollAnimatorChromiumMac::cancelAnimations):
1545         (WebCore::elasticDeltaForTimeDelta):
1546         (WebCore::reboundDeltaForElasticDelta):
1547         (WebCore::elasticDeltaForReboundDelta):
1548         (WebCore::scrollWheelMultiplier):
1549         (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent):
1550         (WebCore::ScrollAnimatorChromiumMac::handleGestureEvent):
1551         (WebCore::ScrollAnimatorChromiumMac::pinnedInDirection):
1552         (WebCore::ScrollAnimatorChromiumMac::allowsVerticalStretching):
1553         (WebCore::ScrollAnimatorChromiumMac::allowsHorizontalStretching):
1554         (WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent):
1555         (WebCore::ScrollAnimatorChromiumMac::beginScrollGesture):
1556         (WebCore::ScrollAnimatorChromiumMac::endScrollGesture):
1557         (WebCore::ScrollAnimatorChromiumMac::snapRubberBand):
1558         (WebCore::roundTowardZero):
1559         (WebCore::roundToDevicePixelTowardZero):
1560         (WebCore::ScrollAnimatorChromiumMac::snapRubberBandTimerFired):
1561         (WebCore::ScrollAnimatorChromiumMac::startScrollbarPaintTimer):
1562         (WebCore::ScrollAnimatorChromiumMac::scrollbarPaintTimerIsActive):
1563         (WebCore::ScrollAnimatorChromiumMac::stopScrollbarPaintTimer):
1564         (WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired):
1565         (WebCore::ScrollAnimatorChromiumMac::setVisibleScrollerThumbRect):
1566         * platform/graphics/IntPoint.h:
1567
1568 2011-05-22  MORITA Hajime  <morrita@google.com>
1569
1570         Reviewed by Ryosuke Niwa.
1571
1572         SUPPORT_AUTOCORRECTION_PANEL should be USE(AUTOCORRECTION_PANEL)
1573         https://bugs.webkit.org/show_bug.cgi?id=61181
1574
1575         - Removed SUPPORT_AUTOCORRECTION_PANEL and REMOVE_MARKERS_UPON_EDITING from SpellingCorrectionController.h
1576         - Define WTF_USE_UNIFIED_TEXT_CHECKING and WTF_USE_AUTOMATIC_TEXT_REPLACEMENT at TextChecking.h
1577
1578         No new tests. Just renaming a compilation conditional.
1579
1580         * editing/Editor.cpp:
1581         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1582         * editing/SpellingCorrectionCommand.cpp:
1583         (WebCore::SpellingCorrectionCommand::doApply):
1584         * editing/SpellingCorrectionController.cpp:
1585         * editing/SpellingCorrectionController.h:
1586         (WebCore::SpellingCorrectionController::shouldRemoveMarkersUponEditing):
1587         * loader/EmptyClients.h:
1588         * page/EditorClient.h:
1589         * platform/text/TextChecking.h:
1590
1591 2011-05-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1592
1593         Unreviewed, rolling out r87007.
1594         http://trac.webkit.org/changeset/87007
1595         https://bugs.webkit.org/show_bug.cgi?id=61329
1596
1597         patch unnecessarily breaks HTML5 compatibility (Requested by
1598         estes on #webkit).
1599
1600         * html/HTMLObjectElement.cpp:
1601         (WebCore::HTMLObjectElement::hasValidClassId):
1602
1603 2011-05-23  Julien Chaffraix  <jchaffraix@codeaurora.org>
1604
1605         Reviewed by Darin Adler.
1606
1607         Crash from null pointer dereference below WebCore::StorageAreaImpl::setItem()
1608         https://bugs.webkit.org/show_bug.cgi?id=57140
1609
1610         Test: fast/storage/storage-detached-iframe.html
1611
1612         Access of localStorage on a detached iframe was causing a crash because a detached 
1613         iframe has a null m_page, and WebCore::privateBrowsingEnabled() wasn't testing for such.
1614
1615         * storage/StorageAreaImpl.cpp:
1616         (WebCore::privateBrowsingEnabled): check that child->page() is non-null before
1617         accessing it.
1618
1619 2011-05-23  Chris Fleizach  <cfleizach@apple.com>
1620
1621         Reviewed by David Kilzer.
1622
1623         VO doesn't work with HTML5 range (slider) input @step attribute
1624         https://bugs.webkit.org/show_bug.cgi?id=61298
1625
1626         Test: platform/mac/accessibility/range-alter-by-step.html
1627
1628         * accessibility/AccessibilityObject.h:
1629         (WebCore::AccessibilityObject::stepValueForRange):
1630         * accessibility/AccessibilityRenderObject.cpp:
1631         (WebCore::AccessibilityRenderObject::alterSliderValue):
1632         (WebCore::AccessibilityRenderObject::increment):
1633         (WebCore::AccessibilityRenderObject::decrement):
1634         (WebCore::AccessibilityRenderObject::stepValueForRange):
1635         (WebCore::AccessibilityRenderObject::changeValueByStep):
1636         * accessibility/AccessibilityRenderObject.h:
1637
1638 2011-05-23  Gavin Peters  <gavinp@chromium.org>
1639
1640         Reviewed by Adam Barth.
1641
1642         fix rel=prerender target types
1643         https://bugs.webkit.org/show_bug.cgi?id=61297
1644
1645         The original fix in https://bugs.webkit.org/show_bug.cgi?id=61079
1646         didn't properly map the target type, and didn't carry the target
1647         types through to chromium properly.  Fixed.
1648
1649         No new tests; it's very hard to catch these with a layout test, however
1650         all of the chromium Prerender browser tests will test this functionality
1651         when I land an upcoming chromium CL.
1652
1653         * loader/cache/CachedResourceRequest.cpp:
1654         (WebCore::cachedResourceTypeToTargetType):
1655
1656 2011-05-23  Matthew Delaney  <mdelaney@apple.com>
1657
1658         Reviewed by Simon Fraser.
1659
1660         Remove safeFloatToInt() in FloatRect.cpp and replace with working version of clampToInteger()
1661         https://bugs.webkit.org/show_bug.cgi?id=58216
1662
1663         No new tests. The SVG tests mask-excessive-malloc.svg and pattern-excessive-malloc.svg exercise this code path.
1664
1665         * platform/graphics/FloatRect.cpp:
1666         (WebCore::enclosingIntRect):
1667
1668 2011-05-20  Jeremy Noble  <jer.noble@apple.com>
1669
1670         Reviewed by Darin Adler.
1671
1672         Video looks squished when animating to full screen.
1673         https://bugs.webkit.org/show_bug.cgi?id=61220
1674
1675         No new tests, because DumpRenderTree does not currently "animate" the full-screen transition.
1676
1677         There are three issues animating video content to full screen which this patch is meant to
1678         address:
1679         1) The animation scales between the client sizes of the element before and after full-screen.
1680         Because these sizes have different aspect ratios, the video appears "squished" for part of
1681         the animation. Instead, we will animate between the content box sizes before and after full
1682         screen which, in the case of video now and object-fit content in the future, will have the
1683         same aspect ratio before and after full screen.
1684         2) Now that we are animating the full-screen video element's content box, the black letterbox
1685         bars appear above and below the video (depending on the video's aspect ratio) as soon as the
1686         animation begins. This is extremely jarring, so set the background color to clear. The
1687         full-screen renderer's background color will serve the same purpose (providing the letterbox
1688         background) once the animation completes.
1689         3) Now that the letterbox color is gone, the full screen controls can appear to float in thin
1690         air beneath the video (again, depending on aspect ratio) during the animation, so to avoid
1691         that effect and to make the animation consistent with the old webkitenterfullscreen()
1692         animation, we will hide the controls during the animation by adding a new CSS pseudo class
1693         -webkit-animating-full-screen-transition.
1694
1695         Added a new css pseudo-class: -webkit-animating-full-screen.  During the transition animation, this
1696         pseudo-class will be applied to the current full-screen element.  Styles have been added to 
1697         fullscreenQuickTime.css to hide the video element's built-in controller during the full-screen
1698         animation.
1699
1700         To accomplish this, the ivar tracking whether the full-screen animation is taking place has been moved
1701         from the RenderFullScreen renderer, to the current full-screen Document.  Because changing 
1702         isAnimatingFullScreen causes style changes, make sure to call recalcStyle on the full-screen element
1703         after changing.
1704
1705         This extra transition caused assertions in HTMLFormControlElement::updateFromElementCallback. A
1706         full-screen media control's renderer is disabled during the style recalculation when exiting full
1707         screen. This assertion was exposed by the extra recalcStyle() issued during the exit transition, and
1708         has been removed.
1709
1710         * WebCore.exp.in:
1711         * css/CSSSelector.cpp:
1712         (WebCore::CSSSelector::pseudoId): Add support for new pseudo class -webkit-animate-full-screen-transition.
1713         (WebCore::nameToPseudoTypeMap): Ditto.
1714         (WebCore::CSSSelector::extractPseudoType): Ditto.
1715         * css/CSSSelector.h:
1716         * css/CSSStyleSelector.cpp:
1717         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
1718         * css/fullscreen.css: 
1719         (video:-webkit-full-screen): Set full screen video background color to clear.
1720         * css/fullscreenQuickTime.css: 
1721         (video:-webkit-full-screen::-webkit-media-controls-panel): Set a default opacity transition.
1722         (video:-webkit-animating-full-screen::-webkit-media-controls-panel): Set the opacity to 0 and 
1723             disable the transition.
1724         * dom/Document.cpp:
1725         (WebCore::Document::Document):
1726         (WebCore::Document::webkitWillEnterFullScreenForElement): Call our new setAnimatingFullScreen function.
1727         (WebCore::Document::webkitDidEnterFullScreenForElement): Ditto.
1728         (WebCore::Document::webkitWillExitFullScreenForElement): Ditto.
1729         (WebCore::Document::webkitDidExitFullScreenForElement): Ditto.
1730         (WebCore::Document::isAnimatingFullScreen): Moved here from RenderFullScreen.
1731         (WebCore::Document::setAnimatingFullScreen): Ditto.
1732         * dom/Document.h:
1733         * html/HTMLFormControlElement.cpp: 
1734         (WebCore::updateFromElementCallback): Use the Document's isAnimatingFullScreen function.
1735         * page/FrameView.cpp:
1736         (WebCore::isDocumentRunningFullScreenAnimation): Ditto.
1737         * rendering/RenderFullScreen.cpp:
1738         * rendering/RenderFullScreen.h:
1739         * rendering/RenderLayerCompositor.cpp:
1740         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Ditto.
1741         (WebCore::RenderLayerCompositor::requiresCompositingForFullScreen): Ditto.
1742         * rendering/style/RenderStyleConstants.h:
1743
1744 2011-05-23  Emil A Eklund  <eae@chromium.org>
1745
1746         Reviewed by Eric Seidel.
1747
1748         Change RenderBlock hit testing to use IntPoint instead x,y pair
1749         https://bugs.webkit.org/show_bug.cgi?id=61146
1750
1751         Covered by existing tests.
1752
1753         * platform/graphics/IntPoint.h:
1754         (WebCore::toSize):
1755         Add toSize function for converting from point to size.
1756
1757         * rendering/RenderBlock.cpp:
1758         (WebCore::RenderBlock::isPointInOverflowControl):
1759         (WebCore::RenderBlock::nodeAtPoint):
1760         (WebCore::RenderBlock::hitTestFloats):
1761         (WebCore::RenderBlock::hitTestColumns):
1762         (WebCore::RenderBlock::hitTestContents):
1763         * rendering/RenderBlock.h:
1764         Change hit testing code in RenderBlock to use IntPoint.
1765
1766         * rendering/RenderListBox.cpp:
1767         (WebCore::RenderListBox::isPointInOverflowControl):
1768         * rendering/RenderListBox.h:
1769         Change overridden method to use IntPoint.
1770
1771 2011-05-23  Mike Reed  <reed@google.com>
1772
1773         Reviewed by James Robinson.
1774
1775         Skia: Need to implement GraphicsContext::clipConvexPolygon()
1776         https://bugs.webkit.org/show_bug.cgi?id=41311
1777
1778         No new tests. 
1779
1780         * platform/graphics/skia/GraphicsContextSkia.cpp:
1781         (WebCore::setPathFromConvexPoints):
1782         (WebCore::GraphicsContext::drawConvexPolygon):
1783         (WebCore::GraphicsContext::clipConvexPolygon):
1784
1785 2011-05-23  James Simonsen  <simonjam@chromium.org>
1786
1787         Reviewed by Adam Barth.
1788
1789         Convert raw pointer to RefPtr.
1790         https://bugs.webkit.org/show_bug.cgi?id=61196
1791
1792         * dom/XMLDocumentParserLibxml2.cpp:
1793         (WebCore::XMLDocumentParser::endElementNs):
1794         * dom/XMLDocumentParserQt.cpp:
1795         (WebCore::XMLDocumentParser::parseEndElement):
1796
1797 2011-05-23  Ryosuke Niwa  <rniwa@webkit.org>
1798
1799         Reviewed by Alexey Proskuryakov.
1800
1801         selectstart is fired for every mouse move
1802         https://bugs.webkit.org/show_bug.cgi?id=19489
1803
1804         Fixed the bug by dispatching selectstart event immediately before modifying selection in
1805         handleMousePressEventSingleClick and updateSelectionForMouseDrag.
1806
1807         Also replaced a boolean EventHandler::m_beganSelectingText by an enum-valued m_selectionInitiationState
1808         to retain 3 states:
1809         1. HaveNotStartedSelection - Selection has not been set by a mouse drag or a mouse click
1810         2. PlacedCaret - A caret was placed by a mouse click, double click, or triple click, and is about
1811         to replace selection if a mouse drag never occurs.
1812         3. ExtendedSelection - A range selection was set by a mouse click, a double click, a triple click,
1813         or a mouse drag; otherwise a caret selection was set by a mouse drag.
1814
1815         State 1 corresponds to m_beganSelectingText being false and state 3 corresponds to m_beganSelectingText
1816         being true. State 2 is used in updateSelectionForMouseDrag to avoid dispatching selectstart twice.
1817
1818         States 1 and 2 are set by updateSelectionForMouseDownDispatchingSelectStart and state 3 is set by
1819         updateSelectionForMouseDrag.
1820
1821         Test: fast/events/selectstart-by-double-triple-clicks.html
1822               fast/events/selectstart-by-drag.html
1823               fast/events/selectstart-by-single-click-with-shift.html
1824
1825         * page/EventHandler.cpp: Removed canMouseDragExtendSelect.
1826         (WebCore::EventHandler::EventHandler): Initializes m_selectionInitiationState.
1827         (WebCore::dispatchSelectStart): Returns true only if selectstart was successfully fired
1828         and default action was not prevented.
1829         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart): Updates m_selectionInitiationState
1830         and modifies the selection if dispatchSelectStart returns true.
1831         (WebCore::EventHandler::selectClosestWordFromMouseEvent): Calls updateSelectionForMouseDownDispatchingSelectStart.
1832         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Ditto.
1833         (WebCore::EventHandler::handleMousePressEventDoubleClick):
1834         (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
1835         (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
1836         (WebCore::canMouseDownStartSelect): No longer dispatches startselect; also renamed from
1837         EventHandler::canMouseDownStartSelect.
1838         (WebCore::EventHandler::handleMousePressEvent): No longer calls canMouseDragExtendSelect.
1839         (WebCore::EventHandler::handleMouseDraggedEvent):
1840         (WebCore::EventHandler::updateSelectionForMouseDrag): Exit early if m_selectionInitiationState is
1841         HaveNotStartedSelection and dispatchSelectStart returns false. Since setSelectionIfPossible dispatches
1842         selectstart event before assigning PlacedCaret or ExtendedSelection to m_selectionInitiationState,
1843         there is no need to dispatch event for those two cases.
1844         (WebCore::EventHandler::handleMouseReleaseEvent):
1845         * page/EventHandler.h: Removed canMouseDownStartSelect and canMouseDragExtendSelect from EventHandler
1846         and added setSelectionIfPossible.
1847
1848 2011-05-23  Adam Klein  <adamk@chromium.org>
1849
1850         Reviewed by Jian Li.
1851
1852         [fileapi] Add a File::createWithName method to avoid obfuscated filename leakage from FileEntry.file() method
1853         https://bugs.webkit.org/show_bug.cgi?id=61155
1854
1855         Covered by existing tests: fast/filesystem/file-from-file-entry.html
1856                                    fast/filesystem/workers/file-from-file-entry.html
1857                                    fast/filesystem/workers/file-from-file-entry-sync.html
1858
1859         * fileapi/DOMFileSystem.cpp:
1860         (WebCore::DOMFileSystem::createFile): Updated to call createWithName().
1861         * fileapi/DOMFileSystemSync.cpp:
1862         (WebCore::DOMFileSystemSync::createFile): Updated to call createWithName().
1863         * fileapi/File.cpp:
1864         (WebCore::createBlobDataForFile): Added an optional name argument to fix MIME type lookup.
1865         (WebCore::File::createWithRelativePath): Renamed from create() for consistency with new method.
1866         (WebCore::File::File):
1867         * fileapi/File.h:
1868         (WebCore::File::createWithName):
1869         * html/FileInputType.cpp:
1870         (WebCore::FileInputType::setFileList): Updated the single caller of File::createWithRelativePath().
1871
1872 2011-05-23  Adrienne Walker  <enne@google.com>
1873
1874         Reviewed by James Robinson.
1875
1876         [chromium] Fix division by zero in TilingData for boundary case texture sizes
1877         https://bugs.webkit.org/show_bug.cgi?id=61164
1878
1879         * platform/graphics/gpu/TilingData.cpp:
1880         (WebCore::TilingData::tileXIndexFromSrcCoord):
1881         (WebCore::TilingData::tileYIndexFromSrcCoord):
1882
1883 2011-05-23  Adam Barth  <abarth@webkit.org>
1884
1885         Reviewed by Eric Seidel.
1886
1887         Update ImageDecoder::create to match sniffing spec
1888         https://bugs.webkit.org/show_bug.cgi?id=47683
1889
1890         This change is difficult to test.  We're making this change to comply
1891         with standards even if the change is difficult to observe.  (This patch
1892         also causes us to match Firefox.)
1893
1894         Test: fast/images/busted-oval-does-not-render.html
1895
1896         * platform/image-decoders/ImageDecoder.cpp:
1897
1898 2011-05-23  Ruben  <chromium@hybridsource.org>
1899
1900         Reviewed by Tony Chang.
1901
1902         Chromium gyp patch to use new POSIX defines toolkit_uses_gtk and os_posix
1903         https://bugs.webkit.org/show_bug.cgi?id=61219
1904
1905         No new tests, just changing gyp defines.
1906
1907         * WebCore.gyp/WebCore.gyp:
1908
1909 2011-05-23  Abhishek Arya  <inferno@chromium.org>
1910
1911         Reviewed by Simon Fraser.
1912
1913         Terminate css color parsing on integers which are not followed
1914         by a terminator.
1915         https://bugs.webkit.org/show_bug.cgi?id=61293
1916
1917         Test: fast/css/parse-color-int-or-percent-crash.html
1918
1919         * css/CSSParser.cpp:
1920         (WebCore::parseColorIntOrPercentage):
1921
1922 2011-05-20  Ryosuke Niwa  <rniwa@webkit.org>
1923
1924         Reviewed by Enrica Casucci.
1925
1926         REGRESSION(r84311): WebKit copies too much styles when copying
1927         https://bugs.webkit.org/show_bug.cgi?id=60914
1928
1929         The bug was caused by WebKit's cloning node hierarchy up until the node that has background color.
1930         Fixed the bug by not cloning background color and adding the effective background color to the wrapping
1931         style span.
1932
1933         Tests: editing/pasteboard/do-no-clone-unnecessary-styles-2.html
1934                editing/pasteboard/do-no-clone-unnecessary-styles.html
1935
1936         * editing/EditingStyle.cpp:
1937         (WebCore::cssValueToRGBA): Extracted from getRGBAFontColor.
1938         (WebCore::getRGBAFontColor): Moved.
1939         (WebCore::rgbaBackgroundColorInEffect): Added.
1940         (WebCore::EditingStyle::init): Added support for InheritablePropertiesAndBackgroundColorInEffect.
1941         (WebCore::EditingStyle::prepareToApplyAt): Include the effective background color at the given position.
1942         Also remove the background color property when the effective background color is equal to the background
1943         color property (in terms of RGBA value) of the editing style.
1944         (WebCore::hasTransparentBackgroundColor): Moved from Editor class.
1945         (WebCore::backgroundColorInEffect): Extracted from Editor::selectionStartCSSPropertyValue.
1946         * editing/EditingStyle.h: Added prototypes for hasTransparentBackgroundColor and backgroundColorInEffect.
1947         * editing/Editor.cpp:
1948         (WebCore::Editor::selectionStartCSSPropertyValue): Calls backgroundColorInEffect.
1949         * editing/Editor.h: Removed hasTransparentBackgroundColor.
1950         * editing/markup.cpp:
1951         (WebCore::isElementPresentational): Reverted r85090 and r84311.
1952         (WebCore::createMarkup): Include the background color in effect when computing the editing style.
1953
1954 2011-05-23  Roland Steiner  <rolandsteiner@chromium.org>
1955
1956         Reviewed by Dimitri Glazkov.
1957
1958         Update node list cache count on the containing TreeScope rather than the Document
1959         https://bugs.webkit.org/show_bug.cgi?id=59983
1960
1961         Change code to call add/removeNodeListCache() and hasNodeListCaches() on the proper tree scope.
1962         Move updating of the node list cache count from setDocument() to setTreeScopeRecursively().
1963         Make setDocument() and setDocumentRecursively() private.
1964
1965         No new tests. (refactoring)
1966
1967         * dom/ContainerNode.cpp:
1968         (WebCore::ContainerNode::childrenChanged):
1969         * dom/Node.cpp:
1970         (WebCore::Node::~Node):
1971         (WebCore::Node::setDocument):
1972         (WebCore::Node::setTreeScopeRecursively):
1973         (WebCore::Node::childNodes):
1974         (WebCore::Node::registerDynamicNodeList):
1975         (WebCore::Node::unregisterDynamicNodeList):
1976         (WebCore::Node::notifyLocalNodeListsAttributeChanged):
1977         (WebCore::Node::notifyLocalNodeListsChildrenChanged):
1978         (WebCore::Node::getElementsByTagName):
1979         (WebCore::Node::getElementsByTagNameNS):
1980         (WebCore::Node::getElementsByName):
1981         (WebCore::Node::getElementsByClassName):
1982         * dom/Node.h:
1983         * html/HTMLFormControlElement.cpp:
1984         (WebCore::HTMLFormControlElement::labels):
1985
1986 2011-05-23  Yury Semikhatsky  <yurys@chromium.org>
1987
1988         Reviewed by Pavel Feldman.
1989
1990         [Chromium] Web Inspector: provide initial implementation of worker inspector transport
1991         https://bugs.webkit.org/show_bug.cgi?id=60267
1992
1993         All methods of WorkerContextInspectorProxy are inlined in WorkerContextProxy and
1994         the class itself is removed. Messages from worker inspector to page inspector
1995         are sent by means of WorkerReportingProxy.
1996
1997         * GNUmakefile.list.am:
1998         * WebCore.gypi:
1999         * WebCore.vcproj/WebCore.vcproj:
2000         * WebCore.xcodeproj/project.pbxproj:
2001         * inspector/InspectorWorkerAgent.cpp:
2002         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
2003         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::proxy):
2004         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::dispatchMessageFromWorker):
2005         (WebCore::InspectorWorkerAgent::sendMessageToWorker):
2006         (WebCore::InspectorWorkerAgent::didStartWorkerContext):
2007         * inspector/InspectorWorkerAgent.h:
2008         * inspector/WorkerInspectorController.cpp:
2009         (WebCore::WorkerInspectorController::connectFrontend):
2010         (WebCore::WorkerInspectorController::disconnectFrontend):
2011         * inspector/WorkerInspectorController.h:
2012         * workers/DefaultSharedWorkerRepository.cpp:
2013         (WebCore::SharedWorkerProxy::postMessageToPageInspector):
2014         * workers/WorkerContextInspectorProxy.h: Removed.
2015         * workers/WorkerContextProxy.h:
2016         (WebCore::WorkerContextProxy::PageInspector::~PageInspector):
2017         (WebCore::WorkerContextProxy::connectToInspector):
2018         (WebCore::WorkerContextProxy::disconnectFromInspector):
2019         (WebCore::WorkerContextProxy::sendMessageToInspector):
2020         * workers/WorkerMessagingProxy.cpp:
2021         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
2022         * workers/WorkerMessagingProxy.h:
2023         * workers/WorkerReportingProxy.h:
2024
2025 2011-05-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2026
2027         Unreviewed, rolling out r87070.
2028         http://trac.webkit.org/changeset/87070
2029         https://bugs.webkit.org/show_bug.cgi?id=61285
2030
2031         broke resource-parameters.html on win, weird failures on wk2
2032         (Requested by caseq on #webkit).
2033
2034         * inspector/front-end/HAREntry.js:
2035         (WebInspector.HAREntry.prototype.build):
2036         (WebInspector.HAREntry.prototype._buildRequest):
2037         (WebInspector.HAREntry.prototype._buildResponse):
2038         (WebInspector.HAREntry.prototype._buildContent):
2039         (WebInspector.HAREntry.prototype._buildCookie):
2040         (WebInspector.HAREntry.prototype._interval):
2041         (WebInspector.HARLog.prototype.build):
2042         * inspector/front-end/Resource.js:
2043         (WebInspector.Resource.prototype.set requestHeaders):
2044         (WebInspector.Resource.prototype.get requestHeadersText):
2045         (WebInspector.Resource.prototype.set requestHeadersText):
2046         (WebInspector.Resource.prototype.get requestHeadersSize):
2047         (WebInspector.Resource.prototype.set responseHeaders):
2048         (WebInspector.Resource.prototype.get responseHeadersText):
2049         (WebInspector.Resource.prototype.set responseHeadersText):
2050         (WebInspector.Resource.prototype.get responseHeadersSize):
2051         (WebInspector.Resource.prototype._headersSize):
2052
2053 2011-05-18  Pavel Podivilov  <podivilov@chromium.org>
2054
2055         Reviewed by Yury Semikhatsky.
2056
2057         Web Inspector: source mapping for pretty-printed scripts is sometimes inaccurate after indented comments.
2058         https://bugs.webkit.org/show_bug.cgi?id=61037
2059
2060         * inspector/front-end/JavaScriptFormatter.js:
2061         (FormattedContentBuilder.prototype.addToken):
2062         (FormattedContentBuilder.prototype._addComment):
2063         (FormattedContentBuilder.prototype._addText):
2064         (FormattedContentBuilder.prototype._addMappingIfNeeded):
2065
2066 2011-05-23  Mike West  <mkwst@chromium.org>
2067
2068         Reviewed by Yury Semikhatsky.
2069
2070         Web Inspector: Missing fields in HAR
2071         https://bugs.webkit.org/show_bug.cgi?id=58127
2072         
2073         Specifically, this patch adds:
2074         - entry.request.httpVersion
2075         - entry.request.headersSize
2076         - entry.request.bodySize
2077         - entry.response.httpVersion
2078         - entry.response.headersSize
2079         - entry.response.bodySize
2080         - entry.response.content.compression
2081         
2082         Tests: http/tests/inspector/resource-har-conversion.html
2083                http/tests/inspector/resource-har-headers.html
2084                http/tests/inspector/resource-parameters.html
2085                http/tests/inspector/network/network-size.html
2086
2087         * inspector/front-end/HAREntry.js:
2088         (WebInspector.HAREntry.prototype.build):
2089         (WebInspector.HAREntry.prototype._buildRequest):
2090         (WebInspector.HAREntry.prototype._buildResponse):
2091         (WebInspector.HAREntry.prototype._buildContent):
2092         (WebInspector.HAREntry.prototype._buildCookie):
2093         (WebInspector.HAREntry.prototype._interval):
2094         (WebInspector.HAREntry.prototype.get requestBodySize):
2095         (WebInspector.HAREntry.prototype.get responseBodySize):
2096         (WebInspector.HAREntry.prototype.get responseCompression):
2097         (WebInspector.HARLog.prototype.build):
2098         * inspector/front-end/Resource.js:
2099         (WebInspector.Resource.prototype.set requestHeaders):
2100         (WebInspector.Resource.prototype.get requestHeadersText):
2101         (WebInspector.Resource.prototype.set requestHeadersText):
2102         (WebInspector.Resource.prototype.get requestHeadersSize):
2103         (WebInspector.Resource.prototype.get requestHttpVersion):
2104         (WebInspector.Resource.prototype.set responseHeaders):
2105         (WebInspector.Resource.prototype.get responseHeadersText):
2106         (WebInspector.Resource.prototype.set responseHeadersText):
2107         (WebInspector.Resource.prototype.get responseHeadersSize):
2108         (WebInspector.Resource.prototype.get responseHttpVersion):
2109
2110 2011-05-23  Andrey Kosyakov  <caseq@chromium.org>
2111
2112         Reviewed by Yury Semikhatsky.
2113
2114         Web Inspector: keyboard shortcut panel is 1px too short
2115         https://bugs.webkit.org/show_bug.cgi?id=61242
2116
2117         Fixed bottom margin of attached helpscreen so it's glued to status bar.
2118
2119         * inspector/front-end/helpScreen.css:
2120         (body.attached .help-window-outer):
2121
2122 2011-05-23  Kent Tamura  <tkent@chromium.org>
2123
2124         Reviewed by Dimitri Glazkov.
2125
2126         Change text-based <input> types to the new shadow DOM model
2127         https://bugs.webkit.org/show_bug.cgi?id=54179
2128
2129         By this change, text field inputs and textareas have one extra
2130         shadow node at the root of shadow trees.
2131         e.g. Before the change:
2132           <textarea> --(shadow-connection)-- <div> -- ...
2133         After the change:
2134           <textarea> --(shadow-connection)-- {#shadow-root} -- <div> -- ...
2135
2136         The goals of this change are
2137         - Change to the new shadow DOM model, and
2138         - Minimize the patch size.
2139
2140         We should use shadowPseudoId() in the new shadow DOM model, but the
2141         shadow elements in this patch don't use it in order to reduce the patch
2142         size.
2143
2144         Note: This is a re-landing for r87014 with a small fix of
2145         Element::removeShadowRoot().
2146         
2147         * css/html.css:
2148         (input::-webkit-inner-spin-button):
2149          Add vertical-align in order to avoid the button affect the baseline.
2150         (input::-webkit-outer-spin-button): ditto.
2151         (input::-webkit-input-speech-button): ditto.
2152         * dom/Element.cpp:
2153         (WebCore::Element::recalcStyle): Calls styleForRenderer() so that a
2154          subclass of Element can override it.
2155         (WebCore::Element::remvoeShadowRoot):
2156          Fix a wrong parameter for willRemoveDOMNode().
2157         (WebCore::Element::isSpellCheckingEnabled):
2158          Handle ShadowRoot, which is not an Element.
2159         * dom/Node.cpp:
2160           Add utility functions for editing code.
2161         (WebCore::Node::nonBoundaryShadowTreeRootNode):
2162         (WebCore::Node::nonShadowBoundaryParentNode):
2163         * dom/Node.h: Declare them.
2164         * dom/Position.cpp:
2165          - Add some assertions about ShadowRoot
2166          - Replace parentNode() with nonShadowBoundaryParentNode()
2167         Because input/textarea shadow structures are changed.
2168         (WebCore::Position::Position):
2169         (WebCore::Position::containerNode):
2170         (WebCore::Position::parentAnchoredEquivalent):
2171         (WebCore::Position::previous):
2172         (WebCore::Position::next):
2173         (WebCore::Position::parentEditingBoundary):
2174         (WebCore::Position::atStartOfTree):
2175         (WebCore::Position::atEndOfTree):
2176         * dom/Position.h: ditto.
2177         (WebCore::positionInParentBeforeNode):
2178         (WebCore::positionInParentAfterNode):
2179         * editing/CompositeEditCommand.cpp: ditto.
2180         (WebCore::CompositeEditCommand::insertNodeAfter):
2181         (WebCore::CompositeEditCommand::removeNode):
2182         * editing/Editor.cpp:
2183         (WebCore::Editor::findString): ditto.
2184         * editing/FrameSelection.cpp:
2185         (WebCore::FrameSelection::selectAll): Inline shadowTreeRootNode() calls.
2186         * editing/FrameSelection.h:
2187           Remove shadowTreeRootNode(). It is used only by FrameSelection::selectAll().
2188         * editing/InsertParagraphSeparatorCommand.cpp:
2189         (WebCore::InsertParagraphSeparatorCommand::doApply): Use nonShadowBoundaryParentNode()
2190         * editing/ReplaceSelectionCommand.cpp:
2191         (WebCore::ReplacementFragment::removeNode): ditto.
2192         (WebCore::ReplacementFragment::insertNodeBefore): ditto.
2193         * editing/VisibleSelection.cpp:
2194           Rename shadowTreeRootNode() to nonBoundaryShadowTreeRootNode(), and it reutrns
2195           a child node of ShadowRoot.
2196         (WebCore::VisibleSelection::isAll):
2197         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
2198         (WebCore::VisibleSelection::nonBoundaryShadowTreeRootNode):
2199         * editing/VisibleSelection.h: ditto.
2200         * editing/htmlediting.cpp: Add assertions.
2201         (WebCore::visiblePositionBeforeNode):
2202         (WebCore::visiblePositionAfterNode):
2203         * html/HTMLInputElement.cpp:
2204         (WebCore::HTMLInputElement::create): Calls createShadowSubtree().
2205         (WebCore::HTMLInputElement::createShadowSubtree):
2206           Calls InputType::createShadowSubTree().
2207         (WebCore::HTMLInputElement::innerTextElement):
2208           Accessor of a shadow node. This is used by RenderTextControlSingleLine.
2209         (WebCore::HTMLInputElement::innerBlockElement): ditto.
2210         (WebCore::HTMLInputElement::innerSpinButtonElement): ditto.
2211         (WebCore::HTMLInputElement::outerSpinButtonElement): ditto.
2212         (WebCore::HTMLInputElement::resultsButtonElement): ditto.
2213         (WebCore::HTMLInputElement::cancelButtonElement): ditto.
2214         (WebCore::HTMLInputElement::speechButtonElement): ditto.
2215         (WebCore::HTMLInputElement::parseMappedAttribute):
2216           Rebuild shadow trees because x-webkit-speech attribute affects it.
2217         * html/HTMLInputElement.h: Add declarations.
2218         * html/HTMLIsIndexElement.cpp:
2219         (WebCore::HTMLIsIndexElement::create): Calls createShadowSubtree().
2220         * html/HTMLTextAreaElement.cpp:
2221         (WebCore::HTMLTextAreaElement::create): Calls createShadowSubtree().
2222         (WebCore::HTMLTextAreaElement::createShadowSubtree): Added.
2223         * html/HTMLTextAreaElement.h: Declare createShadowSubtree().
2224         * html/InputType.h: Add default implementations of accessors.
2225         (WebCore::InputType::innerBlockElement):
2226         (WebCore::InputType::innerTextElement):
2227         (WebCore::InputType::innerSpinButtonElement):
2228         (WebCore::InputType::outerSpinButtonElement):
2229         (WebCore::InputType::resultsButtonElement):
2230         (WebCore::InputType::cancelButtonElement):
2231         (WebCore::InputType::speechButtonElement):
2232         * html/SearchInputType.cpp:
2233         (WebCore::SearchInputType::SearchInputType): Initializes new data members.
2234         (WebCore::SearchInputType::createShadowSubtree):
2235           Moved from RenderTextControlSingleLine.
2236         (WebCore::SearchInputType::destroyShadowSubtree): Clear element references.
2237         * html/SearchInputType.h: Add declarations.
2238         (WebCore::SearchInputType::innerBlockElement):
2239         (WebCore::SearchInputType::resultsButtonElement):
2240         (WebCore::SearchInputType::cancelButtonElement):
2241         * html/TextFieldInputType.cpp:
2242         (WebCore::TextFieldInputType::TextFieldInputType):
2243           Initializes new data members.
2244         (WebCore::TextFieldInputType::createShadowSubtree):
2245           Moved from RenderTextControlSingleLine.
2246         (WebCore::TextFieldInputType::destroyShadowSubtree): Clear element references.
2247         * html/TextFieldInputType.h: Add declarations.
2248         (WebCore::TextFieldInputType::innerTextElement):
2249         (WebCore::TextFieldInputType::innerSpinButtonElement):
2250         (WebCore::TextFieldInputType::outerSpinButtonElement):
2251         (WebCore::TextFieldInputType::speechButtonElement):
2252         (WebCore::TextFieldInputType::setInnerTextElement):
2253         (WebCore::TextFieldInputType::setSpeechButtonElement):
2254         * html/shadow/TextControlInnerElements.cpp:
2255         (WebCore::TextControlInnerElement::TextControlInnerElement):
2256           Remove shadowParent parameter. It is unnecessary because we switch to
2257           new shadow model.
2258         (WebCore::TextControlInnerElement::create):
2259           Change the parameter type to Document.
2260         (WebCore::TextControlInnerElement::styleForRenderer):
2261           Override this in order to set style by
2262           RenderTextControlSingleLine::createInnerBlockStyle().
2263         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
2264           Remove shadowParent parameter.
2265           Inherit HTMLDivElement, not TextControlInnerElement.
2266         (WebCore::TextControlInnerTextElement::create): Remove shadowParent parameter.
2267         (WebCore::TextControlInnerTextElement::styleForRenderer):
2268           Override this in order to set style by
2269           RenderTextControlSingleLine::createInnerTextStyle().
2270         (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
2271           Inherit HTMLDivElement, not TextControlInnerElement.
2272         (WebCore::SearchFieldResultsButtonElement::styleForRenderer):
2273           Override this in order to set style by
2274           RenderTextControlSingleLine::createResultButtonStyle().
2275         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
2276           Inherit HTMLDivElement, not TextControlInnerElement.
2277         (WebCore::SearchFieldCancelButtonElement::styleForRenderer):
2278           Override this in order to set style by
2279           RenderTextControlSingleLine::createCancelButtonStyle().
2280         (WebCore::SearchFieldCancelButtonElement::detach):
2281           Update for the parent class change.
2282         (WebCore::SpinButtonElement::SpinButtonElement):
2283           - Change the parameter type: shadowParent -> Document
2284           - Add the inner flag
2285           - Inherit HTMLDivElement, not TextControlInnerElement.
2286         (WebCore::SpinButtonElement::createInner): Introduce a new factory
2287           method to hide a bool parameter of the constructor.
2288         (WebCore::SpinButtonElement::createOuter): ditto.
2289         (WebCore::SpinButtonElement::styleForRenderer):
2290           Override this in order to set style by
2291           RenderTextControlSingleLine::createInnerSpinButtonStyle() or
2292           createOuterSpinButtonStyle().
2293         (WebCore::SpinButtonElement::detach): Update for the parent class change.
2294         (WebCore::SpinButtonElement::setHovered): ditto.
2295         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
2296           - Change the parameter type: shadowParent -> Document
2297           - Inherit HTMLDivElement, not TextControlInnerElement.
2298           - Do not register this as a speech input listener here.
2299         (WebCore::InputFieldSpeechButtonElement::create):
2300           Update for the parameter change.
2301         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
2302           Do not handle click event if listener registration is not done.
2303         (WebCore::InputFieldSpeechButtonElement::attach):
2304           Register this as a speech input listener.
2305         (WebCore::InputFieldSpeechButtonElement::detach):
2306           Update for the parent class change.
2307         (WebCore::InputFieldSpeechButtonElement::styleForRenderer):
2308           Override this in order to set style by
2309           RenderTextControlSingleLine::createSpeechButtonStyle().
2310         * html/shadow/TextControlInnerElements.h:
2311         (WebCore::TextControlInnerTextElement::isMouseFocusable):
2312           Add this because the class is not a subclass of TextControllInnerElement.
2313         (WebCore::SearchFieldResultsButtonElement::isMouseFocusable): ditto.
2314         (WebCore::SearchFieldCancelButtonElement::isMouseFocusable): ditto.
2315         (WebCore::SpinButtonElement::isMouseFocusable): ditto.
2316         (WebCore::InputFieldSpeechButtonElement::isMouseFocusable): ditto.
2317         * rendering/RenderTextControl.cpp:
2318         (WebCore::RenderTextControl::~RenderTextControl): Remove unnecessary code.
2319         (WebCore::RenderTextControl::styleDidChange):
2320           innerTextElement can have no renderer.
2321           Explicitly call setNeedsStyleRecals() for innerTextElement. It is
2322           needed for LayoutTests/editing/selection/select-across-readonly-input-*.html.
2323         (WebCore::RenderTextControl::textBlockWidth): Member data -> function
2324         (WebCore::RenderTextControl::updateFromElement): ditto.
2325         (WebCore::RenderTextControl::setInnerTextValue): ditto.
2326         (WebCore::RenderTextControl::hasVisibleTextArea): ditto.
2327         (WebCore::RenderTextControl::isSelectableElement): ditto.
2328         (WebCore::RenderTextControl::selection): ditto.
2329         (WebCore::RenderTextControl::visiblePositionForIndex): ditto.
2330         (WebCore::RenderTextControl::indexForVisiblePosition): ditto.
2331         (WebCore::RenderTextControl::text): ditto.
2332         (WebCore::RenderTextControl::textWithHardLineBreaks): ditto.
2333         (WebCore::RenderTextControl::computeLogicalHeight): ditto.
2334         (WebCore::RenderTextControl::hitInnerTextElement): ditto.
2335         (WebCore::RenderTextControl::forwardEvent): ditto.
2336         (WebCore::RenderTextControl::computePreferredLogicalWidths): ditto.
2337         * rendering/RenderTextControl.h:
2338           - Make m_innerText virtual function.
2339           - Make createInnerTextStyle() public in order that
2340             TextControlInnerElements can call it.
2341         * rendering/RenderTextControlMultiLine.cpp:
2342         (WebCore::RenderTextControlMultiLine::innerTextElement): Added.
2343         (WebCore::RenderTextControlMultiLine::updateFromElement):
2344           Remove unnecessary createSubtreeIfNeeded() call.
2345         * rendering/RenderTextControlMultiLine.h: Add a declaration.
2346         * rendering/RenderTextControlSingleLine.cpp:
2347         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
2348           Remove unnecessary code.
2349         (WebCore::RenderTextControlSingleLine::innerTextElement): Added.
2350         (WebCore::RenderTextControlSingleLine::innerBlockElement): Added.
2351         (WebCore::RenderTextControlSingleLine::innerSpinButtonElement): Added.
2352         (WebCore::RenderTextControlSingleLine::outerSpinButtonElement): Added.
2353         (WebCore::RenderTextControlSingleLine::resultsButtonElement): Added.
2354         (WebCore::RenderTextControlSingleLine::cancelButtonElement): Added.
2355         (WebCore::RenderTextControlSingleLine::speechButtonElement): Added.
2356         (WebCore::RenderTextControlSingleLine::textBaseStyle): Data member -> function
2357         (WebCore::RenderTextControlSingleLine::subtreeHasChanged): ditto.
2358         (WebCore::RenderTextControlSingleLine::layout): ditto.
2359         (WebCore::RenderTextControlSingleLine::nodeAtPoint): ditto.
2360         (WebCore::RenderTextControlSingleLine::forwardEvent): ditto.
2361         (WebCore::RenderTextControlSingleLine::styleDidChange): ditto.
2362         (WebCore::RenderTextControlSingleLine::hasControlClip): ditto.
2363         (WebCore::RenderTextControlSingleLine::controlClipRect): ditto.
2364         (WebCore::RenderTextControlSingleLine::textBlockWidth): ditto.
2365         (WebCore::RenderTextControlSingleLine::decorationWidthRight): ditto.
2366         (WebCore::RenderTextControlSingleLine::preferredContentWidth): ditto.
2367         (WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight): ditto.
2368         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight): ditto.
2369         (WebCore::RenderTextControlSingleLine::updateFromElement):
2370           ditto, and remove unnecessary createSubtreeIfNeeded() call.
2371         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
2372           Data member -> function
2373         (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility): ditto.
2374         (WebCore::RenderTextControlSingleLine::clientPaddingLeft): ditto.
2375         (WebCore::RenderTextControlSingleLine::clientPaddingRight): ditto.
2376         (WebCore::RenderTextControlSingleLine::textBlockInsetTop): ditto.
2377         * rendering/RenderTextControlSingleLine.h:
2378           Add declarations, and remove unnecessary data members.
2379
2380 2011-05-19  Vitaly Repeshko  <vitalyr@chromium.org>
2381
2382         Reviewed by Adam Barth.
2383
2384         [V8] Explicitly mark objects with complex GC rules.
2385         https://bugs.webkit.org/show_bug.cgi?id=61131
2386
2387         From the GC point view there are two kinds of objects: the ones
2388         that may participate in object grouping (i.e. their lifetime
2389         depends on other objects) and the ones that never participate in
2390         grouping (independent). V8 added support for marking persistent
2391         handles as independent so that the GC can process the objects they
2392         hold faster. The motivating use case here is typed arrays.
2393
2394         This patch adds V8-specific inherited IDL attribute
2395         V8DependentLifetime to types used in V8GCController, which is
2396         exactly the set of types with object lifetimes depending on other
2397         objects. The handles for the types that are not marked with the
2398         new attribute can be marked as independent and GC-ed faster.
2399
2400         * bindings/scripts/CodeGeneratorV8.pm: Added proccessing of the new attribute.
2401
2402         Updated test output:
2403         * bindings/scripts/test/V8/V8TestInterface.cpp:
2404         (WebCore::V8TestInterface::wrapSlow):
2405         * bindings/scripts/test/V8/V8TestInterface.h:
2406         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2407         (WebCore::V8TestMediaQueryListListener::wrapSlow):
2408         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2409         * bindings/scripts/test/V8/V8TestObj.cpp:
2410         (WebCore::V8TestObj::wrapSlow):
2411         * bindings/scripts/test/V8/V8TestObj.h:
2412         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2413         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
2414         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2415
2416         Added the new attribute:
2417         * css/CSSRule.idl:
2418         * css/CSSRuleList.idl:
2419         * css/CSSStyleDeclaration.idl:
2420         * css/CSSValue.idl:
2421         * css/StyleSheet.idl:
2422         * css/StyleSheetList.idl:
2423         * dom/DOMImplementation.idl:
2424         * dom/Node.idl:
2425
2426 2011-05-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2427
2428         Unreviewed, rolling out r87014, r87016, and r87017.
2429         http://trac.webkit.org/changeset/87014
2430         http://trac.webkit.org/changeset/87016
2431         http://trac.webkit.org/changeset/87017
2432         https://bugs.webkit.org/show_bug.cgi?id=61266
2433
2434         It made more tests assert (Requested by Ossy on #webkit).
2435
2436         * css/html.css:
2437         (input::-webkit-inner-spin-button):
2438         (input::-webkit-outer-spin-button):
2439         (input::-webkit-input-speech-button):
2440         * dom/Element.cpp:
2441         (WebCore::Element::recalcStyle):
2442         (WebCore::Element::isSpellCheckingEnabled):
2443         * dom/Node.cpp:
2444         * dom/Node.h:
2445         * dom/Position.cpp:
2446         (WebCore::Position::Position):
2447         (WebCore::Position::containerNode):
2448         (WebCore::Position::parentAnchoredEquivalent):
2449         (WebCore::Position::previous):
2450         (WebCore::Position::next):
2451         (WebCore::Position::parentEditingBoundary):
2452         (WebCore::Position::atStartOfTree):
2453         (WebCore::Position::atEndOfTree):
2454         * dom/Position.h:
2455         (WebCore::positionInParentBeforeNode):
2456         (WebCore::positionInParentAfterNode):
2457         * editing/CompositeEditCommand.cpp:
2458         (WebCore::CompositeEditCommand::insertNodeAfter):
2459         (WebCore::CompositeEditCommand::removeNode):
2460         * editing/Editor.cpp:
2461         (WebCore::Editor::findString):
2462         * editing/FrameSelection.cpp:
2463         (WebCore::FrameSelection::selectAll):
2464         * editing/FrameSelection.h:
2465         (WebCore::FrameSelection::shadowTreeRootNode):
2466         * editing/InsertParagraphSeparatorCommand.cpp:
2467         (WebCore::InsertParagraphSeparatorCommand::doApply):
2468         * editing/ReplaceSelectionCommand.cpp:
2469         (WebCore::ReplacementFragment::removeNode):
2470         (WebCore::ReplacementFragment::insertNodeBefore):
2471         * editing/VisibleSelection.cpp:
2472         (WebCore::VisibleSelection::isAll):
2473         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
2474         (WebCore::VisibleSelection::shadowTreeRootNode):
2475         * editing/VisibleSelection.h:
2476         * editing/htmlediting.cpp:
2477         (WebCore::visiblePositionBeforeNode):
2478         (WebCore::visiblePositionAfterNode):
2479         * html/HTMLInputElement.cpp:
2480         (WebCore::HTMLInputElement::create):
2481         (WebCore::HTMLInputElement::parseMappedAttribute):
2482         * html/HTMLInputElement.h:
2483         * html/HTMLIsIndexElement.cpp:
2484         (WebCore::HTMLIsIndexElement::create):
2485         * html/HTMLTextAreaElement.cpp:
2486         (WebCore::HTMLTextAreaElement::create):
2487         * html/HTMLTextAreaElement.h:
2488         * html/InputType.h:
2489         * html/SearchInputType.cpp:
2490         * html/SearchInputType.h:
2491         (WebCore::SearchInputType::SearchInputType):
2492         * html/TextFieldInputType.cpp:
2493         * html/TextFieldInputType.h:
2494         (WebCore::TextFieldInputType::TextFieldInputType):
2495         * html/shadow/TextControlInnerElements.cpp:
2496         (WebCore::TextControlInnerElement::TextControlInnerElement):
2497         (WebCore::TextControlInnerElement::create):
2498         (WebCore::TextControlInnerElement::attachInnerElement):
2499         (WebCore::TextControlInnerElement::detach):
2500         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
2501         (WebCore::TextControlInnerTextElement::create):
2502         (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
2503         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
2504         (WebCore::SearchFieldCancelButtonElement::detach):
2505         (WebCore::SpinButtonElement::SpinButtonElement):
2506         (WebCore::SpinButtonElement::create):
2507         (WebCore::SpinButtonElement::detach):
2508         (WebCore::SpinButtonElement::setHovered):
2509         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
2510         (WebCore::InputFieldSpeechButtonElement::create):
2511         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
2512         (WebCore::InputFieldSpeechButtonElement::detach):
2513         * html/shadow/TextControlInnerElements.h:
2514         * rendering/RenderTextControl.cpp:
2515         (WebCore::RenderTextControl::~RenderTextControl):
2516         (WebCore::RenderTextControl::styleDidChange):
2517         (WebCore::RenderTextControl::setInnerTextStyle):
2518         (WebCore::RenderTextControl::createSubtreeIfNeeded):
2519         (WebCore::RenderTextControl::textBlockWidth):
2520         (WebCore::RenderTextControl::updateFromElement):
2521         (WebCore::RenderTextControl::setInnerTextValue):
2522         (WebCore::RenderTextControl::hasVisibleTextArea):
2523         (WebCore::RenderTextControl::isSelectableElement):
2524         (WebCore::RenderTextControl::selection):
2525         (WebCore::RenderTextControl::visiblePositionForIndex):
2526         (WebCore::RenderTextControl::indexForVisiblePosition):
2527         (WebCore::RenderTextControl::text):
2528         (WebCore::RenderTextControl::textWithHardLineBreaks):
2529         (WebCore::RenderTextControl::computeLogicalHeight):
2530         (WebCore::RenderTextControl::hitInnerTextElement):
2531         (WebCore::RenderTextControl::forwardEvent):
2532         (WebCore::RenderTextControl::computePreferredLogicalWidths):
2533         (WebCore::RenderTextControl::innerTextElement):
2534         * rendering/RenderTextControl.h:
2535         * rendering/RenderTextControlMultiLine.cpp:
2536         (WebCore::RenderTextControlMultiLine::updateFromElement):
2537         * rendering/RenderTextControlMultiLine.h:
2538         * rendering/RenderTextControlSingleLine.cpp:
2539         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
2540         (WebCore::RenderTextControlSingleLine::textBaseStyle):
2541         (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
2542         (WebCore::RenderTextControlSingleLine::layout):
2543         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
2544         (WebCore::RenderTextControlSingleLine::forwardEvent):
2545         (WebCore::RenderTextControlSingleLine::styleDidChange):
2546         (WebCore::RenderTextControlSingleLine::hasControlClip):
2547         (WebCore::RenderTextControlSingleLine::controlClipRect):
2548         (WebCore::RenderTextControlSingleLine::textBlockWidth):
2549         (WebCore::RenderTextControlSingleLine::decorationWidthRight):
2550         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
2551         (WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight):
2552         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
2553         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
2554         (WebCore::RenderTextControlSingleLine::updateFromElement):
2555         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
2556         (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility):
2557         (WebCore::RenderTextControlSingleLine::clientPaddingLeft):
2558         (WebCore::RenderTextControlSingleLine::clientPaddingRight):
2559         (WebCore::RenderTextControlSingleLine::textBlockInsetTop):
2560         * rendering/RenderTextControlSingleLine.h:
2561
2562 2011-05-23  Syed Idris Shah  <syed.idris-shah@nokia.com>
2563
2564         Reviewed by Andreas Kling.
2565
2566         GraphicsContext3DInternal object should be called for getAttachedShaders.
2567         [Qt] fast/canvas/webgl/gl-object-get-calls.html crash for Qt based webkit
2568         https://bugs.webkit.org/show_bug.cgi?id=61202 
2569
2570         LayoutTests/fast/canvas/webgl/gl-object-get-calls.html
2571
2572         getAttachedShaders should be called on GraphicsContext3DInternal instance.
2573         It was left out by mistake.
2574
2575         * platform/graphics/qt/GraphicsContext3DQt.cpp: 
2576         (WebCore::GraphicsContext3D::getAttachedShaders): GraphicsContext3DInternal instance should be called.
2577
2578 2011-05-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2579
2580         Unreviewed. Strict PassOwnPtr build fix.
2581
2582         * platform/text/gtk/TextCodecGtk.cpp:
2583         (WebCore::newTextCodecGtk):
2584
2585 2011-05-23  Mikhail Naganov  <mnaganov@chromium.org>
2586
2587         Reviewed by Yury Semikhatsky.
2588
2589         Web Inspector: [Chromium] Show "Please wait" message during initial
2590         heap snapshot processing.
2591         https://bugs.webkit.org/show_bug.cgi?id=61040
2592
2593         * inspector/front-end/DetailedHeapshotView.js:
2594         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged.sort):
2595         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
2596         (WebInspector.DetailedHeapshotView.profileCallback):
2597         (WebInspector.DetailedHeapshotView.setDataSource):
2598         (WebInspector.DetailedHeapshotView):
2599         (WebInspector.DetailedHeapshotView.prototype._changeBase.baseProfileLoaded):
2600         (WebInspector.DetailedHeapshotView.prototype._changeBase.setDataSource):
2601         (WebInspector.DetailedHeapshotView.prototype._changeBase):
2602         (WebInspector.DetailedHeapshotView.prototype._changeView.setDataSource):
2603         (WebInspector.DetailedHeapshotView.prototype._changeView):
2604         * inspector/front-end/PleaseWaitMessage.js:
2605         (WebInspector.PleaseWaitMessage.prototype.showAndWaitFor):
2606
2607 2011-05-23  Adam Barth  <abarth@webkit.org>
2608
2609         Strict PassOwnPtr build fixes.
2610
2611         * platform/gtk/GeolocationServiceGtk.cpp:
2612         (WebCore::GeolocationServiceGtk::create):
2613         * platform/gtk/RenderThemeGtk.cpp:
2614         (WebCore::RenderThemeGtk::adjustSliderTrackStyle):
2615         (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
2616         (WebCore::RenderThemeGtk::adjustProgressBarStyle):
2617
2618 2011-05-22  Adam Barth  <abarth@webkit.org>
2619
2620         Strict PassOwnPtr build fix.
2621
2622         * platform/efl/RenderThemeEfl.cpp:
2623         (WebCore::RenderThemeEfl::adjustProgressBarStyle):
2624
2625 2011-05-22  Andrew Wason  <rectalogic@rectalogic.com>
2626
2627         Reviewed by Benjamin Poulain.
2628
2629         [Qt] Implement toImageData() in QtWebKit Bridge
2630         https://bugs.webkit.org/show_bug.cgi?id=60897
2631
2632         Tests are in WebKit/qt/tests/hybridPixmap
2633
2634         * bridge/qt/qt_pixmapruntime.cpp:
2635         (JSC::Bindings::QtPixmapToImageDataMethod::name):
2636         (JSC::Bindings::QtPixmapToImageDataMethod::invoke):
2637         (JSC::Bindings::QtPixmapToImageDataMethod::copyPixels):
2638         (JSC::Bindings::QtPixmapClass::methodsNamed):
2639         (JSC::Bindings::QtPixmapInstance::getPropertyNames):
2640          Add toImageData() to Qt Bridge, alternative to
2641          assignToHTMLImageElement().
2642
2643 2011-05-22  Dominic Cooney  <dominicc@chromium.org>
2644
2645         Reviewed by Dimitri Glazkov.
2646
2647         When removing a shadow root, also remove it from the render tree.
2648         https://bugs.webkit.org/show_bug.cgi?id=61245
2649
2650         Test: existing fast/dom/shadow/layout-tests-can-access-shadow.html
2651
2652         * dom/Element.cpp:
2653         (WebCore::Element::removeShadowRoot): Call detach if attached.
2654
2655 2011-05-22  Dirk Schulze  <krit@webkit.org>
2656
2657         Reviewed by Nikolas Zimmermann.
2658
2659         Don't do manually style resolution for SVGElements with renderer
2660         https://bugs.webkit.org/show_bug.cgi?id=59176
2661
2662         General clean-up.
2663
2664         Don't resolve style manually, instead ask the RenderObject for its style.
2665
2666         Cleanup svgattrs.in, some SVG element names were accidently listed there as attributes.
2667
2668         No new tests needed. No change of behavior.
2669
2670         * svg/SVGFEDiffuseLightingElement.cpp:
2671         (WebCore::SVGFEDiffuseLightingElement::build):
2672         * svg/SVGFEDropShadowElement.cpp:
2673         (WebCore::SVGFEDropShadowElement::build):
2674         * svg/SVGFEFloodElement.cpp:
2675         (WebCore::SVGFEFloodElement::build):
2676         * svg/SVGFESpecularLightingElement.cpp:
2677         (WebCore::SVGFESpecularLightingElement::build):
2678         * svg/svgattrs.in:
2679
2680 2011-05-21  Dirk Schulze  <krit@webkit.org>
2681
2682         Reviewed by Darin Adler.
2683
2684         REGRESSION(r66731): pointer-events are broken in some cases
2685         https://bugs.webkit.org/show_bug.cgi?id=45467
2686
2687         The SVGSVGElement shouldn't be the target of a mouse event, if its pointer-events attribute is set
2688         to 'none'. This matches the behavior on Firefox where an embedded SVG element is the target of an event,
2689         if none of its childs caught the event. This is the case for all pointer-events other than 'none'.
2690
2691         Tests: svg/custom/pointer-events-on-svg-with-pointer.xhtml
2692                svg/custom/pointer-events-on-svg-without-pointer.xhtml
2693
2694         * rendering/svg/RenderSVGRoot.cpp:
2695         (WebCore::RenderSVGRoot::nodeAtPoint):
2696
2697 2011-05-21  Dan Bernstein  <mitz@apple.com>
2698
2699         Reviewed by Darin Adler.
2700
2701         <rdar://problem/9479926> REGRESSION (r82144): Icon overlaps text in Twitter message dialog
2702         https://bugs.webkit.org/show_bug.cgi?id=61241
2703
2704         Test: fast/block/positioning/start-ignoring-before.html
2705
2706         * rendering/RenderBlockLineLayout.cpp:
2707         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): Added a boolean parameter saying
2708         whether to merge the first trailing space with the line break.
2709         (WebCore::RenderBlock::LineBreaker::nextLineBreak): When adding a midpoint behind the current
2710         character, account for trailing positioned objects that occurred after the midpoint by calling
2711         updateMidpointsForTrailingBoxes(), which adds midpoints for them.
2712
2713 2011-05-21  Jeremy Noble  <jer.noble@apple.com>
2714
2715         Reviewed by Eric Carlson.
2716
2717         WebKit2: fix failing fullscreen/full-screen-remove* tests.
2718         https://bugs.webkit.org/show_bug.cgi?id=61027
2719
2720         * dom/Document.cpp:
2721         (WebCore::Document::fullScreenChangeDelayTimerFired): dispatchEvent can be
2722             synchronous, so make sure to check whether the current element is
2723             in the DOM before dispatching.
2724
2725 2011-05-21  Gavin Peters  <gavinp@chromium.org>
2726
2727         Reviewed by Adam Barth.
2728
2729         Add rel type prerender to distinguish prerender from prefetch
2730         https://bugs.webkit.org/show_bug.cgi?id=61079
2731
2732         Chrome right now uses <link rel=prefetch ...> for one of two things,
2733         to warm the cache in the same way as firefox, or to launch a speculative
2734         rendering of a web page, for faster "loading" when the user navigates to it.
2735
2736         This new rel type will let us distinguish the two cases; the rel type prerender
2737         isn't used on the web today, but the Google Web Search example prerendering application
2738         is ready to experiment with it.
2739
2740         Test: fast/dom/HTMLLinkElement/prerender.html
2741
2742         * html/HTMLLinkElement.cpp:
2743         (WebCore::HTMLLinkElement::tokenizeRelAttribute):
2744         (WebCore::HTMLLinkElement::process):
2745         * html/HTMLLinkElement.h:
2746         (WebCore::HTMLLinkElement::RelAttribute::RelAttribute):
2747         * loader/cache/CachedResource.cpp:
2748         (WebCore::defaultPriorityForResourceType):
2749         * loader/cache/CachedResource.h:
2750         (WebCore::CachedResource::isLinkResource):
2751         * loader/cache/CachedResourceLoader.cpp:
2752         (WebCore::createResource):
2753         (WebCore::CachedResourceLoader::requestLinkResource):
2754         (WebCore::CachedResourceLoader::canRequest):
2755         * loader/cache/CachedResourceLoader.h:
2756         * loader/cache/CachedResourceRequest.cpp:
2757         (WebCore::cachedResourceTypeToTargetType):
2758         (WebCore::CachedResourceRequest::load):
2759         * platform/network/ResourceRequestBase.h:
2760
2761 2011-05-21  Emil A Eklund  <eae@chromium.org>
2762
2763         Reviewed by Eric Seidel.
2764
2765         Change RenderLineBoxList::hitTest to use IntPoint
2766         https://bugs.webkit.org/show_bug.cgi?id=61156
2767
2768         Change the RenderLineBoxList hit testing to use IntPoint and clean up the rect calculation.
2769
2770         Covered by existing tests.
2771
2772         * rendering/RenderBlock.cpp:
2773         (WebCore::RenderBlock::hitTestContents):
2774         * rendering/RenderInline.cpp:
2775         (WebCore::RenderInline::nodeAtPoint):
2776         * rendering/RenderLineBoxList.cpp:
2777         (WebCore::RenderLineBoxList::hitTest):
2778         * rendering/RenderLineBoxList.h:
2779
2780 2011-05-21  Emil A Eklund  <eae@chromium.org>
2781
2782         Reviewed by Eric Seidel.
2783
2784         Change HitTestResult to use IntPoint
2785         https://bugs.webkit.org/show_bug.cgi?id=61230
2786
2787         Covered by existing tests.
2788
2789         * rendering/EllipsisBox.cpp:
2790         (WebCore::EllipsisBox::nodeAtPoint):
2791         * rendering/HitTestResult.cpp:
2792         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
2793         * rendering/HitTestResult.h:
2794         (WebCore::HitTestResult::isRectBasedTest):
2795         * rendering/InlineFlowBox.cpp:
2796         (WebCore::InlineFlowBox::nodeAtPoint):
2797         * rendering/InlineTextBox.cpp:
2798         (WebCore::InlineTextBox::nodeAtPoint):
2799         * rendering/RenderBlock.cpp:
2800         (WebCore::RenderBlock::nodeAtPoint):
2801         (WebCore::RenderBlock::hitTestColumns):
2802         * rendering/RenderBox.cpp:
2803         (WebCore::RenderBox::nodeAtPoint):
2804         * rendering/RenderTable.cpp:
2805         (WebCore::RenderTable::nodeAtPoint):
2806         * rendering/svg/RenderSVGRoot.cpp:
2807         (WebCore::RenderSVGRoot::nodeAtPoint):
2808
2809 2011-05-21  Jochen Eisinger  <jochen@chromium.org>
2810
2811         Reviewed by Darin Fisher.
2812
2813         [chromium] add extraData field to resource requests
2814         https://bugs.webkit.org/show_bug.cgi?id=61033
2815
2816         * platform/network/chromium/ResourceRequest.h:
2817         (WebCore::ResourceRequest::ExtraData::~ExtraData):
2818         (WebCore::ResourceRequest::extraData):
2819         (WebCore::ResourceRequest::setExtraData):
2820
2821 2011-05-21  Kent Tamura  <tkent@chromium.org>
2822
2823         Reviewed by Dimitri Glazkov.
2824
2825         Change text-based <input> types to the new shadow DOM model
2826         https://bugs.webkit.org/show_bug.cgi?id=54179
2827
2828         By this change, text field inputs and textareas have one extra
2829         shadow node at the root of shadow trees.
2830         e.g. Before the change:
2831           <textarea> --(shadow-connection)-- <div> -- ...
2832         After the change:
2833           <textarea> --(shadow-connection)-- {#shadow-root} -- <div> -- ...
2834
2835         The goals of this change are
2836         - Change to the new shadow DOM model, and
2837         - Minimize the patch size.
2838
2839         We should use shadowPseudoId() in the new shadow DOM model, but the
2840         shadow elements in this patch don't use it in order to reduce the patch
2841         size.
2842
2843         * css/html.css:
2844         (input::-webkit-inner-spin-button):
2845          Add vertical-align in order to avoid the button affect the baseline.
2846         (input::-webkit-outer-spin-button): ditto.
2847         (input::-webkit-input-speech-button): ditto.
2848         * dom/Element.cpp:
2849         (WebCore::Element::recalcStyle): Calls styleForRenderer() so that a
2850          subclass of Element can override it.
2851         (WebCore::Element::isSpellCheckingEnabled):
2852         Handle ShadowRoot, which is not an Element.
2853         * dom/Node.cpp:
2854           Add utility functions for editing code.
2855         (WebCore::Node::nonBoundaryShadowTreeRootNode):
2856         (WebCore::Node::nonShadowBoundaryParentNode):
2857         * dom/Node.h: Declare them.
2858         * dom/Position.cpp:
2859          - Add some assertions about ShadowRoot
2860          - Replace parentNode() with nonShadowBoundaryParentNode()
2861         Because input/textarea shadow structures are changed.
2862         (WebCore::Position::Position):
2863         (WebCore::Position::containerNode):
2864         (WebCore::Position::parentAnchoredEquivalent):
2865         (WebCore::Position::previous):
2866         (WebCore::Position::next):
2867         (WebCore::Position::parentEditingBoundary):
2868         (WebCore::Position::atStartOfTree):
2869         (WebCore::Position::atEndOfTree):
2870         * dom/Position.h: ditto.
2871         (WebCore::positionInParentBeforeNode):
2872         (WebCore::positionInParentAfterNode):
2873         * editing/CompositeEditCommand.cpp: ditto.
2874         (WebCore::CompositeEditCommand::insertNodeAfter):
2875         (WebCore::CompositeEditCommand::removeNode):
2876         * editing/Editor.cpp:
2877         (WebCore::Editor::findString): ditto.
2878         * editing/FrameSelection.cpp:
2879         (WebCore::FrameSelection::selectAll): Inline shadowTreeRootNode() calls.
2880         * editing/FrameSelection.h:
2881           Remove shadowTreeRootNode(). It is used only by FrameSelection::selectAll().
2882         * editing/InsertParagraphSeparatorCommand.cpp:
2883         (WebCore::InsertParagraphSeparatorCommand::doApply): Use nonShadowBoundaryParentNode()
2884         * editing/ReplaceSelectionCommand.cpp:
2885         (WebCore::ReplacementFragment::removeNode): ditto.
2886         (WebCore::ReplacementFragment::insertNodeBefore): ditto.
2887         * editing/VisibleSelection.cpp:
2888           Rename shadowTreeRootNode() to nonBoundaryShadowTreeRootNode(), and it reutrns
2889           a child node of ShadowRoot.
2890         (WebCore::VisibleSelection::isAll):
2891         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
2892         (WebCore::VisibleSelection::nonBoundaryShadowTreeRootNode):
2893         * editing/VisibleSelection.h: ditto.
2894         * editing/htmlediting.cpp: Add assertions.
2895         (WebCore::visiblePositionBeforeNode):
2896         (WebCore::visiblePositionAfterNode):
2897         * html/HTMLInputElement.cpp:
2898         (WebCore::HTMLInputElement::create): Calls createShadowSubtree().
2899         (WebCore::HTMLInputElement::createShadowSubtree):
2900           Calls InputType::createShadowSubTree().
2901         (WebCore::HTMLInputElement::innerTextElement):
2902           Accessor of a shadow node. This is used by RenderTextControlSingleLine.
2903         (WebCore::HTMLInputElement::innerBlockElement): ditto.
2904         (WebCore::HTMLInputElement::innerSpinButtonElement): ditto.
2905         (WebCore::HTMLInputElement::outerSpinButtonElement): ditto.
2906         (WebCore::HTMLInputElement::resultsButtonElement): ditto.
2907         (WebCore::HTMLInputElement::cancelButtonElement): ditto.
2908         (WebCore::HTMLInputElement::speechButtonElement): ditto.
2909         (WebCore::HTMLInputElement::parseMappedAttribute):
2910           Rebuild shadow trees because x-webkit-speech attribute affects it.
2911         * html/HTMLInputElement.h: Add declarations.
2912         * html/HTMLIsIndexElement.cpp:
2913         (WebCore::HTMLIsIndexElement::create): Calls createShadowSubtree().
2914         * html/HTMLTextAreaElement.cpp:
2915         (WebCore::HTMLTextAreaElement::create): Calls createShadowSubtree().
2916         (WebCore::HTMLTextAreaElement::createShadowSubtree): Added.
2917         * html/HTMLTextAreaElement.h: Declare createShadowSubtree().
2918         * html/InputType.h: Add default implementations of accessors.
2919         (WebCore::InputType::innerBlockElement):
2920         (WebCore::InputType::innerTextElement):
2921         (WebCore::InputType::innerSpinButtonElement):
2922         (WebCore::InputType::outerSpinButtonElement):
2923         (WebCore::InputType::resultsButtonElement):
2924         (WebCore::InputType::cancelButtonElement):
2925         (WebCore::InputType::speechButtonElement):
2926         * html/SearchInputType.cpp:
2927         (WebCore::SearchInputType::SearchInputType): Initializes new data members.
2928         (WebCore::SearchInputType::createShadowSubtree):
2929           Moved from RenderTextControlSingleLine.
2930         (WebCore::SearchInputType::destroyShadowSubtree): Clear element references.
2931         * html/SearchInputType.h: Add declarations.
2932         (WebCore::SearchInputType::innerBlockElement):
2933         (WebCore::SearchInputType::resultsButtonElement):
2934         (WebCore::SearchInputType::cancelButtonElement):
2935         * html/TextFieldInputType.cpp:
2936         (WebCore::TextFieldInputType::TextFieldInputType):
2937           Initializes new data members.
2938         (WebCore::TextFieldInputType::createShadowSubtree):
2939           Moved from RenderTextControlSingleLine.
2940         (WebCore::TextFieldInputType::destroyShadowSubtree): Clear element references.
2941         * html/TextFieldInputType.h: Add declarations.
2942         (WebCore::TextFieldInputType::innerTextElement):
2943         (WebCore::TextFieldInputType::innerSpinButtonElement):
2944         (WebCore::TextFieldInputType::outerSpinButtonElement):
2945         (WebCore::TextFieldInputType::speechButtonElement):
2946         (WebCore::TextFieldInputType::setInnerTextElement):
2947         (WebCore::TextFieldInputType::setSpeechButtonElement):
2948         * html/shadow/TextControlInnerElements.cpp:
2949         (WebCore::TextControlInnerElement::TextControlInnerElement):
2950           Remove shadowParent parameter. It is unnecessary because we switch to
2951           new shadow model.
2952         (WebCore::TextControlInnerElement::create):
2953           Change the parameter type to Document.
2954         (WebCore::TextControlInnerElement::styleForRenderer):
2955           Override this in order to set style by
2956           RenderTextControlSingleLine::createInnerBlockStyle().
2957         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
2958           Remove shadowParent parameter.
2959           Inherit HTMLDivElement, not TextControlInnerElement.
2960         (WebCore::TextControlInnerTextElement::create): Remove shadowParent parameter.
2961         (WebCore::TextControlInnerTextElement::styleForRenderer):
2962           Override this in order to set style by
2963           RenderTextControlSingleLine::createInnerTextStyle().
2964         (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
2965           Inherit HTMLDivElement, not TextControlInnerElement.
2966         (WebCore::SearchFieldResultsButtonElement::styleForRenderer):
2967           Override this in order to set style by
2968           RenderTextControlSingleLine::createResultButtonStyle().
2969         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
2970           Inherit HTMLDivElement, not TextControlInnerElement.
2971         (WebCore::SearchFieldCancelButtonElement::styleForRenderer):
2972           Override this in order to set style by
2973           RenderTextControlSingleLine::createCancelButtonStyle().
2974         (WebCore::SearchFieldCancelButtonElement::detach):
2975           Update for the parent class change.
2976         (WebCore::SpinButtonElement::SpinButtonElement):
2977           - Change the parameter type: shadowParent -> Document
2978           - Add the inner flag
2979           - Inherit HTMLDivElement, not TextControlInnerElement.
2980         (WebCore::SpinButtonElement::createInner): Introduce a new factory
2981           method to hide a bool parameter of the constructor.
2982         (WebCore::SpinButtonElement::createOuter): ditto.
2983         (WebCore::SpinButtonElement::styleForRenderer):
2984           Override this in order to set style by
2985           RenderTextControlSingleLine::createInnerSpinButtonStyle() or
2986           createOuterSpinButtonStyle().
2987         (WebCore::SpinButtonElement::detach): Update for the parent class change.
2988         (WebCore::SpinButtonElement::setHovered): ditto.
2989         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
2990           - Change the parameter type: shadowParent -> Document
2991           - Inherit HTMLDivElement, not TextControlInnerElement.
2992           - Do not register this as a speech input listener here.
2993         (WebCore::InputFieldSpeechButtonElement::create):
2994           Update for the parameter change.
2995         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
2996           Do not handle click event if listener registration is not done.
2997         (WebCore::InputFieldSpeechButtonElement::attach):
2998           Register this as a speech input listener.
2999         (WebCore::InputFieldSpeechButtonElement::detach):
3000           Update for the parent class change.
3001         (WebCore::InputFieldSpeechButtonElement::styleForRenderer):
3002           Override this in order to set style by
3003           RenderTextControlSingleLine::createSpeechButtonStyle().
3004         * html/shadow/TextControlInnerElements.h:
3005         (WebCore::TextControlInnerTextElement::isMouseFocusable):
3006           Add this because the class is not a subclass of TextControllInnerElement.
3007         (WebCore::SearchFieldResultsButtonElement::isMouseFocusable): ditto.
3008         (WebCore::SearchFieldCancelButtonElement::isMouseFocusable): ditto.
3009         (WebCore::SpinButtonElement::isMouseFocusable): ditto.
3010         (WebCore::InputFieldSpeechButtonElement::isMouseFocusable): ditto.
3011         * rendering/RenderTextControl.cpp:
3012         (WebCore::RenderTextControl::~RenderTextControl): Remove unnecessary code.
3013         (WebCore::RenderTextControl::styleDidChange):
3014           innerTextElement can have no renderer.
3015           Explicitly call setNeedsStyleRecals() for innerTextElement. It is
3016           needed for LayoutTests/editing/selection/select-across-readonly-input-*.html.
3017         (WebCore::RenderTextControl::textBlockWidth): Member data -> function
3018         (WebCore::RenderTextControl::updateFromElement): ditto.
3019         (WebCore::RenderTextControl::setInnerTextValue): ditto.
3020         (WebCore::RenderTextControl::hasVisibleTextArea): ditto.
3021         (WebCore::RenderTextControl::isSelectableElement): ditto.
3022         (WebCore::RenderTextControl::selection): ditto.
3023         (WebCore::RenderTextControl::visiblePositionForIndex): ditto.
3024         (WebCore::RenderTextControl::indexForVisiblePosition): ditto.
3025         (WebCore::RenderTextControl::text): ditto.
3026         (WebCore::RenderTextControl::textWithHardLineBreaks): ditto.
3027         (WebCore::RenderTextControl::computeLogicalHeight): ditto.
3028         (WebCore::RenderTextControl::hitInnerTextElement): ditto.
3029         (WebCore::RenderTextControl::forwardEvent): ditto.
3030         (WebCore::RenderTextControl::computePreferredLogicalWidths): ditto.
3031         * rendering/RenderTextControl.h:
3032           - Make m_innerText virtual function.
3033           - Make createInnerTextStyle() public in order that
3034             TextControlInnerElements can call it.
3035         * rendering/RenderTextControlMultiLine.cpp:
3036         (WebCore::RenderTextControlMultiLine::innerTextElement): Added.
3037         (WebCore::RenderTextControlMultiLine::updateFromElement):
3038           Remove unnecessary createSubtreeIfNeeded() call.
3039         * rendering/RenderTextControlMultiLine.h: Add a declaration.
3040         * rendering/RenderTextControlSingleLine.cpp:
3041         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
3042           Remove unnecessary code.
3043         (WebCore::RenderTextControlSingleLine::innerTextElement): Added.
3044         (WebCore::RenderTextControlSingleLine::innerBlockElement): Added.
3045         (WebCore::RenderTextControlSingleLine::innerSpinButtonElement): Added.
3046         (WebCore::RenderTextControlSingleLine::outerSpinButtonElement): Added.
3047         (WebCore::RenderTextControlSingleLine::resultsButtonElement): Added.
3048         (WebCore::RenderTextControlSingleLine::cancelButtonElement): Added.
3049         (WebCore::RenderTextControlSingleLine::speechButtonElement): Added.
3050         (WebCore::RenderTextControlSingleLine::textBaseStyle): Data member -> function
3051         (WebCore::RenderTextControlSingleLine::subtreeHasChanged): ditto.
3052         (WebCore::RenderTextControlSingleLine::layout): ditto.
3053         (WebCore::RenderTextControlSingleLine::nodeAtPoint): ditto.
3054         (WebCore::RenderTextControlSingleLine::forwardEvent): ditto.
3055         (WebCore::RenderTextControlSingleLine::styleDidChange): ditto.
3056         (WebCore::RenderTextControlSingleLine::hasControlClip): ditto.
3057         (WebCore::RenderTextControlSingleLine::controlClipRect): ditto.
3058         (WebCore::RenderTextControlSingleLine::textBlockWidth): ditto.
3059         (WebCore::RenderTextControlSingleLine::decorationWidthRight): ditto.
3060         (WebCore::RenderTextControlSingleLine::preferredContentWidth): ditto.
3061         (WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight): ditto.
3062         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight): ditto.
3063         (WebCore::RenderTextControlSingleLine::updateFromElement):
3064           ditto, and remove unnecessary createSubtreeIfNeeded() call.
3065         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
3066           Data member -> function
3067         (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility): ditto.
3068         (WebCore::RenderTextControlSingleLine::clientPaddingLeft): ditto.
3069         (WebCore::RenderTextControlSingleLine::clientPaddingRight): ditto.
3070         (WebCore::RenderTextControlSingleLine::textBlockInsetTop): ditto.
3071         * rendering/RenderTextControlSingleLine.h:
3072           Add declarations, and remove unnecessary data members.
3073
3074 2011-05-21  Chris Rogers  <crogers@google.com>
3075
3076         Reviewed by Kenneth Russell.
3077
3078         AudioBufferSourceNode noteOff() method must respect scheduling time
3079         https://bugs.webkit.org/show_bug.cgi?id=61226
3080
3081         No new tests since audio API is not yet implemented.
3082
3083         * webaudio/AudioBufferSourceNode.cpp:
3084         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
3085         (WebCore::AudioBufferSourceNode::process):
3086         (WebCore::AudioBufferSourceNode::provideInput):
3087         (WebCore::AudioBufferSourceNode::finish):
3088         (WebCore::AudioBufferSourceNode::noteGrainOn):
3089         (WebCore::AudioBufferSourceNode::noteOff):
3090         * webaudio/AudioBufferSourceNode.h:
3091
3092 2011-05-20  Dirk Schulze  <krit@webkit.org>
3093
3094         Reviewed by Nikolas Zimmermann.
3095
3096         Share more code in PathTraversalState
3097         https://bugs.webkit.org/show_bug.cgi?id=61238
3098
3099         Share more code between SVGPathTraversalStateBuilder and Path in PathTraversalState.
3100
3101         No change in functionality, so no new tests.
3102
3103         * platform/graphics/Path.cpp:
3104         (WebCore::pathLengthApplierFunction):
3105         * platform/graphics/PathTraversalState.cpp:
3106         (WebCore::PathTraversalState::processSegment):
3107         * platform/graphics/PathTraversalState.h:
3108         * svg/SVGPathTraversalStateBuilder.cpp:
3109         (WebCore::SVGPathTraversalStateBuilder::continueConsuming):
3110
3111 2011-05-21  Nikolas Zimmermann  <nzimmermann@rim.com>
3112
3113         Reviewed by Rob Buis.
3114
3115         SVG svgAttributeChanged/synchronizeProperty/parseMappedAttribute should be optimized
3116         https://bugs.webkit.org/show_bug.cgi?id=61183
3117
3118         Example: rect.x.baseVal.value = 100;
3119         What happens: SVGRectElement::svgAttributeChanged(const QualifiedName& attrName) is invoked with "SVGNames::rectAttr" as parameter.
3120
3121         void SVGRectElement::svgAttributeChanged(const QualifiedName& attrName)
3122         {
3123             SVGStyledTransformableElement::svgAttributeChanged(attrName);
3124             // Handle my own attribute changes...
3125         }
3126
3127         Currently we always traverse the base class hierarchy, when invoking svgAttributeChanged. Every svgAttributeChanged call from a class
3128         like SVGRectElement has to reach the base class SVGStyledElement::svgAttributeChanged, as it handles invalidation of the instances of
3129         an element. Say that a <rect> is referenced by a <use> and we change the 'x' attribute of the <rect>, then SVGStyledElement::svgAttributeChanged,
3130         calls SVGElementInstance::invalidateAllInstancesOfElement(this), so that the <use> can rebuild its shadow tree...
3131         That's the only reason all svgAttributeChanged implementations call the base class immediately, so SVGStyledElement is always reached.
3132
3133         Switch to a more efficient pattern, by providing a "bool isSupportedAttribute(const QualifiedName&);" function for all SVG*Elements.
3134         It contains all attributes the particular SVG*Element class handles (but not its parent classes attributes). For example SVGRectElement
3135         contains x/y/width/height/rx/ry attributes, and the ones from SVGTests/SVGLangSpace/SVGExternalResourcesRequired (xml:space/lang, etc.),
3136         but not eg. transform as that's handled by the parent class SVGStyledTransformableElement.
3137
3138         void SVGRectElement::svgAttributeChanged(const QualifiedName& attrName)
3139         {
3140             if (!isSupportedAttribute.contains(attrName)) {
3141                 SVGStyledTransformableElement::svgAttributeChanged(attrName);
3142                 return;
3143             }
3144
3145             // When we get here, we know for sure it's one of our attributes that has changed.
3146             // Note for eg. SVGNames::transformAttr, the call from SVGRectElement::svgAttributeChanged, would be immediately forwarded to the base class, which handles transformAttr changes)
3147
3148             if (attrName == SVGNames::xAttr) { do_work(); return; }
3149             if (attrName == SVGNames::yAttr) { do_work(); return; }
3150             ...
3151             // Assure that we handled all properties we claim support for in "isSupportedAttribute()".
3152             ASSERT_NOT_REACHED();
3153         }
3154
3155         Exactly the same pattern can be applied to synchronizeProperty and parseMappedAttribute to speed them up as well.
3156
3157         Add "SVGElementInstance::InvalidationGuard guard(this)" statements in all svgAttributeChanged implementations, that calls invalidateAllInstancesOfElement(this)
3158         upon destruction, after we've reacted to the svg attribute change. This assures we never forget to call the invalidation method anywhere, and don't
3159         need to rely on the base class svgAttributeChanged() call to do it.
3160        
3161         It's a slight overal performance progression.
3162
3163         * svg/SVGAElement.cpp:
3164         (WebCore::SVGAElement::isSupportedAttribute):
3165         (WebCore::SVGAElement::parseMappedAttribute):
3166         (WebCore::SVGAElement::svgAttributeChanged):
3167         (WebCore::SVGAElement::synchronizeProperty):
3168         * svg/SVGAElement.h:
3169         * svg/SVGAnimateMotionElement.cpp:
3170         (WebCore::SVGAnimateMotionElement::isSupportedAttribute):
3171         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
3172         * svg/SVGAnimateMotionElement.h:
3173         * svg/SVGAnimateTransformElement.cpp:
3174         (WebCore::SVGAnimateTransformElement::isSupportedAttribute):
3175         (WebCore::SVGAnimateTransformElement::parseMappedAttribute):
3176         * svg/SVGAnimateTransformElement.h:
3177         * svg/SVGAnimationElement.cpp:
3178         (WebCore::SVGAnimationElement::isSupportedAttribute):
3179         (WebCore::SVGAnimationElement::parseMappedAttribute):
3180         * svg/SVGAnimationElement.h:
3181         * svg/SVGCircleElement.cpp:
3182         (WebCore::SVGCircleElement::isSupportedAttribute):
3183         (WebCore::SVGCircleElement::parseMappedAttribute):
3184         (WebCore::SVGCircleElement::svgAttributeChanged):
3185         (WebCore::SVGCircleElement::synchronizeProperty):
3186         * svg/SVGCircleElement.h:
3187         * svg/SVGClipPathElement.cpp:
3188         (WebCore::SVGClipPathElement::isSupportedAttribute):
3189         (WebCore::SVGClipPathElement::parseMappedAttribute):
3190         (WebCore::SVGClipPathElement::svgAttributeChanged):
3191         (WebCore::SVGClipPathElement::synchronizeProperty):
3192         * svg/SVGClipPathElement.h:
3193         * svg/SVGComponentTransferFunctionElement.cpp:
3194         (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
3195         (WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute):
3196         (WebCore::SVGComponentTransferFunctionElement::synchronizeProperty):
3197         * svg/SVGComponentTransferFunctionElement.h:
3198         * svg/SVGCursorElement.cpp:
3199         (WebCore::SVGCursorElement::isSupportedAttribute):
3200         (WebCore::SVGCursorElement::parseMappedAttribute):
3201         (WebCore::SVGCursorElement::svgAttributeChanged):
3202         (WebCore::SVGCursorElement::synchronizeProperty):
3203         * svg/SVGCursorElement.h:
3204         * svg/SVGElementInstance.h:
3205         (WebCore::SVGElementInstance::InvalidationGuard::InvalidationGuard):
3206         (WebCore::SVGElementInstance::InvalidationGuard::~InvalidationGuard):
3207         * svg/SVGEllipseElement.cpp:
3208         (WebCore::SVGEllipseElement::isSupportedAttribute):
3209         (WebCore::SVGEllipseElement::parseMappedAttribute):
3210         (WebCore::SVGEllipseElement::svgAttributeChanged):
3211         (WebCore::SVGEllipseElement::synchronizeProperty):
3212         * svg/SVGEllipseElement.h:
3213         * svg/SVGExternalResourcesRequired.cpp:
3214         (WebCore::SVGExternalResourcesRequired::addSupportedAttributes):
3215         * svg/SVGExternalResourcesRequired.h:
3216         * svg/SVGFEBlendElement.cpp:
3217         (WebCore::SVGFEBlendElement::isSupportedAttribute):
3218         (WebCore::SVGFEBlendElement::parseMappedAttribute):
3219         (WebCore::SVGFEBlendElement::svgAttributeChanged):
3220         (WebCore::SVGFEBlendElement::synchronizeProperty):
3221         * svg/SVGFEBlendElement.h:
3222         * svg/SVGFEColorMatrixElement.cpp:
3223         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
3224         (WebCore::SVGFEColorMatrixElement::parseMappedAttribute):
3225         (WebCore::SVGFEColorMatrixElement::svgAttributeChanged):
3226         (WebCore::SVGFEColorMatrixElement::synchronizeProperty):
3227         * svg/SVGFEColorMatrixElement.h:
3228         * svg/SVGFEComponentTransferElement.cpp:
3229         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
3230         (WebCore::SVGFEComponentTransferElement::parseMappedAttribute):
3231         (WebCore::SVGFEComponentTransferElement::synchronizeProperty):
3232         * svg/SVGFEComponentTransferElement.h:
3233         * svg/SVGFECompositeElement.cpp:
3234         (WebCore::SVGFECompositeElement::isSupportedAttribute):
3235         (WebCore::SVGFECompositeElement::parseMappedAttribute):
3236         (WebCore::SVGFECompositeElement::svgAttributeChanged):
3237         (WebCore::SVGFECompositeElement::synchronizeProperty):
3238         * svg/SVGFECompositeElement.h:
3239         * svg/SVGFEConvolveMatrixElement.cpp:
3240         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
3241         (WebCore::SVGFEConvolveMatrixElement::parseMappedAttribute):
3242         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged):
3243         (WebCore::SVGFEConvolveMatrixElement::synchronizeProperty):
3244         * svg/SVGFEConvolveMatrixElement.h:
3245         * svg/SVGFEDiffuseLightingElement.cpp:
3246         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
3247         (WebCore::SVGFEDiffuseLightingElement::parseMappedAttribute):
3248         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):
3249         (WebCore::SVGFEDiffuseLightingElement::synchronizeProperty):
3250         * svg/SVGFEDiffuseLightingElement.h:
3251         * svg/SVGFEDisplacementMapElement.cpp:
3252         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
3253         (WebCore::SVGFEDisplacementMapElement::parseMappedAttribute):
3254         (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged):
3255         (WebCore::SVGFEDisplacementMapElement::synchronizeProperty):
3256         * svg/SVGFEDisplacementMapElement.h:
3257         * svg/SVGFEDropShadowElement.cpp:
3258         (WebCore::SVGFEDropShadowElement::isSupportedAttribute):
3259         (WebCore::SVGFEDropShadowElement::parseMappedAttribute):
3260         (WebCore::SVGFEDropShadowElement::svgAttributeChanged):
3261         (WebCore::SVGFEDropShadowElement::synchronizeProperty):
3262         * svg/SVGFEDropShadowElement.h:
3263         * svg/SVGFEGaussianBlurElement.cpp:
3264         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
3265         (WebCore::SVGFEGaussianBlurElement::parseMappedAttribute):
3266         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
3267         (WebCore::SVGFEGaussianBlurElement::synchronizeProperty):
3268         * svg/SVGFEGaussianBlurElement.h:
3269         * svg/SVGFEImageElement.cpp:
3270         (WebCore::SVGFEImageElement::isSupportedAttribute):
3271         (WebCore::SVGFEImageElement::parseMappedAttribute):
3272         (WebCore::SVGFEImageElement::svgAttributeChanged):
3273         (WebCore::SVGFEImageElement::synchronizeProperty):
3274         * svg/SVGFEImageElement.h:
3275         * svg/SVGFELightElement.cpp:
3276         (WebCore::SVGFELightElement::isSupportedAttribute):
3277         (WebCore::SVGFELightElement::parseMappedAttribute):
3278         (WebCore::SVGFELightElement::svgAttributeChanged):
3279         (WebCore::SVGFELightElement::synchronizeProperty):
3280         * svg/SVGFELightElement.h:
3281         * svg/SVGFEMergeNodeElement.cpp:
3282         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
3283         (WebCore::SVGFEMergeNodeElement::parseMappedAttribute):
3284         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged):
3285         (WebCore::SVGFEMergeNodeElement::synchronizeProperty):
3286         * svg/SVGFEMergeNodeElement.h:
3287         * svg/SVGFEMorphologyElement.cpp:
3288         (WebCore::SVGFEMorphologyElement::isSupportedAttribute):
3289         (WebCore::SVGFEMorphologyElement::parseMappedAttribute):
3290         (WebCore::SVGFEMorphologyElement::svgAttributeChanged):
3291         (WebCore::SVGFEMorphologyElement::synchronizeProperty):
3292         * svg/SVGFEMorphologyElement.h:
3293         * svg/SVGFEOffsetElement.cpp:
3294         (WebCore::SVGFEOffsetElement::isSupportedAttribute):
3295         (WebCore::SVGFEOffsetElement::parseMappedAttribute):
3296         (WebCore::SVGFEOffsetElement::svgAttributeChanged):
3297         (WebCore::SVGFEOffsetElement::synchronizeProperty):
3298         * svg/SVGFEOffsetElement.h:
3299         * svg/SVGFESpecularLightingElement.cpp:
3300         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
3301         (WebCore::SVGFESpecularLightingElement::parseMappedAttribute):
3302         (WebCore::SVGFESpecularLightingElement::svgAttributeChanged):
3303         (WebCore::SVGFESpecularLightingElement::synchronizeProperty):
3304         * svg/SVGFESpecularLightingElement.h:
3305         * svg/SVGFETileElement.cpp:
3306         (WebCore::SVGFETileElement::isSupportedAttribute):
3307         (WebCore::SVGFETileElement::parseMappedAttribute):
3308         (WebCore::SVGFETileElement::svgAttributeChanged):
3309         (WebCore::SVGFETileElement::synchronizeProperty):
3310         * svg/SVGFETileElement.h:
3311         * svg/SVGFETurbulenceElement.cpp:
3312         (WebCore::SVGFETurbulenceElement::isSupportedAttribute):
3313         (WebCore::SVGFETurbulenceElement::parseMappedAttribute):
3314         (WebCore::SVGFETurbulenceElement::svgAttributeChanged):
3315         (WebCore::SVGFETurbulenceElement::synchronizeProperty):
3316         * svg/SVGFETurbulenceElement.h:
3317         * svg/SVGFilterElement.cpp:
3318         (WebCore::SVGFilterElement::isSupportedAttribute):
3319         (WebCore::SVGFilterElement::parseMappedAttribute):
3320         (WebCore::SVGFilterElement::svgAttributeChanged):
3321         (WebCore::SVGFilterElement::synchronizeProperty):
3322         * svg/SVGFilterElement.h:
3323         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3324         (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
3325         (WebCore::SVGFilterPrimitiveStandardAttributes::parseMappedAttribute):
3326         (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
3327         (WebCore::SVGFilterPrimitiveStandardAttributes::synchronizeProperty):
3328         * svg/SVGFilterPrimitiveStandardAttributes.h:
3329         * svg/SVGFitToViewBox.cpp:
3330         (WebCore::SVGFitToViewBox::parseMappedAttribute):
3331         (WebCore::SVGFitToViewBox::synchronizeProperties):
3332         (WebCore::SVGFitToViewBox::addSupportedAttributes):
3333         * svg/SVGFitToViewBox.h:
3334         * svg/SVGForeignObjectElement.cpp:
3335         (WebCore::SVGForeignObjectElement::isSupportedAttribute):
3336         (WebCore::SVGForeignObjectElement::parseMappedAttribute):
3337         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
3338         (WebCore::SVGForeignObjectElement::synchronizeProperty):
3339         * svg/SVGForeignObjectElement.h:
3340         * svg/SVGGElement.cpp:
3341         (WebCore::SVGGElement::isSupportedAttribute):
3342         (WebCore::SVGGElement::parseMappedAttribute):
3343         (WebCore::SVGGElement::svgAttributeChanged):
3344         (WebCore::SVGGElement::synchronizeProperty):
3345         * svg/SVGGElement.h:
3346         * svg/SVGGradientElement.cpp:
3347         (WebCore::SVGGradientElement::isSupportedAttribute):
3348         (WebCore::SVGGradientElement::parseMappedAttribute):
3349         (WebCore::SVGGradientElement::svgAttributeChanged):
3350         (WebCore::SVGGradientElement::synchronizeProperty):
3351         * svg/SVGGradientElement.h:
3352         * svg/SVGImageElement.cpp:
3353         (WebCore::SVGImageElement::isSupportedAttribute):
3354         (WebCore::SVGImageElement::parseMappedAttribute):
3355         (WebCore::SVGImageElement::svgAttributeChanged):
3356         (WebCore::SVGImageElement::synchronizeProperty):
3357         * svg/SVGImageElement.h:
3358         * svg/SVGLangSpace.cpp:
3359         (WebCore::SVGLangSpace::addSupportedAttributes):
3360         * svg/SVGLangSpace.h:
3361         * svg/SVGLineElement.cpp:
3362         (WebCore::SVGLineElement::isSupportedAttribute):
3363         (WebCore::SVGLineElement::parseMappedAttribute):
3364         (WebCore::SVGLineElement::svgAttributeChanged):
3365         (WebCore::SVGLineElement::synchronizeProperty):
3366         * svg/SVGLineElement.h:
3367         * svg/SVGLinearGradientElement.cpp:
3368         (WebCore::SVGLinearGradientElement::isSupportedAttribute):
3369         (WebCore::SVGLinearGradientElement::parseMappedAttribute):
3370         (WebCore::SVGLinearGradientElement::svgAttributeChanged):
3371         (WebCore::SVGLinearGradientElement::synchronizeProperty):
3372         * svg/SVGLinearGradientElement.h:
3373         * svg/SVGMPathElement.cpp:
3374         (WebCore::SVGMPathElement::isSupportedAttribute):
3375         (WebCore::SVGMPathElement::parseMappedAttribute):
3376         (WebCore::SVGMPathElement::synchronizeProperty):
3377         * svg/SVGMPathElement.h:
3378         * svg/SVGMarkerElement.cpp:
3379         (WebCore::SVGMarkerElement::isSupportedAttribute):
3380         (WebCore::SVGMarkerElement::parseMappedAttribute):
3381         (WebCore::SVGMarkerElement::svgAttributeChanged):
3382         (WebCore::SVGMarkerElement::synchronizeProperty):
3383         * svg/SVGMarkerElement.h:
3384         * svg/SVGMaskElement.cpp:
3385         (WebCore::SVGMaskElement::isSupportedAttribute):
3386         (WebCore::SVGMaskElement::parseMappedAttribute):
3387         (WebCore::SVGMaskElement::svgAttributeChanged):
3388         (WebCore::SVGMaskElement::synchronizeProperty):
3389         * svg/SVGMaskElement.h:
3390         * svg/SVGPathElement.cpp:
3391         (WebCore::SVGPathElement::isSupportedAttribute):
3392         (WebCore::SVGPathElement::parseMappedAttribute):
3393         (WebCore::SVGPathElement::svgAttributeChanged):
3394         (WebCore::SVGPathElement::synchronizeProperty):
3395         * svg/SVGPathElement.h:
3396         * svg/SVGPatternElement.cpp:
3397         (WebCore::SVGPatternElement::isSupportedAttribute):
3398         (WebCore::SVGPatternElement::parseMappedAttribute):
3399         (WebCore::SVGPatternElement::svgAttributeChanged):
3400         (WebCore::SVGPatternElement::synchronizeProperty):
3401         * svg/SVGPatternElement.h:
3402         * svg/SVGPolyElement.cpp:
3403         (WebCore::SVGPolyElement::isSupportedAttribute):
3404         (WebCore::SVGPolyElement::parseMappedAttribute):
3405         (WebCore::SVGPolyElement::svgAttributeChanged):
3406         * svg/SVGPolyElement.h:
3407         * svg/SVGRadialGradientElement.cpp:
3408         (WebCore::SVGRadialGradientElement::isSupportedAttribute):
3409         (WebCore::SVGRadialGradientElement::parseMappedAttribute):
3410         (WebCore::SVGRadialGradientElement::svgAttributeChanged):
3411         (WebCore::SVGRadialGradientElement::synchronizeProperty):
3412         * svg/SVGRadialGradientElement.h:
3413         * svg/SVGRectElement.cpp:
3414         (WebCore::SVGRectElement::isSupportedAttribute):
3415         (WebCore::SVGRectElement::parseMappedAttribute):
3416         (WebCore::SVGRectElement::svgAttributeChanged):
3417         (WebCore::SVGRectElement::synchronizeProperty):
3418         * svg/SVGRectElement.h:
3419         * svg/SVGSVGElement.cpp:
3420         (WebCore::SVGSVGElement::svgAttributeChanged):
3421         (WebCore::SVGSVGElement::synchronizeProperty):
3422         * svg/SVGScriptElement.cpp:
3423         (WebCore::SVGScriptElement::isSupportedAttribute):
3424         (WebCore::SVGScriptElement::parseMappedAttribute):
3425         (WebCore::SVGScriptElement::svgAttributeChanged):
3426         (WebCore::SVGScriptElement::synchronizeProperty):
3427         * svg/SVGScriptElement.h:
3428         * svg/SVGStopElement.cpp:
3429         (WebCore::SVGStopElement::isSupportedAttribute):
3430         (WebCore::SVGStopElement::parseMappedAttribute):
3431         (WebCore::SVGStopElement::svgAttributeChanged):
3432         (WebCore::SVGStopElement::synchronizeProperty):
3433         * svg/SVGStopElement.h:
3434         * svg/SVGStyleElement.cpp:
3435         (WebCore::SVGStyleElement::isSupportedAttribute):
3436         (WebCore::SVGStyleElement::parseMappedAttribute):
3437         * svg/SVGStyleElement.h:
3438         * svg/SVGStyledElement.cpp:
3439         (WebCore::SVGStyledElement::parseMappedAttribute):
3440         (WebCore::SVGStyledElement::svgAttributeChanged):
3441         (WebCore::SVGStyledElement::synchronizeProperty):
3442         * svg/SVGStyledTransformableElement.cpp:
3443         (WebCore::SVGStyledTransformableElement::isSupportedAttribute):
3444         (WebCore::SVGStyledTransformableElement::parseMappedAttribute):
3445         (WebCore::SVGStyledTransformableElement::svgAttributeChanged):
3446         (WebCore::SVGStyledTransformableElement::synchronizeProperty):
3447         * svg/SVGStyledTransformableElement.h:
3448         * svg/SVGSymbolElement.cpp:
3449         (WebCore::SVGSymbolElement::isSupportedAttribute):
3450         (WebCore::SVGSymbolElement::parseMappedAttribute):
3451         (WebCore::SVGSymbolElement::svgAttributeChanged):
3452         (WebCore::SVGSymbolElement::synchronizeProperty):
3453         * svg/SVGSymbolElement.h:
3454         * svg/SVGTRefElement.cpp:
3455         (WebCore::SVGTRefElement::isSupportedAttribute):
3456         (WebCore::SVGTRefElement::parseMappedAttribute):
3457         (WebCore::SVGTRefElement::svgAttributeChanged):
3458         (WebCore::SVGTRefElement::synchronizeProperty):
3459         * svg/SVGTRefElement.h:
3460         * svg/SVGTests.cpp:
3461         (WebCore::SVGTests::addSupportedAttributes):
3462         * svg/SVGTests.h:
3463         * svg/SVGTextContentElement.cpp:
3464         (WebCore::SVGTextContentElement::isSupportedAttribute):
3465         (WebCore::SVGTextContentElement::parseMappedAttribute):
3466         (WebCore::SVGTextContentElement::synchronizeProperty):
3467         (WebCore::SVGTextContentElement::svgAttributeChanged):
3468         * svg/SVGTextContentElement.h:
3469         * svg/SVGTextElement.cpp:
3470         (WebCore::SVGTextElement::isSupportedAttribute):
3471         (WebCore::SVGTextElement::parseMappedAttribute):
3472         (WebCore::SVGTextElement::svgAttributeChanged):
3473         (WebCore::SVGTextElement::synchronizeProperty):
3474         * svg/SVGTextElement.h:
3475         * svg/SVGTextPathElement.cpp:
3476         (WebCore::SVGTextPathElement::isSupportedAttribute):
3477         (WebCore::SVGTextPathElement::parseMappedAttribute):
3478         (WebCore::SVGTextPathElement::svgAttributeChanged):
3479         (WebCore::SVGTextPathElement::synchronizeProperty):
3480         * svg/SVGTextPathElement.h:
3481         * svg/SVGTextPositioningElement.cpp:
3482         (WebCore::SVGTextPositioningElement::isSupportedAttribute):
3483         (WebCore::SVGTextPositioningElement::parseMappedAttribute):
3484         (WebCore::SVGTextPositioningElement::svgAttributeChanged):
3485         (WebCore::SVGTextPositioningElement::synchronizeProperty):
3486         * svg/SVGTextPositioningElement.h:
3487         * svg/SVGTransformable.cpp:
3488         * svg/SVGTransformable.h:
3489         * svg/SVGURIReference.cpp:
3490         (WebCore::SVGURIReference::addSupportedAttributes):
3491         * svg/SVGURIReference.h:
3492         * svg/SVGUseElement.cpp:
3493         (WebCore::SVGUseElement::isSupportedAttribute):
3494         (WebCore::SVGUseElement::parseMappedAttribute):
3495         (WebCore::SVGUseElement::svgAttributeChanged):
3496         (WebCore::SVGUseElement::synchronizeProperty):
3497         * svg/SVGUseElement.h:
3498         * svg/SVGViewElement.cpp:
3499         (WebCore::SVGViewElement::isSupportedAttribute):
3500         (WebCore::SVGViewElement::parseMappedAttribute):
3501         (WebCore::SVGViewElement::synchronizeProperty):
3502         * svg/SVGViewElement.h:
3503         * svg/SVGZoomAndPan.cpp:
3504         (WebCore::SVGZoomAndPan::addSupportedAttributes):
3505         * svg/SVGZoomAndPan.h:
3506
3507 2011-05-20  Simon Fraser  <simon.fraser@apple.com>
3508
3509         Reviewed by Dan Bernstein.
3510
3511         Allow ShadowBlur to do tiling when the context is scaled
3512         https://bugs.webkit.org/show_bug.cgi?id=61232
3513
3514         If the GraphicsContext is scaled or rotated by a multiple of 90deg, have ShadowBlur
3515         use the tiling code path, to avoid blurring large areas on pages like cracked.com
3516         when the context is scaled.
3517
3518         * platform/graphics/ShadowBlur.cpp:
3519         (WebCore::ShadowBlur::drawRectShadow): Call preservesAxisAlignment()
3520         to decide when to not use tiling.
3521         (WebCore::ShadowBlur::drawInsetShadow): Ditto.
3522         (WebCore::ShadowBlur::drawLayerPieces): Round to device pixels when drawing tiles
3523         to avoid pixel cracks in scaled contexts.
3524         * platform/graphics/transforms/AffineTransform.h:
3525         (WebCore::AffineTransform::preservesAxisAlignment): Return true if there is the matrix
3526         contains a transform that results in axis alignment (no rotation or skew, or rotations
3527         which are multiples of 90deg).
3528
3529 2011-05-20  Alexey Proskuryakov  <ap@apple.com>
3530
3531         Reviewed by Kent Tamura.
3532
3533         Special characters can be inserted in text field having reached maxlength
3534         https://bugs.webkit.org/show_bug.cgi?id=19479
3535         <rdar://problem/7828739>
3536
3537         Test: platform/mac/editing/input/maxlength.html
3538
3539         * editing/CompositeEditCommand.cpp:
3540         (WebCore::CompositeEditCommand::insertTextIntoNode):
3541         (WebCore::CompositeEditCommand::replaceTextInNode):
3542         Avoid hitting an assertion below, now that we can get here with empty text.
3543
3544         * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertText): There is still work to do
3545         even if beforetextinput removed all text from the event. At the very least, we should delete
3546         the current selection.
3547
3548 2011-05-20  Andy Estes  <aestes@apple.com>
3549
3550         Reviewed by Darin Adler.
3551
3552         REGRESSION (r70748): WebKit cannot play videos created by Podcast Producer.
3553         https://bugs.webkit.org/show_bug.cgi?id=61229
3554         
3555         Podcast Producer uses an object tag with a classid attribute to embed
3556         QuickTime Player into a page. In r70748, we changed our behavior to
3557         render the object's fallback content when a non-empty classid is
3558         encountered, per HTML5. Since Podcast Producer videos have no fallback
3559         content, this change in behavior causes the video to fail to load.
3560         
3561         Since the object tag has a valid type attribute, we would be able to
3562         load it if weren't for the non-empty classid. This patch changes our
3563         policy to allow objects with non-empty classids if there is no fallback
3564         content. We still continue to prefer fallback content if it exists,
3565         however.
3566
3567         * html/HTMLObjectElement.cpp:
3568         (WebCore::HTMLObjectElement::hasValidClassId): Treat a non-empty
3569         classid as valid if the object has no fallback content.
3570
3571 2011-05-20  Kulanthaivel Palanichamy  <kulanthaivel@codeaurora.org>
3572
3573         Reviewed by Simon Fraser.
3574
3575         If both border-radius and box-shadow applied, shadow is not fully visible
3576         https://bugs.webkit.org/show_bug.cgi?id=59577
3577
3578         The current implementation of RoundedIntRect::inflateWithRadii() inflates
3579         its rect size and corner radii out of sync. This leads to validation failure in
3580         Path::addRoundedRect() and results in ignoring radii in the path.
3581         When this invalid path is used to clip out the rounded corner box before painting
3582         the box shadow, the entire rectangle is clipped out without the corner radii.
3583
3584         This patch implements RoundedIntRect::inflateWithRadii() properly to inflate
3585         rounded rect radii based on inflate ratios of rect size.
3586
3587         Test: fast/css/box-shadow-and-border-radius.html
3588
3589         * platform/graphics/RoundedIntRect.cpp:
3590         (WebCore::RoundedIntRect::inflateWithRadii):
3591         * platform/graphics/RoundedIntRect.h:
3592
3593 2011-05-20  Michael Nordman  <michaeln@google.com>
3594
3595         Reviewed by Darin Fisher.
3596
3597         [Chromium] Support the new webkit apis so the WebDatabase system participates
3598         in the unified quota management system.
3599         https://bugs.webkit.org/show_bug.cgi?id=60985
3600
3601         No change in functionality, no new tests.
3602
3603         * platform/chromium/PlatformBridge.h:
3604         * storage/chromium/QuotaTracker.cpp:
3605         (WebCore::QuotaTracker::getDatabaseSizeAndSpaceAvailableToOrigin):
3606         (WebCore::QuotaTracker::updateDatabaseSize):
3607         (WebCore::QuotaTracker::updateSpaceAvailableToOrigin):
3608         (WebCore::QuotaTracker::resetSpaceAvailableToOrigin):
3609         * storage/chromium/QuotaTracker.h:
3610
3611 2011-05-20  Andy Estes  <aestes@apple.com>
3612
3613         Reviewed by Darin Adler.
3614
3615         WebView loses firstResponder status when entering full-screen mode.
3616         https://bugs.webkit.org/show_bug.cgi?id=61153
3617
3618         No test possible via DRT. Add a manual test instead.
3619
3620         * manual-tests/full-screen-keypress.html: Added.
3621
3622 2011-05-20  Jeremy Noble  <jer.noble@apple.com>
3623
3624         Reviewed by Maciej Stachowiak.
3625
3626         WebKit2: Exit full screen mode if the WebProcess crashes.
3627         https://bugs.webkit.org/show_bug.cgi?id=61151
3628
3629         * platform/graphics/win/FullScreenController.h:
3630         * platform/graphics/win/FullScreenController.cpp:
3631         (FullScreenController::close): Added.  Close the full-screen window without animation
3632             if called.
3633
3634 2011-05-20  Enrica Casucci  <enrica@apple.com>
3635
3636         Reviewed by David Kilzer.
3637
3638         Add delegate methods about focus and blur to all elements.
3639         https://bugs.webkit.org/show_bug.cgi?id=61218
3640
3641         We want to have delegates for these events for all the elements, not only the form elements.
3642         The patch moves the call to the delegate in the Node class and changes the name
3643         of the methods not to be form element specific.
3644
3645         * dom/Node.cpp:
3646         (WebCore::Node::dispatchFocusEvent): Added call to delegate with the new name.
3647         (WebCore::Node::dispatchBlurEvent): Added call to delegate with the new name.
3648         * html/HTMLFormControlElement.cpp:
3649         (WebCore::HTMLFormControlElement::dispatchBlurEvent): Removed code that calls the delegate since
3650         it has been moved into Node.
3651         * html/HTMLFormControlElement.h: Removed dispatchFocusEvent, since we are using the default inplementation in Node.
3652         * loader/EmptyClients.h:
3653         (WebCore::EmptyChromeClient::elementDidFocus): Name changed.
3654         (WebCore::EmptyChromeClient::elementDidBlur): Name changed.
3655         * page/ChromeClient.h:
3656         (WebCore::ChromeClient::elementDidFocus): Name changed.
3657         (WebCore::ChromeClient::elementDidBlur): Name changed.
3658
3659 2011-05-20  Ryosuke Niwa  <rniwa@webkit.org>
3660
3661         Reviewed by Enrica Casucci.
3662
3663         Wrap copied contents by one style span instead of two
3664         https://bugs.webkit.org/show_bug.cgi?id=60988
3665
3666         Replaced sourceDocumentStyleSpan and copiedRangeStyleSpan by one wrapping style span. Instead
3667         of wrapping the copied contents by user-applied style and document default style in serialization,
3668         take the difference with the document default's style in paste code.
3669
3670         This will dramatically simplify our copy and paste code and pave a way to fix the bug 60914.
3671
3672         No new tests because copy & paste is tested by existing layout tests.
3673
3674         * editing/EditingStyle.cpp:
3675         (WebCore::EditingStyle::prepareToApplyAt): Remove the color property if RGBA values of color
3676         matches that of the computed style at the specified position.
3677         * editing/ReplaceSelectionCommand.cpp:
3678         (WebCore::ReplaceSelectionCommand::handleStyleSpans): Replaced sourceDocumentStyleSpan and
3679         copiedRangeStyleSpan by wrappingStyleSpan. When pasting as a quotation, compare style against
3680         the document's default style to avoid keeping the document default style (tested by
3681         editing/pasteboard/4930986-3.html).
3682         * editing/ReplaceSelectionCommand.h:
3683         * editing/markup.cpp:
3684         (WebCore::createMarkup): Only use one style span to wrap the serialized contents.
3685
3686 2011-05-20  Simon Fraser  <simon.fraser@apple.com>
3687
3688         Reviewed by Sam Weinig.
3689
3690         numberOfActiveAnimations() can include animations from documents in the page cache
3691         https://bugs.webkit.org/show_bug.cgi?id=53641
3692         
3693         Some transition tests using layoutTestController.numberOfActiveAnimations() failed
3694         in WebKit2 because numberOfActiveAnimations() could include those from other documents
3695         in the page cache.
3696         
3697         Fix by passing in the document for which we wish to count animations.
3698
3699         * WebCore.exp.in:
3700         * page/animation/AnimationController.cpp:
3701         (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
3702         (WebCore::AnimationController::numberOfActiveAnimations):
3703         * page/animation/AnimationController.h:
3704         * page/animation/AnimationControllerPrivate.h:
3705
3706 2011-05-20  Adam Barth  <abarth@webkit.org>
3707
3708         Reviewed by Alexey Proskuryakov.
3709
3710         Factor CORS request preparation out of DocumentThreadableLoader
3711         https://bugs.webkit.org/show_bug.cgi?id=61209
3712
3713         DocumentThreadableLoader has two jobs:
3714
3715         1) Proxy loads between threads.
3716         2) Run the CORS state machine.
3717
3718         This patch begins the work of separating those concerns, allowing CORS
3719         to be used elsewhere in the loading pipeline.  In particular, this
3720         patch moves knowledge of how to prepare CORS requests out of
3721         DocumentThreadableLoder.
3722
3723         * loader/CrossOriginAccessControl.cpp:
3724         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
3725         (WebCore::updateRequestForAccessControl):
3726         (WebCore::createAccessControlPreflightRequest):
3727         * loader/CrossOriginAccessControl.h:
3728         * loader/DocumentThreadableLoader.cpp:
3729         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
3730         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
3731         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
3732
3733 2011-05-20  Rob Buis  <rbuis@rim.com>
3734
3735         Reviewed by Dirk Schulze.
3736
3737         Use test from ietestcenter fails
3738         https://bugs.webkit.org/show_bug.cgi?id=60844
3739
3740         When an id changes on an in-document element, we need to check whether the id
3741         is part of the pending elements. Since this is the same thing as happens in
3742         insertedIntoDocument, split out the common code into buildPendingResourcesIfNeeded.
3743
3744         Test: svg/W3C-SVG-1.1-SE/struct-use-14-f.svg
3745
3746         * svg/SVGStyledElement.cpp:
3747         (WebCore::SVGStyledElement::svgAttributeChanged):
3748         (WebCore::SVGStyledElement::insertedIntoDocument):
3749         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
3750         * svg/SVGStyledElement.h:
3751
3752 2011-05-20  Abhishek Arya  <inferno@chromium.org>
3753
3754         Reviewed by Kent Tamura.
3755
3756         Make auto-focus a post attach callback in
3757         HTMLFormControlElement::attach().
3758         https://bugs.webkit.org/show_bug.cgi?id=32882
3759
3760         Original patch by Darin Adler. This one uses a part of it.
3761         
3762         Test: fast/forms/input-element-attach-crash.html
3763
3764         * dom/Document.cpp:
3765         (WebCore::Document::recalcStyle): Make sure that m_inStyleRecalc is
3766         already false by the time post-attach callbacks are done so that
3767         layout triggered inside those callbacks can work properly.
3768         * html/HTMLFormControlElement.cpp:
3769         (WebCore::shouldAutofocus): Helper function that expresses
3770         the rule for which form control elements should auto-focus.
3771         (WebCore::focusPostAttach): Called post-attach to focus an
3772         element if we discover it should be focused during attach.
3773         (WebCore::HTMLFormControlElement::attach): Refactored code for
3774         which elements need auto-focus into a separate function. Instead
3775         of focusing right away, use the focusPostAttach function to focus
3776         after attach is done. Also added calls to suspendPostAttachCallbacks
3777         and resumePostAttachCallbacks so post-attach callbacks happen late
3778         enough. Before, they could run inside the base attach function.
3779         * html/HTMLInputElement.cpp:
3780         (WebCore::HTMLInputElement::attach): Added calls to
3781         suspendPostAttachCallbacks and resumePostAttachCallbacks so
3782         post-attach callbacks happen late enough
3783
3784 2011-05-20  Alok Priyadarshi  <alokp@chromium.org>
3785
3786         Reviewed by James Robinson.
3787
3788         [chromium] Remove LayerRendererChromium::useShader
3789         https://bugs.webkit.org/show_bug.cgi?id=61143
3790
3791         GPU compositor tests should be sufficient.
3792
3793         * platform/graphics/chromium/LayerRendererChromium.cpp:
3794         (WebCore::LayerRendererChromium::LayerRendererChromium):
3795         * platform/graphics/chromium/LayerRendererChromium.h:
3796         * platform/graphics/chromium/LayerTilerChromium.cpp:
3797         (WebCore::LayerTilerChromium::draw):
3798         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
3799         (WebCore::RenderSurfaceChromium::drawSurface):
3800         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
3801         (WebCore::CCCanvasLayerImpl::draw):
3802         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
3803         (WebCore::CCHeadsUpDisplay::draw):
3804         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3805         (WebCore::CCLayerImpl::drawDebugBorder):
3806         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
3807         (WebCore::CCPluginLayerImpl::draw):
3808         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3809         (WebCore::CCVideoLayerImpl::drawYUV):
3810         (WebCore::CCVideoLayerImpl::drawRGBA):
3811
3812 2011-05-20  Dirk Schulze  <krit@webkit.org>
3813
3814         Reviewed by Darin Adler.
3815
3816         SVGPathSegList needs better getTotalLength, getSegmentAtLength path traversal code
3817         https://bugs.webkit.org/show_bug.cgi?id=12047
3818
3819         Right now SVGPathElement::getTotalLength and SVGPathElement::getPointAtLength use toPathData()
3820         to transform a SVGPathByteStream to a Path. This Path gets traversed to find the searched value.
3821         With this patch both functions use the SVGPathByteStream directly together with the existing
3822         traversing code in SVG. This avoids the intermediate transforming to a platform path and gives
3823         platform independent results.
3824         The traversal code in SVG needed to be extended to support all PathTraversalActions.
3825
3826         No new tests added. The existing tests cover the changes.
3827
3828         * svg/SVGPathElement.cpp:
3829         (WebCore::SVGPathElement::getTotalLength):
3830         (WebCore::SVGPathElement::getPointAtLength):
3831         * svg/SVGPathParserFactory.cpp:
3832         (WebCore::SVGPathParserFactory::getTotalLengthOfSVGPathByteStream):
3833         (WebCore::SVGPathParserFactory::getPointAtLengthOfSVGPathByteStream):
3834         * svg/SVGPathParserFactory.h:
3835         * svg/SVGPathTraversalStateBuilder.cpp:
3836         (WebCore::SVGPathTraversalStateBuilder::continueConsuming):
3837         (WebCore::SVGPathTraversalStateBuilder::totalLength):
3838         (WebCore::SVGPathTraversalStateBuilder::currentPoint):
3839         * svg/SVGPathTraversalStateBuilder.h:
3840
3841 2011-05-20  Mark Pilgrim  <pilgrim@chromium.org>
3842
3843         Reviewed by Tony Chang.
3844
3845         IndexedDB createObjectStore should throw if name is null
3846         https://bugs.webkit.org/show_bug.cgi?id=58465
3847
3848         Test: storage/indexeddb/mozilla/create-objectstore-null-name.html
3849
3850         * storage/IDBDatabase.idl:
3851         * storage/IDBDatabaseBackendImpl.cpp:
3852         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
3853
3854 2011-05-20  Xiaomei Ji  <xji@chromium.org>
3855
3856         Reviewed by Ryosuke Niwa.
3857
3858         ctrl-arrow does not work on words separated by multiple spaces.
3859         https://bugs.webkit.org/show_bug.cgi?id=57543.
3860
3861         Add the leftmost boundary of a box in RTL block or the rightmost boundary of a box in LTR
3862         block as word break if its inlineBox is the current box and it is a word break.
3863
3864         * editing/visible_units.cpp:
3865         (WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality): Add the rightmost
3866         boundary of a box in LTR block or leftmost boundary of a box in RTL block as visually
3867         first word break.
3868         (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
3869         (WebCore::collectWordBreaksInBoxInsideBlockWithDifferntDirectionality):
3870         (WebCore::leftWordBoundary): Fix bug change "box" to "adjacentBox".
3871         (WebCore::rightWordBoundary): Fix bug change "box" to "adjacentBox".
3872
3873 2011-05-19  Evan Martin  <evan@chromium.org>
3874
3875         Reviewed by Tony Chang.
3876
3877         [chromium] remove <(library) variable
3878         https://bugs.webkit.org/show_bug.cgi?id=61158
3879
3880         This was for a build experiment; we can just use the correct value now.
3881
3882         * WebCore.gyp/WebCore.gyp:
3883
3884 2011-05-20  Pavel Podivilov  <podivilov@chromium.org>
3885
3886         Reviewed by Pavel Feldman.
3887
3888         Web Inspector: breakpoints disappear from ui after navigation.
3889         https://bugs.webkit.org/show_bug.cgi?id=61133
3890
3891         * inspector/front-end/DebuggerPresentationModel.js:
3892         (WebInspector.DebuggerPresentationModel.prototype._debuggerWasEnabled):
3893         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
3894
3895 2011-05-20  Sheriff Bot  <webkit.review.bot@gmail.com>
3896
3897         Unreviewed, rolling out r86958.
3898         http://trac.webkit.org/changeset/86958
3899         https://bugs.webkit.org/show_bug.cgi?id=61195
3900
3901         broke breakpoints persisting (Requested by podivilov on
3902         #webkit).
3903
3904         * inspector/front-end/DebuggerPresentationModel.js:
3905         (WebInspector.DebuggerPresentationModel.prototype._debuggerWasEnabled):
3906         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
3907
3908 2011-05-19  Sergey Vorobyev  <sergeyvorobyev@google.com>
3909
3910         Reviewed by Yury Semikhatsky.
3911
3912         Web Inspector: Background network events collection - add GUI to Inspector.
3913         https://bugs.webkit.org/show_bug.cgi?id=58652
3914
3915         Now in WebInspector Network panel avalaible new checkbox item in context menu:
3916         "Background events collection". It allows to save all network events when inspector
3917         frontend closed. Events that occur before collection enabling are not preserved after
3918         frontend reopening. Property unique for each page. Disabled by default.
3919
3920
3921         Tests: http/tests/inspector/network/network-clear-after-disabled.html
3922                http/tests/inspector/network/network-close-load-open.html
3923                http/tests/inspector/network/network-open-load-reopen.html
3924
3925         * inspector/EventsCollector.cpp:
3926         (WebCore::EventsCollector::clear):
3927         * inspector/EventsCollector.h:
3928         * inspector/Inspector.json:
3929         * inspector/InspectorFrontendProxy.cpp:
3930         (WebCore::InspectorFrontendProxy::inspectorFrontendChannel):
3931         * inspector/InspectorFrontendProxy.h:
3932         * inspector/InspectorResourceAgent.cpp:
3933         (WebCore::InspectorResourceAgent::setFrontend):
3934         (WebCore::InspectorResourceAgent::clearFrontend):
3935         (WebCore::InspectorResourceAgent::isBackgroundEventsCollectionEnabled):
3936         (WebCore::InspectorResourceAgent::setBackgroundEventsCollectionEnabled):
3937         (WebCore::InspectorResourceAgent::initializeBackgroundCollection):
3938         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
3939         * inspector/InspectorResourceAgent.h:
3940         * inspector/front-end/NetworkPanel.js:
3941         (WebInspector.NetworkPanel):
3942         (WebInspector.NetworkPanel.prototype._contextMenu):
3943         (WebInspector.NetworkPanel.prototype._toggleBackgroundEventsCollection):
3944
3945 2011-05-20  Pavel Podivilov  <podivilov@chromium.org>
3946
3947         Reviewed by Pavel Feldman.
3948
3949         Web Inspector: breakpoints disappear from ui after navigation.
3950         https://bugs.webkit.org/show_bug.cgi?id=61133
3951
3952         * inspector/front-end/DebuggerPresentationModel.js:
3953         (WebInspector.DebuggerPresentationModel.prototype._debuggerWasEnabled):
3954         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
3955
3956 2011-05-20  Jer Noble  <jer.noble@apple.com>
3957
3958         Reviewed by Maciej Stachowiak.
3959
3960         Win: non-full-screen content is briefly seen when entering full-screen mode (and vice versa)
3961         https://bugs.webkit.org/show_bug.cgi?id=61108
3962
3963         Instead of repainting the full- and non-full-screen windows in WebCore, delegate that
3964         responsibility to the FullScreenControllerClient.  Because the repaint operation may 
3965         be asynchronous, add a new method for clients to use to indicate repainting has completed.
3966
3967         * platform/graphics/win/FullScreenController.cpp:
3968         (FullScreenController::Private::Private): Added new ivars.
3969         (FullScreenController::enterFullScreen): Split into two functions (pre-and post repaint)
3970         (FullScreenController::enterFullScreenRepaintCompleted): Ditto.
3971         (FullScreenController::exitFullScreen): Ditto.
3972         (FullScreenController::exitFullScreenRepaintCompleted): Ditto.
3973         (FullScreenController::repaintCompleted): Call the appropriated repaint completed function.
3974         * platform/graphics/win/FullScreenController.h:
3975         * platform/graphics/win/FullScreenControllerClient.h:
3976
3977 2011-05-20  Yury Semikhatsky  <yurys@chromium.org>
3978
3979         Reviewed by Pavel Feldman.
3980