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