Web Inspector: [Extensions API] add audit formatters for remote objects and DOM elements
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-05-10  Andrey Kosyakov  <caseq@chromium.org>
2
3         Web Inspector: [Extensions API] add audit formatters for remote objects and DOM elements
4         https://bugs.webkit.org/show_bug.cgi?id=86108
5
6         Reviewed by Pavel Feldman.
7
8        - added two new formatters to AuditResults object of webInspector.audits API;
9
10         * inspector/front-end/AuditFormatters.js:
11         (WebInspector.AuditFormatters.resourceLink):
12         (WebInspector.AuditFormatters.object.onEvaluate):
13         (WebInspector.AuditFormatters.object): format as a remote object property list;
14         (WebInspector.AuditFormatters.node.onNodeAvailable):
15         (WebInspector.AuditFormatters.node.onEvaluate):
16         (WebInspector.AuditFormatters.node): format as a DOM elements sub-tree;
17         (WebInspector.AuditFormatters.Utilities.evaluate): common expression evaluation logic for both new formatters;
18         * inspector/front-end/ExtensionAPI.js:
19         (injectedExtensionAPI.AuditResultImpl):
20         * inspector/front-end/auditsPanel.css:
21         (.audit-result-tree ol.outline-disclosure):
22         (.audit-result-tree .section .header):
23         (.audit-result-tree .section .header::before):
24
25 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
26
27         Unreviewed, rolling out r116727.
28         http://trac.webkit.org/changeset/116727
29         https://bugs.webkit.org/show_bug.cgi?id=86181
30
31         Build error on Chromium-Android (Requested by tkent on
32         #webkit).
33
34         * platform/graphics/MediaPlayer.cpp:
35         (WebCore::MediaPlayer::enterFullscreen):
36         (WebCore):
37         * platform/graphics/MediaPlayer.h:
38         (MediaPlayer):
39         * platform/graphics/MediaPlayerPrivate.h:
40         (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
41         (MediaPlayerPrivateInterface):
42
43 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
44
45         Unreviewed, rolling out r116731.
46         http://trac.webkit.org/changeset/116731
47         https://bugs.webkit.org/show_bug.cgi?id=86178
48
49         Build failure on Chromium-mac (Requested by tkent on #webkit).
50
51         * platform/graphics/chromium/LayerRendererChromium.cpp:
52         (WebCore::LayerRendererChromium::create):
53         (WebCore::LayerRendererChromium::LayerRendererChromium):
54         (WebCore::LayerRendererChromium::initializeSharedObjects):
55         * platform/graphics/chromium/LayerRendererChromium.h:
56         (LayerRendererChromium):
57         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
58         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
59         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
60         (CCLayerTreeHostImpl):
61         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
62         (UnthrottledTextureUploader):
63         (WebCore::UnthrottledTextureUploader::create):
64         (WebCore::UnthrottledTextureUploader::~UnthrottledTextureUploader):
65         (WebCore::UnthrottledTextureUploader::isBusy):
66         (WebCore::UnthrottledTextureUploader::beginUploads):
67         (WebCore::UnthrottledTextureUploader::endUploads):
68         (WebCore::UnthrottledTextureUploader::uploadTexture):
69         (WebCore::UnthrottledTextureUploader::UnthrottledTextureUploader):
70         (WebCore):
71         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
72         (WebCore::CCSingleThreadProxy::recreateContext):
73         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
74         (WebCore):
75         (UnthrottledTextureUploader):
76         (WebCore::UnthrottledTextureUploader::create):
77         (WebCore::UnthrottledTextureUploader::~UnthrottledTextureUploader):
78         (WebCore::UnthrottledTextureUploader::isBusy):
79         (WebCore::UnthrottledTextureUploader::beginUploads):
80         (WebCore::UnthrottledTextureUploader::endUploads):
81         (WebCore::UnthrottledTextureUploader::uploadTexture):
82         (WebCore::UnthrottledTextureUploader::UnthrottledTextureUploader):
83         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
84         (WebCore::CCThreadProxy::recreateContextOnImplThread):
85
86 2012-05-10  David Reveman  <reveman@chromium.org>
87
88         [Chromium] Move instantiation of texture uploader to LayerRendererChromium.
89         https://bugs.webkit.org/show_bug.cgi?id=85893
90
91         Reviewed by Adrienne Walker.
92
93         Move instantiation of texture uploader to LayerRendererChromium and
94         allow CCProxy to decide between a throttled or unthrottled uploader
95         using a flag passed to the LayerRendererChromium constructor.
96
97         * platform/graphics/chromium/LayerRendererChromium.cpp:
98         (WebCore::LayerRendererChromium::create):
99         (WebCore::LayerRendererChromium::LayerRendererChromium):
100         (WebCore::LayerRendererChromium::initializeSharedObjects):
101         * platform/graphics/chromium/LayerRendererChromium.h:
102         (LayerRendererChromium):
103         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
104         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
105         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
106         (CCLayerTreeHostImpl):
107         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
108         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
109         (WebCore::CCSingleThreadProxy::recreateContext):
110         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
111         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
112         (WebCore::CCThreadProxy::recreateContextOnImplThread):
113
114 2012-05-10  MORITA Hajime  <morrita@google.com>
115
116         ElementShadow should minimize the usage of "ShadowRoot" name
117         https://bugs.webkit.org/show_bug.cgi?id=85970
118
119         Reviewed by Dimitri Glazkov.
120
121         This change cleans two out dated assumptions which brought in at
122         early stage of Shadow DOM implementation.
123
124         - Removed Element::hasShadowRoot(): shadow existence can be checked by Element::shadow().
125         - Made ElementShadow::removeAllShadowRoots() private: we no longer allow ShadowRoot removal.
126           It can only happens at the ElementShadow destruction.
127
128         Most of changes in element implementations are basically simple
129         replacement from hasShadowRoot() to shadow().
130
131         No new tests. Covered by existing tests.
132
133         * WebCore.exp.in:
134         * dom/ContainerNodeAlgorithms.h:
135         (WebCore::ChildFrameDisconnector::collectDescendant):
136         * dom/ComposedShadowTreeWalker.cpp:
137         (WebCore::ComposedShadowTreeWalker::traverseChild):
138         * dom/Document.cpp:
139         (WebCore::Document::buildAccessKeyMap):
140         * dom/Element.cpp:
141         (WebCore::Element::recalcStyle):
142         (WebCore::Element::ensureShadowRoot):
143         (WebCore::Element::childrenChanged):
144         * dom/Element.h:
145         (Element):
146         (WebCore::isShadowHost):
147         (WebCore):
148         * dom/ElementShadow.cpp:
149         (WebCore::ElementShadow::~ElementShadow):
150         (WebCore::ElementShadow::removeAllShadowRoots):
151         * dom/ElementShadow.h:
152         (ElementShadow):
153         (WebCore::ElementShadow::host):
154         * dom/EventDispatcher.cpp:
155         * dom/Node.cpp:
156         (WebCore::oldestShadowRootFor):
157         * dom/NodeRenderingContext.cpp:
158         (WebCore::NodeRenderingContext::NodeRenderingContext):
159         * dom/ShadowRoot.cpp:
160         (WebCore::ShadowRoot::create):
161         * html/ColorInputType.cpp:
162         (WebCore::ColorInputType::createShadowSubtree):
163         * html/FileInputType.cpp:
164         (WebCore::FileInputType::createShadowSubtree):
165         (WebCore::FileInputType::multipleAttributeChanged):
166         * html/HTMLDetailsElement.cpp:
167         (WebCore::HTMLDetailsElement::createShadowSubtree):
168         * html/HTMLInputElement.cpp:
169         (WebCore::HTMLInputElement::createShadowSubtree):
170         * html/HTMLKeygenElement.cpp:
171         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
172         (WebCore::HTMLKeygenElement::shadowSelect):
173         * html/HTMLMediaElement.cpp:
174         (WebCore::HTMLMediaElement::hasMediaControls):
175         * html/HTMLMeterElement.cpp:
176         (WebCore::HTMLMeterElement::createShadowSubtree):
177         * html/HTMLProgressElement.cpp:
178         (WebCore::HTMLProgressElement::createShadowSubtree):
179         * html/HTMLSummaryElement.cpp:
180         (WebCore::HTMLSummaryElement::createShadowSubtree):
181         * html/HTMLTextAreaElement.cpp:
182         (WebCore::HTMLTextAreaElement::createShadowSubtree):
183         * html/InputType.cpp:
184         (WebCore::InputType::destroyShadowSubtree):
185         * html/RangeInputType.cpp:
186         (WebCore::RangeInputType::handleMouseDownEvent):
187         (WebCore::RangeInputType::createShadowSubtree):
188         * html/TextFieldInputType.cpp:
189         (WebCore::TextFieldInputType::createShadowSubtree):
190         * html/shadow/SliderThumbElement.cpp:
191         (WebCore::trackLimiterElementOf):
192         * inspector/InspectorDOMAgent.cpp:
193         (WebCore::InspectorDOMAgent::unbind):
194         (WebCore::InspectorDOMAgent::buildObjectForNode):
195         * page/FocusController.cpp:
196         (WebCore):
197         * rendering/RenderFileUploadControl.cpp:
198         (WebCore::RenderFileUploadControl::uploadButton):
199         * svg/SVGTRefElement.cpp:
200         (WebCore::SVGTRefElement::updateReferencedText):
201         (WebCore::SVGTRefElement::detachTarget):
202         * testing/Internals.cpp:
203         (WebCore::Internals::ensureShadowRoot):
204         (WebCore::Internals::youngestShadowRoot):
205         (WebCore::Internals::oldestShadowRoot):
206         * testing/Internals.h:
207         (Internals):
208         * testing/Internals.idl:
209
210 2012-05-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
211
212         Move resumeAnimations to use Internals interface
213         https://bugs.webkit.org/show_bug.cgi?id=86063
214
215         Reviewed by Alexey Proskuryakov.
216
217         Add resumeAnimations functions, because it is able to work in the
218         cross-port way through the Internals interface.
219
220         No new tests, since we are improving here the infra-structure for testing
221         a specific method.
222
223         * testing/Internals.cpp:
224         (WebCore::Internals::resumeAnimations):
225         (WebCore):
226         * testing/Internals.h:
227         (Internals):
228         * testing/Internals.idl:
229
230 2012-05-10  Min Qin  <qinmin@google.com>
231
232         split MediaPlayer::enterFullscreen into 2 seperate functions
233         https://bugs.webkit.org/show_bug.cgi?id=86052
234
235         Reviewed by Benjamin Poulain.
236
237         It is confusing that enterFullscreen returns a boolean while exitFullscreen does
238         not do the same. And ios does not need the return value.
239         So remove the return value on enterFullscreen and make a seperate canEnterFullscreen()
240         function for android.
241         No tests as there are no behavior change, just refactoring.
242
243         * platform/graphics/MediaPlayer.cpp:
244         (WebCore::MediaPlayer::enterFullscreen):
245         (WebCore):
246         (WebCore::MediaPlayer::canEnterFullscreen):
247         * platform/graphics/MediaPlayer.h:
248         (MediaPlayer):
249         * platform/graphics/MediaPlayerPrivate.h:
250         (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
251         (MediaPlayerPrivateInterface):
252         (WebCore::MediaPlayerPrivateInterface::canEnterFullscreen):
253
254 2012-05-10  Sheriff Bot  <webkit.review.bot@gmail.com>
255
256         Unreviewed, rolling out r116715.
257         http://trac.webkit.org/changeset/116715
258         https://bugs.webkit.org/show_bug.cgi?id=86172
259
260         Broke http/tests/security/cross-frame-access-selection.html
261         (Requested by tkent on #webkit).
262
263         * dom/Document.cpp:
264         (WebCore):
265         (WebCore::Document::getSelection):
266         * dom/Document.h:
267         (Document):
268         * dom/ShadowRoot.cpp:
269         (WebCore::ShadowRoot::selection):
270         * dom/TreeScope.cpp:
271         (WebCore::TreeScope::~TreeScope):
272         * dom/TreeScope.h:
273         (WebCore):
274         (TreeScope):
275         * page/DOMSelection.cpp:
276         (WebCore::DOMSelection::DOMSelection):
277         * page/DOMSelection.h:
278         (WebCore):
279         (WebCore::DOMSelection::create):
280         (DOMSelection):
281         * page/DOMWindow.cpp:
282         (WebCore::DOMWindow::~DOMWindow):
283         (WebCore::DOMWindow::clearDOMWindowProperties):
284         (WebCore::DOMWindow::getSelection):
285         * page/DOMWindow.h:
286         (DOMWindow):
287
288 2012-05-10  Hajime Morrita  <morrita@google.com>
289
290         WebKit should support tab-size.
291         https://bugs.webkit.org/show_bug.cgi?id=52994
292
293         - Added boilerplate for "tab-size" CSS property.
294         - Added RenderStye::tabSize() as a RareInheritedData.
295         - Replaced TextRun::m_allowTabs into TextRun::m_tabSize.
296
297         Reviewed by Simon Fraser.
298
299         Tests: fast/css/tab-size-expected.html
300                fast/css/tab-size.html
301
302         * css/CSSComputedStyleDeclaration.cpp:
303         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
304         * css/CSSParser.cpp:
305         (WebCore::CSSParser::parseValue):
306         * css/CSSProperty.cpp:
307         (WebCore::CSSProperty::isInheritedProperty):
308         * css/CSSPropertyNames.in:
309         * css/CSSStyleSelector.cpp:
310         (WebCore::CSSStyleSelector::applyProperty):
311         * html/canvas/CanvasRenderingContext2D.cpp:
312         (WebCore::CanvasRenderingContext2D::drawTextInternal):
313         * platform/chromium/PopupListBox.cpp:
314         (WebCore::PopupListBox::paintRow):
315         * platform/graphics/Font.h:
316         (WebCore::Font::tabWidth):
317         * platform/graphics/TextRun.h:
318         (WebCore::TextRun::TextRun):
319         (WebCore::TextRun::allowTabs):
320         (WebCore::TextRun::tabSize):
321         (WebCore::TextRun::setTabSize):
322         * platform/graphics/WidthIterator.cpp:
323         (WebCore::WidthIterator::advance):
324         * platform/graphics/mac/ComplexTextController.cpp:
325         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
326         * platform/win/PopupMenuWin.cpp:
327         (WebCore::PopupMenuWin::paint):
328         * rendering/InlineTextBox.cpp:
329         (WebCore::InlineTextBox::constructTextRun):
330         * rendering/RenderBlock.cpp:
331         (WebCore::RenderBlock::constructTextRun):
332         * rendering/RenderBlockLineLayout.cpp:
333         (WebCore::textWidth):
334         (WebCore::tryHyphenating):
335         * rendering/RenderText.cpp:
336         (WebCore::RenderText::widthFromCache):
337         (WebCore::RenderText::computePreferredLogicalWidths):
338         (WebCore::RenderText::width):
339         * rendering/RenderText.h:
340         * rendering/style/RenderStyle.cpp:
341         (WebCore::RenderStyle::diff):
342         * rendering/style/RenderStyle.h:
343         (WebCore::RenderStyleBitfields::tabSize):
344         (WebCore::RenderStyleBitfields::collapsedTabSize):
345         (WebCore::RenderStyleBitfields::setTabSize):
346         (WebCore::RenderStyleBitfields::initialTabSize):
347         * rendering/style/StyleRareInheritedData.cpp:
348         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
349         (WebCore::StyleRareInheritedData::operator==):
350         * rendering/style/StyleRareInheritedData.h:
351         * rendering/svg/SVGInlineTextBox.cpp:
352         (WebCore::SVGInlineTextBox::constructTextRun):
353         * rendering/svg/SVGTextMetrics.cpp:
354         (WebCore::constructTextRun):
355
356 2012-05-10  Antoine Labour  <piman@chromium.org>
357
358         Sync with impl thread when removing references to external textures
359         https://bugs.webkit.org/show_bug.cgi?id=86054
360
361         We want to ensure the client side is safe to release textures, so we
362         sync with the impl thread when:
363         - we change the texture (and we had one)
364         - the layer is removed from the tree (and we had a texture)
365         - the layer is destroyed (and we had a texture)
366
367         Reviewed by James Robinson.
368
369         Test: TextureLayerChromiumTest.
370
371         * platform/graphics/chromium/TextureLayerChromium.cpp:
372         (WebCore::TextureLayerChromium::~TextureLayerChromium):
373         (WebCore::TextureLayerChromium::setTextureId):
374         (WebCore::TextureLayerChromium::setLayerTreeHost):
375         (WebCore):
376         * platform/graphics/chromium/TextureLayerChromium.h:
377         (TextureLayerChromium):
378
379 2012-05-10  Kent Tamura  <tkent@chromium.org>
380
381         [Chromium] attempt to build fix for Chromium-mac.
382         r116697 introduced an override of a system function. It's intentional
383         and WebCoreTextFieldCell should be in the whitelist.
384
385         * WebCore.gyp/WebCore.gyp:
386
387 2012-05-10  Anders Carlsson  <andersca@apple.com>
388
389         PDF files won't scroll in Safari when using Adobe plug-in
390         https://bugs.webkit.org/show_bug.cgi?id=86167
391         <rdar://problem/11389719>
392
393         Reviewed by Sam Weinig.
394
395         * page/scrolling/ScrollingCoordinator.cpp:
396         (WebCore::computeNonFastScrollableRegion):
397         Loop over the frame view children looking for plug-in views that want wheel events
398         and add them to the non-fast scrollable region. Ideally, the plug-ins should be added
399         to the set of scrollable areas, but PluginView in WebKit2 is not a ScrollableArea yet.
400
401         * plugins/PluginViewBase.h:
402         (PluginViewBase):
403         (WebCore::PluginViewBase::wantsWheelEvents):
404
405 2012-05-10  Alexey Proskuryakov  <ap@apple.com>
406
407         Crash in 3rd party WebKit apps that disable cache at a wrong time
408         https://bugs.webkit.org/show_bug.cgi?id=86027
409         <rdar://problem/10615880>
410
411         Reviewed by Antti Koivisto.
412
413         Added an API test.
414
415         The fix is to use CachedResourceHandle throughout MemoryCache, which will certainly
416         keep the resource alive. Also removed earlier fixes.
417
418         * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::cachedImageSet):
419         * css/CSSImageValue.cpp: (WebCore::CSSImageValue::cachedImage):
420         * css/WebKitCSSShaderValue.cpp: (WebCore::WebKitCSSShaderValue::cachedShader):
421         * history/PageCache.cpp: (WebCore::PageCache::releaseAutoreleasedPagesNow):
422         * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement):
423         * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::load):
424         * loader/cache/CachedResourceLoader.cpp:
425         (WebCore::CachedResourceLoader::requestImage):
426         (WebCore::CachedResourceLoader::requestFont):
427         (WebCore::CachedResourceLoader::requestTextTrack):
428         (WebCore::CachedResourceLoader::requestShader):
429         (WebCore::CachedResourceLoader::requestCSSStyleSheet):
430         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
431         (WebCore::CachedResourceLoader::requestScript):
432         (WebCore::CachedResourceLoader::requestXSLStyleSheet):
433         (WebCore::CachedResourceLoader::requestSVGDocument):
434         (WebCore::CachedResourceLoader::requestLinkResource):
435         (WebCore::CachedResourceLoader::requestRawResource):
436         (WebCore::CachedResourceLoader::requestResource):
437         (WebCore::CachedResourceLoader::revalidateResource):
438         (WebCore::CachedResourceLoader::loadResource):
439         (WebCore::CachedResourceLoader::requestPreload):
440         * loader/cache/CachedResourceLoader.h: (CachedResourceLoader):
441         * loader/cache/MemoryCache.h: (WebCore::MemoryCache::setPruneEnabled):
442
443         * loader/cache/CachedResourceHandle.h:
444         (WebCore::CachedResourceHandle::CachedResourceHandle):
445         (WebCore::CachedResourceHandle::operator=):
446         Teach CachedResourceHandle how to make CachedResourceHandle<CachedResource> from
447         a handle to subclass.
448
449 2012-05-10  Tien-Ren Chen  <trchen@chromium.org>
450
451         Eliminate duplicated code for culled line box in RenderInline
452         https://bugs.webkit.org/show_bug.cgi?id=85725
453
454         This patch extracts the common part of culledInlineBoundingBox() /
455         culledInlineAbsoluteRects() / culledInlineAbsoluteQuads() to become a
456         template function generateCulledLineBoxRects(). The template function
457         accepts a new parameter, GeneratorContext functor, which will be
458         invoked everytime a new line box rect has been generated. The generated
459         rect will be in local coordinate. The functor will be responsible for
460         appropriate transformation, then appending to vector or union with
461         existing bounding box.
462
463         Reviewed by Eric Seidel.
464
465         No new tests. No change in behavior.
466
467         * rendering/RenderInline.cpp:
468         (WebCore):
469         (WebCore::RenderInline::generateLineBoxRects):
470         (WebCore::RenderInline::generateCulledLineBoxRects):
471         (WebCore::RenderInline::absoluteRects):
472         (WebCore::RenderInline::absoluteQuads):
473         (WebCore::RenderInline::linesBoundingBox):
474         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
475         (WebCore::RenderInline::addFocusRingRects):
476         * rendering/RenderInline.h:
477         (RenderInline):
478
479 2012-05-10  Abhishek Arya  <inferno@chromium.org>
480
481         Crash in swapInNodePreservingAttributesAndChildren.
482         https://bugs.webkit.org/show_bug.cgi?id=85197
483  
484         Reviewed by Ryosuke Niwa.
485  
486         Keep the children in a ref vector before adding them to newNode.
487         They can get destroyed due to mutation events.
488
489         No new tests because we don't have a reduction.
490
491         * editing/ReplaceNodeWithSpanCommand.cpp:
492         (WebCore::swapInNodePreservingAttributesAndChildren):
493
494 2012-05-10  Shinya Kawanaka  <shinyak@chromium.org>
495
496         [Refactoring] Move Selection from DOMWindow to TreeScope.
497         https://bugs.webkit.org/show_bug.cgi?id=82699
498
499         Reviewed by Ryosuke Niwa.
500
501         Since ShadowRoot will also manage its own version of DOMSelection, we would like to
502         share the code among Document and DOMSelection. This patch moves DOMSelection from DOMWindow to TreeScope
503         so that ShadowRoot can also use it.
504
505         No new tests, should covered by existing tests.
506
507         * dom/Document.cpp:
508         (WebCore::Document::updateFocusAppearanceTimerFired):
509         * dom/Document.h:
510         (Document):
511         * dom/ShadowRoot.cpp:
512         (WebCore::ShadowRoot::selection):
513         * do/mTreeScope.cpp:
514         (WebCore::TreeScope::~TreeScope):
515         (WebCore::TreeScope::getSelection):
516         (WebCore):
517         * dom/TreeScope.h:
518         (WebCore):
519         (TreeScope):
520         * page/DOMSelection.cpp:
521         (WebCore::DOMSelection::DOMSelection):
522         (WebCore::DOMSelection::clearTreeScope):
523         (WebCore):
524         * page/DOMSelection.h:
525         (WebCore):
526         (WebCore::DOMSelection::create):
527         (DOMSelection):
528         (WebCore::DOMSelection::frame):
529         * page/DOMWindow.cpp:
530         (WebCore::DOMWindow::~DOMWindow):
531         (WebCore::DOMWindow::clearDOMWindowProperties):
532         (WebCore::DOMWindow::getSelection):
533         * page/DOMWindow.h:
534         (DOMWindow):
535
536 2012-05-10  Kent Tamura  <tkent@chromium.org>
537
538         Unreviewed, rolling out r116594.
539         http://trac.webkit.org/changeset/116594
540         https://bugs.webkit.org/show_bug.cgi?id=86013
541
542         r116594 might have made some composition tests flaky.
543
544         * platform/graphics/chromium/LayerChromium.cpp:
545         (WebCore::LayerChromium::addAnimation):
546         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
547         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
548         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
549         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
550         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
551         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
552         (CCLayerTreeHost):
553         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
554         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
555         * platform/graphics/chromium/cc/CCProxy.h:
556         (CCProxy):
557         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
558         (WebCore::CCSingleThreadProxy::CCSingleThreadProxy):
559         (WebCore::CCSingleThreadProxy::doComposite):
560         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
561         (WebCore):
562         * platform/graphics/chromium/cc/CCThreadProxy.h:
563         (CCThreadProxy):
564
565 2012-05-10  Michael Nordman  <michaeln@google.com>
566
567         [chromium] DomStorage events handling needs TLC (2)
568         https://bugs.webkit.org/show_bug.cgi?id=85221
569         Alter the StorageArea virtual interface such that the mutators no longer
570         return old values. This is to allow implementations of the interface to operate
571         more asynchronously.
572
573         Reviewed by Adam Barth.
574
575         No new tests. Existing tests cover this.
576
577         * storage/StorageArea.h: Alter the interface so the mutators no longer return previous values
578         * storage/StorageAreaImpl.cpp:
579         (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame):  removed an unneeded PLATFORM(CHROMIUM) guard
580         (WebCore::StorageAreaImpl::setItem): no longer return the old value
581         (WebCore::StorageAreaImpl::removeItem): no longer return the old value
582         (WebCore::StorageAreaImpl::clear): no longer return whether something was cleared
583         * storage/StorageAreaImpl.h: match StorageArea's virtual interface
584
585 2012-05-10  Beth Dakin  <bdakin@apple.com>
586
587         https://bugs.webkit.org/show_bug.cgi?id=86158
588         Overlay scrollbars without layers never paint in overflow regions in 
589         tiled drawing mode
590         -and corresponding-
591         <rdar://problem/11289546>
592
593         Reviewed by Darin Adler.
594
595         RenderLayers paint scrollbars that do not have their own layers by 
596         running a second pass through the layer tree after the layer tree has 
597         painted. This ensures that the scrollbars always paint on top of 
598         content. However, this mechanism was relying on 
599         FrameView::paintContents() as a choke-point for all painting to 
600         trigger the second painting pass. That is not a reasonable choke-point 
601         in tiled drawing, so this patch adds similar code to 
602         RenderLayerBacking.
603
604         Only opt into the second painting pass for scrollbars that do not have 
605         their own layers.
606         * rendering/RenderLayer.cpp:
607         (WebCore::RenderLayer::paintOverflowControls):
608         
609         A layer that paints into its backing cannot return early here if it 
610         has overlay scrollbars to paint.
611         (WebCore::RenderLayer::paintLayer):
612         
613         This replicates code in FrameView::paintContents(). After painting the 
614         owning layer, do a second pass if there are overlay scrollbars to 
615         paint.
616         * rendering/RenderLayerBacking.cpp:
617         (WebCore::RenderLayerBacking::paintIntoLayer):
618
619 2012-05-10  Anders Carlsson  <andersca@apple.com>
620
621         Well, at least fixing the GTK+ build is something!
622
623         * platform/gtk/LocalizedStringsGtk.cpp:
624         (WebCore::insecurePluginVersionText):
625         (WebCore):
626
627 2012-05-10  Anders Carlsson  <andersca@apple.com>
628
629         Add insecurePluginVersionText stubs.
630
631         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
632         (WebCore::insecurePluginVersionText):
633         (WebCore):
634         * platform/efl/LocalizedStringsEfl.cpp:
635         (WebCore::insecurePluginVersionText):
636         (WebCore):
637         * platform/qt/LocalizedStringsQt.cpp:
638         (WebCore::insecurePluginVersionText):
639         (WebCore):
640
641 2012-05-10  Sheriff Bot  <webkit.review.bot@gmail.com>
642
643         Unreviewed, rolling out r116677.
644         http://trac.webkit.org/changeset/116677
645         https://bugs.webkit.org/show_bug.cgi?id=86159
646
647         This patch causes linker error to some mac bots (Requested by
648         jianli_ on #webkit).
649
650         * WebCore.exp.in:
651         * dom/ContainerNode.h:
652         * dom/Node.cpp:
653         (WebCore::Node::traverseNextNode):
654         (WebCore::Node::traverseNextSibling):
655         * dom/Node.h:
656         (Node):
657
658 2012-05-10  Abhishek Arya  <inferno@chromium.org>
659
660         Crash in FontCache::releaseFontData due to infinite float size.
661         https://bugs.webkit.org/show_bug.cgi?id=86110
662
663         Reviewed by Andreas Kling.
664
665         New callers always forget to clamp the font size, which overflows
666         to infinity on multiplication. It is best to clamp it at the end
667         to avoid getting greater than std::numeric_limits<float>::max().
668
669         Test: fast/css/large-font-size-crash.html
670
671         * platform/graphics/FontDescription.h:
672         (WebCore::FontDescription::setComputedSize):
673         (WebCore::FontDescription::setSpecifiedSize):
674
675 2012-05-10  Beth Dakin  <bdakin@apple.com>
676
677         https://bugs.webkit.org/show_bug.cgi?id=82131
678         [Mac] REGRESSION (r110480): Text field that specifies background-color 
679         (or is auto-filled) gets un-themed border
680         -and corresponding-
681         <rdar://problem/11115221>
682
683         Reviewed by Maciej Stachowiak.
684
685         This change rolls out r110480 which is what caused styled text fields 
686         to get the un-themed border, and it does a bunch of work to make sure 
687         we get the pretty, new version of the NSTextField art whenever 
688         possible. We do this differently for post-Lion OS's since there is now 
689         a way to opt into it all the time. Lion and SnowLeopard can only use 
690         the new art in HiDPI mode when the background color of the text field 
691         is just white.
692
693         RenderThemeMac::textField() takes a boolean paramter used to determine 
694         if the new gradient will be used.
695         * rendering/RenderThemeMac.h:
696         (RenderThemeMac):
697         
698         This is the post-Lion workaround. This code has no effect on Lion and 
699         SnowLeopard. This allows up to opt into a version of [NSTextField drawWithFrame:] that will only draw the frame of the text field; without this, it will draw the frame and the background, which creates a number of problems with styled text fields and text fields in HiDPI. There is a less comprehesive workaround for Lion and SnowLeopard in place in RenderThemeMac::textField().
700         * rendering/RenderThemeMac.mm:
701         (-[WebCoreTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:]):
702         
703         This is the roll-out of r110480.
704         (WebCore::RenderThemeMac::isControlStyled):
705         
706         See the comments for a full explanation, but this is mostly code for 
707         Lion and SnowLeopard to determine if we can opt into the new artwork.
708         (WebCore::RenderThemeMac::paintTextField):
709         (WebCore::RenderThemeMac::textField):
710
711 2012-05-10  Anders Carlsson  <andersca@apple.com>
712
713         WebKit1: Add a way to blacklist specific plug-ins/plug-in versions
714         https://bugs.webkit.org/show_bug.cgi?id=86150
715         <rdar://problem/9551196>
716
717         Reviewed by Sam Weinig.
718
719         * English.lproj/Localizable.strings:
720         Update.
721
722         * loader/SubframeLoader.cpp:
723         (WebCore::SubframeLoader::loadPlugin):
724         It is possible that the client has already set the unavailability reason so don't try to set it twice.
725
726         * platform/LocalizedStrings.cpp:
727         (WebCore::insecurePluginVersionText):
728         * platform/LocalizedStrings.h:
729         Add insecure plug-in version text.
730
731         * rendering/RenderEmbeddedObject.cpp:
732         (WebCore::RenderEmbeddedObject::unavailablePluginReplacementText):
733         * rendering/RenderEmbeddedObject.h:
734         Add InsecurePluginVersion unavailability reason.
735
736 2012-05-10  Eric Seidel  <eric@webkit.org>
737
738         Make IFRAME_SEAMLESS child documents inherit styles from their parent iframe element
739         https://bugs.webkit.org/show_bug.cgi?id=85940
740
741         Reviewed by Ojan Vafai.
742
743         The HTML5 <iframe seamless> spec says:
744         In a CSS-supporting user agent: the user agent must, for the purpose of CSS property
745         inheritance only, treat the root element of the active document of the iframe
746         element's nested browsing context as being a child of the iframe element.
747         (Thus inherited properties on the root element of the document in the
748         iframe will inherit the computed values of those properties on the iframe
749         element instead of taking their initial values.)
750
751         Initially I implemented this support to the letter of the spec. However, doing so I learned
752         that WebKit has a RenderStyle for the Document Node, not just the root element of the document.
753         In this RenderStyle on the Document, we add a bunch of per-document styles from settings
754         including designMode.
755
756         This change makes StyleResolver::styleForDocument inherit style from the parent iframe's
757         style, before applying any of these per-document styles.  This may or may not be correct
758         depending on what behavior we want for rtl-ordering, page-zoom, locale, design mode, etc.
759         For now, we continue to treat the iframe's document as independent in these regards, and
760         the settings on that document override those inherited from the iframe.
761
762         Also, intially when making this work, I added redirects in recalcStyle and scheduleStyleRecalc
763         from the child document to the parent document in the case of seamless (since the parent
764         document effectively manages the style resolve and layout of the child in seamless mode).
765         However, I was not able to find a test which depended on this code change, so in this final patch
766         I have removed both of these modifications and replaced them with FIXMEs.  Based on discussions
767         with Ojan and James Robinson, I believe both of those changes may eventually be wanted.
768
769         This change basically does 3 things:
770         1.  Makes StyleResolver::styleForDocument inherit from the parent iframe.
771         2.  Makes any recalcStyle calls on the iframe propogate down into the child document (HTMLIFrameElement::didRecalcStyle).
772         3.  Makes Document::recalcStyle aware of the fact that the Document's style *can* change
773             for reasons other than recalcStyle(Force).
774
775         I'm open to more testing suggestions, if reviewers have settings on the Document's style
776         that you want to make sure we inherit from the parent iframe, or don't inherit, etc.
777         I view this as a complete solution to this aspect of the current <iframe seamless> spec,
778         but likely not the last code we will write for this aspect of the seamless feature. :)
779
780         Tested by fast/frames/seamlesss/seamless-css-cascade.html and seamless-designMode.html
781
782         * css/StyleResolver.cpp:
783         (WebCore::StyleResolver::collectMatchingRulesForList):
784         * dom/Document.cpp:
785         (WebCore::Document::scheduleStyleRecalc):
786         (WebCore::Document::recalcStyle):
787         * html/HTMLIFrameElement.cpp:
788         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
789         (WebCore::HTMLIFrameElement::didRecalcStyle):
790         (WebCore):
791         * html/HTMLIFrameElement.h:
792         (HTMLIFrameElement):
793
794 2012-05-10  Julien Chaffraix  <jchaffraix@webkit.org>
795
796         Crash in computedCSSPadding* functions due to RenderImage::imageDimensionsChanged called during attachment
797         https://bugs.webkit.org/show_bug.cgi?id=85912
798
799         Reviewed by Eric Seidel.
800
801         Tests: fast/images/link-body-content-imageDimensionChanged-crash.html
802                fast/images/script-counter-imageDimensionChanged-crash.html
803
804         The bug comes from CSS generated images that could end up calling imageDimensionsChanged during attachment. As the
805         rest of the code (e.g. computedCSSPadding*) would assumes that we are already inserted in the tree, we would crash.
806
807         The solution is to bail out in this case as newly inserted RenderObject will trigger layout later on and properly
808         handle what we would be doing as part of imageDimensionChanged (the only exception being updating our intrinsic
809         size which should be done as part of imageDimensionsChanged).
810
811         * rendering/RenderImage.cpp:
812         (WebCore::RenderImage::imageDimensionsChanged):
813
814 2012-05-10  Adam Barth  <abarth@webkit.org>
815
816         ASSERT in BidiResolver<Iterator, Run>::commitExplicitEmbedding makes running debug builds annoying
817         https://bugs.webkit.org/show_bug.cgi?id=86140
818
819         Reviewed by Eric Seidel.
820
821         The correct fix here is to resolve
822         https://bugs.webkit.org/show_bug.cgi?id=76574, but in the mean time,
823         this ASSERT is annoying.
824
825         * platform/text/BidiResolver.h:
826         (WebCore::::commitExplicitEmbedding):
827
828 2012-05-10  Mark Pilgrim  <pilgrim@chromium.org>
829
830         [Chromium] Call addTraceEvent and getTraceCategoryEnabledFlag directly
831         https://bugs.webkit.org/show_bug.cgi?id=85399
832
833         Reviewed by Adam Barth.
834
835         Part of a refactoring series. See tracking bug 82948.
836
837         * CMakeLists.txt:
838         * GNUmakefile.list.am:
839         * Target.pri:
840         * WebCore.gypi:
841         * WebCore.vcproj/WebCore.vcproj:
842         * WebCore.xcodeproj/project.pbxproj:
843         * platform/EventTracer.cpp: Added.
844         (WebCore):
845         (WebCore::EventTracer::getTraceCategoryEnabledFlag):
846         (WebCore::EventTracer::addTraceEvent):
847         * platform/EventTracer.h: Added.
848         (WebCore):
849         (EventTracer):
850         * platform/chromium/EventTracerChromium.cpp: Added.
851         (WebCore):
852         (WebCore::EventTracer::getTraceCategoryEnabledFlag):
853         (WebCore::EventTracer::addTraceEvent):
854         * platform/chromium/PlatformSupport.h:
855         * platform/chromium/TraceEvent.h:
856
857 2012-05-10  Adam Barth  <abarth@webkit.org>
858
859         ScrollView::fixedVisibleContentRect should be public
860         https://bugs.webkit.org/show_bug.cgi?id=86147
861
862         Reviewed by Eric Seidel.
863
864         Some code in the WebKit layer of OS(ANDROID) uses this function. That
865         could will be upstreamed in a later patch. For now, this patch just
866         makes this function public so that we remove the diff to this file.
867
868         * platform/ScrollView.h:
869         (WebCore::ScrollView::fixedVisibleContentRect):
870         (WebCore::ScrollView::delegatesScrollingDidChange):
871
872 2012-05-10  Anders Carlsson  <andersca@apple.com>
873
874         Rename the missing plug-in indicator to the unavailable plug-in indicator
875         https://bugs.webkit.org/show_bug.cgi?id=86136
876
877         Reviewed by Sam Weinig.
878
879         Since the indicator is shown for more than just missing plug-ins, generalize it and use a plug-in unavailability
880         reason enum to make it easier to extend. Also, pass the unavailability reason to the ChromeClient member functions.
881
882         * WebCore.exp.in:
883         * html/HTMLEmbedElement.cpp:
884         (WebCore::HTMLEmbedElement::updateWidget):
885         * html/HTMLObjectElement.cpp:
886         (WebCore::HTMLObjectElement::updateWidget):
887         * html/HTMLPlugInElement.cpp:
888         (WebCore::HTMLPlugInElement::defaultEventHandler):
889         * html/HTMLPlugInImageElement.cpp:
890         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
891         * loader/SubframeLoader.cpp:
892         (WebCore::SubframeLoader::loadPlugin):
893         * page/ChromeClient.h:
894         (WebCore::ChromeClient::shouldUnavailablePluginMessageBeButton):
895         (WebCore::ChromeClient::unavailablePluginButtonClicked):
896         * page/FrameView.cpp:
897         (WebCore::FrameView::updateWidget):
898         * rendering/RenderEmbeddedObject.cpp:
899         (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
900         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
901         (WebCore::RenderEmbeddedObject::showsUnavailablePluginIndicator):
902         (WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsPressed):
903         (WebCore::RenderEmbeddedObject::paint):
904         (WebCore::RenderEmbeddedObject::paintReplaced):
905         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
906         (WebCore::RenderEmbeddedObject::unavailablePluginReplacementText):
907         (WebCore):
908         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
909         (WebCore::shouldUnavailablePluginMessageBeButton):
910         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
911         (WebCore::RenderEmbeddedObject::getCursor):
912         * rendering/RenderEmbeddedObject.h:
913         (RenderEmbeddedObject):
914
915 2012-05-10  Brady Eidson  <beidson@apple.com>
916
917         <rdar://problem/10972577> and https://bugs.webkit.org/show_bug.cgi?id=80170
918         Contents of noscript elements turned into strings in WebArchives
919
920         Reviewed by Andy Estes.
921
922         There's a much deeper question about how innerHTML of <noscript> is expected to work in 
923         both a scripting and non-scripting environment that we should pursue separately.
924
925         But for webarchives, we can solve this by filtering out the <noscript> elements completely 
926         if scripting is enabled.
927
928         Test: webarchive/ignore-noscript-if-scripting-enabled.html
929
930         * WebCore.exp.in:
931
932         Add arguments to createMarkup and MarkupAccumulator methods to pass a Vector of QualifiedNames
933         that should be filtered from the resulting markup:
934         * editing/MarkupAccumulator.cpp:
935         (WebCore::MarkupAccumulator::serializeNodes):
936         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
937         * editing/MarkupAccumulator.h:
938         * editing/markup.cpp:
939         (WebCore::createMarkup):
940         * editing/markup.h:
941
942         If scripting is enabled, add the noscriptTag to the tag names to filter:
943         * loader/archive/cf/LegacyWebArchive.cpp:
944         (WebCore::LegacyWebArchive::create):
945
946 2012-05-10  Abhishek Arya  <inferno@chromium.org>
947
948         Crash due to floats not removed from first-letter element.
949         https://bugs.webkit.org/show_bug.cgi?id=86019
950
951         Reviewed by Julien Chaffraix.
952
953         Move clearing logic of a floating/positioned object from removeChild
954         to removeChildNode. There are lot of places which use removeChildNode
955         directly and hence the object is not removed from the floating or
956         positioned objects list.
957
958         Test: fast/block/float/float-not-removed-from-first-letter.html
959
960         * rendering/RenderObject.cpp:
961         (WebCore::RenderObject::removeChild):
962         * rendering/RenderObjectChildList.cpp:
963         (WebCore::RenderObjectChildList::removeChildNode):
964
965 2012-05-10  Andreas Kling  <kling@webkit.org>
966
967         Remove empty ElementAttributeData destructor.
968         <http://webkit.org/b/86126>
969
970         Reviewed by Antti Koivisto.
971
972         * dom/ElementAttributeData.cpp:
973         * dom/ElementAttributeData.h:
974
975 2012-05-10  Yury Semikhatsky  <yurys@chromium.org>
976
977         Web Inspector: heap snapshot comparison view is broken
978         https://bugs.webkit.org/show_bug.cgi?id=86102
979
980         Reviewed by Pavel Feldman.
981
982         Pass HeapSnapshotProxy instead of undefined to the profile load callback. Added
983         compiler annotations to avoid such errors in the future.
984
985         * inspector/front-end/HeapSnapshotView.js:
986
987 2012-05-10  Zan Dobersek  <zandobersek@gmail.com>
988
989         [GTK] ENABLE_IFRAME_SEAMLESS support
990         https://bugs.webkit.org/show_bug.cgi?id=85843
991
992         Reviewed by Eric Seidel.
993
994         Export the ENABLE_IFRAME_SEAMLESS feature define when the feature is
995         enabled.
996
997         No new tests - all the related tests should now be passing.
998
999         * GNUmakefile.am:
1000
1001 2012-05-10  Antti Koivisto  <antti@apple.com>
1002
1003         Inline Node::traverseNextNode
1004         https://bugs.webkit.org/show_bug.cgi?id=85844
1005
1006         Reviewed by Ryosuke Niwa.
1007         
1008         Inline traverseNextNode and traverseNextSibling to reduce entry/exit overhead and allow better code generation
1009         for many hot loops.
1010
1011         In this version only the firstChild()/nextSibling() tests are inlined and the ancestor traversal is not.
1012         
1013         Performance bots will tell if this was worthwhile.
1014
1015         * dom/ContainerNode.h:
1016         (WebCore::Node::traverseNextNode):
1017         (WebCore):
1018         (WebCore::Node::traverseNextSibling):
1019         * dom/Node.cpp:
1020         (WebCore::Node::traverseNextAncestorSibling):
1021         * dom/Node.h:
1022         (Node):
1023
1024 2012-05-10  Tommy Widenflycht  <tommyw@google.com>
1025
1026         MediaStream API: Fix MediaHints parsing
1027         https://bugs.webkit.org/show_bug.cgi?id=86098
1028
1029         Reviewed by Adam Barth.
1030
1031         Not currently testable. Working on a series of patches that will fix that.
1032
1033         * Modules/mediastream/PeerConnection00.cpp:
1034         (WebCore::PeerConnection00::createMediaHints):
1035
1036 2012-05-10  Tommy Widenflycht  <tommyw@google.com>
1037
1038         [chromium] MediaStream API: Fix the ExtraData functionality in WebMediaStreamDescriptor
1039         https://bugs.webkit.org/show_bug.cgi?id=86087
1040
1041         Reviewed by Adam Barth.
1042
1043         Not easy to test but I have added code that excercises this to WebUserMediaClientMock (in DumpRenderTree).
1044
1045         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
1046         (WebKit::WebMediaStreamDescriptor::setExtraData):
1047
1048 2012-05-10  Pavel Feldman  <pfeldman@chromium.org>
1049
1050         Web Inspector: search title is shown beside the search field (not under) in the vertical mode.
1051         https://bugs.webkit.org/show_bug.cgi?id=86120
1052
1053         Reviewed by Yury Semikhatsky.
1054
1055         This change makes search title render as placeholder at all times.
1056         It also adjusts the size of the search field when navigation arrows appear.
1057
1058         * inspector/front-end/SearchController.js:
1059         (WebInspector.SearchController):
1060         (WebInspector.SearchController.prototype.updateSearchLabel):
1061         (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
1062         (WebInspector.SearchController.prototype._createSearchNavigationButton):
1063         * inspector/front-end/inspector.css:
1064         (#toolbar-search-item):
1065         (.with-navigation-buttons #search):
1066         (.toolbar-search-navigation-label):
1067         (.with-navigation-buttons .toolbar-search-navigation-label):
1068         * inspector/front-end/inspector.html:
1069
1070 2012-05-10  Varun Jain  <varunjain@google.com>
1071
1072         [chromium] Trigger context menu for long press gesture
1073         https://bugs.webkit.org/show_bug.cgi?id=85919
1074
1075         Reviewed by Adam Barth.
1076
1077         Test: fast/events/touch/gesture/context-menu-on-long-press.html
1078
1079         * page/EventHandler.cpp:
1080         (WebCore):
1081         (WebCore::EventHandler::sendContextMenuEventForGesture):
1082         * page/EventHandler.h:
1083         (EventHandler):
1084
1085 2012-05-10  Abhishek Arya  <inferno@chromium.org>
1086
1087         Crash in ApplyStyleCommand::joinChildTextNodes.
1088         https://bugs.webkit.org/show_bug.cgi?id=85939
1089
1090         Reviewed by Ryosuke Niwa.
1091
1092         Test: editing/style/apply-style-join-child-text-nodes-crash.html
1093
1094         * editing/ApplyStyleCommand.cpp:
1095         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): add conditions
1096         to bail out if our start and end position nodes are removed due to 
1097         mutation events in joinChildTextNodes.
1098         (WebCore::ApplyStyleCommand::applyInlineStyle): this executes after
1099         applyRelativeFontStyleChange in ApplyStyleCommand::doApply. So, need
1100         to bail out if our start and end position nodes are removed due to
1101         mutation events.
1102         (WebCore::ApplyStyleCommand::joinChildTextNodes): hold all the children
1103         in a ref vector to prevent them from getting destroyed due to mutation events.
1104
1105 2012-05-10  Erik Arvidsson  <arv@chromium.org>
1106
1107         Unreviewed, rebaselined run-bindings-tests results.
1108
1109         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1110         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
1111         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
1112         * bindings/scripts/test/JS/JSTestObj.cpp:
1113         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
1114         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
1115         * bindings/scripts/test/V8/V8TestException.cpp:
1116         (WebCore::V8TestException::wrapSlow):
1117         * bindings/scripts/test/V8/V8TestException.h:
1118         (WebCore::V8TestException::wrap):
1119
1120 2012-05-10  Abhishek Arya  <inferno@chromium.org>
1121
1122         Crash in InsertParagraphSeparatorCommand::doApply.
1123         https://bugs.webkit.org/show_bug.cgi?id=84995
1124
1125         Reviewed by Ryosuke Niwa.
1126
1127         Test: editing/inserting/insert-paragraph-seperator-crash.html
1128
1129         * editing/DeleteSelectionCommand.cpp:
1130         (WebCore::DeleteSelectionCommand::mergeParagraphs): no need of static cast, since
1131         type of enclosingBlock returned is already Element*.
1132         * editing/IndentOutdentCommand.cpp:
1133         (WebCore::IndentOutdentCommand::tryIndentingAsListItem): no need of static cast, since
1134         type of enclosingBlock returned is already Element*.
1135         * editing/InsertParagraphSeparatorCommand.cpp:
1136         (WebCore::InsertParagraphSeparatorCommand::doApply): RefPtr startBlock to guard against
1137         mutation events.
1138         * editing/htmlediting.cpp:
1139         (WebCore::enclosingBlock): make sure type of enclosingNode is an element before doing
1140         the static cast. This was already failing in a couple of layout tests. Also, isBlock
1141         check already exists in the function call to enclosingNodeOfType, so don't need it
1142         again on enclosingNode's renderer.
1143         * editing/htmlediting.h: 
1144         (WebCore):
1145
1146 2012-05-10  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1147
1148         TouchAdjustment doesn't correct for scroll-offsets.
1149         https://bugs.webkit.org/show_bug.cgi?id=86083
1150
1151         Reviewed by Kenneth Rohde Christiansen.
1152
1153         Already tested by: touchadjustment/scroll-delegation
1154
1155         * page/EventHandler.cpp:
1156         (WebCore::EventHandler::bestClickableNodeForTouchPoint):
1157         (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
1158         * page/TouchAdjustment.cpp:
1159         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
1160         * testing/Internals.cpp:
1161         (WebCore::Internals::bestZoomableAreaForTouchPoint):
1162
1163 2012-05-10  Konrad Piascik  <kpiascik@rim.com>
1164
1165         Fix typo in filename
1166         https://bugs.webkit.org/show_bug.cgi?id=86095
1167
1168         Reviewed by Andreas Kling.
1169
1170         * UseJSC.cmake:
1171
1172 2012-05-10  Stephen Chenney  <schenney@chromium.org>
1173
1174         SVG Filters allow invalid elements as children
1175         https://bugs.webkit.org/show_bug.cgi?id=83979
1176
1177         Reviewed by Nikolas Zimmermann.
1178
1179         According to the SVG spec, there are numerous restrictions on the
1180         content of nodes (that is, their children). Specific to this problem,
1181         SVGFilter elements may only contain SVGFilterPrimitive elements, and
1182         those may only contain animation related elements. This patch enforces
1183         the restriction on filters in the render tree, thus preventing us from
1184         having (for instance) content that is inside a filter yet filtered by
1185         the filter.
1186
1187         Manual test: ManualTests/bugzilla-83979.svg
1188
1189         * svg/SVGFilterElement.cpp:
1190         (WebCore::SVGFilterElement::childShouldCreateRenderer): Added to only allow renderers for fe* children
1191         (WebCore):
1192         * svg/SVGFilterElement.h:
1193         (SVGFilterElement):
1194         * svg/SVGFilterPrimitiveStandardAttributes.h: Do not allow any children at all for fe* elements.
1195         (SVGFilterPrimitiveStandardAttributes):
1196
1197 2012-05-10  Joe Thomas  <joethomas@motorola.com>
1198
1199         [CSS3 Backgrounds and Borders] Add background-size to the background shorthand
1200         https://bugs.webkit.org/show_bug.cgi?id=27577
1201
1202         Reviewed by Alexis Menard.
1203
1204         Added CSSPropertyBackgroundSize to the background shorthand propery. Added the logic for parsing background-size.
1205         bakground-size appears after background-position followed by a '/'.
1206         The specification related to this change is http://www.w3.org/TR/css3-background/#the-background
1207
1208         Tests: fast/backgrounds/background-shorthand-with-backgroundSize-style.html
1209                fast/backgrounds/size/backgroundSize-in-background-shorthand.html
1210
1211         * css/CSSComputedStyleDeclaration.cpp:
1212         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1213         (WebCore::CSSComputedStyleDeclaration::getBackgroundShorthandValue):
1214         (WebCore):
1215         * css/CSSComputedStyleDeclaration.h:
1216         (CSSComputedStyleDeclaration):
1217         * css/CSSParser.cpp:
1218         (WebCore::CSSParser::parseValue):
1219         (WebCore::CSSParser::parseFillShorthand):
1220         * css/StylePropertySet.cpp:
1221         (WebCore::StylePropertySet::getLayeredShorthandValue):
1222         * css/StylePropertyShorthand.cpp:
1223         (WebCore):
1224         (WebCore::backgroundShorthand):
1225
1226 2012-05-10  MORITA Hajime <morrita@google.com>
1227
1228         Node::InDetachFlag could be removed.
1229         https://bugs.webkit.org/show_bug.cgi?id=85963
1230
1231         Reviewed by Antti Koivisto.
1232
1233         Removed Node::inDetach() since it can never true
1234         on the only call site setFocusedNode().
1235
1236         No new test. Covered by existing tests.
1237
1238         * dom/Document.cpp:
1239         (WebCore::Document::setFocusedNode):
1240         * dom/Node.cpp:
1241         (WebCore::Node::detach):
1242         * dom/Node.h:
1243         (WebCore):
1244         (Node):
1245
1246 2012-05-10  Keishi Hattori  <keishi@webkit.org>
1247
1248         Crash in HTMLFormControlElement::m_fieldSetAncestor
1249         https://bugs.webkit.org/show_bug.cgi?id=86070
1250
1251         Reviewed by Kent Tamura.
1252
1253         No new tests.
1254
1255         The previous patch r115990 didn't completely resolve the crash (Bug 85453)
1256         We don't have a reproducible test case, so we are reverting to the old code for setting m_fieldSetAncestor.
1257
1258         * html/HTMLFormControlElement.cpp:
1259         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
1260         (WebCore::HTMLFormControlElement::updateFieldSetAndLegendAncestor):
1261         (WebCore::HTMLFormControlElement::insertedInto): Set m_dataListAncestorState to Unknown because ancestor has changed. Call setNeedsWillValidateCheck because style might need to be updated.
1262         (WebCore::HTMLFormControlElement::removedFrom):
1263         (WebCore::HTMLFormControlElement::disabled):
1264         (WebCore::HTMLFormControlElement::recalcWillValidate):
1265         (WebCore::HTMLFormControlElement::willValidate):
1266         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
1267         * html/HTMLFormControlElement.h:
1268         (HTMLFormControlElement): Added m_dataListAncestorState.
1269
1270 2012-05-10  Sam D  <dsam2912@gmail.com>
1271
1272         Web Inspector: rename InspectorBackendStub.js to InspectorBackendCommands.js
1273         https://bugs.webkit.org/show_bug.cgi?id=72306
1274
1275         Changed name for InspectorBackendStub.js to
1276         InspectorBackendCommands.js
1277
1278         Reviewed by Yury Semikhatsky.
1279
1280         No new tests required. File name is changed.
1281
1282         * DerivedSources.pri:
1283         * GNUmakefile.am:
1284         * Target.pri:
1285         * WebCore.gyp/WebCore.gyp:
1286         * WebCore.gypi:
1287         * WebCore.vcproj/copyWebCoreResourceFiles.cmd:
1288         * WebCore.xcodeproj/project.pbxproj:
1289         * gyp/copy-inspector-resources.sh:
1290         * inspector/CodeGeneratorInspector.py:
1291         * inspector/front-end/InspectorBackendCommands.qrc: Added.
1292         * inspector/front-end/InspectorBackendStub.qrc: Removed.
1293         * inspector/front-end/inspector.html:
1294
1295 2012-05-10  Alexis Menard  <alexis.menard@openbossa.org>
1296
1297         [Qt] Avoid string conversions to construct a QUrl when using Qt5.
1298         https://bugs.webkit.org/show_bug.cgi?id=86006
1299
1300         Reviewed by Kenneth Rohde Christiansen.
1301
1302         In Qt5, the QUrl constructor can handle the string directly, even in UTF-16 because the
1303         constructor QUrl(QString) has been fixed. Unfortunately we still need to use the old
1304         code path when building with Qt4.
1305
1306         No new tests : it's a performance improvement which should be covered by tests.
1307
1308         * platform/qt/KURLQt.cpp:
1309         (WebCore::KURL::operator QUrl):
1310
1311 2012-05-10  Noel Gordon  <noel.gordon@gmail.com>
1312
1313         [chromium] REGRESSION(r107389) Visible line artifacts on some JPEG images
1314         https://bugs.webkit.org/show_bug.cgi?id=85772
1315
1316         Reviewed by Kent Tamura.
1317
1318         On some JPEG images, vertical and horizontal lines artifacts might appear in image
1319         regions with very high frequency color variation when using DCT_IFAST decodes. Use
1320         DCT_IFAST on small screen devices only (Chromium Android).
1321
1322         No new tests. Covered by existing tests.
1323
1324         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1325         (dctMethod): Permit DCT_IFAST decoding for Chromium Android only.
1326
1327 2012-05-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1328
1329         [Qt] Implement fit-to-width behaviour
1330         https://bugs.webkit.org/show_bug.cgi?id=86085
1331
1332         Reviewed by Simon Hausmann.
1333
1334         Add a method to get the minimum scale factor that contains the content
1335         without showing any chrome background.
1336
1337         * dom/ViewportArguments.cpp:
1338         (WebCore::computeMinimumScaleFactorForContentContained):
1339         (WebCore):
1340         * dom/ViewportArguments.h:
1341         (WebCore):
1342
1343 2012-05-10  MORITA Hajime  <morrita@google.com>
1344
1345         Remove support for Node::willRemove()
1346         https://bugs.webkit.org/show_bug.cgi?id=55209
1347
1348         Reviewed by Ryosuke Niwa.
1349
1350         This change de-virtualizes Node::willRemove(), gains
1351         5% speedup on Dromaeo dom-modify.
1352
1353         Originally there were 5 willRemove() overrides:
1354         - Element
1355         - HTMLStyleElement
1356         - HTMLSourceElement
1357         - HTMLTrackElement
1358         - HTMLFrameOwnerElement
1359
1360         For first 4 items, this change moves their implementations to
1361         Node::removedFrom() overrides.
1362
1363         Then HTMLFrameOwnerElement is the only class which needs the
1364         notification.  Because it emits the "unload" event, it needs some
1365         notification _before_ its removal. To handle that, this change
1366         introduces ChildFrameDisconnector which collects
1367         corresponding decendant elements and disconnect their content frame.
1368
1369         Even though this approach doesn't kill pre-removal tree traversal
1370         completely, it's a bit more efficient due to the de-virtualization.
1371
1372         No new tests. Covered by existing test.
1373
1374         * dom/ContainerNode.cpp:
1375         (WebCore::willRemoveChild): Replaced willRemove() call with ChildFrameDisconnector.
1376         (WebCore::willRemoveChildren): Ditto.
1377         (WebCore::ContainerNode::disconnectDescendantFrames): Added. Used from FrameLoader to replace Document::willRemove() call.
1378         (WebCore):
1379         * dom/ContainerNode.h:
1380         (ContainerNode):
1381         * dom/ContainerNodeAlgorithms.cpp:
1382         (WebCore::ChildFrameDisconnector::collectDescendant):
1383         (WebCore):
1384         (WebCore::ChildFrameDisconnector::Target::disconnect):
1385         * dom/ContainerNodeAlgorithms.h:
1386         (ChildFrameDisconnector):
1387         (Target):
1388         (WebCore::ChildFrameDisconnector::Target::Target):
1389         (WebCore::ChildFrameDisconnector::Target::isValid):
1390         (WebCore):
1391         (WebCore::ChildFrameDisconnector::ChildFrameDisconnector):
1392         (WebCore::ChildFrameDisconnector::collectDescendant):
1393         (WebCore::ChildFrameDisconnector::disconnect):
1394         * dom/Element.cpp:
1395         (WebCore::Element::removedFrom):
1396         * dom/Element.h:
1397         * dom/ElementShadow.cpp:
1398         * dom/ElementShadow.h:
1399         (ElementShadow):
1400         * dom/Node.cpp:
1401         * dom/Node.h: Added IsFrameOwnerElement flag to de-virtualize IsFrameOwnerElement().
1402         (WebCore::Node::isFrameOwnerElement): De-virtualized.
1403         (Node):
1404         * html/HTMLElement.h:
1405         (HTMLElement):
1406         (WebCore::HTMLElement::HTMLElement):
1407         * html/HTMLFrameOwnerElement.cpp:
1408         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
1409         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame): Extracted from original willRemove().
1410         * html/HTMLFrameOwnerElement.h:
1411         (HTMLFrameOwnerElement):
1412         (WebCore::toFrameOwnerElement):
1413         (WebCore):
1414         * html/HTMLMediaElement.cpp:
1415         (WebCore::HTMLMediaElement::sourceWasRemoved): Renamed from sourceWillBeRemoved(), dealing with the timing change.
1416         * html/HTMLMediaElement.h:
1417         (HTMLMediaElement):
1418         (WebCore::isMediaElement):
1419         (WebCore):
1420         (WebCore::toMediaElement):
1421         * html/HTMLSourceElement.cpp:
1422         (WebCore::HTMLSourceElement::removedFrom): Moved some code from willRemove().
1423         * html/HTMLSourceElement.h:
1424         (HTMLSourceElement):
1425         * html/HTMLStyleElement.cpp:
1426         (WebCore::HTMLStyleElement::removedFrom):
1427         (WebCore):
1428         * html/HTMLStyleElement.h:
1429         (HTMLStyleElement):
1430         * html/HTMLTrackElement.cpp:
1431         (WebCore::HTMLTrackElement::removedFrom): Moved some code from willRemove().
1432         * html/HTMLTrackElement.h:
1433         (HTMLTrackElement):
1434         * loader/FrameLoader.cpp:
1435         (WebCore::FrameLoader::clear):
1436
1437 2012-05-10  Kinuko Yasuda  <kinuko@chromium.org>
1438
1439         Change the return type of Entry.toURL() back to String from KURL
1440         https://bugs.webkit.org/show_bug.cgi?id=85858
1441
1442         Reviewed by Ryosuke Niwa.
1443
1444         I once changed it from String to KURL in r116273 but it turned out that
1445         it involves implicit conversion and may incur extra overhead.
1446         This partly reverts r116273 while keeping some internal functions
1447         returning KURL as it's what we initially create as and is more
1448         convenient to operate on.
1449
1450         No new tests; no functional or visible changes.
1451
1452         * Modules/filesystem/EntryBase.cpp:
1453         (WebCore::EntryBase::toURL):
1454         * Modules/filesystem/EntryBase.h:
1455         (EntryBase):
1456
1457 2012-05-10  Alexander Pavlov  <apavlov@chromium.org>
1458
1459         Web Inspector: Autocomplete for CSS property values in the Styles pane behaving incorrectly
1460         https://bugs.webkit.org/show_bug.cgi?id=85784
1461
1462         Reviewed by Vsevolod Vlasov.
1463
1464         Before executing the number increment/decrement within CSS property value, the current word is checked
1465         for being a valid suggestion for the current property, and if it is, the numeric change is skipped
1466         in favor of the suggested property value switch by a suggest box.
1467
1468         * inspector/front-end/StylesSidebarPane.js:
1469
1470 2012-05-10  Abhishek Arya  <inferno@chromium.org>
1471
1472         Make DOMCharacterDataModified a scoped event (similar to r73690).
1473         https://bugs.webkit.org/show_bug.cgi?id=85920
1474
1475         Reviewed by Ryosuke Niwa.
1476
1477         DOMCharacterDataModified was missing in the list of already scoped
1478         DOM mutation events like DOMSubtreeModified, DOMNodeInserted, etc.
1479         It helps to delay event dispatches until the completion of each call
1480         of EditCommand::doApply. This has been useful in the past and helped to 
1481         prevent unexpected DOM tree mutations while the editing command is executing.
1482
1483         * dom/CharacterData.cpp:
1484         (WebCore::CharacterData::dispatchModifiedEvent):
1485
1486 2012-05-10  Alexandre Elias  <aelias@google.com>
1487
1488         Default to null value for HistoryItem::m_pageScaleFactor
1489         https://bugs.webkit.org/show_bug.cgi?id=84385
1490
1491         Reviewed by Adam Barth.
1492
1493         Previously, HistoryItem::m_pageScaleFactor defaulted to a value
1494         of 1, making it impossible to determine whether this value was never
1495         set, or intentionally set to 1.  This patch introduces a default value
1496         of 0 and makes restoreScrollPositionAndViewState not touch the page
1497         scale factor if this value is still present at time of reload.
1498
1499         This is a no-op change for common navigation scenarios.  The
1500         motivation for this change is the corner case of syncing history items
1501         from a desktop browser to a mobile device.  In that case, we need a
1502         way to specify that the history item does not contain a
1503         pageScaleFactor so that the mobile device does not display the page
1504         overly zoomed in.
1505
1506         No new tests.
1507
1508         * history/HistoryItem.cpp:
1509         (WebCore::HistoryItem::HistoryItem):
1510         * loader/HistoryController.cpp:
1511         (WebCore::HistoryController::restoreScrollPositionAndViewState):
1512
1513 2012-05-10  Csaba Osztrogon√°c  <ossy@webkit.org>
1514
1515         Use suitable viewport values when a Mobile DTD is used.
1516         https://bugs.webkit.org/show_bug.cgi?id=85425
1517
1518         Unreviewed debug buildfix after r116571.
1519
1520         * dom/Document.cpp:
1521         (WebCore::Document::setDocType):
1522
1523 2012-05-10  Yoshifumi Inoue  <yosin@chromium.org>
1524
1525         [Forms] Move step related methods to InputType class from HTMLInputElement class
1526         https://bugs.webkit.org/show_bug.cgi?id=85978
1527
1528         Reviewed by Kent Tamura.
1529
1530         This patch is part of re-factoring of HTMLInputElement.cpp for numeric input type.
1531         In this patch, we move implementation of getAllowedValueStep and stepUp/stepUpFromRenderer
1532         to InputType class because of these are for DateTime/Number/Range.
1533
1534         Following patches will change implementation of getAllowedValueStep to use StepRange and
1535         remove step related methods, defaultStep, stepScaleFactor, and so on.
1536
1537         No new tests. This patch should not change behavior.
1538
1539         * html/HTMLInputElement.cpp:
1540         (WebCore):
1541         (WebCore::HTMLInputElement::getAllowedValueStep):
1542         (WebCore::HTMLInputElement::stepUp):
1543         (WebCore::HTMLInputElement::stepDown):
1544         (WebCore::HTMLInputElement::stepUpFromRenderer):
1545         * html/HTMLInputElement.h:
1546         (HTMLInputElement):
1547         * html/InputType.cpp:
1548         (WebCore::InputType::applyStep):
1549         (WebCore):
1550         (WebCore::InputType::alignValueForStep):
1551         (WebCore::InputType::getAllowedValueStep):
1552         (WebCore::InputType::getAllowedValueStepWithDecimalPlaces):
1553         (WebCore::InputType::stepUp):
1554         (WebCore::InputType::stepUpFromRenderer):
1555         * html/InputType.h:
1556         (InputType):
1557
1558 2012-05-09  Kent Tamura  <tkent@chromium.org>
1559
1560         Calendar Picker: Fix a crash by changing input type.
1561         https://bugs.webkit.org/show_bug.cgi?id=86007
1562
1563         Reviewed by Hajime Morita.
1564
1565         Manual test: forms/calendar-picker-crash-by-type-change.html
1566
1567         * html/shadow/CalendarPickerElement.cpp:
1568         (WebCore::CalendarPickerElement::~CalendarPickerElement):
1569         Added. Make sure the popup is closed.
1570         * html/shadow/CalendarPickerElement.h:
1571         (CalendarPickerElement): Add declaration of the destructor.
1572
1573 2012-05-09  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1574
1575         Move suspendAnimations to use Internals interface.
1576         https://bugs.webkit.org/show_bug.cgi?id=85986
1577
1578         Reviewed by Ryosuke Niwa.
1579
1580         Add suspendAnimations functions, because it is able to work in the
1581         cross-port way through the Internals interface.
1582
1583         No new tests, since we are improving here the infra-structure for testing
1584         a specific method.
1585
1586         * testing/Internals.cpp:
1587         (WebCore::Internals::suspendAnimations):
1588         (WebCore):
1589         * testing/Internals.h:
1590         (Internals):
1591         * testing/Internals.idl:
1592
1593 2012-05-09  Charlie Reis  <creis@chromium.org>
1594
1595         Add dispatchMessageEventWithOriginCheck to DOMWindow
1596         https://bugs.webkit.org/show_bug.cgi?id=85815
1597
1598         Reviewed by Adam Barth.
1599
1600         Useful for ports that support cross-process postMessage.
1601         No new tests, since covered by existing postMessage tests.
1602
1603         * page/DOMWindow.cpp:
1604         (WebCore::DOMWindow::postMessageTimerFired):
1605         (WebCore):
1606         (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
1607         * page/DOMWindow.h:
1608         (WebCore):
1609         (DOMWindow):
1610
1611 2012-05-09  Jason Liu  <jason.liu@torchmobile.com.cn>
1612
1613         [BlackBerry] Cookie parsing issue. If the cookie value provided was (") then the browser creates a session cookie instead.
1614         https://bugs.webkit.org/show_bug.cgi?id=85775
1615
1616         Reviewed by Rob Buis.
1617
1618         Make CookieParser::parseOneCookie handle (cookiename="cookievalue;expires=xxxx) correctly.
1619         This cookie's value is "cookievalue not "cookievalue;expires=xxxx.
1620
1621         Test: http/tests/cookies/single-quoted-value.html
1622
1623         * platform/blackberry/CookieParser.cpp:
1624         (WebCore::CookieParser::parseOneCookie):
1625
1626 2012-05-09  Raymond Liu  <raymond.liu@intel.com>
1627
1628         Add multi-channels support for CopyWithGainFrom in AudioBus
1629         https://bugs.webkit.org/show_bug.cgi?id=80675
1630
1631         Reviewed by Chris Rogers.
1632
1633         * platform/audio/AudioBus.cpp:
1634         (WebCore):
1635         (WebCore::AudioBus::AudioBus):
1636         (WebCore::AudioBus::copyWithGainFrom):
1637         * platform/audio/AudioBus.h:
1638         (AudioBus):
1639
1640 2012-05-09  Jessie Berlin  <jberlin@apple.com>
1641
1642         Crash using the new WKBundleDOMWindowExtensions APIs.
1643         https://bugs.webkit.org/show_bug.cgi?id=85888
1644
1645         Reviewed by Brady Eidson.
1646
1647         WKBundlePageWillDestroyGlobalObjectForDOMWindowExtensionCallback was only being invoked when
1648         the WKPage was destroyed, and then only for the child frames. In addition, the
1649         DOMWindowExtension was holding onto a destroyed DOMWindow and attempting to unregister from
1650         when the WK2 wrapper object was attempting to destroy the DOMWindowExtension.
1651
1652         The underlying issue here was that the DOMWindowProperties were getting disconnectFrame
1653         and willDetachPage called on them at the wrong times.
1654
1655         Rename DOMWindowProperty::disconnectFrame and reconnectFrame to disconnectFrameForPageCache
1656         and reconnectFrameFromPageCache for clarity.
1657
1658         Only invoke DOMWindowProperty::disconnectFrameForPageCache when the frame is going into the
1659         page cache.
1660
1661         In the cases where the DOMWindow is getting destroyed, the frame is being destroyed, or the
1662         DOMWindow is getting cleared because the frame is being navigated, invoke
1663         DOMWindowProperty::willDestroyGlobalObjectInFrame instead of disconnectFrame.
1664
1665         Invoke DOMWindowProperty::willDetachGlobalObjectFromFrame when a document is being detached
1666         because the frame has been detached (e.g. fast/storage/storage-detached-iframe.html) and
1667         won't be immediately destroyed.
1668
1669         Invoke DOMWindowProperty::willDestroyGlobalObjectInCachedFrame when a cached frame is
1670         being destroyed.
1671
1672         New WK2 API Test: DOMWindowExtensionNoCache.
1673
1674         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
1675         (WebCore::DOMWindowIndexedDatabase::disconnectFrameForPageCache):
1676         Updated for disconnectFrame rename.
1677         (WebCore::DOMWindowIndexedDatabase::reconnectFrameFromPageCache):
1678         Updated for reconnectFrame rename.
1679         (WebCore::DOMWindowIndexedDatabase::willDestroyGlobalObjectInCachedFrame):
1680         Get rid of the suspended IDBFactory.
1681         (WebCore::DOMWindowIndexedDatabase::willDestroyGlobalObjectInFrame):
1682         Get rid of the IDBFactory.
1683         (WebCore::DOMWindowIndexedDatabase::willDetachGlobalObjectFromFrame):
1684         Ditto.
1685         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
1686
1687         * dom/Document.cpp:
1688         (WebCore::Document::prepareForDestruction):
1689         Tell the DOMWindow before detaching the Document.
1690         * dom/Document.h:
1691
1692         * history/CachedFrame.cpp:
1693         (WebCore::CachedFrame::destroy):
1694         Tell the DOMWindow.
1695
1696         * loader/FrameLoader.cpp:
1697         (WebCore::FrameLoader::clear):
1698         Use Document::prepareForDestruction so that the DOMWindow is told about the main frame
1699         navigation before detaching the Document.
1700
1701         * loader/appcache/DOMApplicationCache.cpp:
1702         (WebCore::DOMApplicationCache::disconnectFrameForPageCache):
1703         Updated for the disconnectFrame rename.
1704         (WebCore::DOMApplicationCache::reconnectFrameFromPageCache):
1705         Updated for the reconnectFrame rename.
1706         (WebCore::DOMApplicationCache::willDestroyGlobalObjectInFrame):
1707         Cover the cases formerly covered by disconnectFrame (which was sometimes being called when
1708         called when the frame was destroyed).
1709         * loader/appcache/DOMApplicationCache.h:
1710
1711         * notifications/DOMWindowNotifications.cpp:
1712         (WebCore::DOMWindowNotifications::disconnectFrameForPageCache):
1713         Updated for the disconnectFrame rename.
1714         (WebCore::DOMWindowNotifications::reconnectFrameFromPageCache):
1715         Updated for the reconnectFrame rename.
1716         (WebCore::DOMWindowNotifications::willDestroyGlobalObjectInCachedFrame):
1717         Get rid of the suspended notification center.
1718         (WebCore::DOMWindowNotifications::willDestroyGlobalObjectInFrame):
1719         Get rid of the notification center.
1720         (WebCore::DOMWindowNotifications::willDetachGlobalObjectFromFrame):
1721         Do not allow use of the notification center by detached frames.
1722         * notifications/DOMWindowNotifications.h:
1723
1724         * page/DOMWindow.cpp:
1725         (WebCore::DOMWindow::clearDOMWindowProperties):
1726         Do not call disconnectDOMWindowProperties. It is now the responsibility of the callers to
1727         tell the DOMWindowProperties the correct cause of being cleared.
1728         (WebCore::DOMWindow::~DOMWindow):
1729         Make sure the DOMWindowProperties still know that the DOMWindow is going away.
1730         (WebCore::DOMWindow::frameDestroyed):
1731         Invoke willDestroyGlobalObjectInFrame on the DOMWindowProperties.
1732         (WebCore::DOMWindow::willDetachPage):
1733         It is no longer necessary to tell the DOMWindowProperties anything here.
1734         (WebCore::DOMWindow::willDestroyCachedFrame):
1735         Tell the DOMWindowProperties.
1736         (WebCore::DOMWindow::willDestroyDocumentInFrame):
1737         Ditto.
1738         (WebCore::DOMWindow::willDetachDocumentFromFrame):
1739         Ditto.
1740         (WebCore::DOMWindow::clear):
1741         Ditto.
1742         (WebCore::DOMWindow::disconnectDOMWindowProperties):
1743         Updated for the disconnectFrame rename.
1744         (WebCore::DOMWindow::reconnectDOMWindowProperties):
1745         Ditto.
1746         * page/DOMWindow.h:
1747
1748         * page/DOMWindowExtension.cpp:
1749         (WebCore::DOMWindowExtension::DOMWindowExtension):
1750         Move the responsibility for tracking the disconnected DOMWindow to DOMWindowProperty, since
1751         DOMWindowProperty will need it to unregister the property when a cached frame is destroyed.
1752         (WebCore::DOMWindowExtension::disconnectFrameForPageCache):
1753         Remove the code to check for disconnectFrame being called twice - it is now only called when
1754         a frame goes into the page cache.
1755         Let the DOMWindowProperty keep track of the disconnected DOMWindow.
1756         (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
1757         Let the DOMWindowProperty keep track of the disconnected DOMWindow.
1758         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
1759         Dispatch the willDestroyGlobalObjectForDOMWindowExtension callback.
1760         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInFrame):
1761         Ditto, but only if the callback hasn't already been sent because the frame has been detached.
1762         (WebCore::DOMWindowExtension::willDetachGlobalObjectFromFrame):
1763         Send the callback because nothing interesting can be done in the frame once it has been
1764         detached.
1765         * page/DOMWindowExtension.h:
1766
1767         * page/DOMWindowProperty.cpp:
1768         (WebCore::DOMWindowProperty::DOMWindowProperty):
1769         Keep track of the disconnected DOMWindow so it can be used to unregister the property when a
1770         cached frame is destroyed.
1771         (WebCore::DOMWindowProperty::~DOMWindowProperty):
1772         Also unregister the property when a DOMWindowProperty for a cached frame is destroyed.
1773         (WebCore::DOMWindowProperty::disconnectFrameForPageCache):
1774         Keep track of the disconnected DOMWindow.
1775         (WebCore::DOMWindowProperty::reconnectFrameFromPageCache):
1776         Ditto.
1777         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
1778         Unregister the property from the disconnected DOMWindow.
1779         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
1780         Unregister the property from the DOMWindow and stop keeping track of the frame.
1781         (WebCore::DOMWindowProperty::willDetachGlobalObjectFromFrame):
1782         Do not set m_frame to 0 because detached frames still have access to the DOMWindow, even if
1783         they can't do anything meaningful with it.
1784         * page/DOMWindowProperty.h:
1785
1786         * page/Frame.cpp:
1787         (WebCore::Frame::setView):
1788         Tell the DOMWindow that the Document is being detached so it can tell the
1789         DOMWindowProperties.
1790
1791         * page/PointerLock.cpp:
1792         (WebCore::PointerLock::disconnectFrameForPageCache):
1793         Updated for disconnectFrame rename.
1794         (WebCore::PointerLock::willDestroyGlobalObjectInFrame):
1795         Cover the cases formerly covered by disconnectFrame (which was sometimes being called when
1796         called when the frame was destroyed).
1797         * page/PointerLock.h:
1798
1799 2012-05-09  Ian Vollick  <vollick@chromium.org>
1800
1801         [chromium] Ensure animations get ticked at least once when added.
1802         https://bugs.webkit.org/show_bug.cgi?id=86013
1803
1804         Reviewed by James Robinson.
1805
1806         Tested in
1807           CCLayerTreeHostTestTickAnimationWhileBackgrounded.runSingleThreaded
1808           CCLayerTreeHostTestAddAnimationWithTimingFunction.runSingleThreaded
1809           CCLayerTreeHostTestSynchronizeAnimationStartTimes.runSingleThreaded
1810           CCLayerTreeHostTestAnimationFinishedEvents.runSingleThreaded
1811
1812         * platform/graphics/chromium/LayerChromium.cpp:
1813         (WebCore::LayerChromium::addAnimation):
1814         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
1815         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
1816         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1817         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
1818         (WebCore::CCLayerTreeHost::didAddAnimation):
1819         (WebCore):
1820         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
1821         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1822         (CCLayerTreeHost):
1823         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1824         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
1825         * platform/graphics/chromium/cc/CCProxy.h:
1826         (CCProxy):
1827         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1828         (CCSingleThreadProxyAnimationTimer):
1829         (WebCore::CCSingleThreadProxyAnimationTimer::create):
1830         (WebCore::CCSingleThreadProxyAnimationTimer::CCSingleThreadProxyAnimationTimer):
1831         (WebCore):
1832         (WebCore::CCSingleThreadProxy::CCSingleThreadProxy):
1833         (WebCore::CCSingleThreadProxy::didAddAnimation):
1834         (WebCore::CCSingleThreadProxy::doComposite):
1835         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1836         (WebCore):
1837         * platform/graphics/chromium/cc/CCThreadProxy.h:
1838
1839 2012-05-09  Adam Barth  <abarth@webkit.org>
1840
1841         Implement HTML Media Capture
1842         https://bugs.webkit.org/show_bug.cgi?id=85958
1843
1844         Reviewed by Eric Seidel.
1845
1846         This patch begins the implementation of
1847         http://www.w3.org/TR/html-media-capture/ by adding the capture
1848         attribute to HTMLInputElement.
1849
1850         Test: fast/forms/file/file-input-capture.html
1851
1852         * html/FileInputType.cpp:
1853         (WebCore::FileInputType::handleDOMActivateEvent):
1854         * html/HTMLAttributeNames.in:
1855         * html/HTMLInputElement.cpp:
1856         (WebCore):
1857         (WebCore::HTMLInputElement::capture):
1858         (WebCore::HTMLInputElement::setCapture):
1859         * html/HTMLInputElement.h:
1860         (HTMLInputElement):
1861         * html/HTMLInputElement.idl:
1862         * platform/FileChooser.h:
1863         (FileChooserSettings):
1864
1865 2012-05-09  Charles Wei  <charles.wei@torchmobile.com.cn>
1866
1867         [BlackBerry]  Refactor data scheme support
1868         https://bugs.webkit.org/show_bug.cgi?id=85938
1869
1870         Reviewed by Rob Buis.
1871
1872         We will create a DataStream in our platform repository,
1873         so that can be wrapped up by NetworkJob for webkit rendering,
1874         and by DownloadStream for downloading.
1875
1876         Refactor, no new tests.
1877
1878         * platform/network/blackberry/NetworkJob.cpp:
1879         (WebCore::NetworkJob::NetworkJob):
1880         (WebCore::NetworkJob::initialize):
1881         (WebCore::NetworkJob::cancelJob):
1882         (WebCore::NetworkJob::sendResponseIfNeeded):
1883         * platform/network/blackberry/NetworkJob.h:
1884         (NetworkJob):
1885         * platform/network/blackberry/NetworkManager.cpp:
1886         (WebCore::NetworkManager::startJob):
1887
1888 2012-05-09  Dana Jansens  <danakj@chromium.org>
1889
1890         [chromium] Don't draw when canDraw() is false
1891         https://bugs.webkit.org/show_bug.cgi?id=85829
1892
1893         Reviewed by Adrienne Walker.
1894
1895         This is based on the work of Daniel Sievers in bug
1896         https://bugs.webkit.org/show_bug.cgi?id=82680. When canDraw() is false,
1897         we should not call drawLayers() or prepareToDraw() in both Single- and
1898         Multi-Threaded mode.
1899
1900         drawLayers() is crashing in single threaded mode, and this attempts to
1901         prevent it from being called with invalid state. While making it behave
1902         properly in single-threaded mode, it seems appropriate to unrevert the
1903         parts of 82680 that made threaded mode behave similarly appropriately.
1904
1905         A single-threaded test is not included since LTHTests is unable to run
1906         in single-threaded mode at this time (pending work from Ian Vollick). So
1907         we test in threaded mode only with a note to include a single thread
1908         version.
1909
1910         Tests: CCLayerTreeHostTestCanDrawBlocksDrawing.runMultiThread
1911
1912         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1913         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
1914         (WebCore::CCLayerTreeHostImpl::drawLayers):
1915         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1916         (WebCore::CCSingleThreadProxy::doComposite):
1917         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1918         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
1919
1920 2012-05-09  Martin Robinson  <mrobinson@igalia.com>
1921
1922         [Cairo] GLContextGLX releases the context with an uninitialized display
1923         https://bugs.webkit.org/show_bug.cgi?id=86039
1924
1925         Reviewed by Philippe Normand.
1926
1927         No new tests. This does not change behavior on most machines, but has
1928         the potential to prevent a pretty nasty crash on others.
1929
1930         Use the shared display to release GLX contexts instead of the uninitialized
1931         m_display member.
1932
1933         * platform/graphics/glx/GLContextGLX.cpp:
1934         (WebCore::GLContextGLX::~GLContextGLX): Release the display with the shared
1935         display.
1936         * platform/graphics/glx/GLContextGLX.h:
1937         (GLContextGLX): Remove the m_display member.
1938
1939 2012-05-09  Tony Gentilcore  <tonyg@chromium.org>
1940
1941         Subresources loaded after a reload completes shouldn't be revalidated.
1942         https://bugs.webkit.org/show_bug.cgi?id=84614
1943
1944         Based on patch by Darin Fisher.
1945
1946         Reviewed by Darin Fisher.
1947
1948         Tests: http/tests/cache/loaded-from-cache-after-reload-within-iframe.html
1949                http/tests/cache/loaded-from-cache-after-reload.html
1950
1951         * loader/FrameLoader.cpp:
1952         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Reset m_loadType after the load completes.
1953
1954 2012-05-09  Erik Arvidsson  <arv@chromium.org>
1955
1956         [V8] Fix issue where V8BindingPerContextData could keep the context object alive
1957         https://bugs.webkit.org/show_bug.cgi?id=86036
1958
1959         Reviewed by Kentaro Hara.
1960
1961         This is a partial revert of http://trac.webkit.org/changeset/114320/. This keeps
1962         the layout tests that were introduced since it turns out that
1963         http://trac.webkit.org/changeset/114989 fixes the tests too.
1964
1965         Covered by: http/tests/security/isolatedWorld/context-destroy.html
1966
1967         * bindings/v8/V8IsolatedContext.cpp:
1968         (WebCore::V8IsolatedContext::destroy):
1969
1970 2012-05-09  Anders Carlsson  <andersca@apple.com>
1971
1972         Speed up some parts of TileCache drawing
1973         https://bugs.webkit.org/show_bug.cgi?id=86033
1974         <rdar://problem/10919373>
1975
1976         Reviewed by Sam Weinig.
1977
1978         * platform/graphics/ca/mac/TileCache.mm:
1979         (WebCore::TileCache::tileCoverageRect):
1980         If we can't have scrollbars, there's not much need to extend the tile coverage rect outside of the visible rect, since it's
1981         unlikely that we'll do any form of scrolling here.
1982
1983         (WebCore::TileCache::revalidateTiles):
1984         Don't update the tile layer frame if it's big enough to contain the tile size. Also, if there are no new tiles created,
1985         don't call platformCALayerDidCreateTiles since that will trigger an extra layer flush.
1986
1987 2012-05-09  Alexandre Elias  <aelias@google.com>
1988
1989         setPageScaleFactor should setScrollPosition if scale is unchanged
1990         https://bugs.webkit.org/show_bug.cgi?id=84400
1991
1992         Reviewed by Adam Barth.
1993
1994         Previously, setPageScaleFactor forgot about its "origin" argument if
1995         the page scale factor is unchanged.  This has proven undesirable in
1996         practice because, for example, a single pinch gesture may zoom in and
1997         back out to the original page scale factor, but at a different scroll
1998         offset.
1999
2000         New test case added to scale-and-scroll-body-expected.txt
2001
2002         * page/Page.cpp:
2003         (WebCore::Page::setPageScaleFactor):
2004
2005 2012-05-09  Hugo Parente Lima  <hugo.lima@openbossa.org>
2006
2007         Use suitable viewport values on XHTML-MP pages.
2008         https://bugs.webkit.org/show_bug.cgi?id=85425
2009
2010         Reviewed by Kenneth Rohde Christiansen.
2011
2012         Tests: fast/viewport/viewport-legacy-xhtmlmp-misplaced-doctype.html
2013                fast/viewport/viewport-legacy-xhtmlmp-ordering.html
2014                fast/viewport/viewport-legacy-xhtmlmp.html
2015
2016         Use device-width and device-height as viewport size on
2017         XHTML-MP pages if the use feature LEGACY_VIEWPORT_ADAPTION
2018         is set according as the non normative section of
2019         http://www.w3.org/TR/css-device-adapt/
2020
2021         * dom/Document.cpp:
2022         (WebCore::Document::setDocType):
2023
2024 2012-05-09  Beth Dakin  <bdakin@apple.com>
2025
2026         https://bugs.webkit.org/show_bug.cgi?id=86025
2027         RTL and vertical text documents do no scroll properly with the new 
2028         tiled scrolling model
2029         -and corresponding-
2030         <rdar://problem/11077589>
2031
2032         Reviewed by Dan Bernstein.
2033         
2034         Most of the fix here is just to teach the scrolling tree about the 
2035         scroll origin.
2036         * page/scrolling/ScrollingCoordinator.cpp:
2037         (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
2038         (WebCore::ScrollingCoordinator::setScrollParameters):
2039         * page/scrolling/ScrollingCoordinator.h:
2040         (ScrollParameters):
2041         * page/scrolling/ScrollingTreeNode.cpp:
2042         (WebCore::ScrollingTreeNode::update):
2043         * page/scrolling/ScrollingTreeNode.h:
2044         (WebCore::ScrollingTreeNode::scrollOrigin):
2045         (ScrollingTreeNode):
2046         * page/scrolling/ScrollingTreeState.cpp:
2047         (WebCore::ScrollingTreeState::setScrollOrigin):
2048         (WebCore):
2049         * page/scrolling/ScrollingTreeState.h:
2050         (WebCore::ScrollingTreeState::scrollOrigin):
2051         (ScrollingTreeState):
2052         * page/scrolling/mac/ScrollingTreeNodeMac.mm:
2053         (WebCore::ScrollingTreeNodeMac::scrollPosition):
2054         (WebCore::ScrollingTreeNodeMac::setScrollLayerPosition):
2055         (WebCore::ScrollingTreeNodeMac::minimumScrollPosition):
2056         (WebCore::ScrollingTreeNodeMac::maximumScrollPosition):
2057         * rendering/RenderLayerCompositor.cpp:
2058         (WebCore::RenderLayerCompositor::frameViewDidScroll):
2059
2060         Teaching the scrolling tree about the scroll origin revealed this pre-
2061         existing bug. layoutOverflowRect() is not the right rect to use since 
2062         it is not writing-mode savvy. unscaledDocumentRect() is the right rect 
2063         for the view's bounds.
2064         * rendering/RenderLayerBacking.cpp:
2065         (WebCore::RenderLayerBacking::updateCompositedBounds):
2066
2067 2012-05-09  Rob Buis  <rwlbuis@webkit.org>
2068
2069         Cleanup SVGElement.cpp
2070         https://bugs.webkit.org/show_bug.cgi?id=86004
2071
2072         Reviewed by Eric Seidel.
2073
2074         Remove unneeded includes. We do not need to check attr in SVGElement::attributeChanged,
2075         lower layers assume it is non-null and we do not call attributeChanged in SVG.
2076
2077         * svg/SVGElement.cpp:
2078         (WebCore::SVGElement::attributeChanged):
2079         (WebCore::SVGElement::isAnimatableAttribute):
2080
2081 2012-05-09  Jochen Eisinger  <jochen@chromium.org>
2082
2083         When creating a new page during a navigation, prime the initial document with the correct referrer policy
2084         https://bugs.webkit.org/show_bug.cgi?id=86001
2085
2086         Reviewed by Adam Barth.
2087
2088         Test: http/tests/security/referrer-policy-redirect-link.html
2089
2090         * dom/Document.h:
2091         (WebCore::Document::setReferrerPolicy):
2092         * loader/FrameLoader.cpp:
2093         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
2094
2095 2012-05-09  Alec Flett  <alecflett@chromium.org>
2096
2097         IndexedDB: call abort handler when there are problems committing
2098         https://bugs.webkit.org/show_bug.cgi?id=85841
2099
2100         Reviewed by Ojan Vafai.
2101
2102         No new tests. Every existing test that calls commit() is testing
2103         the success side of this, and this only throws when there are
2104         LevelDB errors, which is exactly what we're trying to diagnose
2105         with this patch.
2106
2107         * Modules/indexeddb/IDBBackingStore.h:
2108         (Transaction):
2109         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
2110         (WebCore::IDBLevelDBBackingStore::deleteDatabase):
2111         (WebCore::IDBLevelDBBackingStore::Transaction::commit):
2112         * Modules/indexeddb/IDBLevelDBBackingStore.h:
2113         (Transaction):
2114         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2115         (WebCore::IDBTransactionBackendImpl::commit):
2116
2117 2012-05-09  Mark Pilgrim  <pilgrim@chromium.org>
2118
2119         [Chromium] Remove PlatformSupport::loadPlatformImageResource, call loadResource directly
2120         https://bugs.webkit.org/show_bug.cgi?id=84417
2121
2122         Reviewed by Adam Barth.
2123
2124         Part of a refactoring series. See tracking bug 82948.
2125
2126         * WebCore.gyp/WebCore.gyp:
2127         * WebCore.gypi:
2128         * platform/chromium/PlatformSupport.h:
2129         (PlatformSupport):
2130         * platform/graphics/chromium/ImageChromium.cpp:
2131         (WebCore::Image::loadPlatformResource):
2132         * platform/graphics/chromium/ImageChromiumMac.mm: Removed.
2133
2134 2012-05-09  Rob Buis  <rbuis@rim.com>
2135
2136         Remove some isSVGFoo methods
2137         https://bugs.webkit.org/show_bug.cgi?id=86009
2138
2139         Reviewed by Eric Seidel.
2140
2141         These are not used at the moment and were probably just copy and pasted from
2142         isSVGFoo methods in RenderObject.h.
2143
2144         * rendering/RenderObject.h:
2145         * rendering/svg/RenderSVGEllipse.h:
2146         (RenderSVGEllipse):
2147         * rendering/svg/RenderSVGRect.h:
2148         (RenderSVGRect):
2149         * rendering/svg/RenderSVGShape.h:
2150
2151 2012-05-09  Ian Vollick  <vollick@chromium.org>
2152
2153         [chromium] Add impl-thread support for fill-mode and direction css animation properties
2154         https://bugs.webkit.org/show_bug.cgi?id=77662
2155
2156         Reviewed by James Robinson.
2157
2158         Adds support for accelerating css animations with -webkit-animation-fill-mode,
2159         and -webkit-animation-direction properties.
2160
2161         Tested in:
2162           CCActiveAnimationTest.TrimTimeAlternating
2163           CCLayerAnimationControllerTest.createReversedAnimation
2164           CCLayerAnimationControllerTest.createAlternatingAnimation
2165           CCLayerAnimationControllerTest.createReversedAlternatingAnimation
2166
2167         * platform/graphics/chromium/cc/CCActiveAnimation.cpp:
2168         (WebCore::CCActiveAnimation::CCActiveAnimation):
2169         (WebCore::CCActiveAnimation::trimTimeToCurrentIteration):
2170         (WebCore::CCActiveAnimation::cloneForImplThread):
2171         * platform/graphics/chromium/cc/CCActiveAnimation.h:
2172         (CCActiveAnimation):
2173         (WebCore::CCActiveAnimation::alternatesDirection):
2174         (WebCore::CCActiveAnimation::setAlternatesDirection):
2175         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
2176
2177 2012-05-09  Ken Buchanan  <kenrb@chromium.org>
2178
2179         Crash from removal of a line break object
2180         https://bugs.webkit.org/show_bug.cgi?id=85997
2181
2182         Reviewed by David Hyatt.
2183
2184         Regression from r115343. That replaced a call to setNeedsLayout()
2185         with a separate call that used a different bit during linebox
2186         invalidation after renderer child removal. There are special cases
2187         where layout isn't marked on parent nodes just from the removal, so
2188         line dirtying needs to explicitly mark ancestors for layout.
2189
2190         * rendering/RenderObject.h:
2191         (WebCore::RenderObject::setAncestorLineBoxDirty):
2192
2193 2012-05-09  Levi Weintraub  <leviw@chromium.org>
2194
2195         Fix performance regression for floats caused by LayoutUnit change
2196         https://bugs.webkit.org/show_bug.cgi?id=85834
2197
2198         Reviewed by Ojan Vafai.
2199
2200         Refactoring FractionalLayout types to alleviate performance issues. Explicitly
2201         inlining constructor and operator functions in FractionalLayoutUnit, as well as
2202         pixelSnappedIntSize and pixelSnappedIntRect (particularly hot code paths). Also
2203         further simplifying round and ceil functions when sub-pixel layout is not enabled.
2204
2205         pixelSnappedIntSize was the only function defined in FractionalLayoutSize.cpp,
2206         so it is removed.
2207
2208         No new tests. No change in functionality.
2209
2210         * CMakeLists.txt:
2211         * GNUmakefile.list.am:
2212         * Target.pri:
2213         * WebCore.gypi:
2214         * WebCore.vcproj/WebCore.vcproj:
2215         * WebCore.xcodeproj/project.pbxproj:
2216         * platform/FractionalLayoutUnit.h:
2217         (WebCore::FractionalLayoutUnit::FractionalLayoutUnit):
2218         (FractionalLayoutUnit):
2219         (WebCore::FractionalLayoutUnit::toInt):
2220         (WebCore::FractionalLayoutUnit::toFloat):
2221         (WebCore::FractionalLayoutUnit::toDouble):
2222         (WebCore::FractionalLayoutUnit::toUnsigned):
2223         (WebCore::FractionalLayoutUnit::operator int):
2224         (WebCore::FractionalLayoutUnit::operator unsigned):
2225         (WebCore::FractionalLayoutUnit::operator float):
2226         (WebCore::FractionalLayoutUnit::operator double):
2227         (WebCore::FractionalLayoutUnit::operator bool):
2228         (WebCore::FractionalLayoutUnit::ceil):
2229         (WebCore::FractionalLayoutUnit::round):
2230         * platform/graphics/FractionalLayoutRect.cpp:
2231         (WebCore):
2232         * platform/graphics/FractionalLayoutRect.h:
2233         (WebCore::FractionalLayoutRect::pixelSnappedSize):
2234         (WebCore::pixelSnappedIntRect):
2235         (WebCore):
2236         * platform/graphics/FractionalLayoutSize.cpp: Removed.
2237         * platform/graphics/FractionalLayoutSize.h:
2238         (WebCore):
2239         * rendering/LayoutTypes.h:
2240         (WebCore::pixelSnappedIntSize):
2241         (WebCore):
2242
2243 2012-05-09  Abhishek Arya  <inferno@chromium.org>
2244
2245         Crash in ReplaceSelectionCommand::performTrivialReplace
2246         https://bugs.webkit.org/show_bug.cgi?id=85943
2247
2248         Reviewed by Ryosuke Niwa.
2249
2250         RefPtr nodeAfterInsertionPos to guard against mutation events.
2251
2252         Test: editing/inserting/insert-html-crash.html
2253
2254         * editing/ReplaceSelectionCommand.cpp:
2255         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
2256
2257 2012-05-03  Shawn Singh  <shawnsingh@chromium.org>
2258
2259         Hit testing is incorrect in some cases with perspective transforms
2260         https://bugs.webkit.org/show_bug.cgi?id=79136
2261
2262         Reviewed by Simon Fraser.
2263
2264         Tests: transforms/3d/hit-testing/coplanar-with-camera.html
2265                transforms/3d/hit-testing/perspective-clipped.html
2266
2267         * platform/graphics/transforms/TransformationMatrix.cpp:
2268         (WebCore::TransformationMatrix::projectPoint): Fix a
2269         divide-by-zero error so that values do not become Inf or Nan. Also
2270         fix an overflow error by using a large, but not-too-large constant
2271         to represent infinity.
2272
2273         (WebCore::TransformationMatrix::projectQuad): Fix an error where
2274         incorrect quads were being returned. Incorrect quads can occur
2275         when projectPoint clamped==true after returning.
2276
2277 2012-05-09  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2278
2279         Simplify CSSParser::parseSimpleLengthValue()
2280         https://bugs.webkit.org/show_bug.cgi?id=85910
2281
2282         Reviewed by Alexis Menard.
2283
2284         Various small improvements to this function, mainly:
2285         - Move the check if the property ID accepts a simple length as early as possible;
2286         - Remove the check for the characters{8,16} pointers since they'll be valid (we ASSERT that);
2287         - Use a template to avoid duplicate code for 8 and 16 bit characters.
2288
2289         * css/CSSParser.cpp:
2290         (WebCore):
2291         (WebCore::parseSimpleLength):
2292         (WebCore::parseSimpleLengthValue):
2293
2294 2012-05-09  Ami Fischman  <fischman@chromium.org>
2295
2296         [chromium] Support multiple buffered time ranges
2297         https://bugs.webkit.org/show_bug.cgi?id=85926
2298
2299         Reviewed by Eric Carlson.
2300
2301         Preserve existing rendering of a single rect even in the presence of multiple buffered regions.
2302
2303         No new tests as this change has no functional effects.
2304
2305         * rendering/RenderMediaControlsChromium.cpp:
2306         (WebCore::paintMediaSlider):
2307
2308 2012-05-09  Dana Jansens  <danakj@chromium.org>
2309
2310         Early-out and avoid any copying when possible for Region operations
2311         https://bugs.webkit.org/show_bug.cgi?id=85260
2312
2313         Reviewed by Anders Carlsson.
2314
2315         For an empty region, any intersection or subtraction will not modify
2316         the region, so we can simply return instead of creating a new Shape
2317         and replacing the current empty Shape.
2318
2319         When a region is united with a region it contains, the orignal
2320         containing region is the result. So, if A.unite(B) and A.contains(B)
2321         then A does not need to change at all and we can return without making
2322         a copy of A's shape. When A is a rect, we can do this test even more
2323         simply.
2324
2325         We also remove redundant checks from trySimpleOperation() methods, where
2326         the test is already done in the Region calling site.
2327
2328         This change improves the performance of the Region overlap testing for
2329         composited layers, and allows us to avoid unnecessary copies of the
2330         Region during unite. With a layout test (attached to bug #81087), that
2331         creates a Region from the union of 225 composited layers, as well as
2332         600 overlapping layers above them, this change decreases the running
2333         time of the test by 3.2% by avoiding a copy of the entire Region for
2334         each insertion that does not change the resulting Region.
2335
2336         Unit tests: RegionTest.unite
2337
2338         * platform/graphics/Region.cpp:
2339         (WebCore::Region::Shape::UnionOperation::trySimpleOperation):
2340         (WebCore::Region::Shape::IntersectOperation::trySimpleOperation):
2341         (WebCore::Region::Shape::SubtractOperation::trySimpleOperation):
2342         (WebCore::Region::intersect):
2343         (WebCore::Region::unite):
2344         (WebCore::Region::subtract):
2345         * platform/graphics/Region.h:
2346         (WebCore::Region::isRect):
2347         (WebCore::Region::Shape::isRect):
2348
2349 2012-05-09  Tommy Widenflycht  <tommyw@google.com>
2350
2351         MediaStream API: SessionDescription::addCandidate should not crash for malformed input
2352         https://bugs.webkit.org/show_bug.cgi?id=85988
2353
2354         Reviewed by Adam Barth.
2355
2356         Sending null would crash the browser. Added safeguards in both the bindings and the native code.
2357
2358         Test: fast/mediastream/SessionDescription.html
2359
2360         * Modules/mediastream/SessionDescription.cpp:
2361         (WebCore::SessionDescription::addCandidate):
2362         * Modules/mediastream/SessionDescription.h:
2363         (SessionDescription):
2364         * Modules/mediastream/SessionDescription.idl:
2365
2366 2012-05-09  Tommy Widenflycht  <tommyw@google.com>
2367
2368         MediaStream API: Adding the possibility of port specific information in MediaStreamDescriptor
2369         https://bugs.webkit.org/show_bug.cgi?id=85794
2370
2371         Reviewed by Adam Barth.
2372
2373         To facilitate for ports I have added an ExtraData field that can be used for whatever purpose is needed.
2374
2375         No behavioral changes.
2376
2377         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2378         (ExtraDataContainer):
2379         (WebKit::ExtraDataContainer::ExtraDataContainer):
2380         (WebKit::ExtraDataContainer::extraData):
2381         (WebKit):
2382         (WebKit::WebMediaStreamDescriptor::extraData):
2383         (WebKit::WebMediaStreamDescriptor::setExtraData):
2384         * platform/mediastream/MediaStreamDescriptor.h:
2385         (ExtraData):
2386         (WebCore::MediaStreamDescriptor::ExtraData::~ExtraData):
2387         (MediaStreamDescriptor):
2388         (WebCore::MediaStreamDescriptor::extraData):
2389         (WebCore::MediaStreamDescriptor::setExtraData):
2390
2391 2012-05-09  Takashi Sakamoto  <tasak@google.com>
2392
2393         Crash in WebCore::RenderBoxModelObject::paddingLeft
2394         https://bugs.webkit.org/show_bug.cgi?id=83889
2395
2396         Reviewed by Abhishek Arya.
2397
2398         RenderScrollbar creates RenderScrollbarPart without any parent
2399         renderers. However, if the scrollbar has percent padding styles,
2400         non-null parent renderer is required. So after creating/destroying
2401         RenderScrollbarPart instances, set owningRenderer(creating)/0
2402         (destroying) as its parent renderer.
2403
2404         Test: scrollbars/scrollbar-percent-padding-crash.html
2405               scrollbars/scrollbar-percent-padding-crash-expected.txt
2406
2407         * rendering/RenderScrollbar.cpp:
2408         (WebCore::RenderScrollbar::updateScrollbarPart):
2409         Added setParent after creating/destroying RenderScrollbarPart.
2410         * rendering/RenderScrollbarPart.cpp:
2411         Made RenderScollbar friend, because setParent is protected and
2412         RenderScrollbar is not inherited from class RenderObject.
2413
2414 2012-05-09  Takashi Sakamoto  <tasak@google.com>
2415
2416         ShadowRoot needs applyAuthorStyles
2417         https://bugs.webkit.org/show_bug.cgi?id=78472
2418
2419         Reviewed by Hajime Morita.
2420
2421         Implemented applyAuthorStyles attribute defined in the following spec:
2422         http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#shadow-root-attributes
2423         Since applyAuthorSheets attribute has been already implemented,
2424         renamed all applyAuthorSheets to applyAuthorStyles and
2425         added applyAuthorStyles to ShadowRoot.idl.
2426         Currently, changing dynamically applyAuthorStyles doesn't work. I will fix this isse in bugs:84215: https://bugs.webkit.org/show_bug.cgi?id=84251
2427
2428         Test: fast/dom/shadow/shadow-root-applyAuthorStyles.html
2429               fast/dom/shadow/shadow-root-applyAuthorStyles-expected.html
2430
2431         * css/StyleResolver.cpp:
2432         (WebCore::StyleResolver::collectMatchingRulesForList):
2433         * dom/ShadowRoot.cpp:
2434         (WebCore::ShadowRoot::ShadowRoot):
2435         (WebCore::ShadowRoot::applyAuthorStyles):
2436         (WebCore::ShadowRoot::setApplyAuthorStyles):
2437         * dom/ShadowRoot.h:
2438         * dom/TreeScope.cpp:
2439         (WebCore::TreeScope::applyAuthorStyles):
2440         * dom/TreeScope.h:
2441         (TreeScope):
2442         Changed all applyAuthorSheets to applyAuthorSytles.
2443         (ShadowRoot):
2444         * dom/ShadowRoot.idl:
2445         Added a new attribute, boolean applyAuthorStyles.
2446
2447 2012-05-09  Yoshifumi Inoue  <yosin@chromium.org>
2448
2449         [Chromium][Forms] HTMLOptionsCollection doesn't have indexed properties on property enumeration
2450         https://bugs.webkit.org/show_bug.cgi?id=85937
2451
2452         Reviewed by Kentaro Hara.
2453
2454         This patch adds numeric indices to properties in enumeration to HTMLOptionsCollection V8 binding
2455         to changes Objects.keys in ECMAScript5 and for-in statement behavior for compatibility with
2456         Firefox 12, IE9, Opera 11, and Safari 5.
2457
2458         Test: fast/forms/select/options-indexed-properties.html
2459
2460         * bindings/scripts/CodeGeneratorV8.pm:
2461         (GenerateImplementationIndexer): Set $hasEnumerator true for interface HTMLOptionsCollection
2462
2463 2012-05-09  Shinya Kawanaka  <shinyak@chromium.org>
2464
2465         Position should be able to have ShadowRoot as a container.
2466         https://bugs.webkit.org/show_bug.cgi?id=82021
2467
2468         Reviewed by Ryosuke Niwa.
2469
2470         Since Position could not take a shadow root as a container node, pointing the direct children
2471         of a shadow root was difficult.
2472
2473         This patch makes it enabled, and fixes a lot of crashes caused by that limitation.
2474         Also, we confirm that ShadowRoot is not exposed to JavaScript layer.
2475
2476         Currently this change is only enabled if shadow dom flag is enabled, since we cannot
2477         prove this change does not destroy the existing behavior. However, this change is really required
2478         to fix other editing bugs in Shadow DOM. A bunch of patches and tests will be added to
2479         fix other editing bugs and they will check this patch does not break editing.
2480         We will also add a fuzzer to check the stability of editing in Shadow DOM later, and it will
2481         also help to confirm the patch will not break the editing.
2482
2483         Tests: editing/shadow/doubleclick-on-meter-in-shadow-crash.html
2484                editing/shadow/rightclick-on-meter-in-shadow-crash.html
2485                editing/shadow/shadow-selection-not-exported.html
2486
2487         * dom/Position.cpp:
2488         (WebCore::Position::Position):
2489         (WebCore::Position::containerNode):
2490         (WebCore::Position::parentAnchoredEquivalent):
2491         (WebCore::Position::previous):
2492         (WebCore::Position::next):
2493         (WebCore::Position::atStartOfTree):
2494         (WebCore::Position::atEndOfTree):
2495         (WebCore::Position::findParent):
2496         * dom/Position.h:
2497         (WebCore):
2498         (WebCore::positionInParentBeforeNode):
2499         (WebCore::positionInParentAfterNode):
2500
2501 2012-05-09  Zoltan Horvath  <zoltan@webkit.org>
2502
2503         [Qt] Build fix when using libpng version != 1.2
2504         https://bugs.webkit.org/show_bug.cgi?id=85614
2505
2506         Reviewed by Eric Seidel.
2507
2508         Don't enforce the version of libpng when passing the option to the linker.
2509
2510         No new tests, no intended functionality change.
2511
2512         * WebCore.pri:
2513
2514 2012-05-09  Oli Lan  <olilan@chromium.org>
2515
2516         Add identifying methods for date/time input types.
2517
2518         This patch adds methods isDateField(), isDateTimeField(), isDateTimeLocalField(),
2519         isMonthField(), isTimeField() and isWeekField() to InputType and the appropriate
2520         HTMLInputElement classes, to allow date/time input types to be identified.
2521
2522         The new methods match the existing methods for types such as email, search and number.
2523
2524         https://bugs.webkit.org/show_bug.cgi?id=78746
2525
2526         Reviewed by Kent Tamura.
2527
2528         A new test WebViewTest.TextInputType has been added in WebKit/chromium/tests that calls
2529         through to these methods via WebViewImpl.textInputType().
2530
2531         * html/DateInputType.cpp:
2532         (WebCore::DateInputType::isDateField):
2533         (WebCore):
2534         * html/DateInputType.h:
2535         (DateInputType):
2536         * html/DateTimeInputType.cpp:
2537         (WebCore::DateTimeInputType::isDateTimeField):
2538         (WebCore):
2539         * html/DateTimeInputType.h:
2540         (DateTimeInputType):
2541         * html/DateTimeLocalInputType.cpp:
2542         (WebCore::DateTimeLocalInputType::isDateTimeLocalField):
2543         (WebCore):
2544         * html/DateTimeLocalInputType.h:
2545         (DateTimeLocalInputType):
2546         * html/HTMLInputElement.cpp:
2547         (WebCore::HTMLInputElement::isDateField):
2548         (WebCore):
2549         (WebCore::HTMLInputElement::isDateTimeField):
2550         (WebCore::HTMLInputElement::isDateTimeLocalField):
2551         (WebCore::HTMLInputElement::isMonthField):
2552         (WebCore::HTMLInputElement::isTimeField):
2553         (WebCore::HTMLInputElement::isWeekField):
2554         * html/HTMLInputElement.h:
2555         (HTMLInputElement):
2556         * html/InputType.cpp:
2557         (WebCore::InputType::isDateField):
2558         (WebCore):
2559         (WebCore::InputType::isDateTimeField):
2560         (WebCore::InputType::isDateTimeLocalField):
2561         (WebCore::InputType::isMonthField):
2562         (WebCore::InputType::isTimeField):
2563         (WebCore::InputType::isWeekField):
2564         * html/InputType.h:
2565         (InputType):
2566         * html/MonthInputType.cpp:
2567         (WebCore::MonthInputType::isMonthField):
2568         (WebCore):
2569         * html/MonthInputType.h:
2570         (MonthInputType):
2571         * html/TimeInputType.cpp:
2572         (WebCore::TimeInputType::isTimeField):
2573         (WebCore):
2574         * html/TimeInputType.h:
2575         (TimeInputType):
2576         * html/WeekInputType.cpp:
2577         (WebCore::WeekInputType::isWeekField):
2578         (WebCore):
2579         * html/WeekInputType.h:
2580         (WeekInputType):
2581
2582 2012-05-09  Nikolas Zimmermann  <nzimmermann@rim.com>
2583
2584         REGRESSION(r105057): Infinite loop inside SVGTextLayoutEngine::currentLogicalCharacterMetrics
2585         https://bugs.webkit.org/show_bug.cgi?id=83405
2586
2587         Reviewed by Darin Adler.
2588
2589         Dynamically adding tspans carrying position information in the x/y/dx/dy/rotate lists is broken.
2590         To avoid mistakes like this in future, simplify the calling code in RenderSVGInlineText and centralize
2591         the managment of all caches (text positioning element cache / metrics map / layout attributes) in
2592         RenderSVGText. This avoids the hack in SVGRootInlineBox::computePerCharacterLayoutInformation() which
2593         called textRoot->rebuildLayoutAttributes(), which was used to fix previous security issues with this code.
2594         Instead correctly handle destruction of RenderSVGInlineText in RenderSVGText, keeping the m_layoutAttributes
2595         synchronized with the current state of the render tree. Fixes highcharts problems.
2596
2597         Tests: svg/text/add-tspan-position-bug.html
2598                svg/text/modify-tspan-position-bug.html
2599
2600         * rendering/svg/RenderSVGInline.cpp:
2601         (WebCore::RenderSVGInline::addChild):
2602         * rendering/svg/RenderSVGInlineText.cpp:
2603         (WebCore::RenderSVGInlineText::willBeDestroyed):
2604         (WebCore::RenderSVGInlineText::setTextInternal):
2605         (WebCore::RenderSVGInlineText::styleDidChange):
2606         * rendering/svg/RenderSVGText.cpp:
2607         (WebCore::recursiveUpdateMetrics):
2608         (WebCore::RenderSVGText::subtreeChildAdded):
2609         (WebCore::RenderSVGText::subtreeChildWillBeDestroyed):
2610         (WebCore::recursiveCollectLayoutAttributes):
2611         (WebCore::checkLayoutAttributesConsistency):
2612         (WebCore::RenderSVGText::subtreeChildWasDestroyed):
2613         (WebCore::RenderSVGText::subtreeStyleChanged):
2614         (WebCore::RenderSVGText::subtreeTextChanged):
2615         (WebCore::RenderSVGText::layout):
2616         (WebCore::RenderSVGText::addChild):
2617         (WebCore::RenderSVGText::rebuildAllLayoutAttributes):
2618         (WebCore::RenderSVGText::rebuildLayoutAttributes):
2619         * rendering/svg/RenderSVGText.h:
2620         (WebCore::RenderSVGText::layoutAttributes):
2621         * rendering/svg/SVGRootInlineBox.cpp:
2622         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
2623         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
2624         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributes):
2625
2626 2012-05-08  Dongwoo Im  <dw.im@samsung.com>
2627
2628         NavigatorRegisterProtocolHandler can call ChromeClient directly.
2629         https://bugs.webkit.org/show_bug.cgi?id=85944
2630
2631         Reviewed by Adam Barth.
2632
2633         Covered by fast/dom/register-protocol-handler.html
2634
2635         * page/Chrome.cpp: Remove registerProtocolHandler function.
2636         * page/Chrome.h: Remove registerProtocolHandler prototype.
2637         (Chrome):
2638         * page/NavigatorRegisterProtocolHandler.cpp: Call ChromeClient::registerProtocolHandler directly.
2639         (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler):
2640
2641 2012-05-08  Mario Sanchez Prada  <msanchez@igalia.com>
2642
2643         Coding style issues present in RenderFrameSet.cpp
2644         https://bugs.webkit.org/show_bug.cgi?id=85955
2645
2646         Reviewed by Eric Seidel.
2647
2648         Just fixed those coding style issues.
2649
2650         * rendering/RenderFrameSet.cpp:
2651         (WebCore::RenderFrameSet::GridAxis::resize):
2652         (WebCore::RenderFrameSet::layOutAxis):
2653         (WebCore::RenderFrameSet::continueResizing):
2654
2655 2012-05-08  Jon Lee  <jonlee@apple.com>
2656
2657         Unreviewed build fix.
2658
2659         * platform/mac/WebCoreSystemInterface.h:
2660
2661 2012-05-08  Jason Liu  <jason.liu@torchmobile.com.cn>
2662
2663         [BlackBerry] Auth credentials set in private mode are reused in public mode.
2664         https://bugs.webkit.org/show_bug.cgi?id=84697
2665
2666         Reviewed by Rob Buis.
2667
2668         Add setPrivateMode function for CredentialStorage.
2669
2670         Now, we only save credentials in memory and CredentialBackingStore isn't enabled.
2671         When we set private mode from on to off, we clear all these temporary credentials.
2672
2673         We have to change Private Browsing to test, so have to write a manual test case.
2674         Test: ManualTests/blackberry/http-auth-private-mode-changed.html
2675
2676         * network/CredentialStorage.cpp:
2677         (WebCore::CredentialStorage::setPrivateMode):
2678         (WebCore):
2679         * platform/network/CredentialStorage.h:
2680         (CredentialStorage):
2681
2682 2012-05-08  Rakesh KN  <rakesh.kn@motorola.com>
2683
2684         RadioNodeList support in HTMLFormElement::elements
2685         https://bugs.webkit.org/show_bug.cgi?id=81854
2686
2687         Reviewed by Ryosuke Niwa.
2688
2689         Implement RadioNodeList support spec'ed at
2690         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#radionodelist
2691
2692         Test: fast/forms/form-collection-radio-node-list.html
2693
2694         * CMakeLists.txt:
2695         Added entries for new files.
2696         * DerivedSources.cpp: Ditto.
2697         * DerivedSources.make: Ditto.
2698         * DerivedSources.pri: Ditto.
2699         * GNUmakefile.list.am: Ditto.
2700         * Target.pri: Ditto.
2701         * WebCore.gypi: Ditto.
2702         * WebCore.vcproj/WebCore.vcproj: Ditto.
2703         * WebCore.xcodeproj/project.pbxproj: Ditto.
2704         * bindings/js/JSHTMLCollectionCustom.cpp:
2705         (WebCore::getNamedItems):
2706         Modified to create RadioNodeList object when FormControlCollection has more than
2707         one element of same name/id.
2708         * bindings/scripts/CodeGeneratorJS.pm:
2709         (GenerateImplementation):
2710         Added code to include Node.h and JSNode.h in JSRadioNodeElement.cpp.
2711         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
2712         (WebCore::getNamedItems):
2713         Modified to create RadioNodeList object when FormControlCollection has more than
2714         one element of same name/id.
2715         * dom/Node.cpp:
2716         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
2717         Invalidate lists even for change in id, type, checked attributes.
2718         (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes):
2719         Invalidate radioNodeList cache.
2720         (WebCore::NodeListsNodeData::isEmpty):
2721         Changes for radioNodeList.
2722         (WebCore::Node::radioNodeList):
2723         Creates if needed a RadioNodeList and adds it to the cache.
2724         (WebCore::Node::removeCachedRadioNodeList):
2725         Removes a cached radioNodeList.
2726         * dom/Node.h: Ditto
2727         * dom/NodeRareData.h:
2728         (WebCore):
2729         (NodeListsNodeData):
2730         Added radioNodeList list.
2731         * html/CollectionType.h:
2732         Added new FormControls type.
2733         * html/HTMLCollection.cpp:
2734         (WebCore::HTMLCollection::shouldIncludeChildren):
2735         (WebCore::HTMLCollection::isAcceptableElement):
2736         Handle FormControls collection type.
2737         * html/HTMLFormCollection.cpp:
2738         (WebCore::HTMLFormCollection::HTMLFormCollection):
2739         Contruct collection of FormControls type.
2740         * html/RadioNodeList.cpp: Added.
2741         (WebCore):
2742         (WebCore::RadioNodeList::RadioNodeList):
2743         (WebCore::RadioNodeList::~RadioNodeList):
2744         (WebCore::toRadioButtonInputElement):
2745         (WebCore::RadioNodeList::value):
2746         (WebCore::RadioNodeList::setValue):
2747         (WebCore::RadioNodeList::nodeMatches):
2748         * html/RadioNodeList.h: Added.
2749         (WebCore):
2750         (RadioNodeList):
2751         (WebCore::RadioNodeList::create):
2752         RadioNodeList implementation.
2753         * html/RadioNodeList.idl: Added.
2754         Idl for generating RadioNodeList JS/V8 bindings.
2755
2756 2012-05-08  Benjamin Poulain  <bpoulain@apple.com>
2757
2758         [JSC] Regression: addEventListener() and removeEventListener() raise an exception on missing args
2759         https://bugs.webkit.org/show_bug.cgi?id=85928
2760
2761         Reviewed by Geoffrey Garen.
2762
2763         The functions addEventListener() and removeEventListener() raise an exception if there are missin arguments.
2764         This behavior breaks existing content.
2765
2766         This patch change the code generator of JavaScript core to have an exception for addEventListener() and removeEventListener().
2767         For those function, we do not raise an exception on missin argument.
2768
2769         This patch does not modify the V8 code generator because such exceptions are already in place there.
2770
2771         Tests: fast/dom/Window/window-legacy-event-listener.html
2772                fast/dom/XMLHttpRequest-legacy-event-listener.html
2773                fast/dom/node-legacy-event-listener.html
2774
2775         * bindings/scripts/CodeGeneratorJS.pm:
2776         (GenerateImplementation):
2777
2778 2012-05-08  Chris Rogers  <crogers@google.com>
2779
2780         AudioParam should directly be given context in create() method
2781         https://bugs.webkit.org/show_bug.cgi?id=85905
2782
2783         Reviewed by James Robinson.
2784
2785         No new tests.  This is a low-level re-factoring and is covered by existing tests.
2786
2787         * Modules/webaudio/AudioBufferSourceNode.cpp:
2788         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
2789         * Modules/webaudio/AudioGain.h:
2790         (WebCore::AudioGain::create):
2791         (WebCore::AudioGain::AudioGain):
2792         * Modules/webaudio/AudioGainNode.cpp:
2793         (WebCore::AudioGainNode::AudioGainNode):
2794         * Modules/webaudio/AudioPannerNode.cpp:
2795         (WebCore::AudioPannerNode::AudioPannerNode):
2796         * Modules/webaudio/AudioParam.h:
2797         (WebCore::AudioParam::create):
2798         (AudioParam):
2799         (WebCore::AudioParam::AudioParam):
2800         * Modules/webaudio/BiquadFilterNode.cpp:
2801         (WebCore::BiquadFilterNode::BiquadFilterNode):
2802         * Modules/webaudio/BiquadProcessor.cpp:
2803         (WebCore::BiquadProcessor::BiquadProcessor):
2804         * Modules/webaudio/BiquadProcessor.h:
2805         * Modules/webaudio/DelayNode.cpp:
2806         (WebCore::DelayNode::DelayNode):
2807         * Modules/webaudio/DelayProcessor.cpp:
2808         (WebCore::DelayProcessor::DelayProcessor):
2809         * Modules/webaudio/DelayProcessor.h:
2810         (DelayProcessor):
2811         * Modules/webaudio/DynamicsCompressorNode.cpp:
2812         (WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
2813         * Modules/webaudio/Oscillator.cpp:
2814         (WebCore::Oscillator::Oscillator):
2815
2816 2012-05-08  Dana Jansens  <danakj@chromium.org>
2817
2818         [chromium] Show borders for partial-draw-culled quads to visualize culling behaviour
2819         https://bugs.webkit.org/show_bug.cgi?id=85414
2820
2821         Reviewed by Adrienne Walker.
2822
2823         The borders are brown, and are only shown when the quad's visible rect
2824         is non-empty and is different from the quad's original rect.
2825
2826         Adds a flag to CCQuadCuller constructor, to enable showing debug borders
2827         around what it leaves after culling (when it culls anything in a quad
2828         at all).
2829
2830         * platform/graphics/chromium/cc/CCDrawQuad.h:
2831         (WebCore::CCDrawQuad::isDebugQuad):
2832         (WebCore::CCDrawQuad::sharedQuadState):
2833         (CCDrawQuad):
2834         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2835         (WebCore):
2836         (WebCore::CCQuadCuller::CCQuadCuller):
2837         (WebCore::appendQuadInternal):
2838         (WebCore::CCQuadCuller::append):
2839         (WebCore::CCQuadCuller::appendSurface):
2840         (WebCore::CCQuadCuller::appendReplica):
2841         * platform/graphics/chromium/cc/CCQuadCuller.h:
2842         (CCQuadCuller):
2843         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2844         (WebCore::CCRenderPass::appendQuadsForLayer):
2845         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
2846
2847 2012-05-08  Julien Chaffraix  <jchaffraix@webkit.org>
2848
2849         Move RenderLayers z-index lists dirtying to post style change
2850         https://bugs.webkit.org/show_bug.cgi?id=85437
2851
2852         Reviewed by Darin Adler.
2853
2854         No expected change in behavior.
2855
2856         This change moves the z-order lists to RenderLayer::styleChanged. As part of this
2857         change, also added proper handling of stacking context transition. This enabled
2858         us to tighten more of the dirtyZOrderLists / clearZOrderLists code.
2859
2860         * rendering/RenderBoxModelObject.cpp:
2861         (WebCore::RenderBoxModelObject::styleWillChange):
2862         Removed this code, moved to updateStackingContextsAfterStyleChange.
2863
2864         * rendering/RenderLayer.cpp:
2865         (WebCore::RenderLayer::RenderLayer):
2866         Only stacking contexts start with dirty z-order lists.
2867
2868         (WebCore::RenderLayer::dirtyZOrderLists):
2869         Added an ASSERT.
2870
2871         (WebCore::RenderLayer::updateStackingContextsAfterStyleChange):
2872         Refactored the code to handle the transition between stacking context status.
2873
2874         (WebCore::RenderLayer::styleChanged):
2875         Added a call to updateStackingContextsAfterStyleChange.
2876
2877         * rendering/RenderLayer.h:
2878         (WebCore::RenderLayer::isStackingContext):
2879         Added a call to the next function.
2880
2881         (WebCore::RenderLayer::layerWithStyleIsStackingContext):
2882         Factored the isStackingContext logic here so that we can reuse it inside
2883         updateStackingContextsAfterStyleChange.
2884
2885         (WebCore::RenderLayer::clearZOrderLists):
2886         Added an ASSERT.
2887
2888 2012-05-08  Abhishek Arya  <inferno@chromium.org>
2889
2890         Crash due to owning renderer not removed from custom scrollbar.
2891         https://bugs.webkit.org/show_bug.cgi?id=80610
2892
2893         Reviewed by Eric Seidel.
2894
2895         Test: scrollbars/scrollbar-owning-renderer-crash.html
2896
2897         Changed RenderScrollbar to keep pointer to owning node, instead of the
2898         renderer. Renderer can get destroyed without informing the scrollbar, causing
2899         crashes later. Remove code from r94107 since it is not needed anymore and saves
2900         times when RenderBox is getting destroyed.
2901
2902         * page/FrameView.cpp:
2903         (WebCore::FrameView::createScrollbar): pass renderer's node.
2904         * page/FrameView.h:
2905         * rendering/RenderBox.cpp:
2906         (WebCore::RenderBox::willBeDestroyed): no longer need this. came originally from r94107.
2907         * rendering/RenderLayer.cpp:
2908         (WebCore::RenderLayer::createScrollbar): pass renderer's node.
2909         (WebCore::RenderLayer::destroyScrollbar): no longer need to clear owning renderer.
2910         * rendering/RenderListBox.cpp:
2911         (WebCore::RenderListBox::createScrollbar): pass renderer's node.
2912         * rendering/RenderMenuList.cpp:
2913         (WebCore::RenderMenuList::createScrollbar): pass renderer's node.
2914         * rendering/RenderScrollbar.cpp:
2915         (WebCore::RenderScrollbar::createCustomScrollbar): Store owner node instead of renderer.
2916         (WebCore::RenderScrollbar::RenderScrollbar): Store owner node instead of renderer.
2917         (WebCore::RenderScrollbar::owningRenderer): calculate owning renderer from owner node.
2918         * rendering/RenderScrollbar.h:
2919         (RenderScrollbar):
2920         * rendering/RenderTextControlSingleLine.cpp:
2921         (WebCore::RenderTextControlSingleLine::createScrollbar): pass renderer's node.
2922
2923 2012-05-08  Jon Lee  <jonlee@apple.com>
2924
2925         Safari warns that it needs to resend the form in an iFrame when going back
2926         https://bugs.webkit.org/show_bug.cgi?id=82658
2927         <rdar://problem/11292558>
2928
2929         Reviewed by Darin Adler.
2930
2931         Test: http/tests/loading/post-in-iframe-with-back-navigation.html
2932
2933         * WebCore.exp.in: Add _wkCFURLRequestAllowAllPostCaching.
2934         * platform/mac/WebCoreSystemInterface.h: Add wkCFURLRequestAllowAllPostCaching.
2935         * platform/mac/WebCoreSystemInterface.mm: Add wkCFURLRequestAllowAllPostCaching.
2936         * platform/network/cf/ResourceRequestCFNet.cpp:
2937         (WebCore::ResourceRequest::doUpdatePlatformRequest): Set the bit to cache all POST responses.
2938         * platform/network/mac/ResourceRequestMac.mm:
2939         (WebCore::ResourceRequest::doUpdatePlatformRequest): Set the bit to cache all POST responses.
2940
2941 2012-05-08  Dana Jansens  <danakj@chromium.org>
2942
2943         [chromium] Reflections with masks should not occlude
2944         https://bugs.webkit.org/show_bug.cgi?id=85927
2945
2946         Reviewed by James Robinson.
2947
2948         When a surface does not have a mask, we make both it and its reflection
2949         occlude the things below them. However, if the reflection has a mask
2950         applied to it, then we should not consider it as occluding.
2951
2952         Adds replicaHasMask() to the render surface classes so we can test if
2953         the mask is present.
2954
2955         Unit Tests: CCOcclusionTrackerTestReplicaWithMask
2956
2957         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
2958         (WebCore::RenderSurfaceChromium::hasMask):
2959         This is unusued right now, but will allow us to remove a FIXME from
2960         CCOcclusionTracker::finishedTargetRenderSurface().
2961         (WebCore):
2962         (WebCore::RenderSurfaceChromium::replicaHasMask):
2963         * platform/graphics/chromium/RenderSurfaceChromium.h:
2964         (RenderSurfaceChromium):
2965         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2966         (WebCore::::leaveToTargetRenderSurface):
2967         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2968         (WebCore::CCRenderSurface::hasMask):
2969         This is unusued right now, but will allow us to remove a FIXME from
2970         CCOcclusionTracker::finishedTargetRenderSurface().
2971         (WebCore):
2972         (WebCore::CCRenderSurface::replicaHasMask):
2973         * platform/graphics/chromium/cc/CCRenderSurface.h:
2974         (CCRenderSurface):
2975
2976 2012-05-08  Eric Seidel  <eric@webkit.org>
2977
2978         Add stylesheet inheritance support to IFRAME_SEAMLESS
2979         https://bugs.webkit.org/show_bug.cgi?id=85914
2980
2981         Reviewed by Ojan Vafai.
2982
2983         This work is already guarded by IFRAME_SEAMLESS, as
2984         Document::shouldDisplaySeamlesslyWithParent always returns false
2985         when IFRAME_SEAMLESS is off.
2986
2987         This makes the child document use all author stylesheets from all parent documents,
2988         per the seamless spec:
2989         http://www.whatwg.org/specs/web-apps/current-work/#attr-iframe-seamless
2990
2991         This support is slightly inefficient as every time a sheet is added
2992         to a parent document, the child document must do a full style selector recalc.
2993         Normally author sheet additions have a fast-path which avoids the full selector recalc,
2994         but such is not possible in the seamless case as we're inserting the parents sheets
2995         earlier in the child's cascade (instead of just appending them to the end of the list).
2996
2997         The test covers both the static inheritance as well as addition of a stylesheet
2998         to the parent and testing that it caused a recalc of the child.
2999
3000         Covered by fast/frames/seamless/seamless-css-cascade.html
3001
3002         * css/StyleResolver.cpp:
3003         (WebCore::StyleResolver::StyleResolver):
3004         (WebCore::StyleResolver::addStylesheetsFromSeamlessParents):
3005         (WebCore):
3006         * css/StyleResolver.h:
3007         (StyleResolver):
3008         * dom/Document.cpp:
3009         (WebCore::Document::seamlessParentUpdatedStylesheets):
3010         (WebCore):
3011         (WebCore::Document::notifySeamlessChildDocumentsOfStylesheetUpdate):
3012         (WebCore::Document::updateActiveStylesheets):
3013         * dom/Document.h:
3014         (Document):
3015
3016 2012-05-08  Raphael Kubo da Costa  <rakuco@webkit.org>
3017
3018         [CMake] FindGStreamer: Fix the build with static WebCore.
3019         https://bugs.webkit.org/show_bug.cgi?id=85930
3020
3021         Reviewed by Daniel Bates.
3022
3023         No new tests, build fix.
3024
3025         Building WebCore statically was failing because files in
3026         WebCore/platform/gstreamer when ENABLE_VIDEO was set required
3027         gstreamer-base, which was not being linked to after r116453.
3028
3029         Fix that by looking for gstreamer-base, requiring and linking
3030         against it if GStreamer is used.
3031
3032         * PlatformEfl.cmake: Link to GSTREAMER_LIBRARIES and
3033         GSTREAMER_BASE_LIBRARIES, and include GSTREAMER_INCLUDE_DIRS and
3034         GSTREAMER_BASE_INCLUDE_DIRS.
3035
3036 2012-05-08  Raymond Toy  <rtoy@google.com>
3037
3038         JavaScriptAudioNode should not ASSERT if number of input channels is 0
3039         https://bugs.webkit.org/show_bug.cgi?id=85818
3040
3041         Reviewed by Eric Seidel.
3042
3043         Test: webaudio/javascriptaudionode-zero-input-channels.html
3044
3045         * Modules/webaudio/JavaScriptAudioNode.cpp:
3046         (WebCore::JavaScriptAudioNode::process): Update buffersAreGood.
3047         (WebCore::JavaScriptAudioNode::fireProcessEvent): Remove ASSERT.
3048
3049 2012-05-08  Dana Jansens  <danakj@chromium.org>
3050
3051         Region reads past end of spans
3052         https://bugs.webkit.org/show_bug.cgi?id=85909
3053
3054         Reviewed by Anders Carlsson.
3055
3056         Region currently checks aSpan == aSpanEnd as the indicator that
3057         we passed all the spans. When aSpan < aSpanEnd, it uses aSpan+1
3058         to find the height of the span.
3059
3060         If aSpan == aSpanEnd - 1, then aSpan+1 == aSpanEnd. This does not
3061         represent a valid span, since aSpanEnd is past the end of the
3062         array, not the last element in the array. The loop should terminate
3063         in this case.
3064
3065         Checking aSegment != aSegmentEnd is acceptable in the inner loop since
3066         it increments by two each time (segments come in pairs, while spans
3067         come in singles).
3068
3069         Test: RegionTest.ReadPastFullSpanVectorInIntersectsTest
3070
3071         * platform/graphics/Region.cpp:
3072         (WebCore::Region::Shape::compareShapes):
3073
3074 2012-05-08  Philip Rogers  <pdr@google.com>
3075
3076         Prevent crash in animated lists
3077         https://bugs.webkit.org/show_bug.cgi?id=85382
3078
3079         Reviewed by Nikolas Zimmermann.
3080
3081         Animated lists blindly assign the last list value to m_toAtEndOfDurationType
3082         in SVGAnimationElement::startedActiveInterval. If the last list value's length
3083         is larger or smaller than the animated "to" length, we crash.
3084
3085         This change prevents accessing values off the end of toAtEndOfDuration by adding
3086         a check for this case. It may seem inefficient to perform this check on every
3087         animation update but the "to" value can change (in cardinality) while animating.
3088
3089         I checked each of the other animation types (e.g., SVGAnimatedAngle,
3090         SVGAnimatedBoolean, etc.) and was only able to hit this style of crash
3091         in the three types modified in this change:
3092         SVGAnimatedLengthList, SVGAnimatedNumberList, and SVGAnimatedPointList.
3093
3094         Tests: svg/animations/animate-linear-discrete-additive-b-expected.svg
3095                svg/animations/animate-linear-discrete-additive-b.svg
3096                svg/animations/animate-linear-discrete-additive-c-expected.svg
3097                svg/animations/animate-linear-discrete-additive-c.svg
3098                svg/animations/animate-linear-discrete-additive-expected.svg
3099                svg/animations/animate-linear-discrete-additive.svg
3100                svg/animations/animate-list-crash.svg
3101
3102         * svg/SVGAnimatedLengthList.cpp:
3103         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
3104         * svg/SVGAnimatedNumberList.cpp:
3105         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
3106         * svg/SVGAnimatedPointList.cpp:
3107         (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
3108
3109 2012-05-08  Rafael Weinstein  <rafaelw@chromium.org>
3110
3111         HTMLElementStack::hasOnlyHTMLElementsInScope is no longer called
3112         https://bugs.webkit.org/show_bug.cgi?id=85908
3113
3114         Reviewed by Eric Seidel.
3115
3116         This patch just removes the dead code.
3117
3118         No tests needed. Cleanup only.
3119
3120         * html/parser/HTMLElementStack.cpp:
3121         * html/parser/HTMLElementStack.h:
3122         (HTMLElementStack):
3123
3124 2012-05-08  W. James MacLean  <wjmaclean@chromium.org>
3125
3126         [chromium] Create LinkHighlightLayerChromium class to provide link-highlight preview animations for GraphicsLayerChromium.
3127         https://bugs.webkit.org/show_bug.cgi?id=85084
3128
3129         Reviewed by James Robinson.
3130
3131         Unit test provided.
3132
3133         Creates a layer delegate class to provide link highlight animations for link-preview feature.
3134         These are added to a GraphicsLayerChromium via provided methods. Moves dispensing of animation
3135         ids into a separate class.
3136
3137         * WebCore.gypi:
3138         * platform/graphics/chromium/AnimationIdVendor.cpp: Added.
3139         (WebCore):
3140         (WebCore::AnimationIdVendor::getNextAnimationId):
3141         (WebCore::AnimationIdVendor::getNextGroupId):
3142         * platform/graphics/chromium/AnimationIdVendor.h: Added.
3143         (WebCore):
3144         (AnimationIdVendor):
3145         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3146         (WebCore::GraphicsLayerChromium::willBeDestroyed):
3147         (WebCore::GraphicsLayerChromium::updateNames):
3148         (WebCore::GraphicsLayerChromium::addAnimation):
3149         (WebCore::GraphicsLayerChromium::addLinkHighlight):
3150         (WebCore):
3151         (WebCore::GraphicsLayerChromium::didFinishLinkHighlight):
3152         (WebCore::GraphicsLayerChromium::updateChildList):
3153         (WebCore::GraphicsLayerChromium::mapAnimationNameToId):
3154         * platform/graphics/chromium/GraphicsLayerChromium.h:
3155         (WebCore):
3156         (GraphicsLayerChromium):
3157         * platform/graphics/chromium/LinkHighlight.cpp: Added.
3158         (WebCore):
3159         (WebCore::LinkHighlight::create):
3160         (WebCore::LinkHighlight::LinkHighlight):
3161         (WebCore::LinkHighlight::~LinkHighlight):
3162         (WebCore::LinkHighlight::contentLayer):
3163         (WebCore::LinkHighlight::paintContents):
3164         (WebCore::LinkHighlight::notifyAnimationStarted):
3165         (WebCore::LinkHighlight::notifyAnimationFinished):
3166         * platform/graphics/chromium/LinkHighlight.h: Added.
3167         (WebCore):
3168         (LinkHighlight):
3169
3170 2012-05-08  Raphael Kubo da Costa  <rakuco@webkit.org>
3171
3172         [CMake] Rewrite FindGStreamer.cmake.
3173         https://bugs.webkit.org/show_bug.cgi?id=85857
3174
3175         Reviewed by Daniel Bates.
3176
3177         No new tests, build system change.
3178
3179         We are currently kind of duplicating the same
3180         FindGStreamer-Foo.cmake file whenever a new GStreamer plugin needs
3181         to be found. Besides this approach not scaling very well, it
3182         relies on pkg-config for version checking, uses the LibFindMacros
3183         package that we should deprecate and all the find files could be
3184         merged into one, with users using the COMPONENTS feature of the
3185         FIND_PACKAGE() call to find the desired plugins.
3186
3187         FindGStreamer.cmake has then been rewritten to take all that into
3188         account:
3189         - The LibFindMacros.cmake package is not used anymore.
3190         - Version check is performed in the CMake file itself by parsing
3191         the gstversion.h header.
3192         - All GStreamer plugins are searched and the COMPONENTS keyword
3193         used in the FIND_PACKAGE() call is used to check which plugins are
3194         required.
3195         - The plugins-base and base GStreamer plugins are not searched, as
3196         they were not used anywhere in the build system.
3197
3198         * PlatformEfl.cmake: Update GStreamer-related variable names.
3199
3200 2012-05-08  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3201
3202         [EFL] Handling of numeric-pad keys in EFL's PlatformKeyboardEvent
3203         https://bugs.webkit.org/show_bug.cgi?id=85479
3204
3205         Reviewed by Gustavo Noronha Silva.
3206
3207         EFL's PlatformKeyboardEvent::isKeypad() now returns meaningful value.
3208         Added numeric-pad keys to the Key Map and Windows Key Map.
3209
3210         No new tests.
3211
3212         * platform/efl/EflKeyboardUtilities.cpp:
3213         (WebCore::createKeyMap):
3214         (WebCore::createWindowsKeyMap):
3215         * platform/efl/PlatformKeyboardEventEfl.cpp:
3216         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3217
3218 2012-05-04  Nikolas Zimmermann  <nzimmermann@rim.com>
3219
3220         Tie lifetime of SVGAnimateElement::m_animatedType to the duration of the animation
3221         https://bugs.webkit.org/show_bug.cgi?id=85627
3222
3223         Reviewed by Antti Koivisto.
3224
3225         Example:
3226         <rect width="10" height="100">
3227             <animate attributeName="width" from="10" to="100" begin="2s" dur="4s" fill="remove"/>
3228         </rect>
3229
3230         At t=0s the <animate> element receives its first interval: begin=2s, end=6s.
3231         At this point we've created the 'OwnPtr<SVGAnimatedType> m_animatedType' in
3232         SVGAnimateElement, which holds the current animated value of the target type.
3233         In this example it contains a SVGLength with '10' as value at t=0s.
3234
3235         Calling "rect.width.animVal.value" will return the value currently contained in the
3236         m_animatedType from the SVGAnimateElement, even though the animation didn't begin
3237         yet. This is fine, as the animVal equals to the baseVal, as long as no animation is
3238         running.
3239
3240         At t=6s you'd expect that the whole 'animVal' object is destructed again, as it's no
3241         longer needed, as animVal will be equal to baseVal again, but the current code keeps
3242         the animVal alive, and just resets it to the baseVal. The animVals will be destructed
3243         once the animate element leaves the tree.
3244
3245         CSS animations suffer from the same problem, we never remove the animated SMIL properties
3246         but we only reset them to the base value. This makes integration with CSS Animations and
3247         CSS Transitions harder, so this needs to be changed.
3248
3249         This patch starts tracking the start/end of an animation chain properly, to destruct
3250         the animation effect for non-frozen animations at the end of their duration. This has to
3251         work properly together with seeking (SVGSVGElement.setCurrentTime), as our testing relies
3252         on the ability to drive the SMIL timeline from script.
3253
3254         Tests: svg/animations/list-wrapper-assertion-expected.svg
3255                svg/animations/list-wrapper-assertion.svg
3256
3257         * svg/SVGAnimateElement.cpp:
3258         (WebCore::SVGAnimateElement::resetAnimatedType):
3259         (WebCore::applyCSSPropertyToTarget):
3260         (WebCore::removeCSSPropertyFromTarget):
3261         (WebCore::applyCSSPropertyToTargetAndInstances):
3262         (WebCore::removeCSSPropertyFromTargetAndInstances):
3263         (WebCore::notifyTargetAboutAnimValChange):
3264         (WebCore::notifyTargetAndInstancesAboutAnimValChange):
3265         (WebCore::SVGAnimateElement::clearAnimatedType):
3266         (WebCore::SVGAnimateElement::applyResultsToTarget):
3267         (WebCore::SVGAnimateElement::targetElementWillChange):
3268         * svg/SVGAnimateElement.h:
3269         (SVGAnimateElement):
3270         * svg/SVGAnimateMotionElement.cpp:
3271         (WebCore::SVGAnimateMotionElement::resetAnimatedType):
3272         (WebCore::SVGAnimateMotionElement::clearAnimatedType):
3273         * svg/SVGAnimateMotionElement.h:
3274         (SVGAnimateMotionElement):
3275         * svg/SVGAnimationElement.cpp:
3276         * svg/SVGAnimationElement.h:
3277         * svg/animation/SMILTimeContainer.cpp:
3278         (WebCore::SMILTimeContainer::updateAnimations):
3279         * svg/animation/SVGSMILElement.cpp:
3280         (WebCore::SVGSMILElement::reset):
3281         (WebCore::SVGSMILElement::targetElementWillChange):
3282         (WebCore::SVGSMILElement::determineActiveState):
3283         (WebCore::SVGSMILElement::progress):
3284         * svg/animation/SVGSMILElement.h:
3285         (SVGSMILElement):
3286         * svg/properties/SVGAnimatedListPropertyTearOff.h:
3287             Remove svgAttributeChanged() calls from animationEnded/animValDidChange.
3288             Callers are now required to notify the target about changes. There are cases
3289             where we want to call animValDidChange without invoking svgAttributeChanged().
3290             That is supported now.
3291         (WebCore::SVGAnimatedListPropertyTearOff::animationEnded):
3292         (WebCore::SVGAnimatedListPropertyTearOff::animValDidChange):
3293         * svg/properties/SVGAnimatedProperty.h: Ditto.
3294         (WebCore::SVGAnimatedProperty::commitChange): Add safety guard.
3295         * svg/properties/SVGAnimatedPropertyTearOff.h: Ditto.
3296         (WebCore::SVGAnimatedPropertyTearOff::animationEnded):
3297         (WebCore::SVGAnimatedPropertyTearOff::animValDidChange):
3298         * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Ditto.
3299         (WebCore::SVGAnimatedStaticPropertyTearOff::animationEnded):
3300         (WebCore::SVGAnimatedStaticPropertyTearOff::animValDidChange):
3301
3302 2012-05-08  Ryuan Choi  <ryuan.choi@samsung.com>
3303
3304         [EFL][DRT]Do not create ScrollbarEfl when mockScrollbar is enabled.
3305         https://bugs.webkit.org/show_bug.cgi?id=81315
3306
3307         Reviewed by Chang Shu.
3308
3309         ScrollbarEfl creates custom scrollbars as separated layer and they are
3310         not related to ScrollbarTheme.
3311         So, DRT/Efl creates custom scrollbars on webview which paints mockScrollbar.
3312
3313         This patch prevents creating custom scrollbars when mockScrollbar is enabled.
3314
3315         Because DRT/Efl only renders the webview now, expected results are same
3316         until Bug 79853 is landed.
3317
3318         * platform/efl/ScrollbarEfl.cpp:
3319         (Scrollbar::createNativeScrollbar):
3320
3321 2012-05-08  Timothy Hatcher  <timothy@apple.com>
3322
3323         Fix the SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL macro so it passes the full path to dlopen.
3324
3325         dyld only considers libraries in the versioned framework path if their install name
3326         matches the library that it is attempting to load. The path we were passing to
3327         dlopen lacked the Versions/A component of the path so dyld did not recognize that
3328         we wanted it to use the staged version if it is newer.
3329
3330         <rdar://problem/11406517>
3331
3332         Reviewed by Mark Rowe.
3333
3334         * platform/mac/SoftLinking.h: Have SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL take the
3335         framework version as an argument and use it when constructing the path to dlopen.
3336
3337 2012-05-08  Rafael Brandao  <rafael.lobo@openbossa.org>
3338
3339         Build fix for Qt Snowleopard Release
3340         https://bugs.webkit.org/show_bug.cgi?id=85895
3341
3342         Reviewed by Alexis Menard.
3343
3344         The enum value JSUint8ClampedArray conflicted with the JSUint8ClampedArray class.
3345         I've added the 'Type' suffix to the enum value to make their names different.
3346
3347         No new tests needed.
3348
3349         * bridge/qt/qt_runtime_qt4.cpp:
3350         (JSC::Bindings::valueRealType):
3351         (JSC::Bindings::convertValueToQVariant):
3352
3353 2012-05-08  Shezan Baig  <shezbaig.wk@gmail.com>
3354
3355         offsetLeft broken within CSS3 columns
3356         https://bugs.webkit.org/show_bug.cgi?id=34875
3357
3358         Reviewed by Julien Chaffraix.
3359
3360         Reimplement offsetLeft and offsetTop in terms of a new method called
3361         'offsetTopLeft'. The new method starts from a reference point (the
3362         top-left coordinate of a box or inline) and adjusts this reference
3363         point for columns as we traverse each parent. Note that the reference
3364         point needs to be adjusted in both dimensions, even though offsetLeft
3365         and offsetTop return only one of them.
3366
3367         A new method called 'offsetForColumns' was added to RenderObject. This
3368         method is similar to adjustForColumns, except that it returns the
3369         offset instead of modifying a reference. This method is necessary to
3370         simplify the implementation of offsetTopLeft.
3371
3372         Tests: fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.txt
3373                fast/block/positioning/offsetLeft-offsetTop-multicolumn.html
3374
3375         * rendering/RenderBox.h:
3376         (RenderBox):
3377         Override offsetLeft and offsetTop.
3378         * rendering/RenderBox.cpp:
3379         (WebCore::RenderBox::offsetLeft):
3380         Implemented in terms of RenderBoxModelObject::offsetTopLeft, using
3381         topLeftLocation as startPoint.
3382         (WebCore::RenderBox::offsetTop):
3383         Implemented in terms of RenderBoxModelObject::offsetTopLeft, using
3384         topLeftLocation as startPoint.
3385         * rendering/RenderBoxModelObject.cpp:
3386         (WebCore::RenderBoxModelObject::offsetTopLeft):
3387         New method to compute offsetLeft and offsetTop simultaneously, and
3388         adjusting for columns at each parent.
3389         (WebCore::RenderBoxModelObject::offsetLeft):
3390         Reimplemented in terms of offsetTopLeft.
3391         (WebCore::RenderBoxModelObject::offsetTop):
3392         Reimplemented in terms of offsetTopLeft.
3393         * rendering/RenderBoxModelObject.h:
3394         (RenderBoxModelObject):
3395         Declare new offsetTopLeft method.
3396         * rendering/RenderInline.cpp:
3397         (WebCore::RenderInline::offsetLeft):
3398         Reimplemented in terms of RenderBoxModelObject::offsetTopLeft.
3399         (WebCore::RenderInline::offsetTop):
3400         Reimplemented in terms of RenderBoxModelObject::offsetTopLeft.
3401         * rendering/RenderObject.h:
3402         (RenderObject):
3403         (WebCore::RenderObject::offsetForColumns):
3404         New helper method to simplify implementation of offsetTopLeft.
3405
3406 2012-03-31  Robert Hogan  <robert@webkit.org>
3407
3408         CSS 2.1 failure: first-letter-nested-004.htm fails
3409         https://bugs.webkit.org/show_bug.cgi?id=72987
3410
3411         Reviewed by Eric Seidel.
3412
3413         When styling first-letter check each sibling and drill into its inlines until we find either (i) a text node 
3414         that is not all whitespace, or (ii) a line break.
3415
3416         This makes our rendering of the following tests compatible with FF and Opera. Our current behaviour is also conformant
3417         since the spec allows UAs to style just one element:
3418             css2.1/20110323/first-letter-quote-002.htm
3419             css2.1/20110323/first-letter-quote-003.htm
3420             css2.1/20110323/first-letter-quote-004.htm
3421             css2.1/20110323/first-letter-quote-005.htm
3422
3423         This fixes the following two tests. We now drill into the descendants of an element styled with :first-letter looking
3424         for text to style:
3425             css2.1/20110323/first-letter-nested-004.htm
3426             css2.1/20110323/first-letter-nested-006.htm
3427
3428         This patch changes our rendering of first-letter-dynamic-001.htm as we now render adjacent quotes in the second line as 
3429         green. This is consistent with the spec, which allows this behaviour but does not require it. It's the 'right' behaviour
3430         since it is consistent with the rendering of such quotes in a single element with :first-letter style.
3431
3432         * rendering/RenderBlock.cpp:
3433         (WebCore::RenderBlock::findLastObjectWithFirstLetterText): Iterate through the child's siblings looking for the last
3434           object to be styled :first-letter.
3435         (WebCore::RenderBlock::findLastObjectAfterFirstLetterPunctuation): Style any leading punctuation as first-letter, drill
3436           down into the child's descendants looking for text if necessary.
3437         (WebCore::RenderBlock::updateFirstLetter): Refactor to drill into sibling's children looking for inlines
3438          that should be styled as first-letter.
3439         (WebCore::RenderBlock::addFirstLetter): Split out from updateFirstLetter so that it can be used when a
3440          descendant node inside a sibling is found in findLastObjectWithFirstLetterText() needs to be styled as first-letter.
3441         * rendering/RenderBlock.h:
3442
3443 2012-05-08  Sheriff Bot  <webkit.review.bot@gmail.com>
3444
3445         Unreviewed, rolling out r116402.
3446         http://trac.webkit.org/changeset/116402
3447         https://bugs.webkit.org/show_bug.cgi?id=85898
3448
3449         Caused a 3% regression on Chromium's bloat-http test on Linux
3450         (Requested by ojan_gardening on #webkit).
3451
3452         * WebCore.exp.in:
3453         * bindings/v8/RetainedDOMInfo.cpp:
3454         * dom/ContainerNode.h:
3455         * dom/Node.cpp:
3456         (WebCore::Node::traverseNextNode):
3457         (WebCore):
3458         (WebCore::Node::traverseNextSibling):
3459         * dom/Node.h:
3460         (Node):
3461
3462 2012-05-08  Hironori Bono  <hbono@chromium.org>
3463
3464         [Chromium] Fix the position of an RTL resizer
3465         https://bugs.webkit.org/show_bug.cgi?id=80640
3466
3467         Reviewed by Tony Chang.
3468
3469         When rendering an RTL resizer, my r110073 renders it at the same position as the
3470         one used for rendering a LTR resizer. Unfortunately, this code renders the RTL
3471         resizer image at an incorr