44415c8fbfe471b6a9317beab687751e418f839e
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-04  Yury Semikhatsky  <yurys@chromium.org>
2
3         Web Inspector: simplify Memory.getDOMNodeCount implementation
4         https://bugs.webkit.org/show_bug.cgi?id=108821
5
6         Reviewed by Alexander Pavlov.
7
8         Removed Memory.getDOMNodeCount command from the protocol. Memory.getDOMCounters
9         should be used instead.
10
11         * inspector/Inspector.json:
12         * inspector/InspectorMemoryAgent.cpp:
13         * inspector/InspectorMemoryAgent.h:
14         (InspectorMemoryAgent):
15
16 2013-02-08  Yury Semikhatsky  <yurys@chromium.org>
17
18         Web Inspector: refactor MemoryStatistics.js
19         https://bugs.webkit.org/show_bug.cgi?id=109299
20
21         Reviewed by Vsevolod Vlasov.
22
23         Extracted functionality specific to DOM counter graphs drawing into
24         separate methods on MemoryStatistics class.
25         Introduced CounterUIBase base class for DOMCounterUI that contains
26         functionality which can be shared with native memory graph.
27
28         * inspector/front-end/MemoryStatistics.js:
29         (WebInspector.MemoryStatistics):
30         (WebInspector.CounterUIBase):
31         (WebInspector.CounterUIBase.prototype.updateCurrentValue):
32         (WebInspector.CounterUIBase.prototype.clearCurrentValueAndMarker):
33         (WebInspector.CounterUIBase.prototype.get visible):
34         (WebInspector.DOMCounterUI):
35         (WebInspector.DOMCounterUI.prototype.discardImageUnderMarker):
36         (WebInspector.MemoryStatistics.prototype._onMouseOut):
37         (WebInspector.MemoryStatistics.prototype._clearCurrentValueAndMarker):
38         (WebInspector.MemoryStatistics.prototype._refreshCurrentValues):
39         (WebInspector.MemoryStatistics.prototype._updateCurrentValue):
40         (WebInspector.MemoryStatistics.prototype._highlightCurrentPositionOnGraphs):
41         (WebInspector.MemoryStatistics.prototype._restoreImageUnderMarker):
42         (WebInspector.MemoryStatistics.prototype._saveImageUnderMarker):
43         (WebInspector.MemoryStatistics.prototype._drawMarker):
44         (WebInspector.MemoryStatistics.prototype._clear):
45         (WebInspector.MemoryStatistics.prototype._discardImageUnderMarker):
46
47 2013-02-08  Mike West  <mkwst@chromium.org>
48
49         Add a new IGNORE_EXCEPTION helper to ignore ExceptionCodes when they are expected but uninteresting
50         https://bugs.webkit.org/show_bug.cgi?id=108771
51
52         Reviewed by Eric Seidel.
53
54         In cases where the ExceptionCode passed into a function is completely
55         ignored, this patch replaces it with a new IGNORE_EXCEPTION macro. This
56         makes our expectations about possible exceptions (or lack thereof)
57         explicit, rather than relying on implicit assumptions about whether a
58         variable is intentionally uninitialized or not. It also removes
59         knowledge about the internals of ExceptionCodes (that they're currently
60         ints, for instance) from code that shouldn't care, which will help with
61         future refactorings.
62
63         The implementation is entirely based upon ASSERT_NO_EXCEPTION, and
64         shouldn't have any visible effect on the web. As long as all the
65         current tests pass, we're good.
66
67         * Modules/indexeddb/IDBRequest.cpp:
68         (WebCore::IDBRequest::dispatchEvent):
69         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
70         * Modules/indexeddb/IDBTransaction.cpp:
71         (WebCore::IDBTransaction::stop):
72         * Modules/websockets/WebSocketChannel.cpp:
73         (WebCore::WebSocketChannel::processBuffer):
74         * dom/Document.cpp:
75         (WebCore::Document::processHttpEquiv):
76         * dom/ExceptionCodePlaceholder.h:
77         (WebCore):
78         * dom/Node.cpp:
79         (WebCore::Node::normalize):
80         * dom/Text.cpp:
81         (WebCore::Text::replaceWholeText):
82         * editing/AlternativeTextController.cpp:
83         (WebCore::AlternativeTextController::insertDictatedText):
84         * editing/AppendNodeCommand.cpp:
85         (WebCore::AppendNodeCommand::doApply):
86         (WebCore::AppendNodeCommand::doUnapply):
87         * editing/CompositeEditCommand.cpp:
88         (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt):
89         * editing/DeleteFromTextNodeCommand.cpp:
90         (WebCore::DeleteFromTextNodeCommand::doUnapply):
91         * editing/Editor.cpp:
92         (WebCore::dispatchEditableContentChangedEvents):
93         (WebCore::Editor::applyEditingStyleToElement):
94         * editing/EditorCommand.cpp:
95         (WebCore::executeFormatBlock):
96         * editing/FormatBlockCommand.cpp:
97         (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
98         * editing/InsertIntoTextNodeCommand.cpp:
99         (WebCore::InsertIntoTextNodeCommand::doApply):
100         (WebCore::InsertIntoTextNodeCommand::doUnapply):
101         * editing/InsertListCommand.cpp:
102         (WebCore::InsertListCommand::doApplyForSingleParagraph):
103         * editing/InsertNodeBeforeCommand.cpp:
104         (WebCore::InsertNodeBeforeCommand::doApply):
105         (WebCore::InsertNodeBeforeCommand::doUnapply):
106         * editing/RemoveCSSPropertyCommand.cpp:
107         (WebCore::RemoveCSSPropertyCommand::doApply):
108         (WebCore::RemoveCSSPropertyCommand::doUnapply):
109         * editing/RemoveNodeCommand.cpp:
110         (WebCore::RemoveNodeCommand::doApply):
111         (WebCore::RemoveNodeCommand::doUnapply):
112         * editing/ReplaceSelectionCommand.cpp:
113         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
114         * editing/TextIterator.cpp:
115         (WebCore::TextIterator::getLocationAndLengthFromRange):
116         * editing/WrapContentsInDummySpanCommand.cpp:
117         (WebCore::WrapContentsInDummySpanCommand::executeApply):
118         (WebCore::WrapContentsInDummySpanCommand::doUnapply):
119         * editing/htmlediting.cpp:
120         (WebCore::comparePositions):
121         * editing/markup.cpp:
122         (WebCore::highestAncestorToWrapMarkup):
123         * html/FTPDirectoryDocument.cpp:
124         (WebCore::FTPDirectoryDocumentParser::appendEntry):
125         (WebCore::FTPDirectoryDocumentParser::createTDForFilename):
126         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
127         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
128         * html/HTMLMediaElement.cpp:
129         (WebCore::HTMLMediaElement::rewind):
130         (WebCore::HTMLMediaElement::returnToRealtime):
131         (WebCore::HTMLMediaElement::playInternal):
132         (WebCore::HTMLMediaElement::percentLoaded):
133         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
134         (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
135         (WebCore::HTMLMediaElement::applyMediaFragmentURI):
136         * html/HTMLOutputElement.cpp:
137         (WebCore::HTMLOutputElement::setTextContentInternal):
138         * html/HTMLSelectElement.cpp:
139         (WebCore::HTMLSelectElement::remove):
140         * html/HTMLTableElement.cpp:
141         (WebCore::HTMLTableElement::createTHead):
142         (WebCore::HTMLTableElement::deleteTHead):
143         (WebCore::HTMLTableElement::createTFoot):
144         (WebCore::HTMLTableElement::deleteTFoot):
145         (WebCore::HTMLTableElement::createCaption):
146         (WebCore::HTMLTableElement::deleteCaption):
147         * html/HTMLTextAreaElement.cpp:
148         (WebCore::HTMLTextAreaElement::setDefaultValue):
149         * html/ImageDocument.cpp:
150         (WebCore::ImageDocument::createDocumentStructure):
151         * html/InputType.cpp:
152         (WebCore::InputType::stepUpFromRenderer):
153         * html/MediaController.cpp:
154         (MediaController::bringElementUpToSpeed):
155         (MediaController::asyncEventTimerFired):
156         * html/MediaDocument.cpp:
157         (WebCore::MediaDocumentParser::createDocumentStructure):
158         (WebCore::MediaDocument::replaceMediaElementTimerFired):
159         * html/PluginDocument.cpp:
160         (WebCore::PluginDocumentParser::createDocumentStructure):
161         * html/RangeInputType.cpp:
162         (WebCore::RangeInputType::handleKeydownEvent):
163         * html/TimeRanges.cpp:
164         (TimeRanges::contain):
165         (TimeRanges::nearest):
166         * html/canvas/CanvasRenderingContext2D.cpp:
167         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
168         * html/shadow/MediaControlElementTypes.cpp:
169         (WebCore::MediaControlSeekButtonElement::seekTimerFired):
170         * html/shadow/MediaControlElements.cpp:
171         (WebCore::MediaControlPanelElement::setPosition):
172         (WebCore::MediaControlPanelElement::resetPosition):
173         (WebCore::MediaControlStatusDisplayElement::update):
174         (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
175         (WebCore::MediaControlTimelineElement::defaultEventHandler):
176         * html/shadow/MediaControls.cpp:
177         (WebCore::MediaControls::updateCurrentTimeDisplay):
178         (WebCore::MediaControls::createTextTrackDisplay):
179         * html/shadow/MediaControlsApple.cpp:
180         (WebCore::MediaControlsApple::updateCurrentTimeDisplay):
181         * html/shadow/MediaControlsBlackBerry.cpp:
182         (WebCore::MediaControlEmbeddedPanelElement::setPosition):
183         (WebCore::MediaControlEmbeddedPanelElement::resetPosition):
184         (WebCore::MediaControlFullscreenTimelineElement::defaultEventHandler):
185         (WebCore::MediaControlsBlackBerry::updateCurrentTimeDisplay):
186         * html/shadow/MediaControlsChromium.cpp:
187         (WebCore::MediaControlsChromium::updateCurrentTimeDisplay):
188         * html/track/InbandTextTrack.cpp:
189         (WebCore::InbandTextTrack::addGenericCue):
190         * inspector/InspectorCSSAgent.cpp:
191         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
192         * inspector/InspectorHistory.cpp:
193         (WebCore::InspectorHistory::markUndoableState):
194         * inspector/InspectorResourceAgent.cpp:
195         (WebCore::InspectorResourceAgent::replayXHR):
196         * page/ContextMenuController.cpp:
197         (WebCore::ContextMenuController::contextMenuItemSelected):
198         * page/DOMWindow.cpp:
199         (WebCore::didAddStorageEventListener):
200         * page/DragController.cpp:
201         (WebCore::documentFragmentFromDragData):
202         * page/EventHandler.cpp:
203         (WebCore::EventHandler::dispatchDragEvent):
204         (WebCore::EventHandler::keyEvent):
205         (WebCore::EventHandler::handleTextInputEvent):
206         * page/Page.cpp:
207         (WebCore::Page::findStringMatchingRanges):
208         * platform/efl/RenderThemeEfl.cpp:
209         (WebCore::RenderThemeEfl::paintMediaSliderTrack):
210         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
211         (WebCore::MediaPlayerPrivate::percentLoaded):
212         * platform/gtk/RenderThemeGtk.cpp:
213         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
214         * platform/mac/PasteboardMac.mm:
215         (WebCore::Pasteboard::getDataSelection):
216         (WebCore::documentFragmentWithImageResource):
217         (WebCore::Pasteboard::documentFragment):
218         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
219         (-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
220         (-[WebVideoFullscreenHUDWindowController setVolume:]):
221         * platform/qt/RenderThemeQt.cpp:
222         (WebCore::RenderThemeQt::paintMediaSliderTrack):
223         * rendering/RenderNamedFlowThread.cpp:
224         (WebCore::RenderNamedFlowThread::getRanges):
225         * rendering/RenderThemeMac.mm:
226         (WebCore::RenderThemeMac::paintMediaSliderTrack):
227         * svg/SVGTRefElement.cpp:
228         (WebCore::SVGTRefElement::detachTarget):
229         * xml/XMLTreeViewer.cpp:
230         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
231         * xml/parser/XMLDocumentParserLibxml2.cpp:
232         (WebCore::XMLDocumentParser::endElementNs):
233         * xml/parser/XMLDocumentParserQt.cpp:
234         (WebCore::XMLDocumentParser::parseEndElement):
235
236 2013-02-08  Vsevolod Vlasov  <vsevik@chromium.org>
237
238         Web Inspector: Introduce workspace provider/project type, encapsulate uri creation in SimpleWorkspaceProvider.
239         https://bugs.webkit.org/show_bug.cgi?id=109282
240
241         Reviewed by Alexander Pavlov.
242
243         SimpleWorkspaceProvider now fully takes care of creating uri based on project/workspace provider type.
244         This is the first step on the way to project-per-domain mode for non file system project types.
245         Workspace is now partly aware of the possibility that several projects with the same type exist.
246         Drive-by: ScriptsPanel now uses FileMapping to show anchor location properly.
247
248         * inspector/front-end/DefaultScriptMapping.js:
249         (WebInspector.DefaultScriptMapping):
250         (WebInspector.DefaultScriptMapping.prototype.addScript):
251         * inspector/front-end/ExtensionServer.js:
252         (WebInspector.ExtensionServer.prototype._onGetPageResources):
253         * inspector/front-end/FileMapping.js:
254         (WebInspector.FileMapping.prototype.uriForURL):
255         * inspector/front-end/FileSystemWorkspaceProvider.js:
256         (WebInspector.FileSystemWorkspaceProvider.prototype.type):
257         * inspector/front-end/JavaScriptSourceFrame.js:
258         (WebInspector.JavaScriptSourceFrame.prototype._supportsEnabledBreakpointsWhileEditing):
259         * inspector/front-end/LiveEditSupport.js:
260         (WebInspector.LiveEditSupport):
261         (WebInspector.LiveEditSupport.prototype.uiSourceCodeForLiveEdit):
262         * inspector/front-end/ScriptSnippetModel.js:
263         (WebInspector.ScriptSnippetModel):
264         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
265         * inspector/front-end/ScriptsNavigator.js:
266         (WebInspector.ScriptsNavigator.prototype._navigatorViewForUISourceCode):
267         (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
268         (WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet):
269         (WebInspector.SnippetsNavigatorView.prototype._handleRemoveSnippet):
270         * inspector/front-end/ScriptsPanel.js:
271         (WebInspector.ScriptsPanel.prototype._addUISourceCode):
272         (WebInspector.ScriptsPanel.prototype._projectWillReset):
273         (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation):
274         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
275         (WebInspector.ScriptsPanel.prototype.set _fileRenamed):
276         * inspector/front-end/SimpleWorkspaceProvider.js:
277         (WebInspector.SimpleWorkspaceProvider):
278         (WebInspector.SimpleWorkspaceProvider.uriForURL):
279         (WebInspector.SimpleWorkspaceProvider.prototype.type):
280         (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
281         (WebInspector.SimpleWorkspaceProvider.prototype.addUniqueFileForURL):
282         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
283         (WebInspector.SimpleWorkspaceProvider.prototype._uniqueURI):
284         * inspector/front-end/Workspace.js:
285         (WebInspector.WorkspaceProvider.prototype.type):
286         (WebInspector.Project.prototype.type):
287         (WebInspector.Project.prototype.isServiceProject):
288         (WebInspector.Workspace.prototype.uiSourceCodeForOriginURL):
289         (WebInspector.Workspace.prototype.uiSourceCodesForProjectType):
290         (WebInspector.Workspace.prototype.projectsForType):
291         * inspector/front-end/inspector.js:
292
293 2013-02-08  ChangSeok Oh  <shivamidow@gmail.com>
294
295         [GTK][AC] GraphicsLayerClutter doesn't need to recalculate its position after changing anchor position.
296         https://bugs.webkit.org/show_bug.cgi?id=109226
297
298         Reviewed by Gustavo Noronha Silva.
299
300         Clutter has a different coordinate system from mac port's, so we don't need to
301         recalulate GraphicsLayer position after changing its anchor position.
302
303         Covered by existing ac tests.
304
305         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
306         (WebCore::GraphicsLayerClutter::updateGeometry):
307
308 2013-02-08  Mike West  <mkwst@chromium.org>
309
310         Migrate ExceptionCode ASSERTs in IDB to ASSERT_NO_EXCEPTION.
311         https://bugs.webkit.org/show_bug.cgi?id=109266
312
313         Reviewed by Jochen Eisinger.
314
315         The pattern:
316
317             ExceptionCode ec = 0;
318             methodThatGeneratesException(ec);
319             ASSERT(!ec);
320
321         is more clearly and succinctly written as:
322
323             methodThatGeneratesException(ASSERT_NO_EXCEPTION);
324
325         This patch replaces the occurances of the former in IDB code that never
326         touch 'ec' again with the latter. No change in behavior should result
327         from this refactoring.
328
329         * Modules/indexeddb/IDBCursor.cpp:
330         (WebCore::IDBCursor::advance):
331         (WebCore::IDBCursor::continueFunction):
332         (WebCore::IDBCursor::deleteFunction):
333             These methods checked the value of the ExceptionCode without first
334             initializing it to 0. Now the ExceptionCode is explicitly set to 0
335             before doing potentially exception-generating work.
336         (WebCore::IDBCursor::direction):
337         * Modules/indexeddb/IDBObjectStore.cpp:
338         (WebCore):
339         * Modules/indexeddb/IDBTransaction.cpp:
340         (WebCore::IDBTransaction::mode):
341             Replace the above pattern with ASSERT_NO_EXCEPTION.
342
343 2013-02-08  Mike West  <mkwst@chromium.org>
344
345         Migrate ExceptionCode ASSERTs in SVG to ASSERT_NO_EXCEPTION.
346         https://bugs.webkit.org/show_bug.cgi?id=109267
347
348         Reviewed by Jochen Eisinger.
349
350         The pattern:
351
352             ExceptionCode ec = 0;
353             methodThatGeneratesException(ec);
354             ASSERT(!ec);
355
356         is more clearly and succinctly written as:
357
358             methodThatGeneratesException(ASSERT_NO_EXCEPTION);
359
360         This patch replaces the occurances of the former in SVG code that never
361         touch 'ec' again with the latter. No change in behavior should result
362         from this refactoring.
363
364         * svg/SVGLength.cpp:
365         (WebCore::SVGLength::SVGLength):
366         (WebCore::SVGLength::setValue):
367             This method checked the value of the ExceptionCode without first
368             initializing it to 0. Now it initializes before doing potentially
369             exception-generating work.
370         * rendering/style/SVGRenderStyle.h:
371         (WebCore::SVGRenderStyle::initialBaselineShiftValue):
372         (WebCore::SVGRenderStyle::initialKerning):
373         (WebCore::SVGRenderStyle::initialStrokeDashOffset):
374         (WebCore::SVGRenderStyle::initialStrokeWidth):
375         * svg/SVGAnimatedLength.cpp:
376         (WebCore::sharedSVGLength):
377         (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
378         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
379         * svg/SVGAnimatedLengthList.cpp:
380         (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
381         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
382         * svg/SVGTextContentElement.cpp:
383         (WebCore::SVGTextContentElement::textLengthAnimated):
384         * svg/animation/SVGSMILElement.cpp:
385         (WebCore::constructQualifiedName):
386             Replace the above pattern with ASSERT_NO_EXCEPTION.
387
388 2013-02-08  Vsevolod Vlasov  <vsevik@chromium.org>
389
390         Web Inspector: Replace workspace with project in UISourceCode constructor.
391         https://bugs.webkit.org/show_bug.cgi?id=109256
392
393         Reviewed by Alexander Pavlov.
394
395         Replaced workspace with project in UISourceCode constructor since every UISourceCode
396         operation is delegated to project anyway.
397
398         * inspector/front-end/UISourceCode.js:
399         (WebInspector.UISourceCode):
400         (WebInspector.UISourceCode.prototype.project):
401         (WebInspector.UISourceCode.prototype.requestContent):
402         (WebInspector.UISourceCode.prototype.requestOriginalContent):
403         (WebInspector.UISourceCode.prototype._commitContent):
404         (WebInspector.UISourceCode.prototype.searchInContent):
405         * inspector/front-end/Workspace.js:
406         (WebInspector.Project.prototype._fileAdded):
407         (WebInspector.Project.prototype.requestFileContent):
408         (WebInspector.Project.prototype.setFileContent):
409         (WebInspector.Project.prototype.searchInFileContent):
410
411 2013-02-08  Patrick Gansterer  <paroga@webkit.org>
412
413         Build fix for Windows after r141981.
414
415         * platform/network/win/ResourceHandleWin.cpp:
416         (WebCore::ResourceHandle::loadResourceSynchronously):
417
418 2013-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
419
420         Unreviewed, rolling out r141695 and r141697.
421         http://trac.webkit.org/changeset/141695
422         http://trac.webkit.org/changeset/141697
423         https://bugs.webkit.org/show_bug.cgi?id=109279
424
425         broke on-disk buffering for http(s) media (Requested by philn
426         on #webkit).
427
428         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
429         (WebCore::MediaPlayerPrivateGStreamer::load):
430         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
431         (MediaPlayerPrivateGStreamer):
432         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
433         (webKitWebSrcGetProtocols):
434         (webKitWebSrcSetUri):
435
436 2013-02-08  Dan Carney  <dcarney@google.com>
437
438         [v8] isolate parameter added to all v8::peristent calls
439         https://bugs.webkit.org/show_bug.cgi?id=109268
440
441         Reviewed by Kentaro Hara.
442
443         No new tests. No change in functionality.
444
445         * bindings/scripts/CodeGeneratorV8.pm:
446         (GenerateDomainSafeFunctionGetter):
447         (GenerateNamedConstructorCallback):
448         (GenerateImplementation):
449         * bindings/scripts/test/V8/V8Float64Array.cpp:
450         (WebCore::V8Float64Array::GetRawTemplate):
451         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
452         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
453         (WebCore::V8TestActiveDOMObject::GetRawTemplate):
454         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
455         (WebCore::V8TestCustomNamedGetter::GetRawTemplate):
456         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
457         (WebCore::V8TestEventConstructor::GetRawTemplate):
458         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
459         (WebCore::V8TestEventTarget::GetRawTemplate):
460         * bindings/scripts/test/V8/V8TestException.cpp:
461         (WebCore::V8TestException::GetRawTemplate):
462         * bindings/scripts/test/V8/V8TestInterface.cpp:
463         (WebCore::V8TestInterface::GetRawTemplate):
464         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
465         (WebCore::V8TestMediaQueryListListener::GetRawTemplate):
466         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
467         (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
468         (WebCore::V8TestNamedConstructor::GetRawTemplate):
469         * bindings/scripts/test/V8/V8TestNode.cpp:
470         (WebCore::V8TestNode::GetRawTemplate):
471         * bindings/scripts/test/V8/V8TestObj.cpp:
472         (WebCore::V8TestObj::GetRawTemplate):
473         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
474         (WebCore::V8TestOverloadedConstructors::GetRawTemplate):
475         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
476         (WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate):
477         * bindings/v8/DOMWrapperMap.h:
478         (WebCore::DOMWrapperMap::clear):
479         * bindings/v8/DOMWrapperWorld.cpp:
480         (WebCore::isolatedWorldWeakCallback):
481         (WebCore::DOMWrapperWorld::makeContextWeak):
482         * bindings/v8/NPV8Object.cpp:
483         (WebCore::freeV8NPObject):
484         (WebCore::npCreateV8ScriptObject):
485         * bindings/v8/ScheduledAction.cpp:
486         (WebCore::ScheduledAction::ScheduledAction):
487         (WebCore::ScheduledAction::~ScheduledAction):
488         * bindings/v8/ScopedPersistent.h:
489         (WebCore::ScopedPersistent::ScopedPersistent):
490         (WebCore::ScopedPersistent::set):
491         (WebCore::ScopedPersistent::clear):
492         * bindings/v8/ScriptWrappable.h:
493         (WebCore::ScriptWrappable::setWrapper):
494         (WebCore::ScriptWrappable::disposeWrapper):
495         (WebCore::ScriptWrappable::weakCallback):
496         * bindings/v8/V8Binding.cpp:
497         (WebCore::createRawTemplate):
498         * bindings/v8/V8Binding.h:
499         (WebCore):
500         * bindings/v8/V8GCController.cpp:
501         (WebCore::gcTree):
502         (WebCore::V8GCController::gcPrologue):
503         (WebCore::V8GCController::minorGCPrologue):
504         * bindings/v8/V8GCController.h:
505         (V8GCController):
506         * bindings/v8/V8HiddenPropertyName.cpp:
507         (WebCore::V8HiddenPropertyName::createString):
508         * bindings/v8/V8LazyEventListener.cpp:
509         (WebCore::V8LazyEventListener::prepareListenerObject):
510         * bindings/v8/V8NPObject.cpp:
511         (WebCore::V8NPTemplateMap::dispose):
512         (WebCore::npObjectGetProperty):
513         (WebCore::createV8ObjectForNPObject):
514         * bindings/v8/V8PerContextData.cpp:
515         (WebCore::V8PerContextData::dispose):
516         (WebCore::V8PerContextData::createWrapperFromCacheSlowCase):
517         (WebCore::V8PerContextData::constructorForTypeSlowCase):
518         * bindings/v8/V8ValueCache.cpp:
519         (WebCore::makeExternalString):
520         * bindings/v8/WrapperTypeInfo.h:
521         (WebCore::WrapperConfiguration::configureWrapper):
522         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
523         (WebCore::V8HTMLDocument::wrapInShadowObject):
524         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
525         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
526         * bindings/v8/custom/V8InjectedScriptManager.cpp:
527         (WebCore::WeakReferenceCallback):
528         (WebCore::createInjectedScriptHostV8Wrapper):
529         * bindings/v8/custom/V8LocationCustom.cpp:
530         (WebCore::V8Location::reloadAccessorGetter):
531         (WebCore::V8Location::replaceAccessorGetter):
532         (WebCore::V8Location::assignAccessorGetter):
533
534 2013-02-08  Kent Tamura  <tkent@chromium.org>
535
536         Adjust usage of ENABLE flags to enable whole content
537         https://bugs.webkit.org/show_bug.cgi?id=109270
538
539         Reviewed by Eric Seidel.
540
541         Our common usage of ENABLE flags to enable whole content of files is:
542
543         For .cpp files:
544           #include "config.h"
545           #if ENABLE(FOOBAR)
546           #include "FooBar.h"
547
548         For .h files:
549           #ifndef FooBar_h
550           #define FooBar_h
551           #if ENABLE(FOOBAR)
552
553         Fix files which have uncommon usage, and fix CodeGeneratorV8.pm so that
554         it generates the common pattern. Note that CodeGeneratorJS.pm already
555         generates code in this order.
556
557         * bindings/scripts/CodeGeneratorV8.pm:
558         (GenerateHeaderContentHeader):
559         (GenerateImplementationContentHeader):
560         * bindings/scripts/test/V8/V8TestCallback.cpp:
561         * bindings/scripts/test/V8/V8TestCallback.h:
562         * bindings/scripts/test/V8/V8TestInterface.cpp:
563         * bindings/scripts/test/V8/V8TestInterface.h:
564         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
565         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
566         * html/BaseMultipleFieldsDateAndTimeInputType.h:
567         * html/ColorInputType.cpp:
568         * html/ColorInputType.h:
569         * html/DateInputType.cpp:
570         * html/DateTimeInputType.cpp:
571         * html/DateTimeInputType.h:
572         * html/DateTimeLocalInputType.cpp:
573         * html/HTMLAudioElement.cpp:
574         * html/HTMLAudioElement.h:
575         * html/HTMLDataListElement.cpp:
576         * html/HTMLDialogElement.cpp:
577         * html/HTMLDialogElement.h:
578         * html/HTMLMediaElement.cpp:
579         * html/HTMLMediaElement.h:
580         * html/HTMLMeterElement.cpp:
581         * html/HTMLProgressElement.cpp:
582         * html/HTMLSourceElement.cpp:
583         * html/HTMLSourceElement.h:
584         * html/HTMLTrackElement.cpp:
585         * html/HTMLTrackElement.h:
586         * html/HTMLVideoElement.cpp:
587         * html/HTMLVideoElement.h:
588         * html/MonthInputType.cpp:
589         * html/TimeInputType.cpp:
590         * html/WeekInputType.cpp:
591         * html/shadow/DateTimeFieldElement.h:
592         * html/shadow/DetailsMarkerControl.cpp:
593         * html/shadow/MeterShadowElement.cpp:
594         * html/shadow/ProgressShadowElement.cpp:
595         * rendering/RenderDetailsMarker.cpp:
596         * rendering/RenderInputSpeech.cpp:
597         * rendering/RenderMeter.cpp:
598         * rendering/RenderProgress.cpp:
599
600 2013-02-08  Mike West  <mkwst@chromium.org>
601
602         Replace ExceptionCode assertions with ASSERT_NO_EXCEPTION macro.
603         https://bugs.webkit.org/show_bug.cgi?id=109044
604
605         Reviewed by Darin Adler.
606
607         The pattern:
608
609             ExceptionCode ec = 0;
610             methodThatGeneratesException(ec);
611             ASSERT(!ec);
612
613         is more clearly and succinctly written as:
614
615             methodThatGeneratesException(ASSERT_NO_EXCEPTION);
616
617         This patch replaces the occurances of the former that never touch 'ec'
618         again with the latter. It does the same for 'ASSERT(ec == 0);' (and, as
619         a drive-by, replaces 'ASSERT(ec == 0)' with 'ASSERT(!ec)' in places
620         where it does indeed matter that 'ec' get set properly.
621
622         No change in behavior should result from this refactoring.
623
624         * dom/ContainerNode.cpp:
625         (WebCore::ContainerNode::takeAllChildrenFrom):
626         * dom/Document.cpp:
627         (WebCore::Document::setTitle):
628         * dom/MessagePort.cpp:
629         (WebCore::MessagePort::dispatchMessages):
630         (WebCore::MessagePort::disentanglePorts):
631         * editing/DeleteButtonController.cpp:
632         (WebCore::enclosingDeletableElement):
633         (WebCore::DeleteButtonController::createDeletionUI):
634             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
635         (WebCore::DeleteButtonController::show):
636             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
637         * editing/EditorCommand.cpp:
638         (WebCore::unionDOMRanges):
639         * editing/ReplaceNodeWithSpanCommand.cpp:
640         (WebCore::swapInNodePreservingAttributesAndChildren):
641         * editing/ReplaceSelectionCommand.cpp:
642         (WebCore::ReplacementFragment::ReplacementFragment):
643         (WebCore::ReplacementFragment::removeNode):
644         (WebCore::ReplacementFragment::insertNodeBefore):
645         (WebCore::ReplacementFragment::insertFragmentForTestRendering):
646         (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
647         (WebCore::ReplaceSelectionCommand::insertAsListItems):
648         * editing/SplitTextNodeCommand.cpp:
649         (WebCore::SplitTextNodeCommand::doUnapply):
650         * editing/TextIterator.cpp:
651         (WebCore::CharacterIterator::range):
652         (WebCore::BackwardsCharacterIterator::range):
653         (WebCore::TextIterator::rangeFromLocationAndLength):
654         (WebCore::collapsedToBoundary):
655         * editing/htmlediting.cpp:
656         (WebCore::createTabSpanElement):
657         * editing/mac/EditorMac.mm:
658         (WebCore::Editor::fontForSelection):
659         (WebCore::Editor::fontAttributesForSelectionStart):
660         * editing/markup.cpp:
661         (WebCore::createMarkup):
662         (WebCore::trimFragment):
663         (WebCore::createFragmentFromMarkupWithContext):
664         (WebCore::fillContainerFromString):
665         (WebCore::createFragmentFromText):
666         (WebCore::createFragmentFromNodes):
667         * html/ColorInputType.cpp:
668         (WebCore::ColorInputType::createShadowSubtree):
669             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
670         * html/HTMLOptionsCollection.cpp:
671         (WebCore::HTMLOptionsCollection::add):
672             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
673         * html/HTMLTextAreaElement.cpp:
674         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
675         * html/HTMLTextFormControlElement.cpp:
676         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
677         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
678         * html/TextFieldInputType.cpp:
679         (WebCore::TextFieldInputType::updatePlaceholderText):
680         * html/ValidationMessage.cpp:
681         (WebCore::ValidationMessage::buildBubbleTree):
682         * html/shadow/MediaControlElementTypes.cpp:
683         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
684         * inspector/InspectorPageAgent.cpp:
685         (WebCore::InspectorPageAgent::getCookies):
686         * inspector/InspectorStyleSheet.cpp:
687         (WebCore::InspectorStyleSheet::addRule):
688         * loader/appcache/ApplicationCacheHost.cpp:
689         (WebCore::ApplicationCacheHost::dispatchDOMEvent):
690         * page/DOMSelection.cpp:
691         (WebCore::DOMSelection::deleteFromDocument):
692         * page/DragController.cpp:
693         (WebCore::prepareClipboardForImageDrag):
694         * rendering/RenderTextControl.cpp:
695         (WebCore::RenderTextControl::visiblePositionForIndex):
696             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
697
698 2013-02-08  Alexei Filippov  <alph@chromium.org>
699
700         Web Inspector: disable profile type switching while profile in progress
701         https://bugs.webkit.org/show_bug.cgi?id=109178
702
703         Reviewed by Yury Semikhatsky.
704
705         Disables profile type selection controls when a profiling session
706         is in progress.
707
708         * inspector/front-end/HeapSnapshotView.js:
709         (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
710         * inspector/front-end/ProfileLauncherView.js:
711         (WebInspector.ProfileLauncherView.prototype._updateControls):
712         * inspector/front-end/ProfilesPanel.js:
713         (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
714
715 2013-02-08  Ilya Tikhonovsky  <loislo@chromium.org>
716
717         Web Inspector: Native Memory Instrumentation: adjust chunk transfer size for better speed.
718         https://bugs.webkit.org/show_bug.cgi?id=109263
719
720         Reviewed by Yury Semikhatsky.
721
722         The chunk size is changed from 100 to 10000.
723         addString counts only first 256 symbols of the string.o
724
725         * inspector/HeapGraphSerializer.cpp:
726         (WebCore::HeapGraphSerializer::pushUpdateIfNeeded):
727         (WebCore::HeapGraphSerializer::addString):
728         * inspector/front-end/NativeMemorySnapshotView.js:
729
730 2013-02-08  Kentaro Hara  <haraken@chromium.org>
731
732         Support a relatedTarget attribute on focus/blur events
733         https://bugs.webkit.org/show_bug.cgi?id=109176
734
735         Reviewed by Ojan Vafai.
736
737         In bug 76216, we supported a relatedTarget attribute on
738         focusin/focusout events. We should also support it on focus/blur events.
739
740         See http://lists.w3.org/Archives/Public/www-dom/2012OctDec/0061.html
741         for the www-dom discussion.
742
743         Test: fast/dom/shadow/shadow-boundary-events.html
744               fast/events/related-target-focusevent.html
745
746         * dom/EventDispatchMediator.cpp:
747         (WebCore::FocusEventDispatchMediator::create):
748         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
749         (WebCore::BlurEventDispatchMediator::create):
750         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
751         * dom/EventDispatchMediator.h:
752         (FocusEventDispatchMediator):
753         (BlurEventDispatchMediator):
754         * dom/Node.cpp:
755         (WebCore::Node::dispatchFocusInEvent):
756         (WebCore::Node::dispatchFocusOutEvent):
757         (WebCore::Node::dispatchFocusEvent):
758         (WebCore::Node::dispatchBlurEvent):
759
760 2013-02-07  Yury Semikhatsky  <yurys@chromium.org>
761
762         Web Inspector: reduce number of native memory instrumentation categories
763         https://bugs.webkit.org/show_bug.cgi?id=109146
764
765         Reviewed by Pavel Feldman.
766
767         Merged some of memory instrumentation categories.
768
769         * dom/WebCoreMemoryInstrumentation.cpp:
770         (WebCore):
771         * inspector/front-end/NativeMemorySnapshotView.js:
772         (WebInspector.MemoryBlockViewProperties._initialize):
773         * platform/PlatformMemoryInstrumentation.cpp:
774         (WebCore):
775
776 2013-02-07  Mike West  <mkwst@chromium.org>
777
778         <iframe seamless> should avoid vertical scrollbars during the initial layout passes.
779         https://bugs.webkit.org/show_bug.cgi?id=87707
780
781         Reviewed by Eric Seidel.
782
783         Seamless documents currently render incorrectly when their content fills
784         the width of the container into which they're placed. Because FrameView
785         assumes that the container's size is properly set before the first pass
786         of layout, vertical scrollbars are incorrectly forced onto seamless
787         content, because seamless sets the container's height to 0 before
788         handing it off to FrameView for layout. The scrollbars make the
789         available width for the seamless document ~15px smaller than it should
790         be, resulting in content getting bumped to the next line.
791
792         This patch special-cases FrameView::calculateScrollbarModesForLayout in
793         order to force scrollbars off for seamless documents with a full visible
794         height of 0px. Once the layout pass has grabbed the content height and
795         applied it to the visible height, scrollbars will again be applicable.
796
797         The change should be covered by rebaselines for the newly-passing
798         results in fast/frame/seamless-{float,inline}.html
799
800         * page/FrameView.cpp:
801         (WebCore::FrameView::calculateScrollbarModesForLayout):
802             If we're rendering a seamless document, and the full visible height
803             is 0, and the vertical scrollbar would otherwise be ScrollbarAuto,
804             then force ScrollbarAlwaysOff.
805
806 2013-02-07  Kent Tamura  <tkent@chromium.org>
807
808         document.activeElement should not return a non-focusable element
809         https://bugs.webkit.org/show_bug.cgi?id=86707
810
811         Reviewed by Hajime Morita.
812
813         This is based on a patch by Arpita Bahuguna.
814
815         Test: fast/dom/HTMLDocument/set-focus-on-valid-element.html
816
817         * dom/Document.cpp:
818         (WebCore::Document::setFocusedNode):
819         Added check for verifying that the node to be focused is
820         focusable. However, this check should be skipped for HTMLPlugInElement
821         because it has special behavior.
822
823 2013-02-07  Vladislav Kaznacheev  <kaznacheev@chromium.org>
824
825         Web Inspector: Fix front-end compilation warnings related to WebInspector.SidebarPane
826         https://bugs.webkit.org/show_bug.cgi?id=109259
827
828         Reviewed by Vsevolod Vlasov.
829
830         * inspector/front-end/DOMBreakpointsSidebarPane.js:
831         (WebInspector.DOMBreakpointsSidebarPane.Proxy):
832         * inspector/front-end/SidebarPane.js:
833
834 2013-02-07  Kentaro Hara  <haraken@chromium.org>
835
836         [V8] enum V8HiddenPropertyCreationType is not used
837         https://bugs.webkit.org/show_bug.cgi?id=109250
838
839         Reviewed by Adam Barth.
840
841         V8HiddenPropertyCreationType is always NewSymbol. We can remove the enum.
842
843         No tests. No change in behavior.
844
845         * bindings/v8/V8HiddenPropertyName.cpp:
846         (WebCore::hiddenReferenceName):
847         * bindings/v8/V8HiddenPropertyName.h:
848         (WebCore):
849
850 2013-02-07  Sheriff Bot  <webkit.review.bot@gmail.com>
851
852         Unreviewed, rolling out r142212.
853         http://trac.webkit.org/changeset/142212
854         https://bugs.webkit.org/show_bug.cgi?id=109255
855
856         Causes ASSERT(!m_installed) on launch (Requested by smfr on
857         #webkit).
858
859         * WebCore.exp.in:
860         * platform/MemoryPressureHandler.cpp:
861         (WebCore):
862         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
863         * platform/MemoryPressureHandler.h:
864         (MemoryPressureHandler):
865         * platform/mac/MemoryPressureHandlerMac.mm:
866         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
867
868 2013-02-07  Hanyee Kim  <choco@company100.net>
869
870         NamedFlowCollection should be a ContextDestructionObserver
871         https://bugs.webkit.org/show_bug.cgi?id=99239
872
873         Reviewed by Adam Barth
874
875         This patch removes the raw pointer of Document in NamedFlowCollection.
876         It could be replaced with ContextDestructionObserver.
877         ContextDestructionObserver has the pointer and clears the pointer
878         automatically when the document is destroyed. 
879
880         * dom/Document.cpp:
881         (WebCore::Document::~Document):
882         * dom/NamedFlowCollection.cpp:
883         (WebCore::NamedFlowCollection::NamedFlowCollection):
884         (WebCore::NamedFlowCollection::ensureFlowWithName):
885         (WebCore::NamedFlowCollection::discardNamedFlow):
886         (WebCore::NamedFlowCollection::document):
887         (WebCore):
888         * dom/NamedFlowCollection.h:
889         (NamedFlowCollection):
890
891 2013-02-07  Dean Jackson  <dino@apple.com>
892
893         Followup review suggestions from Alexey Proskuryakov on
894         https://bugs.webkit.org/show_bug.cgi?id=109215
895
896         Don't provide a charset on embedded SVG, especially
897         with incorrect syntax :)
898
899         * css/mediaControlsQuickTime.css:
900         (video::-webkit-media-controls-toggle-closed-captions-button):
901         (video::-webkit-media-controls-closed-captions-track-list li.selected):
902         (video::-webkit-media-controls-closed-captions-track-list li.selected:hover):
903
904 2013-02-07  Seulgi Kim  <seulgikim@company100.net>
905
906         [Gtk] RunLoop::run shuold run current thread's run loop.
907         https://bugs.webkit.org/show_bug.cgi?id=107887
908
909         Reviewed by Martin Robinson.
910
911         Currently, RunLoop in Gtk can use just main thread's event loop.
912         But the other ports are implemented to use RunLoop in sub threads.
913
914         This patch makes RunLoop constructor create new context, not use default
915         context.
916         But in the main thread still uses default context to use main event loop
917         since there is some codes using glib directly (e.g. in
918         LayerTreeHostGtk::scheduleLayerFlush).
919
920         No new tests. There is no case that uses RunLoop in off the main thread
921         yet.
922
923         * platform/gtk/RunLoopGtk.cpp:
924         (WebCore::RunLoop::RunLoop):
925         (WebCore::RunLoop::run):
926
927 2013-02-07  Kentaro Hara  <haraken@chromium.org>
928
929         [V8] Move V8DOMWrapper::setNamedHiddenReference() to V8HiddenPropertyName.h
930         https://bugs.webkit.org/show_bug.cgi?id=109186
931
932         Reviewed by Adam Barth.
933
934         V8HiddenPropertyName.h is a right place for setNamedHiddenReference().
935
936         No tests. No change in behavior.
937
938         * bindings/scripts/CodeGeneratorV8.pm:
939         (GenerateNormalAttrGetter):
940         * bindings/scripts/test/V8/V8TestObj.cpp:
941         (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter):
942         * bindings/v8/V8DOMWrapper.cpp:
943         * bindings/v8/V8DOMWrapper.h:
944         (V8DOMWrapper):
945         * bindings/v8/V8HiddenPropertyName.cpp:
946         (WebCore::V8HiddenPropertyName::hiddenReferenceName):
947         (WebCore::V8HiddenPropertyName::setNamedHiddenReference):
948         (WebCore):
949         * bindings/v8/V8HiddenPropertyName.h:
950         (V8HiddenPropertyName):
951         (WebCore::V8HiddenPropertyName::V8HiddenPropertyName):
952         * bindings/v8/custom/V8MessageChannelCustom.cpp:
953         (WebCore::V8MessageChannel::constructorCallbackCustom):
954         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
955         (WebCore::toV8Object):
956
957 2013-02-07  Elliott Sprehn  <esprehn@chromium.org>
958
959         getComputedStyle() doesn't report intermediate values during a transition of a pseudo element
960         https://bugs.webkit.org/show_bug.cgi?id=106535
961
962         Reviewed by Ojan Vafai.
963
964         Element::computedStyle and CSSComputedStyleDeclaration::getPropertyCSSValue
965         should use the PseudoElement and it's renderer if they exist so that
966         querying the computed style while an animation is running returns
967         the intermediate values.
968
969         No new tests, updated existing tests.
970
971         * css/CSSComputedStyleDeclaration.cpp:
972         (WebCore::CSSComputedStyleDeclaration::styledNode): Added, returns either the PseudoElement or the Node.
973         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Updated to use styledNode.
974         * css/CSSComputedStyleDeclaration.h:
975         (CSSComputedStyleDeclaration):
976         * dom/Element.cpp:
977         (WebCore::Element::computedStyle): Check the PseudoElement, not just the cached pseudo style.
978         * dom/ElementRareData.h:
979         (WebCore::ElementRareData::pseudoElement): Remove ASSERT_NOT_REACHED so passing other pseudos returns 0.
980
981 2013-02-07  Mark Lam  <mark.lam@apple.com>
982
983         Add a comment about how the SQLTransaction state machine works.
984         https://bugs.webkit.org/show_bug.cgi?id=109243.
985
986         Rubber stamped by Anders Carlsson.
987
988         No new tests.
989
990         * Modules/webdatabase/SQLTransactionBackend.cpp:
991
992 2013-02-06  Gavin Barraclough  <barraclough@apple.com>
993
994         PluginProcess should quit immediately if idle in response to low-memory notifications
995         https://bugs.webkit.org/show_bug.cgi?id=109103
996         <rdar://problem/12679827>
997
998         Reviewed by Darin Adler.
999
1000         This patch allows a process to set a custom callback for low memory warnings
1001         (defaulting to the current behaviour, as implemented in releaseMemory).
1002
1003         MemoryPressureHandler::install is currently used for two purposes - it is
1004         called when first initializing a low memory handler for a process, and also
1005         used to reinstall the handler (on a delay) after the notification has occured.
1006         Since reinstallation doesn't change the callback, split these behaviours out -
1007         MemoryPressureHandler::initialize is added to initialization, and accepts a
1008         custom callback, install in made private.
1009
1010         * WebCore.exp.in:
1011             - Added export for releaseMemory.
1012         * platform/MemoryPressureHandler.cpp:
1013         (WebCore::MemoryPressureHandler::releaseMemory):
1014             - Added null implementation for non-Mac builds.
1015         * platform/MemoryPressureHandler.h:
1016         (WebCore::MemoryPressureHandler::initialize):
1017             - distinguish initialization from reinstallations, allow handler to be set.
1018         (MemoryPressureHandler):
1019             - Added m_lowMemoryHandler function pointer member variable.
1020         * platform/mac/MemoryPressureHandlerMac.mm:
1021         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1022             - Call m_lowMemoryHandler instead of releaseMemory.
1023
1024 2013-02-07  Kentaro Hara  <haraken@chromium.org>
1025
1026         [V8] #ifndef NDEBUG is redundant for assertContextHasCorrectPrototype()
1027         https://bugs.webkit.org/show_bug.cgi?id=109167
1028
1029         Reviewed by Andreas Kling.
1030
1031         Given that assertContextHasCorrectPrototype() is anyway empty in a release
1032         build, we don't need to surround it with #ifndef NDEBUG.
1033
1034         No tests. No change in behavior.
1035
1036         * bindings/v8/DOMWrapperWorld.cpp:
1037         (WebCore::DOMWrapperWorld::assertContextHasCorrectPrototype):
1038         * bindings/v8/DOMWrapperWorld.h:
1039         (DOMWrapperWorld):
1040         (WebCore::DOMWrapperWorld::isolated):
1041
1042 2013-02-07  Alexei Svitkine  <asvitkine@chromium.org>
1043
1044         Chromium: Hang parsing bidi control chars on Mac OS X 10.6
1045         https://bugs.webkit.org/show_bug.cgi?id=108877
1046
1047         This was broken a while ago by:
1048             https://bugs.webkit.org/show_bug.cgi?id=83045
1049
1050         On 10.6, CoreText will not produce any runs covering the
1051         Unicode BiDi RTL mark control char, which causes an infinite
1052         loop in ComplexTextController::indexOfCurrentRun() due to no
1053         run covering the character at offset 0.
1054
1055         This patch fixes that issue by finding the earliest run
1056         explicitly via the minimum stringBegin() index instead of
1057         relying on a run existing that covers offset 0.
1058
1059         Fixes hang on many BiDi wikipedia pages on Chromium/Mac10.6.
1060         Chromium bug: http://crbug.com/167844
1061
1062         New test in the same style as the harfbuzz-buffer-overrun.html
1063         test (in the same folder).
1064
1065         Reviewed by Eric Seidel.
1066
1067         Test: fast/text/international/rtl-mark.html
1068
1069         * platform/graphics/mac/ComplexTextController.cpp:
1070         (WebCore::ComplexTextController::indexOfCurrentRun):
1071
1072 2013-02-07  Kentaro Hara  <haraken@chromium.org>
1073
1074         Implement FocusEvent constructor
1075         https://bugs.webkit.org/show_bug.cgi?id=109170
1076
1077         Reviewed by Adam Barth.
1078
1079         Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
1080
1081         FocusEvent constructor should be implemented under a DOM4_EVENTS_CONSTRUCTOR
1082         flag, which is enabled on Chromium and Safari.
1083
1084         Test: fast/events/constructors/focus-event-constructor.html
1085
1086         * dom/FocusEvent.cpp:
1087         (WebCore::FocusEventInit::FocusEventInit):
1088         (WebCore):
1089         (WebCore::FocusEvent::FocusEvent):
1090         * dom/FocusEvent.h:
1091         (FocusEventInit):
1092         (WebCore):
1093         (WebCore::FocusEvent::create):
1094         (FocusEvent):
1095         * dom/FocusEvent.idl:
1096         * page/DOMWindow.idl:
1097
1098 2013-02-07  Elliott Sprehn  <esprehn@chromium.org>
1099
1100         HTML parser should queue MutationRecords for its operations
1101         https://bugs.webkit.org/show_bug.cgi?id=89351
1102
1103         Reviewed by Eric Seidel.
1104
1105         Generate mutation records inside the parser. This is done by using a
1106         ChildListMutationScope in the ContainerNode::parser* methods and then
1107         adding delivery before each <script> element would be processed by
1108         the parser.
1109
1110         Test: fast/dom/MutationObserver/parser-mutations.html
1111
1112         * dom/ContainerNode.cpp:
1113         (WebCore::ContainerNode::takeAllChildrenFrom):
1114         (WebCore::ContainerNode::parserInsertBefore):
1115         (WebCore::ContainerNode::parserRemoveChild):
1116         (WebCore::ContainerNode::parserAppendChild):
1117         * html/parser/HTMLScriptRunner.cpp:
1118         (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
1119         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1120         (WebCore::HTMLScriptRunner::execute):
1121         (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
1122         (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets):
1123         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
1124         (WebCore::HTMLScriptRunner::runScript):
1125
1126 2013-02-07  Kentaro Hara  <haraken@chromium.org>
1127
1128         Fix FIXMEs in WindowFeatures.h
1129         https://bugs.webkit.org/show_bug.cgi?id=109151
1130
1131         Reviewed by Adam Barth.
1132
1133         1. // FIXME: We can delete this constructor once V8 showModalDialog is
1134            // changed to use DOMWindow.
1135
1136         This FIXME is not right. The WindowFeatures() constructor is used by
1137         other ports too (e.g. WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp).
1138         So we should remove the FIXME.
1139
1140         2. // FIXME: We can make these functions private non-member functions
1141            // once V8 showModalDialog is changed to use DOMWindow.
1142
1143         Given that V8 now uses DOMWindow in showModalDialog(), we can make the
1144         methods private.
1145
1146         No tests. No change in behavior.
1147
1148         * page/WindowFeatures.h:
1149         (WebCore):
1150         (WebCore::WindowFeatures::WindowFeatures):
1151         (WindowFeatures):
1152
1153 2013-02-07  Adam Barth  <abarth@webkit.org>
1154
1155         fast/parser/document-write-noscript.html fails for threaded HTML parser
1156         https://bugs.webkit.org/show_bug.cgi?id=109237
1157
1158         Reviewed by Eric Seidel.
1159
1160         If there are multiple calls to document.write in an external script, we
1161         need to wait for them all to complete before invalidating the
1162         speculative tokens. Instead of doing this when we unwind the
1163         document.write call stack, we do this when we're about to resume
1164         parsing after script execution.
1165
1166         Test: fast/parser/document-write-basic.html
1167
1168         * html/parser/HTMLDocumentParser.cpp:
1169         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
1170         (WebCore::HTMLDocumentParser::insert):
1171         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
1172
1173 2013-02-07  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
1174
1175         Fix build when compiling with css3-text and css3-conditional-rules feature flags enabled.
1176         https://bugs.webkit.org/show_bug.cgi?id=109217
1177
1178         Reviewed by Benjamin Poulain.
1179
1180         * css/InspectorCSSOMWrappers.cpp:
1181         (WebCore::InspectorCSSOMWrappers::collect):
1182
1183 2013-02-07  Keishi Hattori  <keishi@webkit.org>
1184
1185         REGRESSION (r140778): Calendar Picker doesn't open when the element has the required attribute
1186         https://bugs.webkit.org/show_bug.cgi?id=109136
1187
1188         Reviewed by Kent Tamura.
1189
1190         Calendar picker was using the "Clear" button to calculate the window width.
1191         Since it doesn't exist when the input element has a required attribute,
1192         it was throwing an error. This patch fixes the width calculating logic.
1193
1194         Tests: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required-ar.html
1195                platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required.html
1196
1197         * Resources/pagepopups/calendarPicker.css:
1198         (.today-clear-area):
1199         * Resources/pagepopups/calendarPicker.js:
1200         (CalendarPicker.prototype.fixWindowSize): Fixing the logic to calculate
1201         the width. We don't want to use clear button because it doesn't exist
1202         when a value is required.
1203
1204 2013-02-07  Terry Anderson  <tdanderson@chromium.org>
1205
1206         Non-scrollable divs and non-scrollable iframes can scroll with touch
1207         https://bugs.webkit.org/show_bug.cgi?id=109087
1208
1209         Reviewed by Eric Seidel.
1210
1211         Tests: fast/events/touch/gesture/touch-gesture-noscroll-div.html
1212                fast/events/touch/gesture/touch-gesture-noscroll-iframe.html
1213
1214         When finding a candidate for a scrollable node in
1215         EventHandler::handleGestureScrollUpdate(), select the document node
1216         if it is reached before any scrollable element when walking up the DOM
1217         tree. Also ensure that calling RenderLayer::scrollBy() for a document
1218         node does not result in scrolling if the element is not scrollable.
1219
1220         * page/EventHandler.cpp:
1221         (WebCore::closestScrollableNodeCandidate):
1222         (WebCore::EventHandler::handleGestureScrollUpdate):
1223         * rendering/RenderLayer.cpp:
1224         (WebCore::RenderLayer::scrollBy):
1225
1226 2013-02-07  Mark Lam  <mark.lam@apple.com>
1227
1228         Introduce SQLTransactionBackend and SQLTransactionBackendSync [Part 2].
1229         https://bugs.webkit.org/show_bug.cgi?id=109109.
1230
1231         Reviewed by Anders Carlsson.
1232
1233         Adding back the new SQLTransaction and SQLTransactionSync files.
1234
1235         No new tests.
1236
1237         * Modules/webdatabase/SQLTransaction.cpp: Added.
1238         (WebCore::SQLTransaction::create):
1239         (WebCore::SQLTransaction::SQLTransaction):
1240         (WebCore::SQLTransaction::from):
1241         * Modules/webdatabase/SQLTransaction.h: Added.
1242         (SQLTransaction):
1243         * Modules/webdatabase/SQLTransactionSync.cpp: Added.
1244         (WebCore::SQLTransactionSync::create):
1245         (WebCore::SQLTransactionSync::SQLTransactionSync):
1246         (WebCore::SQLTransactionSync::from):
1247         * Modules/webdatabase/SQLTransactionSync.h: Added.
1248         (SQLTransactionSync):
1249
1250 2013-02-07  Mark Lam  <mark.lam@apple.com>
1251
1252         Introduce SQLTransactionBackend and SQLTransactionBackendSync.
1253         https://bugs.webkit.org/show_bug.cgi?id=109109.
1254
1255         Reviewed by Anders Carlsson.
1256
1257         - Renamed SQLTransaction and SQLTransactionSync to SQLTransactionBackend
1258           and SQLTransactionBackendSync respectively.
1259         - Added back SQLTransaction and SQLTransactionSync as new files, and have
1260           their classes extends their respective backends. This is a stop gap
1261           measure to keep things working until the front-end and back-end can be
1262           properly split.
1263           Note: these files will be committed in a subsequent commit to ensure
1264           that the patching goes smoothly.
1265         - Where needed, I made use of new SQLTransaction::from() and
1266           SQLTransactionSync::from() static methods that "get" the front-end
1267           transactions from the back-ends. This is also a stop gap measure to
1268           keep things working until the proper refactoring is complete.
1269         - Fixed up pre-existing style checker violations that are now detected
1270           on code that were touched during my renaming.
1271         - Added the back-end files to all the build files.
1272
1273         No new tests.
1274
1275         * CMakeLists.txt:
1276         * GNUmakefile.list.am:
1277         * Modules/webdatabase/Database.cpp:
1278         (WebCore::Database::scheduleTransactionStep):
1279         * Modules/webdatabase/Database.h:
1280         (Database):
1281         * Modules/webdatabase/DatabaseBackend.h:
1282         (DatabaseBackend):
1283         * Modules/webdatabase/DatabaseTask.cpp:
1284         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::DatabaseTransactionTask):
1285         * Modules/webdatabase/DatabaseTask.h:
1286         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::create):
1287         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::transaction):
1288         (DatabaseBackendAsync::DatabaseTransactionTask):
1289         * Modules/webdatabase/SQLTransaction.cpp: Removed.
1290         * Modules/webdatabase/SQLTransaction.h: Removed.
1291         * Modules/webdatabase/SQLTransactionBackend.cpp: Copied from Source/WebCore/Modules/webdatabase/SQLTransaction.cpp.
1292         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
1293         (WebCore::SQLTransactionBackend::~SQLTransactionBackend):
1294         (WebCore::SQLTransactionBackend::executeSQL):
1295         (WebCore::SQLTransactionBackend::enqueueStatement):
1296         (WebCore::SQLTransactionBackend::debugStepName):
1297         (WebCore::SQLTransactionBackend::checkAndHandleClosedOrInterruptedDatabase):
1298         (WebCore::SQLTransactionBackend::performNextStep):
1299         (WebCore::SQLTransactionBackend::performPendingCallback):
1300         (WebCore::SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown):
1301         (WebCore::SQLTransactionBackend::acquireLock):
1302         (WebCore::SQLTransactionBackend::lockAcquired):
1303         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
1304         (WebCore::SQLTransactionBackend::deliverTransactionCallback):
1305         (WebCore::SQLTransactionBackend::scheduleToRunStatements):
1306         (WebCore::SQLTransactionBackend::runStatements):
1307         (WebCore::SQLTransactionBackend::getNextStatement):
1308         (WebCore::SQLTransactionBackend::runCurrentStatement):
1309         (WebCore::SQLTransactionBackend::handleCurrentStatementError):
1310         (WebCore::SQLTransactionBackend::deliverStatementCallback):
1311         (WebCore::SQLTransactionBackend::deliverQuotaIncreaseCallback):
1312         (WebCore::SQLTransactionBackend::postflightAndCommit):
1313         (WebCore::SQLTransactionBackend::deliverSuccessCallback):
1314         (WebCore::SQLTransactionBackend::cleanupAfterSuccessCallback):
1315         (WebCore::SQLTransactionBackend::handleTransactionError):
1316         (WebCore::SQLTransactionBackend::deliverTransactionErrorCallback):
1317         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
1318         * Modules/webdatabase/SQLTransactionBackend.h: Copied from Source/WebCore/Modules/webdatabase/SQLTransaction.h.
1319         (SQLTransactionBackend):
1320         * Modules/webdatabase/SQLTransactionBackendSync.cpp: Copied from Source/WebCore/Modules/webdatabase/SQLTransactionSync.cpp.
1321         (WebCore::SQLTransactionBackendSync::SQLTransactionBackendSync):
1322         (WebCore::SQLTransactionBackendSync::~SQLTransactionBackendSync):
1323         (WebCore::SQLTransactionBackendSync::executeSQL):
1324         (WebCore::SQLTransactionBackendSync::begin):
1325         (WebCore::SQLTransactionBackendSync::execute):
1326         (WebCore::SQLTransactionBackendSync::commit):
1327         (WebCore::SQLTransactionBackendSync::rollback):
1328         * Modules/webdatabase/SQLTransactionBackendSync.h: Copied from Source/WebCore/Modules/webdatabase/SQLTransactionSync.h.
1329         (SQLTransactionBackendSync):
1330         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
1331         (WebCore::getDatabaseIdentifier):
1332         (WebCore::SQLTransactionCoordinator::processPendingTransactions):
1333         (WebCore::SQLTransactionCoordinator::acquireLock):
1334         (WebCore::SQLTransactionCoordinator::releaseLock):
1335         (WebCore::SQLTransactionCoordinator::shutdown):
1336         * Modules/webdatabase/SQLTransactionCoordinator.h:
1337         (SQLTransactionCoordinator):
1338         (WebCore::SQLTransactionCoordinator::SQLTransactionCoordinator):
1339         (CoordinationInfo):
1340         * Modules/webdatabase/SQLTransactionSync.cpp: Removed.
1341         * Modules/webdatabase/SQLTransactionSync.h: Removed.
1342         * Target.pri:
1343         * WebCore.gypi:
1344         * WebCore.vcproj/WebCore.vcproj:
1345         * WebCore.vcxproj/WebCore.vcxproj:
1346         * WebCore.vcxproj/WebCore.vcxproj.filters:
1347         * WebCore.xcodeproj/project.pbxproj:
1348
1349 2013-02-07  Dean Jackson  <dino@apple.com>
1350
1351         Use new speech bubble artwork for captions menu button
1352         https://bugs.webkit.org/show_bug.cgi?id=109215
1353
1354         Reviewed by Eric Carlson.
1355
1356         Rather than call into RenderTheme to display this button, embed artwork
1357         into the CSS. This means we can remove some uncalled methods in
1358         RenderTheme.
1359
1360         * css/mediaControlsQuickTime.css:
1361         (video::-webkit-media-controls-toggle-closed-captions-button): New background image using SVG.
1362         * rendering/RenderTheme.cpp:
1363         (WebCore::RenderTheme::paint): Don't call the specific painter for the CC button.
1364         * rendering/RenderTheme.h: Remove unused function.
1365         * rendering/RenderThemeMac.h: Ditto.
1366         * rendering/RenderThemeMac.mm: Ditto.
1367
1368 2013-02-07  Michelangelo De Simone  <michelangelo@webkit.org>
1369
1370         [CSS Shaders] Add the last blending step
1371         https://bugs.webkit.org/show_bug.cgi?id=104012
1372
1373         The resulting blended color in mix() is now weighted according to
1374         the original element's backdrop alpha value.
1375
1376         Reviewed by Dean Jackson.
1377
1378         Test: css3/filters/custom/custom-filter-blend-fractional-destination-alpha.html
1379
1380         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
1381         (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader):
1382
1383 2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
1384
1385         Fix two exports of WebCore symbols on iOS
1386         https://bugs.webkit.org/show_bug.cgi?id=109238
1387
1388         Reviewed by David Kilzer.
1389
1390         * WebCore.exp.in: Export wkCTFontTransformGlyphs but not
1391         wkCGContextDrawsWithCorrectShadowOffsets on iOS.
1392
1393 2013-02-07  Hans Muller  <hmuller@adobe.com>
1394
1395         [CSS Exclusions] Ignore ExclusionPolygon edges above minLogicalIntervalTop
1396         https://bugs.webkit.org/show_bug.cgi?id=107566
1397
1398         Reviewed by David Hyatt.
1399
1400         Improve ExclusionPolygon::firstIncludedIntervalLogicalTop() performance by only
1401         creating offset edges for polygon edges that are below the horizontal minLogicalIntervalTop
1402         line. In other words, don't bother creating offset edges that can't define the polygon's
1403         first fit location.
1404
1405         Test: fast/exclusions/shape-inside/shape-inside-first-fit-004.html
1406
1407         * rendering/ExclusionPolygon.cpp:
1408         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Don't create offset edges for polygon edges above minLogicalIntervalTop.
1409
1410 2013-02-07  Jer Noble  <jer.noble@apple.com>
1411
1412         Improve logging of MediaPlayerPrivateAVFoundation Notifications.
1413         https://bugs.webkit.org/show_bug.cgi?id=109223
1414
1415         Reviewed by Eric Carlson.
1416
1417         Convert the existing Notification enum to an expandable macro. Then add a
1418         Logging-only function which stringifies the enums.
1419
1420         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1421         (WebCore):
1422         (WebCore::notificationName):
1423         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
1424         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
1425         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1426
1427 2013-02-07  Martin Robinson  <mrobinson@igalia.com>
1428
1429         [GTK] Cleanup command-line defines
1430         https://bugs.webkit.org/show_bug.cgi?id=109213
1431
1432         Reviewed by Xan Lopez.
1433
1434         * GNUmakefile.am: Remove references to flags that are now handled
1435         via autotoolsconfig.h.
1436
1437 2013-02-07  Tom Sepez  <tsepez@chromium.org>
1438
1439         [V8] Binding Integrity crash in V8MediaStream::createWrapper
1440         https://bugs.webkit.org/show_bug.cgi?id=109211
1441
1442         Reviewed by Adam Barth.
1443
1444         Patch suppresses a chrome crasher.
1445
1446         * Modules/mediastream/MediaStream.idl:
1447
1448 2013-02-07  Eric Carlson  <eric.carlson@apple.com>
1449
1450         [Mac] decrease in-band caption advance notice interval
1451         https://bugs.webkit.org/show_bug.cgi?id=109190
1452
1453         Reviewed by Simon Fraser.
1454
1455         No new tests, no observable change in behavior.
1456
1457         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1458         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Request cues 2 seconds in advance.
1459
1460 2013-02-07  ChangSeok Oh  <shivamidow@gmail.com>
1461
1462         [GTK][AC] Clutter required version up to 1.12
1463         https://bugs.webkit.org/show_bug.cgi?id=109037
1464
1465         Reviewed by Martin Robinson.
1466
1467         Replace deprecated clutter apis with new ones.
1468
1469         No new tests, since this patch is minor refactoring.
1470
1471         * platform/graphics/clutter/GraphicsLayerActor.cpp:
1472         (graphicsLayerActorSetAnchorPoint):
1473         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
1474         (WebCore::idleDestroy):
1475         (WebCore::GraphicsLayerClutter::updateSublayerList):
1476
1477 2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
1478
1479         Move pauseAnimation/pauseTransition from TestRunner to Internals
1480         https://bugs.webkit.org/show_bug.cgi?id=109107
1481
1482         Reviewed by Anders Carlsson.
1483
1484         Tests: animations/animation-internals-api-multiple-keyframes.html
1485                animations/animation-internals-api.html
1486
1487         * testing/Internals.cpp:
1488         (WebCore::Internals::pauseAnimationAtTimeOnElement):
1489         (WebCore):
1490         (WebCore::Internals::pauseTransitionAtTimeOnElement):
1491         * testing/Internals.h:
1492         (Internals):
1493         * testing/Internals.idl:
1494
1495 2013-02-07  Gavin Peters  <gavinp@chromium.org>
1496
1497         Unreviewed, rolling out r142155.
1498         http://trac.webkit.org/changeset/142155
1499         https://bugs.webkit.org/show_bug.cgi?id=82888
1500
1501         cr/win build broke.
1502
1503         * bindings/js/JSClipboardCustom.cpp:
1504         (WebCore::JSClipboard::types):
1505         * bindings/v8/custom/V8ClipboardCustom.cpp:
1506         (WebCore::V8Clipboard::typesAccessorGetter):
1507         * dom/Clipboard.h:
1508         (Clipboard):
1509         * platform/blackberry/ClipboardBlackBerry.cpp:
1510         (WebCore::ClipboardBlackBerry::types):
1511         * platform/blackberry/ClipboardBlackBerry.h:
1512         (ClipboardBlackBerry):
1513         * platform/chromium/ChromiumDataObject.cpp:
1514         (WebCore::ChromiumDataObject::types):
1515         * platform/chromium/ChromiumDataObject.h:
1516         (ChromiumDataObject):
1517         * platform/chromium/ClipboardChromium.cpp:
1518         (WebCore::ClipboardChromium::types):
1519         * platform/chromium/ClipboardChromium.h:
1520         (ClipboardChromium):
1521         * platform/efl/ClipboardEfl.cpp:
1522         (WebCore::ClipboardEfl::types):
1523         * platform/efl/ClipboardEfl.h:
1524         (ClipboardEfl):
1525         * platform/gtk/ClipboardGtk.cpp:
1526         (WebCore::ClipboardGtk::types):
1527         * platform/gtk/ClipboardGtk.h:
1528         (ClipboardGtk):
1529         * platform/mac/ClipboardMac.h:
1530         (ClipboardMac):
1531         * platform/mac/ClipboardMac.mm:
1532         (WebCore::addHTMLClipboardTypesForCocoaType):
1533         (WebCore::ClipboardMac::types):
1534         * platform/qt/ClipboardQt.cpp:
1535         (WebCore::ClipboardQt::types):
1536         * platform/qt/ClipboardQt.h:
1537         (ClipboardQt):
1538         * platform/win/ClipboardWin.cpp:
1539         (WebCore::addMimeTypesForFormat):
1540         (WebCore::ClipboardWin::types):
1541         * platform/win/ClipboardWin.h:
1542         (ClipboardWin):
1543
1544 2013-02-07  Rik Cabanier  <cabanier@adobe.com>
1545
1546         Add support for parsing of -webkit-background-blend-mode
1547         https://bugs.webkit.org/show_bug.cgi?id=108547
1548
1549         Reviewed by David Hyatt.
1550
1551         Added parsing and general CSS handling of -webkit-background-blend-mode per 
1552         https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#background-blend-mode
1553
1554         Tests: css3/compositing/background-blend-mode-property-parsing.html
1555                css3/compositing/background-blend-mode-property.html
1556
1557         * css/CSSComputedStyleDeclaration.cpp: Built value for getComputedStyle.
1558         (WebCore):
1559         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1560         * css/CSSParser.cpp: Parsed and stored value of -webkit-background-blend-mode.
1561         (WebCore::CSSParser::parseValue):
1562         (WebCore::CSSParser::parseFillProperty):
1563         * css/CSSProperty.cpp: Listed -webkit-background-blend-mode as a non-inherited property.
1564         (WebCore::CSSProperty::isInheritedProperty):
1565         * css/CSSPropertyNames.in: Added -webkit-background-blend-mode as a CSS property.
1566         * css/CSSToStyleMap.cpp: Mapped background blend mode from CSS value to enum.
1567         (WebCore::CSSToStyleMap::mapFillBlendMode):
1568         (WebCore):
1569         * css/CSSToStyleMap.h: Added function declaration 'mapFillBlendMode'.
1570         (CSSToStyleMap):
1571         * css/StyleBuilder.cpp: Set up propery handler for -webkit-background-blend-mode.
1572         (WebCore::StyleBuilder::StyleBuilder):
1573         * rendering/style/FillLayer.cpp: Added code to store and retrieve the blend mode from a layer.
1574         (WebCore::FillLayer::FillLayer):
1575         (WebCore::FillLayer::operator=):
1576         (WebCore::FillLayer::operator==):
1577         (WebCore::FillLayer::fillUnsetProperties):
1578         * rendering/style/FillLayer.h: Added function definitions to manage blend mode in a layer.
1579         (WebCore::FillLayer::blendMode):
1580         (WebCore::FillLayer::isBlendModeSet):
1581         (WebCore::FillLayer::setBlendMode):
1582         (WebCore::FillLayer::clearBlendMode):
1583         (WebCore::FillLayer::initialFillBlendMode):
1584         (FillLayer):
1585
1586 2013-02-07  Gavin Peters  <gavinp@chromium.org>
1587
1588         Unreviewed, rolling out r142142.
1589         http://trac.webkit.org/changeset/142142
1590         https://bugs.webkit.org/show_bug.cgi?id=109154
1591
1592         Mac expectations were not right. See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio-leak-test.html and http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio.html .
1593
1594
1595         * inspector/front-end/DefaultTextEditor.js:
1596         (WebInspector.TextEditorMainPanel.prototype._registerShortcuts):
1597
1598 2013-02-07  Gavin Peters  <gavinp@chromium.org>
1599
1600         Unreviewed, rolling out r142081.
1601         http://trac.webkit.org/changeset/142081
1602         https://bugs.webkit.org/show_bug.cgi?id=109146
1603
1604         The patch caused a crash in inspector-protocol/nmi-webaudio*.html .
1605
1606         See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio-leak-test.html and http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio.html .
1607
1608         * dom/WebCoreMemoryInstrumentation.cpp:
1609         (WebCore):
1610         * inspector/front-end/NativeMemorySnapshotView.js:
1611         (WebInspector.MemoryBlockViewProperties._initialize):
1612         * platform/PlatformMemoryInstrumentation.cpp:
1613         (WebCore):
1614
1615 2013-02-07  Bear Travis  <betravis@adobe.com>
1616
1617         [CSS Exclusions] shape-inside does not properly handle padding or border
1618         https://bugs.webkit.org/show_bug.cgi?id=102715
1619
1620         Reviewed by David Hyatt.
1621
1622         This patch positions the exclusion shape based on the value of the css box sizing
1623         property. Geometry calculations happen in the shape coordinate space. For layout,
1624         these coordinates are translated to the border-box coordinate system by adding
1625         the appropriate offsets.
1626
1627         Test: fast/exclusions/shape-inside/shape-inside-box-sizing.html
1628
1629         * rendering/ExclusionShapeInfo.cpp:
1630         (WebCore::::computedShape): Pass m_shapeLogicalWidth to the exclusion shape
1631         geometry code.
1632         * rendering/ExclusionShapeInfo.h:
1633         (WebCore::ExclusionShapeInfo::setShapeSize): Adjust block layout dimensions to
1634         shape dimensions when checking to see if the shape geometry must be recalculated.
1635         (WebCore::ExclusionShapeInfo::shapeLogicalTop): Account for layout offsets.
1636         (WebCore::ExclusionShapeInfo::shapeLogicalBottom): Ditto.
1637         (WebCore::ExclusionShapeInfo::shapeLogicalLeft): Ditto.
1638         (WebCore::ExclusionShapeInfo::shapeLogicalRight): Ditto.
1639         (WebCore::ExclusionShapeInfo::logicalTopOffset): Return the offset from the logical
1640         top of the border box to the logical top of the shape.
1641         (WebCore::ExclusionShapeInfo::logicalLeftOffset): Return the offset from the logical
1642         left of the border box to the logical left of the shape.
1643         (ExclusionShapeInfo):
1644         * rendering/ExclusionShapeInsideInfo.cpp:
1645         (WebCore::ExclusionShapeInsideInfo::computeSegmentsForLine): Adjust line top to
1646         be in shape coordinates.
1647         (WebCore::ExclusionShapeInsideInfo::adjustLogicalLineTop): Ditto.
1648         * rendering/ExclusionShapeInsideInfo.h:
1649         (WebCore::ExclusionShapeInsideInfo::lineOverlapsShapeBounds): Use consistent
1650         coordinate system (border box) to test for whether a line overlaps a shape.
1651         (WebCore::ExclusionShapeInsideInfo::logicalLineTop): Include the logical offset
1652         from the border box.
1653         (WebCore::ExclusionShapeInsideInfo::logicalLineBottom): Ditto.
1654
1655 2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
1656
1657         Upstream iOS isWebThread() and isUIThread()
1658         https://bugs.webkit.org/show_bug.cgi?id=109130
1659
1660         Reviewed by Sam Weinig.
1661
1662         * bindings/objc/WebScriptObject.mm:
1663         (+[WebScriptObject initialize]):
1664         * platform/mac/SharedBufferMac.mm:
1665         (+[WebCoreSharedBufferData initialize]):
1666         #ifdef out the legacy initialization as it is not correct when
1667         using a WebThread.
1668
1669 2013-02-07  Vivek Galatage  <vivek.vg@samsung.com>
1670
1671         Web Inspector: CPU pegged when inspecting LocalStorage that mutates.
1672         https://bugs.webkit.org/show_bug.cgi?id=107937
1673
1674         Reviewed by Yury Semikhatsky.
1675
1676         The DOM storage agent will fire an event to the frontend based on the action
1677         performed on the storage. Based on this action, the front-end will just add/update/remove
1678         the entry in the view. This enhances the front-end responsiveness as the round trip
1679         for fetching the storage entries has been eliminated.
1680
1681         Existing test: LayoutTests/inspector/storage-panel-dom-storage-update.html should verify the change
1682
1683         * inspector/Inspector.json:
1684         * inspector/InspectorDOMStorageAgent.cpp:
1685         (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
1686         * inspector/front-end/DOMStorage.js:
1687         (WebInspector.DOMStorageModel.prototype._domStorageItemsCleared):
1688         (WebInspector.DOMStorageModel.prototype._domStorageItemRemoved):
1689         (WebInspector.DOMStorageModel.prototype._domStorageItemAdded):
1690         (WebInspector.DOMStorageModel.prototype._domStorageItemUpdated):
1691         (WebInspector.DOMStorageDispatcher.prototype.domStorageItemsCleared):
1692         (WebInspector.DOMStorageDispatcher.prototype.domStorageItemRemoved):
1693         (WebInspector.DOMStorageDispatcher.prototype.domStorageItemAdded):
1694         (WebInspector.DOMStorageDispatcher.prototype.domStorageItemUpdated):
1695         * inspector/front-end/DOMStorageItemsView.js:
1696         (WebInspector.DOMStorageItemsView):
1697         (WebInspector.DOMStorageItemsView.prototype.wasShown):
1698         (WebInspector.DOMStorageItemsView.prototype._domStorageItemsCleared):
1699         (WebInspector.DOMStorageItemsView.prototype._domStorageItemRemoved):
1700         (WebInspector.DOMStorageItemsView.prototype._domStorageItemAdded):
1701         (WebInspector.DOMStorageItemsView.prototype._domStorageItemUpdated):
1702         (WebInspector.DOMStorageItemsView.prototype._update):
1703         (WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries):
1704         (WebInspector.DOMStorageItemsView.prototype._refreshButtonClicked):
1705         (WebInspector.DOMStorageItemsView.prototype._editingCallback):
1706         (WebInspector.DOMStorageItemsView.prototype._deleteCallback):
1707         * inspector/front-end/ResourcesPanel.js:
1708         (WebInspector.ResourcesPanel):
1709         (WebInspector.ResourcesPanel.prototype._showDOMStorage.get if):
1710         (WebInspector.ResourcesPanel.prototype._showDOMStorage):
1711
1712 2013-02-07  Dan Carney  <dcarney@google.com>
1713
1714         [v8] move persistent::new and ::dispose into same class
1715         https://bugs.webkit.org/show_bug.cgi?id=109065
1716
1717         Reviewed by Adam Barth.
1718
1719         No new tests. No change in functionality.
1720
1721         * bindings/scripts/CodeGeneratorV8.pm:
1722         (GenerateSingleConstructorCallback):
1723         (GenerateEventConstructorCallback):
1724         (GenerateNamedConstructorCallback):
1725         (GenerateToV8Converters):
1726         * bindings/scripts/test/V8/V8Float64Array.cpp:
1727         (WebCore::V8Float64Array::createWrapper):
1728         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1729         (WebCore::V8TestActiveDOMObject::createWrapper):
1730         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1731         (WebCore::V8TestCustomNamedGetter::createWrapper):
1732         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1733         (WebCore::V8TestEventConstructor::constructorCallback):
1734         (WebCore::V8TestEventConstructor::createWrapper):
1735         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1736         (WebCore::V8TestEventTarget::createWrapper):
1737         * bindings/scripts/test/V8/V8TestException.cpp:
1738         (WebCore::V8TestException::createWrapper):
1739         * bindings/scripts/test/V8/V8TestInterface.cpp:
1740         (WebCore::V8TestInterface::constructorCallback):
1741         (WebCore::V8TestInterface::createWrapper):
1742         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1743         (WebCore::V8TestMediaQueryListListener::createWrapper):
1744         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1745         (WebCore::V8TestNamedConstructorConstructorCallback):
1746         (WebCore::V8TestNamedConstructor::createWrapper):
1747         * bindings/scripts/test/V8/V8TestNode.cpp:
1748         (WebCore::V8TestNode::constructorCallback):
1749         (WebCore::V8TestNode::createWrapper):
1750         * bindings/scripts/test/V8/V8TestObj.cpp:
1751         (WebCore::V8TestObj::constructorCallback):
1752         (WebCore::V8TestObj::createWrapper):
1753         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
1754         (WebCore::V8TestOverloadedConstructors::constructor1Callback):
1755         (WebCore::V8TestOverloadedConstructors::constructor2Callback):
1756         (WebCore::V8TestOverloadedConstructors::constructor3Callback):
1757         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
1758         (WebCore::V8TestOverloadedConstructors::createWrapper):
1759         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1760         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
1761         (WebCore::V8TestSerializedScriptValueInterface::createWrapper):
1762         * bindings/v8/DOMDataStore.cpp:
1763         * bindings/v8/DOMDataStore.h:
1764         (WebCore::DOMDataStore::setWrapper):
1765         (DOMDataStore):
1766         (WebCore::DOMDataStore::set):
1767         (WebCore::DOMDataStore::setWrapperInObject):
1768         * bindings/v8/DOMWrapperMap.h:
1769         (WebCore::DOMWrapperMap::get):
1770         (WebCore::DOMWrapperMap::set):
1771         (WebCore::DOMWrapperMap::removeAndDispose):
1772         (WebCore::DOMWrapperMap::defaultWeakCallback):
1773         * bindings/v8/ScriptWrappable.h:
1774         (WebCore::ScriptWrappable::wrapper):
1775         (WebCore::ScriptWrappable::setWrapper):
1776         (WebCore::ScriptWrappable::reportMemoryUsage):
1777         (ScriptWrappable):
1778         (WebCore::ScriptWrappable::disposeWrapper):
1779         (WebCore::ScriptWrappable::weakCallback):
1780         * bindings/v8/V8DOMWindowShell.cpp:
1781         (WebCore::V8DOMWindowShell::installDOMWindow):
1782         * bindings/v8/V8DOMWrapper.h:
1783         (V8DOMWrapper):
1784         (WebCore::V8DOMWrapper::associateObjectWithWrapper):
1785         * bindings/v8/V8NPObject.cpp:
1786         (WebCore::weakNPObjectCallback):
1787         (WebCore::createV8ObjectForNPObject):
1788         (WebCore::forgetV8ObjectForNPObject):
1789         * bindings/v8/WorkerScriptController.cpp:
1790         (WebCore::WorkerScriptController::initializeContextIfNeeded):
1791         * bindings/v8/WrapperTypeInfo.h:
1792         (WebCore):
1793         (WrapperConfiguration):
1794         (WebCore::WrapperConfiguration::configureWrapper):
1795         (WebCore::buildWrapperConfiguration):
1796         * bindings/v8/custom/V8ArrayBufferCustom.cpp:
1797         (WebCore::V8ArrayBuffer::constructorCallbackCustom):
1798         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
1799         (WebCore::wrapArrayBufferView):
1800         (WebCore::constructWebGLArray):
1801         * bindings/v8/custom/V8AudioContextCustom.cpp:
1802         (WebCore::V8AudioContext::constructorCallbackCustom):
1803         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
1804         (WebCore::V8DOMFormData::constructorCallbackCustom):
1805         * bindings/v8/custom/V8DataViewCustom.cpp:
1806         (WebCore::V8DataView::constructorCallbackCustom):
1807         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1808         (WebCore::v8HTMLImageElementConstructorCallback):
1809         * bindings/v8/custom/V8IntentCustom.cpp:
1810         (WebCore::V8Intent::constructorCallbackCustom):
1811         * bindings/v8/custom/V8MessageChannelCustom.cpp:
1812         (WebCore::V8MessageChannel::constructorCallbackCustom):
1813         * bindings/v8/custom/V8MutationObserverCustom.cpp:
1814         (WebCore::V8MutationObserver::constructorCallbackCustom):
1815         * bindings/v8/custom/V8WebKitPointCustom.cpp:
1816         (WebCore::V8WebKitPoint::constructorCallbackCustom):
1817         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1818         (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
1819
1820 2013-02-07  Zan Dobersek  <zdobersek@igalia.com>
1821
1822         [Autotools] Remove uses of Automake FARSTREAM_(CFLAGS|LIBS) variables, USE_FARSTREAM conditional
1823         https://bugs.webkit.org/show_bug.cgi?id=109198
1824
1825         Reviewed by Martin Robinson.
1826
1827         * GNUmakefile.am: Remove FARSTREAM_CFLAGS variable, it's not set to anything.
1828
1829 2013-02-07   Vineet Chaudhary  <rgf748@motorola.com>
1830
1831         Consider replacing return type of Clipboard::types() from ListHashSet<String> to Vector<String>
1832         https://bugs.webkit.org/show_bug.cgi?id=82888
1833
1834         Reviewed by Kentaro Hara.
1835
1836         As part of removing custom bindings of types Array Clipboard::types() needs to return
1837         Vector<String> than ListHashSet<String>
1838
1839         No new tests. Existing test should pass with this change as no behavoural changes.
1840
1841         * bindings/js/JSClipboardCustom.cpp: Replace data type from ListHashSet<> to Vector<>.
1842         (WebCore::JSClipboard::types):
1843         * bindings/v8/custom/V8ClipboardCustom.cpp: Ditto.
1844         (WebCore::V8Clipboard::typesAccessorGetter): Ditto.
1845         * dom/Clipboard.h: Ditto.
1846         * platform/blackberry/ClipboardBlackBerry.cpp: Ditto.
1847         (WebCore::ClipboardBlackBerry::types):
1848         * platform/blackberry/ClipboardBlackBerry.h: Ditto.
1849         * platform/chromium/ChromiumDataObject.cpp: Ditto.
1850         (WebCore::ChromiumDataObject::types):
1851         * platform/chromium/ChromiumDataObject.h: Ditto.
1852         * platform/chromium/ClipboardChromium.cpp: Ditto.
1853         (WebCore::ClipboardChromium::types):
1854         * platform/chromium/ClipboardChromium.h: Ditto.
1855         * platform/efl/ClipboardEfl.cpp: Ditto.
1856         (WebCore::ClipboardEfl::types):
1857         * platform/efl/ClipboardEfl.h: Ditto.
1858         * platform/gtk/ClipboardGtk.cpp: Ditto.
1859         (WebCore::ClipboardGtk::types):
1860         * platform/gtk/ClipboardGtk.h: Ditto.
1861         * platform/mac/ClipboardMac.h: Ditto.
1862         * platform/mac/ClipboardMac.mm: Ditto.
1863         (WebCore::addHTMLClipboardTypesForCocoaType):
1864         (WebCore::ClipboardMac::types):
1865         * platform/qt/ClipboardQt.cpp: Ditto.
1866         (WebCore::ClipboardQt::types):
1867         * platform/qt/ClipboardQt.h: Ditto.
1868         * platform/win/ClipboardWin.cpp: Ditto.
1869         (WebCore::addMimeTypesForFormat):
1870         (WebCore::ClipboardWin::types):
1871         * platform/win/ClipboardWin.h: Ditto.
1872
1873 2013-02-07  Kentaro Hara  <haraken@chromium.org>
1874
1875         [V8] StringCache::m_stringCache should be HashMap<StringImpl*, Persistent<String>>
1876         https://bugs.webkit.org/show_bug.cgi?id=109123
1877
1878         Reviewed by Adam Barth.
1879
1880         Currently StringCache::m_stringCache is implemented as
1881         HashMap<StringImpl*, v8::String*>. Given that v8::String*
1882         can change when a GC is triggered, it is dangerous to store a raw pointer.
1883         We should use HashMap<StringImpl*, v8::Persistent<v8::String>> instead.
1884
1885         This is a possible fix for an IndexedDB crash (https://bugs.webkit.org/show_bug.cgi?id=105363),
1886         although I'm not sure if this patch fixes the crash. (I couldn't reproduce the crash.)
1887
1888         No tests. This change highly depends on GC behavior and thus it is
1889         difficult to make a reliable test case.
1890
1891         * bindings/v8/V8ValueCache.cpp:
1892         (WebCore::makeExternalString):
1893         * bindings/v8/V8ValueCache.h:
1894         (StringCache):
1895
1896 2013-01-27  Robert Hogan  <robert@webkit.org>
1897
1898         CSS 2.1 failure: floats-149 fails
1899         https://bugs.webkit.org/show_bug.cgi?id=95772
1900
1901         Reviewed by David Hyatt.
1902
1903         Treat inlines that contain nothing but empty inlines as empty too so that they get a linebox.
1904
1905         Tests: fast/inline/inline-with-empty-inline-children.html
1906                css2.1/20110323/floats-149.htm
1907
1908         * rendering/InlineIterator.h:
1909         (WebCore::isEmptyInline):
1910         * rendering/RenderBlockLineLayout.cpp:
1911         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Now that empty inlines get a linebox any out-of-flow
1912         objects inside an empty inline (on a line that is otherwise empty) won't get positioned while skipping 
1913         through leading whitespace. 
1914
1915 2013-02-07  peavo@outlook.com  <peavo@outlook.com>
1916
1917         [WinCairo] Compile fix after r141981
1918         https://bugs.webkit.org/show_bug.cgi?id=109184
1919
1920         Reviewed by Brent Fulgham.
1921
1922         * platform/network/curl/ResourceHandleCurl.cpp:
1923         (WebCore::ResourceHandle::loadResourceSynchronously):
1924
1925 2013-02-07  Otto Derek Cheung  <otcheung@rim.com>
1926
1927         [BlackBerry] Cookie database isn't loaded into memory in some rare cases
1928         https://bugs.webkit.org/show_bug.cgi?id=109202
1929         PR 286189
1930
1931         Reviewed by Yong Li.
1932         Internally Reviewed by Konrad Piascik.
1933
1934         If a get/setCookie call is made before the database is loaded, or if there's some
1935         kind of error that causes the loading of the database to fail in the constructor
1936         of CookieManager, the browser will get into a state where it seems like cookie is
1937         permanenty disabled.
1938
1939         Instead of logging the errors and redispatching the setCookie, we should do a force sync
1940         to load the cookie database before continuing.
1941
1942         Since the bug is so difficult to reproduce (I never did so myself), I did the follow test
1943         to make sure the code path is correct:
1944         1) Make sure original implementation is retained - open and loading done in the constructor
1945         2) Removed opening and loading in constructor, the new calls in get/setcookies loaded the db just fine (although with
1946         an initial lag because we are blocking WKT while performing SQLite options).
1947         3) Removed loading in constructor, the new calls loaded the db just fine.
1948
1949         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
1950         (WebCore::CookieDatabaseBackingStore::openAndLoadDatabaseSynchronously):
1951         (WebCore):
1952         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
1953         (CookieDatabaseBackingStore):
1954         * platform/blackberry/CookieManager.cpp:
1955         (WebCore::CookieManager::setCookies):
1956         (WebCore::CookieManager::getCookie):
1957         (WebCore::CookieManager::generateHtmlFragmentForCookies):
1958         (WebCore::CookieManager::getRawCookies):
1959
1960 2013-02-07  Max Vujovic  <mvujovic@adobe.com>
1961
1962         [CSS Shaders] Add WebKitCSSFilterRule to DOMWindow.idl
1963         https://bugs.webkit.org/show_bug.cgi?id=109082
1964
1965         Reviewed by Dean Jackson.
1966
1967         Add an entry for WebKitCSSFilterRuleConstructor in DOMWindow.idl.
1968
1969         Tests: css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid.html
1970                css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid.html
1971
1972         * page/DOMWindow.idl:
1973
1974 2013-02-07  Vsevolod Vlasov  <vsevik@chromium.org>
1975
1976         Web Inspector: Remove unused workspace field from NetworkUISourceCodeProvider
1977         https://bugs.webkit.org/show_bug.cgi?id=109201
1978
1979         Reviewed by Pavel Feldman.
1980
1981         * inspector/front-end/NetworkUISourceCodeProvider.js:
1982         (WebInspector.NetworkUISourceCodeProvider):
1983         * inspector/front-end/inspector.js:
1984
1985 2013-02-07  Jessie Berlin  <jberlin@apple.com>
1986
1987         REGRESSION(r142003): Duplicate "Unknown" strings in LocalizedStrings.cpp not distinguished
1988         by key
1989         https://bugs.webkit.org/show_bug.cgi?id=109196
1990
1991         Reviewed by Eric Carlson.
1992
1993         * English.lproj/Localizable.strings:
1994         Updated for the changes.
1995         * platform/LocalizedStrings.cpp:
1996         (WebCore::unknownFileSizeText):
1997         Add a key.
1998         (WebCore::textTrackNoLabelText):
1999         Ditto.
2000
2001 2013-02-07  Vsevolod Vlasov  <vsevik@chromium.org>
2002
2003         Web Inspector: linkifyResourceAsNode produced anchor should not prefer resources to scripts panel.
2004         https://bugs.webkit.org/show_bug.cgi?id=109197
2005
2006         Reviewed by Pavel Feldman.
2007
2008         Javascript syntax errors in console are now linkified so that they show sources panel by default.
2009
2010         * inspector/front-end/ResourceUtils.js:
2011         (WebInspector.linkifyResourceAsNode):
2012
2013 2013-02-07  Eberhard Graether  <egraether@google.com>
2014
2015         Web Inspector: Add settings checkbox for composited layer borders
2016         https://bugs.webkit.org/show_bug.cgi?id=109096
2017
2018         Reviewed by Pavel Feldman.
2019
2020         This change adds a checkbox to show composited layer borders to the WebInspector's
2021         rendering settings and plumbs the setting to Chromium's WebLayerTreeView. The setting
2022         is visible if InspectorClient::canShowDebugBorders() returns true.
2023
2024         No new tests.
2025
2026         * English.lproj/localizedStrings.js:
2027         * inspector/Inspector.json:
2028         * inspector/InspectorClient.h:
2029         (WebCore::InspectorClient::canShowDebugBorders):
2030         (WebCore::InspectorClient::setShowDebugBorders):
2031         (InspectorClient):
2032         * inspector/InspectorPageAgent.cpp:
2033         (PageAgentState):
2034         (WebCore::InspectorPageAgent::restore):
2035         (WebCore::InspectorPageAgent::disable):
2036         (WebCore::InspectorPageAgent::canShowDebugBorders):
2037         (WebCore):
2038         (WebCore::InspectorPageAgent::setShowDebugBorders):
2039         * inspector/InspectorPageAgent.h:
2040         * inspector/front-end/Settings.js:
2041         * inspector/front-end/SettingsScreen.js:
2042         (WebInspector.GenericSettingsTab):
2043         (WebInspector.GenericSettingsTab.prototype.get _showDebugBordersChanged):
2044         * inspector/front-end/inspector.js:
2045         (WebInspector.doLoadedDone):
2046
2047 2013-02-07  Gavin Peters  <gavinp@chromium.org>
2048
2049         Unreviewed, rolling out r142141.
2050         http://trac.webkit.org/changeset/142141
2051         https://bugs.webkit.org/show_bug.cgi?id=108990
2052
2053         Reland r142112, will update Chromium expectations and create a
2054         Chromium bug instead for the crash.
2055
2056         * CMakeLists.txt:
2057         * Target.pri:
2058         * WebCore.pri:
2059         * page/scrolling/ScrollingCoordinator.cpp:
2060         (WebCore::ScrollingCoordinator::create):
2061         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Added.
2062         (WebCore):
2063         (WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
2064         (WebCore::ScrollingCoordinatorCoordinatedGraphics::setLayerIsFixedToContainerLayer):
2065         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Added.
2066         (WebCore):
2067         (ScrollingCoordinatorCoordinatedGraphics):
2068         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2069         (WebCore::CoordinatedGraphicsLayer::setFixedToViewport):
2070         (WebCore):
2071         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
2072         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2073         (CoordinatedGraphicsLayerClient):
2074         (CoordinatedGraphicsLayer):
2075
2076 2013-02-07  Andrey Lushnikov  <lushnikov@chromium.org>
2077
2078         Web Inspector: home button behaviour is wrong in DTE
2079         https://bugs.webkit.org/show_bug.cgi?id=109154
2080
2081         Reviewed by Vsevolod Vlasov.
2082
2083         Handle home key shortcut explicitly in TextEditorMainPanel.
2084
2085         New test: inspector/editor/text-editor-home-button.html
2086
2087         * inspector/front-end/DefaultTextEditor.js:
2088         (WebInspector.TextEditorMainPanel.prototype._registerShortcuts):
2089         (WebInspector.TextEditorMainPanel.prototype._handleHomeKey):
2090
2091 2013-02-07  Gavin Peters  <gavinp@chromium.org>
2092
2093         Unreviewed, rolling out r142112.
2094         http://trac.webkit.org/changeset/142112
2095         https://bugs.webkit.org/show_bug.cgi?id=108990
2096
2097         The new test scrollingcoordinator/non-fast-scrollable-region-transformed- iframe.html crashes on Lion.
2098
2099         See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=scrollingcoordinator%2Fnon-fast-scrollable-region-transformed-iframe.html
2100
2101         * CMakeLists.txt:
2102         * Target.pri:
2103         * WebCore.pri:
2104         * page/scrolling/ScrollingCoordinator.cpp:
2105         (WebCore::ScrollingCoordinator::create):
2106         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Removed.
2107         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Removed.
2108         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2109         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
2110         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2111         (CoordinatedGraphicsLayerClient):
2112         (WebCore::CoordinatedGraphicsLayer::setFixedToViewport):
2113
2114 2013-02-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2115
2116         Scrollbars misplaced with accelerated compositing for overflow scroll
2117         https://bugs.webkit.org/show_bug.cgi?id=108625
2118
2119         Reviewed by Simon Fraser.
2120
2121         Scrollbars require their own layer if overflow scroll is composited,
2122         otherwise the scrollbars would be rendered on the content layer and
2123         not fixed to the viewport.
2124
2125         * rendering/RenderLayerBacking.cpp:
2126         (WebCore::RenderLayerBacking::requiresHorizontalScrollbarLayer):
2127         (WebCore::RenderLayerBacking::requiresVerticalScrollbarLayer):
2128         (WebCore::RenderLayerBacking::requiresScrollCornerLayer):
2129
2130 2013-02-07  Mike West  <mkwst@chromium.org>
2131
2132         Don't ASSERT things about uninitialized variables.
2133         https://bugs.webkit.org/show_bug.cgi?id=109187
2134
2135         Reviewed by Jochen Eisinger.
2136
2137         Rather than ASSERTing that an uninitialized ExceptionCode is non-zero
2138         after some method executes, we should use the ASSERT_NO_EXCEPTION macro.
2139
2140         * editing/markup.cpp:
2141         (WebCore::removeElementPreservingChildren):
2142
2143 2013-02-07  Andrey Lushnikov  <lushnikov@chromium.org>
2144
2145         Web Inspector: [Regression] breakpoint condition not editable
2146         https://bugs.webkit.org/show_bug.cgi?id=109183
2147
2148         Reviewed by Vsevolod Vlasov.
2149
2150         Improve TextEditorMainPanel.selection() method to return null if the
2151         selection is set inside of decoration element.
2152
2153         No new tests.
2154
2155         * inspector/front-end/DOMExtension.js:
2156         (Node.prototype.enclosingNodeOrSelfWithClass): Improve to add iteration boundary.
2157         * inspector/front-end/DefaultTextEditor.js:
2158         (WebInspector.TextEditorMainPanel.prototype.selection):
2159
2160 2013-02-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2161
2162         [WK2][EFL][QT]REGRESSION(r142045): Scrolling is broken
2163         https://bugs.webkit.org/show_bug.cgi?id=109185
2164
2165         Reviewed by Kenneth Rohde Christiansen.
2166
2167         This patch is disabling paints clipping logic added at r142045 for the case 
2168         when the view should render the entire contents (case of using tiled backing store).
2169
2170         No new tests, covered by plenty of existing manual tests that allow scrolling
2171         (for example fixed-position.html).
2172
2173         * platform/ScrollView.cpp:
2174         (WebCore::ScrollView::paint):
2175
2176 2013-02-07  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2177
2178         Web Inspector: Show elements and sources sidebar panes in a tabbed pane when they are below the main pane
2179         https://bugs.webkit.org/show_bug.cgi?id=107552
2180
2181         Reviewed by Pavel Feldman.
2182
2183         Removed the aspect ratio detection logic and implemented explicit user action "Split Horizontally" available
2184         in Elements and Sources panels. When split horizontally the sidebar panes are organized into a tabbed pane.
2185         This user action is behind an experimental flag.
2186
2187         No new tests.
2188
2189         * inspector/front-end/ContextMenu.js:
2190         (WebInspector.ContextMenu.prototype.show):
2191         * inspector/front-end/DOMBreakpointsSidebarPane.js:
2192         (WebInspector.DOMBreakpointsSidebarPane.prototype.createProxy):
2193         (WebInspector.DOMBreakpointsSidebarPane.prototype.onContentReady):
2194         (WebInspector.DOMBreakpointsSidebarPane.Proxy):
2195         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.expanded):
2196         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.expand):
2197         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.collapse):
2198         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.onContentReady):
2199         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.wasShown):
2200         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype._reattachBody):
2201         * inspector/front-end/ElementsPanel.js:
2202         (WebInspector.ElementsPanel):
2203         (WebInspector.ElementsPanel.prototype._populateContextMenu):
2204         * inspector/front-end/ScriptsPanel.js:
2205         (WebInspector.ScriptsPanel.prototype._clearInterface):
2206         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
2207         (WebInspector.ScriptsPanel.prototype._contextMenuEventFired):
2208         * inspector/front-end/Settings.js:
2209         (WebInspector.ExperimentsSettings):
2210         * inspector/front-end/SidebarPane.js:
2211         (WebInspector.SidebarPane):
2212         (WebInspector.SidebarPane.prototype.prepareContent):
2213         (WebInspector.SidebarPane.prototype.expanded):
2214         (WebInspector.SidebarPane.prototype.expand):
2215         (WebInspector.SidebarPane.prototype.collapse):
2216         (WebInspector.SidebarPane.prototype.onContentReady):
2217         (WebInspector.SidebarPane.prototype._setExpandCallback):
2218         (WebInspector.SidebarPaneStack.prototype.addPane):
2219         (WebInspector.SidebarPaneStack.prototype.activePaneId):
2220         (WebInspector.SidebarPaneStack.prototype.setActivePaneId):
2221         (WebInspector.SidebarPaneStack.prototype._setExpanded):
2222         (WebInspector.SidebarPaneStack.prototype._onPaneExpanded):
2223         (WebInspector.SidebarPaneStack.prototype._collapsePane):
2224         (WebInspector.SidebarTabbedPane):
2225         (WebInspector.SidebarTabbedPane.prototype.addPane):
2226         (WebInspector.SidebarTabbedPane.prototype.activePaneId):
2227         (WebInspector.SidebarTabbedPane.prototype.setActivePaneId):
2228         (WebInspector.SidebarPaneGroup):
2229         (WebInspector.SidebarPaneGroup.prototype.setStacked):
2230         (WebInspector.SidebarPaneGroup.prototype.addPane):
2231         (WebInspector.SidebarPaneGroup.prototype.attachToPanel):
2232         (WebInspector.SidebarPaneGroup.prototype.populateContextMenu.toggleSplitDirection):
2233         (WebInspector.SidebarPaneGroup.prototype.get _contextMenuEventFired):
2234         (WebInspector.SidebarPaneGroup.prototype._onSplitDirectionSettingChanged):
2235         * inspector/front-end/SidebarView.js:
2236         (WebInspector.SidebarView):
2237         (WebInspector.SidebarView.prototype._updateSidebarElementStyle):
2238         (WebInspector.SidebarView.prototype.setVertical):
2239         (WebInspector.SidebarView.prototype.onResize):
2240         * inspector/front-end/StylesSidebarPane.js:
2241         (WebInspector.ComputedStyleSidebarPane.prototype.wasShown):
2242         (WebInspector.ComputedStyleSidebarPane.prototype.prepareContent):
2243         * inspector/front-end/inspector.css:
2244         (.sidebar-pane .section .properties, .event-bar .event-properties):
2245         (.pane-title):
2246         (.sidebar-pane-toolbar):
2247         (.sidebar-pane-toolbar > *):
2248         (.sidebar-pane-toolbar > select):
2249         (.sidebar-pane-toolbar > select:hover):
2250         (.sidebar-pane-toolbar > select:active):
2251         (.sidebar-pane-toolbar > select.select-settings):
2252         (.sidebar-pane-toolbar > select.select-filter):
2253         (.sidebar-pane-toolbar > select > option, .sidebar-pane-toolbar > select > hr):
2254         (.sidebar-pane-toolbar > .pane-title-button):
2255         (.sidebar-pane-toolbar > .pane-title-button:hover):
2256         (.sidebar-pane-toolbar > .pane-title-button:active, .sidebar-pane-toolbar > .pane-title-button.toggled):
2257         (.sidebar-pane-toolbar > .pane-title-button.add):
2258         (.sidebar-pane-toolbar > .pane-title-button.element-state):
2259         (.sidebar-pane-toolbar > .pane-title-button.refresh):
2260         (.sidebar-pane):
2261         (.sidebar-pane > .body):
2262         (.sidebar-pane > .body .info):
2263         (.sidebar-pane > .body .placard + .info):
2264         (.sidebar-pane.visible > .body):
2265         (.sidebar-pane > .body .breakpoint-condition):
2266         (.sidebar-pane.visible:nth-last-of-type(1)):
2267         (.sidebar-pane-subtitle):
2268         (.sidebar-pane-subtitle input, .section .header input[type=checkbox]):
2269         (.sidebar-pane .breakpoint-hit):
2270
2271 2013-02-07  Gavin Peters  <gavinp@chromium.org>
2272
2273         Unreviewed, rolling out r142111.
2274         http://trac.webkit.org/changeset/142111
2275         https://bugs.webkit.org/show_bug.cgi?id=108055
2276
2277         win7 bot didn't display Arabic, see http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=platform%2Fchromium%2Ffast%2Fforms%2Fcalendar-picker%2Fcalendar-picker-appearance-required-ar.html
2278
2279         * Resources/pagepopups/calendarPicker.css:
2280         (.today-clear-area .today-button):
2281         * Resources/pagepopups/calendarPicker.js:
2282         (CalendarPicker.prototype.fixWindowSize):
2283
2284 2013-02-07  Vsevolod Vlasov  <vsevik@chromium.org>
2285
2286         Web Inspector: [Regression] Map.size() returns negative values.
2287         https://bugs.webkit.org/show_bug.cgi?id=109174
2288
2289         Reviewed by Yury Semikhatsky.
2290
2291         * inspector/front-end/utilities.js:
2292
2293 2013-02-07  Pavel Feldman  <pfeldman@chromium.org>
2294
2295         Web Inspector: break details are only rendered upon first debugger pause.
2296         https://bugs.webkit.org/show_bug.cgi?id=109193
2297
2298         Reviewed by Vsevolod Vlasov.
2299
2300         * inspector/front-end/CallStackSidebarPane.js:
2301         (WebInspector.CallStackSidebarPane.prototype.update):
2302
2303 2013-02-07  Gavin Peters  <gavinp@chromium.org>
2304
2305         Unreviewed, rolling out r142118.
2306         http://trac.webkit.org/changeset/142118
2307         https://bugs.webkit.org/show_bug.cgi?id=109044
2308
2309         Broke SVG! Oh noes!
2310
2311         * Modules/indexeddb/IDBCursor.cpp:
2312         (WebCore::IDBCursor::direction):
2313         * Modules/indexeddb/IDBObjectStore.cpp:
2314         (WebCore):
2315         * Modules/indexeddb/IDBTransaction.cpp:
2316         (WebCore::IDBTransaction::mode):
2317         * dom/ContainerNode.cpp:
2318         (WebCore::ContainerNode::takeAllChildrenFrom):
2319         * dom/Document.cpp:
2320         (WebCore::Document::setTitle):
2321         * dom/MessagePort.cpp:
2322         (WebCore::MessagePort::dispatchMessages):
2323         (WebCore::MessagePort::disentanglePorts):
2324         * editing/DeleteButtonController.cpp:
2325         (WebCore::enclosingDeletableElement):
2326         (WebCore::DeleteButtonController::createDeletionUI):
2327         (WebCore::DeleteButtonController::show):
2328         * editing/EditorCommand.cpp:
2329         (WebCore::unionDOMRanges):
2330         * editing/ReplaceNodeWithSpanCommand.cpp:
2331         (WebCore::swapInNodePreservingAttributesAndChildren):
2332         * editing/ReplaceSelectionCommand.cpp:
2333         (WebCore::ReplacementFragment::ReplacementFragment):
2334         (WebCore::ReplacementFragment::removeNode):
2335         (WebCore::ReplacementFragment::insertNodeBefore):
2336         (WebCore::ReplacementFragment::insertFragmentForTestRendering):
2337         (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
2338         (WebCore::ReplaceSelectionCommand::insertAsListItems):
2339         * editing/SplitTextNodeCommand.cpp:
2340         (WebCore::SplitTextNodeCommand::doUnapply):
2341         * editing/TextIterator.cpp:
2342         (WebCore::CharacterIterator::range):
2343         (WebCore::BackwardsCharacterIterator::range):
2344         (WebCore::TextIterator::rangeFromLocationAndLength):
2345         (WebCore::collapsedToBoundary):
2346         * editing/htmlediting.cpp:
2347         (WebCore::createTabSpanElement):
2348         * editing/mac/EditorMac.mm:
2349         (WebCore::Editor::fontForSelection):
2350         (WebCore::Editor::fontAttributesForSelectionStart):
2351         * editing/markup.cpp:
2352         (WebCore::createMarkup):
2353         (WebCore::trimFragment):
2354         (WebCore::createFragmentFromMarkupWithContext):
2355         (WebCore::fillContainerFromString):
2356         (WebCore::createFragmentFromText):
2357         (WebCore::createFragmentFromNodes):
2358         * html/ColorInputType.cpp:
2359         (WebCore::ColorInputType::createShadowSubtree):
2360         * html/HTMLOptionsCollection.cpp:
2361         (WebCore::HTMLOptionsCollection::add):
2362         * html/HTMLTextAreaElement.cpp:
2363         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
2364         * html/HTMLTextFormControlElement.cpp:
2365         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
2366         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
2367         * html/TextFieldInputType.cpp:
2368         (WebCore::TextFieldInputType::updatePlaceholderText):
2369         * html/ValidationMessage.cpp:
2370         (WebCore::ValidationMessage::buildBubbleTree):
2371         * html/shadow/MediaControlElementTypes.cpp:
2372         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
2373         * inspector/InspectorPageAgent.cpp:
2374         (WebCore::InspectorPageAgent::getCookies):
2375         * inspector/InspectorStyleSheet.cpp:
2376         (WebCore::InspectorStyleSheet::addRule):
2377         * loader/appcache/ApplicationCacheHost.cpp:
2378         (WebCore::ApplicationCacheHost::dispatchDOMEvent):
2379         * page/DOMSelection.cpp:
2380         (WebCore::DOMSelection::deleteFromDocument):
2381         * page/DragController.cpp:
2382         (WebCore::prepareClipboardForImageDrag):
2383         * rendering/RenderTextControl.cpp:
2384         (WebCore::RenderTextControl::visiblePositionForIndex):
2385         * rendering/style/SVGRenderStyle.h:
2386         (WebCore::SVGRenderStyle::initialBaselineShiftValue):
2387         (WebCore::SVGRenderStyle::initialKerning):
2388         (WebCore::SVGRenderStyle::initialStrokeDashOffset):
2389         (WebCore::SVGRenderStyle::initialStrokeWidth):
2390         * svg/SVGAnimatedLength.cpp:
2391         (WebCore::sharedSVGLength):
2392         (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
2393         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
2394         * svg/SVGAnimatedLengthList.cpp:
2395         (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
2396         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
2397         * svg/SVGLength.cpp:
2398         (WebCore::SVGLength::SVGLength):
2399         * svg/SVGTextContentElement.cpp:
2400         (WebCore::SVGTextContentElement::textLengthAnimated):
2401         * svg/animation/SVGSMILElement.cpp:
2402         (WebCore::constructQualifiedName):
2403
2404 2013-02-07  Kentaro Hara  <haraken@chromium.org>
2405
2406         Remove #if USE(V8) from IDBRequest.h
2407         https://bugs.webkit.org/show_bug.cgi?id=109163
2408
2409         Reviewed by Andreas Kling.
2410
2411         The header included inside the #if USE(V8) macro is not used.
2412         We can simply remove it.
2413
2414         No tests. No change in behavior.
2415
2416         * Modules/indexeddb/IDBRequest.h:
2417
2418 2013-02-07  Stephen Chenney  <schenney@chromium.org>
2419
2420         GraphicsContext::drawImageBuffer is inefficient
2421         https://bugs.webkit.org/show_bug.cgi?id=104367
2422
2423         Reviewed by Dirk Schulze.
2424
2425         This patch converts all of the drawImage and drawImageBuffer
2426         convenience methods (those that take parameters of various types) to
2427         invoke the implementing method (that takes FloatRect src and dest)
2428         directly, rather than through the next-most-convenient method as was
2429         done previously. This will knock some layers off the stack compared
2430         to the existing code, and may remove one or two constructor invocations.
2431         This may be slightly more efficient, and also makes debugging simpler.
2432
2433         Also removes the unused drawImage method that takes and IntRect source
2434         area and IntRect destination. It is not invoked anywhere in a standard
2435         WebKit checkout.
2436
2437         No new tests. No change in functionality, just refactoring.
2438
2439         * platform/graphics/GraphicsContext.cpp:
2440         (WebCore::GraphicsContext::drawImage): Modify all the convenience versions to call
2441         the implementing version directly.
2442         (WebCore::GraphicsContext::drawImageBuffer): Modify all the convenience versions
2443         to call the implementing version directly.
2444         * platform/graphics/GraphicsContext.h:
2445         (GraphicsContext): Remove IntRect, IntRect version of drawImage.
2446
2447 2013-02-07  Kent Tamura  <tkent@chromium.org>
2448
2449         Conversion from localized numbers to HTML numbers should accept not only localized numbers but also HTML numbers
2450         https://bugs.webkit.org/show_bug.cgi?id=109160
2451
2452         Reviewed by Kentaro Hara.
2453
2454         For example, A French user needs to specify a number to a number input
2455         field. He might use a local decimal point, like 3,141592, or he might
2456         use the standard decimal point like 3.141592. We had better accept both
2457         of them.
2458
2459         We accepted both last year, but we changed the behavior so that we
2460         accept only localized numbers because we had some cases where an input
2461         string can be recognized as both of a localized number and the standard
2462         number. e.g. 3.141 is 3141 in French locale and 3.141 in the
2463         standard. Now we introduce a simple rule that we don't accept group
2464         separator at all. So users won't confuse even if we accept both of
2465         decimal points.
2466
2467         Test: fast/forms/number/number-l10n-input.html
2468
2469         * platform/text/PlatformLocale.cpp:
2470         (WebCore::Locale::convertFromLocalizedNumber):
2471         If the specified string contains invalid characters including group
2472         separators, just return the specified string.
2473
2474 2013-02-07  Xiaobo Wang  <xbwang@torchmobile.com.cn>
2475
2476         [BlackBerry] CHHW - Characters that are using 32 bits encoding get trunked to 16bits
2477         https://bugs.webkit.org/show_bug.cgi?id=109126
2478         PR 292540
2479
2480         Reviewed by Yong Li.
2481
2482         Change char code to 4 bytes.
2483         Need to convert UTF32 key char to UTF16 before constructing a WTF::String.
2484
2485         * platform/PlatformKeyboardEvent.h:
2486         (WebCore::PlatformKeyboardEvent::unmodifiedCharacter):
2487         (PlatformKeyboardEvent):
2488         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
2489         (WebCore::keyIdentifierForBlackBerryCharacter):
2490         (WebCore::windowsKeyCodeForBlackBerryCharacter):
2491         (WebCore::adjustCharacterFromOS):
2492         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2493
2494 2013-02-07  Mike West  <mkwst@chromium.org>
2495
2496         Replace ExceptionCode assertions with ASSERT_NO_EXCEPTION macro.
2497         https://bugs.webkit.org/show_bug.cgi?id=109044
2498
2499         Reviewed by Darin Adler.
2500
2501         The pattern:
2502
2503             ExceptionCode ec = 0;
2504             methodThatGeneratesException(ec);
2505             ASSERT(!ec);
2506
2507         is more clearly and succinctly written as:
2508
2509             methodThatGeneratesException(ASSERT_NO_EXCEPTION);
2510
2511         This patch replaces the occurances of the former that never touch 'ec'
2512         again with the latter. It does the same for 'ASSERT(ec == 0);' (and, as
2513         a drive-by, replaces 'ASSERT(ec == 0)' with 'ASSERT(!ec)' in places
2514         where it does indeed matter that 'ec' get set properly.
2515
2516         No change in behavior should result from this refactoring.
2517
2518         * Modules/indexeddb/IDBCursor.cpp:
2519         (WebCore::IDBCursor::direction):
2520         * Modules/indexeddb/IDBObjectStore.cpp:
2521         (WebCore):
2522         * Modules/indexeddb/IDBTransaction.cpp:
2523         (WebCore::IDBTransaction::mode):
2524         * dom/ContainerNode.cpp:
2525         (WebCore::ContainerNode::takeAllChildrenFrom):
2526         * dom/Document.cpp:
2527         (WebCore::Document::setTitle):
2528         * dom/MessagePort.cpp:
2529         (WebCore::MessagePort::dispatchMessages):
2530         (WebCore::MessagePort::disentanglePorts):
2531         * editing/DeleteButtonController.cpp:
2532         (WebCore::enclosingDeletableElement):
2533         (WebCore::DeleteButtonController::createDeletionUI):
2534             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
2535         (WebCore::DeleteButtonController::show):
2536             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
2537         * editing/EditorCommand.cpp:
2538         (WebCore::unionDOMRanges):
2539         * editing/ReplaceNodeWithSpanCommand.cpp:
2540         (WebCore::swapInNodePreservingAttributesAndChildren):
2541         * editing/ReplaceSelectionCommand.cpp:
2542         (WebCore::ReplacementFragment::ReplacementFragment):
2543         (WebCore::ReplacementFragment::removeNode):
2544         (WebCore::ReplacementFragment::insertNodeBefore):
2545         (WebCore::ReplacementFragment::insertFragmentForTestRendering):
2546         (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
2547         (WebCore::ReplaceSelectionCommand::insertAsListItems):
2548         * editing/SplitTextNodeCommand.cpp:
2549         (WebCore::SplitTextNodeCommand::doUnapply):
2550         * editing/TextIterator.cpp:
2551         (WebCore::CharacterIterator::range):
2552         (WebCore::BackwardsCharacterIterator::range):
2553         (WebCore::TextIterator::rangeFromLocationAndLength):
2554         (WebCore::collapsedToBoundary):
2555         * editing/htmlediting.cpp:
2556         (WebCore::createTabSpanElement):
2557         * editing/mac/EditorMac.mm:
2558         (WebCore::Editor::fontForSelection):
2559         (WebCore::Editor::fontAttributesForSelectionStart):
2560         * editing/markup.cpp:
2561         (WebCore::createMarkup):
2562         (WebCore::trimFragment):
2563         (WebCore::createFragmentFromMarkupWithContext):
2564         (WebCore::fillContainerFromString):
2565         (WebCore::createFragmentFromText):
2566         (WebCore::createFragmentFromNodes):
2567         * html/ColorInputType.cpp:
2568         (WebCore::ColorInputType::createShadowSubtree):
2569             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
2570         * html/HTMLOptionsCollection.cpp:
2571         (WebCore::HTMLOptionsCollection::add):
2572             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
2573         * html/HTMLTextAreaElement.cpp:
2574         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
2575         * html/HTMLTextFormControlElement.cpp:
2576         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
2577         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
2578         * html/TextFieldInputType.cpp:
2579         (WebCore::TextFieldInputType::updatePlaceholderText):
2580         * html/ValidationMessage.cpp:
2581         (WebCore::ValidationMessage::buildBubbleTree):
2582         * html/shadow/MediaControlElementTypes.cpp:
2583         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
2584         * inspector/InspectorPageAgent.cpp:
2585         (WebCore::InspectorPageAgent::getCookies):
2586         * inspector/InspectorStyleSheet.cpp:
2587         (WebCore::InspectorStyleSheet::addRule):
2588         * loader/appcache/ApplicationCacheHost.cpp:
2589         (WebCore::ApplicationCacheHost::dispatchDOMEvent):
2590         * page/DOMSelection.cpp:
2591         (WebCore::DOMSelection::deleteFromDocument):
2592         * page/DragController.cpp:
2593         (WebCore::prepareClipboardForImageDrag):
2594         * rendering/RenderTextControl.cpp:
2595         (WebCore::RenderTextControl::visiblePositionForIndex):
2596         * rendering/style/SVGRenderStyle.h:
2597         (WebCore::SVGRenderStyle::initialBaselineShiftValue):
2598         (WebCore::SVGRenderStyle::initialKerning):
2599         (WebCore::SVGRenderStyle::initialStrokeDashOffset):
2600         (WebCore::SVGRenderStyle::initialStrokeWidth):
2601         * svg/SVGAnimatedLength.cpp:
2602         (WebCore::sharedSVGLength):
2603         (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
2604         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
2605         * svg/SVGAnimatedLengthList.cpp:
2606         (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
2607         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
2608         * svg/SVGLength.cpp:
2609         (WebCore::SVGLength::SVGLength):
2610         * svg/SVGTextContentElement.cpp:
2611         (WebCore::SVGTextContentElement::textLengthAnimated):
2612         * svg/animation/SVGSMILElement.cpp:
2613         (WebCore::constructQualifiedName):
2614             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
2615
2616 2013-02-07  Mary Wu  <mary.wu@torchmobile.com.cn>
2617
2618         [BlackBerry] Export mimeType in NetworkJob
2619         https://bugs.webkit.org/show_bug.cgi?id=109002
2620
2621         Reviewed by Yong Li.
2622
2623         NetworkJob will analysize resource mimetype and set it to resourceResponse,
2624         we will pass it on to be used by other Streams like download stream.
2625
2626         RIM bug# 284408, internally reviewed by Liam Quinn.
2627
2628         * platform/network/blackberry/NetworkJob.cpp:
2629         (WebCore::NetworkJob::mimeType):
2630         (WebCore):
2631         * platform/network/blackberry/NetworkJob.h:
2632         (NetworkJob):
2633
2634 2013-02-07  Peter Rybin  <prybin@chromium.org>
2635
2636         Web Inspector: support JavaScript variable mutation in protocol and V8 bindings
2637         https://bugs.webkit.org/show_bug.cgi?id=107829
2638
2639         A new command is added to protocol description and the call is passed through
2640         debugger agent through injected script and debugger script down to V8 mirror
2641         API. JSC bindings got a thorw exception stub.
2642
2643         Only declarative JavaScript scopes are supported (local, closure, catch). Other
2644         scopes (global, with) are not supported by V8 and not supported by protocol, because
2645         manual approach (direct property assigment) is available for them in form of evaluate
2646         commands and is more desirable because of a complex nature of operation (it can throw
2647         exception in several cases such as exception in setter function).
2648
2649         Reviewed by Pavel Feldman.
2650
2651         Test: inspector-protocol/debugger-setVariableValue.html
2652
2653         * bindings/js/JSInjectedScriptHostCustom.cpp:
2654         (WebCore::JSInjectedScriptHost::setFunctionVariableValue):
2655         (WebCore):
2656         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2657         (WebCore::JSJavaScriptCallFrame::setVariableValue):
2658         (WebCore):
2659         * bindings/v8/DebuggerScript.js:
2660         (.):
2661         * bindings/v8/JavaScriptCallFrame.cpp:
2662         (WebCore::JavaScriptCallFrame::setVariableValue):
2663         (WebCore):
2664         * bindings/v8/JavaScriptCallFrame.h:
2665         (JavaScriptCallFrame):
2666         * bindings/v8/ScriptDebugServer.cpp:
2667         (WebCore::ScriptDebugServer::setFunctionVariableValue):
2668         (WebCore):
2669         * bindings/v8/ScriptDebugServer.h:
2670         (ScriptDebugServer):
2671         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2672         (WebCore::V8InjectedScriptHost::setFunctionVariableValueCallback):
2673         (WebCore):
2674         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
2675         (WebCore::V8JavaScriptCallFrame::setVariableValueCallback):
2676         (WebCore):
2677         * inspector/InjectedScript.cpp:
2678         (WebCore::InjectedScript::setVariableValue):
2679         (WebCore):
2680         * inspector/InjectedScript.h:
2681         (InjectedScript):
2682         * inspector/InjectedScriptHost.idl:
2683         * inspector/InjectedScriptSource.js:
2684         (.):
2685         * inspector/Inspector.json:
2686         * inspector/InspectorDebuggerAgent.cpp:
2687         (WebCore::InspectorDebuggerAgent::getFunctionDetails):
2688         (WebCore::InspectorDebuggerAgent::setVariableValue):
2689         (WebCore):
2690         * inspector/InspectorDebuggerAgent.h:
2691         (InspectorDebuggerAgent):
2692         * inspector/JavaScriptCallFrame.idl:
2693
2694 2013-02-07  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2695
2696         [CoordinatedGraphics] Use ScrollingCoordinator to track fixed layers
2697         https://bugs.webkit.org/show_bug.cgi?id=108990
2698
2699         Reviewed by Noam Rosenthal.
2700
2701         WebCore keeps ScrollingCoordinator up-to-date about whether layers are fixed or not, so we
2702         don't need to traverse the tree every frame to get this information.
2703
2704         The function ScrollingCoordinator::setLayerIsFixedToContainerLayer() is called when
2705         RenderLayerBacking is updating its graphics layers.
2706
2707         The new code also works in new situations where the previous was broken: if a layer changed
2708         from being fixed to not fixed (but still kept as a layer for other reasons), the layer will
2709         be correctly updated. Previous implementation only had logic to mark layers as fixed, but
2710         not the other way round. A manual test was added to illustrate the solved problem.
2711
2712         Testing was done with the existing manual tests that make use of "position:fixed". Automatic
2713         tests are mostly not affected by this because usage of this information affects only the
2714         UseFixedLayout mode, not used by default in WebKitTestRunner. Work to improve this situation
2715         will be tracked in bug https://bugs.webkit.org/show_bug.cgi?id=109175.
2716
2717         * CMakeLists.txt:
2718         * Target.pri:
2719         * WebCore.pri:
2720         * page/scrolling/ScrollingCoordinator.cpp:
2721         (WebCore::ScrollingCoordinator::create): create specific version of ScrollingCoordinator.
2722         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Added.
2723         (WebCore):
2724         (WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
2725         (WebCore::ScrollingCoordinatorCoordinatedGraphics::setLayerIsFixedToContainerLayer):
2726         update layer information using existing hook in ScrollingCoordinator.
2727         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Added.
2728         (WebCore):
2729         (ScrollingCoordinatorCoordinatedGraphics):
2730         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2731         (WebCore::CoordinatedGraphicsLayer::setFixedToViewport): now that setting viewport is not
2732         embedded in the synchronization work, we need to mark the layer so it is updated in the
2733         next frame.
2734         (WebCore):
2735         (WebCore::CoordinatedGraphicsLayer::flushCompositingState): remove call to syncFixedLayers().
2736         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2737         (CoordinatedGraphicsLayerClient): remove now unused syncFixedLayers() from client.
2738         (CoordinatedGraphicsLayer):
2739
2740 2013-02-07  Keishi Hattori  <keishi@webkit.org>
2741
2742         REGRESSION (r140778): Calendar Picker doesn't open when the element has the required attribute
2743         https://bugs.webkit.org/show_bug.cgi?id=109136
2744
2745         Reviewed by Kent Tamura.
2746
2747         Calendar picker was using the "Clear" button to calculate the window width.
2748         Since it doesn't exist when the input element has a required attribute,
2749         it was throwing an error. This patch fixes the width calculating logic.
2750
2751         Tests: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required-ar.html
2752                platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required.html
2753
2754         * Resources/pagepopups/calendarPicker.css:
2755         (.today-clear-area):
2756         * Resources/pagepopups/calendarPicker.js:
2757         (CalendarPicker.prototype.fixWindowSize): Fixing the logic to calculate
2758         the width. We don't want to use clear button because it doesn't exist
2759         when a value is required.
2760
2761 2013-02-07  Gustavo Noronha Silva  <gns@gnome.org>
2762
2763         Unreviewed build fix. libWebCore.la needs to be relinked when
2764         symbols.filter changes.
2765
2766         * GNUmakefile.am: add symbols.filter as a dependency for the
2767         libWebCore.la library.
2768
2769 2013-02-07  Vsevolod Vlasov  <vsevik@chromium.org>
2770
2771         Web Inspector: Closure compilation fixes
2772         https://bugs.webkit.org/show_bug.cgi?id=109131
2773
2774         Reviewed by Yury Semikhatsky.
2775
2776         * inspector/front-end/ElementsPanel.js:
2777         (WebInspector.ElementsPanel):
2778         * inspector/front-end/FileSystemMapping.js:
2779         (WebInspector.FileSystemMappingImpl.prototype.uriPrefixForPathPrefix):
2780         * inspector/front-end/IsolatedFileSystemModel.js:
2781         (WebInspector.IsolatedFileSystemModel.prototype._fileSystemRemoved):
2782         * inspector/front-end/SidebarPane.js:
2783
2784 2013-02-07  Kentaro Hara  <haraken@chromium.org>
2785
2786         Unreviewed, rolling out r142077.
2787         http://trac.webkit.org/changeset/142077
2788         https://bugs.webkit.org/show_bug.cgi?id=108579
2789
2790         fast/filesystem/workers/file-writer-empty-blob.html is broken
2791
2792         * bindings/v8/DOMDataStore.h:
2793         (WebCore::DOMDataStore::setWrapperInObject):
2794         * bindings/v8/DOMWrapperWorld.h:
2795         (DOMWrapperWorld):
2796         (WebCore::DOMWrapperWorld::isolated):
2797         * bindings/v8/V8Binding.h:
2798         (WebCore):
2799         (WebCore::worldForEnteredContextIfIsolated):
2800         * bindings/v8/V8DOMWindowShell.cpp:
2801         (WebCore::V8DOMWindowShell::initializeIfNeeded):
2802         * bindings/v8/V8GCController.cpp:
2803         (WebCore::WrapperVisitor::WrapperVisitor):
2804         (WebCore):
2805         (WebCore::gcTree):
2806         (WebCore::V8GCController::didCreateWrapperForNode):
2807         (WebCore::V8GCController::gcPrologue):
2808         (WebCore::V8GCController::minorGCPrologue):
2809         (WebCore::V8GCController::majorGCPrologue):
2810         * bindings/v8/V8GCController.h:
2811         (V8GCController):
2812
2813 2013-02-07  Tony Gentilcore  <tonyg@chromium.org>
2814
2815         Call XSSAuditor.filterToken() from threaded HTML parser
2816         https://bugs.webkit.org/show_bug.cgi?id=107603
2817
2818         Reviewed by Adam Barth.
2819
2820         With this patch we now pass 180 of 182 tests in http/tests/security/xssAuditor.
2821
2822         We do this by creating aan XSSAuditor on the main thread and passing ownership of them to the BackgroundHTMLParser upon its creation.
2823
2824         Then the background thread calls filterToken() and stores the resulting XSSInfo (if any) on the CompactHTMLToken for the main thread to handle.
2825
2826         This involved trimming the XSSAuditor to only depend on the TextEncoding instead of the whole TextResourceDecoder.
2827
2828         No new tests because covered by existing tests.
2829
2830         * html/parser/BackgroundHTMLParser.cpp:
2831         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
2832         (WebCore::BackgroundHTMLParser::pumpTokenizer):
2833         (WebCore::BackgroundHTMLParser::createPartial):
2834         * html/parser/BackgroundHTMLParser.h:
2835         (WebCore):
2836         (WebCore::BackgroundHTMLParser::create):
2837         (BackgroundHTMLParser):
2838         * html/parser/HTMLDocumentParser.cpp:
2839         (WebCore::HTMLDocumentParser::pumpTokenizer):
2840         (WebCore::HTMLDocumentParser::startBackgroundParser):
2841         * html/parser/HTMLSourceTracker.cpp:
2842         (WebCore::HTMLSourceTracker::start):
2843         (WebCore::HTMLSourceTracker::end):
2844         * html/parser/HTMLSourceTracker.h: Change the HTMLInputStream args to SegmentedString because the background thread only has a BackgroundHTMLInputStream.
2845         (HTMLSourceTracker):
2846         * html/parser/HTMLViewSourceParser.cpp:
2847         (WebCore::HTMLViewSourceParser::pumpTokenizer):
2848         * html/parser/XSSAuditor.cpp:
2849         (WebCore::fullyDecodeString):
2850         (WebCore::XSSAuditor::XSSAuditor):
2851         (WebCore::XSSAuditor::init): Copies necessary to make isSafeToSendToAnotherThread() happy.
2852         (WebCore::XSSAuditor::decodedSnippetForName):
2853         (WebCore::XSSAuditor::decodedSnippetForAttribute):
2854         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
2855         (WebCore::XSSAuditor::isSafeToSendToAnotherThread): Check that all String and KURL members are safe to send to another thread.
2856         (WebCore):
2857         * html/parser/XSSAuditor.h:
2858         (WebCore):
2859         (WebCore::FilterTokenRequest::FilterTokenRequest):
2860         (FilterTokenRequest):
2861         (XSSAuditor):
2862
2863 2013-02-07  ChangSeok Oh  <shivamidow@gmail.com>
2864
2865         [GTK][AC] Implement opacity animation with clutter ac backend
2866         https://bugs.webkit.org/show_bug.cgi?id=108961
2867
2868         Reviewed by Gustavo Noronha Silva.
2869
2870         Implement opacity animation with clutter ac backend.
2871         Almost all implementations of GraphicsLayerClutter are based on mac port's one.
2872         PlatformClutterAnimation interfaces are also similar with mac port, but they are implemented
2873         with native clutter APIs.
2874         This patch includes only opacity animation related changes, so many APIs might be empty.
2875         Remained animations like rotation and translate will be dealt in another patches.
2876
2877         Covered by existing animation tests.
2878
2879         * GNUmakefile.list.am:
2880         * platform/graphics/clutter/GraphicsLayerActor.cpp:
2881         (graphicsLayerActorGetAnimationForKey):
2882         * platform/graphics/clutter/GraphicsLayerActor.h:
2883         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2884         (WebCore):
2885         (WebCore::propertyIdToString):
2886         (WebCore::animationIdentifier):
2887         (WebCore::animationHasStepsTimingFunction):
2888         (WebCore::GraphicsLayerClutter::setOpacity):
2889         (WebCore::GraphicsLayerClutter::updateAnimations):
2890         (WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers):
2891         (WebCore::GraphicsLayerClutter::setupAnimation):
2892         (WebCore::GraphicsLayerClutter::timingFunctionForAnimationValue):
2893         (WebCore::GraphicsLayerClutter::createBasicAnimation):
2894         (WebCore::GraphicsLayerClutter::createKeyframeAnimation):
2895         (WebCore::GraphicsLayerClutter::setTransformAnimationKeyframes):
2896         (WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
2897         (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
2898         (WebCore::GraphicsLayerClutter::createAnimationFromKeyframes):
2899         (WebCore::GraphicsLayerClutter::addAnimation):
2900         (WebCore::GraphicsLayerClutter::removeClutterAnimationFromLayer):
2901         (WebCore::GraphicsLayerClutter::pauseClutterAnimationOnLayer):
2902         (WebCore::GraphicsLayerClutter::setAnimationOnLayer):
2903         (WebCore::GraphicsLayerClutter::setAnimationEndpoints):
2904         (WebCore::GraphicsLayerClutter::setAnimationKeyframes):
2905         (WebCore::GraphicsLayerClutter::animatedLayer):
2906         * platform/graphics/clutter/GraphicsLayerClutter.h:
2907         (GraphicsLayerClutter):
2908         (WebCore::GraphicsLayerClutter::LayerPropertyAnimation::LayerPropertyAnimation):
2909         (LayerPropertyAnimation):
2910         (WebCore::GraphicsLayerClutter::AnimationProcessingAction::AnimationProcessingAction):
2911         (AnimationProcessingAction):
2912         * platform/graphics/clutter/PlatformClutterAnimation.cpp: Added.
2913         (WebCore):
2914         (WebCore::timelineStartedCallback):
2915         (WebCore::toClutterAnimationMode):
2916         (WebCore::PlatformClutterAnimation::stringToAnimatedPropertyType):
2917         (WebCore::PlatformClutterAnimation::create):
2918         (WebCore::PlatformClutterAnimation::PlatformClutterAnimation):
2919         (WebCore::PlatformClutterAnimation::~PlatformClutterAnimation):
2920         (WebCore::PlatformClutterAnimation::supportsValueFunction):
2921         (WebCore::PlatformClutterAnimation::beginTime):
2922         (WebCore::PlatformClutterAnimation::setBeginTime):
2923         (WebCore::PlatformClutterAnimation::duration):
2924         (WebCore::PlatformClutterAnimation::setDuration):
2925         (WebCore::PlatformClutterAnimation::speed):
2926         (WebCore::PlatformClutterAnimation::setSpeed):
2927         (WebCore::PlatformClutterAnimation::timeOffset):
2928         (WebCore::PlatformClutterAnimation::setTimeOffset):
2929         (WebCore::PlatformClutterAnimation::repeatCount):
2930         (WebCore::PlatformClutterAnimation::setRepeatCount):
2931         (WebCore::PlatformClutterAnimation::autoreverses):
2932         (WebCore::PlatformClutterAnimation::setAutoreverses):
2933         (WebCore::PlatformClutterAnimation::fillMode):
2934         (WebCore::PlatformClutterAnimation::setFillMode):
2935         (WebCore::PlatformClutterAnimation::setTimingFunction):
2936         (WebCore::PlatformClutterAnimation::copyTimingFunctionFrom):
2937         (WebCore::PlatformClutterAnimation::isRemovedOnCompletion):
2938         (WebCore::PlatformClutterAnimation::setRemovedOnCompletion):
2939         (WebCore::PlatformClutterAnimation::isAdditive):
2940         (WebCore::PlatformClutterAnimation::setAdditive):
2941         (WebCore::PlatformClutterAnimation::valueFunction):
2942         (WebCore::PlatformClutterAnimation::setValueFunction):
2943         (WebCore::PlatformClutterAnimation::setFromValue):
2944         (WebCore::PlatformClutterAnimation::copyFromValueFrom):
2945         (WebCore::PlatformClutterAnimation::setToValue):
2946         (WebCore::PlatformClutterAnimation::copyToValueFrom):
2947         (WebCore::PlatformClutterAnimation::setValues):
2948         (WebCore::PlatformClutterAnimation::copyValuesFrom):
2949         (WebCore::PlatformClutterAnimation::setKeyTimes):
2950         (WebCore::PlatformClutterAnimation::copyKeyTimesFrom):
2951         (WebCore::PlatformClutterAnimation::setTimingFunctions):
2952         (WebCore::PlatformClutterAnimation::copyTimingFunctionsFrom):
2953         (WebCore::PlatformClutterAnimation::animationDidStart):
2954         (WebCore::PlatformClutterAnimation::timeline):
2955         (WebCore::PlatformClutterAnimation::addOpacityTransition):
2956         (WebCore::PlatformClutterAnimation::addAnimationForKey):
2957         (WebCore::PlatformClutterAnimation::removeAnimationForKey):
2958         * platform/graphics/clutter/PlatformClutterAnimation.h: Added.
2959         (WebCore):
2960         (PlatformClutterAnimation):
2961         (WebCore::PlatformClutterAnimation::animationType):
2962
2963 2013-02-07  Andrey Lushnikov  <lushnikov@chromium.org>
2964
2965         Web Inspector: highlight matching braces in DTE.
2966         https://bugs.webkit.org/show_bug.cgi?id=108697
2967
2968         Reviewed by Pavel Feldman.
2969
2970         Implement BraceMatcher class which for given position in textModel
2971         will respond with enclosing brace pair for that position.
2972         Make use of this class in DefaultTextEditor by handling
2973         selectionChange event. Make use of this class in "_closingBlockOffset"
2974         method of TextEditorMainPanel as this method implements similar
2975         functionality.
2976
2977         New test: inspector/editor/brace-matcher.html
2978
2979         * inspector/front-end/DefaultTextEditor.js:
2980         (WebInspector.TextEditorMainPanel):
2981         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
2982         (WebInspector.TextEditorMainPanel.prototype._closingBlockOffset):
2983         (WebInspector.TextEditorMainPanel.prototype._handleSelectionChange):
2984         (WebInspector.TextEditorMainPanel.BraceHighlightController):
2985         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
2986         * inspector/front-end/TextEditorHighlighter.js:
2987         (WebInspector.TextEditorHighlighter.prototype._highlightLines):
2988         * inspector/front-end/TextEditorModel.js:
2989         (WebInspector.TextEditorModel.endsWithBracketRegex):
2990         (WebInspector.TextEditorModel.endsWithBracketRegex.):
2991         * inspector/front-end/textEditor.css:
2992         (.text-editor-brace-match):
2993
2994 2013-02-05  Eunmi Lee  <eunmi15.lee@samsung.com> and Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
2995
2996         [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
2997         https://bugs.webkit.org/show_bug.cgi?id=97173
2998
2999         Reviewed by Kenneth Rohde Christiansen, signed-off by Benjamin Poulain.
3000
3001         Remove codes to initialize and shutdown the EFL libraries from
3002         RunLoopEfl.cpp. Initialization and shutdown will be done in the
3003         ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web
3004         process.
3005
3006         No new tests. This patch doesn't change behavior.
3007
3008         * platform/efl/RunLoopEfl.cpp:
3009         (WebCore::RunLoop::RunLoop):
3010         (WebCore::RunLoop::~RunLoop):
3011
3012 2013-02-07  Ilya Tikhonovsky  <loislo@chromium.org>
3013
3014         Unreviewed fix for inspector tests in debug.
3015         m_frontend should be initialized in constructor.
3016
3017         * inspector/InspectorMemoryAgent.cpp:
3018         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
3019
3020 2013-02-07  Yury Semikhatsky  <yurys@chromium.org>
3021
3022         Web Inspector: reduce number of native memory instrumentation categories
3023         https://bugs.webkit.org/show_bug.cgi?id=109146
3024
3025         Reviewed by Pavel Feldman.
3026
3027         Merged some of memory instrumentation categories.
3028
3029         * dom/WebCoreMemoryInstrumentation.cpp:
3030         (WebCore):
3031         * inspector/front-end/NativeMemorySnapshotView.js:
3032         (WebInspector.MemoryBlockViewProperties._initialize):
3033         * platform/PlatformMemoryInstrumentation.cpp:
3034         (WebCore):
3035
3036 2013-02-04  Kentaro Hara  <haraken@chromium.org>
3037
3038         [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise
3039         https://bugs.webkit.org/show_bug.cgi?id=108579
3040
3041         Reviewed by Adam Barth.
3042
3043         Currently V8GCController::m_edenNodes stores a list of nodes whose
3044         wrappers have been created since the latest GC. The reason why we
3045         needed m_edenNodes is that there was no way to know a list of wrappers
3046         in the new space of V8. By using m_edenNodes, we had been approximating
3047         'wrappers in the new space' by 'wrappers that have been created since
3048         the latest GC'.
3049
3050         Now V8 provides VisitHandlesForPartialDependence(), with which WebKit
3051         can know a list of wrappers in the new space. By using the API, we can
3052         remove V8GCController::m_edenNodes. The benefit is that (1) we no longer
3053         need to keep m_edenNodes and that (2) it enables more precise minor
3054         DOM GC (Remember that m_edenNodes was just an approximation).
3055
3056         Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940
3057         The benchmark runs 300 iterations, each of which creates 100000 elements.
3058         The benchmark measures average, min, median, max and stdev of execution times
3059         of the 300 iterations. This will tell us the worst-case overhead of this change.
3060
3061         Before:
3062           mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms
3063
3064         After:
3065           mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms
3066
3067         As shown above, I couldn't observe any performance regression.
3068
3069         No tests. No change in behavior.
3070
3071         * bindings/v8/DOMDataStore.h:
3072         (WebCore::DOMDataStore::setWrapperInObject):
3073         * bindings/v8/DOMWrapperWorld.h:
3074         (DOMWrapperWorld):
3075         (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck):
3076         * bindings/v8/V8Binding.h:
3077         (WebCore):
3078         (WebCore::worldForEnteredContextIfIsolated):
3079         (WebCore::worldForEnteredContextWithoutContextCheck):
3080         * bindings/v8/V8DOMWindowShell.cpp:
3081         (WebCore::V8DOMWindowShell::initializeIfNeeded):
3082         * bindings/v8/V8GCController.cpp:
3083         (WebCore::gcTree):
3084         (WebCore):
3085         (MinorGCWrapperVisitor):
3086         (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor):
3087         (WebCore::MinorGCWrapperVisitor::notifyFinished):
3088         (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor):
3089         (WebCore::V8GCController::gcPrologue):
3090         (WebCore::V8GCController::minorGCPrologue):
3091         (WebCore::V8GCController::majorGCPrologue):
3092         * bindings/v8/V8GCController.h:
3093         (V8GCController):
3094
3095 2013-02-06  Kent Tamura  <tkent@chromium.org>
3096
3097         REGRESSION(r141195): INPUT_MULTIPLE_FIELDS_UI: Space in a placeholder string is removed
3098         https://bugs.webkit.org/show_bug.cgi?id=109132
3099
3100         Reviewed by Hajime Morita.
3101
3102         <input  type=date> should be shown in Japanese UI as:
3103         [ 年 /月/日]
3104         But it is shown wrongly since r141195:
3105         [年 /月/日]
3106
3107         We should use white-space:pre.
3108
3109         No new tests. This change is not testable in WebKit because this
3110         requires a Japanese-localized UI string of Chromium.
3111
3112         * css/html.css:
3113         (input::-webkit-datetime-edit-fields-wrapper):
3114         Use white-space:pre instead of nowrap.
3115
3116 2013-02-06  Kentaro Hara  <haraken@chromium.org>
3117
3118         Remove DOMWindow::parseModalDialogFeatures()
3119         https://bugs.webkit.org/show_bug.cgi?id=109139
3120
3121         Reviewed by Kent Tamura.
3122
3123         No one uses the method. FIXME is saying:
3124
3125           // FIXME: We can remove this function once V8 showModalDialog is changed to use DOMWindow.
3126
3127         Given that V8's showModalDialog() is now using DOMWindow, we can remove it.
3128
3129         No tests. No change in behavior.
3130
3131         * page/DOMWindow.cpp:
3132         * page/DOMWindow.h:
3133         (DOMWindow):
3134
3135 2013-02-06  Ilya Tikhonovsky  <loislo@chromium.org>
3136
3137         Web Inspector: Native Memory Instrumentation: reduce native heap snapshot runtime memory footprint
3138         https://bugs.webkit.org/show_bug.cgi?id=108824
3139
3140         Reviewed by Yury Semikhatsky.
3141
3142         New event was added into Memory domain addNativeSnapshotChunk.
3143         The content of HeapGraphSerializer is completely rewritten according to new API.
3144         Now it collects strings, nodes, edges and id2id map and pushes when the collected items count exceed a limit.
3145         On the frontend side I added new method for the new event and fixed the postprocessing step.
3146         MemoryInstrumentation was slightly changed. Now it reports base to real address map only after reporting the node with real address.
3147
3148         * inspector/HeapGraphSerializer.cpp:
3149         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
3150         (WebCore::HeapGraphSerializer::pushUpdateIfNeed):
3151         (WebCore):
3152         (WebCore::HeapGraphSerializer::pushUpdate):
3153         (WebCore::HeapGraphSerializer::reportNode):
3154         (WebCore::HeapGraphSerializer::reportNodeImpl):
3155         (WebCore::HeapGraphSerializer::reportEdge):
3156         (WebCore::HeapGraphSerializer::reportEdgeImpl):
3157         (WebCore::HeapGraphSerializer::reportLeaf):
3158         (WebCore::HeapGraphSerializer::reportBaseAddress):
3159         (WebCore::HeapGraphSerializer::finish):
3160         (WebCore::HeapGraphSerializer::reportMemoryUsage):
3161         (WebCore::HeapGraphSerializer::addString):
3162         (WebCore::HeapGraphSerializer::toNodeId):
3163         (WebCore::HeapGraphSerializer::addRootNode):
3164         * inspector/HeapGraphSerializer.h:
3165         (HeapGraphSerializer):
3166         * inspector/Inspector.json:
3167         * inspector/InspectorController.cpp:
3168         (WebCore::InspectorController::processMemoryDistribution):
3169         * inspector/InspectorMemoryAgent.cpp:
3170         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionMap):
3171         (WebCore):
3172         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
3173         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
3174         (WebCore::InspectorMemoryAgent::setFrontend):
3175         (WebCore::InspectorMemoryAgent::clearFrontend):
3176         * inspector/InspectorMemoryAgent.h:
3177         (InspectorMemoryAgent):
3178         * inspector/front-end/NativeHeapSnapshot.js:
3179         (WebInspector.NativeHeapSnapshot):
3180         (WebInspector.NativeHeapSnapshotNode.prototype.classIndex):
3181         (WebInspector.NativeHeapSnapshotNode.prototype.id):
3182         (WebInspector.NativeHeapSnapshotNode.prototype.name):
3183         (WebInspector.NativeHeapSnapshotNode.prototype.serialize):
3184         * inspector/front-end/NativeMemorySnapshotView.js:
3185         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
3186         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked):
3187         (WebInspector.NativeSnapshotProfileHeader):
3188         (WebInspector.NativeSnapshotProfileHeader.prototype.startSnapshotTransfer):
3189         (WebInspector.NativeSnapshotProfileHeader.prototype.addNativeSnapshotChunk):
3190         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
3191         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
3192         (WebInspector.NativeMemoryBarChart.prototype._updateStats):
3193         * inspector/front-end/ProfilesPanel.js:
3194         (WebInspector.ProfilesPanel):
3195         (WebInspector.MemoryDispatcher):
3196         (WebInspector.MemoryDispatcher.prototype.addNativeSnapshotChunk):
3197
3198 2013-02-03  Kentaro Hara  <haraken@chromium.org>
3199
3200         WebKit's focus events are UIEvents (instead of FocusEvent) and thus don't expose .relatedTarget
3201         https://bugs.webkit.org/show_bug.cgi?id=76216
3202
3203         Reviewed by Eric Seidel.
3204
3205         Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-FocusEvent
3206
3207         This patch creates a new FocusEvent class with a relatedTarget attribute.
3208         Now when focusin or focusout events are dispatched, a FocusEvent is created with
3209         the relatedTarget attribute set accordingly.
3210
3211         Test: fast/events/related-target-focusevent.html
3212
3213         * CMakeLists.txt:
3214         * DerivedSources.cpp:
3215         * DerivedSources.make:
3216         * DerivedSources.pri:
3217         * GNUmakefile.list.am:
3218         * Target.pri:
3219         * WebCore.gypi:
3220         * WebCore.xcodeproj/project.pbxproj:
3221         * dom/DOMAllInOne.cpp:
3222         * dom/Event.cpp:
3223         (WebCore::Event::isFocusEvent):
3224         (WebCore):
3225         * dom/Event.h:
3226         (Event):
3227         * dom/EventContext.cpp:
3228         (WebCore::EventContext::handleLocalEvents):
3229         * dom/EventNames.in:
3230         * dom/FocusEvent.h: Added.
3231         (WebCore):
3232         (FocusEvent):
3233         (WebCore::FocusEvent::create):
3234         (WebCore::FocusEvent::relatedTarget):
3235         (WebCore::FocusEvent::setRelatedTarget):
3236         (WebCore::toFocusEvent):
3237         * dom/FocusEvent.idl: Added.
3238         * dom/Node.cpp:
3239         (WebCore::Node::dispatchFocusInEvent):
3240         (WebCore::Node::dispatchFocusOutEvent):
3241
3242 2013-02-06  Kent Tamura  <tkent@chromium.org>
3243
3244         Fix style of RenderTheme.cpp and RenderThemeChromiumWin.h
3245         https://bugs.webkit.org/show_bug.cgi?id=109137
3246
3247         Reviewed by Kentaro Hara.
3248
3249         No new tests. Just style fix.
3250
3251         * rendering/RenderTheme.cpp:
3252         (WebCore::RenderTheme::adjustStyle):
3253         (WebCore::RenderTheme::paint):
3254         (WebCore::RenderTheme::paintBorderOnly):
3255         (WebCore::RenderTheme::paintDecorations):
3256         (WebCore::RenderTheme::isControlStyled):
3257         (WebCore::RenderTheme::adjustButtonStyle):
3258         (WebCore::RenderTheme::systemColor):
3259         * rendering/RenderThemeChromiumWin.h:
3260         (WebCore::ThemeData::ThemeData):
3261         (ThemeData):
3262         (RenderThemeChromiumWin):
3263         (WebCore::RenderThemeChromiumWin::RenderThemeChromiumWin):
3264         (WebCore::RenderThemeChromiumWin::~RenderThemeChromiumWin):
3265
3266 2013-02-06  Kent Tamura  <tkent@chromium.org>
3267
3268         Fix style of Chrome.h and Page.h
3269         https://bugs.webkit.org/show_bug.cgi?id=109138
3270
3271         Reviewed by Ryosuke Niwa.
3272
3273         No new tests. Just style fixes.
3274
3275         * page/Chrome.h:
3276         (WebCore):
3277         (Chrome):
3278         (WebCore::Chrome::client):
3279         * page/Page.h:
3280         (JSC):
3281         (WebCore):
3282         (WebCore::ArenaSize::ArenaSize):
3283         (ArenaSize):
3284         (Page):
3285         (PageClients):
3286         (WebCore::Page::theme):
3287         (WebCore::Page::canStartMedia):
3288         (WebCore::Page::editorClient):
3289         (WebCore::Page::plugInClient):
3290         (WebCore::Page::mainFrame):
3291         (WebCore::Page::groupPtr):
3292         (WebCore::Page::incrementSubframeCount):
3293         (WebCore::Page::decrementSubframeCount):
3294         (WebCore::Page::subframeCount):
3295         (WebCore::Page::chrome):
3296         (WebCore::Page::dragCaretController):
3297         (WebCore::Page::dragController):
3298         (WebCore::Page::focusController):
3299         (WebCore::Page::contextMenuController):
3300         (WebCore::Page::inspectorController):
3301         (WebCore::Page::pointerLockController):
3302         (WebCore::Page::validationMessageClient):
3303         (WebCore::Page::settings):
3304         (WebCore::Page::progress):
3305         (WebCore::Page::backForward):
3306         (WebCore::Page::featureObserver):
3307         (WebCore::Page::viewMode):
3308         (WebCore::Page::setTabKeyCyclesThroughElements):
3309         (WebCore::Page::tabKeyCyclesThroughElements):
3310         (WebCore::Page::scheduledRunLoopPairs):
3311         (WebCore::Page::defersLoading):
3312         (WebCore::Page::mediaVolume):
3313         (WebCore::Page::pageScaleFactor):
3314         (WebCore::Page::deviceScaleFactor):
3315         (WebCore::Page::shouldSuppressScrollbarAnimations):
3316         (WebCore::Page::pagination):
3317         (WebCore::Page::isOnscreen):
3318         (WebCore::Page::scriptedAnimationsSuspended):
3319         (WebCore::Page::debugger):
3320         (WebCore::Page::hasCustomHTMLTokenizerTimeDelay):
3321         (WebCore::Page::customHTMLTokenizerTimeDelay):
3322         (WebCore::Page::hasCustomHTMLTokenizerChunkSize):
3323         (WebCore::Page::customHTMLTokenizerChunkSize):
3324         (WebCore::Page::areMemoryCacheClientCallsEnabled):
3325         (WebCore::Page::setEditable):
3326         (WebCore::Page::isEditable):
3327         (WebCore::Page::displayID):
3328         (WebCore::Page::layoutMilestones):
3329         (WebCore::Page::setIsPainting):
3330         (WebCore::Page::isPainting):
3331         (WebCore::Page::alternativeTextClient):
3332         (WebCore::Page::checkSubframeCountConsistency):
3333         (WebCore::Page::group):
3334
3335 2013-02-06  Mike West  <mkwst@chromium.org>
3336
3337         Entity-header extension headers honored on 304 responses.
3338         https://bugs.webkit.org/show_bug.cgi?id=72414
3339
3340         Reviewed by Alexey Proskuryakov.
3341
3342         This patch ports Chromium's network stack logic governing header
3343         updates after resource revalidation. Generally, headers sent with 304
3344         responses ought to update the original cached resource's headers.
3345         Certain headers should never be sent with 304 responses, and we should
3346         ignore them if a misconfigured server sends them anyway.
3347
3348         Currently, WebCore ignores all headers prefixed with 'content-'. This
3349         patch adds 'x-content-' and 'x-webkit-' to the list, as well as specific
3350         headers like 'upgrade', 'trailer', and others that the Chromium network
3351         stack currently ignores.
3352
3353         The tests verify that those headers with visible effect are correctly
3354         handled: 'x-frame-options', 'content-security-policy', and
3355         'x-xss-protection'.
3356
3357         Tests: http/tests/security/XFrameOptions/x-frame-options-cached.html
3358                http/tests/security/contentSecurityPolicy/cached-frame-csp.html
3359                http/tests/security/xssAuditor/cached-frame.html
3360
3361         * loader/cache/CachedResource.cpp:
3362         (WebCore):
3363         (WebCore::CachedResource::updateResponseAfterRevalidation):
3364             This patch adds two arrays containing the specific headers to
3365             ignore and the prefixes to ignore. These lists are processed in
3366             shouldUpdateHeaderAfterRevalidation.
3367             CachedResource::updateResponseAfterRevalidation relies on this new
3368             method when processing revalidated resources.
3369
3370         * loader/cache/CachedResource.cpp:
3371         (WebCore):
3372         (WebCore::shouldUpdateHeaderAfterRevalidation):
3373         (WebCore::CachedResource::updateResponseAfterRevalidation):
3374
3375 2013-02-06  Tom Sepez  <tsepez@chromium.org>
3376
3377         document.referrer leakage with XSS Auditor page block
3378         https://bugs.webkit.org/show_bug.cgi?id=109089
3379
3380         Reviewed by Adam Barth.
3381
3382         Pass "about:blank" as referrer instead of "" so that the actual page
3383         is not leaked when empty referrers are replaced later on in the
3384         request.
3385         
3386         * html/parser/XSSAuditorDelegate.cpp:
3387         (WebCore::XSSAuditorDelegate::didBlockScript):
3388
3389 2013-02-06  Kentaro Hara  <haraken@chromium.org>
3390
3391         [V8] Make an Isolate parameter mandatory in GetTemplate() and GetRawTemplate()
3392         https://bugs.webkit.org/show_bug.cgi?id=109026
3393
3394         Reviewed by Adam Barth.
3395
3396         Now it's time to kill an optional Isolate parameter.
3397
3398         No tests. No change in behavior.
3399
3400         * bindings/scripts/CodeGeneratorV8.pm:
3401         (GenerateHeader):
3402         (GenerateNamedConstructorCallback):
3403         (GenerateImplementation):
3404         * bindings/scripts/test/V8/V8Float64Array.cpp:
3405         (WebCore::V8Float64Array::GetRawTemplate):
3406         (WebCore::V8Float64Array::GetTemplate):
3407         * bindings/scripts/test/V8/V8Float64Array.h:
3408         (V8Float64Array):
3409         (WebCore::V8Float64Array::installPerContextPrototypeProperties):
3410         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3411         (WebCore::V8TestActiveDOMObject::GetRawTemplate):
3412         (WebCore::V8TestActiveDOMObject::GetTemplate):
3413         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
3414         (V8TestActiveDOMObject):
3415         (WebCore::V8TestActiveDOMObject::installPerContextPrototypeProperties):
3416         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3417         (WebCore::V8TestCustomNamedGetter::GetRawTemplate):
3418         (WebCore::V8TestCustomNamedGetter::GetTemplate):
3419         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
3420         (V8TestCustomNamedGetter):
3421         (WebCore::V8TestCustomNamedGetter::installPerContextPrototypeProperties):
3422         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3423         (WebCore::V8TestEventConstructor::GetRawTemplate):
3424         (WebCore::V8TestEventConstructor::GetTemplate):
3425         * bindings/scripts/test/V8/V8TestEventConstructor.h:
3426         (V8TestEventConstructor):
3427         (WebCore::V8TestEventConstructor::installPerContextPrototypeProperties):
3428         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3429         (WebCore::V8TestEventTarget::GetRawTemplate):
3430         (WebCore::V8TestEventTarget::GetTemplate):
3431         * bindings/scripts/test/V8/V8TestEventTarget.h:
3432         (V8TestEventTarget):
3433         (WebCore::V8TestEventTarget::installPerContextPrototypeProperties):
3434         * bindings/scripts/test/V8/V8TestException.cpp:
3435         (WebCore::V8TestException::GetRawTemplate):
3436         (WebCore::V8TestException::GetTemplate):
3437         * bindings/scripts/test/V8/V8TestException.h:
3438         (V8TestException):
3439         (WebCore::V8TestException::installPerContextPrototypeProperties):
3440         * bindings/scripts/test/V8/V8TestInterface.cpp:
3441         (WebCore::V8TestInterface::GetRawTemplate):
3442         (WebCore::V8TestInterface::GetTemplate):
3443         * bindings/scripts/test/V8/V8TestInterface.h:
3444         (V8TestInterface):
3445         (WebCore::V8TestInterface::installPerContextPrototypeProperties):
3446         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3447         (WebCore::V8TestMediaQueryListListener::GetRawTemplate):
3448         (WebCore::V8TestMediaQueryListListener::GetTemplate):
3449         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
3450         (V8TestMediaQueryListListener):
3451         (WebCore::V8TestMediaQueryListListener::installPerContextPrototypeProperties):
3452         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3453         (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
3454         (WebCore::V8TestNamedConstructor::GetRawTemplate):
3455         (WebCore::V8TestNamedConstructor::GetTemplate):
3456         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
3457         (V8TestNamedConstructor):
3458         (WebCore::V8TestNamedConstructor::installPerContextPrototypeProperties):
3459         * bindings/scripts/test/V8/V8TestNode.cpp:
3460         (WebCore::V8TestNode::GetRawTemplate):
3461         (WebCore::V8TestNode::GetTemplate):
3462         * bindings/scripts/test/V8/V8TestNode.h:
3463         (V8TestNode):
3464         (WebCore::V8TestNode::installPerContextPrototypeProperties):
3465         * bindings/scripts/test/V8/V8TestObj.cpp:
3466         (WebCore::V8TestObj::GetRawTemplate):
3467         (WebCore::V8TestObj::GetTemplate):
3468         (WebCore::V8TestObj::installPerContextPrototypeProperties):
3469         * bindings/scripts/test/V8/V8TestObj.h:
3470         (V8TestObj):
3471         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
3472         (WebCore::V8TestOverloadedConstructors::GetRawTemplate):
3473         (WebCore::V8TestOverloadedConstructors::GetTemplate):
3474         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
3475         (V8TestOverloadedConstructors):
3476         (WebCore::V8TestOverloadedConstructors::installPerContextPrototypeProperties):
3477         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3478         (WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate):
3479         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
3480         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
3481         (V8TestSerializedScriptValueInterface):
3482         (WebCore::V8TestSerializedScriptValueInterface::installPerContextPrototypeProperties):
3483         * bindings/v8/V8PerContextData.cpp:
3484         (WebCore::V8PerContextData::constructorForTypeSlowCase):
3485         * bindings/v8/WrapperTypeInfo.h:
3486         (WebCore):
3487         (WebCore::WrapperTypeInfo::installPerContextPrototypeProperties):
3488
3489 2013-02-06  Terry Anderson  <tdanderson@chromium.org>
3490
3491         Add support for gesture scroll events that do not propagate to enclosing scrollables
3492         https://bugs.webkit.org/show_bug.cgi?id=108849
3493
3494         Reviewed by Antonio Gomes.
3495
3496         Tests: fast/events/touch/gesture/touch-gesture-scroll-div-not-propagated.html
3497                fast/events/touch/gesture/touch-gesture-scroll-iframe-not-propagated.html
3498                fast/events/touch/gesture/touch-gesture-scroll-page-not-propagated.html
3499
3500         Rename RenderLayer::scrollByRecursively() to RenderLayer::scrollBy() and add a parameter
3501         of type RenderLayer::ScrollPropagation to specify whether or not the scroll should
3502         propagate to its parent by recursing. Implement RenderLayer::scrollByRecursively() as a
3503         call to RenderLayer::scrollBy() with argument RenderLayer::ShouldPropagateScroll so
3504         that all existing calls to the function still produce the correct behavior.
3505
3506         In EventHandler::handleGestureScrollUpdate(), call RenderLayer::scrollBy() with
3507         argument RenderLayer::ShouldPropagateScroll if |gestureEvent| is a GestureScrollUpdate
3508         or instead with argument RenderLayer::DontPropagateScroll if |gestureEvent| is a
3509         GestureScrollUpdateWithoutPropagation.
3510
3511         * dom/GestureEvent.cpp:
3512         (WebCore::GestureEvent::create):
3513         * page/EventHandler.cpp:
3514         (WebCore::EventHandler::handleGestureEvent):
3515         (WebCore::EventHandler::handleGestureScrollUpdate):
3516         * platform/PlatformEvent.h:
3517         * platform/Scrollbar.cpp:
3518         (WebCore::Scrollbar::gestureEvent):
3519         * platform/chromium/PopupContainer.cpp:
3520         (WebCore::PopupContainer::handleGestureEvent):
3521         * rendering/RenderLayer.cpp:
3522         (WebCore::RenderLayer::scrollByRecursively):
3523         (WebCore):
3524         (WebCore::RenderLayer::scrollBy):
3525         * rendering/RenderLayer.h:
3526
3527 2013-02-06  Ojan Vafai  <ojan@chromium.org>
3528
3529         [Chromium] table-section-overflow-clip-crash.html hits an assert
3530         https://bugs.webkit.org/show_bug.cgi?id=108594
3531
3532         Reviewed by Levi Weintraub.
3533
3534         When a counter calls setNeedsLayout, it also marks it's containing blocks
3535         as needing layout, so we need to clear the setNeedsLayoutIsForbidden bit on the
3536         containing blocks as well as the counter itself.
3537
3538         Also, use RAII objects for all the places where we clear this bit and make
3539         the setter/getter for it private to RenderObject.
3540
3541         * rendering/RenderCounter.cpp:
3542         (WebCore::RenderCounter::computePreferredLogicalWidths):
3543         * rendering/RenderObject.cpp:
3544         (WebCore::RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope):
3545         (WebCore::RenderObject::markContainingBlocksForLayout):
3546         * rendering/RenderObject.h:
3547         (SetLayoutNeededForbiddenScope):
3548         (RenderObject):
3549         (WebCore::RenderObject::isSetNeedsLayoutForbidden):
3550         (WebCore::RenderObject::setNeedsLayoutIsForbidden):
3551         * rendering/RenderQuote.cpp:
3552         (WebCore::RenderQuote::computePreferredLogicalWidths):
3553         * rendering/RenderTableSection.cpp:
3554         (WebCore::RenderTableSection::calcRowLogicalHeight):
3555         (WebCore::RenderTableSection::layoutRows):
3556         * rendering/mathml/RenderMathMLOperator.cpp:
3557         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
3558         * rendering/mathml/RenderMathMLRoot.cpp:
3559         (WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
3560         * rendering/mathml/RenderMathMLRow.cpp:
3561         (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
3562
3563 2013-02-06  Ojan Vafai  <ojan@chromium.org>
3564
3565         display:none file upload button crashes
3566         https://bugs.webkit.org/show_bug.cgi?id=109102
3567
3568         Reviewed by Levi Weintraub.
3569
3570         Test: fast/forms/file/display-none-upload-button.html
3571
3572         * rendering/RenderFileUploadControl.cpp:
3573         (WebCore::nodeWidth):
3574         (WebCore::RenderFileUploadControl::paintObject):
3575         Having an upload button doesn't mean we have a rendered upload button.
3576         Null check the renderer before trying to access it.
3577
3578 2013-02-06  Dirk Schulze  <dschulze@adobe.com>
3579
3580         Context's currentPath should check for passed type
3581         https://bugs.webkit.org/show_bug.cgi?id=109097
3582
3583         Reviewed by Dean Jackson.
3584
3585         Add check for passed pointer and return earlier.
3586
3587         Test: fast/canvas/canvas-currentPath-crash.html
3588
3589         * html/canvas/CanvasRenderingContext2D.cpp:
3590         (WebCore::CanvasRenderingContext2D::setCurrentPath):
3591
3592 2013-02-06  Rafael Weinstein  <rafaelw@chromium.org>
3593
3594         [HTMLTemplateElement] Non </template> end tags should be ignored in "template contents" insertion mode.
3595         https://bugs.webkit.org/show_bug.cgi?id=109090
3596
3597         Reviewed by Adam Barth.
3598
3599         https://dvcs.w3.org/hg/webcomponents/raw-file/38536d37fb82/spec/templates/index.html#template-contents-insertion-mode.
3600
3601         Test added to html5lib suite.
3602
3603         * html/parser/HTMLTreeBuilder.cpp:
3604         (WebCore::HTMLTreeBuilder::processEndTag):
3605
3606 2013-02-06  Alexandre Elias  <aelias@chromium.org>
3607
3608         Make ScrollView::paint() clip by visibleContentRect
3609         https://bugs.webkit.org/show_bug.cgi?id=108888
3610
3611         Reviewed by Levi Weintraub.
3612
3613         When applyPageScaleFactorInCompositor or fixedVisibleContentRect
3614         are used, frameRect() and visibleContentRect(true).size() are
3615         no longer synonyms, and the latter is the one that should be
3616         used for clipping paints.
3617
3618         New WebFrameTest: pageScaleFactorScalesPaintClip.
3619
3620         * platform/ScrollView.cpp:
3621         (WebCore::ScrollView::paint):
3622
3623 2013-02-06  Dima Gorbik  <dgorbik@apple.com>
3624
3625         Store the language internally instead of using lang attribute for WebVTT nodes
3626         https://bugs.webkit.org/show_bug.cgi?id=108858
3627
3628         Reviewed by Eric Carlson.
3629
3630         Only language webvtt elements should have a lang attribute so we have to store
3631         the language internally in the element. Refactored the code to make 
3632         computeInheritedLanguage virtual.
3633
3634         Existing tests were modified to cover this case.
3635
3636         * css/SelectorChecker.cpp:
3637         (WebCore::SelectorChecker::checkOne):
3638         * html/track/WebVTTElement.cpp:
3639         (WebCore::WebVTTElement::WebVTTElement):
3640         (WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren):
3641         (WebCore::WebVTTElement::createEquivalentHTMLElement): clone the internal language property.
3642         * html/track/WebVTTElement.h:
3643         (WebCore::WebVTTElement::language):
3644         (WebCore::WebVTTElement::setLanguage):
3645         * html/track/WebVTTParser.cpp: only set the lang attribute for language objects.
3646         (WebCore::WebVTTParser::constructTreeFromToken):
3647
3648 2013-02-06  Levi Weintraub  <leviw@chromium.org>
3649
3650         Negative text indents can break RenderBlock's inline maximum preferred width calculation
3651         https://bugs.webkit.org/show_bug.cgi?id=108973
3652
3653         Reviewed by Emil A Eklund.
3654
3655         Change two quirks about to how we calculate a block's inline preferred width with
3656         text-indent.
3657
3658         First, re-use text-indent that's first applied to floats on text that follows it.
3659         This matches Layout, as otherwise we can prematurely wrap text when there's a negative
3660         margin on a block starting with a float. This also matches FireFox.
3661
3662         Second, correct how the max preferred width is calculated in the presence of a negative
3663         text-indent. If the text-indent is more negative than the first text line break, we
3664         update the value to be the remainder. Previously, we added this remaining negative value
3665         to subsequent minimum and maximum preferred width calculations (until the remainder was
3666         gone). This is wrong for the max preferred width, as we're adding the negative value more
3667         than once, and leads to a max preferred width that's smaller than our line.
3668
3669         Test: fast/css/negative-text-indent-in-inline-block.html
3670
3671         * rendering/RenderBlock.cpp:
3672         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
3673
3674 2013-02-06  Mark Lam  <mark.lam@apple.com>
3675
3676         Fix broken release builds, greening the bots.
3677         https://bugs.webkit.org/show_bug.cgi?id=107475.
3678
3679         Not reviewed.
3680
3681         No new tests.
3682
3683         * Modules/webdatabase/DatabaseManager.cpp:
3684         (WebCore::logOpenDatabaseError):
3685
3686 2013-02-06  Sheriff Bot  <webkit.review.bot@gmail.com>
3687
3688         Unreviewed, rolling out r142025.
3689         http://trac.webkit.org/changeset/142025
3690         https://bugs.webkit.org/show_bug.cgi?id=109091
3691
3692         broke the build (Requested by tdanderson on #webkit).
3693
3694         * dom/GestureEvent.cpp:
3695         (WebCore::GestureEvent::create):
3696         * page/EventHandler.cpp:
3697         (WebCore::EventHandler::handleGestureEvent):
3698         (WebCore::EventHandler::handleGestureScrollUpdate):
3699         * platform/PlatformEvent.h:
3700         * platform/Scrollbar.cpp:
3701         (WebCore::Scrollbar::gestureEvent):
3702         * platform/chromium/PopupContainer.cpp:
3703         (WebCore::PopupContainer::handleGestureEvent):
3704         * rendering/RenderLayer.cpp:
3705         (WebCore::RenderLayer::scrollByRecursively):
3706         * rendering/RenderLayer.h:
3707
3708 2013-02-06  Mark Lam  <mark.lam@apple.com>
3709
3710         Split openDatabase() between front and back end work.
3711         https://bugs.webkit.org/show_bug.cgi?id=107475.
3712
3713         Reviewed by Anders Carlsson.
3714
3715         The main work of splitting DatabaseManager::openDatabase() is in
3716         refactoring how DatabaseTracker::canEstablishDatabase() works. It used
3717         to check for adequate space quota, and if the check fails, it would call
3718         back into the client from inside canEstablishDatabase(). The call back
3719         allows the client to update the quota (if appropriate). Thereafter,
3720         canEstablishDatabase() will retry its quota check.
3721
3722         In a webkit2 world, we'll want to minimize the traffic between the
3723         client (script side) and the server (sqlite db side), and ideally, we
3724         don't want the server to call back to the client. Note: the
3725         DatabaseTracker belongs on the server side.
3726
3727         To achieve this, we split canEstablishDatabase() into 2 parts: the
3728         checks before the call back to the client, and the checks after.
3729         The first part will retain the name canEstablishDatabase(), and the
3730         second part will be named retryCanEstablishDatabase().
3731         We also added a DatabaseServer::openDatabase() function that can be
3732         called with a retry flag.
3733
3734         The client side DatabaseManager::openDatabase() will call
3735         DatabaseServer::openDatabase(), which then calls canEstablishDatabase()
3736         to do its quota check. If there is enough quota,
3737         DatabaseServer::openDatabase() will proceed to open the backend database
3738         without return to the client first. The opened database will be returned
3739         to the client.
3740
3741         If DatabaseServer::openDatabase() finds inadequate quota the first time,
3742         it will return with a DatabaseSizeExceededQuota error. The DatabaseManager
3743         (on the client side) will check for this error and call back to its client
3744         for an opportunity to increase the quota. Thereafter, the DatabaseManager
3745         will call DatabaseServer::openDatabase() again. This time,
3746         DatabaseServer::openDatabase() will call retryCanEstablishDatabase() to
3747         check the quota, and then open the backend database if there is enough
3748         quota.
3749
3750         No new tests.
3751
3752         * Modules/webdatabase/AbstractDatabaseServer.h:
3753         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
3754         (WebCore::DOMWindowWebDatabase::openDatabase):
3755         * Modules/webdatabase/Database.cpp:
3756         (WebCore::Database::create):
3757         * Modules/webdatabase/Database.h:
3758         (Database):
3759         * Modules/webdatabase/DatabaseBackend.cpp:
3760         (WebCore::DatabaseBackend::performOpenAndVerify):
3761         * Modules/webdatabase/DatabaseBackend.h:
3762         (DatabaseBackend):
3763         * Modules/webdatabase/DatabaseBackendAsync.cpp:
3764         (WebCore::DatabaseBackendAsync::openAndVerifyVersion):
3765         (WebCore::DatabaseBackendAsync::performOpenAndVerify):
3766         * Modules/webdatabase/DatabaseBackendAsync.h:
3767         (DatabaseBackendAsync):
3768         * Modules/webdatabase/DatabaseBackendSync.cpp:
3769         (WebCore::DatabaseBackendSync::openAndVerifyVersion):
3770         * Modules/webdatabase/DatabaseBackendSync.h:
3771         (DatabaseBackendSync):
3772         * Modules/webdatabase/DatabaseError.h:
3773         (WebCore::ENUM_CLASS):
3774         * Modules/webdatabase/DatabaseManager.cpp:
3775         (WebCore::DatabaseManager::exceptionCodeForDatabaseError):
3776         (WebCore::DatabaseManager::openDatabaseBackend):
3777         (WebCore::DatabaseManager::openDatabase):
3778         (WebCore::DatabaseManager::openDatabaseSync):
3779         * Modules/webdatabase/DatabaseManager.h:
3780         (DatabaseManager):
3781         * Modules/webdatabase/DatabaseServer.cpp:
3782         (WebCore::DatabaseServer::openDatabase):
3783         (WebCore::DatabaseServer::createDatabase):
3784         * Modules/webdatabase/DatabaseServer.h:
3785         * Modules/webdatabase/DatabaseSync.cpp:
3786         (WebCore::DatabaseSync::create):
3787         * Modules/webdatabase/DatabaseSync.h:
3788         (DatabaseSync):
3789         * Modules/webdatabase/DatabaseTracker.cpp:
3790         (WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
3791         (WebCore::DatabaseTracker::canEstablishDatabase):
3792         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
3793         * Modules/webdatabase/DatabaseTracker.h:
3794         (DatabaseTracker):
3795         * Modules/webdatabase/WorkerContextWebDatabase.cpp:
3796         (WebCore::WorkerContextWebDatabase::openDatabase):
3797         (WebCore::WorkerContextWebDatabase::openDatabaseSync):
3798         * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp:
3799         (WebCore::DatabaseTracker::canEstablishDatabase):
3800         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
3801
3802 2013-02-06  Tony Gentilcore  <tonyg@chromium.org>
3803
3804         Fix CompactHTMLToken's copy ctor to copy all fields
3805         https://bugs.webkit.org/show_bug.cgi?id=109076
3806
3807         Reviewed by Adam Barth.
3808
3809         This was introduced by me in r142004. Without this patch we fail all tests when using the background parser.
3810
3811         Also don't use getters in copy ctor.
3812
3813         No new tests because no new functionality.
3814
3815         * html/parser/CompactHTMLToken.cpp:
3816         (WebCore::CompactHTMLToken::CompactHTMLToken):
3817
3818 2013-02-06  Brian Salomon  <bsalomon@google.com>
3819
3820         [Chromium/Skia] Remove use of deprecated Skia names
3821         https://bugs.webkit.org/show_bug.cgi?id=109085
3822
3823         Reviewed by Stephen White.
3824
3825         Tested by every existing canvas2d test.
3826
3827         * platform/chromium/support/GraphicsContext3DPrivate.cpp:
3828         (WebCore::GraphicsContext3DPrivate::grContext):
3829
3830 2013-02-06  Terry Anderson  <tdanderson@chromium.org>
3831
3832         Add support for gesture scroll events that do not propagate to enclosing scrollables
3833         https://bugs.webkit.org/show_bug.cgi?id=108849
3834
3835         Reviewed by Antonio Gomes.
3836
3837         Tests: fast/events/touch/gesture/touch-gesture-scroll-div-not-propagated.html
3838                fast/events/touch/gesture/touch-gesture-scroll-iframe-not-propagated.html
3839                fast/events/touch/gesture/touch-gesture-scroll-page-not-propagated.html
3840
3841         Rename RenderLayer::scrollByRecursively() to RenderLayer::scrollBy() and add a parameter
3842         of type RenderLayer::ScrollPropagation to specify whether or not the scroll should
3843         propagate to its parent by recursing. Implement RenderLayer::scrollByRecursively() as a
3844         call to RenderLayer::scrollBy() with argument RenderLayer::ShouldPropagateScroll so
3845         that all existing calls to the function still produce the correct behavior.
3846
3847         In EventHandler::handleGestureScrollUpdate(), call RenderLayer::scrollBy() with
3848         argument RenderLayer::ShouldPropagateScroll if |gestureEvent| is a GestureScrollUpdate
3849         or instead with argument RenderLayer::DontPropagateScroll if |gestureEvent| is a
3850         GestureScrollUpdateWithoutPropagation.
3851
3852         * dom/GestureEvent.cpp:
3853         (WebCore::GestureEvent::create):
3854         * page/EventHandler.cpp:
3855         (WebCore::EventHandler::handleGestureEvent):
3856         (WebCore::EventHandler::handleGestureScrollUpdate):
3857         * platform/PlatformEvent.h:
3858         * platform/Scrollbar.cpp:
3859         (WebCore::Scrollbar::gestureEvent):
3860         * platform/chromium/PopupContainer.cpp:
3861         (WebCore::PopupContainer::handleGestureEvent):
3862         * rendering/RenderLayer.cpp:
3863         (WebCore::RenderLayer::scrollByRecursively):
3864         (WebCore):
3865         (WebCore::RenderLayer::scrollBy):
3866         * rendering/RenderLayer.h:
3867
3868 2013-02-06  Ryosuke Niwa  <rniwa@webkit.org>
3869
3870         REGRESSION(r141136): Apple's internal PLT test suite doesn't finish
3871         https://bugs.webkit.org/show_bug.cgi?id=108380
3872
3873         Reviewed by Alexey Proskuryakov.
3874
3875         Re-enable the main resource cache since the regression had been fixed in r141615.
3876
3877         * loader/cache/CachedResourceLoader.cpp:
3878         (WebCore::CachedResourceLoader::requestResource):
3879
3880 2013-02-06  Uday Kiran  <udaykiran@motorola.com>
3881
3882         Implement 'vmax' from CSS3 values and units
3883         https://bugs.webkit.org/show_bug.cgi?id=91440
3884
3885         Reviewed by Antti Koivisto.
3886
3887         vmax is implemented as primitive length unit.
3888         New length type ViewportPercentageMax is added and included support for fetching the value
3889         of this viewport percentage unit based on current viewport size.
3890
3891         The specification related to this implementation is
3892         http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths.
3893
3894         Tests: css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmax-absolute.html
3895                css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmax.html
3896
3897         * css/CSSGrammar.y.in: Added vmax support.
3898         * css/CSSParser.cpp: Parsing of vmax unit.
3899         (WebCore::CSSParser::validUnit): Added vmax to valid units.
3900         (WebCore::CSSParser::createPrimitiveNumericValue): Added vmax to primitive untis.
3901         (WebCore::CSSParser::parseValidPrimitive): Creation of CSSPrimitive for vmax.
3902         (WebCore::CSSParser::detectNumberToken): Parsing of vmax token.
3903         * css/CSSParserValues.cpp:
3904         (WebCore::CSSParserValue::createCSSValue): Added support for vmax.
3905         * css/CSSPrimitiveValue.cpp:
3906         (WebCore::isValidCSSUnitTypeForDoubleConversion): Added support for vmax.
3907         (WebCore::unitCategory): Ditto.
3908         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Ditto.
3909         (WebCore::CSSPrimitiveValue::cleanup):
3910         (WebCore::CSSPrimitiveValue::customCssText): Added support for vmax.
3911         (WebCore::CSSPrimitiveValue::viewportPercentageLength): Function to create the Length structure for the viewport-percentage unit types.
3912         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
3913         * css/CSSPrimitiveValue.h:
3914         (WebCore::CSSPrimitiveValue::isViewportPercentageLength): Checks whether the primitive value is ViewportPercentage Length.
3915         * css/CSSPrimitiveValue.idl: Added support for vmax.
3916         * css/LengthFunctions.cpp: Calcuation of length value based on the current viewport size.
3917         (WebCore::minimumValueForLength):
3918         (WebCore::valueForLength):
3919         (WebCore::floatValueForLength):
3920         * platform/Length.h:
3921         (WebCore::Length::isViewportPercentage): To check the Length is of type ViewportPercentage.
3922         * rendering/RenderBox.cpp:
3923         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
3924         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3925
3926 2013-02-06  Pravin D  <pravind.2k4@gmail.com>
3927
3928         When a block element is made inline positioned and has static left and right,  it does not follow inline formatting context
3929         https://bugs.webkit.org/show_bug.cgi?id=91665
3930
3931         Reviewed by Julien Chaffraix.
3932
3933         Out-of-flow-positioned elements have their display overriden to BLOCK. When a static block elements 
3934         changes to inline out-of-flow-positioned or vice-versa, the element current and previous display properties 
3935         are same. This causes the element to follow a wrong flow context(in this case Block context) and the element
3936         is laid out incorrectly. The patch fixes the issue by reattaching the renderers of the node whenever either
3937         position property changes or when its floating property changes.
3938         Also the cases when an out-of-flow-positioned/floating element changes to static/non-floating element where
3939         being specially handled. As reattaching the renderers in the above cases correctly handles the above cases,
3940         special handling for such cases is no more required and the related code can be safely removed.
3941  
3942         Reattaching renderers for the afore mentioned issues takes a different(longer) code path. Performance measurements
3943         summary for the same is as follows:
3944                                                               % increase in time
3945          Absolute-block-to-static-block                            2.00
3946          Absolute-inline-to-static-block                           1.21
3947          Absolute-inline-to-static-inline                          1.18
3948          Static-block-to-absolute-block                            1.13
3949          Static-inline-to-absolute-inline                          1.35
3950          Floating-block-non-floating-block                         0.85
3951          Floating-inline-non-floating-block                        0.66
3952          Floating-inline-non-floating-inline                       0.57
3953          Non-floating-block-floating-block                         0.12
3954          Non-floating-inline-floating-inline                       1.36
3955
3956         Tests: fast/dynamic/absolute-positioned-to-static-positioned.html
3957                fast/dynamic/floating-to-non-floating.html
3958                fast/dynamic/non-floating-to-floating.html
3959                fast/dynamic/static-positioned-to-absolute-positioned.html
3960
3961         * dom/Node.cpp:
3962         (WebCore::Node::diff):
3963           Return detach in the following conditions:
3964              1) Element changes to out-of-flow-positioned or vice-versa.
3965              2) Element becomes floating or vice-versa.
3966
3967         * rendering/RenderBlock.cpp:
3968         (WebCore):
3969         * rendering/RenderBlock.h:
3970         (RenderBlock):
3971         * rendering/RenderBoxModelObject.h:
3972         (RenderBoxModelObject):
3973         * rendering/RenderInline.cpp:
3974         (WebCore):
3975         * rendering/RenderInline.h:
3976         (RenderInline):
3977         * rendering/RenderObject.cpp:
3978         (WebCore):
3979         (WebCore::RenderObject::styleWillChange):
3980         (WebCore::RenderObject::styleDidChange):
3981         * rendering/RenderObject.h:
3982         (RenderObject):
3983           The fix in Node::diff() obsoletes some code. The above deletion are part of this dead code cleanup.
3984
3985 2013-02-06  Chris Fleizach  <cfleizach@apple.com>
3986
3987         AX: if <html> has an ARIA attribute, it's exposed as an AXGroup
3988         https://bugs.webkit.org/show_bug.cgi?id=109008
3989
3990         Reviewed by Ryosuke Niwa.
3991
3992         If an <html> element had an ARIA attribute, it was being turned into an element
3993         in the AX hierarchy. This was causing trouble for screen readers by inserting
3994         an unexpected element in the navigation sequence.
3995
3996         Test: accessibility/html-html-element-is-ignored.html
3997
3998         * accessibility/AccessibilityRenderObject.cpp:
3999         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
4000
4001 2013-02-06  Shawn Singh  <shawnsingh@chromium.org>
4002
4003         RenderLayer hasVisibleContent() has inconsistent semantics causing disappearing composited layers
4004         https://bugs.webkit.org/show_bug.cgi?id=108118
4005
4006         Reviewed by Simon Fraser.
4007
4008         RenderLayerBacking::hasVisibleNonCompositingDescendantLayers was
4009         only checking whether direct children had visible content. As a
4010         result, composited layers had wrong visibility status if only a
4011         deeper descendant RenderLayer was visible.
4012
4013         Test: compositing/visibility/visibility-on-distant-descendant.html
4014
4015         * rendering/RenderLayerBacking.cpp:
4016         (WebCore::hasVisibleNonCompositingDescendant): copied the original
4017         implementation into this function; then added the RenderLayer
4018         recursion as appropriate.
4019         (WebCore):
4020         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
4021         This is now just a wrapper to the private static recursive
4022         function.
4023
4024 2013-02-06  Jonathon Jongsma  <jonathon.jongsma@collabora.com>
4025
4026         [GStreamer] MediaPlayer's code is not easily reusable by other GStreamer-based players
4027         https://bugs.webkit.org/show_bug.cgi?id=100261
4028
4029         Refactor the media player implementation so that more of the
4030         internal functionality can be shared between the current media
4031         backend and the mediastream player backend.  Common code is
4032         broken out into a MediaPlayerPrivateGStreamerBase class, and
4033         both MediaPlayerPrivateGStreamer and
4034         StreamMediaPlayerPrivateGStreamer inherit from this base class.
4035
4036         Reviewed by Philippe Normand
4037
4038         No new tests since functionality is covered by existing media tests
4039