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