BUILD FIX (r146704): Settings::setHiddenPageDOMTimerThrottlingEnabled() isn't always...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-24  David Kilzer  <ddkilzer@apple.com>
2
3         BUILD FIX (r146704): Settings::setHiddenPageDOMTimerThrottlingEnabled() isn't always built
4         <http://webkit.org/b/112308>
5
6         * WebCore.exp.in: Export
7         Settings::setHiddenPageDOMTimerThrottlingEnabled()
8         conditionally based on ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING).
9
10 2013-03-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
11
12         [EFL] NetworkStateNotifier::updateState() is called too often
13         https://bugs.webkit.org/show_bug.cgi?id=113152
14
15         Reviewed by Kenneth Rohde Christiansen.
16
17         Wait until we have read all the data on the Netlink socket before
18         reporting a possible network interface change. This way, we make
19         sure we don't call NetworkStateNotifier::updateState() several
20         times in a row for no reason.
21
22         We also call NetworkStateNotifier::updateState() only if we get a
23         RTM_NEWADDR event and we are currently offline, or if we get a
24         RTM_DELADDR and we are currently online. This avoids calling
25         NetworkStateNotifier::updateState() uselessly as there is no way
26         the online state can change otherwise.
27
28         No new tests, no behavior change for layout tests.
29
30         * platform/network/efl/NetworkStateNotifierEfl.cpp:
31         (WebCore::NetworkStateNotifier::readSocketCallback):
32
33 2013-03-24  Chris Fleizach  <cfleizach@apple.com>
34
35         AX: Crash in WebCore::AccessibilitySpinButton::incrementButton()
36         https://bugs.webkit.org/show_bug.cgi?id=111582
37
38         Reviewed by Tim Horton.
39
40         There are two ways to create a spin button: from a textfield counter or from ARIA.
41         If an ARIA spin button is created, it was returning true for isSpinButton, so we were 
42         casting to the other kind of spin button, leading to a crash.
43
44         We need to be more specific about our class types.
45
46         Test: platform/mac/accessibility/aria-spinbutton-crash.html
47
48         * accessibility/AccessibilityObject.h:
49         (WebCore::AccessibilityObject::isNativeSpinButton):
50         * accessibility/AccessibilitySpinButton.h:
51         (WebCore::AccessibilitySpinButton::isNativeSpinButton):
52         (WebCore::toAccessibilitySpinButton):
53         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
54         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
55
56 2013-03-24  Chris Fleizach  <cfleizach@apple.com>
57
58         AXObjectCache gets recreated during document tear-down.
59         https://bugs.webkit.org/show_bug.cgi?id=112525
60
61         Reviewed by Simon Fraser.
62
63         In many cases, a document's AXObjectCache was being created after the
64         document had detached, which is wasteful and could potentially lead to
65         crashes because the AXObjectCache has a timer and relies on its document
66         to exist.
67
68         This patch provides a way to get the existing AX object cache, instead of
69         always creating a new one.
70         It moves the accessibilityEnabled() checks into the axObjectCache retrieval
71         for easier readability.
72         It adds a number of ASSERTs to vieryf that only the correct (top) document is used
73         for cache manipulation.
74
75         * accessibility/AXObjectCache.cpp:
76         (WebCore::AXObjectCache::stopCachingComputedObjectAttributes):
77         * dom/ContainerNode.cpp:
78         (WebCore::ContainerNode::~ContainerNode):
79         * dom/Document.cpp:
80         (WebCore::Document::~Document):
81         (WebCore::Document::clearAXObjectCache):
82         (WebCore::Document::existingAXObjectCache):
83         (WebCore::Document::axObjectCache):
84         (WebCore::Document::setFocusedNode):
85         * dom/Document.h:
86         (Document):
87         * dom/Element.cpp:
88         (WebCore::Element::attributeChanged):
89         * dom/Node.cpp:
90         (WebCore::Node::~Node):
91         (WebCore::Node::isEditableToAccessibility):
92         (WebCore::Node::attach):
93         (WebCore::Node::rootEditableElement):
94         (WebCore::Node::didMoveToNewDocument):
95         * editing/AppendNodeCommand.cpp:
96         (WebCore::sendAXTextChangedIgnoringLineBreaks):
97         * editing/DeleteFromTextNodeCommand.cpp:
98         (WebCore::DeleteFromTextNodeCommand::doApply):
99         (WebCore::DeleteFromTextNodeCommand::doUnapply):
100         * editing/Editor.cpp:
101         (WebCore::Editor::respondToChangedContents):
102         (WebCore::Editor::markAndReplaceFor):
103         * editing/InsertIntoTextNodeCommand.cpp:
104         (WebCore::InsertIntoTextNodeCommand::doApply):
105         (WebCore::InsertIntoTextNodeCommand::doUnapply):
106         * editing/InsertNodeBeforeCommand.cpp:
107         (WebCore::InsertNodeBeforeCommand::doApply):
108         (WebCore::InsertNodeBeforeCommand::doUnapply):
109         * editing/atk/FrameSelectionAtk.cpp:
110         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
111         * editing/chromium/FrameSelectionChromium.cpp:
112         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
113         * editing/mac/FrameSelectionMac.mm:
114         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
115         * html/HTMLInputElement.cpp:
116         (WebCore::HTMLInputElement::setChecked):
117         * html/HTMLSelectElement.cpp:
118         (WebCore::HTMLSelectElement::optionElementChildrenChanged):
119         (WebCore::HTMLSelectElement::setRecalcListItems):
120         * html/HTMLTextFormControlElement.cpp:
121         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
122         * html/InputType.cpp:
123         (WebCore::InputType::applyStep):
124         * html/RangeInputType.cpp:
125         (WebCore::RangeInputType::handleKeydownEvent):
126         * loader/FrameLoader.cpp:
127         (WebCore::FrameLoader::prepareForLoadStart):
128         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
129         * page/FocusController.cpp:
130         (WebCore::FocusController::setInitialFocus):
131         * page/Frame.cpp:
132         (WebCore::Frame::disconnectOwnerElement):
133         * page/FrameView.cpp:
134         (WebCore::FrameView::removeFromAXObjectCache):
135         (WebCore::FrameView::layout):
136         (WebCore::FrameView::scrollToAnchor):
137         (WebCore::FrameView::axObjectCache):
138         * platform/ScrollView.cpp:
139         (WebCore::ScrollView::setHasHorizontalScrollbar):
140         (WebCore::ScrollView::setHasVerticalScrollbar):
141         * platform/Scrollbar.cpp:
142         (WebCore::Scrollbar::~Scrollbar):
143         (WebCore):
144         (WebCore::Scrollbar::existingAXObjectCache):
145         * platform/Scrollbar.h:
146         (Scrollbar):
147         * rendering/RenderBlock.cpp:
148         (WebCore::RenderBlock::deleteLineBoxTree):
149         (WebCore::RenderBlock::createRootInlineBox):
150         (WebCore::RenderBlock::createAndAppendRootInlineBox):
151         * rendering/RenderListBox.cpp:
152         (WebCore::RenderListBox::selectionChanged):
153         * rendering/RenderMenuList.cpp:
154         (WebCore::RenderMenuList::addChild):
155         (WebCore::RenderMenuList::didUpdateActiveOption):
156         * rendering/RenderObject.cpp:
157         (WebCore::RenderObject::styleWillChange):
158         (WebCore::RenderObject::willBeDestroyed):
159         * rendering/RenderObjectChildList.cpp:
160         (WebCore::RenderObjectChildList::removeChildNode):
161         (WebCore::RenderObjectChildList::insertChildNode):
162         * rendering/RenderText.cpp:
163         (WebCore::RenderText::setText):
164         * rendering/RenderWidget.cpp:
165         (WebCore::RenderWidget::willBeDestroyed):
166
167 2013-03-23  Mike West  <mkwst@chromium.org>
168
169         Drop full URLs from cross-origin access errors caused by sandboxing.
170         https://bugs.webkit.org/show_bug.cgi?id=113029
171
172         Reviewed by Timothy Hatcher.
173
174         Following up on http://wkbug.com/112042, this patch brings cross-origin
175         access error messages into line with the newly origin-only default
176         message, and changes the error message text to explicitly refer to the
177         missing 'allow-same-origin' sandbox flag that's the root cause of the
178         error.
179
180         * page/DOMWindow.cpp:
181         (WebCore::DOMWindow::crossDomainAccessErrorMessage):
182             Note that we're using the origin of the frames' URLs rather than
183             their actual origin in these messages. This seems like a reasonable
184             thing to do, since we know that at least one of the two origins will
185             be "null" in this scenario.
186
187 2013-03-23  Dominic Mazzoni  <dmazzoni@google.com>
188
189         Implement Web Speech Synthesis for Chromium
190         https://bugs.webkit.org/show_bug.cgi?id=111695
191
192         Reviewed by Adam Barth.
193
194         Straightforward implementation of speech synthesis
195         for Chromium by exposing interfaces for the platform
196         to implement.
197
198         * Modules/speech/SpeechSynthesis.cpp:
199         (WebCore::SpeechSynthesis::boundaryEventOccurred):
200         (WebCore::SpeechSynthesis::didStartSpeaking):
201         (WebCore::SpeechSynthesis::didPauseSpeaking):
202         (WebCore::SpeechSynthesis::didResumeSpeaking):
203         (WebCore::SpeechSynthesis::didFinishSpeaking):
204         (WebCore::SpeechSynthesis::speakingErrorOccurred):
205         (WebCore):
206         * Modules/speech/SpeechSynthesis.h:
207         (SpeechSynthesis):
208         * Modules/speech/SpeechSynthesisUtterance.cpp:
209         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
210         (WebCore):
211         (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
212         (WebCore::SpeechSynthesisUtterance::setVoice):
213         * Modules/speech/SpeechSynthesisUtterance.h:
214         (SpeechSynthesisUtterance):
215         (WebCore::SpeechSynthesisUtterance::text):
216         (WebCore::SpeechSynthesisUtterance::setText):
217         (WebCore::SpeechSynthesisUtterance::lang):
218         (WebCore::SpeechSynthesisUtterance::setLang):
219         (WebCore::SpeechSynthesisUtterance::volume):
220         (WebCore::SpeechSynthesisUtterance::setVolume):
221         (WebCore::SpeechSynthesisUtterance::rate):
222         (WebCore::SpeechSynthesisUtterance::setRate):
223         (WebCore::SpeechSynthesisUtterance::pitch):
224         (WebCore::SpeechSynthesisUtterance::setPitch):
225         (WebCore::SpeechSynthesisUtterance::startTime):
226         (WebCore::SpeechSynthesisUtterance::setStartTime):
227         (WebCore::SpeechSynthesisUtterance::platformUtterance):
228         * Modules/speech/SpeechSynthesisVoice.h:
229         (WebCore::SpeechSynthesisVoice::~SpeechSynthesisVoice):
230         * WebCore.exp.in:
231         * WebCore.gypi:
232         * platform/PlatformSpeechSynthesis.h:
233         (PlatformSpeechSynthesis):
234         * platform/PlatformSpeechSynthesisUtterance.cpp:
235         (WebCore):
236         (WebCore::PlatformSpeechSynthesisUtterance::create):
237         * platform/PlatformSpeechSynthesisUtterance.h:
238         (PlatformSpeechSynthesisUtterance):
239         (WebCore::PlatformSpeechSynthesisUtterance::setClient):
240         * platform/PlatformSpeechSynthesisVoice.cpp:
241         (WebCore):
242         (WebCore::PlatformSpeechSynthesisVoice::create):
243         (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
244         * platform/PlatformSpeechSynthesisVoice.h:
245         (PlatformSpeechSynthesisVoice):
246         (WebCore::PlatformSpeechSynthesisVoice::setVoiceURI):
247         (WebCore::PlatformSpeechSynthesisVoice::setName):
248         (WebCore::PlatformSpeechSynthesisVoice::setLang):
249         (WebCore::PlatformSpeechSynthesisVoice::setLocalService):
250         (WebCore::PlatformSpeechSynthesisVoice::setIsDefault):
251         * platform/PlatformSpeechSynthesizer.cpp:
252         (WebCore::PlatformSpeechSynthesizer::create):
253         (WebCore::PlatformSpeechSynthesizer::setVoiceList):
254         (WebCore):
255         * platform/PlatformSpeechSynthesizer.h:
256         (WebKit):
257         (PlatformSpeechSynthesizerClient):
258         (PlatformSpeechSynthesizer):
259         * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Added.
260         (WebCore):
261         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
262         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
263         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
264         (WebCore::PlatformSpeechSynthesizer::speak):
265         (WebCore::PlatformSpeechSynthesizer::pause):
266         (WebCore::PlatformSpeechSynthesizer::resume):
267         (WebCore::PlatformSpeechSynthesizer::cancel):
268         * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Added.
269         (WebKit):
270         (WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
271         (WebKit::WebSpeechSynthesisUtterance::operator=):
272         (WebKit::WebSpeechSynthesisUtterance::assign):
273         (WebKit::WebSpeechSynthesisUtterance::reset):
274         (WebKit::WebSpeechSynthesisUtterance::operator PassRefPtr<PlatformSpeechSynthesisUtterance>):
275         (WebKit::WebSpeechSynthesisUtterance::operator PlatformSpeechSynthesisUtterance*):
276         (WebKit::WebSpeechSynthesisUtterance::text):
277         (WebKit::WebSpeechSynthesisUtterance::lang):
278         (WebKit::WebSpeechSynthesisUtterance::voice):
279         (WebKit::WebSpeechSynthesisUtterance::volume):
280         (WebKit::WebSpeechSynthesisUtterance::rate):
281         (WebKit::WebSpeechSynthesisUtterance::pitch):
282         (WebKit::WebSpeechSynthesisUtterance::startTime):
283         * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Added.
284         (WebKit):
285         (WebKit::WebSpeechSynthesisVoice::assign):
286         (WebKit::WebSpeechSynthesisVoice::reset):
287         (WebKit::WebSpeechSynthesisVoice::setVoiceURI):
288         (WebKit::WebSpeechSynthesisVoice::setName):
289         (WebKit::WebSpeechSynthesisVoice::setLanguage):
290         (WebKit::WebSpeechSynthesisVoice::setIsLocalService):
291         (WebKit::WebSpeechSynthesisVoice::setIsDefault):
292         (WebKit::WebSpeechSynthesisVoice::operator PassRefPtr<WebCore::PlatformSpeechSynthesisVoice>):
293         * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Added.
294         (WebCore):
295         (WebCore::WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl):
296         (WebCore::WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl):
297         (WebCore::WebSpeechSynthesizerClientImpl::setVoiceList):
298         (WebCore::WebSpeechSynthesizerClientImpl::didStartSpeaking):
299         (WebCore::WebSpeechSynthesizerClientImpl::didFinishSpeaking):
300         (WebCore::WebSpeechSynthesizerClientImpl::didPauseSpeaking):
301         (WebCore::WebSpeechSynthesizerClientImpl::didResumeSpeaking):
302         (WebCore::WebSpeechSynthesizerClientImpl::speakingErrorOccurred):
303         (WebCore::WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred):
304         (WebCore::WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred):
305         * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Added.
306         (WebCore):
307         (WebSpeechSynthesizerClientImpl):
308         * platform/mac/PlatformSpeechSynthesizerMac.mm:
309         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
310         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
311         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
312         (WebCore):
313         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
314         (WebCore::PlatformSpeechSynthesizer::speak):
315         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
316         (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
317         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
318         (WebCore::PlatformSpeechSynthesizerMock::speak):
319         * platform/mock/PlatformSpeechSynthesizerMock.h:
320         (PlatformSpeechSynthesizerMock):
321
322 2013-03-23  Daniel Cheng  <dcheng@chromium.org>
323
324         [Qt] editing/pasteboard/can-read-in-dragstart-event.html and /can-read-in-copy-and-cut-events.html are crashing
325         https://bugs.webkit.org/show_bug.cgi?id=113126
326
327         Reviewed by Ryosuke Niwa.
328
329         The ClipboardQt implementation only allows reading or writing, not both. Attempting to read
330         when the clipboard is only writable will lead to a crash since the corresponding member will
331         be null. To prevent crashes, change the asserts to early returns. In the long term, the
332         correct fix is to unify the m_readableData and m_writableData members.
333
334         No new tests since no functionality in Qt port should change.
335
336         * platform/qt/ClipboardQt.cpp:
337         (WebCore::ClipboardQt::getData):
338         (WebCore::ClipboardQt::types):
339         (WebCore::ClipboardQt::files):
340
341 2013-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
342
343         [GTK][Regression] webkit_dom_html_table_element_insert_row returns value that doesn't pass WEBKIT_DOM_IS_HTML_TABLE_ROW_ELEMENT macro
344         https://bugs.webkit.org/show_bug.cgi?id=111714
345
346         Reviewed by Martin Robinson.
347
348         Add custom kit implementation for HTMLElements so that the HTML
349         wrappers are used in that case instead of wrapHTMLElement.
350
351         * bindings/gobject/WebKitDOMBinding.cpp:
352         (WebKit::kit):
353         (WebKit):
354         * bindings/gobject/WebKitDOMBinding.h:
355         (WebCore):
356         (WebKit):
357         * bindings/scripts/CodeGeneratorGObject.pm:
358         (UsesManualKitImplementation):
359
360 2013-03-23  David Kilzer  <ddkilzer@apple.com>
361
362         Revert "BUILD FIX (r146667): ResourceRequest constructor in SynchronousLoaderClient.cpp is ambiguous on iOS"
363
364         This is platform-agnositic code, so the previous solution won't work.
365
366         * platform/network/SynchronousLoaderClient.cpp:
367         (WebCore::SynchronousLoaderClient::willSendRequest):
368
369 2013-03-23  David Kilzer  <ddkilzer@apple.com>
370
371         BUILD FIX (r146667): ResourceRequest constructor in SynchronousLoaderClient.cpp is ambiguous on iOS
372
373         Fixes the following build failure:
374
375             Source/WebCore/platform/network/SynchronousLoaderClient.cpp:52:15: error: conversion from 'int' to 'const WebCore::ResourceRequest' is ambiguous
376                 request = 0;
377                           ^
378             In file included from Source/WebCore/platform/network/SynchronousLoaderClient.cpp:30:
379             In file included from Source/WebCore/platform/network/ResourceHandle.h:37:
380             In file included from Source/WebCore/platform/network/ios/QuickLook.h:13:
381             Source/WebCore/platform/network/cf/ResourceRequest.h:79:9: note: candidate constructor
382                     ResourceRequest(NSURLRequest *);
383                     ^
384             Source/WebCore/platform/network/cf/ResourceRequest.h:83:9: note: candidate constructor
385                     ResourceRequest(CFURLRequestRef cfRequest)
386                     ^
387             1 error generated.
388
389         * platform/network/SynchronousLoaderClient.cpp:
390         (WebCore::SynchronousLoaderClient::willSendRequest): If
391         USE(CFNETWORK) is defined, use static_cast<CFURLRequestRef>(0),
392         otherwise use static_cast<NSURLRequest *>(0).
393
394 2013-03-23  David Kilzer  <ddkilzer@apple.com>
395
396         BUILD FIX (r146687): setDefaultMIMEType() is unused in ResourceHandleCFNet.cpp on iOS
397
398         Fixes the following build failure:
399
400             Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp:98:13: error: unused function 'setDefaultMIMEType' [-Werror,-Wunused-function]
401             static void setDefaultMIMEType(CFURLResponseRef response)
402                         ^
403             1 error generated.
404
405         * platform/network/cf/ResourceHandleCFNet.cpp:
406         (WebCore::setDefaultMIMEType): Add #if !PLATFORM(MAC)/#endif
407         guard.
408
409 2013-03-21  Kiran Muppala  <cmuppala@apple.com>
410
411         Add runtime setting for hidden page DOM timer throttling and CSS animation suspension
412         https://bugs.webkit.org/show_bug.cgi?id=112308
413
414         Reviewed by Gavin Barraclough.
415
416         No new tests.  Only adding settings to enable/disable existing features
417         and hence existing tests suffice.
418
419         * WebCore.exp.in:
420         * page/Page.cpp:
421         (WebCore::Page::setVisibilityState): Check if DOM timer throttling
422         and CSS animation suspension are enabled before turning them on.
423         (WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged): Start or stop
424         DOM timer throttling based on page visibility and the new setting state.
425         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged): Ditto
426         for CSS animation suspension.
427         * page/Page.h:
428         * page/Settings.cpp:
429         (WebCore::Settings::Settings): Initialize the flags for enabling hidden
430         page DOM timer throttling and CSS animation suspension to false.
431         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled): Update flag
432         and notify page that the state of the setting has changed.
433         (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled): Ditto.
434         * page/Settings.h:
435         (WebCore::Settings::hiddenPageDOMTimerThrottlingEnabled):
436         (WebCore::Settings::hiddenPageCSSAnimationSuspensionEnabled):
437
438 2013-03-22  Benjamin Poulain  <bpoulain@apple.com>
439
440         Remove 2 bad branches from StringHash::equal() and CaseFoldingHash::equal()
441         https://bugs.webkit.org/show_bug.cgi?id=113003
442
443         Reviewed by Eric Seidel.
444
445         Fix two unfortunate use of StringHash and use the correct StringImpl function.
446
447         * html/parser/HTMLParserIdioms.cpp:
448         (WebCore::threadSafeEqual):
449         * html/parser/HTMLTreeBuilderSimulator.cpp:
450         (WebCore::tokenExitsSVG):
451
452 2013-03-22  Andy Estes  <aestes@apple.com>
453
454         Set the cache partition property on CFURLRequests
455         https://bugs.webkit.org/show_bug.cgi?id=113116
456
457         Patch by Jeffrey Pfau
458         Reviewed by David Kilzer.
459
460         * platform/network/cf/ResourceRequestCFNet.cpp:
461         (WebCore::ResourceRequest::doUpdatePlatformRequest):
462         (WebCore::ResourceRequest::doUpdateResourceRequest):
463
464 2013-03-22  Julien Chaffraix  <jchaffraix@webkit.org>
465
466         [CSS Grid Layout] content-sized row tracks with percentage logical height grid items don't resolve properly
467         https://bugs.webkit.org/show_bug.cgi?id=113085
468
469         Reviewed by Tony Chang.
470
471         The core issue is that because overrideContainingBlockLogicalHeight() is unset in
472         logicalContentHeightForChild, RenderBox::computePercentageLogicalHeight would try to
473         resolve percentage logical height against the grid element (wrong containing block
474         as a grid item's containing block is the grid area).
475
476         Tests: fast/css-grid-layout/grid-item-multiple-minmax-content-resolution.html
477                fast/css-grid-layout/grid-item-with-percent-height-in-auto-height-grid-resolution.html
478
479         * rendering/RenderGrid.cpp:
480         (WebCore::RenderGrid::logicalContentHeightForChild):
481         Set our override logical height to -1, so that we don't try to constrain a grid item's logical height
482         based on resolving (badly) its percentage.
483
484 2013-03-19  Zhenyao Mo  <zmo@google.com>
485
486         Check WEBGL_draw_buffers requirements before exposing the extension
487         https://bugs.webkit.org/show_bug.cgi?id=112359
488
489         Reviewed by Kenneth Russell.
490
491         * html/canvas/EXTDrawBuffers.cpp:
492         (WebCore::EXTDrawBuffers::supported): call satisfies*().
493         (WebCore::EXTDrawBuffers::drawBuffersEXT):
494         (WebCore):
495         (WebCore::EXTDrawBuffers::satisfiesWebGLRequirements): check WebGL requirements.
496         * html/canvas/EXTDrawBuffers.h:
497         (EXTDrawBuffers):
498         * html/canvas/WebGLFramebuffer.cpp:
499         (WebCore::WebGLFramebuffer::getDrawBuffer):
500         (WebCore):
501         * html/canvas/WebGLFramebuffer.h:
502         (WebGLFramebuffer):
503         * html/canvas/WebGLRenderingContext.cpp:
504         (WebCore):
505         (WebCore::WebGLRenderingContext::initializeNewContext):
506         (WebCore::WebGLRenderingContext::getExtension):
507         (WebCore::WebGLRenderingContext::getParameter):
508         (WebCore::WebGLRenderingContext::getSupportedExtensions):
509         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
510         (WebCore::WebGLRenderingContext::getMaxDrawBuffers):
511         (WebCore::WebGLRenderingContext::getMaxColorAttachments):
512         (WebCore::WebGLRenderingContext::setBackDrawBuffer):
513         (WebCore::WebGLRenderingContext::restoreCurrentFramebuffer):
514         (WebCore::WebGLRenderingContext::restoreCurrentTexture2D):
515         (WebCore::WebGLRenderingContext::supportsDrawBuffers): a cached version of EXTDrawBuffers::supports()
516         * html/canvas/WebGLRenderingContext.h:
517         (WebGLRenderingContext):
518
519 2013-03-22  Roger Fong  <roger_fong@apple.com>
520
521         Unreviewed. Fix AppleWin port following https://bugs.webkit.org/show_bug.cgi?id=113100.
522         Patch by Alexey Proskuryakov.
523
524         * platform/network/cf/ResourceHandleCFNet.cpp:
525         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
526
527 2013-03-22  Tony Chang  <tony@chromium.org>
528
529         REGRESSION (r146272): layout issues for flex boxes that have -webkit-flex-wrap: wrap
530         https://bugs.webkit.org/show_bug.cgi?id=113071
531
532         Reviewed by Ojan Vafai.
533
534         The refactor in r139535 introduced this bug, where a variable name wasn't updated properly.
535         In combination with r146272, this bug became more visible when nesting multiline flexboxen.
536
537         Test: css3/flexbox/multiline-min-preferred-width.html
538
539         * rendering/RenderFlexibleBox.cpp:
540         (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths): We want the width of the widest
541         flexitem, the value in m_minPreferredWidth isn't relevant. Also update the comment for max
542         preferred width.
543
544 2013-03-22  Max Vujovic  <mvujovic@adobe.com>
545
546         [CSS Shaders] Clamp css_MixColor before the blending and compositing steps
547         https://bugs.webkit.org/show_bug.cgi?id=113088
548
549         Reviewed by Dean Jackson.
550
551         The blending and compositing operations from the spec [1] expect that they are operating on
552         valid color inputs, in the range [0.0, 1.0]. Thus, we should clamp the css_MixColor input to
553         this range to avoid implementation-dependent behavior for invalid color inputs.
554
555         [1]: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending
556
557         Tests: css3/filters/custom/custom-filter-clamp-css-mix-color-negative.html
558                css3/filters/custom/custom-filter-clamp-css-mix-color.html
559
560         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
561         (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader):
562             Clamp css_MixColor as clampedMixColor before using it in the blending and compositing
563             steps.
564
565 2013-03-19  Martin Robinson  <mrobinson@igalia.com>
566
567         [GTK] Add WebCoreDOM to the gyp build
568         https://bugs.webkit.org/show_bug.cgi?id=112737
569
570         Reviewed by Nico Weber.
571
572         * WebCore.gyp/WebCoreGTK.gyp: Add WebCoreDOM to the gyp build.
573
574 2013-03-19  Martin Robinson  <mrobinson@igalia.com>
575
576         [GTK] Add WebCoreHTML to the gyp build
577         https://bugs.webkit.org/show_bug.cgi?id=112727
578
579         Reviewed by Nico Weber.
580
581         * WebCore.gyp/WebCoreGTK.gyp: Add support for building all files under
582         the HTML directory. This includes splitting off common WebCore dependencies
583         into an aggregate target and adding a top-level WebCore target.
584
585 2013-03-22  Tim Horton  <timothy_horton@apple.com>
586
587         Plugin Snapshotting: Auto-start dominant plugins
588         https://bugs.webkit.org/show_bug.cgi?id=113111
589         <rdar://problem/13475726>
590
591         Reviewed by Dean Jackson.
592
593         * html/HTMLPlugInElement.cpp:
594         (WebCore::HTMLPlugInElement::defaultEventHandler):
595         Acknowledge the new "Restarting" DisplayState.
596         * html/HTMLPlugInElement.h:
597         Rename PlayingWithPendingMouseClick to RestartingWithPendingMouseClick for accuracy.
598         Add "Restarting" DisplayState, so we can be aware that the plugin is intentionally restarting and not re-snapshot it.
599         * html/HTMLPlugInImageElement.cpp:
600         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Remove m_isPrimarySnapshottedPlugIn.
601         (WebCore::classNameForShadowRoot): Remove m_isPrimarySnapshottedPlugIn.
602         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Restart the plugin when it becomes primary.
603         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Remove m_isPrimarySnapshottedPlugIn.
604         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
605         Move the plugin to Restarting unless it's already marked as PendingMouseClick.
606         (WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired): Match the PlayingWithPendingMouseClick rename.
607         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Don't snapshot if we're restarting.
608         * html/HTMLPlugInImageElement.h: Remove m_isPrimarySnapshottedPlugIn.
609         * rendering/RenderSnapshottedPlugIn.cpp:
610         (WebCore::RenderSnapshottedPlugIn::paint): Acknowledge the new "Restarting" DisplayState.
611         (WebCore::RenderSnapshottedPlugIn::getCursor): Acknowledge the new "Restarting" DisplayState.
612         (WebCore::RenderSnapshottedPlugIn::handleEvent): Match the PlayingWithPendingMouseClick rename.
613
614 2013-03-19  Martin Robinson  <mrobinson@igalia.com>
615
616         [GTK] Add support for building the WebCore bindings to the gyp build
617         https://bugs.webkit.org/show_bug.cgi?id=112638
618
619         Reviewed by Nico Weber.
620
621         Add targets, actions, and rules for building the WebCore bindings. This is
622         the first part of the WebCoreGTK build.
623
624         * WebCore.gyp/ConvertFileToHeaderWithCharacterArray.gypi: Added.
625         * WebCore.gyp/MakeNames.gypi: Added.
626         * WebCore.gyp/WebCoreGTK.gyp: Added WebCore bindings build. This has been adapted
627         from the Chromium build.
628         * WebCore.gypi: Updated list of derived sources files and added a parameter
629         for adjusting the location of the built files. We don't want to force the
630         Mac build to change, but we'd still like to reuse the scripts that the
631         Chromium build uses.
632
633 2013-03-22  Dane Wallinga  <dgwallinga@chromium.org>
634
635         Add client callbacks to notify of changes of associated from controls
636         https://bugs.webkit.org/show_bug.cgi?id=110375
637
638         Reviewed by Ryosuke Niwa.
639
640         Hook FormAssociatedElement, HTMLFormElement to notify EditorClient of form changes after a page has loaded.
641         Will be used to add autofill support for ajax-y webpages. e.g if while filling out a form, new fields
642         are dynamically created, autofill can know to re-query the autofill server and keep going.
643         https://bugs.webkit.org/show_bug.cgi?id=110375
644
645         * dom/Document.cpp:
646         (WebCore::Document::Document):
647         (WebCore::Document::didAssociateFormControl):
648         (WebCore):
649         (WebCore::Document::didAssociateFormControlsTimerFired):
650         * dom/Document.h:
651         (Document):
652         added method didAssociateFormControl, which batches form changes
653         and calls out to ChromeClient on a timer.
654         * html/FormAssociatedElement.cpp:
655         (WebCore::FormAssociatedElement::resetFormOwner):
656         (WebCore::FormAssociatedElement::formAttributeChanged):
657         (WebCore):
658         * html/FormAssociatedElement.h:
659         (FormAssociatedElement):
660         add calls to Document::didAssociateFormControl when form changes
661         * html/HTMLFormElement.cpp:
662         (WebCore::HTMLFormElement::insertedInto):
663         (WebCore):
664         * html/HTMLFormElement.h:
665         add call to Document::didAssociateFormControl
666         * loader/EmptyClients.h:
667         (EmptyChromeClient):
668         (WebCore::EmptyChromeClient::didAssociateFormControls):
669         (WebCore::EmptyChromeClient::shouldNotifyOnFormChanges):
670         * page/ChromeClient.h:
671         (ChromeClient):
672         add new method didAssociateFormControls
673
674 2013-03-22  Alexey Proskuryakov  <ap@apple.com>
675
676         Split ResourceHandleMac into multiple files
677         https://bugs.webkit.org/show_bug.cgi?id=113100
678
679         Reviewed by Geoff Garen.
680
681         It's grown too big to navigate, and I'm going to make WebCoreResourceHandleAsDelegate
682         substantially more complicated yet.
683
684         1. Mechanically moved WebCoreResourceHandleAsDelegate into separate files.
685         2. Refactored WebCoreSynchronousLoaderClient to be cross-platform, and moved it into
686         separate files.
687
688         * WebCore.vcproj/WebCore.vcproj:
689         * WebCore.vcxproj/WebCore.vcxproj:
690         * WebCore.vcxproj/WebCore.vcxproj.filters:
691         * WebCore.xcodeproj/project.pbxproj:
692         * platform/network/SynchronousLoaderClient.cpp: Added.
693         * platform/network/SynchronousLoaderClient.h: Added.
694         * platform/network/cf/ResourceHandleCFNet.cpp:
695         * platform/network/mac/SynchronousLoaderClient.mm: Added.
696         * platform/network/mac/WebCoreResourceHandleAsDelegate.h: Added.
697         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: Added.
698
699 2013-03-21  Geoffrey Garen  <ggaren@apple.com>
700
701         Added a setting for whether JavaScript markup is enabled
702         https://bugs.webkit.org/show_bug.cgi?id=112999
703
704         Reviewed by Maciej Stachowiak.
705
706         This setting is useful for clients that want protection from script
707         injection attacks.
708
709         * page/Settings.h:
710         (Settings): Clarified which clients should call canExecuteScripts().
711
712         * page/Settings.in: Added the new setting.
713
714 2013-03-22  Roger Fong  <roger_fong@apple.com>
715
716         Unreviewed build fix.
717
718         * bindings/scripts/preprocessor.pm:
719         (applyPreprocessor):
720
721 2013-03-22  Roger Fong  <roger_fong@apple.com>
722
723         Unreviewed. Force kill gcc-3.exe during bindings generation tests to avoid process hangs.
724
725         This problem is occuring on the WinEWS bots where there are somehow multiple gcc-3 processes existing at the same time.
726         This is a speculative fix. There should only be 1 gcc-3.exe process running at a time ever.
727
728         * bindings/scripts/preprocessor.pm:
729         (applyPreprocessor):
730
731 2013-03-22  Eric Carlson  <eric.carlson@apple.com>
732
733         Cleanup text track selection logic
734         https://bugs.webkit.org/show_bug.cgi?id=113062
735
736         Reviewed by Jer Noble.
737
738         No new tests, covered by existing tests.
739
740         * html/HTMLMediaElement.cpp:
741         (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Remove.
742         (WebCore::HTMLMediaElement::configureTextTrackGroup): Don't look at track attributes directly,
743             use captionPreferences->textTrackSelectionScore to calculate track rank.
744         (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Set m_processingPreferenceChange here
745             instead of in captionPreferencesChanged.
746         (WebCore::HTMLMediaElement::captionPreferencesChanged): Don't suppress calls to setClosedCaptionsVisible,
747             existing code already makes sure we don't do unnecessary work.
748         * html/HTMLMediaElement.h:
749
750         * html/shadow/MediaControlElements.cpp:
751         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Drive by cleanup, don't
752             process inactive cues.
753
754         * html/shadow/MediaControlsApple.cpp:
755         (WebCore::MediaControlsApple::changedClosedCaptionsVisibility): Call resetTrackListMenu instead
756             of updateDisplay so we only mark the menu as needing a recalculation and do the work when
757             it is displayed.
758
759         * page/CaptionUserPreferences.cpp:
760         (WebCore::CaptionUserPreferences::shouldShowCaptions): When in testing mode, return true if
761             the caption or subtitle preference has been set.
762         (WebCore::CaptionUserPreferences::setShouldShowCaptions): In testing mode, clear the caption
763             and subtitle preference when passed false.
764         (WebCore::CaptionUserPreferences::textTrackSelectionScore): Calculate the track score based on
765             track type preference and preferred language.
766         (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Score a track according to
767             the language presence and position in the preferred languages list.
768         * page/CaptionUserPreferences.h:
769
770         * page/CaptionUserPreferencesMac.h:
771         * page/CaptionUserPreferencesMac.mm:
772         (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Calculate track language score 
773             according to user preferences.
774
775         * platform/Language.cpp:
776         (WebCore::indexOfBestMatchingLanguageInList): Repurposed the static bestMatchingLanguage
777             function to return the location of a language in a Vector.
778         (WebCore::preferredLanguageFromList): Removed.
779         * platform/Language.h:
780
781 2013-03-22  ChangSeok Oh  <changseok.oh@collabora.com>
782
783         Build fix for TransformationMatrix
784         https://bugs.webkit.org/show_bug.cgi?id=113087
785
786         Reviewed by Martin Robinson.
787
788         This is a trivial build fix for clutter ac backend. Clutter AC backend doesn't use
789         TextureMapper so there is nowhere including TransformationMatrix.h.
790         For the reason, we include it explicitly.
791
792         No new tests because of no functionality change.
793
794         * platform/graphics/clutter/GraphicsContext3DPrivate.cpp:
795         * platform/graphics/clutter/GraphicsContext3DPrivate.h:
796         (WebCore):
797
798 2013-03-22  Steve Block  <steveblock@chromium.org>
799
800         Coordinates.idl lacks Conditional=GEOLOCATION
801         https://bugs.webkit.org/show_bug.cgi?id=112949
802
803         Reviewed by Steve Block.
804
805         No new tests, build optimization only.
806
807         * page/Coordinates.idl: Added GEOLOCATION conditional guard.
808
809 2013-03-22  Daniel Cheng  <dcheng@chromium.org>
810
811         Data store should be readable in dragstart/copy/cut events
812         https://bugs.webkit.org/show_bug.cgi?id=23695
813
814         Reviewed by Tony Chang.
815
816         There were several events where data could be written but not read back due to the fact that
817         different Clipboard method implementations checked permissions inconsistently. This patch
818         adds helper methods to check if an operation is permitted on a Clipboard and refactors all
819         direct comparisons against Clipboard::m_policy to use the new helpers instead. This fixes
820         several bugs where Clipboard::types and Clipboard::getData are not usable inside the
821         aforementioned events.
822
823         Tests: editing/pasteboard/can-read-in-copy-and-cut-events.html
824                editing/pasteboard/can-read-in-dragstart-event.html
825
826         * dom/Clipboard.cpp:
827         (WebCore::Clipboard::canReadTypes): Formerly restricted to ClipboardReadable and
828                                             ClipboardTypesReadable; now allows ClipboardWritable as
829                                             well.
830         (WebCore::Clipboard::canReadData): Formerly restricted to ClipboardReadable; now allows
831                                            ClipboardWritable as well.
832         (WebCore::Clipboard::canWriteData):
833         (WebCore::Clipboard::canSetDragImage):
834         (WebCore::Clipboard::hasFileOfType):
835         (WebCore::Clipboard::hasStringOfType):
836         (WebCore::Clipboard::setDropEffect):
837         (WebCore::Clipboard::setEffectAllowed):
838         * dom/Clipboard.h:
839         (Clipboard):
840         * platform/blackberry/ClipboardBlackBerry.cpp:
841         (WebCore::ClipboardBlackBerry::clearData):
842         (WebCore::ClipboardBlackBerry::clearAllData):
843         (WebCore::ClipboardBlackBerry::getData):
844         (WebCore::ClipboardBlackBerry::setData):
845         (WebCore::ClipboardBlackBerry::types):
846         * platform/chromium/ClipboardChromium.cpp:
847         (WebCore::DataTransferItemPolicyWrapper::kind):
848         (WebCore::DataTransferItemPolicyWrapper::type):
849         (WebCore::DataTransferItemPolicyWrapper::getAsString):
850         (WebCore::DataTransferItemPolicyWrapper::getAsFile):
851         (WebCore::ClipboardChromium::clearData):
852         (WebCore::ClipboardChromium::clearAllData):
853         (WebCore::ClipboardChromium::getData):
854         (WebCore::ClipboardChromium::setData):
855         (WebCore::ClipboardChromium::types):
856         (WebCore::ClipboardChromium::files):
857         (WebCore::ClipboardChromium::setDragImage):
858         * platform/gtk/ClipboardGtk.cpp:
859         (WebCore::ClipboardGtk::clearData):
860         (WebCore::ClipboardGtk::clearAllData):
861         (WebCore::ClipboardGtk::getData):
862         (WebCore::ClipboardGtk::setData):
863         (WebCore::ClipboardGtk::types):
864         (WebCore::ClipboardGtk::files):
865         (WebCore::ClipboardGtk::setDragImage):
866         * platform/mac/ClipboardMac.mm:
867         (WebCore::ClipboardMac::clearData):
868         (WebCore::ClipboardMac::clearAllData):
869         (WebCore::ClipboardMac::getData):
870         (WebCore::ClipboardMac::setData):
871         (WebCore::ClipboardMac::types):
872         (WebCore::ClipboardMac::files):
873         (WebCore::ClipboardMac::setDragImage):
874         * platform/qt/ClipboardQt.cpp:
875         (WebCore::ClipboardQt::clearData):
876         (WebCore::ClipboardQt::clearAllData):
877         (WebCore::ClipboardQt::getData):
878         (WebCore::ClipboardQt::setData):
879         (WebCore::ClipboardQt::types):
880         (WebCore::ClipboardQt::files):
881         (WebCore::ClipboardQt::setDragImage):
882         (WebCore::ClipboardQt::items):
883         * platform/qt/DataTransferItemListQt.cpp:
884         (WebCore::DataTransferItemListQt::length):
885         (WebCore::DataTransferItemListQt::item):
886         (WebCore::DataTransferItemListQt::deleteItem):
887         (WebCore::DataTransferItemListQt::clear):
888         (WebCore::DataTransferItemListQt::add):
889         * platform/qt/DataTransferItemQt.cpp:
890         (WebCore::DataTransferItemQt::getAsString):
891         * platform/win/ClipboardWin.cpp:
892         (WebCore::ClipboardWin::clearData):
893         (WebCore::ClipboardWin::clearAllData):
894         (WebCore::ClipboardWin::getData):
895         (WebCore::ClipboardWin::setData):
896         (WebCore::ClipboardWin::types):
897         (WebCore::ClipboardWin::files):
898         (WebCore::ClipboardWin::setDragImage):
899
900 2013-03-22  Andrei Bucur  <abucur@adobe.com>
901
902         [CSS Regions] Remove pushLayoutState(RenderFlowThread*) from RenderView
903         https://bugs.webkit.org/show_bug.cgi?id=113084
904
905         Reviewed by Dirk Schulze.
906
907         Remove void pushLayoutState(RenderFlowThread*, bool regionsChanged) from RenderView.h because it's not used.
908
909         Tests: Code cleanup. No tests needed.
910
911         * rendering/RenderView.h:
912         (RenderView):
913
914 2013-03-22  Kondapally Kalyan  <kalyan.kondapally@intel.com>
915
916         [EFL] Fix build issues to enable CSS Filter and Shaders support.
917         https://bugs.webkit.org/show_bug.cgi?id=111274
918
919         Reviewed by Noam Rosenthal.
920
921         This is in preperation to enable CSS Filter and Shaders support.
922         This patch fixes related build issues to enable the support.
923
924         * platform/graphics/surfaces/efl/GLTransportSurface.cpp:
925         * platform/graphics/texmap/TextureMapper.cpp:
926         * platform/graphics/texmap/TextureMapper.h:
927         (WebCore):
928         * platform/graphics/texmap/TextureMapperGL.cpp:
929         * platform/graphics/texmap/TextureMapperGL.h:
930         (WebCore):
931         * platform/graphics/texmap/TextureMapperShaderProgram.h:
932
933 2013-03-22  Matt Falkenhagen  <falken@chromium.org>
934
935         Implement isEnabledFormControl() for SliderThumbElement and SpinButtonElement in terms of disabled()
936         https://bugs.webkit.org/show_bug.cgi?id=112993
937
938         Reviewed by Kent Tamura.
939
940         This is an intermediate step for refactoring Node::disabled and
941         Element::isEnabledFormControl. All classes that override
942         isEnabledFormControl just return !disabled(), except for
943         SliderThumbElement and SpinButtonElement. This patch changes those two
944         classes to do so, which shows that the two functions are redundant and
945         easy to refactor into a single function in a subsequent patch.
946
947         No new tests, there should be no behavior change.
948
949         * html/shadow/SliderThumbElement.cpp:
950         (WebCore::SliderThumbElement::disabled):
951         (WebCore):
952         (WebCore::SliderThumbElement::isEnabledFormControl):
953         * html/shadow/SliderThumbElement.h:
954         (SliderThumbElement):
955         * html/shadow/SpinButtonElement.h: The check of shadowHost() is
956         necessary because it can be detached by JavaScript that runs during
957         event handling (see r76566)
958
959 2013-03-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
960
961         [Qt] New fast/text/word-space-with-kerning-3.html fails on Qt.
962         https://bugs.webkit.org/show_bug.cgi?id=112668
963
964         Reviewed by Jocelyn Turcotte.
965
966         Qt adds word-spacing to leading spaces, but WebCore only expects
967         us to add for trailing spaces. We only corrected for this in width
968         calculation but do need to also do it for drawing.
969
970         Instead of subtracting the extra word-spacing we now configure the
971         FormatRange not to apply to leading spaces. This means this behavior
972         will be applied everywhere reliably.
973
974         * platform/graphics/Font.h:
975         (Font):
976         * platform/graphics/qt/FontQt.cpp:
977         (WebCore::Font::drawComplexText):
978         (WebCore::Font::floatWidthForComplexText):
979         (WebCore::Font::offsetForPositionForComplexText):
980         (WebCore::Font::selectionRectForComplexText):
981         (WebCore::Font::initFormatForTextLayout):
982
983 2013-03-22  Joshua Bell  <jsbell@chromium.org>
984
985         REGRESSION (r146540?): Crashes in storage/indexeddb/factory-basics-workers.html, storage/indexeddb/transaction-error.html
986         https://bugs.webkit.org/show_bug.cgi?id=113019
987
988         Reviewed by Tony Chang.
989
990         Also manifesting flakily under Chromium's content_shell. It's an ASSERT being hit in
991         the IDBTransaction destructor. The cause was r146540 which allows a stopped context
992         to reclaim script wrappers. This allows the IDBTransaction to be deref'd at times where
993         it previously would have just leaked. Modulate the destructor assertions to account
994         for this case.
995
996         No new tests; failures already manifest as flaky crashes in some ports.
997
998         * Modules/indexeddb/IDBTransaction.cpp:
999         (WebCore::IDBTransaction::~IDBTransaction): If context is stopped, expected state
1000         transitions/cleanup may not have occurred before destructor runs.
1001
1002 2013-03-22  David Grogan  <dgrogan@chromium.org>
1003
1004         IndexedDB: Histogram available disk space on attempt to open database
1005         https://bugs.webkit.org/show_bug.cgi?id=112862
1006
1007         Reviewed by Tony Chang.
1008
1009         ChromeOS suspects they might be hitting disk corruption when the disks
1010         are nearly full. This patch logs the available space to either the
1011         "success" or the "fail" histogram as appropriate so that the
1012         distributions can be compared.
1013
1014         No new tests - I don't know of a good way to test histograms. Local
1015         printf testing didn't turn up any bugs.
1016
1017         * platform/leveldb/LevelDBDatabase.cpp:
1018         (WebCore::HistogramFreeSpace):
1019         (WebCore):
1020         (WebCore::LevelDBDatabase::open):
1021
1022 2013-03-22  Nate Chapin  <japhet@chromium.org>
1023
1024         REGRESSION (r146239): Reproducible crash in WebCore::DocumentLoader::responseReceived.
1025         https://bugs.webkit.org/show_bug.cgi?id=112811
1026
1027         Reviewed by Brady Eidson.
1028
1029         Test: http/tests/cache/x-frame-options-304.html
1030
1031         * loader/DocumentLoader.cpp:
1032         (WebCore::DocumentLoader::responseReceived):
1033         * loader/cache/CachedRawResource.cpp:
1034         (WebCore::CachedRawResource::switchClientsToRevalidatedResource):
1035         * loader/cache/CachedRawResource.h:
1036
1037 2013-03-22  Jer Noble  <jer.noble@apple.com>
1038
1039         REGRESSION: -webkit-box-reflect does not show on video elements
1040         https://bugs.webkit.org/show_bug.cgi?id=112397
1041
1042         Reviewed by Eric Carlson.
1043
1044         Work around the ASSERTs generated when setting an AVPlayerLayer's player property
1045         during a CA flush by setting the player property during the next runloop, outside
1046         of a CA flush.
1047
1048         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1049         (PlatformCALayer::clone):
1050
1051 2013-03-22  peavo@outlook.com  <peavo@outlook.com>
1052
1053         [Curl] Performance fix, avoid loading cookie file on every request.
1054         https://bugs.webkit.org/show_bug.cgi?id=113023
1055
1056         Reviewed by Brent Fulgham.
1057
1058         We currently load the cookie file on every request, and when setting cookies from JavaScript, by using the option CURLOPT_COOKIEFILE.
1059         This is very inefficient as the cookie file can get quite large, and file I/O is slow.
1060         It is sufficient to load the cookie file on startup, as we use a shared cookie database between the requests.
1061
1062         * platform/network/curl/CookieJarCurl.cpp:
1063         (WebCore::setCookiesFromDOM): Avoid loading cookie file when setting cookies from JavaScript.
1064         * platform/network/curl/ResourceHandleManager.cpp:
1065         (WebCore::ResourceHandleManager::initializeHandle): Avoid loading cookie file on every request.
1066         (WebCore::ResourceHandleManager::initCookieSession): Load the cookie file to shared database on startup.
1067
1068 2013-03-22  Tiancheng Jiang  <tijiang@rim.com>
1069
1070         [BlackBerry] Update Input field Background Color
1071         https://bugs.webkit.org/show_bug.cgi?id=113063
1072
1073         Reviewed by George Staikos.
1074
1075         RIM PR 307463.
1076         Internally reviewed by Ed Baker.
1077
1078         * platform/blackberry/RenderThemeBlackBerry.cpp:
1079         (WebCore::RenderThemeBlackBerry::paintTextFieldOrTextAreaOrSearchField):
1080
1081 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
1082
1083         Web Inspector: FlameChart. Draw function names over flame chart bar if they fit into the bar.
1084         https://bugs.webkit.org/show_bug.cgi?id=113052
1085
1086         Reviewed by Vsevolod Vlasov.
1087
1088         The draw function will draw the bar title if the text is less than bar width.
1089         Unfortunately almost all the projects which need to be profiled
1090         use long function names with dots. So if the function name has dots and
1091         doesn't fit into the space then prepareTitle will try to drop the prefix before dot.
1092         If the title has no dots then the function will strip the tail of the title.
1093
1094         * inspector/front-end/FlameChart.js:
1095         (WebInspector.FlameChart):
1096         (WebInspector.FlameChart.prototype.draw):
1097         (WebInspector.FlameChart.prototype._prepareTitle):
1098
1099 2013-03-22  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1100
1101         Web Inspector: Add "hidden" attribute to the recently added APIs in Inspector.json
1102         https://bugs.webkit.org/show_bug.cgi?id=113061
1103
1104         Added "hidden": true to the APIs introduced since version 1.0.
1105
1106         Reviewed by Pavel Feldman.
1107
1108         * inspector/Inspector.json:
1109
1110 2013-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
1111
1112         Web Inspector: Correctly implement scrollToLine, revealLine and setSelection on CodeMirror  editor.
1113         https://bugs.webkit.org/show_bug.cgi?id=113028
1114
1115         Reviewed by Pavel Feldman.
1116
1117         Added focus event handler to CodeMirror editor view elememnt to support inspector's focus model.
1118         Added selection and scroll listeners to correctly save editor scroll and selection in history.
1119         Implemented revealLine, scrollToLine and setSelection.
1120         Note: CodeMirror's coordsChar method does not work correctly in "local" mode, implemented as binary search
1121         as a temporary workaround.
1122
1123         * inspector/front-end/CodeMirrorTextEditor.js:
1124         (WebInspector.CodeMirrorTextEditor):
1125         (WebInspector.CodeMirrorTextEditor.prototype.defaultFocusedElement):
1126         (WebInspector.CodeMirrorTextEditor.prototype._handleElementFocus):
1127         (WebInspector.CodeMirrorTextEditor.prototype.revealLine):
1128         (WebInspector.CodeMirrorTextEditor.prototype._coordsChar):
1129         (WebInspector.CodeMirrorTextEditor.prototype._topScrolledLine):
1130         (WebInspector.CodeMirrorTextEditor.prototype._bottomScrolledLine):
1131         (WebInspector.CodeMirrorTextEditor.prototype._scroll):
1132         (WebInspector.CodeMirrorTextEditor.prototype._selectionChange):
1133         (WebInspector.CodeMirrorTextEditor.prototype.scrollToLine):
1134         (WebInspector.CodeMirrorTextEditor.prototype.setSelection):
1135         (WebInspector.CodeMirrorTextEditor.prototype.copyRange):
1136         * inspector/front-end/TextEditor.js:
1137         (WebInspector.TextEditor.prototype.copyRange):
1138
1139 2013-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
1140
1141         Web Inspector: [Regression] Editor scroll is not restored after inspector reload.
1142         https://bugs.webkit.org/show_bug.cgi?id=113027
1143
1144         Reviewed by Pavel Feldman.
1145
1146         * inspector/front-end/SourceFrame.js:
1147         (WebInspector.SourceFrame.prototype.wasShown):
1148         (WebInspector.SourceFrame.prototype._isEditorShowing):
1149         (WebInspector.SourceFrame.prototype._innerHighlightLineIfNeeded):
1150         (WebInspector.SourceFrame.prototype._innerRevealLineIfNeeded):
1151         (WebInspector.SourceFrame.prototype._innerScrollToLineIfNeeded):
1152         (WebInspector.SourceFrame.prototype._innerSetSelectionIfNeeded):
1153
1154 2013-03-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1155
1156         [Qt] Fix build with OPENCL 1.2
1157         https://bugs.webkit.org/show_bug.cgi?id=113056
1158
1159         Reviewed by Kenneth Rohde Christiansen.
1160
1161         Switch qmake checks to the modern style which means we can enable OpenCL with
1162         WEBKIT_CONFIG+=opencl. 
1163
1164         Upgrade OpenCL 1.1 clCreateImage2D to OpenCL 1.2 clCreateImage calls.
1165
1166         * Target.pri:
1167         * WebCore.pri:
1168         * platform/graphics/filters/FilterEffect.cpp:
1169         (WebCore::FilterEffect::createOpenCLImageResult):
1170         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
1171         (WebCore::FilterContextOpenCL::createOpenCLImage):
1172
1173 2013-03-22  ChangSeok Oh  <changseok.oh@collabora.com>
1174
1175         [GTK][AC] Opacity animation doesn't work with clutter backend
1176         https://bugs.webkit.org/show_bug.cgi?id=110347
1177
1178         Reviewed by Gustavo Noronha Silva.
1179
1180         The static casting in ternary operator doesn't change actual inputted argument type.
1181         So I replaced it with if-else statement.
1182
1183         Covered by existing animation tests.
1184
1185         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
1186         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
1187         (WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty):
1188
1189 2013-03-22  ChangSeok Oh  <changseok.oh@collabora.com>
1190
1191         [GTK][AC] Add removing animations procedure with clutter ac backend
1192         https://bugs.webkit.org/show_bug.cgi?id=110607
1193
1194         Reviewed by Gustavo Noronha Silva.
1195
1196         This changes is based on mac port implementation. The only different thing is
1197         that updateAnimations is called explicitly in destructor of GraphicsLayerClutter
1198         to remove uncommitted animations. Because even though we call notifyFlushRequired
1199         to remove existing animations in removeAnimation(), removeClutterAnimationFromLayer
1200         has been never reached since the root layer is destroyed before. It means
1201         that we haven't lost a change to remove actual animations from clutterActor.
1202
1203         Covered by existing animation tests.
1204
1205         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
1206         (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter):
1207         (WebCore::GraphicsLayerClutter::removeAnimation):
1208         (WebCore):
1209         (WebCore::GraphicsLayerClutter::removeClutterAnimationFromLayer):
1210         * platform/graphics/clutter/GraphicsLayerClutter.h:
1211         (WebCore::GraphicsLayerClutter::animationIsRunning):
1212         (GraphicsLayerClutter):
1213
1214 2013-03-22  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1215
1216         [EFL][WebGL] Optimize AlphaOp for HTMLVideoElement input.
1217         https://bugs.webkit.org/show_bug.cgi?id=113049
1218
1219         Reviewed by Kenneth Rohde Christiansen.
1220
1221         Covered by existing tests.
1222
1223         Changeset 137397 implemented optimisation to avoid any
1224         unnecessary Unmultiply or Premultiply operation in unpack/pack
1225         provided the Image source is from HTMLVideoElement. This patch
1226         enables the same for EFL port.
1227
1228         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1229         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1230
1231 2013-03-22  Tommy Widenflycht  <tommyw@google.com>
1232
1233         Clean up the speech recognintion API
1234         https://bugs.webkit.org/show_bug.cgi?id=112916
1235
1236         Reviewed by Adam Barth.
1237
1238         This patch cleans away deprecated parts, fixes so that stop() can be called more than once and adds
1239         the missing emma attribute on SpeechRecognitionEvent (which is always null).
1240
1241         Patch covered by existing tests.
1242
1243         * Modules/speech/SpeechRecognition.cpp:
1244         (WebCore::SpeechRecognition::stopFunction):
1245         (WebCore::SpeechRecognition::abort):
1246         (WebCore::SpeechRecognition::didEnd):
1247         (WebCore::SpeechRecognition::SpeechRecognition):
1248         * Modules/speech/SpeechRecognition.h:
1249         (SpeechRecognition):
1250         * Modules/speech/SpeechRecognitionEvent.cpp:
1251         (WebCore::SpeechRecognitionEvent::createResult):
1252         (WebCore::SpeechRecognitionEvent::createNoMatch):
1253         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
1254         * Modules/speech/SpeechRecognitionEvent.h:
1255         (WebCore):
1256         (SpeechRecognitionEventInit):
1257         (SpeechRecognitionEvent):
1258         (WebCore::SpeechRecognitionEvent::emma):
1259         * Modules/speech/SpeechRecognitionEvent.idl:
1260
1261 2013-03-22  Emil A Eklund  <eae@chromium.org>
1262
1263         Floor cell widths in AutoTableLayout::recalcColumn
1264         https://bugs.webkit.org/show_bug.cgi?id=112922
1265
1266         Reviewed by Levi Weintraub.
1267
1268         Table cells widths are floored to ensure even distribution of available
1269         space across columns. The code path that computes the width of the
1270         _table_ failed to take this into account and thus can over report the
1271         total width of the table.
1272
1273         Test: fast/sub-pixel/table-with-subpixel-cell-size.html
1274
1275         * rendering/AutoTableLayout.cpp:
1276         (WebCore::AutoTableLayout::recalcColumn): Floor width to match column sizing logic.
1277
1278 2013-03-22  David Kilzer  <ddkilzer@apple.com>
1279
1280         BUILD FIX (r146208): Export shouldPrintExceptions methods for iOS
1281
1282         Fixes the following build failure:
1283
1284             Undefined symbols for architecture i386:
1285               "__ZN7WebCore11PageConsole24setShouldPrintExceptionsEb", referenced from:
1286                     +[WebCoreStatistics setShouldPrintExceptions:] in WebCoreStatistics.o
1287               "__ZN7WebCore11PageConsole21shouldPrintExceptionsEv", referenced from:
1288                     +[WebCoreStatistics shouldPrintExceptions] in WebCoreStatistics.o
1289             ld: symbol(s) not found for architecture i386
1290             clang: error: linker command failed with exit code 1 (use -v to see invocation)
1291
1292         * WebCore.exp.in: Move symbols so they're exported for iOS as
1293         well.
1294
1295 2013-03-22  Yury Semikhatsky  <yurys@chromium.org>
1296
1297         Unreviewed. Fix Chromium Win compilation after r146583.
1298
1299         * bindings/v8/CustomElementHelpers.cpp:
1300         (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
1301
1302 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
1303
1304         Web Inspector: Flame Chart. Chart has to be zoomed around the mouse pointer.
1305         https://bugs.webkit.org/show_bug.cgi?id=113031
1306
1307         Reviewed by Yury Semikhatsky.
1308
1309         Overview grid is able to zoom around the mouse pointer.
1310         So the simplest way is to translate x coordinate of the mouse pointer hovered over the chart
1311         to x coordinate in term of overview window and pass it to the zoom function.
1312
1313         Minor unrelated fix: draw small border at bottom of the overview grid.
1314
1315         * inspector/front-end/FlameChart.js:
1316         (WebInspector.FlameChart.prototype._onMouseWheel):
1317         * inspector/front-end/OverviewGrid.js:
1318         (WebInspector.OverviewGrid.prototype.zoom):
1319         * inspector/front-end/flameChart.css:
1320         (#flame-chart-overview-container):
1321
1322 2013-03-22  No'am Rosenthal  <noam@webkit.org>
1323
1324         [Texmap] TextureMapperImageBuffer should not use rendering code for filters.
1325         https://bugs.webkit.org/show_bug.cgi?id=113040
1326
1327         Reviewed by Kenneth Rohde Christiansen.
1328
1329         Disable TextureMapperImageBuffer filters, until they can be done the right way.
1330         This should only disrupt accelerated filters in fallback mode, which is a very rare
1331         use case.
1332
1333         No new testable functionality.
1334
1335         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
1336         (WebCore::BitmapTextureImageBuffer::applyFilters):
1337
1338 2013-03-22  Sergey Ryazanov  <serya@chromium.org>
1339
1340         Web Inspector: Report more CSS errors
1341         https://bugs.webkit.org/show_bug.cgi?id=113022
1342
1343         Reviewed by Pavel Feldman.
1344
1345         Reporting next few CSS syntax errors in declaration_list.
1346
1347         * css/CSSGrammar.y.in:
1348
1349 2013-03-18  Yury Semikhatsky  <yurys@chromium.org>
1350
1351         Web Inspector: use individual samples to construct CPU profile flame chart
1352         https://bugs.webkit.org/show_bug.cgi?id=112569
1353
1354         Reviewed by Pavel Feldman.
1355
1356         Added an optional array of samples to the CPU profile returned over the
1357         protocol. Each sample is id of the profile node corresponding to the top frame
1358         of the sample's stack trace. The array of samples if present is used to draw
1359         the flame chart on the CPU profile panel, otherwise flame chart is drawn based
1360         on the aggregated profile data.
1361
1362         * bindings/js/ScriptProfile.cpp:
1363         (WebCore::ScriptProfile::buildInspectorObjectForSamples):
1364         * bindings/js/ScriptProfile.h:
1365         (ScriptProfile):
1366         * bindings/v8/ScriptProfile.cpp:
1367         (WebCore::buildInspectorObjectFor):
1368         (WebCore):
1369         (WebCore::ScriptProfile::buildInspectorObjectForSamples):
1370         * bindings/v8/ScriptProfile.h:
1371         (ScriptProfile):
1372         * bindings/v8/ScriptProfiler.cpp:
1373         (WebCore::ScriptProfiler::start):
1374         * inspector/Inspector.json:
1375         * inspector/InspectorProfilerAgent.cpp:
1376         (WebCore::InspectorProfilerAgent::getCPUProfile):
1377         * inspector/front-end/CPUProfileView.js:
1378         (WebInspector.CPUProfileView.prototype._getCPUProfileCallback):
1379         (WebInspector.CPUProfileView.prototype._buildIdToNodeMap):
1380         * inspector/front-end/FlameChart.js:
1381         (WebInspector.FlameChart.prototype._calculateTimelineData):
1382
1383 2013-03-22  Steve Block  <steveblock@chromium.org>
1384
1385         Use generated bindings for the Coordinates type used by Geolocation
1386         https://bugs.webkit.org/show_bug.cgi?id=112975
1387
1388         Reviewed by Kentaro Hara.
1389
1390         No new tests, refactoring only.
1391
1392         * CMakeLists.txt:
1393         * GNUmakefile.list.am:
1394         * Modules/geolocation/Coordinates.cpp: Renamed from Source/WebCore/bindings/js/JSCoordinatesCustom.cpp.
1395         (WebCore):
1396         (WebCore::Coordinates::altitude):
1397         (WebCore::Coordinates::altitudeAccuracy):
1398         (WebCore::Coordinates::heading):
1399         (WebCore::Coordinates::speed):
1400         * Modules/geolocation/Coordinates.h:
1401         (Coordinates):
1402         * Modules/geolocation/Coordinates.idl:
1403         * Target.pri:
1404         * UseJSC.cmake:
1405         * UseV8.cmake:
1406         * WebCore.gypi:
1407         * WebCore.vcproj/WebCore.vcproj:
1408         * WebCore.vcxproj/WebCore.vcxproj:
1409         * WebCore.vcxproj/WebCore.vcxproj.filters:
1410         * WebCore.xcodeproj/project.pbxproj:
1411         * bindings/js/JSBindingsAllInOne.cpp:
1412         * bindings/v8/custom/V8CoordinatesCustom.cpp: Removed.
1413
1414 2013-03-22  Kunihiko Sakamoto  <ksakamoto@chromium.org>
1415
1416         INPUT_MULTIPLE_FIELDS_UI: Incomplete datetime format should fallback to default
1417         https://bugs.webkit.org/show_bug.cgi?id=113005
1418
1419         Reviewed by Kent Tamura.
1420
1421         Use fallback format when datetime format from locale is not complete.
1422
1423         Tests: fast/forms/date-multiple-fields/date-multiple-fields-fallback-format.html
1424                fast/forms/datetime-multiple-fields/datetime-multiple-fields-fallback-format.html
1425                fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-fallback-format.html
1426                fast/forms/month-multiple-fields/month-multiple-fields-fallback-format.html
1427                fast/forms/time-multiple-fields/time-multiple-fields-fallback-format.html
1428                fast/forms/week-multiple-fields/week-multiple-fields-fallback-format.html
1429
1430         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1431         (DateTimeFormatValidator): A helper class that parses datetime format and tests existence of fields.
1432         (WebCore::DateTimeFormatValidator::DateTimeFormatValidator):
1433         (WebCore::DateTimeFormatValidator::visitField):
1434         (WebCore::DateTimeFormatValidator::validateFormat): Parses datetime format and validates by calling BaseMultipleFieldsDateAndTimeInputType::isValidFormat.
1435         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue): Checks if dateTimeFormat is valid, and uses fallback format if not.
1436         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1437         (BaseMultipleFieldsDateAndTimeInputType): Declare isValidFormat.
1438         * html/DateInputType.cpp:
1439         (WebCore::DateInputType::isValidFormat): Added.
1440         * html/DateInputType.h:
1441         (DateInputType):
1442         * html/DateTimeInputType.cpp:
1443         (WebCore::DateTimeInputType::isValidFormat): Added.
1444         * html/DateTimeInputType.h:
1445         (DateTimeInputType):
1446         * html/DateTimeLocalInputType.cpp:
1447         (WebCore::DateTimeLocalInputType::isValidFormat): Added.
1448         * html/DateTimeLocalInputType.h:
1449         (DateTimeLocalInputType):
1450         * html/MonthInputType.cpp:
1451         (WebCore::MonthInputType::isValidFormat): Added.
1452         * html/MonthInputType.h:
1453         (MonthInputType):
1454         * html/TimeInputType.cpp:
1455         (WebCore::TimeInputType::isValidFormat): Added.
1456         * html/TimeInputType.h:
1457         (TimeInputType):
1458         * html/WeekInputType.cpp:
1459         (WebCore::WeekInputType::isValidFormat): Added.
1460         * html/WeekInputType.h:
1461         (WeekInputType):
1462
1463 2013-03-22  Hajime Morrita  <morrita@google.com>
1464
1465         Custom Elements: "readyCallback" lifecycle callback should be called.
1466         https://bugs.webkit.org/show_bug.cgi?id=112538
1467
1468         Reviewed by Elliott Sprehn.
1469
1470         This change allows each custom element definition to hook up its instantiation,
1471         namely "readyCallback" lifecycle callback.
1472
1473         The change has two parts:
1474         - 1. Tracking which Element objects to be created.
1475         - 2. Invoking appropriate JavaScript functions, which are readyCallback(),
1476           before the Element object is visible from page script.
1477
1478         For 1, CustomElementRegistry maintains list of "callback
1479         invocaions".  Each list item ("invocation") tracks the element
1480         which has a lifecycle callback to be invoked. Each invocation is
1481         registered when - Any custom element C++ object is instantiated.
1482         See changes on CustomElementConstructor.cpp.
1483
1484         This also happens when @is attribute is set by the parser or node
1485         cloning routine, which can turn a non-custom element into a
1486         type-extended custom element. See changes on Element.cpp.
1487
1488         For 2, CustomElementRegistry basically follows what
1489         MutationObserver is doing, and introduces a method called
1490         deliverLifecycleCallbacks(). This function flushes all pending
1491         callback invocations. You can think it as a dual of
1492         MutationObserver::deliverAllMutations().
1493
1494         The delivery function is called places where MutationObserver's
1495         deliverAllMutations() is called. In addition, it is also called
1496         just before returning from a set of DOM APIs. For example, it is
1497         called just before createElement() returns, so that possibly
1498         created custom element becomes ready through its readyCallback().
1499         Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In
1500         principle, APIs which can create new custom element instnaces are
1501         marked. See CustomElementRegistry::CallbackDeliveryScope and
1502         changes on CodeGeneratorV8.pm.
1503
1504         We need this extra work because the readyCallback() needs to give
1505         an illusion so that JavaScript programmers feel like the
1506         readyCallback() callback being called just after it is created,
1507         instead of called on arbitrary late timing like MutationObserver
1508         notifications.
1509
1510         Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html
1511                fast/dom/custom/lifecycle-ready-createElement-reentrancy.html
1512                fast/dom/custom/lifecycle-ready-creation-api.html
1513                fast/dom/custom/lifecycle-ready-innerHTML.html
1514                fast/dom/custom/lifecycle-ready-parser-only.html
1515                fast/dom/custom/lifecycle-ready-parser-script.html
1516                fast/dom/custom/lifecycle-ready-paste.html
1517
1518         * bindings/scripts/CodeGeneratorV8.pm:
1519         - Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute.
1520         (GenerateCustomElementInvocationScopeIfNeeded):
1521         (GenerateNormalAttrSetter):
1522         (GenerateFunction):
1523         * bindings/scripts/IDLAttributes.txt:
1524         * bindings/v8/CustomElementHelpers.cpp:
1525         (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
1526         (WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded):
1527         * bindings/v8/CustomElementHelpers.h:
1528         (CustomElementHelpers):
1529         * bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks()
1530         (WebCore::V8RecursionScope::didLeaveScriptContext):
1531         * dom/CustomElementConstructor.cpp:
1532         (WebCore::CustomElementConstructor::createElement):
1533         (WebCore::CustomElementConstructor::createElementInternal):
1534         * dom/CustomElementConstructor.h:
1535         (WebCore::CustomElementConstructor::isExtended):
1536         (CustomElementConstructor):
1537         * dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution.
1538         (WebCore::CustomElementInvocation::CustomElementInvocation):
1539         (WebCore::CustomElementInvocation::~CustomElementInvocation):
1540         (WebCore::activeCustomElementRegistries):
1541         (WebCore::CustomElementRegistry::~CustomElementRegistry):
1542         (WebCore::CustomElementRegistry::didGiveTypeExtension):
1543         (WebCore::CustomElementRegistry::didCreateElement):
1544         (WebCore::CustomElementRegistry::activate):
1545         (WebCore::CustomElementRegistry::deactivate):
1546         (WebCore::CustomElementRegistry::deliverLifecycleCallbacks):
1547         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks):
1548         * dom/CustomElementRegistry.h:
1549         (CustomElementInvocation):
1550         (WebCore::CustomElementInvocation::element):
1551         (CallbackDeliveryScope):
1552         (WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope):
1553         (WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope):
1554         (CustomElementRegistry):
1555         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded):
1556         * dom/Document.cpp:
1557         (WebCore::Document::createElement):
1558         (WebCore::Document::didCreateCustomElement):
1559         * dom/Document.h:
1560         (Document):
1561         * dom/Document.idl:
1562         * dom/Element.cpp:
1563         (WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute
1564         (WebCore::Element::parserSetAttributes):
1565         (WebCore::Element::cloneAttributesFromElement):
1566         * dom/Element.h:
1567         * dom/Node.idl:
1568         * dom/ShadowRoot.idl:
1569         * html/HTMLElement.idl:
1570         * html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks()
1571         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1572         (WebCore::HTMLScriptRunner::runScript):
1573
1574 2013-03-22  Tommy Widenflycht  <tommyw@google.com>
1575
1576         MediaStream API: Finalize the RTCPeerConnection states
1577         https://bugs.webkit.org/show_bug.cgi?id=112792
1578
1579         Reviewed by Adam Barth.
1580
1581         This patch finalized the RTCPeerConnection state and events. These changes
1582         have not yet pushed out to the editors draft; but they are uncontroversial
1583         and agreed upon.
1584
1585         readyState will be deleted; please use the replacement signalingState which is already available.
1586         onstatechange -> onsignalingstatechange
1587         onicechange -> oniceconnectionstatechange
1588         ongatheringchange will be deleted since oniceconnectionstatechange can be used for the same purpose.
1589         RTCIceConnectionState::"starting" -> RTCIceConnectionState::"new"
1590
1591         Patch covered by modified tests.
1592
1593         * Modules/mediastream/RTCPeerConnection.cpp:
1594         (WebCore::RTCPeerConnection::RTCPeerConnection):
1595         (WebCore::RTCPeerConnection::iceConnectionState):
1596         (WebCore::RTCPeerConnection::changeSignalingState):
1597         (WebCore::RTCPeerConnection::changeIceGatheringState):
1598         (WebCore::RTCPeerConnection::changeIceConnectionState):
1599         * Modules/mediastream/RTCPeerConnection.h:
1600         (RTCPeerConnection):
1601         * Modules/mediastream/RTCPeerConnection.idl:
1602         * dom/EventNames.h:
1603         (WebCore):
1604         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
1605
1606 2013-03-22  Mike West  <mkwst@chromium.org>
1607
1608         Prefer 'KURL(ParsedURLString, String)' when dealing with known-good data.
1609         https://bugs.webkit.org/show_bug.cgi?id=112965
1610
1611         Reviewed by Alexey Proskuryakov.
1612
1613         In https://bugs.webkit.org/show_bug.cgi?id=112783#c6, Adam noted that
1614         it would be possible to use 'KURL(ParsedURLString, [url])' rather than
1615         'KURL(KURL(), [url])', since we knew that the URL in question is a
1616         value and absolute URL. This patch fixes the obvious instances of this
1617         pattern; there are several more 'KURL(KURL(), String)' calls in
1618         WebCore but these were the only places I was reasonably sure that bad
1619         data couldn't creep in.
1620
1621         * dom/Document.cpp:
1622         (WebCore::Document::updateBaseURL):
1623             'documentURI' is pulled from 'url()->string()'. It's safe.
1624         * page/ContentSecurityPolicy.cpp:
1625         (WebCore::gatherSecurityPolicyViolationEventData):
1626         (WebCore::ContentSecurityPolicy::reportViolation):
1627             'CallFrame::sourceURL()' is a known valid/absolute URL.
1628         * page/SecurityOrigin.cpp:
1629         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
1630         (WebCore::SecurityOrigin::create):
1631             The strings constructed here are certainly valid.
1632
1633 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
1634
1635         Web Inspector: Flame Chart. move overview window when user scrolls the chart.
1636         https://bugs.webkit.org/show_bug.cgi?id=113014
1637
1638         Reviewed by Yury Semikhatsky.
1639
1640         I found that I could use scaling mechanics in OverviewGrid for scaling the chart.
1641         But the dragging part was not so simple due to the different approaches in
1642         OverviewGrid and FlameChart. OverviewGrid used _windowLeft and _windowRight
1643         when FlameChart used _xOffset and _xScaleFactor and width.
1644         It was not practical and I rewrote the FlameChart mechanics
1645         and now it also uses _windowLeft _windowRight.
1646
1647         * inspector/front-end/FlameChart.js:
1648         (WebInspector.FlameChart):
1649         (WebInspector.FlameChart.Calculator.prototype._updateBoundaries):
1650         (WebInspector.FlameChart.Calculator.prototype.computePosition):
1651         (WebInspector.FlameChart.prototype._onWindowChanged):
1652         (WebInspector.FlameChart.prototype._startCanvasDragging):
1653         (WebInspector.FlameChart.prototype._canvasDragging):
1654         (WebInspector.FlameChart.prototype._onMouseMove):
1655         (WebInspector.FlameChart.prototype._onMouseWheel):
1656         (WebInspector.FlameChart.prototype._coordinatesToNodeIndex):
1657         (WebInspector.FlameChart.prototype._drawOverviewCanvas):
1658         (WebInspector.FlameChart.prototype.draw):
1659         (WebInspector.FlameChart.prototype._updateBoundaries):
1660         (WebInspector.FlameChart.prototype.update):
1661         * inspector/front-end/OverviewGrid.js:
1662         (WebInspector.OverviewGrid.prototype.setWindowPosition):
1663         (WebInspector.OverviewGrid.prototype.setWindow):
1664         (WebInspector.OverviewGrid.prototype.addEventListener):
1665         (WebInspector.OverviewGrid.prototype.zoom):
1666         (WebInspector.OverviewGrid.Window.prototype._zoom):
1667         * inspector/front-end/inspectorCommon.css:
1668         (.overview-grid-window-rulers):
1669
1670 2013-03-22  Steve Block  <steveblock@chromium.org>
1671
1672         Move GeolocationClient.h to Modules/geolocation/
1673         https://bugs.webkit.org/show_bug.cgi?id=112997
1674
1675         Reviewed by Kentaro Hara.
1676
1677         No new tests, no functional change.
1678
1679         * GNUmakefile.list.am:
1680         * Modules/geolocation/GeolocationClient.h: Renamed from Source/WebCore/page/GeolocationClient.h.
1681         (WebCore):
1682         (GeolocationClient):
1683         (WebCore::GeolocationClient::~GeolocationClient):
1684         * WebCore.vcproj/WebCore.vcproj:
1685         * WebCore.vcxproj/WebCore.vcxproj:
1686         * WebCore.vcxproj/WebCore.vcxproj.filters:
1687         * WebCore.xcodeproj/project.pbxproj:
1688
1689 2013-03-22  Sheriff Bot  <webkit.review.bot@gmail.com>
1690
1691         Unreviewed, rolling out r146534 and r146565.
1692         http://trac.webkit.org/changeset/146534
1693         http://trac.webkit.org/changeset/146565
1694         https://bugs.webkit.org/show_bug.cgi?id=113017
1695
1696         "r146534 caused perf regression on Chromium Linux x64"
1697         (Requested by yurys on #webkit).
1698
1699         * bindings/scripts/CodeGeneratorV8.pm:
1700         (GenerateNormalAttrSetter):
1701         (GenerateOverloadedFunction):
1702         (GenerateFunctionCallback):
1703         (GenerateFunction):
1704         (GenerateParametersCheck):
1705         (GenerateSingleConstructorCallback):
1706         (GenerateNonStandardFunction):
1707         (GenerateImplementation):
1708         (GenerateFunctionCallString):
1709         * bindings/scripts/IDLAttributes.txt:
1710         * bindings/scripts/test/V8/V8Float64Array.cpp:
1711         (WebCore):
1712         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1713         (WebCore):
1714         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1715         (WebCore):
1716         * bindings/scripts/test/V8/V8TestInterface.cpp:
1717         (WebCore):
1718         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1719         (WebCore):
1720         * bindings/scripts/test/V8/V8TestObj.cpp:
1721         (WebCore):
1722         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1723         (WebCore):
1724         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
1725         (WebCore):
1726         * bindings/v8/CustomElementHelpers.cpp:
1727         * bindings/v8/CustomElementHelpers.h:
1728         (WebCore):
1729         (CustomElementHelpers):
1730         * bindings/v8/V8DOMConfiguration.cpp:
1731         (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
1732         (WebCore::V8DOMConfiguration::configureTemplate):
1733         * bindings/v8/V8DOMConfiguration.h:
1734         (BatchedMethod):
1735         (V8DOMConfiguration):
1736         * bindings/v8/V8RecursionScope.cpp:
1737         (WebCore::V8RecursionScope::didLeaveScriptContext):
1738         * dom/CustomElementConstructor.cpp:
1739         (WebCore::CustomElementConstructor::createElement):
1740         * dom/CustomElementConstructor.h:
1741         (CustomElementConstructor):
1742         * dom/CustomElementRegistry.cpp:
1743         (WebCore::CustomElementRegistry::~CustomElementRegistry):
1744         * dom/CustomElementRegistry.h:
1745         (WebCore):
1746         (CustomElementRegistry):
1747         * dom/Document.cpp:
1748         (WebCore::Document::createElement):
1749         (WebCore::Document::registerElement):
1750         * dom/Document.h:
1751         * dom/Document.idl:
1752         * dom/Element.cpp:
1753         (WebCore::Element::parserSetAttributes):
1754         (WebCore::Element::cloneAttributesFromElement):
1755         * dom/Element.h:
1756         * dom/Element.idl:
1757         * dom/Node.idl:
1758         * dom/ShadowRoot.idl:
1759         * html/HTMLElement.idl:
1760         * html/parser/HTMLScriptRunner.cpp:
1761         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1762         (WebCore::HTMLScriptRunner::runScript):
1763
1764 2013-03-22  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
1765
1766         [GStreamer] Memory leak in AudioFileReader::createBus()
1767         https://bugs.webkit.org/show_bug.cgi?id=112925
1768
1769         Reviewed by Martin Robinson.
1770
1771         Adopt the reference returned by g_timeout_source_new()
1772         to fix a memory leak.
1773
1774         No new tests. No change in behavior.
1775
1776         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1777         (WebCore::AudioFileReader::createBus):
1778
1779 2013-03-22  Steve Block  <steveblock@chromium.org>
1780
1781         Move page/Coordinates.[h|idl] to Modules/geolocation/
1782         https://bugs.webkit.org/show_bug.cgi?id=112945
1783
1784         Reviewed by Kentaro Hara.
1785
1786         No new tests, no functional change.
1787
1788         * CMakeLists.txt:
1789         * DerivedSources.make:
1790         * DerivedSources.pri:
1791         * GNUmakefile.list.am:
1792         * Modules/geolocation/Coordinates.h: Renamed from Source/WebCore/page/Coordinates.h.
1793         (WebCore):
1794         (Coordinates):
1795         (WebCore::Coordinates::create):
1796         (WebCore::Coordinates::isolatedCopy):
1797         (WebCore::Coordinates::latitude):
1798         (WebCore::Coordinates::longitude):
1799         (WebCore::Coordinates::altitude):
1800         (WebCore::Coordinates::accuracy):
1801         (WebCore::Coordinates::altitudeAccuracy):
1802         (WebCore::Coordinates::heading):
1803         (WebCore::Coordinates::speed):
1804         (WebCore::Coordinates::canProvideAltitude):
1805         (WebCore::Coordinates::canProvideAltitudeAccuracy):
1806         (WebCore::Coordinates::canProvideHeading):
1807         (WebCore::Coordinates::canProvideSpeed):
1808         (WebCore::Coordinates::Coordinates):
1809         * Modules/geolocation/Coordinates.idl: Renamed from Source/WebCore/page/Coordinates.idl.
1810         * Target.pri:
1811         * WebCore.gypi:
1812         * WebCore.vcproj/WebCore.vcproj:
1813         * WebCore.vcxproj/WebCore.vcxproj:
1814         * WebCore.vcxproj/WebCore.vcxproj.filters:
1815         * WebCore.xcodeproj/project.pbxproj:
1816
1817 2013-03-21  Hajime Morrita  <morrita@google.com>
1818
1819         Custom Elements: "readyCallback" lifecycle callback should be called.
1820         https://bugs.webkit.org/show_bug.cgi?id=112538
1821
1822         Reviewed by Elliott Sprehn.
1823
1824         This change allows each custom element definition to hook up its instantiation,
1825         namely "readyCallback" lifecycle callback.
1826
1827         The change has two parts:
1828         - 1. Tracking which Element objects to be created.
1829         - 2. Invoking appropriate JavaScript functions, which are readyCallback(),
1830           before the Element object is visible from page script.
1831
1832         For 1, CustomElementRegistry maintains list of "callback
1833         invocaions".  Each list item ("invocation") tracks the element
1834         which has a lifecycle callback to be invoked. Each invocation is
1835         registered when - Any custom element C++ object is instantiated.
1836         See changes on CustomElementConstructor.cpp.
1837
1838         This also happens when @is attribute is set by the parser or node
1839         cloning routine, which can turn a non-custom element into a
1840         type-extended custom element. See changes on Element.cpp.
1841
1842         For 2, CustomElementRegistry basically follows what
1843         MutationObserver is doing, and introduces a method called
1844         deliverLifecycleCallbacks(). This function flushes all pending
1845         callback invocations. You can think it as a dual of
1846         MutationObserver::deliverAllMutations().
1847
1848         The delivery function is called places where MutationObserver's
1849         deliverAllMutations() is called. In addition, it is also called
1850         just before returning from a set of DOM APIs. For example, it is
1851         called just before createElement() returns, so that possibly
1852         created custom element becomes ready through its readyCallback().
1853         Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In
1854         principle, APIs which can create new custom element instnaces are
1855         marked. See CustomElementRegistry::CallbackDeliveryScope and
1856         changes on CodeGeneratorV8.pm.
1857
1858         We need this extra work because the readyCallback() needs to give
1859         an illusion so that JavaScript programmers feel like the
1860         readyCallback() callback being called just after it is created,
1861         instead of called on arbitrary late timing like MutationObserver
1862         notifications.
1863
1864         Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html
1865                fast/dom/custom/lifecycle-ready-createElement-reentrancy.html
1866                fast/dom/custom/lifecycle-ready-creation-api.html
1867                fast/dom/custom/lifecycle-ready-innerHTML.html
1868                fast/dom/custom/lifecycle-ready-parser-only.html
1869                fast/dom/custom/lifecycle-ready-parser-script.html
1870                fast/dom/custom/lifecycle-ready-paste.html
1871
1872         * bindings/scripts/CodeGeneratorV8.pm:
1873         - Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute.
1874         (GenerateCustomElementInvocationScopeIfNeeded):
1875         (GenerateNormalAttrSetter):
1876         (GenerateFunction):
1877         * bindings/scripts/IDLAttributes.txt:
1878         * bindings/v8/CustomElementHelpers.cpp:
1879         (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
1880         (WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded):
1881         * bindings/v8/CustomElementHelpers.h:
1882         (CustomElementHelpers):
1883         * bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks()
1884         (WebCore::V8RecursionScope::didLeaveScriptContext):
1885         * dom/CustomElementConstructor.cpp:
1886         (WebCore::CustomElementConstructor::createElement):
1887         (WebCore::CustomElementConstructor::createElementInternal):
1888         * dom/CustomElementConstructor.h:
1889         (WebCore::CustomElementConstructor::isExtended):
1890         (CustomElementConstructor):
1891         * dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution.
1892         (WebCore::CustomElementInvocation::CustomElementInvocation):
1893         (WebCore::CustomElementInvocation::~CustomElementInvocation):
1894         (WebCore::activeCustomElementRegistries):
1895         (WebCore::CustomElementRegistry::~CustomElementRegistry):
1896         (WebCore::CustomElementRegistry::didGiveTypeExtension):
1897         (WebCore::CustomElementRegistry::didCreateElement):
1898         (WebCore::CustomElementRegistry::activate):
1899         (WebCore::CustomElementRegistry::deactivate):
1900         (WebCore::CustomElementRegistry::deliverLifecycleCallbacks):
1901         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks):
1902         * dom/CustomElementRegistry.h:
1903         (CustomElementInvocation):
1904         (WebCore::CustomElementInvocation::element):
1905         (CallbackDeliveryScope):
1906         (WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope):
1907         (WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope):
1908         (CustomElementRegistry):
1909         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded):
1910         * dom/Document.cpp:
1911         (WebCore::Document::createElement):
1912         (WebCore::Document::didCreateCustomElement):
1913         * dom/Document.h:
1914         (Document):
1915         * dom/Document.idl:
1916         * dom/Element.cpp:
1917         (WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute
1918         (WebCore::Element::parserSetAttributes):
1919         (WebCore::Element::cloneAttributesFromElement):
1920         * dom/Element.h:
1921         * dom/Node.idl:
1922         * dom/ShadowRoot.idl:
1923         * html/HTMLElement.idl:
1924         * html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks()
1925         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1926         (WebCore::HTMLScriptRunner::runScript):
1927
1928 2013-03-21  Jer Noble  <jer.noble@apple.com>
1929
1930         Crash in WebCore::MediaPlayer::cachedResourceLoader + 4
1931         https://bugs.webkit.org/show_bug.cgi?id=112977
1932
1933         Reviewed by Geoffrey Garen.
1934
1935         Speculative fix for a NULL-dereference crash. MediaPlayerPrivateAVFoundationObjC is the
1936         sole owner of a WebCoreAVFLoaderDelegate instance. It releases this instance in its destructor,
1937         but it is possible that, on another thread, the AVAssetResourceLoader has already begun
1938         using the delegate and in so doing has retained it. By the time the delegate method is fired
1939         on the main thread, the MediaPlayerPrivateAVFoundationObjC owner of the delegate has already
1940         been deleted, and the delegate's m_callback pointer is now pointing at freed memory.
1941
1942         In addition to calling -[AVAssetResourceLoader setDelegate:queue:] to avoid any not-yet-started
1943         delegate callbacks, MediaPlayerPrivateAVFoundationObjC should clear the WebCoreAVFLoaderDelegate
1944         m_callback ivar, to avoid calling into freed memory for already queued delegate callbacks.
1945
1946         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1947         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Clear the m_loaderDelegate's callback pointer.
1948         (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]): Check the value of m_callback before continuing.
1949         (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]): Ditto.
1950         (-[WebCoreAVFLoaderDelegate setCallback:]): Added simple setter.
1951
1952 2013-03-21  Takashi Sakamoto  <tasak@google.com>
1953
1954         XMLDocumentParser doesn't parse <template> correctly.
1955         https://bugs.webkit.org/show_bug.cgi?id=112328
1956
1957         Reviewed by Hajime Morrita.
1958
1959         XMLDocumentParser should check whether a parent node is attached or not
1960         when a new element is appended.
1961
1962         Test: fast/dom/HTMLTemplateElement/xhtml-with-titleElement-parsing-crash.xhtml
1963
1964         * xml/parser/XMLDocumentParserLibxml2.cpp:
1965         (WebCore::XMLDocumentParser::startElementNs):
1966         m_currentNode is a parent node of newElement, but it is updated by
1967         pushCurrentNode. So firstly stored copied m_curretNode's value into
1968         local currentNode and used the currentNode to check whether
1969         newElement's parent is attached or not.
1970
1971 2013-03-21  David Grogan  <dgrogan@chromium.org>
1972
1973         Unreviewed, rolling out r146560.
1974         http://trac.webkit.org/changeset/146560
1975         https://bugs.webkit.org/show_bug.cgi?id=112862
1976
1977         invalid parameter to histogram
1978
1979         * platform/leveldb/LevelDBDatabase.cpp:
1980         (WebCore::LevelDBDatabase::open):
1981
1982 2013-03-21  David Grogan  <dgrogan@chromium.org>
1983
1984         IndexedDB: Histogram available disk space on attempt to open database
1985         https://bugs.webkit.org/show_bug.cgi?id=112862
1986
1987         Reviewed by Adam Barth.
1988
1989         ChromeOS suspects they might be hitting disk corruption when the disks
1990         are nearly full. This patch logs the available space to either the
1991         "success" or the "fail" histogram as appropriate so that the
1992         distributions can be compared.
1993
1994         No new tests - I don't know of a good way to test histograms. Local
1995         printf testing didn't turn up any bugs.
1996
1997         * platform/leveldb/LevelDBDatabase.cpp:
1998         (WebCore::HistogramFreeSpace):
1999         (WebCore):
2000         (WebCore::LevelDBDatabase::open):
2001
2002 2013-03-21  Li Yin  <li.yin@intel.com>
2003
2004         FileAPI: Remove deprecation warning when ArrayBuffer is in Blob constructor.
2005         https://bugs.webkit.org/show_bug.cgi?id=88389
2006
2007         Reviewed by Kenneth Russell.
2008
2009         Spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
2010         Both ArrayBuffer and ArrayBufferView should be supported for Blob constructor.
2011
2012         Test: fast/files/blob-constructor.html.
2013
2014         * bindings/js/JSBlobCustom.cpp:
2015         (WebCore::JSBlobConstructor::constructJSBlob):
2016         * bindings/v8/custom/V8BlobCustom.cpp:
2017         (WebCore::V8Blob::constructorCustom):
2018         * fileapi/WebKitBlobBuilder.cpp:
2019         (WebCore::BlobBuilder::append): Remove the deprecated warning.
2020         * fileapi/WebKitBlobBuilder.h:
2021         (WebCore):
2022         (BlobBuilder):
2023
2024 2013-03-21  Takashi Sakamoto  <tasak@google.com>
2025
2026         [Shadow]: @host styles are not applied dynamically
2027         https://bugs.webkit.org/show_bug.cgi?id=112869
2028
2029         Reviewed by Elliott Sprehn.
2030
2031         Need to add features of @host @-rules to rule feature set.
2032
2033         Test: fast/dom/shadow/athost-apply-dynamically.html
2034
2035         * css/StyleScopeResolver.cpp:
2036         (WebCore::StyleScopeResolver::collectFeaturesTo):
2037
2038 2013-03-21  Hayato Ito  <hayato@chromium.org>
2039
2040         [Shadow] Provide an api of insertionParent().
2041         https://bugs.webkit.org/show_bug.cgi?id=112866
2042
2043         Add insertinParent binding to Element and Text.
2044         It's prefixed (webkitInsertionParent) and guarded by SHADOW_DOM flag.
2045
2046         The bug in the Shadow DOM spec is here:
2047         https://www.w3.org/Bugs/Public/show_bug.cgi?id=21067
2048
2049         Reviewed by Dimitri Glazkov.
2050
2051         Test: fast/dom/shadow/insertion-parent.html
2052
2053         * dom/Element.idl:
2054         * dom/Node.cpp:
2055         (WebCore::Node::insertionParentForBinding):
2056         (WebCore):
2057         * dom/Node.h:
2058         (Node):
2059         * dom/Text.idl:
2060
2061 2013-03-21  Tom Sepez  <tsepez@chromium.org>
2062
2063         Bypass XSSAuditor for asp.net servers.
2064         https://bugs.webkit.org/show_bug.cgi?id=112235
2065
2066         Reviewed by Adam Barth.
2067
2068         Similar to https://bugs.webkit.org/show_bug.cgi?id=81283, but the 
2069         fix to that bug failed to cover this particular comma-splicing case.
2070         
2071         Test: http/tests/security/xssAuditor/img-tag-with-comma.html
2072
2073         * html/parser/XSSAuditor.cpp:
2074         (WebCore::isTerminatingCharacter):
2075         Beware of comma-splicing tricks by stopping at commas.
2076
2077 2013-03-21  Brady Eidson  <beidson@apple.com>
2078
2079         If a previously loaded resource is later stored to the disk cache, replace the buffer with MMAP'ed memory.
2080         <rdar://problem/13414154> and https://bugs.webkit.org/show_bug.cgi?id=112943
2081
2082         Reviewed by Geoff Garen.
2083
2084         No new tests (No change in behavior.)
2085
2086         Give SharedBuffer the ability to replace its contents from another SharedBuffer:
2087         * platform/SharedBuffer.h:
2088         * platform/cf/SharedBufferCF.cpp:
2089         (WebCore::SharedBuffer:: tryReplaceContentsWithPlatformBuffer):
2090
2091         Forward along SharedBuffer's new ability to ResourceBuffer:
2092         * loader/mac/ResourceBuffer.mm:
2093         (WebCore::ResourceBuffer:: tryReplaceSharedBufferContents):
2094         * loader/ResourceBuffer.h:
2095
2096         Give CachedResource the ability to replace its encoded data buffer if appropriate:
2097         * loader/cache/CachedResource.cpp:
2098         (WebCore::CachedResource:: tryReplaceEncodedData):
2099         * loader/cache/CachedResource.h:
2100
2101         * WebCore.exp.in:
2102
2103 2013-03-21  Joshua Bell  <jsbell@chromium.org>
2104
2105         IndexedDB: Ensure script wrappers can be collected after context is stopped
2106         https://bugs.webkit.org/show_bug.cgi?id=112976
2107
2108         Reviewed by Adam Barth.
2109
2110         ActiveDOMObject::hasPendingActivity is called to see if script wrappers
2111         can be disposed of. Once the script execution context has stopped they
2112         should be free to go - include this in the checks.
2113
2114         No new tests - suggestions welcome.
2115
2116         * Modules/indexeddb/IDBDatabase.cpp:
2117         (WebCore::IDBDatabase::hasPendingActivity): Return false if stopped.
2118         (WebCore::IDBDatabase::stop): Don't bother calling empty super impl.
2119         * Modules/indexeddb/IDBRequest.cpp:
2120         (WebCore::IDBRequest::hasPendingActivity): Return false if stopped.
2121         (WebCore::IDBRequest::stop): Don't bother calling empty super impl.
2122         * Modules/indexeddb/IDBTransaction.cpp:
2123         (WebCore::IDBTransaction::hasPendingActivity): Return false if stopped.
2124         (WebCore::IDBTransaction::stop): Don't bother calling empty super impl.
2125
2126 2013-03-21  Russell McClellan  <russell.mcclellan@gmail.com>
2127
2128         Remove upcastPointer from ActiveDOMObject constructor
2129         https://bugs.webkit.org/show_bug.cgi?id=112858
2130
2131         Reviewed by Alexey Proskuryakov.
2132
2133         Removed pesky argument to ActiveDOMObject constructor that is no longer
2134         used.
2135
2136         No new tests (no change in behavior).
2137
2138         * Modules/battery/BatteryManager.cpp:
2139         (WebCore::BatteryManager::BatteryManager):
2140         * Modules/filesystem/DOMFileSystem.cpp:
2141         (WebCore::DOMFileSystem::DOMFileSystem):
2142         * Modules/filesystem/FileWriter.cpp:
2143         (WebCore::FileWriter::FileWriter):
2144         * Modules/geolocation/Geolocation.cpp:
2145         (WebCore::Geolocation::Geolocation):
2146         * Modules/indexeddb/IDBDatabase.cpp:
2147         (WebCore::IDBDatabase::IDBDatabase):
2148         * Modules/indexeddb/IDBRequest.cpp:
2149         (WebCore::IDBRequest::IDBRequest):
2150         * Modules/indexeddb/IDBTransaction.cpp:
2151         (WebCore::IDBTransaction::IDBTransaction):
2152         * Modules/mediasource/MediaSource.cpp:
2153         (WebCore::MediaSource::MediaSource):
2154         * Modules/mediastream/MediaStreamTrack.cpp:
2155         (WebCore::MediaStreamTrack::MediaStreamTrack):
2156         * Modules/mediastream/RTCDTMFSender.cpp:
2157         (WebCore::RTCDTMFSender::RTCDTMFSender):
2158         * Modules/mediastream/RTCPeerConnection.cpp:
2159         (WebCore::RTCPeerConnection::RTCPeerConnection):
2160         * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
2161         (WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
2162         * Modules/mediastream/RTCStatsRequestImpl.cpp:
2163         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
2164         * Modules/mediastream/RTCVoidRequestImpl.cpp:
2165         (WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl):
2166         * Modules/networkinfo/NetworkInfoConnection.cpp:
2167         (WebCore::NetworkInfoConnection::NetworkInfoConnection):
2168         * Modules/notifications/Notification.cpp:
2169         (WebCore::Notification::Notification):
2170         * Modules/notifications/NotificationCenter.cpp:
2171         (WebCore::NotificationCenter::NotificationCenter):
2172         * Modules/speech/SpeechRecognition.cpp:
2173         (WebCore::SpeechRecognition::SpeechRecognition):
2174         * Modules/webaudio/AudioContext.cpp:
2175         (WebCore::AudioContext::AudioContext):
2176         * Modules/webdatabase/DatabaseContext.cpp:
2177         (WebCore::DatabaseContext::DatabaseContext):
2178         * Modules/websockets/WebSocket.cpp:
2179         (WebCore::WebSocket::WebSocket):
2180         * css/FontLoader.cpp:
2181         (WebCore::FontLoader::FontLoader):
2182         * dom/ActiveDOMObject.cpp:
2183         (WebCore::ActiveDOMObject::ActiveDOMObject):
2184         * dom/ActiveDOMObject.h:
2185         (ActiveDOMObject):
2186         * dom/ScriptExecutionContext.cpp:
2187         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
2188         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
2189         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
2190         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
2191         (WebCore::ScriptExecutionContext::didCreateActiveDOMObject):
2192         * dom/ScriptExecutionContext.h:
2193         (ScriptExecutionContext):
2194         (WebCore::ScriptExecutionContext::activeDOMObjects):
2195         * fileapi/FileReader.cpp:
2196         (WebCore::FileReader::FileReader):
2197         * html/HTMLMarqueeElement.cpp:
2198         (WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
2199         * html/HTMLMediaElement.cpp:
2200         (WebCore::HTMLMediaElement::HTMLMediaElement):
2201         * html/canvas/WebGLRenderingContext.cpp:
2202         (WebCore):
2203         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
2204         * loader/Prerenderer.cpp:
2205         (WebCore::Prerenderer::Prerenderer):
2206         * page/EventSource.cpp:
2207         (WebCore::EventSource::EventSource):
2208         * page/SuspendableTimer.cpp:
2209         (WebCore::SuspendableTimer::SuspendableTimer):
2210         * workers/AbstractWorker.cpp:
2211         (WebCore::AbstractWorker::AbstractWorker):
2212         * workers/WorkerContext.cpp:
2213         (WebCore::WorkerContext::hasPendingActivity):
2214         * xml/XMLHttpRequest.cpp:
2215         (WebCore::XMLHttpRequest::XMLHttpRequest):
2216
2217 2013-03-21  Alexey Proskuryakov  <ap@apple.com>
2218
2219         [Mac] Move NSOperationQueue out of NetworkingContext
2220         https://bugs.webkit.org/show_bug.cgi?id=112970
2221
2222         Reviewed by Brady Eidson.
2223
2224         WebCore clients do not need explicit control over what queue ResourceHandle works on,
2225         they just want to avoid blocking main thread.
2226
2227         * platform/network/ResourceHandleClient.h:
2228         (WebCore::ResourceHandleClient::usesAsyncCallbacks): Added. The name doesn't quite
2229         match what ResourceHandleMac currently does, but it will very soon.
2230
2231         * platform/network/NetworkingContext.h:
2232         (WebCore::NetworkingContext::scheduledRunLoopPairs):
2233         * platform/network/mac/ResourceHandleMac.mm:
2234         (WebCore::operationQueueForAsyncClients):
2235         (WebCore::ResourceHandle::start):
2236
2237 2013-03-21  Marja Hölttä  <marja@chromium.org>
2238
2239         [V8] Generate specialized callbacks for the main world
2240         https://bugs.webkit.org/show_bug.cgi?id=112430
2241
2242         Reviewed by Jochen Eisinger.
2243
2244         The new specialized bindings will be faster, because they don't need to
2245         do the "main world, isolated world or a worker" check, but can right
2246         away assume that we're in the main world.
2247
2248         This patch generates main world bindings for getters and setters of Node,
2249         Element and Document.
2250
2251         No new tests (updated existing binding tests).
2252
2253         * bindings/scripts/CodeGeneratorV8.pm:
2254         (GenerateOverloadedFunction):
2255         (GenerateFunctionCallback):
2256         (GenerateFunction):
2257         (GenerateParametersCheck):
2258         (GenerateSingleConstructorCallback):
2259         (GenerateNonStandardFunction):
2260         (GenerateImplementation):
2261         (GenerateFunctionCallString):
2262         * bindings/scripts/test/V8/V8Float64Array.cpp:
2263         (WebCore):
2264         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2265         (WebCore):
2266         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2267         (WebCore):
2268         * bindings/scripts/test/V8/V8TestInterface.cpp:
2269         (WebCore):
2270         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2271         (WebCore):
2272         * bindings/scripts/test/V8/V8TestObj.cpp:
2273         (WebCore):
2274         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2275         (WebCore):
2276         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
2277         (WebCore):
2278         * bindings/v8/V8DOMConfiguration.cpp:
2279         (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
2280         (WebCore::V8DOMConfiguration::configureTemplate):
2281         * bindings/v8/V8DOMConfiguration.h:
2282         (BatchedMethod):
2283         (V8DOMConfiguration):
2284         * dom/Document.idl:
2285         * dom/Element.idl:
2286         * dom/Node.idl:
2287
2288 2013-03-21  Elliott Sprehn  <esprehn@chromium.org>
2289
2290         Remove RenderObject::canHaveRegionStyle since nothing uses it
2291         https://bugs.webkit.org/show_bug.cgi?id=112973
2292
2293         Reviewed by Eric Seidel.
2294
2295         Nothing uses canHaveRegionStyle so we can remove it.
2296
2297         * rendering/RenderObject.h:
2298
2299 2013-03-21  Alok Priyadarshi  <alokp@chromium.org>
2300
2301         Mark GraphicsLayers as opaque when possible
2302         https://bugs.webkit.org/show_bug.cgi?id=70634
2303
2304         Reviewed by Simon Fraser.
2305
2306         Mark layers as opaque in a very simple case - any child renderer has an opaque background and covers the entire composited bounds. It is important to note that since we only consider the background, the only layer that can be marked opaque is the primary GraphicsLayer of a RenderLayer.
2307
2308         Tests: compositing/contents-opaque/background-clip.html
2309                compositing/contents-opaque/background-color.html
2310                compositing/contents-opaque/body-background-painted.html
2311                compositing/contents-opaque/body-background-skipped.html
2312                compositing/contents-opaque/layer-opacity.html
2313                compositing/contents-opaque/layer-transform.html
2314
2315         * rendering/RenderBox.cpp:
2316         (WebCore::skipBodyBackground):
2317         (WebCore):
2318         (WebCore::RenderBox::paintBackground):
2319         (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
2320         * rendering/RenderBox.h:
2321         (RenderBox):
2322         * rendering/RenderLayer.cpp:
2323         (WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
2324         (WebCore):
2325         (WebCore::RenderLayer::listBackgroundIsKnownToBeOpaqueInRect):
2326         * rendering/RenderLayer.h:
2327         (RenderLayer):
2328         * rendering/RenderLayerBacking.cpp:
2329         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2330         * rendering/RenderLayerModelObject.h:
2331         (RenderLayerModelObject):
2332         (WebCore::RenderLayerModelObject::backgroundIsKnownToBeOpaqueInRect):
2333
2334 2013-03-21  Alexandru Chiculita  <achicu@adobe.com>
2335
2336         [CSS Shaders] Implement a StyleCustomFilterProgram cache
2337         https://bugs.webkit.org/show_bug.cgi?id=112602
2338
2339         Reviewed by Dean Jackson.
2340
2341         When the style is recalculated, the new computed RenderStyle is saved as the m_style of the
2342         RenderObject, even if the style was not different.
2343
2344         In the case of Custom Filters, a new StyleCustomFilterProgram was created at all times, but the
2345         actual equality check was done by comparing the pair of cached shaders from inside the StyleCustomFilterProgram.
2346
2347         Because of that the RenderLayer::styleChanged was not called when the new StyleCustomFilterProgram was created, so it
2348         will end up still knowing only about the previous StyleCustomFilterProgram.
2349
2350         The RenderLayer sets itself as a client of the StyleCustomFilterProgram, so that it can repaint itself
2351         when the program is loaded, but because RenderLayer::styleChanged is not called, it will not add itself as a client of the new
2352         StyleCustomFilterProgram.
2353
2354         StyleCustomFilterProgram waits until the first client to load the programs, so in this case it will just remain unloaded.
2355
2356         There was no crash, but just an assert in debug mode. Also, as a visible side-effect some frames were rendered using blank shaders, 
2357         resulting in a pass-through filter.
2358
2359         The fix would be to actually make the RenderStyle::diff detect the change of the StyleCustomFilterProgram
2360         using the pointer value and not the values. However, that will always invalidate the "filter" property because
2361         of the StyleCustomFilterProgram that always gets created during the recalculation time.
2362
2363         I've added StyleCustomFilterProgramCache to cache all the instances of the StyleCustomFilterPrograms that a
2364         StyleResolver allocates. This way, next time it will try to reuse previously allocated StyleCustomFilterPrograms. 
2365         The key of the cache is the CustomFilterProgramInfo, that combines the URLs to the shaders and a couple of other program settings.
2366
2367         StyleCustomFilterProgramCache is owned by the StyleResovler and StyleCustomFilterPrograms are responsible with
2368         removing themselves from the cache when the last reference goes away.
2369
2370         This change makes the previous "platform level" program cache obsolete and I will remove that in a future patch.
2371         https://bugs.webkit.org/show_bug.cgi?id=112844
2372
2373         Test: css3/filters/custom/custom-filter-reload.html
2374
2375         * GNUmakefile.list.am:
2376         * Target.pri:
2377         * WebCore.gypi:
2378         * WebCore.vcproj/WebCore.vcproj:
2379         * WebCore.xcodeproj/project.pbxproj:
2380         * css/StyleResolver.cpp:
2381         (WebCore::StyleResolver::lookupCustomFilterProgram): Lookup any similar programs in the cache. It will create a new pending 
2382         StyleCustomFilterProgram if there is no pre-cached version of the program.
2383         if no program is found. loadPendingShaders is responsible for adding the program in the cache if it is actually going to be used.
2384         (WebCore::StyleResolver::loadPendingShaders): At this point the program is final, so it's safe to add it to the cache.
2385         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
2386         * css/StyleResolver.h:
2387         (StyleResolver):
2388         * css/WebKitCSSShaderValue.cpp:
2389         (WebCore::WebKitCSSShaderValue::completeURL): Factored out the function to compute the complete URL of the resource.
2390         (WebCore::WebKitCSSShaderValue::cachedShader):
2391         * css/WebKitCSSShaderValue.h:
2392         (WebCore::toWebKitCSSShaderValue):
2393         (WebKitCSSShaderValue):
2394         * platform/graphics/filters/CustomFilterOperation.cpp:
2395         (WebCore::CustomFilterOperation::blend):
2396         * platform/graphics/filters/CustomFilterOperation.h:
2397         (WebCore::CustomFilterOperation::operator==): Removed. Programs should now compare by pointer. Kept it as
2398         private to catch any potential use of it.
2399         * rendering/style/StyleCustomFilterProgram.cpp: Copied from Source/WebCore/css/WebKitCSSShaderValue.h.
2400         (WebCore::StyleCustomFilterProgram::~StyleCustomFilterProgram): Destructor removes the program from the cache.
2401         * rendering/style/StyleCustomFilterProgram.h:
2402         (WebCore::StyleCustomFilterProgram::setVertexShader): Added an assert to check that the shader is not in the
2403         cache while the mutation happens. Otherwise the cache might have the wrong key.
2404         (WebCore::StyleCustomFilterProgram::setFragmentShader): Ditto.
2405         (WebCore::StyleCustomFilterProgram::isLoaded): Added more asserts to catch cases when the program is used with no clients.
2406         (StyleCustomFilterProgram):
2407         (WebCore::StyleCustomFilterProgram::hasPendingShaders):
2408         (WebCore::StyleCustomFilterProgram::inCache):
2409         (WebCore::StyleCustomFilterProgram::setCache): Function called when a program is added to / removed from the cache.
2410         (WebCore::StyleCustomFilterProgram::vertexShaderURL): Added methods to store the KURL that we used as keys in the cache.
2411         The same KURLs will be used to lookup and remove the filter at the end.
2412         (WebCore::StyleCustomFilterProgram::setVertexShaderURL):
2413         (WebCore::StyleCustomFilterProgram::fragmentShaderURL):
2414         (WebCore::StyleCustomFilterProgram::setFragmentShaderURL):
2415         (WebCore::StyleCustomFilterProgram::StyleCustomFilterProgram):
2416         * rendering/style/StyleCustomFilterProgramCache.cpp: Added.
2417         (WebCore::StyleCustomFilterProgramCache::programCacheKey):
2418         (WebCore::StyleCustomFilterProgramCache::StyleCustomFilterProgramCache):
2419         (WebCore::StyleCustomFilterProgramCache::~StyleCustomFilterProgramCache): Destructor removes itself from all the
2420         referenced StyleCustomFilterPrograms. This is to avoid issues with different destruction orders.
2421         (WebCore::StyleCustomFilterProgramCache::lookup):
2422         (WebCore::StyleCustomFilterProgramCache::add):
2423         (WebCore::StyleCustomFilterProgramCache::remove):
2424         * rendering/style/StyleCustomFilterProgramCache.h:
2425         (StyleCustomFilterProgramCache):
2426         * platform/graphics/texmap/coordinated/CoordinatedCustomFilterProgram.h:
2427         (WebCore::CoordinatedCustomFilterProgram::operator==: Removed. Programs should now compare by pointer.
2428
2429 2013-03-21  Joshua Bell  <jsbell@chromium.org>
2430
2431         IndexedDB: Ensure all API methods have IDB_TRACE macros
2432         https://bugs.webkit.org/show_bug.cgi?id=112963
2433
2434         Reviewed by Tony Chang.
2435
2436         Anntotate methods and callbacks that weren't already annotated
2437         with IDB_TRACE macros to assist in debugging, e.g. when using
2438         the chromium port's chrome://tracing visualization.
2439
2440         No new tests - just harmless diagnostic sprinkles.
2441
2442         * Modules/indexeddb/IDBDatabase.cpp:
2443         (WebCore::IDBDatabase::createObjectStore): Added IDB_TRACE macro call here.
2444         (WebCore::IDBDatabase::deleteObjectStore): ...and here.
2445         (WebCore::IDBDatabase::transaction): ...etc.
2446         (WebCore::IDBDatabase::close):
2447         (WebCore::IDBDatabase::onVersionChange):
2448         * Modules/indexeddb/IDBFactory.cpp:
2449         (WebCore::IDBFactory::getDatabaseNames):
2450         (WebCore::IDBFactory::open):
2451         (WebCore::IDBFactory::deleteDatabase):
2452         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
2453         (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
2454         (WebCore::IDBFactoryBackendImpl::deleteDatabase):
2455         (WebCore::IDBFactoryBackendImpl::open):
2456         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2457         (WebCore::IDBOpenDBRequest::onBlocked):
2458
2459 2013-03-21  Christian Biesinger  <cbiesinger@chromium.org>
2460
2461         http://trac.webkit.org/changeset/146375 causing CrOS crashes
2462         https://bugs.webkit.org/show_bug.cgi?id=112958
2463
2464         Reviewed by Adam Barth.
2465
2466         Test: fast/flexbox/crash-anonymous-box.html
2467
2468         * rendering/RenderDeprecatedFlexibleBox.cpp:
2469         (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
2470         Anonymous renderers don't have a node in their constructor, so
2471         don't get document() in there.
2472
2473 2013-03-21  Mike West  <mkwst@chromium.org>
2474
2475         CSP 1.1: Fire a SecurityPolicyViolationEvent when violations occur.
2476         https://bugs.webkit.org/show_bug.cgi?id=112783
2477
2478         Reviewed by Adam Barth.
2479
2480         A new event type for Content Security Policy violations landed in
2481         http://wkrev.com/146305; this patch takes that stub, and wires it up to
2482         ContentSecurityPolicy::reportViolation such that violation events fire
2483         when resources are blocked.
2484
2485         This should bring WebKit up to date with the current description of
2486         CSP's event model in sections 3.3[1] and 3.4.1.3[2] of the editor's
2487         draft.
2488
2489         [1]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#processing-model
2490         [2]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#firing-events-using-the-securitypolicyviolationevent-interface
2491
2492         Test: http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image.html
2493
2494         * page/ContentSecurityPolicy.cpp:
2495         (WebCore::gatherSecurityPolicyViolationEventData):
2496             Populate a SecurityPolicyViolationEventInit object with the various
2497             bits of data that should be passed into the event constructor.
2498
2499             This static method is strictly an implementation detail; it's not
2500             part of ContentSecurityPolicy's public API.
2501         (WebCore::ContentSecurityPolicy::reportViolation):
2502             Regardless of whether the policy has set a 'report-uri' directive
2503             or not, gather together all the data we'll need to fire an event,
2504             create the event, and queue it up for dispatching on the Document.
2505
2506 2013-03-21  Terry Anderson  <tdanderson@chromium.org>
2507
2508         [chromium] Remove SK_SUPPORT_HINTING_SCALE_FACTOR flag and code
2509         https://bugs.webkit.org/show_bug.cgi?id=112928
2510
2511         Reviewed by Stephen White.
2512
2513         This flag was only for ChromeOS builds with HighDPI. It is no longer needed and can be removed. 
2514         See http://crbug.com/17550
2515
2516         No new tests needed since this is just removing unused code.
2517
2518         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
2519         (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
2520         * platform/graphics/skia/PlatformContextSkia.cpp:
2521         (WebCore::PlatformContextSkia::PlatformContextSkia):
2522         (WebCore::PlatformContextSkia::setupPaintCommon):
2523         * platform/graphics/skia/PlatformContextSkia.h:
2524
2525 2013-03-21  Mike West  <mkwst@chromium.org>
2526
2527         Drop full URLs from cross-origin access errors caused by protocol mismatches.
2528         https://bugs.webkit.org/show_bug.cgi?id=112894
2529
2530         Reviewed by Timothy Hatcher.
2531
2532         Following up on http://wkbug.com/112813, this patch brings protocol
2533         mismatch errors into line with the new origin-only hotness. The message
2534         is also changed to display the URL's protocol rather than the origin's
2535         protocol: it makes a big difference for 'data:' URLs, for instance.
2536
2537         * page/DOMWindow.cpp:
2538         (WebCore::DOMWindow::crossDomainAccessErrorMessage):
2539
2540 2013-03-21  Stephen Chenney  <schenney@chromium.org>
2541
2542         SVG text path referencing parent text infinite loops
2543         https://bugs.webkit.org/show_bug.cgi?id=112078
2544
2545         Reviewed by Philip Rogers.
2546
2547         We do not check the target type when adding a resource reference for
2548         SVG Text Path's URI. This goes horribly wrong when the target is the
2549         text path's parent text element. In this patch we check that the target
2550         element of the text path is indeed a path element, as the spec
2551         requires. No other element type is allowed.
2552
2553         Note that RenderSVGTextPath enforces this check in the renderer code
2554         also, so if we get past this check via pending resources, it doesn't
2555         matter. You can't get into this situation with a pending reference
2556         because, by definition, the parent must be defined before the text
2557         path child.
2558
2559         Test: svg/text/textpath-referencing-text-crash.svg
2560
2561         * svg/SVGTextPathElement.cpp:
2562         (WebCore::SVGTextPathElement::buildPendingResource):
2563
2564 2013-03-21  Joshua Bell  <jsbell@chromium.org>
2565
2566         IndexedDB: Remove onVersionChange(string) plumbing
2567         https://bugs.webkit.org/show_bug.cgi?id=112712
2568
2569         Reviewed by Adam Barth.
2570
2571         Delete unused onVersionChange(string) overload.
2572
2573         No new tests - just deleting dead code.
2574
2575         * Modules/indexeddb/IDBDatabase.cpp: Delete onVersionChange(string) overload.
2576         * Modules/indexeddb/IDBDatabase.h: Ditto.
2577         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Ditto.
2578         * Modules/indexeddb/IDBDatabaseCallbacks.h: Ditto.
2579         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp: Ditto.
2580         * Modules/indexeddb/IDBDatabaseCallbacksImpl.h: Ditto.
2581
2582 2013-03-21  Philip Rogers  <pdr@google.com>
2583
2584         Correct bisector angle calculation for markers
2585         https://bugs.webkit.org/show_bug.cgi?id=112054
2586
2587         Reviewed by Stephen Chenney.
2588
2589         The SVG marker spec states that mid markers with orient=auto should be aligned with their
2590         x-axis along the bisector of the incoming (in) and outgoing (out) angles. Previously we
2591         calculated this bisector angle as:
2592             bisector = (in + out) / 2;
2593         Angles cannot be averaged this way! Consider in=90deg and out=-180deg: the bisector should
2594         be 135deg but a naive average gives -45deg. This patch corrects for the discontinuity in
2595         angle values with:
2596             bisector = (in + out + 360) / 2   // if |in - out| > 180
2597             bisector = (in + out) / 2         // otherwise
2598         This patch includes an exhaustive test of angle values.
2599
2600         Test: svg/custom/marker-orient-auto.html
2601
2602         * rendering/svg/SVGMarkerData.h:
2603         (WebCore::SVGMarkerData::currentAngle):
2604
2605 2013-03-21  Harald Alvestrand  <hta@google.com>
2606
2607         Expose the Type field of an RTCStatsReport
2608         https://bugs.webkit.org/show_bug.cgi?id=112951
2609
2610         Reviewed by Adam Barth.
2611
2612         Covered by an extension of an existing test.
2613
2614         * Modules/mediastream/RTCStatsReport.h:
2615         (WebCore::RTCStatsReport::type):
2616         * Modules/mediastream/RTCStatsReport.idl:
2617
2618 2013-03-21  Alexey Proskuryakov  <ap@apple.com>
2619
2620         Move non-trivial virtual functions out of ResourceHandleClient.h
2621         https://bugs.webkit.org/show_bug.cgi?id=112950
2622
2623         Reviewed by Brady Eidson.
2624
2625         * CMakeLists.txt:
2626         * GNUmakefile.list.am:
2627         * Target.pri:
2628         * WebCore.exp.in:
2629         * WebCore.gypi:
2630         * WebCore.vcproj/WebCore.vcproj:
2631         * WebCore.vcxproj/WebCore.vcxproj:
2632         * WebCore.vcxproj/WebCore.vcxproj.filters:
2633         * WebCore.xcodeproj/project.pbxproj:
2634         * platform/network/ResourceHandleClient.cpp: Added.
2635         (WebCore::ResourceHandleClient::ResourceHandleClient):
2636         (WebCore::ResourceHandleClient::~ResourceHandleClient):
2637         (WebCore::ResourceHandleClient::didReceiveBuffer):
2638         (WebCore::ResourceHandleClient::getBuffer):
2639         * platform/network/ResourceHandleClient.h:
2640
2641 2013-03-21  Florin Malita  <fmalita@chromium.org>
2642
2643         [SVG] Remove explicit LightSource dispatchers
2644         https://bugs.webkit.org/show_bug.cgi?id=112827
2645
2646         Reviewed by Stephen Chenney.
2647
2648         Convert LightSource setters to dynamic dispatch. This allows us to remove LightSource.cpp
2649         altogether.
2650
2651         No new tests: refactoring only.
2652
2653         * CMakeLists.txt:
2654         * GNUmakefile.list.am:
2655         * Target.pri:
2656         * WebCore.gypi:
2657         * WebCore.vcproj/WebCore.vcproj:
2658         * WebCore.vcxproj/WebCore.vcxproj:
2659         * WebCore.vcxproj/WebCore.vcxproj.filters:
2660         * WebCore.xcodeproj/project.pbxproj:
2661         * platform/graphics/filters/DistantLightSource.h:
2662         (DistantLightSource):
2663         * platform/graphics/filters/LightSource.cpp: Removed.
2664         * platform/graphics/filters/LightSource.h:
2665         (WebCore::LightSource::setAzimuth):
2666         (WebCore::LightSource::setElevation):
2667         (WebCore::LightSource::setX):
2668         (WebCore::LightSource::setY):
2669         (WebCore::LightSource::setZ):
2670         (WebCore::LightSource::setPointsAtX):
2671         (WebCore::LightSource::setPointsAtY):
2672         (WebCore::LightSource::setPointsAtZ):
2673         (WebCore::LightSource::setSpecularExponent):
2674         (WebCore::LightSource::setLimitingConeAngle):
2675         * platform/graphics/filters/PointLightSource.h:
2676         (PointLightSource):
2677         * platform/graphics/filters/SpotLightSource.h:
2678         (SpotLightSource):
2679
2680 2013-03-21  Igor Oliveira  <igor.o@sisa.samsung.com>
2681
2682         [Texmap] Implement support for OpenGLES EXT_unpack_subimage extension
2683         https://bugs.webkit.org/show_bug.cgi?id=108716
2684
2685         If the extension GL_EXT_unpack_subimage is supported, it adds GL_UNPACK_ROW_LENGTH,
2686         GL_UNPACK_SKIP_ROWS and GL_UNPACK_SKIP_PIXELS as valid enums to PixelStore.
2687
2688         Reviewed by Noam Rosenthal.
2689
2690         * platform/graphics/texmap/TextureMapperGL.cpp:
2691         (WebCore::driverSupportsSubImage):
2692         (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
2693         (WebCore::BitmapTextureGL::updateContents):
2694
2695 2013-03-21  Dmitry Zvorygin  <zvorygin@chromium.org>
2696
2697         Web Inspector: Regression: drawer resizes slowly with animation.
2698         https://bugs.webkit.org/show_bug.cgi?id=112920
2699
2700         Drawer status bar opacity wasn't set to zero on inialization, so no transition event 
2701         was fired on first time drawer appeared,thus animation styles wasn't removed properly.
2702
2703         Reviewed by Vsevolod Vlasov.
2704
2705         * inspector/front-end/Drawer.js:
2706         (WebInspector.Drawer):
2707
2708 2013-03-21  Alberto Garcia  <agarcia@igalia.com>
2709
2710         [BlackBerry] GraphicsLayer: fix code that was accidentally reverted
2711         https://bugs.webkit.org/show_bug.cgi?id=112143
2712
2713         Reviewed by Rob Buis.
2714
2715         Several changes were accidentally reverted in r144465 due to the
2716         upstreaming of some new code:
2717
2718         - clearBackgroundColor() and m_contentsLayerHasBackgroundColor had
2719           been removed in r137798.
2720
2721         - showDebugBorders() had been renamed to isShowingDebugBorder() in
2722           r133517.
2723
2724         - A new GraphicsLayer::create() overload had been introduced in
2725           r130185.
2726
2727         This patch fixes them all.
2728
2729         * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
2730         (WebCore::GraphicsLayer::create):
2731         (WebCore):
2732         (WebCore::GraphicsLayerBlackBerry::GraphicsLayerBlackBerry):
2733         (WebCore::GraphicsLayerBlackBerry::setBackgroundColor):
2734         (WebCore::GraphicsLayerBlackBerry::updateLayerBackgroundColor):
2735         (WebCore::GraphicsLayerBlackBerry::setupContentsLayer):
2736         * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
2737         (GraphicsLayerBlackBerry):
2738
2739 2013-03-21  Zan Dobersek  <zdobersek@igalia.com>
2740
2741         [GTK] Move libLevelDB.la setup into a separate GNUmakefile.am
2742         https://bugs.webkit.org/show_bug.cgi?id=112947
2743
2744         Reviewed by Martin Robinson.
2745
2746         No new tests - no new functionality.
2747
2748         * GNUmakefile.am: Move the libLevelDD.la setup into the new GNUmakefile.am that's placed in
2749         the third-party leveldb source directory.
2750         * GNUmakefile.list.am: Move the LevelDB sources listing there as well.
2751
2752 2013-03-21  Alberto Garcia  <agarcia@igalia.com>
2753
2754         [BlackBerry] DrawingBuffer: add clearPlatformLayer() implementation
2755         https://bugs.webkit.org/show_bug.cgi?id=112696
2756
2757         Reviewed by Rob Buis.
2758
2759         DrawingBuffer::clearPlatformLayer() was added in r139142.
2760
2761         This is not needed in the BlackBerry port, so this patch only
2762         contains a dummy implementation.
2763
2764         * platform/graphics/blackberry/DrawingBufferBlackBerry.cpp:
2765         (WebCore):
2766         (WebCore::DrawingBuffer::clearPlatformLayer):
2767
2768 2013-03-21  Florin Malita  <fmalita@chromium.org>
2769
2770         [SVG] Suppress painting when an empty viewBox is specified
2771         https://bugs.webkit.org/show_bug.cgi?id=112623
2772
2773         Reviewed by Philip Rogers.
2774
2775         Per spec, elements with an empty viewBox should not be rendered:
2776         http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute.
2777
2778         This patch adds the missing viewBox checks to RenderSVGRoot, RenderSVGViewPortContainer,
2779         RenderSVGResourceMarker and RenderSVGResourceMarker's paint methods.
2780
2781         In order to detect the case of "viewBox present but invalid", the patch also introduces
2782         SVGAnimatedProperty plumbing for tracking property validity: the baseVal setter now takes
2783         an additional optional 'validValue' boolean parameter, which can later be queried via a
2784         macroed getter (LowerProperty##IsValid()).
2785
2786         Test: svg/custom/viewBox-empty.html
2787
2788         * rendering/svg/RenderSVGResourceMarker.cpp:
2789         (WebCore::RenderSVGResourceMarker::draw):
2790         * rendering/svg/RenderSVGResourcePattern.cpp:
2791         (WebCore::RenderSVGResourcePattern::buildPattern):
2792         * rendering/svg/RenderSVGRoot.cpp:
2793         (WebCore::RenderSVGRoot::paintReplaced):
2794         * rendering/svg/RenderSVGViewportContainer.cpp:
2795         (WebCore::RenderSVGViewportContainer::paint):
2796         (WebCore):
2797         * rendering/svg/RenderSVGViewportContainer.h:
2798         (RenderSVGViewportContainer):
2799         * svg/SVGPatternElement.cpp:
2800         (WebCore::SVGPatternElement::collectPatternAttributes):
2801         * svg/SVGSVGElement.h:
2802         (WebCore::SVGSVGElement::hasEmptyViewBox):
2803         (SVGSVGElement):
2804         Suppress painting if a valid empty viewBox is found.
2805
2806         * svg/SVGFitToViewBox.h:
2807         (WebCore::SVGFitToViewBox::parseAttribute):
2808         Mark the viewBox property as invalid if not successfully parsed.
2809
2810         * svg/SVGExternalResourcesRequired.h:
2811         (SVGExternalResourcesRequired):
2812         * svg/SVGURIReference.h:
2813         (SVGURIReference):
2814         * svg/properties/SVGAnimatedPropertyMacros.h:
2815         (WebCore::SVGSynchronizableAnimatedProperty::SVGSynchronizableAnimatedProperty):
2816         (SVGSynchronizableAnimatedProperty):
2817         (WebCore):
2818         Plumbing for tracking property value validation.
2819
2820 2013-03-21  Alexei Filippov  <alph@chromium.org>
2821
2822         Web Inspector: Hide toolbar customization experimental setting
2823         https://bugs.webkit.org/show_bug.cgi?id=112942
2824
2825         Reviewed by Pavel Feldman.
2826
2827         * inspector/front-end/Settings.js:
2828         (WebInspector.ExperimentsSettings):
2829         * inspector/front-end/Toolbar.js:
2830         (WebInspector.Toolbar):
2831         (WebInspector.Toolbar.prototype._isToolbarCustomizable):
2832
2833 2013-03-21  Anton Muhin  <antonm@chromium.org>
2834
2835         Unreviewed, rolling out r146483.
2836         http://trac.webkit.org/changeset/146483
2837         https://bugs.webkit.org/show_bug.cgi?id=111695
2838
2839         Breaks
2840
2841         * Modules/speech/SpeechSynthesis.cpp:
2842         (WebCore::SpeechSynthesis::boundaryEventOccurred):
2843         (WebCore::SpeechSynthesis::didStartSpeaking):
2844         (WebCore::SpeechSynthesis::didPauseSpeaking):
2845         (WebCore::SpeechSynthesis::didResumeSpeaking):
2846         (WebCore::SpeechSynthesis::didFinishSpeaking):
2847         (WebCore::SpeechSynthesis::speakingErrorOccurred):
2848         (WebCore):
2849         * Modules/speech/SpeechSynthesis.h:
2850         (SpeechSynthesis):
2851         * Modules/speech/SpeechSynthesisUtterance.cpp:
2852         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
2853         (WebCore::SpeechSynthesisUtterance::setVoice):
2854         * Modules/speech/SpeechSynthesisUtterance.h:
2855         (WebCore::SpeechSynthesisUtterance::text):
2856         (WebCore::SpeechSynthesisUtterance::setText):
2857         (WebCore::SpeechSynthesisUtterance::lang):
2858         (WebCore::SpeechSynthesisUtterance::setLang):
2859         (WebCore::SpeechSynthesisUtterance::volume):
2860         (WebCore::SpeechSynthesisUtterance::setVolume):
2861         (WebCore::SpeechSynthesisUtterance::rate):
2862         (WebCore::SpeechSynthesisUtterance::setRate):
2863         (WebCore::SpeechSynthesisUtterance::pitch):
2864         (WebCore::SpeechSynthesisUtterance::setPitch):
2865         (WebCore::SpeechSynthesisUtterance::startTime):
2866         (WebCore::SpeechSynthesisUtterance::setStartTime):
2867         (WebCore::SpeechSynthesisUtterance::platformUtterance):
2868         (SpeechSynthesisUtterance):
2869         * Modules/speech/SpeechSynthesisVoice.h:
2870         (SpeechSynthesisVoice):
2871         * WebCore.exp.in:
2872         * WebCore.gypi:
2873         * platform/PlatformSpeechSynthesis.h:
2874         (PlatformSpeechSynthesis):
2875         * platform/PlatformSpeechSynthesisUtterance.cpp:
2876         * platform/PlatformSpeechSynthesisUtterance.h:
2877         (PlatformSpeechSynthesisUtterance):
2878         (WebCore::PlatformSpeechSynthesisUtterance::client):
2879         * platform/PlatformSpeechSynthesisVoice.cpp:
2880         (WebCore::PlatformSpeechSynthesisVoice::create):
2881         (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
2882         * platform/PlatformSpeechSynthesisVoice.h:
2883         (PlatformSpeechSynthesisVoice):
2884         (WebCore::PlatformSpeechSynthesisVoice::voiceURI):
2885         (WebCore::PlatformSpeechSynthesisVoice::name):
2886         (WebCore::PlatformSpeechSynthesisVoice::lang):
2887         (WebCore::PlatformSpeechSynthesisVoice::localService):
2888         * platform/PlatformSpeechSynthesizer.cpp:
2889         (WebCore::PlatformSpeechSynthesizer::create):
2890         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
2891         (WebCore):
2892         * platform/PlatformSpeechSynthesizer.h:
2893         (PlatformSpeechSynthesizerClient):
2894         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
2895         (PlatformSpeechSynthesizer):
2896         * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Removed.
2897         * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Removed.
2898         * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Removed.
2899         * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Removed.
2900         * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Removed.
2901         * platform/mac/PlatformSpeechSynthesizerMac.mm:
2902         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
2903         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
2904         (WebCore):
2905         (WebCore::PlatformSpeechSynthesizer::speak):
2906         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
2907         (WebCore::PlatformSpeechSynthesizerMock::create):
2908         (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
2909         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
2910         (WebCore::PlatformSpeechSynthesizerMock::speak):
2911         * platform/mock/PlatformSpeechSynthesizerMock.h:
2912         (PlatformSpeechSynthesizerMock):
2913
2914 2013-03-21  Alexey Proskuryakov  <ap@apple.com>
2915
2916         [Mac] Consolidate bits of willSendRequest implementation
2917         https://bugs.webkit.org/show_bug.cgi?id=112932
2918
2919         Reviewed by Brady Eidson.
2920
2921         Moved some logic from WebCoreResourceHandleAsDelegate to ResourceHandle for clarity.
2922
2923         * platform/network/mac/ResourceHandleMac.mm:
2924         (WebCore::ResourceHandle::willSendRequest):
2925         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
2926
2927 2013-03-21  Praveen R Jadhav  <praveen.j@samsung.com>
2928
2929         Remove AudioGain.idl from compilation.
2930         https://bugs.webkit.org/show_bug.cgi?id=112650
2931
2932         Reviewed by Chris Rogers.
2933
2934         Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#GainNode
2935               https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBufferSourceNode
2936
2937         AudioParam serves the same purpose as AudioGain. Infact, AudioGain inherits
2938         AudioParam class and doesn't have its own member functions/parameters. Also,
2939         AudioGain is not part of WebAudio W3C specifications.
2940
2941         Test: webaudio/gain-basic.html
2942
2943         * CMakeLists.txt:
2944         * DerivedSources.make:
2945         * DerivedSources.pri:
2946         * GNUmakefile.list.am:
2947         * Modules/webaudio/AudioBufferSourceNode.cpp:
2948         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
2949         * Modules/webaudio/AudioBufferSourceNode.h:
2950         (AudioBufferSourceNode):
2951         (WebCore::AudioBufferSourceNode::gain):
2952         * Modules/webaudio/AudioBufferSourceNode.idl:
2953         * Modules/webaudio/AudioGain.h: Removed.
2954         * Modules/webaudio/AudioGain.idl: Removed.
2955         * Modules/webaudio/GainNode.cpp:
2956         (WebCore::GainNode::GainNode):
2957         * Modules/webaudio/GainNode.h:
2958         (WebCore):
2959         (WebCore::GainNode::create):
2960         (GainNode):
2961         (WebCore::GainNode::gain):
2962         * Modules/webaudio/GainNode.idl:
2963         * Modules/webaudio/PannerNode.cpp:
2964         (WebCore::PannerNode::PannerNode):
2965         * Modules/webaudio/PannerNode.h:
2966         (WebCore::PannerNode::distanceGain):
2967         (WebCore::PannerNode::coneGain):
2968         * Target.pri:
2969         * WebCore.gypi:
2970         * WebCore.xcodeproj/project.pbxproj:
2971
2972 2013-03-21  Dominic Mazzoni  <dmazzoni@google.com>
2973
2974         Implement Web Speech Synthesis for Chromium
2975         https://bugs.webkit.org/show_bug.cgi?id=111695
2976
2977         Reviewed by Adam Barth.
2978
2979         Straightforward implementation of speech synthesis
2980         for Chromium by exposing interfaces for the platform
2981         to implement.
2982
2983         * Modules/speech/SpeechSynthesis.cpp:
2984         (WebCore::SpeechSynthesis::boundaryEventOccurred):
2985         (WebCore::SpeechSynthesis::didStartSpeaking):
2986         (WebCore::SpeechSynthesis::didPauseSpeaking):
2987         (WebCore::SpeechSynthesis::didResumeSpeaking):
2988         (WebCore::SpeechSynthesis::didFinishSpeaking):
2989         (WebCore::SpeechSynthesis::speakingErrorOccurred):
2990         (WebCore):
2991         * Modules/speech/SpeechSynthesis.h:
2992         (SpeechSynthesis):
2993         * Modules/speech/SpeechSynthesisUtterance.cpp:
2994         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
2995         (WebCore):
2996         (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
2997         (WebCore::SpeechSynthesisUtterance::setVoice):
2998         * Modules/speech/SpeechSynthesisUtterance.h:
2999         (SpeechSynthesisUtterance):
3000         (WebCore::SpeechSynthesisUtterance::text):
3001         (WebCore::SpeechSynthesisUtterance::setText):
3002         (WebCore::SpeechSynthesisUtterance::lang):
3003         (WebCore::SpeechSynthesisUtterance::setLang):
3004         (WebCore::SpeechSynthesisUtterance::volume):
3005         (WebCore::SpeechSynthesisUtterance::setVolume):
3006         (WebCore::SpeechSynthesisUtterance::rate):
3007         (WebCore::SpeechSynthesisUtterance::setRate):
3008         (WebCore::SpeechSynthesisUtterance::pitch):
3009         (WebCore::SpeechSynthesisUtterance::setPitch):
3010         (WebCore::SpeechSynthesisUtterance::startTime):
3011         (WebCore::SpeechSynthesisUtterance::setStartTime):
3012         (WebCore::SpeechSynthesisUtterance::platformUtterance):
3013         * Modules/speech/SpeechSynthesisVoice.h:
3014         (WebCore::SpeechSynthesisVoice::~SpeechSynthesisVoice):
3015         * WebCore.exp.in:
3016         * WebCore.gypi:
3017         * platform/PlatformSpeechSynthesis.h:
3018         (PlatformSpeechSynthesis):
3019         * platform/PlatformSpeechSynthesisUtterance.cpp:
3020         (WebCore):
3021         (WebCore::PlatformSpeechSynthesisUtterance::create):
3022         * platform/PlatformSpeechSynthesisUtterance.h:
3023         (PlatformSpeechSynthesisUtterance):
3024         (WebCore::PlatformSpeechSynthesisUtterance::setClient):
3025         * platform/PlatformSpeechSynthesisVoice.cpp:
3026         (WebCore):
3027         (WebCore::PlatformSpeechSynthesisVoice::create):
3028         (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
3029         * platform/PlatformSpeechSynthesisVoice.h:
3030         (PlatformSpeechSynthesisVoice):
3031         (WebCore::PlatformSpeechSynthesisVoice::setVoiceURI):
3032         (WebCore::PlatformSpeechSynthesisVoice::setName):
3033         (WebCore::PlatformSpeechSynthesisVoice::setLang):
3034         (WebCore::PlatformSpeechSynthesisVoice::setLocalService):
3035         (WebCore::PlatformSpeechSynthesisVoice::setIsDefault):
3036         * platform/PlatformSpeechSynthesizer.cpp:
3037         (WebCore::PlatformSpeechSynthesizer::create):
3038         (WebCore::PlatformSpeechSynthesizer::setVoiceList):
3039         (WebCore):
3040         * platform/PlatformSpeechSynthesizer.h:
3041         (WebKit):
3042         (PlatformSpeechSynthesizerClient):
3043         (PlatformSpeechSynthesizer):
3044         * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Added.
3045         (WebCore):
3046         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
3047         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
3048         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
3049         (WebCore::PlatformSpeechSynthesizer::speak):
3050         (WebCore::PlatformSpeechSynthesizer::pause):
3051         (WebCore::PlatformSpeechSynthesizer::resume):
3052         (WebCore::PlatformSpeechSynthesizer::cancel):
3053         * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Added.
3054         (WebKit):
3055         (WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
3056         (WebKit::WebSpeechSynthesisUtterance::operator=):
3057         (WebKit::WebSpeechSynthesisUtterance::assign):
3058         (WebKit::WebSpeechSynthesisUtterance::reset):
3059         (WebKit::WebSpeechSynthesisUtterance::operator PassRefPtr<PlatformSpeechSynthesisUtterance>):
3060         (WebKit::WebSpeechSynthesisUtterance::operator PlatformSpeechSynthesisUtterance*):
3061         (WebKit::WebSpeechSynthesisUtterance::text):
3062         (WebKit::WebSpeechSynthesisUtterance::lang):
3063         (WebKit::WebSpeechSynthesisUtterance::voice):
3064         (WebKit::WebSpeechSynthesisUtterance::volume):
3065         (WebKit::WebSpeechSynthesisUtterance::rate):
3066         (WebKit::WebSpeechSynthesisUtterance::pitch):
3067         (WebKit::WebSpeechSynthesisUtterance::startTime):
3068         * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Added.
3069         (WebKit):
3070         (WebKit::WebSpeechSynthesisVoice::assign):
3071         (WebKit::WebSpeechSynthesisVoice::reset):
3072         (WebKit::WebSpeechSynthesisVoice::setVoiceURI):
3073         (WebKit::WebSpeechSynthesisVoice::setName):
3074         (WebKit::WebSpeechSynthesisVoice::setLanguage):
3075         (WebKit::WebSpeechSynthesisVoice::setIsLocalService):
3076         (WebKit::WebSpeechSynthesisVoice::setIsDefault):
3077         (WebKit::WebSpeechSynthesisVoice::operator PassRefPtr<WebCore::PlatformSpeechSynthesisVoice>):
3078         * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Added.
3079         (WebCore):
3080         (WebCore::WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl):
3081         (WebCore::WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl):
3082         (WebCore::WebSpeechSynthesizerClientImpl::setVoiceList):
3083         (WebCore::WebSpeechSynthesizerClientImpl::didStartSpeaking):
3084         (WebCore::WebSpeechSynthesizerClientImpl::didFinishSpeaking):
3085         (WebCore::WebSpeechSynthesizerClientImpl::didPauseSpeaking):
3086         (WebCore::WebSpeechSynthesizerClientImpl::didResumeSpeaking):
3087         (WebCore::WebSpeechSynthesizerClientImpl::speakingErrorOccurred):
3088         (WebCore::WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred):
3089         (WebCore::WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred):
3090         * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Added.
3091         (WebCore):
3092         (WebSpeechSynthesizerClientImpl):
3093         * platform/mac/PlatformSpeechSynthesizerMac.mm:
3094         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
3095         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
3096         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
3097         (WebCore):
3098         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
3099         (WebCore::PlatformSpeechSynthesizer::speak):
3100         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
3101         (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
3102         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
3103         (WebCore::PlatformSpeechSynthesizerMock::speak):
3104         * platform/mock/PlatformSpeechSynthesizerMock.h:
3105         (PlatformSpeechSynthesizerMock):
3106
3107 2013-03-21  Julien Chaffraix  <jchaffraix@webkit.org>
3108
3109         [CSS Grid Layout] Properly layout spanning grid items with minmax grid tracks
3110         https://bugs.webkit.org/show_bug.cgi?id=112389
3111
3112         Reviewed by Tony Chang.
3113
3114         This change updates our core minmax resolution function to be spanning grid
3115         items aware. The new implementation of the algorithm doesn't totally match
3116         the specification but it is fairly close that it's a good first pass. The
3117         extra complexity in the specification needs to be carefully examinated
3118         first (not to mention the probable change in the core layout algorithm).
3119
3120         Tests: fast/css-grid-layout/minmax-spanning-resolution-columns.html
3121                fast/css-grid-layout/minmax-spanning-resolution-rows.html
3122
3123         * rendering/RenderGrid.cpp:
3124         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
3125         Updated this function to account for spanning grid items by:
3126         - iterating over all spanned grid tracks.
3127         - removing any used breadth from all spanned grid tracks.
3128
3129 2013-03-21  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
3130
3131         [GStreamer] New reference returned by g_main_context_new() must be freed
3132         https://bugs.webkit.org/show_bug.cgi?id=112899
3133
3134         Reviewed by Kenneth Rohde Christiansen.
3135
3136         Fix a memory leak by adopting the new reference returned
3137         by g_main_context_new().
3138
3139         No new tests. No change in behavior.
3140
3141         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
3142         (WebCore::AudioFileReader::createBus):
3143
3144 2013-03-21  Carlos Garcia Campos  <cargarcia@rim.com>
3145
3146         [BlackBerry] Add ScrollingCoordinatorBlackBerry implementation
3147         https://bugs.webkit.org/show_bug.cgi?id=112915
3148
3149         Reviewed by Rob Buis.
3150
3151         * PlatformBlackBerry.cmake: Add page/scrolling/blackberry to the
3152         indlude dir list.
3153         * page/scrolling/ScrollingCoordinator.cpp:
3154         (WebCore::ScrollingCoordinator::create): Create a
3155         ScrollingCoordinatorBlackBerry for the BlackBerry platform.
3156         * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.cpp: Added.
3157         (WebCore):
3158         (WebCore::ScrollingCoordinatorBlackBerry::ScrollingCoordinatorBlackBerry):
3159         (WebCore::ScrollingCoordinatorBlackBerry::setLayerIsContainerForFixedPositionLayers):
3160         (WebCore::ScrollingCoordinatorBlackBerry::setLayerIsFixedToContainerLayer):
3161         (WebCore::ScrollingCoordinatorBlackBerry::setLayerFixedToContainerLayerEdge):
3162         (WebCore::ScrollingCoordinatorBlackBerry::frameViewFrameRectDidChange):
3163         (WebCore::ScrollingCoordinatorBlackBerry::frameViewContentsSizeDidChange):
3164         * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.h: Added.
3165         (WebCore):
3166         (ScrollingCoordinatorBlackBerry):
3167         (WebCore::ScrollingCoordinatorBlackBerry::supportsFixedPositionLayers):
3168         * platform/graphics/PlatformLayer.h:
3169         (WebCore): Add PlatformLayer definition for BlackBerry.
3170
3171 2013-03-18  Andrey Kosyakov  <caseq@chromium.org>
3172
3173         Web Inspector: Paint rectangles shown on hover over Timeline's paint records occasionally have wrong offsets
3174         https://bugs.webkit.org/show_bug.cgi?id=112371
3175
3176         Reviewed by Pavel Feldman.
3177
3178         - pass frame to InspectorTimelineAgent::didPaint();
3179         - convert paint coordinates to root view.
3180
3181         * inspector/InspectorInstrumentation.cpp:
3182         (WebCore):
3183         (WebCore::InspectorInstrumentation::willPaintImpl):
3184         (WebCore::InspectorInstrumentation::didPaintImpl):
3185         * inspector/InspectorInstrumentation.h:
3186         (InspectorInstrumentation):
3187         (WebCore::InspectorInstrumentation::willPaint):
3188         (WebCore::InspectorInstrumentation::didPaint):
3189         * inspector/InspectorTimelineAgent.cpp:
3190         (WebCore::InspectorTimelineAgent::didPaint):
3191         * inspector/InspectorTimelineAgent.h:
3192         (InspectorTimelineAgent):
3193
3194 2013-03-20  Andrey Kosyakov  <caseq@chromium.org>
3195
3196         Web Inspector: do not use inspector cookie in InspectorInstrumentation::{will,did}Paint
3197         https://bugs.webkit.org/show_bug.cgi?id=112787
3198
3199         Reviewed by Pavel Feldman.
3200
3201         - pass frame, not inspector cookie to InspectorInstrumentation::didPaint;
3202         - use frame to determine timeline agent in InspectorInstrumentation::didPaint.
3203
3204         * inspector/InspectorInstrumentation.cpp:
3205         (WebCore):
3206         (WebCore::InspectorInstrumentation::willPaintImpl):
3207         (WebCore::InspectorInstrumentation::didPaintImpl):
3208         * inspector/InspectorInstrumentation.h:
3209         (InspectorInstrumentation):
3210         (WebCore::InspectorInstrumentation::willPaint):
3211         (WebCore::InspectorInstrumentation::didPaint):
3212         * page/FrameView.cpp:
3213         (WebCore::FrameView::paintContents):
3214         * rendering/RenderLayerBacking.cpp:
3215         (WebCore::RenderLayerBacking::paintContents):
3216
3217 2013-03-21  Julien Chaffraix  <jchaffraix@webkit.org>
3218
3219         [CSS Grid Layout] OOB access in RenderGrid with a grid item with negative position index
3220         https://bugs.webkit.org/show_bug.cgi?id=112853
3221
3222         Reviewed by Tony Chang.
3223
3224         This issue was caused by us casting a negative int to a size_t by mistake. This
3225         would make us not size the grid properly thus yielding to OOB access during the
3226         rest of the layout.
3227
3228         Test: fast/css-grid-layout/grid-item-negative-indexes.html
3229
3230         * rendering/RenderGrid.cpp:
3231         (WebCore::estimatedGridSizeForPosition):
3232         Added this helper function to do the proper estimation and checks that our
3233         position can be represented by a size_t.
3234
3235         (WebCore::RenderGrid::maximumIndexInDirection):
3236         Updated to use estimatedGridSizeForPosition.
3237
3238 2013-03-21  Stephen White  <senorblanco@chromium.org>
3239
3240         [skia] feConvolveMatrix should use accelerated path
3241         https://bugs.webkit.org/show_bug.cgi?id=112828
3242
3243         Reviewed by James Robinson.
3244
3245         Covered by layout tests css3/filters/effect-reference*.html.
3246
3247         * WebCore.gypi:
3248         Add FEConvolveMatrixSkia.cpp to the build.
3249         * platform/graphics/filters/FEConvolveMatrix.h:
3250         Enable the skia accelerated path for feConvolveMatrix.
3251         * platform/graphics/filters/skia/FEConvolveMatrixSkia.cpp:
3252         (WebCore::FEConvolveMatrix::createImageFilter):
3253         Implement building/conversion from FEConvolveMatrix to
3254         SkMatrixConvolutionImageFilter.
3255
3256 2013-03-21  Martin Robinson  <mrobinson@igalia.com>
3257
3258         Source/ThirdParty/leveldb/db/builder.cc does not build on systems without <endian.h>
3259         https://bugs.webkit.org/show_bug.cgi?id=111817
3260
3261         Reviewed by Gustavo Noronha Silva.
3262
3263         * GNUmakefile.am: Add the appropriate flags to the LevelDB build if we are on FreeBSD
3264         or OS X.
3265
3266 2013-03-21  Julien Chaffraix  <jchaffraix@webkit.org>
3267
3268         [CSS Grid Layout] Support default grid items sizing
3269         https://bugs.webkit.org/show_bug.cgi?id=103333
3270
3271         Reviewed by Tony Chang.
3272
3273         Tests: fast/css-grid-layout/grid-auto-columns-rows-auto-flow-resolution.html
3274                fast/css-grid-layout/grid-auto-columns-rows-resolution.html
3275                fast/css-grid-layout/grid-auto-columns-rows-update.html
3276
3277         * rendering/RenderGrid.cpp:
3278         (WebCore::RenderGrid::gridTrackSize):
3279         Core of the change: return the grid-auto-{rows|columns} instead of a pre-defined value.
3280
3281         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
3282         Fixed a latent bug: we need to iterate over the internal grid representation instead of the
3283         style's rows / columns as the latter doesn't account for implicit rows / columns.
3284
3285 2013-03-21  Adam Barth  <abarth@webkit.org>
3286
3287         HTMLNames should construct strings at compile time
3288         https://bugs.webkit.org/show_bug.cgi?id=112831
3289
3290         Reviewed by Darin Adler.
3291
3292         This patch teaches make_names how to construct strings at compile time,
3293         eliminating a large number of startup mallocs.
3294
3295         * WebCore.gyp/WebCore.gyp:
3296         * WebCore.gyp/scripts/action_makenames.py:
3297             - Teach the Chromium build how to deal with Perl modules.
3298         * bindings/scripts/StaticString.pm: Added.
3299             - A Perl module for constructing static strings.
3300         (GenerateStrings):
3301         (GenerateValidateStrings):
3302         * dom/QualifiedName.cpp:
3303         (WebCore::createQualifiedName):
3304             - createQualifiedName now takes an already-constructed StringImpl
3305               object.
3306         * dom/QualifiedName.h:
3307         * dom/make_names.pl:
3308         (valueForName):
3309         (namesToStrings):
3310         (printNamesCppFile):
3311         (printDefinitions):
3312             - Teach make_names how to use StaticString.pm.
3313
3314 2013-03-21  Kondapally Kalyan  <kalyan.kondapally@intel.com>
3315
3316         [EFL][WebGL] Implement a common GraphicsSurface Implementation.
3317         https://bugs.webkit.org/show_bug.cgi?id=111759
3318
3319         Reviewed by Kenneth Rohde Christiansen.
3320
3321         Covered by existing WebGL tests.
3322
3323         This is in preparation to add transport surface support for GLES2.
3324         This patch makes it easy to share the core logic of using
3325         Transport Surface and client on GLX and GLES2 backends without
3326         any code duplication.
3327
3328         * PlatformEfl.cmake:
3329         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
3330         (WebCore::GraphicsContext3DPrivate::initialize):
3331         (WebCore::GraphicsContext3DPrivate::releaseResources):
3332         (WebCore::GraphicsContext3DPrivate::prepareBuffer):
3333         (WebCore::GraphicsContext3DPrivate::createGraphicsSurface):
3334         (WebCore::GraphicsContext3DPrivate::didResizeCanvas):
3335         (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
3336         * platform/graphics/efl/GraphicsContext3DPrivate.h:
3337         (GraphicsContext3DPrivate):
3338
3339         TransportSurface related code is moved to GraphicsSurfaceCommon.
3340         As GraphicsSurface is deleted on resize, added logic to ensure that
3341         current buffer is not deleted before having the shared buffer
3342         with correct size. This would avoid any flashing during resize.
3343
3344         * platform/graphics/opengl/GLPlatformSurface.cpp:
3345         (WebCore::GLPlatformSurface::createTransportSurface):
3346         * platform/graphics/opengl/GLPlatformSurface.h:
3347         * platform/graphics/surfaces/efl/GLTransportSurface.cpp: Renamed from Source/WebCore/platform/graphics/surfaces/GLTransportSurface.cpp.
3348         (WebCore):
3349         (WebCore::GLTransportSurface::GLTransportSurface):
3350         (WebCore::GLTransportSurface::~GLTransportSurface):
3351         (WebCore::GLTransportSurface::updateContents):
3352         (WebCore::GLTransportSurface::setGeometry):
3353         (WebCore::GLTransportSurface::destroy):
3354         (WebCore::GLTransportSurface::draw):
3355         (WebCore::GLTransportSurface::bindArrayBuffer):
3356         (WebCore::GLTransportSurface::updateTransformationMatrix):
3357         (WebCore::GLTransportSurface::initializeShaderProgram):
3358         (WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
3359         (WebCore::GLTransportSurfaceClient::GLTransportSurfaceClient):
3360         (WebCore::GLTransportSurfaceClient::~GLTransportSurfaceClient):
3361         (WebCore::GLTransportSurfaceClient::destroy):
3362         (WebCore::GLTransportSurfaceClient::prepareTexture):
3363         (WebCore::GLTransportSurfaceClient::createTexture):
3364         * platform/graphics/surfaces/efl/GLTransportSurface.h: Renamed from Source/WebCore/platform/graphics/surfaces/GLTransportSurface.h.
3365         (WebCore):
3366         (GLTransportSurface):
3367         (GLTransportSurfaceClient):
3368         (WebCore::GLTransportSurfaceClient::texture):
3369         (WebCore::GLTransportSurfaceClient::hasAlpha):
3370
3371         Moved TransportSurface to EFL folder as this is being used by EFL port only.
3372         Added a base class for TransportSurfaceClient.
3373
3374         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp: Added.
3375         (WebCore):
3376         (GraphicsSurfacePrivate):
3377         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
3378         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
3379         (WebCore::GraphicsSurfacePrivate::destroy):
3380         (WebCore::GraphicsSurfacePrivate::initializeTransportSurface):
3381         (WebCore::GraphicsSurfacePrivate::makeContextCurrent):
3382         (WebCore::GraphicsSurfacePrivate::copyFromTexture):
3383         (WebCore::GraphicsSurfacePrivate::handle):
3384         (WebCore::GraphicsSurfacePrivate::updateClientBuffer):
3385         (WebCore::GraphicsSurfacePrivate::flags):
3386         (WebCore::GraphicsSurfacePrivate::rect):
3387         (WebCore::GraphicsSurfacePrivate::size):
3388         (WebCore::GraphicsSurfacePrivate::textureId):
3389         (WebCore::GraphicsSurfacePrivate::initializeClient):
3390         (WebCore::GraphicsSurface::platformExport):
3391         (WebCore::GraphicsSurface::platformGetTextureID):
3392         (WebCore::GraphicsSurface::platformCopyToGLTexture):
3393         (WebCore::GraphicsSurface::platformCopyFromTexture):
3394         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
3395         (WebCore::GraphicsSurface::platformFrontBuffer):
3396         (WebCore::GraphicsSurface::platformSwapBuffers):
3397         (WebCore::GraphicsSurface::platformSize):
3398         (WebCore::GraphicsSurface::platformCreate):
3399         (WebCore::GraphicsSurface::platformImport):
3400         (WebCore::GraphicsSurface::platformLock):
3401         (WebCore::GraphicsSurface::platformUnlock):
3402         (WebCore::GraphicsSurface::platformDestroy):
3403         (WebCore::GraphicsSurface::platformBeginPaint):
3404         (WebCore::GraphicsSurface::createReadOnlyImage):
3405
3406         GraphicsSurface implementation to be shared by both GLX and GLES2.
3407
3408         * platform/graphics/surfaces/egl/EGLSurface.cpp:
3409         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
3410         * platform/graphics/surfaces/egl/EGLSurface.h:
3411         (EGLWindowTransportSurface):
3412         * platform/graphics/surfaces/glx/GLXSurface.cpp:
3413         (WebCore):
3414         (WebCore::resolveGLMethods):
3415         (WebCore::isMesaGLX):
3416         (WebCore::GLXTransportSurface::GLXTransportSurface):
3417         (WebCore::GLXTransportSurfaceClient::GLXTransportSurfaceClient):
3418         (WebCore::GLXTransportSurfaceClient::~GLXTransportSurfaceClient):
3419         (WebCore::GLXTransportSurfaceClient::destroy):
3420         (WebCore::GLXTransportSurfaceClient::prepareTexture):
3421         * platform/graphics/surfaces/glx/GLXSurface.h:
3422         (GLXTransportSurface):
3423         (GLXTransportSurfaceClient):
3424         (WebCore):
3425         GLXTransportSurfaceClient implementation.
3426
3427 2013-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
3428
3429         Unreviewed, rolling out r146454.
3430         http://trac.webkit.org/changeset/146454
3431         https://bugs.webkit.org/show_bug.cgi?id=112906
3432
3433         compile failures (Requested by antonm on #webkit).
3434
3435         * WebCore.gypi:
3436         * platform/graphics/filters/FEConvolveMatrix.h:
3437         (FEConvolveMatrix):
3438         * platform/graphics/filters/skia/FEConvolveMatrixSkia.cpp: Removed.
3439