Unreviewed, rolling out r142112.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-07  Gavin Peters  <gavinp@chromium.org>
2
3         Unreviewed, rolling out r142112.
4         http://trac.webkit.org/changeset/142112
5         https://bugs.webkit.org/show_bug.cgi?id=108990
6
7         The new test scrollingcoordinator/non-fast-scrollable-region-transformed- iframe.html crashes on Lion.
8
9         See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=scrollingcoordinator%2Fnon-fast-scrollable-region-transformed-iframe.html
10
11         * CMakeLists.txt:
12         * Target.pri:
13         * WebCore.pri:
14         * page/scrolling/ScrollingCoordinator.cpp:
15         (WebCore::ScrollingCoordinator::create):
16         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Removed.
17         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Removed.
18         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
19         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
20         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
21         (CoordinatedGraphicsLayerClient):
22         (WebCore::CoordinatedGraphicsLayer::setFixedToViewport):
23
24 2013-02-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
25
26         Scrollbars misplaced with accelerated compositing for overflow scroll
27         https://bugs.webkit.org/show_bug.cgi?id=108625
28
29         Reviewed by Simon Fraser.
30
31         Scrollbars require their own layer if overflow scroll is composited,
32         otherwise the scrollbars would be rendered on the content layer and
33         not fixed to the viewport.
34
35         * rendering/RenderLayerBacking.cpp:
36         (WebCore::RenderLayerBacking::requiresHorizontalScrollbarLayer):
37         (WebCore::RenderLayerBacking::requiresVerticalScrollbarLayer):
38         (WebCore::RenderLayerBacking::requiresScrollCornerLayer):
39
40 2013-02-07  Mike West  <mkwst@chromium.org>
41
42         Don't ASSERT things about uninitialized variables.
43         https://bugs.webkit.org/show_bug.cgi?id=109187
44
45         Reviewed by Jochen Eisinger.
46
47         Rather than ASSERTing that an uninitialized ExceptionCode is non-zero
48         after some method executes, we should use the ASSERT_NO_EXCEPTION macro.
49
50         * editing/markup.cpp:
51         (WebCore::removeElementPreservingChildren):
52
53 2013-02-07  Andrey Lushnikov  <lushnikov@chromium.org>
54
55         Web Inspector: [Regression] breakpoint condition not editable
56         https://bugs.webkit.org/show_bug.cgi?id=109183
57
58         Reviewed by Vsevolod Vlasov.
59
60         Improve TextEditorMainPanel.selection() method to return null if the
61         selection is set inside of decoration element.
62
63         No new tests.
64
65         * inspector/front-end/DOMExtension.js:
66         (Node.prototype.enclosingNodeOrSelfWithClass): Improve to add iteration boundary.
67         * inspector/front-end/DefaultTextEditor.js:
68         (WebInspector.TextEditorMainPanel.prototype.selection):
69
70 2013-02-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
71
72         [WK2][EFL][QT]REGRESSION(r142045): Scrolling is broken
73         https://bugs.webkit.org/show_bug.cgi?id=109185
74
75         Reviewed by Kenneth Rohde Christiansen.
76
77         This patch is disabling paints clipping logic added at r142045 for the case 
78         when the view should render the entire contents (case of using tiled backing store).
79
80         No new tests, covered by plenty of existing manual tests that allow scrolling
81         (for example fixed-position.html).
82
83         * platform/ScrollView.cpp:
84         (WebCore::ScrollView::paint):
85
86 2013-02-07  Vladislav Kaznacheev  <kaznacheev@chromium.org>
87
88         Web Inspector: Show elements and sources sidebar panes in a tabbed pane when they are below the main pane
89         https://bugs.webkit.org/show_bug.cgi?id=107552
90
91         Reviewed by Pavel Feldman.
92
93         Removed the aspect ratio detection logic and implemented explicit user action "Split Horizontally" available
94         in Elements and Sources panels. When split horizontally the sidebar panes are organized into a tabbed pane.
95         This user action is behind an experimental flag.
96
97         No new tests.
98
99         * inspector/front-end/ContextMenu.js:
100         (WebInspector.ContextMenu.prototype.show):
101         * inspector/front-end/DOMBreakpointsSidebarPane.js:
102         (WebInspector.DOMBreakpointsSidebarPane.prototype.createProxy):
103         (WebInspector.DOMBreakpointsSidebarPane.prototype.onContentReady):
104         (WebInspector.DOMBreakpointsSidebarPane.Proxy):
105         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.expanded):
106         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.expand):
107         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.collapse):
108         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.onContentReady):
109         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.wasShown):
110         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype._reattachBody):
111         * inspector/front-end/ElementsPanel.js:
112         (WebInspector.ElementsPanel):
113         (WebInspector.ElementsPanel.prototype._populateContextMenu):
114         * inspector/front-end/ScriptsPanel.js:
115         (WebInspector.ScriptsPanel.prototype._clearInterface):
116         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
117         (WebInspector.ScriptsPanel.prototype._contextMenuEventFired):
118         * inspector/front-end/Settings.js:
119         (WebInspector.ExperimentsSettings):
120         * inspector/front-end/SidebarPane.js:
121         (WebInspector.SidebarPane):
122         (WebInspector.SidebarPane.prototype.prepareContent):
123         (WebInspector.SidebarPane.prototype.expanded):
124         (WebInspector.SidebarPane.prototype.expand):
125         (WebInspector.SidebarPane.prototype.collapse):
126         (WebInspector.SidebarPane.prototype.onContentReady):
127         (WebInspector.SidebarPane.prototype._setExpandCallback):
128         (WebInspector.SidebarPaneStack.prototype.addPane):
129         (WebInspector.SidebarPaneStack.prototype.activePaneId):
130         (WebInspector.SidebarPaneStack.prototype.setActivePaneId):
131         (WebInspector.SidebarPaneStack.prototype._setExpanded):
132         (WebInspector.SidebarPaneStack.prototype._onPaneExpanded):
133         (WebInspector.SidebarPaneStack.prototype._collapsePane):
134         (WebInspector.SidebarTabbedPane):
135         (WebInspector.SidebarTabbedPane.prototype.addPane):
136         (WebInspector.SidebarTabbedPane.prototype.activePaneId):
137         (WebInspector.SidebarTabbedPane.prototype.setActivePaneId):
138         (WebInspector.SidebarPaneGroup):
139         (WebInspector.SidebarPaneGroup.prototype.setStacked):
140         (WebInspector.SidebarPaneGroup.prototype.addPane):
141         (WebInspector.SidebarPaneGroup.prototype.attachToPanel):
142         (WebInspector.SidebarPaneGroup.prototype.populateContextMenu.toggleSplitDirection):
143         (WebInspector.SidebarPaneGroup.prototype.get _contextMenuEventFired):
144         (WebInspector.SidebarPaneGroup.prototype._onSplitDirectionSettingChanged):
145         * inspector/front-end/SidebarView.js:
146         (WebInspector.SidebarView):
147         (WebInspector.SidebarView.prototype._updateSidebarElementStyle):
148         (WebInspector.SidebarView.prototype.setVertical):
149         (WebInspector.SidebarView.prototype.onResize):
150         * inspector/front-end/StylesSidebarPane.js:
151         (WebInspector.ComputedStyleSidebarPane.prototype.wasShown):
152         (WebInspector.ComputedStyleSidebarPane.prototype.prepareContent):
153         * inspector/front-end/inspector.css:
154         (.sidebar-pane .section .properties, .event-bar .event-properties):
155         (.pane-title):
156         (.sidebar-pane-toolbar):
157         (.sidebar-pane-toolbar > *):
158         (.sidebar-pane-toolbar > select):
159         (.sidebar-pane-toolbar > select:hover):
160         (.sidebar-pane-toolbar > select:active):
161         (.sidebar-pane-toolbar > select.select-settings):
162         (.sidebar-pane-toolbar > select.select-filter):
163         (.sidebar-pane-toolbar > select > option, .sidebar-pane-toolbar > select > hr):
164         (.sidebar-pane-toolbar > .pane-title-button):
165         (.sidebar-pane-toolbar > .pane-title-button:hover):
166         (.sidebar-pane-toolbar > .pane-title-button:active, .sidebar-pane-toolbar > .pane-title-button.toggled):
167         (.sidebar-pane-toolbar > .pane-title-button.add):
168         (.sidebar-pane-toolbar > .pane-title-button.element-state):
169         (.sidebar-pane-toolbar > .pane-title-button.refresh):
170         (.sidebar-pane):
171         (.sidebar-pane > .body):
172         (.sidebar-pane > .body .info):
173         (.sidebar-pane > .body .placard + .info):
174         (.sidebar-pane.visible > .body):
175         (.sidebar-pane > .body .breakpoint-condition):
176         (.sidebar-pane.visible:nth-last-of-type(1)):
177         (.sidebar-pane-subtitle):
178         (.sidebar-pane-subtitle input, .section .header input[type=checkbox]):
179         (.sidebar-pane .breakpoint-hit):
180
181 2013-02-07  Gavin Peters  <gavinp@chromium.org>
182
183         Unreviewed, rolling out r142111.
184         http://trac.webkit.org/changeset/142111
185         https://bugs.webkit.org/show_bug.cgi?id=108055
186
187         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
188
189         * Resources/pagepopups/calendarPicker.css:
190         (.today-clear-area .today-button):
191         * Resources/pagepopups/calendarPicker.js:
192         (CalendarPicker.prototype.fixWindowSize):
193
194 2013-02-07  Vsevolod Vlasov  <vsevik@chromium.org>
195
196         Web Inspector: [Regression] Map.size() returns negative values.
197         https://bugs.webkit.org/show_bug.cgi?id=109174
198
199         Reviewed by Yury Semikhatsky.
200
201         * inspector/front-end/utilities.js:
202
203 2013-02-07  Pavel Feldman  <pfeldman@chromium.org>
204
205         Web Inspector: break details are only rendered upon first debugger pause.
206         https://bugs.webkit.org/show_bug.cgi?id=109193
207
208         Reviewed by Vsevolod Vlasov.
209
210         * inspector/front-end/CallStackSidebarPane.js:
211         (WebInspector.CallStackSidebarPane.prototype.update):
212
213 2013-02-07  Gavin Peters  <gavinp@chromium.org>
214
215         Unreviewed, rolling out r142118.
216         http://trac.webkit.org/changeset/142118
217         https://bugs.webkit.org/show_bug.cgi?id=109044
218
219         Broke SVG! Oh noes!
220
221         * Modules/indexeddb/IDBCursor.cpp:
222         (WebCore::IDBCursor::direction):
223         * Modules/indexeddb/IDBObjectStore.cpp:
224         (WebCore):
225         * Modules/indexeddb/IDBTransaction.cpp:
226         (WebCore::IDBTransaction::mode):
227         * dom/ContainerNode.cpp:
228         (WebCore::ContainerNode::takeAllChildrenFrom):
229         * dom/Document.cpp:
230         (WebCore::Document::setTitle):
231         * dom/MessagePort.cpp:
232         (WebCore::MessagePort::dispatchMessages):
233         (WebCore::MessagePort::disentanglePorts):
234         * editing/DeleteButtonController.cpp:
235         (WebCore::enclosingDeletableElement):
236         (WebCore::DeleteButtonController::createDeletionUI):
237         (WebCore::DeleteButtonController::show):
238         * editing/EditorCommand.cpp:
239         (WebCore::unionDOMRanges):
240         * editing/ReplaceNodeWithSpanCommand.cpp:
241         (WebCore::swapInNodePreservingAttributesAndChildren):
242         * editing/ReplaceSelectionCommand.cpp:
243         (WebCore::ReplacementFragment::ReplacementFragment):
244         (WebCore::ReplacementFragment::removeNode):
245         (WebCore::ReplacementFragment::insertNodeBefore):
246         (WebCore::ReplacementFragment::insertFragmentForTestRendering):
247         (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
248         (WebCore::ReplaceSelectionCommand::insertAsListItems):
249         * editing/SplitTextNodeCommand.cpp:
250         (WebCore::SplitTextNodeCommand::doUnapply):
251         * editing/TextIterator.cpp:
252         (WebCore::CharacterIterator::range):
253         (WebCore::BackwardsCharacterIterator::range):
254         (WebCore::TextIterator::rangeFromLocationAndLength):
255         (WebCore::collapsedToBoundary):
256         * editing/htmlediting.cpp:
257         (WebCore::createTabSpanElement):
258         * editing/mac/EditorMac.mm:
259         (WebCore::Editor::fontForSelection):
260         (WebCore::Editor::fontAttributesForSelectionStart):
261         * editing/markup.cpp:
262         (WebCore::createMarkup):
263         (WebCore::trimFragment):
264         (WebCore::createFragmentFromMarkupWithContext):
265         (WebCore::fillContainerFromString):
266         (WebCore::createFragmentFromText):
267         (WebCore::createFragmentFromNodes):
268         * html/ColorInputType.cpp:
269         (WebCore::ColorInputType::createShadowSubtree):
270         * html/HTMLOptionsCollection.cpp:
271         (WebCore::HTMLOptionsCollection::add):
272         * html/HTMLTextAreaElement.cpp:
273         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
274         * html/HTMLTextFormControlElement.cpp:
275         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
276         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
277         * html/TextFieldInputType.cpp:
278         (WebCore::TextFieldInputType::updatePlaceholderText):
279         * html/ValidationMessage.cpp:
280         (WebCore::ValidationMessage::buildBubbleTree):
281         * html/shadow/MediaControlElementTypes.cpp:
282         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
283         * inspector/InspectorPageAgent.cpp:
284         (WebCore::InspectorPageAgent::getCookies):
285         * inspector/InspectorStyleSheet.cpp:
286         (WebCore::InspectorStyleSheet::addRule):
287         * loader/appcache/ApplicationCacheHost.cpp:
288         (WebCore::ApplicationCacheHost::dispatchDOMEvent):
289         * page/DOMSelection.cpp:
290         (WebCore::DOMSelection::deleteFromDocument):
291         * page/DragController.cpp:
292         (WebCore::prepareClipboardForImageDrag):
293         * rendering/RenderTextControl.cpp:
294         (WebCore::RenderTextControl::visiblePositionForIndex):
295         * rendering/style/SVGRenderStyle.h:
296         (WebCore::SVGRenderStyle::initialBaselineShiftValue):
297         (WebCore::SVGRenderStyle::initialKerning):
298         (WebCore::SVGRenderStyle::initialStrokeDashOffset):
299         (WebCore::SVGRenderStyle::initialStrokeWidth):
300         * svg/SVGAnimatedLength.cpp:
301         (WebCore::sharedSVGLength):
302         (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
303         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
304         * svg/SVGAnimatedLengthList.cpp:
305         (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
306         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
307         * svg/SVGLength.cpp:
308         (WebCore::SVGLength::SVGLength):
309         * svg/SVGTextContentElement.cpp:
310         (WebCore::SVGTextContentElement::textLengthAnimated):
311         * svg/animation/SVGSMILElement.cpp:
312         (WebCore::constructQualifiedName):
313
314 2013-02-07  Kentaro Hara  <haraken@chromium.org>
315
316         Remove #if USE(V8) from IDBRequest.h
317         https://bugs.webkit.org/show_bug.cgi?id=109163
318
319         Reviewed by Andreas Kling.
320
321         The header included inside the #if USE(V8) macro is not used.
322         We can simply remove it.
323
324         No tests. No change in behavior.
325
326         * Modules/indexeddb/IDBRequest.h:
327
328 2013-02-07  Stephen Chenney  <schenney@chromium.org>
329
330         GraphicsContext::drawImageBuffer is inefficient
331         https://bugs.webkit.org/show_bug.cgi?id=104367
332
333         Reviewed by Dirk Schulze.
334
335         This patch converts all of the drawImage and drawImageBuffer
336         convenience methods (those that take parameters of various types) to
337         invoke the implementing method (that takes FloatRect src and dest)
338         directly, rather than through the next-most-convenient method as was
339         done previously. This will knock some layers off the stack compared
340         to the existing code, and may remove one or two constructor invocations.
341         This may be slightly more efficient, and also makes debugging simpler.
342
343         Also removes the unused drawImage method that takes and IntRect source
344         area and IntRect destination. It is not invoked anywhere in a standard
345         WebKit checkout.
346
347         No new tests. No change in functionality, just refactoring.
348
349         * platform/graphics/GraphicsContext.cpp:
350         (WebCore::GraphicsContext::drawImage): Modify all the convenience versions to call
351         the implementing version directly.
352         (WebCore::GraphicsContext::drawImageBuffer): Modify all the convenience versions
353         to call the implementing version directly.
354         * platform/graphics/GraphicsContext.h:
355         (GraphicsContext): Remove IntRect, IntRect version of drawImage.
356
357 2013-02-07  Kent Tamura  <tkent@chromium.org>
358
359         Conversion from localized numbers to HTML numbers should accept not only localized numbers but also HTML numbers
360         https://bugs.webkit.org/show_bug.cgi?id=109160
361
362         Reviewed by Kentaro Hara.
363
364         For example, A French user needs to specify a number to a number input
365         field. He might use a local decimal point, like 3,141592, or he might
366         use the standard decimal point like 3.141592. We had better accept both
367         of them.
368
369         We accepted both last year, but we changed the behavior so that we
370         accept only localized numbers because we had some cases where an input
371         string can be recognized as both of a localized number and the standard
372         number. e.g. 3.141 is 3141 in French locale and 3.141 in the
373         standard. Now we introduce a simple rule that we don't accept group
374         separator at all. So users won't confuse even if we accept both of
375         decimal points.
376
377         Test: fast/forms/number/number-l10n-input.html
378
379         * platform/text/PlatformLocale.cpp:
380         (WebCore::Locale::convertFromLocalizedNumber):
381         If the specified string contains invalid characters including group
382         separators, just return the specified string.
383
384 2013-02-07  Xiaobo Wang  <xbwang@torchmobile.com.cn>
385
386         [BlackBerry] CHHW - Characters that are using 32 bits encoding get trunked to 16bits
387         https://bugs.webkit.org/show_bug.cgi?id=109126
388         PR 292540
389
390         Reviewed by Yong Li.
391
392         Change char code to 4 bytes.
393         Need to convert UTF32 key char to UTF16 before constructing a WTF::String.
394
395         * platform/PlatformKeyboardEvent.h:
396         (WebCore::PlatformKeyboardEvent::unmodifiedCharacter):
397         (PlatformKeyboardEvent):
398         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
399         (WebCore::keyIdentifierForBlackBerryCharacter):
400         (WebCore::windowsKeyCodeForBlackBerryCharacter):
401         (WebCore::adjustCharacterFromOS):
402         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
403
404 2013-02-07  Mike West  <mkwst@chromium.org>
405
406         Replace ExceptionCode assertions with ASSERT_NO_EXCEPTION macro.
407         https://bugs.webkit.org/show_bug.cgi?id=109044
408
409         Reviewed by Darin Adler.
410
411         The pattern:
412
413             ExceptionCode ec = 0;
414             methodThatGeneratesException(ec);
415             ASSERT(!ec);
416
417         is more clearly and succinctly written as:
418
419             methodThatGeneratesException(ASSERT_NO_EXCEPTION);
420
421         This patch replaces the occurances of the former that never touch 'ec'
422         again with the latter. It does the same for 'ASSERT(ec == 0);' (and, as
423         a drive-by, replaces 'ASSERT(ec == 0)' with 'ASSERT(!ec)' in places
424         where it does indeed matter that 'ec' get set properly.
425
426         No change in behavior should result from this refactoring.
427
428         * Modules/indexeddb/IDBCursor.cpp:
429         (WebCore::IDBCursor::direction):
430         * Modules/indexeddb/IDBObjectStore.cpp:
431         (WebCore):
432         * Modules/indexeddb/IDBTransaction.cpp:
433         (WebCore::IDBTransaction::mode):
434         * dom/ContainerNode.cpp:
435         (WebCore::ContainerNode::takeAllChildrenFrom):
436         * dom/Document.cpp:
437         (WebCore::Document::setTitle):
438         * dom/MessagePort.cpp:
439         (WebCore::MessagePort::dispatchMessages):
440         (WebCore::MessagePort::disentanglePorts):
441         * editing/DeleteButtonController.cpp:
442         (WebCore::enclosingDeletableElement):
443         (WebCore::DeleteButtonController::createDeletionUI):
444             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
445         (WebCore::DeleteButtonController::show):
446             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
447         * editing/EditorCommand.cpp:
448         (WebCore::unionDOMRanges):
449         * editing/ReplaceNodeWithSpanCommand.cpp:
450         (WebCore::swapInNodePreservingAttributesAndChildren):
451         * editing/ReplaceSelectionCommand.cpp:
452         (WebCore::ReplacementFragment::ReplacementFragment):
453         (WebCore::ReplacementFragment::removeNode):
454         (WebCore::ReplacementFragment::insertNodeBefore):
455         (WebCore::ReplacementFragment::insertFragmentForTestRendering):
456         (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
457         (WebCore::ReplaceSelectionCommand::insertAsListItems):
458         * editing/SplitTextNodeCommand.cpp:
459         (WebCore::SplitTextNodeCommand::doUnapply):
460         * editing/TextIterator.cpp:
461         (WebCore::CharacterIterator::range):
462         (WebCore::BackwardsCharacterIterator::range):
463         (WebCore::TextIterator::rangeFromLocationAndLength):
464         (WebCore::collapsedToBoundary):
465         * editing/htmlediting.cpp:
466         (WebCore::createTabSpanElement):
467         * editing/mac/EditorMac.mm:
468         (WebCore::Editor::fontForSelection):
469         (WebCore::Editor::fontAttributesForSelectionStart):
470         * editing/markup.cpp:
471         (WebCore::createMarkup):
472         (WebCore::trimFragment):
473         (WebCore::createFragmentFromMarkupWithContext):
474         (WebCore::fillContainerFromString):
475         (WebCore::createFragmentFromText):
476         (WebCore::createFragmentFromNodes):
477         * html/ColorInputType.cpp:
478         (WebCore::ColorInputType::createShadowSubtree):
479             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
480         * html/HTMLOptionsCollection.cpp:
481         (WebCore::HTMLOptionsCollection::add):
482             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
483         * html/HTMLTextAreaElement.cpp:
484         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
485         * html/HTMLTextFormControlElement.cpp:
486         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
487         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
488         * html/TextFieldInputType.cpp:
489         (WebCore::TextFieldInputType::updatePlaceholderText):
490         * html/ValidationMessage.cpp:
491         (WebCore::ValidationMessage::buildBubbleTree):
492         * html/shadow/MediaControlElementTypes.cpp:
493         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
494         * inspector/InspectorPageAgent.cpp:
495         (WebCore::InspectorPageAgent::getCookies):
496         * inspector/InspectorStyleSheet.cpp:
497         (WebCore::InspectorStyleSheet::addRule):
498         * loader/appcache/ApplicationCacheHost.cpp:
499         (WebCore::ApplicationCacheHost::dispatchDOMEvent):
500         * page/DOMSelection.cpp:
501         (WebCore::DOMSelection::deleteFromDocument):
502         * page/DragController.cpp:
503         (WebCore::prepareClipboardForImageDrag):
504         * rendering/RenderTextControl.cpp:
505         (WebCore::RenderTextControl::visiblePositionForIndex):
506         * rendering/style/SVGRenderStyle.h:
507         (WebCore::SVGRenderStyle::initialBaselineShiftValue):
508         (WebCore::SVGRenderStyle::initialKerning):
509         (WebCore::SVGRenderStyle::initialStrokeDashOffset):
510         (WebCore::SVGRenderStyle::initialStrokeWidth):
511         * svg/SVGAnimatedLength.cpp:
512         (WebCore::sharedSVGLength):
513         (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
514         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
515         * svg/SVGAnimatedLengthList.cpp:
516         (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
517         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
518         * svg/SVGLength.cpp:
519         (WebCore::SVGLength::SVGLength):
520         * svg/SVGTextContentElement.cpp:
521         (WebCore::SVGTextContentElement::textLengthAnimated):
522         * svg/animation/SVGSMILElement.cpp:
523         (WebCore::constructQualifiedName):
524             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
525
526 2013-02-07  Mary Wu  <mary.wu@torchmobile.com.cn>
527
528         [BlackBerry] Export mimeType in NetworkJob
529         https://bugs.webkit.org/show_bug.cgi?id=109002
530
531         Reviewed by Yong Li.
532
533         NetworkJob will analysize resource mimetype and set it to resourceResponse,
534         we will pass it on to be used by other Streams like download stream.
535
536         RIM bug# 284408, internally reviewed by Liam Quinn.
537
538         * platform/network/blackberry/NetworkJob.cpp:
539         (WebCore::NetworkJob::mimeType):
540         (WebCore):
541         * platform/network/blackberry/NetworkJob.h:
542         (NetworkJob):
543
544 2013-02-07  Peter Rybin  <prybin@chromium.org>
545
546         Web Inspector: support JavaScript variable mutation in protocol and V8 bindings
547         https://bugs.webkit.org/show_bug.cgi?id=107829
548
549         A new command is added to protocol description and the call is passed through
550         debugger agent through injected script and debugger script down to V8 mirror
551         API. JSC bindings got a thorw exception stub.
552
553         Only declarative JavaScript scopes are supported (local, closure, catch). Other
554         scopes (global, with) are not supported by V8 and not supported by protocol, because
555         manual approach (direct property assigment) is available for them in form of evaluate
556         commands and is more desirable because of a complex nature of operation (it can throw
557         exception in several cases such as exception in setter function).
558
559         Reviewed by Pavel Feldman.
560
561         Test: inspector-protocol/debugger-setVariableValue.html
562
563         * bindings/js/JSInjectedScriptHostCustom.cpp:
564         (WebCore::JSInjectedScriptHost::setFunctionVariableValue):
565         (WebCore):
566         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
567         (WebCore::JSJavaScriptCallFrame::setVariableValue):
568         (WebCore):
569         * bindings/v8/DebuggerScript.js:
570         (.):
571         * bindings/v8/JavaScriptCallFrame.cpp:
572         (WebCore::JavaScriptCallFrame::setVariableValue):
573         (WebCore):
574         * bindings/v8/JavaScriptCallFrame.h:
575         (JavaScriptCallFrame):
576         * bindings/v8/ScriptDebugServer.cpp:
577         (WebCore::ScriptDebugServer::setFunctionVariableValue):
578         (WebCore):
579         * bindings/v8/ScriptDebugServer.h:
580         (ScriptDebugServer):
581         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
582         (WebCore::V8InjectedScriptHost::setFunctionVariableValueCallback):
583         (WebCore):
584         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
585         (WebCore::V8JavaScriptCallFrame::setVariableValueCallback):
586         (WebCore):
587         * inspector/InjectedScript.cpp:
588         (WebCore::InjectedScript::setVariableValue):
589         (WebCore):
590         * inspector/InjectedScript.h:
591         (InjectedScript):
592         * inspector/InjectedScriptHost.idl:
593         * inspector/InjectedScriptSource.js:
594         (.):
595         * inspector/Inspector.json:
596         * inspector/InspectorDebuggerAgent.cpp:
597         (WebCore::InspectorDebuggerAgent::getFunctionDetails):
598         (WebCore::InspectorDebuggerAgent::setVariableValue):
599         (WebCore):
600         * inspector/InspectorDebuggerAgent.h:
601         (InspectorDebuggerAgent):
602         * inspector/JavaScriptCallFrame.idl:
603
604 2013-02-07  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
605
606         [CoordinatedGraphics] Use ScrollingCoordinator to track fixed layers
607         https://bugs.webkit.org/show_bug.cgi?id=108990
608
609         Reviewed by Noam Rosenthal.
610
611         WebCore keeps ScrollingCoordinator up-to-date about whether layers are fixed or not, so we
612         don't need to traverse the tree every frame to get this information.
613
614         The function ScrollingCoordinator::setLayerIsFixedToContainerLayer() is called when
615         RenderLayerBacking is updating its graphics layers.
616
617         The new code also works in new situations where the previous was broken: if a layer changed
618         from being fixed to not fixed (but still kept as a layer for other reasons), the layer will
619         be correctly updated. Previous implementation only had logic to mark layers as fixed, but
620         not the other way round. A manual test was added to illustrate the solved problem.
621
622         Testing was done with the existing manual tests that make use of "position:fixed". Automatic
623         tests are mostly not affected by this because usage of this information affects only the
624         UseFixedLayout mode, not used by default in WebKitTestRunner. Work to improve this situation
625         will be tracked in bug https://bugs.webkit.org/show_bug.cgi?id=109175.
626
627         * CMakeLists.txt:
628         * Target.pri:
629         * WebCore.pri:
630         * page/scrolling/ScrollingCoordinator.cpp:
631         (WebCore::ScrollingCoordinator::create): create specific version of ScrollingCoordinator.
632         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Added.
633         (WebCore):
634         (WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
635         (WebCore::ScrollingCoordinatorCoordinatedGraphics::setLayerIsFixedToContainerLayer):
636         update layer information using existing hook in ScrollingCoordinator.
637         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Added.
638         (WebCore):
639         (ScrollingCoordinatorCoordinatedGraphics):
640         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
641         (WebCore::CoordinatedGraphicsLayer::setFixedToViewport): now that setting viewport is not
642         embedded in the synchronization work, we need to mark the layer so it is updated in the
643         next frame.
644         (WebCore):
645         (WebCore::CoordinatedGraphicsLayer::flushCompositingState): remove call to syncFixedLayers().
646         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
647         (CoordinatedGraphicsLayerClient): remove now unused syncFixedLayers() from client.
648         (CoordinatedGraphicsLayer):
649
650 2013-02-07  Keishi Hattori  <keishi@webkit.org>
651
652         REGRESSION (r140778): Calendar Picker doesn't open when the element has the required attribute
653         https://bugs.webkit.org/show_bug.cgi?id=109136
654
655         Reviewed by Kent Tamura.
656
657         Calendar picker was using the "Clear" button to calculate the window width.
658         Since it doesn't exist when the input element has a required attribute,
659         it was throwing an error. This patch fixes the width calculating logic.
660
661         Tests: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required-ar.html
662                platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required.html
663
664         * Resources/pagepopups/calendarPicker.css:
665         (.today-clear-area):
666         * Resources/pagepopups/calendarPicker.js:
667         (CalendarPicker.prototype.fixWindowSize): Fixing the logic to calculate
668         the width. We don't want to use clear button because it doesn't exist
669         when a value is required.
670
671 2013-02-07  Gustavo Noronha Silva  <gns@gnome.org>
672
673         Unreviewed build fix. libWebCore.la needs to be relinked when
674         symbols.filter changes.
675
676         * GNUmakefile.am: add symbols.filter as a dependency for the
677         libWebCore.la library.
678
679 2013-02-07  Vsevolod Vlasov  <vsevik@chromium.org>
680
681         Web Inspector: Closure compilation fixes
682         https://bugs.webkit.org/show_bug.cgi?id=109131
683
684         Reviewed by Yury Semikhatsky.
685
686         * inspector/front-end/ElementsPanel.js:
687         (WebInspector.ElementsPanel):
688         * inspector/front-end/FileSystemMapping.js:
689         (WebInspector.FileSystemMappingImpl.prototype.uriPrefixForPathPrefix):
690         * inspector/front-end/IsolatedFileSystemModel.js:
691         (WebInspector.IsolatedFileSystemModel.prototype._fileSystemRemoved):
692         * inspector/front-end/SidebarPane.js:
693
694 2013-02-07  Kentaro Hara  <haraken@chromium.org>
695
696         Unreviewed, rolling out r142077.
697         http://trac.webkit.org/changeset/142077
698         https://bugs.webkit.org/show_bug.cgi?id=108579
699
700         fast/filesystem/workers/file-writer-empty-blob.html is broken
701
702         * bindings/v8/DOMDataStore.h:
703         (WebCore::DOMDataStore::setWrapperInObject):
704         * bindings/v8/DOMWrapperWorld.h:
705         (DOMWrapperWorld):
706         (WebCore::DOMWrapperWorld::isolated):
707         * bindings/v8/V8Binding.h:
708         (WebCore):
709         (WebCore::worldForEnteredContextIfIsolated):
710         * bindings/v8/V8DOMWindowShell.cpp:
711         (WebCore::V8DOMWindowShell::initializeIfNeeded):
712         * bindings/v8/V8GCController.cpp:
713         (WebCore::WrapperVisitor::WrapperVisitor):
714         (WebCore):
715         (WebCore::gcTree):
716         (WebCore::V8GCController::didCreateWrapperForNode):
717         (WebCore::V8GCController::gcPrologue):
718         (WebCore::V8GCController::minorGCPrologue):
719         (WebCore::V8GCController::majorGCPrologue):
720         * bindings/v8/V8GCController.h:
721         (V8GCController):
722
723 2013-02-07  Tony Gentilcore  <tonyg@chromium.org>
724
725         Call XSSAuditor.filterToken() from threaded HTML parser
726         https://bugs.webkit.org/show_bug.cgi?id=107603
727
728         Reviewed by Adam Barth.
729
730         With this patch we now pass 180 of 182 tests in http/tests/security/xssAuditor.
731
732         We do this by creating aan XSSAuditor on the main thread and passing ownership of them to the BackgroundHTMLParser upon its creation.
733
734         Then the background thread calls filterToken() and stores the resulting XSSInfo (if any) on the CompactHTMLToken for the main thread to handle.
735
736         This involved trimming the XSSAuditor to only depend on the TextEncoding instead of the whole TextResourceDecoder.
737
738         No new tests because covered by existing tests.
739
740         * html/parser/BackgroundHTMLParser.cpp:
741         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
742         (WebCore::BackgroundHTMLParser::pumpTokenizer):
743         (WebCore::BackgroundHTMLParser::createPartial):
744         * html/parser/BackgroundHTMLParser.h:
745         (WebCore):
746         (WebCore::BackgroundHTMLParser::create):
747         (BackgroundHTMLParser):
748         * html/parser/HTMLDocumentParser.cpp:
749         (WebCore::HTMLDocumentParser::pumpTokenizer):
750         (WebCore::HTMLDocumentParser::startBackgroundParser):
751         * html/parser/HTMLSourceTracker.cpp:
752         (WebCore::HTMLSourceTracker::start):
753         (WebCore::HTMLSourceTracker::end):
754         * html/parser/HTMLSourceTracker.h: Change the HTMLInputStream args to SegmentedString because the background thread only has a BackgroundHTMLInputStream.
755         (HTMLSourceTracker):
756         * html/parser/HTMLViewSourceParser.cpp:
757         (WebCore::HTMLViewSourceParser::pumpTokenizer):
758         * html/parser/XSSAuditor.cpp:
759         (WebCore::fullyDecodeString):
760         (WebCore::XSSAuditor::XSSAuditor):
761         (WebCore::XSSAuditor::init): Copies necessary to make isSafeToSendToAnotherThread() happy.
762         (WebCore::XSSAuditor::decodedSnippetForName):
763         (WebCore::XSSAuditor::decodedSnippetForAttribute):
764         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
765         (WebCore::XSSAuditor::isSafeToSendToAnotherThread): Check that all String and KURL members are safe to send to another thread.
766         (WebCore):
767         * html/parser/XSSAuditor.h:
768         (WebCore):
769         (WebCore::FilterTokenRequest::FilterTokenRequest):
770         (FilterTokenRequest):
771         (XSSAuditor):
772
773 2013-02-07  ChangSeok Oh  <shivamidow@gmail.com>
774
775         [GTK][AC] Implement opacity animation with clutter ac backend
776         https://bugs.webkit.org/show_bug.cgi?id=108961
777
778         Reviewed by Gustavo Noronha Silva.
779
780         Implement opacity animation with clutter ac backend.
781         Almost all implementations of GraphicsLayerClutter are based on mac port's one.
782         PlatformClutterAnimation interfaces are also similar with mac port, but they are implemented
783         with native clutter APIs.
784         This patch includes only opacity animation related changes, so many APIs might be empty.
785         Remained animations like rotation and translate will be dealt in another patches.
786
787         Covered by existing animation tests.
788
789         * GNUmakefile.list.am:
790         * platform/graphics/clutter/GraphicsLayerActor.cpp:
791         (graphicsLayerActorGetAnimationForKey):
792         * platform/graphics/clutter/GraphicsLayerActor.h:
793         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
794         (WebCore):
795         (WebCore::propertyIdToString):
796         (WebCore::animationIdentifier):
797         (WebCore::animationHasStepsTimingFunction):
798         (WebCore::GraphicsLayerClutter::setOpacity):
799         (WebCore::GraphicsLayerClutter::updateAnimations):
800         (WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers):
801         (WebCore::GraphicsLayerClutter::setupAnimation):
802         (WebCore::GraphicsLayerClutter::timingFunctionForAnimationValue):
803         (WebCore::GraphicsLayerClutter::createBasicAnimation):
804         (WebCore::GraphicsLayerClutter::createKeyframeAnimation):
805         (WebCore::GraphicsLayerClutter::setTransformAnimationKeyframes):
806         (WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
807         (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
808         (WebCore::GraphicsLayerClutter::createAnimationFromKeyframes):
809         (WebCore::GraphicsLayerClutter::addAnimation):
810         (WebCore::GraphicsLayerClutter::removeClutterAnimationFromLayer):
811         (WebCore::GraphicsLayerClutter::pauseClutterAnimationOnLayer):
812         (WebCore::GraphicsLayerClutter::setAnimationOnLayer):
813         (WebCore::GraphicsLayerClutter::setAnimationEndpoints):
814         (WebCore::GraphicsLayerClutter::setAnimationKeyframes):
815         (WebCore::GraphicsLayerClutter::animatedLayer):
816         * platform/graphics/clutter/GraphicsLayerClutter.h:
817         (GraphicsLayerClutter):
818         (WebCore::GraphicsLayerClutter::LayerPropertyAnimation::LayerPropertyAnimation):
819         (LayerPropertyAnimation):
820         (WebCore::GraphicsLayerClutter::AnimationProcessingAction::AnimationProcessingAction):
821         (AnimationProcessingAction):
822         * platform/graphics/clutter/PlatformClutterAnimation.cpp: Added.
823         (WebCore):
824         (WebCore::timelineStartedCallback):
825         (WebCore::toClutterAnimationMode):
826         (WebCore::PlatformClutterAnimation::stringToAnimatedPropertyType):
827         (WebCore::PlatformClutterAnimation::create):
828         (WebCore::PlatformClutterAnimation::PlatformClutterAnimation):
829         (WebCore::PlatformClutterAnimation::~PlatformClutterAnimation):
830         (WebCore::PlatformClutterAnimation::supportsValueFunction):
831         (WebCore::PlatformClutterAnimation::beginTime):
832         (WebCore::PlatformClutterAnimation::setBeginTime):
833         (WebCore::PlatformClutterAnimation::duration):
834         (WebCore::PlatformClutterAnimation::setDuration):
835         (WebCore::PlatformClutterAnimation::speed):
836         (WebCore::PlatformClutterAnimation::setSpeed):
837         (WebCore::PlatformClutterAnimation::timeOffset):
838         (WebCore::PlatformClutterAnimation::setTimeOffset):
839         (WebCore::PlatformClutterAnimation::repeatCount):
840         (WebCore::PlatformClutterAnimation::setRepeatCount):
841         (WebCore::PlatformClutterAnimation::autoreverses):
842         (WebCore::PlatformClutterAnimation::setAutoreverses):
843         (WebCore::PlatformClutterAnimation::fillMode):
844         (WebCore::PlatformClutterAnimation::setFillMode):
845         (WebCore::PlatformClutterAnimation::setTimingFunction):
846         (WebCore::PlatformClutterAnimation::copyTimingFunctionFrom):
847         (WebCore::PlatformClutterAnimation::isRemovedOnCompletion):
848         (WebCore::PlatformClutterAnimation::setRemovedOnCompletion):
849         (WebCore::PlatformClutterAnimation::isAdditive):
850         (WebCore::PlatformClutterAnimation::setAdditive):
851         (WebCore::PlatformClutterAnimation::valueFunction):
852         (WebCore::PlatformClutterAnimation::setValueFunction):
853         (WebCore::PlatformClutterAnimation::setFromValue):
854         (WebCore::PlatformClutterAnimation::copyFromValueFrom):
855         (WebCore::PlatformClutterAnimation::setToValue):
856         (WebCore::PlatformClutterAnimation::copyToValueFrom):
857         (WebCore::PlatformClutterAnimation::setValues):
858         (WebCore::PlatformClutterAnimation::copyValuesFrom):
859         (WebCore::PlatformClutterAnimation::setKeyTimes):
860         (WebCore::PlatformClutterAnimation::copyKeyTimesFrom):
861         (WebCore::PlatformClutterAnimation::setTimingFunctions):
862         (WebCore::PlatformClutterAnimation::copyTimingFunctionsFrom):
863         (WebCore::PlatformClutterAnimation::animationDidStart):
864         (WebCore::PlatformClutterAnimation::timeline):
865         (WebCore::PlatformClutterAnimation::addOpacityTransition):
866         (WebCore::PlatformClutterAnimation::addAnimationForKey):
867         (WebCore::PlatformClutterAnimation::removeAnimationForKey):
868         * platform/graphics/clutter/PlatformClutterAnimation.h: Added.
869         (WebCore):
870         (PlatformClutterAnimation):
871         (WebCore::PlatformClutterAnimation::animationType):
872
873 2013-02-07  Andrey Lushnikov  <lushnikov@chromium.org>
874
875         Web Inspector: highlight matching braces in DTE.
876         https://bugs.webkit.org/show_bug.cgi?id=108697
877
878         Reviewed by Pavel Feldman.
879
880         Implement BraceMatcher class which for given position in textModel
881         will respond with enclosing brace pair for that position.
882         Make use of this class in DefaultTextEditor by handling
883         selectionChange event. Make use of this class in "_closingBlockOffset"
884         method of TextEditorMainPanel as this method implements similar
885         functionality.
886
887         New test: inspector/editor/brace-matcher.html
888
889         * inspector/front-end/DefaultTextEditor.js:
890         (WebInspector.TextEditorMainPanel):
891         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
892         (WebInspector.TextEditorMainPanel.prototype._closingBlockOffset):
893         (WebInspector.TextEditorMainPanel.prototype._handleSelectionChange):
894         (WebInspector.TextEditorMainPanel.BraceHighlightController):
895         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
896         * inspector/front-end/TextEditorHighlighter.js:
897         (WebInspector.TextEditorHighlighter.prototype._highlightLines):
898         * inspector/front-end/TextEditorModel.js:
899         (WebInspector.TextEditorModel.endsWithBracketRegex):
900         (WebInspector.TextEditorModel.endsWithBracketRegex.):
901         * inspector/front-end/textEditor.css:
902         (.text-editor-brace-match):
903
904 2013-02-05  Eunmi Lee  <eunmi15.lee@samsung.com> and Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
905
906         [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
907         https://bugs.webkit.org/show_bug.cgi?id=97173
908
909         Reviewed by Kenneth Rohde Christiansen, signed-off by Benjamin Poulain.
910
911         Remove codes to initialize and shutdown the EFL libraries from
912         RunLoopEfl.cpp. Initialization and shutdown will be done in the
913         ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web
914         process.
915
916         No new tests. This patch doesn't change behavior.
917
918         * platform/efl/RunLoopEfl.cpp:
919         (WebCore::RunLoop::RunLoop):
920         (WebCore::RunLoop::~RunLoop):
921
922 2013-02-07  Ilya Tikhonovsky  <loislo@chromium.org>
923
924         Unreviewed fix for inspector tests in debug.
925         m_frontend should be initialized in constructor.
926
927         * inspector/InspectorMemoryAgent.cpp:
928         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
929
930 2013-02-07  Yury Semikhatsky  <yurys@chromium.org>
931
932         Web Inspector: reduce number of native memory instrumentation categories
933         https://bugs.webkit.org/show_bug.cgi?id=109146
934
935         Reviewed by Pavel Feldman.
936
937         Merged some of memory instrumentation categories.
938
939         * dom/WebCoreMemoryInstrumentation.cpp:
940         (WebCore):
941         * inspector/front-end/NativeMemorySnapshotView.js:
942         (WebInspector.MemoryBlockViewProperties._initialize):
943         * platform/PlatformMemoryInstrumentation.cpp:
944         (WebCore):
945
946 2013-02-04  Kentaro Hara  <haraken@chromium.org>
947
948         [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise
949         https://bugs.webkit.org/show_bug.cgi?id=108579
950
951         Reviewed by Adam Barth.
952
953         Currently V8GCController::m_edenNodes stores a list of nodes whose
954         wrappers have been created since the latest GC. The reason why we
955         needed m_edenNodes is that there was no way to know a list of wrappers
956         in the new space of V8. By using m_edenNodes, we had been approximating
957         'wrappers in the new space' by 'wrappers that have been created since
958         the latest GC'.
959
960         Now V8 provides VisitHandlesForPartialDependence(), with which WebKit
961         can know a list of wrappers in the new space. By using the API, we can
962         remove V8GCController::m_edenNodes. The benefit is that (1) we no longer
963         need to keep m_edenNodes and that (2) it enables more precise minor
964         DOM GC (Remember that m_edenNodes was just an approximation).
965
966         Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940
967         The benchmark runs 300 iterations, each of which creates 100000 elements.
968         The benchmark measures average, min, median, max and stdev of execution times
969         of the 300 iterations. This will tell us the worst-case overhead of this change.
970
971         Before:
972           mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms
973
974         After:
975           mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms
976
977         As shown above, I couldn't observe any performance regression.
978
979         No tests. No change in behavior.
980
981         * bindings/v8/DOMDataStore.h:
982         (WebCore::DOMDataStore::setWrapperInObject):
983         * bindings/v8/DOMWrapperWorld.h:
984         (DOMWrapperWorld):
985         (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck):
986         * bindings/v8/V8Binding.h:
987         (WebCore):
988         (WebCore::worldForEnteredContextIfIsolated):
989         (WebCore::worldForEnteredContextWithoutContextCheck):
990         * bindings/v8/V8DOMWindowShell.cpp:
991         (WebCore::V8DOMWindowShell::initializeIfNeeded):
992         * bindings/v8/V8GCController.cpp:
993         (WebCore::gcTree):
994         (WebCore):
995         (MinorGCWrapperVisitor):
996         (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor):
997         (WebCore::MinorGCWrapperVisitor::notifyFinished):
998         (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor):
999         (WebCore::V8GCController::gcPrologue):
1000         (WebCore::V8GCController::minorGCPrologue):
1001         (WebCore::V8GCController::majorGCPrologue):
1002         * bindings/v8/V8GCController.h:
1003         (V8GCController):
1004
1005 2013-02-06  Kent Tamura  <tkent@chromium.org>
1006
1007         REGRESSION(r141195): INPUT_MULTIPLE_FIELDS_UI: Space in a placeholder string is removed
1008         https://bugs.webkit.org/show_bug.cgi?id=109132
1009
1010         Reviewed by Hajime Morita.
1011
1012         <input  type=date> should be shown in Japanese UI as:
1013         [ 年 /月/日]
1014         But it is shown wrongly since r141195:
1015         [年 /月/日]
1016
1017         We should use white-space:pre.
1018
1019         No new tests. This change is not testable in WebKit because this
1020         requires a Japanese-localized UI string of Chromium.
1021
1022         * css/html.css:
1023         (input::-webkit-datetime-edit-fields-wrapper):
1024         Use white-space:pre instead of nowrap.
1025
1026 2013-02-06  Kentaro Hara  <haraken@chromium.org>
1027
1028         Remove DOMWindow::parseModalDialogFeatures()
1029         https://bugs.webkit.org/show_bug.cgi?id=109139
1030
1031         Reviewed by Kent Tamura.
1032
1033         No one uses the method. FIXME is saying:
1034
1035           // FIXME: We can remove this function once V8 showModalDialog is changed to use DOMWindow.
1036
1037         Given that V8's showModalDialog() is now using DOMWindow, we can remove it.
1038
1039         No tests. No change in behavior.
1040
1041         * page/DOMWindow.cpp:
1042         * page/DOMWindow.h:
1043         (DOMWindow):
1044
1045 2013-02-06  Ilya Tikhonovsky  <loislo@chromium.org>
1046
1047         Web Inspector: Native Memory Instrumentation: reduce native heap snapshot runtime memory footprint
1048         https://bugs.webkit.org/show_bug.cgi?id=108824
1049
1050         Reviewed by Yury Semikhatsky.
1051
1052         New event was added into Memory domain addNativeSnapshotChunk.
1053         The content of HeapGraphSerializer is completely rewritten according to new API.
1054         Now it collects strings, nodes, edges and id2id map and pushes when the collected items count exceed a limit.
1055         On the frontend side I added new method for the new event and fixed the postprocessing step.
1056         MemoryInstrumentation was slightly changed. Now it reports base to real address map only after reporting the node with real address.
1057
1058         * inspector/HeapGraphSerializer.cpp:
1059         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
1060         (WebCore::HeapGraphSerializer::pushUpdateIfNeed):
1061         (WebCore):
1062         (WebCore::HeapGraphSerializer::pushUpdate):
1063         (WebCore::HeapGraphSerializer::reportNode):
1064         (WebCore::HeapGraphSerializer::reportNodeImpl):
1065         (WebCore::HeapGraphSerializer::reportEdge):
1066         (WebCore::HeapGraphSerializer::reportEdgeImpl):
1067         (WebCore::HeapGraphSerializer::reportLeaf):
1068         (WebCore::HeapGraphSerializer::reportBaseAddress):
1069         (WebCore::HeapGraphSerializer::finish):
1070         (WebCore::HeapGraphSerializer::reportMemoryUsage):
1071         (WebCore::HeapGraphSerializer::addString):
1072         (WebCore::HeapGraphSerializer::toNodeId):
1073         (WebCore::HeapGraphSerializer::addRootNode):
1074         * inspector/HeapGraphSerializer.h:
1075         (HeapGraphSerializer):
1076         * inspector/Inspector.json:
1077         * inspector/InspectorController.cpp:
1078         (WebCore::InspectorController::processMemoryDistribution):
1079         * inspector/InspectorMemoryAgent.cpp:
1080         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionMap):
1081         (WebCore):
1082         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
1083         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
1084         (WebCore::InspectorMemoryAgent::setFrontend):
1085         (WebCore::InspectorMemoryAgent::clearFrontend):
1086         * inspector/InspectorMemoryAgent.h:
1087         (InspectorMemoryAgent):
1088         * inspector/front-end/NativeHeapSnapshot.js:
1089         (WebInspector.NativeHeapSnapshot):
1090         (WebInspector.NativeHeapSnapshotNode.prototype.classIndex):
1091         (WebInspector.NativeHeapSnapshotNode.prototype.id):
1092         (WebInspector.NativeHeapSnapshotNode.prototype.name):
1093         (WebInspector.NativeHeapSnapshotNode.prototype.serialize):
1094         * inspector/front-end/NativeMemorySnapshotView.js:
1095         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
1096         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked):
1097         (WebInspector.NativeSnapshotProfileHeader):
1098         (WebInspector.NativeSnapshotProfileHeader.prototype.startSnapshotTransfer):
1099         (WebInspector.NativeSnapshotProfileHeader.prototype.addNativeSnapshotChunk):
1100         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
1101         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
1102         (WebInspector.NativeMemoryBarChart.prototype._updateStats):
1103         * inspector/front-end/ProfilesPanel.js:
1104         (WebInspector.ProfilesPanel):
1105         (WebInspector.MemoryDispatcher):
1106         (WebInspector.MemoryDispatcher.prototype.addNativeSnapshotChunk):
1107
1108 2013-02-03  Kentaro Hara  <haraken@chromium.org>
1109
1110         WebKit's focus events are UIEvents (instead of FocusEvent) and thus don't expose .relatedTarget
1111         https://bugs.webkit.org/show_bug.cgi?id=76216
1112
1113         Reviewed by Eric Seidel.
1114
1115         Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-FocusEvent
1116
1117         This patch creates a new FocusEvent class with a relatedTarget attribute.
1118         Now when focusin or focusout events are dispatched, a FocusEvent is created with
1119         the relatedTarget attribute set accordingly.
1120
1121         Test: fast/events/related-target-focusevent.html
1122
1123         * CMakeLists.txt:
1124         * DerivedSources.cpp:
1125         * DerivedSources.make:
1126         * DerivedSources.pri:
1127         * GNUmakefile.list.am:
1128         * Target.pri:
1129         * WebCore.gypi:
1130         * WebCore.xcodeproj/project.pbxproj:
1131         * dom/DOMAllInOne.cpp:
1132         * dom/Event.cpp:
1133         (WebCore::Event::isFocusEvent):
1134         (WebCore):
1135         * dom/Event.h:
1136         (Event):
1137         * dom/EventContext.cpp:
1138         (WebCore::EventContext::handleLocalEvents):
1139         * dom/EventNames.in:
1140         * dom/FocusEvent.h: Added.
1141         (WebCore):
1142         (FocusEvent):
1143         (WebCore::FocusEvent::create):
1144         (WebCore::FocusEvent::relatedTarget):
1145         (WebCore::FocusEvent::setRelatedTarget):
1146         (WebCore::toFocusEvent):
1147         * dom/FocusEvent.idl: Added.
1148         * dom/Node.cpp:
1149         (WebCore::Node::dispatchFocusInEvent):
1150         (WebCore::Node::dispatchFocusOutEvent):
1151
1152 2013-02-06  Kent Tamura  <tkent@chromium.org>
1153
1154         Fix style of RenderTheme.cpp and RenderThemeChromiumWin.h
1155         https://bugs.webkit.org/show_bug.cgi?id=109137
1156
1157         Reviewed by Kentaro Hara.
1158
1159         No new tests. Just style fix.
1160
1161         * rendering/RenderTheme.cpp:
1162         (WebCore::RenderTheme::adjustStyle):
1163         (WebCore::RenderTheme::paint):
1164         (WebCore::RenderTheme::paintBorderOnly):
1165         (WebCore::RenderTheme::paintDecorations):
1166         (WebCore::RenderTheme::isControlStyled):
1167         (WebCore::RenderTheme::adjustButtonStyle):
1168         (WebCore::RenderTheme::systemColor):
1169         * rendering/RenderThemeChromiumWin.h:
1170         (WebCore::ThemeData::ThemeData):
1171         (ThemeData):
1172         (RenderThemeChromiumWin):
1173         (WebCore::RenderThemeChromiumWin::RenderThemeChromiumWin):
1174         (WebCore::RenderThemeChromiumWin::~RenderThemeChromiumWin):
1175
1176 2013-02-06  Kent Tamura  <tkent@chromium.org>
1177
1178         Fix style of Chrome.h and Page.h
1179         https://bugs.webkit.org/show_bug.cgi?id=109138
1180
1181         Reviewed by Ryosuke Niwa.
1182
1183         No new tests. Just style fixes.
1184
1185         * page/Chrome.h:
1186         (WebCore):
1187         (Chrome):
1188         (WebCore::Chrome::client):
1189         * page/Page.h:
1190         (JSC):
1191         (WebCore):
1192         (WebCore::ArenaSize::ArenaSize):
1193         (ArenaSize):
1194         (Page):
1195         (PageClients):
1196         (WebCore::Page::theme):
1197         (WebCore::Page::canStartMedia):
1198         (WebCore::Page::editorClient):
1199         (WebCore::Page::plugInClient):
1200         (WebCore::Page::mainFrame):
1201         (WebCore::Page::groupPtr):
1202         (WebCore::Page::incrementSubframeCount):
1203         (WebCore::Page::decrementSubframeCount):
1204         (WebCore::Page::subframeCount):
1205         (WebCore::Page::chrome):
1206         (WebCore::Page::dragCaretController):
1207         (WebCore::Page::dragController):
1208         (WebCore::Page::focusController):
1209         (WebCore::Page::contextMenuController):
1210         (WebCore::Page::inspectorController):
1211         (WebCore::Page::pointerLockController):
1212         (WebCore::Page::validationMessageClient):
1213         (WebCore::Page::settings):
1214         (WebCore::Page::progress):
1215         (WebCore::Page::backForward):
1216         (WebCore::Page::featureObserver):
1217         (WebCore::Page::viewMode):
1218         (WebCore::Page::setTabKeyCyclesThroughElements):
1219         (WebCore::Page::tabKeyCyclesThroughElements):
1220         (WebCore::Page::scheduledRunLoopPairs):
1221         (WebCore::Page::defersLoading):
1222         (WebCore::Page::mediaVolume):
1223         (WebCore::Page::pageScaleFactor):
1224         (WebCore::Page::deviceScaleFactor):
1225         (WebCore::Page::shouldSuppressScrollbarAnimations):
1226         (WebCore::Page::pagination):
1227         (WebCore::Page::isOnscreen):
1228         (WebCore::Page::scriptedAnimationsSuspended):
1229         (WebCore::Page::debugger):
1230         (WebCore::Page::hasCustomHTMLTokenizerTimeDelay):
1231         (WebCore::Page::customHTMLTokenizerTimeDelay):
1232         (WebCore::Page::hasCustomHTMLTokenizerChunkSize):
1233         (WebCore::Page::customHTMLTokenizerChunkSize):
1234         (WebCore::Page::areMemoryCacheClientCallsEnabled):
1235         (WebCore::Page::setEditable):
1236         (WebCore::Page::isEditable):
1237         (WebCore::Page::displayID):
1238         (WebCore::Page::layoutMilestones):
1239         (WebCore::Page::setIsPainting):
1240         (WebCore::Page::isPainting):
1241         (WebCore::Page::alternativeTextClient):
1242         (WebCore::Page::checkSubframeCountConsistency):
1243         (WebCore::Page::group):
1244
1245 2013-02-06  Mike West  <mkwst@chromium.org>
1246
1247         Entity-header extension headers honored on 304 responses.
1248         https://bugs.webkit.org/show_bug.cgi?id=72414
1249
1250         Reviewed by Alexey Proskuryakov.
1251
1252         This patch ports Chromium's network stack logic governing header
1253         updates after resource revalidation. Generally, headers sent with 304
1254         responses ought to update the original cached resource's headers.
1255         Certain headers should never be sent with 304 responses, and we should
1256         ignore them if a misconfigured server sends them anyway.
1257
1258         Currently, WebCore ignores all headers prefixed with 'content-'. This
1259         patch adds 'x-content-' and 'x-webkit-' to the list, as well as specific
1260         headers like 'upgrade', 'trailer', and others that the Chromium network
1261         stack currently ignores.
1262
1263         The tests verify that those headers with visible effect are correctly
1264         handled: 'x-frame-options', 'content-security-policy', and
1265         'x-xss-protection'.
1266
1267         Tests: http/tests/security/XFrameOptions/x-frame-options-cached.html
1268                http/tests/security/contentSecurityPolicy/cached-frame-csp.html
1269                http/tests/security/xssAuditor/cached-frame.html
1270
1271         * loader/cache/CachedResource.cpp:
1272         (WebCore):
1273         (WebCore::CachedResource::updateResponseAfterRevalidation):
1274             This patch adds two arrays containing the specific headers to
1275             ignore and the prefixes to ignore. These lists are processed in
1276             shouldUpdateHeaderAfterRevalidation.
1277             CachedResource::updateResponseAfterRevalidation relies on this new
1278             method when processing revalidated resources.
1279
1280         * loader/cache/CachedResource.cpp:
1281         (WebCore):
1282         (WebCore::shouldUpdateHeaderAfterRevalidation):
1283         (WebCore::CachedResource::updateResponseAfterRevalidation):
1284
1285 2013-02-06  Tom Sepez  <tsepez@chromium.org>
1286
1287         document.referrer leakage with XSS Auditor page block
1288         https://bugs.webkit.org/show_bug.cgi?id=109089
1289
1290         Reviewed by Adam Barth.
1291
1292         Pass "about:blank" as referrer instead of "" so that the actual page
1293         is not leaked when empty referrers are replaced later on in the
1294         request.
1295         
1296         * html/parser/XSSAuditorDelegate.cpp:
1297         (WebCore::XSSAuditorDelegate::didBlockScript):
1298
1299 2013-02-06  Kentaro Hara  <haraken@chromium.org>
1300
1301         [V8] Make an Isolate parameter mandatory in GetTemplate() and GetRawTemplate()
1302         https://bugs.webkit.org/show_bug.cgi?id=109026
1303
1304         Reviewed by Adam Barth.
1305
1306         Now it's time to kill an optional Isolate parameter.
1307
1308         No tests. No change in behavior.
1309
1310         * bindings/scripts/CodeGeneratorV8.pm:
1311         (GenerateHeader):
1312         (GenerateNamedConstructorCallback):
1313         (GenerateImplementation):
1314         * bindings/scripts/test/V8/V8Float64Array.cpp:
1315         (WebCore::V8Float64Array::GetRawTemplate):
1316         (WebCore::V8Float64Array::GetTemplate):
1317         * bindings/scripts/test/V8/V8Float64Array.h:
1318         (V8Float64Array):
1319         (WebCore::V8Float64Array::installPerContextPrototypeProperties):
1320         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1321         (WebCore::V8TestActiveDOMObject::GetRawTemplate):
1322         (WebCore::V8TestActiveDOMObject::GetTemplate):
1323         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1324         (V8TestActiveDOMObject):
1325         (WebCore::V8TestActiveDOMObject::installPerContextPrototypeProperties):
1326         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1327         (WebCore::V8TestCustomNamedGetter::GetRawTemplate):
1328         (WebCore::V8TestCustomNamedGetter::GetTemplate):
1329         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1330         (V8TestCustomNamedGetter):
1331         (WebCore::V8TestCustomNamedGetter::installPerContextPrototypeProperties):
1332         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1333         (WebCore::V8TestEventConstructor::GetRawTemplate):
1334         (WebCore::V8TestEventConstructor::GetTemplate):
1335         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1336         (V8TestEventConstructor):
1337         (WebCore::V8TestEventConstructor::installPerContextPrototypeProperties):
1338         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1339         (WebCore::V8TestEventTarget::GetRawTemplate):
1340         (WebCore::V8TestEventTarget::GetTemplate):
1341         * bindings/scripts/test/V8/V8TestEventTarget.h:
1342         (V8TestEventTarget):
1343         (WebCore::V8TestEventTarget::installPerContextPrototypeProperties):
1344         * bindings/scripts/test/V8/V8TestException.cpp:
1345         (WebCore::V8TestException::GetRawTemplate):
1346         (WebCore::V8TestException::GetTemplate):
1347         * bindings/scripts/test/V8/V8TestException.h:
1348         (V8TestException):
1349         (WebCore::V8TestException::installPerContextPrototypeProperties):
1350         * bindings/scripts/test/V8/V8TestInterface.cpp:
1351         (WebCore::V8TestInterface::GetRawTemplate):
1352         (WebCore::V8TestInterface::GetTemplate):
1353         * bindings/scripts/test/V8/V8TestInterface.h:
1354         (V8TestInterface):
1355         (WebCore::V8TestInterface::installPerContextPrototypeProperties):
1356         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1357         (WebCore::V8TestMediaQueryListListener::GetRawTemplate):
1358         (WebCore::V8TestMediaQueryListListener::GetTemplate):
1359         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1360         (V8TestMediaQueryListListener):
1361         (WebCore::V8TestMediaQueryListListener::installPerContextPrototypeProperties):
1362         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1363         (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
1364         (WebCore::V8TestNamedConstructor::GetRawTemplate):
1365         (WebCore::V8TestNamedConstructor::GetTemplate):
1366         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1367         (V8TestNamedConstructor):
1368         (WebCore::V8TestNamedConstructor::installPerContextPrototypeProperties):
1369         * bindings/scripts/test/V8/V8TestNode.cpp:
1370         (WebCore::V8TestNode::GetRawTemplate):
1371         (WebCore::V8TestNode::GetTemplate):
1372         * bindings/scripts/test/V8/V8TestNode.h:
1373         (V8TestNode):
1374         (WebCore::V8TestNode::installPerContextPrototypeProperties):
1375         * bindings/scripts/test/V8/V8TestObj.cpp:
1376         (WebCore::V8TestObj::GetRawTemplate):
1377         (WebCore::V8TestObj::GetTemplate):
1378         (WebCore::V8TestObj::installPerContextPrototypeProperties):
1379         * bindings/scripts/test/V8/V8TestObj.h:
1380         (V8TestObj):
1381         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
1382         (WebCore::V8TestOverloadedConstructors::GetRawTemplate):
1383         (WebCore::V8TestOverloadedConstructors::GetTemplate):
1384         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
1385         (V8TestOverloadedConstructors):
1386         (WebCore::V8TestOverloadedConstructors::installPerContextPrototypeProperties):
1387         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1388         (WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate):
1389         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
1390         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1391         (V8TestSerializedScriptValueInterface):
1392         (WebCore::V8TestSerializedScriptValueInterface::installPerContextPrototypeProperties):
1393         * bindings/v8/V8PerContextData.cpp:
1394         (WebCore::V8PerContextData::constructorForTypeSlowCase):
1395         * bindings/v8/WrapperTypeInfo.h:
1396         (WebCore):
1397         (WebCore::WrapperTypeInfo::installPerContextPrototypeProperties):
1398
1399 2013-02-06  Terry Anderson  <tdanderson@chromium.org>
1400
1401         Add support for gesture scroll events that do not propagate to enclosing scrollables
1402         https://bugs.webkit.org/show_bug.cgi?id=108849
1403
1404         Reviewed by Antonio Gomes.
1405
1406         Tests: fast/events/touch/gesture/touch-gesture-scroll-div-not-propagated.html
1407                fast/events/touch/gesture/touch-gesture-scroll-iframe-not-propagated.html
1408                fast/events/touch/gesture/touch-gesture-scroll-page-not-propagated.html
1409
1410         Rename RenderLayer::scrollByRecursively() to RenderLayer::scrollBy() and add a parameter
1411         of type RenderLayer::ScrollPropagation to specify whether or not the scroll should
1412         propagate to its parent by recursing. Implement RenderLayer::scrollByRecursively() as a
1413         call to RenderLayer::scrollBy() with argument RenderLayer::ShouldPropagateScroll so
1414         that all existing calls to the function still produce the correct behavior.
1415
1416         In EventHandler::handleGestureScrollUpdate(), call RenderLayer::scrollBy() with
1417         argument RenderLayer::ShouldPropagateScroll if |gestureEvent| is a GestureScrollUpdate
1418         or instead with argument RenderLayer::DontPropagateScroll if |gestureEvent| is a
1419         GestureScrollUpdateWithoutPropagation.
1420
1421         * dom/GestureEvent.cpp:
1422         (WebCore::GestureEvent::create):
1423         * page/EventHandler.cpp:
1424         (WebCore::EventHandler::handleGestureEvent):
1425         (WebCore::EventHandler::handleGestureScrollUpdate):
1426         * platform/PlatformEvent.h:
1427         * platform/Scrollbar.cpp:
1428         (WebCore::Scrollbar::gestureEvent):
1429         * platform/chromium/PopupContainer.cpp:
1430         (WebCore::PopupContainer::handleGestureEvent):
1431         * rendering/RenderLayer.cpp:
1432         (WebCore::RenderLayer::scrollByRecursively):
1433         (WebCore):
1434         (WebCore::RenderLayer::scrollBy):
1435         * rendering/RenderLayer.h:
1436
1437 2013-02-06  Ojan Vafai  <ojan@chromium.org>
1438
1439         [Chromium] table-section-overflow-clip-crash.html hits an assert
1440         https://bugs.webkit.org/show_bug.cgi?id=108594
1441
1442         Reviewed by Levi Weintraub.
1443
1444         When a counter calls setNeedsLayout, it also marks it's containing blocks
1445         as needing layout, so we need to clear the setNeedsLayoutIsForbidden bit on the
1446         containing blocks as well as the counter itself.
1447
1448         Also, use RAII objects for all the places where we clear this bit and make
1449         the setter/getter for it private to RenderObject.
1450
1451         * rendering/RenderCounter.cpp:
1452         (WebCore::RenderCounter::computePreferredLogicalWidths):
1453         * rendering/RenderObject.cpp:
1454         (WebCore::RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope):
1455         (WebCore::RenderObject::markContainingBlocksForLayout):
1456         * rendering/RenderObject.h:
1457         (SetLayoutNeededForbiddenScope):
1458         (RenderObject):
1459         (WebCore::RenderObject::isSetNeedsLayoutForbidden):
1460         (WebCore::RenderObject::setNeedsLayoutIsForbidden):
1461         * rendering/RenderQuote.cpp:
1462         (WebCore::RenderQuote::computePreferredLogicalWidths):
1463         * rendering/RenderTableSection.cpp:
1464         (WebCore::RenderTableSection::calcRowLogicalHeight):
1465         (WebCore::RenderTableSection::layoutRows):
1466         * rendering/mathml/RenderMathMLOperator.cpp:
1467         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
1468         * rendering/mathml/RenderMathMLRoot.cpp:
1469         (WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
1470         * rendering/mathml/RenderMathMLRow.cpp:
1471         (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
1472
1473 2013-02-06  Ojan Vafai  <ojan@chromium.org>
1474
1475         display:none file upload button crashes
1476         https://bugs.webkit.org/show_bug.cgi?id=109102
1477
1478         Reviewed by Levi Weintraub.
1479
1480         Test: fast/forms/file/display-none-upload-button.html
1481
1482         * rendering/RenderFileUploadControl.cpp:
1483         (WebCore::nodeWidth):
1484         (WebCore::RenderFileUploadControl::paintObject):
1485         Having an upload button doesn't mean we have a rendered upload button.
1486         Null check the renderer before trying to access it.
1487
1488 2013-02-06  Dirk Schulze  <dschulze@adobe.com>
1489
1490         Context's currentPath should check for passed type
1491         https://bugs.webkit.org/show_bug.cgi?id=109097
1492
1493         Reviewed by Dean Jackson.
1494
1495         Add check for passed pointer and return earlier.
1496
1497         Test: fast/canvas/canvas-currentPath-crash.html
1498
1499         * html/canvas/CanvasRenderingContext2D.cpp:
1500         (WebCore::CanvasRenderingContext2D::setCurrentPath):
1501
1502 2013-02-06  Rafael Weinstein  <rafaelw@chromium.org>
1503
1504         [HTMLTemplateElement] Non </template> end tags should be ignored in "template contents" insertion mode.
1505         https://bugs.webkit.org/show_bug.cgi?id=109090
1506
1507         Reviewed by Adam Barth.
1508
1509         https://dvcs.w3.org/hg/webcomponents/raw-file/38536d37fb82/spec/templates/index.html#template-contents-insertion-mode.
1510
1511         Test added to html5lib suite.
1512
1513         * html/parser/HTMLTreeBuilder.cpp:
1514         (WebCore::HTMLTreeBuilder::processEndTag):
1515
1516 2013-02-06  Alexandre Elias  <aelias@chromium.org>
1517
1518         Make ScrollView::paint() clip by visibleContentRect
1519         https://bugs.webkit.org/show_bug.cgi?id=108888
1520
1521         Reviewed by Levi Weintraub.
1522
1523         When applyPageScaleFactorInCompositor or fixedVisibleContentRect
1524         are used, frameRect() and visibleContentRect(true).size() are
1525         no longer synonyms, and the latter is the one that should be
1526         used for clipping paints.
1527
1528         New WebFrameTest: pageScaleFactorScalesPaintClip.
1529
1530         * platform/ScrollView.cpp:
1531         (WebCore::ScrollView::paint):
1532
1533 2013-02-06  Dima Gorbik  <dgorbik@apple.com>
1534
1535         Store the language internally instead of using lang attribute for WebVTT nodes
1536         https://bugs.webkit.org/show_bug.cgi?id=108858
1537
1538         Reviewed by Eric Carlson.
1539
1540         Only language webvtt elements should have a lang attribute so we have to store
1541         the language internally in the element. Refactored the code to make 
1542         computeInheritedLanguage virtual.
1543
1544         Existing tests were modified to cover this case.
1545
1546         * css/SelectorChecker.cpp:
1547         (WebCore::SelectorChecker::checkOne):
1548         * html/track/WebVTTElement.cpp:
1549         (WebCore::WebVTTElement::WebVTTElement):
1550         (WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren):
1551         (WebCore::WebVTTElement::createEquivalentHTMLElement): clone the internal language property.
1552         * html/track/WebVTTElement.h:
1553         (WebCore::WebVTTElement::language):
1554         (WebCore::WebVTTElement::setLanguage):
1555         * html/track/WebVTTParser.cpp: only set the lang attribute for language objects.
1556         (WebCore::WebVTTParser::constructTreeFromToken):
1557
1558 2013-02-06  Levi Weintraub  <leviw@chromium.org>
1559
1560         Negative text indents can break RenderBlock's inline maximum preferred width calculation
1561         https://bugs.webkit.org/show_bug.cgi?id=108973
1562
1563         Reviewed by Emil A Eklund.
1564
1565         Change two quirks about to how we calculate a block's inline preferred width with
1566         text-indent.
1567
1568         First, re-use text-indent that's first applied to floats on text that follows it.
1569         This matches Layout, as otherwise we can prematurely wrap text when there's a negative
1570         margin on a block starting with a float. This also matches FireFox.
1571
1572         Second, correct how the max preferred width is calculated in the presence of a negative
1573         text-indent. If the text-indent is more negative than the first text line break, we
1574         update the value to be the remainder. Previously, we added this remaining negative value
1575         to subsequent minimum and maximum preferred width calculations (until the remainder was
1576         gone). This is wrong for the max preferred width, as we're adding the negative value more
1577         than once, and leads to a max preferred width that's smaller than our line.
1578
1579         Test: fast/css/negative-text-indent-in-inline-block.html
1580
1581         * rendering/RenderBlock.cpp:
1582         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1583
1584 2013-02-06  Mark Lam  <mark.lam@apple.com>
1585
1586         Fix broken release builds, greening the bots.
1587         https://bugs.webkit.org/show_bug.cgi?id=107475.
1588
1589         Not reviewed.
1590
1591         No new tests.
1592
1593         * Modules/webdatabase/DatabaseManager.cpp:
1594         (WebCore::logOpenDatabaseError):
1595
1596 2013-02-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1597
1598         Unreviewed, rolling out r142025.
1599         http://trac.webkit.org/changeset/142025
1600         https://bugs.webkit.org/show_bug.cgi?id=109091
1601
1602         broke the build (Requested by tdanderson on #webkit).
1603
1604         * dom/GestureEvent.cpp:
1605         (WebCore::GestureEvent::create):
1606         * page/EventHandler.cpp:
1607         (WebCore::EventHandler::handleGestureEvent):
1608         (WebCore::EventHandler::handleGestureScrollUpdate):
1609         * platform/PlatformEvent.h:
1610         * platform/Scrollbar.cpp:
1611         (WebCore::Scrollbar::gestureEvent):
1612         * platform/chromium/PopupContainer.cpp:
1613         (WebCore::PopupContainer::handleGestureEvent):
1614         * rendering/RenderLayer.cpp:
1615         (WebCore::RenderLayer::scrollByRecursively):
1616         * rendering/RenderLayer.h:
1617
1618 2013-02-06  Mark Lam  <mark.lam@apple.com>
1619
1620         Split openDatabase() between front and back end work.
1621         https://bugs.webkit.org/show_bug.cgi?id=107475.
1622
1623         Reviewed by Anders Carlsson.
1624
1625         The main work of splitting DatabaseManager::openDatabase() is in
1626         refactoring how DatabaseTracker::canEstablishDatabase() works. It used
1627         to check for adequate space quota, and if the check fails, it would call
1628         back into the client from inside canEstablishDatabase(). The call back
1629         allows the client to update the quota (if appropriate). Thereafter,
1630         canEstablishDatabase() will retry its quota check.
1631
1632         In a webkit2 world, we'll want to minimize the traffic between the
1633         client (script side) and the server (sqlite db side), and ideally, we
1634         don't want the server to call back to the client. Note: the
1635         DatabaseTracker belongs on the server side.
1636
1637         To achieve this, we split canEstablishDatabase() into 2 parts: the
1638         checks before the call back to the client, and the checks after.
1639         The first part will retain the name canEstablishDatabase(), and the
1640         second part will be named retryCanEstablishDatabase().
1641         We also added a DatabaseServer::openDatabase() function that can be
1642         called with a retry flag.
1643
1644         The client side DatabaseManager::openDatabase() will call
1645         DatabaseServer::openDatabase(), which then calls canEstablishDatabase()
1646         to do its quota check. If there is enough quota,
1647         DatabaseServer::openDatabase() will proceed to open the backend database
1648         without return to the client first. The opened database will be returned
1649         to the client.
1650
1651         If DatabaseServer::openDatabase() finds inadequate quota the first time,
1652         it will return with a DatabaseSizeExceededQuota error. The DatabaseManager
1653         (on the client side) will check for this error and call back to its client
1654         for an opportunity to increase the quota. Thereafter, the DatabaseManager
1655         will call DatabaseServer::openDatabase() again. This time,
1656         DatabaseServer::openDatabase() will call retryCanEstablishDatabase() to
1657         check the quota, and then open the backend database if there is enough
1658         quota.
1659
1660         No new tests.
1661
1662         * Modules/webdatabase/AbstractDatabaseServer.h:
1663         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
1664         (WebCore::DOMWindowWebDatabase::openDatabase):
1665         * Modules/webdatabase/Database.cpp:
1666         (WebCore::Database::create):
1667         * Modules/webdatabase/Database.h:
1668         (Database):
1669         * Modules/webdatabase/DatabaseBackend.cpp:
1670         (WebCore::DatabaseBackend::performOpenAndVerify):
1671         * Modules/webdatabase/DatabaseBackend.h:
1672         (DatabaseBackend):
1673         * Modules/webdatabase/DatabaseBackendAsync.cpp:
1674         (WebCore::DatabaseBackendAsync::openAndVerifyVersion):
1675         (WebCore::DatabaseBackendAsync::performOpenAndVerify):
1676         * Modules/webdatabase/DatabaseBackendAsync.h:
1677         (DatabaseBackendAsync):
1678         * Modules/webdatabase/DatabaseBackendSync.cpp:
1679         (WebCore::DatabaseBackendSync::openAndVerifyVersion):
1680         * Modules/webdatabase/DatabaseBackendSync.h:
1681         (DatabaseBackendSync):
1682         * Modules/webdatabase/DatabaseError.h:
1683         (WebCore::ENUM_CLASS):
1684         * Modules/webdatabase/DatabaseManager.cpp:
1685         (WebCore::DatabaseManager::exceptionCodeForDatabaseError):
1686         (WebCore::DatabaseManager::openDatabaseBackend):
1687         (WebCore::DatabaseManager::openDatabase):
1688         (WebCore::DatabaseManager::openDatabaseSync):
1689         * Modules/webdatabase/DatabaseManager.h:
1690         (DatabaseManager):
1691         * Modules/webdatabase/DatabaseServer.cpp:
1692         (WebCore::DatabaseServer::openDatabase):
1693         (WebCore::DatabaseServer::createDatabase):
1694         * Modules/webdatabase/DatabaseServer.h:
1695         * Modules/webdatabase/DatabaseSync.cpp:
1696         (WebCore::DatabaseSync::create):
1697         * Modules/webdatabase/DatabaseSync.h:
1698         (DatabaseSync):
1699         * Modules/webdatabase/DatabaseTracker.cpp:
1700         (WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
1701         (WebCore::DatabaseTracker::canEstablishDatabase):
1702         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
1703         * Modules/webdatabase/DatabaseTracker.h:
1704         (DatabaseTracker):
1705         * Modules/webdatabase/WorkerContextWebDatabase.cpp:
1706         (WebCore::WorkerContextWebDatabase::openDatabase):
1707         (WebCore::WorkerContextWebDatabase::openDatabaseSync):
1708         * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp:
1709         (WebCore::DatabaseTracker::canEstablishDatabase):
1710         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
1711
1712 2013-02-06  Tony Gentilcore  <tonyg@chromium.org>
1713
1714         Fix CompactHTMLToken's copy ctor to copy all fields
1715         https://bugs.webkit.org/show_bug.cgi?id=109076
1716
1717         Reviewed by Adam Barth.
1718
1719         This was introduced by me in r142004. Without this patch we fail all tests when using the background parser.
1720
1721         Also don't use getters in copy ctor.
1722
1723         No new tests because no new functionality.
1724
1725         * html/parser/CompactHTMLToken.cpp:
1726         (WebCore::CompactHTMLToken::CompactHTMLToken):
1727
1728 2013-02-06  Brian Salomon  <bsalomon@google.com>
1729
1730         [Chromium/Skia] Remove use of deprecated Skia names
1731         https://bugs.webkit.org/show_bug.cgi?id=109085
1732
1733         Reviewed by Stephen White.
1734
1735         Tested by every existing canvas2d test.
1736
1737         * platform/chromium/support/GraphicsContext3DPrivate.cpp:
1738         (WebCore::GraphicsContext3DPrivate::grContext):
1739
1740 2013-02-06  Terry Anderson  <tdanderson@chromium.org>
1741
1742         Add support for gesture scroll events that do not propagate to enclosing scrollables
1743         https://bugs.webkit.org/show_bug.cgi?id=108849
1744
1745         Reviewed by Antonio Gomes.
1746
1747         Tests: fast/events/touch/gesture/touch-gesture-scroll-div-not-propagated.html
1748                fast/events/touch/gesture/touch-gesture-scroll-iframe-not-propagated.html
1749                fast/events/touch/gesture/touch-gesture-scroll-page-not-propagated.html
1750
1751         Rename RenderLayer::scrollByRecursively() to RenderLayer::scrollBy() and add a parameter
1752         of type RenderLayer::ScrollPropagation to specify whether or not the scroll should
1753         propagate to its parent by recursing. Implement RenderLayer::scrollByRecursively() as a
1754         call to RenderLayer::scrollBy() with argument RenderLayer::ShouldPropagateScroll so
1755         that all existing calls to the function still produce the correct behavior.
1756
1757         In EventHandler::handleGestureScrollUpdate(), call RenderLayer::scrollBy() with
1758         argument RenderLayer::ShouldPropagateScroll if |gestureEvent| is a GestureScrollUpdate
1759         or instead with argument RenderLayer::DontPropagateScroll if |gestureEvent| is a
1760         GestureScrollUpdateWithoutPropagation.
1761
1762         * dom/GestureEvent.cpp:
1763         (WebCore::GestureEvent::create):
1764         * page/EventHandler.cpp:
1765         (WebCore::EventHandler::handleGestureEvent):
1766         (WebCore::EventHandler::handleGestureScrollUpdate):
1767         * platform/PlatformEvent.h:
1768         * platform/Scrollbar.cpp:
1769         (WebCore::Scrollbar::gestureEvent):
1770         * platform/chromium/PopupContainer.cpp:
1771         (WebCore::PopupContainer::handleGestureEvent):
1772         * rendering/RenderLayer.cpp:
1773         (WebCore::RenderLayer::scrollByRecursively):
1774         (WebCore):
1775         (WebCore::RenderLayer::scrollBy):
1776         * rendering/RenderLayer.h:
1777
1778 2013-02-06  Ryosuke Niwa  <rniwa@webkit.org>
1779
1780         REGRESSION(r141136): Apple's internal PLT test suite doesn't finish
1781         https://bugs.webkit.org/show_bug.cgi?id=108380
1782
1783         Reviewed by Alexey Proskuryakov.
1784
1785         Re-enable the main resource cache since the regression had been fixed in r141615.
1786
1787         * loader/cache/CachedResourceLoader.cpp:
1788         (WebCore::CachedResourceLoader::requestResource):
1789
1790 2013-02-06  Uday Kiran  <udaykiran@motorola.com>
1791
1792         Implement 'vmax' from CSS3 values and units
1793         https://bugs.webkit.org/show_bug.cgi?id=91440
1794
1795         Reviewed by Antti Koivisto.
1796
1797         vmax is implemented as primitive length unit.
1798         New length type ViewportPercentageMax is added and included support for fetching the value
1799         of this viewport percentage unit based on current viewport size.
1800
1801         The specification related to this implementation is
1802         http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths.
1803
1804         Tests: css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmax-absolute.html
1805                css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmax.html
1806
1807         * css/CSSGrammar.y.in: Added vmax support.
1808         * css/CSSParser.cpp: Parsing of vmax unit.
1809         (WebCore::CSSParser::validUnit): Added vmax to valid units.
1810         (WebCore::CSSParser::createPrimitiveNumericValue): Added vmax to primitive untis.
1811         (WebCore::CSSParser::parseValidPrimitive): Creation of CSSPrimitive for vmax.
1812         (WebCore::CSSParser::detectNumberToken): Parsing of vmax token.
1813         * css/CSSParserValues.cpp:
1814         (WebCore::CSSParserValue::createCSSValue): Added support for vmax.
1815         * css/CSSPrimitiveValue.cpp:
1816         (WebCore::isValidCSSUnitTypeForDoubleConversion): Added support for vmax.
1817         (WebCore::unitCategory): Ditto.
1818         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Ditto.
1819         (WebCore::CSSPrimitiveValue::cleanup):
1820         (WebCore::CSSPrimitiveValue::customCssText): Added support for vmax.
1821         (WebCore::CSSPrimitiveValue::viewportPercentageLength): Function to create the Length structure for the viewport-percentage unit types.
1822         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1823         * css/CSSPrimitiveValue.h:
1824         (WebCore::CSSPrimitiveValue::isViewportPercentageLength): Checks whether the primitive value is ViewportPercentage Length.
1825         * css/CSSPrimitiveValue.idl: Added support for vmax.
1826         * css/LengthFunctions.cpp: Calcuation of length value based on the current viewport size.
1827         (WebCore::minimumValueForLength):
1828         (WebCore::valueForLength):
1829         (WebCore::floatValueForLength):
1830         * platform/Length.h:
1831         (WebCore::Length::isViewportPercentage): To check the Length is of type ViewportPercentage.
1832         * rendering/RenderBox.cpp:
1833         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1834         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1835
1836 2013-02-06  Pravin D  <pravind.2k4@gmail.com>
1837
1838         When a block element is made inline positioned and has static left and right,  it does not follow inline formatting context
1839         https://bugs.webkit.org/show_bug.cgi?id=91665
1840
1841         Reviewed by Julien Chaffraix.
1842
1843         Out-of-flow-positioned elements have their display overriden to BLOCK. When a static block elements 
1844         changes to inline out-of-flow-positioned or vice-versa, the element current and previous display properties 
1845         are same. This causes the element to follow a wrong flow context(in this case Block context) and the element
1846         is laid out incorrectly. The patch fixes the issue by reattaching the renderers of the node whenever either
1847         position property changes or when its floating property changes.
1848         Also the cases when an out-of-flow-positioned/floating element changes to static/non-floating element where
1849         being specially handled. As reattaching the renderers in the above cases correctly handles the above cases,
1850         special handling for such cases is no more required and the related code can be safely removed.
1851  
1852         Reattaching renderers for the afore mentioned issues takes a different(longer) code path. Performance measurements
1853         summary for the same is as follows:
1854                                                               % increase in time
1855          Absolute-block-to-static-block                            2.00
1856          Absolute-inline-to-static-block                           1.21
1857          Absolute-inline-to-static-inline                          1.18
1858          Static-block-to-absolute-block                            1.13
1859          Static-inline-to-absolute-inline                          1.35
1860          Floating-block-non-floating-block                         0.85
1861          Floating-inline-non-floating-block                        0.66
1862          Floating-inline-non-floating-inline                       0.57
1863          Non-floating-block-floating-block                         0.12
1864          Non-floating-inline-floating-inline                       1.36
1865
1866         Tests: fast/dynamic/absolute-positioned-to-static-positioned.html
1867                fast/dynamic/floating-to-non-floating.html
1868                fast/dynamic/non-floating-to-floating.html
1869                fast/dynamic/static-positioned-to-absolute-positioned.html
1870
1871         * dom/Node.cpp:
1872         (WebCore::Node::diff):
1873           Return detach in the following conditions:
1874              1) Element changes to out-of-flow-positioned or vice-versa.
1875              2) Element becomes floating or vice-versa.
1876
1877         * rendering/RenderBlock.cpp:
1878         (WebCore):
1879         * rendering/RenderBlock.h:
1880         (RenderBlock):
1881         * rendering/RenderBoxModelObject.h:
1882         (RenderBoxModelObject):
1883         * rendering/RenderInline.cpp:
1884         (WebCore):
1885         * rendering/RenderInline.h:
1886         (RenderInline):
1887         * rendering/RenderObject.cpp:
1888         (WebCore):
1889         (WebCore::RenderObject::styleWillChange):
1890         (WebCore::RenderObject::styleDidChange):
1891         * rendering/RenderObject.h:
1892         (RenderObject):
1893           The fix in Node::diff() obsoletes some code. The above deletion are part of this dead code cleanup.
1894
1895 2013-02-06  Chris Fleizach  <cfleizach@apple.com>
1896
1897         AX: if <html> has an ARIA attribute, it's exposed as an AXGroup
1898         https://bugs.webkit.org/show_bug.cgi?id=109008
1899
1900         Reviewed by Ryosuke Niwa.
1901
1902         If an <html> element had an ARIA attribute, it was being turned into an element
1903         in the AX hierarchy. This was causing trouble for screen readers by inserting
1904         an unexpected element in the navigation sequence.
1905
1906         Test: accessibility/html-html-element-is-ignored.html
1907
1908         * accessibility/AccessibilityRenderObject.cpp:
1909         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1910
1911 2013-02-06  Shawn Singh  <shawnsingh@chromium.org>
1912
1913         RenderLayer hasVisibleContent() has inconsistent semantics causing disappearing composited layers
1914         https://bugs.webkit.org/show_bug.cgi?id=108118
1915
1916         Reviewed by Simon Fraser.
1917
1918         RenderLayerBacking::hasVisibleNonCompositingDescendantLayers was
1919         only checking whether direct children had visible content. As a
1920         result, composited layers had wrong visibility status if only a
1921         deeper descendant RenderLayer was visible.
1922
1923         Test: compositing/visibility/visibility-on-distant-descendant.html
1924
1925         * rendering/RenderLayerBacking.cpp:
1926         (WebCore::hasVisibleNonCompositingDescendant): copied the original
1927         implementation into this function; then added the RenderLayer
1928         recursion as appropriate.
1929         (WebCore):
1930         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
1931         This is now just a wrapper to the private static recursive
1932         function.
1933
1934 2013-02-06  Jonathon Jongsma  <jonathon.jongsma@collabora.com>
1935
1936         [GStreamer] MediaPlayer's code is not easily reusable by other GStreamer-based players
1937         https://bugs.webkit.org/show_bug.cgi?id=100261
1938
1939         Refactor the media player implementation so that more of the
1940         internal functionality can be shared between the current media
1941         backend and the mediastream player backend.  Common code is
1942         broken out into a MediaPlayerPrivateGStreamerBase class, and
1943         both MediaPlayerPrivateGStreamer and
1944         StreamMediaPlayerPrivateGStreamer inherit from this base class.
1945
1946         Reviewed by Philippe Normand
1947
1948         No new tests since functionality is covered by existing media tests
1949
1950         * GNUmakefile.list.am:
1951         * PlatformEfl.cmake:
1952         * Target.pri:
1953         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp:
1954         (WebCore::FullscreenVideoControllerGStreamer::create):
1955         (WebCore::FullscreenVideoControllerGStreamer::FullscreenVideoControllerGStreamer):
1956         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.h:
1957         (WebCore):
1958         (FullscreenVideoControllerGStreamer):
1959         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1960         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1961         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1962         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1963         (MediaPlayerPrivateGStreamer):
1964         (WebCore::MediaPlayerPrivateGStreamer::isLiveStream):
1965         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: Added.
1966         (WebCore):
1967         (WebCore::greatestCommonDivisor):
1968         (WebCore::mediaPlayerPrivateVolumeChangedCallback):
1969         (WebCore::mediaPlayerPrivateVolumeChangeTimeoutCallback):
1970         (WebCore::mediaPlayerPrivateMuteChangedCallback):
1971         (WebCore::mediaPlayerPrivateMuteChangeTimeoutCallback):
1972         (WebCore::mediaPlayerPrivateRepaintCallback):
1973         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
1974         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
1975         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
1976         (WebCore::MediaPlayerPrivateGStreamerBase::setVolume):
1977         (WebCore::MediaPlayerPrivateGStreamerBase::volume):
1978         (WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfVolumeChange):
1979         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
1980         (WebCore::MediaPlayerPrivateGStreamerBase::networkState):
1981         (WebCore::MediaPlayerPrivateGStreamerBase::readyState):
1982         (WebCore::MediaPlayerPrivateGStreamerBase::sizeChanged):
1983         (WebCore::MediaPlayerPrivateGStreamerBase::setMuted):
1984         (WebCore::MediaPlayerPrivateGStreamerBase::muted):
1985         (WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfMute):
1986         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
1987         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
1988         (WebCore::MediaPlayerPrivateGStreamerBase::setSize):
1989         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1990         (WebCore::MediaPlayerPrivateGStreamerBase::enterFullscreen):
1991         (WebCore::MediaPlayerPrivateGStreamerBase::exitFullscreen):
1992         (WebCore::MediaPlayerPrivateGStreamerBase::supportsFullscreen):
1993         (WebCore::MediaPlayerPrivateGStreamerBase::platformMedia):
1994         (WebCore::MediaPlayerPrivateGStreamerBase::movieLoadType):
1995         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
1996         (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
1997         (WebCore::MediaPlayerPrivateGStreamerBase::decodedFrameCount):
1998         (WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount):
1999         (WebCore::MediaPlayerPrivateGStreamerBase::audioDecodedByteCount):
2000         (WebCore::MediaPlayerPrivateGStreamerBase::videoDecodedByteCount):
2001         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: Added.
2002         (WebCore):
2003         (MediaPlayerPrivateGStreamerBase):
2004         (WebCore::MediaPlayerPrivateGStreamerBase::supportsMuting):
2005         (WebCore::MediaPlayerPrivateGStreamerBase::setVisible):
2006         (WebCore::MediaPlayerPrivateGStreamerBase::hasSingleSecurityOrigin):
2007         (WebCore::MediaPlayerPrivateGStreamerBase::maxTimeLoaded):
2008         (WebCore::MediaPlayerPrivateGStreamerBase::canEnterFullscreen):
2009         (WebCore::MediaPlayerPrivateGStreamerBase::mediaPlayer):
2010         (WebCore::MediaPlayerPrivateGStreamerBase::audioSink):
2011         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
2012         (WebCore::FullscreenVideoControllerGtk::FullscreenVideoControllerGtk):
2013         * platform/graphics/gtk/FullscreenVideoControllerGtk.h:
2014         (FullscreenVideoControllerGtk):
2015
2016 2013-02-06  Tony Gentilcore  <tonyg@chromium.org>
2017
2018         Call XSSAuditor's didBlockScript() for the threaded HTML parser
2019         https://bugs.webkit.org/show_bug.cgi?id=108726
2020
2021         Reviewed by Adam Barth.
2022
2023         This patch causes us to call didBlockScript() on the main thread if the CompactHTML token has XSSInfo.
2024         To do so, we:
2025         1. Rename DidBlockScriptRequest to XSSInfo.
2026         2. Add an OwnPtr<XSSInfo> field to CompactHTMLToken.
2027         3. Add an isSafeToSendToAnotherThread() method to String and KURL.
2028
2029         We don't yet populate didBlockScriptRequest on the background thread, but this should just work once we do.
2030
2031         No new tests because no new functionality.
2032
2033         * html/parser/BackgroundHTMLParser.cpp:
2034         (WebCore::BackgroundHTMLParser::pumpTokenizer): Update comment for rename.
2035         * html/parser/CompactHTMLToken.cpp:
2036         (SameSizeAsCompactHTMLToken):
2037         (WebCore::CompactHTMLToken::CompactHTMLToken): Add a copy constructor used by Vector.
2038         (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread): Include new m_xssInfo field in safety check.
2039         (WebCore):
2040         (WebCore::CompactHTMLToken::xssInfo): Added.
2041         (WebCore::CompactHTMLToken::setXSSInfo): Added.
2042         * html/parser/CompactHTMLToken.h: Add an OwnPtr<XSSInfo> field to CompactHTMLToken.
2043         (WebCore):
2044         (CompactHTMLToken):
2045         (WTF): Add VectorTraits necessary for copying Vector fields objects that contain an OwnPtr.
2046         * html/parser/HTMLDocumentParser.cpp:
2047         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser): Add new didBlockScript() call.
2048         (WebCore::HTMLDocumentParser::pumpTokenizer):
2049         * html/parser/XSSAuditor.cpp: Renaming.
2050         (WebCore::XSSAuditor::filterToken):
2051         * html/parser/XSSAuditor.h: Renaming.
2052         (WebCore):
2053         (XSSAuditor):
2054         * html/parser/XSSAuditorDelegate.cpp:
2055         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
2056         (WebCore):
2057         (WebCore::XSSAuditorDelegate::didBlockScript):
2058         * html/parser/XSSAuditorDelegate.h:
2059         (WebCore::XSSInfo::create):
2060         (XSSInfo):
2061         (WebCore::XSSInfo::XSSInfo):
2062         (XSSAuditorDelegate):
2063         * platform/KURL.cpp:
2064         (WebCore::KURL::isSafeToSendToAnotherThread): Added.
2065         (WebCore):
2066         * platform/KURL.h:
2067         (KURL):
2068         * platform/KURLGoogle.cpp:
2069         (WebCore):
2070         (WebCore::KURLGooglePrivate::isSafeToSendToAnotherThread): Added.
2071         * platform/KURLGooglePrivate.h:
2072         (KURLGooglePrivate):
2073         * platform/KURLWTFURLImpl.h:
2074         (WebCore::KURLWTFURLImpl::isSafeToSendToAnotherThread): Added.
2075
2076 2013-02-06  Dean Jackson  <dino@apple.com>
2077
2078         Minor updates to captions menu UI
2079         https://bugs.webkit.org/show_bug.cgi?id=109005
2080
2081         Reviewed by Eric Carlson.
2082
2083         Now that we only have a single section in the captions menu, remove the
2084         unnecessary wrapper element. Also update the UI for Mac so that the menu
2085         grows in size dynamically, and change the text we display for a caption
2086         that has neither label or language identifiers.
2087
2088         Covered by existing tests.
2089
2090         * English.lproj/Localizable.strings: New string for an unknown caption label.
2091         * css/fullscreenQuickTime.css: New rules for the captions menu.
2092         (video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
2093         (video:-webkit-full-screen::-webkit-media-controls-closed-captions-track-list):
2094         * css/mediaControlsQuickTime.css: Ditto.
2095         (video::-webkit-media-controls-closed-captions-container):
2096         (video::-webkit-media-controls-closed-captions-track-list):
2097         * html/shadow/MediaControlElements.cpp:
2098         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
2099             Remove the <section> element container.
2100         * platform/LocalizedStrings.cpp:
2101         (WebCore::textTrackNoLabelText): New string for an unknown caption label.
2102
2103 2013-02-06  Vsevolod Vlasov  <vsevik@chromium.org>
2104
2105         Web Inspector: Remove isSnippet field from FileDescriptor and UISourceCode.
2106         https://bugs.webkit.org/show_bug.cgi?id=109045
2107         
2108         Reviewed by Pavel Feldman.
2109
2110         Snippets are now distinguished based on uiSourceCode project.
2111
2112         * inspector/front-end/JavaScriptSourceFrame.js:
2113         (WebInspector.JavaScriptSourceFrame.prototype._supportsEnabledBreakpointsWhileEditing):
2114         * inspector/front-end/NavigatorView.js:
2115         * inspector/front-end/ScriptSnippetModel.js:
2116         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
2117         * inspector/front-end/ScriptsNavigator.js:
2118         (WebInspector.ScriptsNavigator.prototype._navigatorViewForUISourceCode):
2119         (WebInspector.ScriptsNavigator.prototype.addUISourceCode):
2120         (WebInspector.ScriptsNavigator.prototype.removeUISourceCode):
2121         (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
2122         (WebInspector.ScriptsNavigator.prototype.rename):
2123         (WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet):
2124         (WebInspector.SnippetsNavigatorView.prototype._handleRemoveSnippet):
2125         * inspector/front-end/ScriptsPanel.js:
2126         (WebInspector.ScriptsPanel.prototype._showFile):
2127         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2128         (WebInspector.ScriptsPanel.prototype.set _fileRenamed):
2129         * inspector/front-end/SimpleWorkspaceProvider.js:
2130         (WebInspector.SimpleWorkspaceProvider.prototype.addFile):
2131         (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
2132         * inspector/front-end/Workspace.js:
2133         (WebInspector.FileDescriptor):
2134         (WebInspector.Project.prototype._fileAdded):
2135
2136 2013-02-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2137
2138         Unreviewed, rolling out r141983.
2139         http://trac.webkit.org/changeset/141983
2140         https://bugs.webkit.org/show_bug.cgi?id=109055
2141
2142         lots of new crashes in handlescope (Requested by gavinp on
2143         #webkit).
2144
2145         * bindings/v8/DOMDataStore.h:
2146         (WebCore::DOMDataStore::setWrapperInObject):
2147         * bindings/v8/DOMWrapperWorld.h:
2148         (DOMWrapperWorld):
2149         (WebCore::DOMWrapperWorld::isolated):
2150         * bindings/v8/V8Binding.h:
2151         (WebCore):
2152         (WebCore::worldForEnteredContextIfIsolated):
2153         * bindings/v8/V8DOMWindowShell.cpp:
2154         (WebCore::V8DOMWindowShell::initializeIfNeeded):
2155         * bindings/v8/V8GCController.cpp:
2156         (WebCore::WrapperVisitor::WrapperVisitor):
2157         (WebCore):
2158         (WebCore::gcTree):
2159         (WebCore::V8GCController::didCreateWrapperForNode):
2160         (WebCore::V8GCController::gcPrologue):
2161         (WebCore::V8GCController::minorGCPrologue):
2162         (WebCore::V8GCController::majorGCPrologue):
2163         * bindings/v8/V8GCController.h:
2164         (V8GCController):
2165
2166 2013-02-06  Andreas Kling  <akling@apple.com>
2167
2168         Optimize GlyphPage for case where all glyphs are available in the same font.
2169         <http://webkit.org/b/108835>
2170         <rdar://problem/13157042>
2171
2172         Reviewed by Antti Koivisto.
2173
2174         Let GlyphPage begin optimistically assuming that all its glyphs will be represented in
2175         the same SimpleFontData*. In this (very common) case, only keep a single SimpleFontData*.
2176
2177         If glyphs from multiple fonts are mixed in one page, an array of per-glyph SimpleFontData*
2178         is allocated transparently.
2179
2180         4.98 MB progression on Membuster3.
2181
2182         * platform/graphics/GlyphPageTreeNode.cpp:
2183         (WebCore::GlyphPageTreeNode::initializePage):
2184         * platform/graphics/GlyphPage.h:
2185         (WebCore::GlyphPage::createUninitialized):
2186         (WebCore::GlyphPage::createZeroedSystemFallbackPage):
2187         (WebCore::GlyphPage::createCopiedSystemFallbackPage):
2188
2189             There are now three ways of constructing a GlyphPage, two of them are only used for
2190             creating system fallback pages.
2191
2192         (WebCore::GlyphPage::setGlyphDataForIndex):
2193
2194             Hold off creating a SimpleFontData* array until we're sure there are two different
2195             SimpleFontData* backing the glyphs in this page.
2196             We don't store font data for glyph #0, instead we let the getters always return null for it.
2197
2198         (WebCore::GlyphPage::~GlyphPage):
2199
2200             Free the SimpleFontData* array if needed.
2201
2202         (WebCore::GlyphPage::glyphDataForCharacter):
2203         (WebCore::GlyphPage::glyphDataForIndex):
2204         (WebCore::GlyphPage::fontDataForCharacter):
2205
2206             The font data for glyph #0 is always a null pointer now.
2207
2208         (WebCore::GlyphPage::clearForFontData):
2209
2210             Updated for new storage format.
2211
2212         * rendering/svg/SVGTextRunRenderingContext.cpp:
2213         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2214
2215             Fix bug where non-zero glyph was temporarily associated with null font data,
2216             which triggered the new assertion in setGlyphDataForIndex().
2217
2218 2013-02-06  Pavel Feldman  <pfeldman@chromium.org>
2219
2220         Follow up to r141979: do not consume Home/End.
2221         Not reviewed.
2222
2223         * inspector/front-end/FilteredItemSelectionDialog.js:
2224         (WebInspector.FilteredItemSelectionDialog.prototype._onKeyDown):
2225
2226 2013-02-06  Vsevolod Vlasov  <vsevik@chromium.org>
2227
2228         Web Inspector: Remove show script folders setting
2229         https://bugs.webkit.org/show_bug.cgi?id=108940
2230
2231         Reviewed by Pavel Feldman.
2232
2233         Removed showScriptFolders setting, the sources are never shown as a flat list in navigator anymore.
2234
2235         * inspector/front-end/NavigatorView.js:
2236         (WebInspector.NavigatorView):
2237         (WebInspector.NavigatorView.prototype._getOrCreateFolderTreeElement):
2238         * inspector/front-end/Settings.js:
2239         * inspector/front-end/SettingsScreen.js:
2240         (WebInspector.GenericSettingsTab):
2241
2242 2013-02-06  Andrey Lushnikov  <lushnikov@chromium.org>
2243
2244         Web Inspector: update javascriptsourcetokenizer to produce "whitespaces" token
2245         https://bugs.webkit.org/show_bug.cgi?id=108945
2246
2247         Reviewed by Pavel Feldman.
2248
2249         Update re2c grammar for SourceJavaScriptTokenizer to produce
2250         "whitespace" token which holds consequtive whitespaces in it.
2251
2252         Updated existing tests expectations.
2253
2254         * inspector/front-end/DOMSyntaxHighlighter.js:
2255         (WebInspector.DOMSyntaxHighlighter.prototype.createSpan): Do not strip spaces from tokens with class "whitespaces".
2256         * inspector/front-end/SourceJavaScriptTokenizer.js: Regenerated.
2257         (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken):
2258         * inspector/front-end/SourceJavaScriptTokenizer.re2js:
2259
2260 2013-02-06  Andrey Lushnikov  <lushnikov@chromium.org>
2261
2262         Web Inspector: refactor registerShortcuts method of DTE
2263         https://bugs.webkit.org/show_bug.cgi?id=109031
2264
2265         Reviewed by Pavel Feldman.
2266
2267         Implement _registerShortcuts method in TextEditorMainPanel which will
2268         bind its private methods to the different key combinations. Refactor
2269         method handlers handleUndoRedo, handleTabKeyPress and handleEnterKey
2270         from public to private.
2271
2272         No new tests: no change in behaviour.
2273
2274         * inspector/front-end/DefaultTextEditor.js:
2275         (WebInspector.DefaultTextEditor.prototype._registerShortcuts): Remove bindings of TextEditorMainPanel methods
2276         (WebInspector.DefaultTextEditor.prototype._handleKeyDown):
2277         (WebInspector.TextEditorMainPanel):
2278         (WebInspector.TextEditorMainPanel.prototype._registerShortcuts): Added.
2279         (WebInspector.TextEditorMainPanel.prototype._handleUndoRedo):
2280         (WebInspector.TextEditorMainPanel.prototype.handleKeyDown):
2281
2282 2013-02-06  Mike West  <mkwst@chromium.org>
2283
2284         Add an ENABLE_NOSNIFF feature flag.
2285         https://bugs.webkit.org/show_bug.cgi?id=109029
2286
2287         Reviewed by Jochen Eisinger.
2288
2289         This new flag will control the behavior of 'X-Content-Type-Options: nosniff'
2290         when processing script and other resource types.
2291
2292         * Configurations/FeatureDefines.xcconfig:
2293
2294 2013-02-06  Tommy Widenflycht  <tommyw@google.com>
2295
2296         MediaStream API: Implement DTMF support in RTCPeerConnection
2297         https://bugs.webkit.org/show_bug.cgi?id=106782
2298
2299         Reviewed by Adam Barth.
2300
2301         The WebRTC specification have added support for DTMF:
2302         http://dev.w3.org/2011/webrtc/editor/webrtc.html#peer-to-peer-dtmf
2303
2304         Implementation wise this is implemented using the same pattern as RTCDataChannel;
2305         where a RTCDTMFSenderHandler is created by the UA through a new method on
2306         RTCPeerConnectionHandler.
2307
2308         Test: fast/mediastream/RTCPeerConnection-dtmf.html
2309
2310         * CMakeLists.txt:
2311         * GNUmakefile.list.am:
2312         * Modules/mediastream/RTCDTMFSender.cpp: Added.
2313         (WebCore):
2314         (WebCore::RTCDTMFSender::create):
2315         (WebCore::RTCDTMFSender::RTCDTMFSender):
2316         (WebCore::RTCDTMFSender::~RTCDTMFSender):
2317         (WebCore::RTCDTMFSender::canInsertDTMF):
2318         (WebCore::RTCDTMFSender::track):
2319         (WebCore::RTCDTMFSender::toneBuffer):
2320         (WebCore::RTCDTMFSender::insertDTMF):
2321         (WebCore::RTCDTMFSender::didPlayTone):
2322         (WebCore::RTCDTMFSender::interfaceName):
2323         (WebCore::RTCDTMFSender::scriptExecutionContext):
2324         (WebCore::RTCDTMFSender::stop):
2325         (WebCore::RTCDTMFSender::eventTargetData):
2326         (WebCore::RTCDTMFSender::ensureEventTargetData):
2327         (WebCore::RTCDTMFSender::scheduleDispatchEvent):
2328         (WebCore::RTCDTMFSender::scheduledEventTimerFired):
2329         * Modules/mediastream/RTCDTMFSender.h: Added.
2330         (WebCore):
2331         (RTCDTMFSender):
2332         (WebCore::RTCDTMFSender::duration):
2333         (WebCore::RTCDTMFSender::interToneGap):
2334         * Modules/mediastream/RTCDTMFSender.idl: Added.
2335         * Modules/mediastream/RTCDTMFToneChangeEvent.cpp: Copied from Source/Platform/chromium/public/WebMediaStreamTrack.h.
2336         (WebCore):
2337         (WebCore::RTCDTMFToneChangeEvent::create):
2338         (WebCore::RTCDTMFToneChangeEvent::RTCDTMFToneChangeEvent):
2339         (WebCore::RTCDTMFToneChangeEvent::~RTCDTMFToneChangeEvent):
2340         (WebCore::RTCDTMFToneChangeEvent::tone):
2341         (WebCore::RTCDTMFToneChangeEvent::interfaceName):
2342         * Modules/mediastream/RTCDTMFToneChangeEvent.h: Copied from Source/Platform/chromium/public/WebMediaStreamTrack.h.
2343         (WebCore):
2344         (RTCDTMFToneChangeEventInit):
2345         (RTCDTMFToneChangeEvent):
2346         * Modules/mediastream/RTCDTMFToneChangeEvent.idl: Added.
2347         * Modules/mediastream/RTCPeerConnection.cpp:
2348         (WebCore::RTCPeerConnection::createDataChannel):
2349         (WebCore):
2350         (WebCore::RTCPeerConnection::getStreamByTrackId):
2351         (WebCore::RTCPeerConnection::createDTMFSender):
2352         * Modules/mediastream/RTCPeerConnection.h:
2353         (WebCore):
2354         (RTCPeerConnection):
2355         * Modules/mediastream/RTCPeerConnection.idl:
2356         * WebCore.gypi:
2357         * dom/EventNames.h:
2358         (WebCore):
2359         * dom/EventNames.in:
2360         * dom/EventTargetFactory.in:
2361         * platform/chromium/support/WebMediaStreamTrack.cpp:
2362         (WebKit::WebMediaStreamTrack::WebMediaStreamTrack):
2363         (WebKit):
2364         * platform/mediastream/RTCDTMFSenderHandler.h: Copied from Source/Platform/chromium/public/WebMediaStreamTrack.h.
2365         (WebCore):
2366         (RTCDTMFSenderHandler):
2367         (WebCore::RTCDTMFSenderHandler::~RTCDTMFSenderHandler):
2368         * platform/mediastream/RTCDTMFSenderHandlerClient.h: Copied from Source/Platform/chromium/public/WebMediaStreamTrack.h.
2369         (WebCore):
2370         (RTCDTMFSenderHandlerClient):
2371         (WebCore::RTCDTMFSenderHandlerClient::~RTCDTMFSenderHandlerClient):
2372         * platform/mediastream/RTCPeerConnectionHandler.h:
2373         (WebCore):
2374         (RTCPeerConnectionHandler):
2375         * platform/mediastream/chromium/RTCDTMFSenderHandlerChromium.cpp: Copied from Source/Platform/chromium/public/WebMediaStreamTrack.h.
2376         (WebCore):
2377         (WebCore::RTCDTMFSenderHandlerChromium::create):
2378         (WebCore::RTCDTMFSenderHandlerChromium::RTCDTMFSenderHandlerChromium):
2379         (WebCore::RTCDTMFSenderHandlerChromium::~RTCDTMFSenderHandlerChromium):
2380         (WebCore::RTCDTMFSenderHandlerChromium::setClient):
2381         (WebCore::RTCDTMFSenderHandlerChromium::currentToneBuffer):
2382         (WebCore::RTCDTMFSenderHandlerChromium::canInsertDTMF):
2383         (WebCore::RTCDTMFSenderHandlerChromium::insertDTMF):
2384         (WebCore::RTCDTMFSenderHandlerChromium::didPlayTone):
2385         * platform/mediastream/chromium/RTCDTMFSenderHandlerChromium.h: Copied from Source/Platform/chromium/public/WebMediaStreamTrack.h.
2386         (WebCore):
2387         (RTCDTMFSenderHandlerChromium):
2388         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
2389         (WebCore::RTCPeerConnectionHandlerChromium::createDTMFSender):
2390         (WebCore):
2391         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
2392         (RTCPeerConnectionHandlerChromium):
2393
2394 2013-02-04  Kentaro Hara  <haraken@chromium.org>
2395
2396         [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise
2397         https://bugs.webkit.org/show_bug.cgi?id=108579
2398
2399         Reviewed by Adam Barth.
2400
2401         Currently V8GCController::m_edenNodes stores a list of nodes whose
2402         wrappers have been created since the latest GC. The reason why we
2403         needed m_edenNodes is that there was no way to know a list of wrappers
2404         in the new space of V8. By using m_edenNodes, we had been approximating
2405         'wrappers in the new space' by 'wrappers that have been created since
2406         the latest GC'.
2407
2408         Now V8 provides VisitHandlesForPartialDependence(), with which WebKit
2409         can know a list of wrappers in the new space. By using the API, we can
2410         remove V8GCController::m_edenNodes. The benefit is that (1) we no longer
2411         need to keep m_edenNodes and that (2) it enables more precise minor
2412         DOM GC (Remember that m_edenNodes was just an approximation).
2413
2414         Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940
2415         The benchmark runs 300 iterations, each of which creates 100000 elements.
2416         The benchmark measures average, min, median, max and stdev of execution times
2417         of the 300 iterations. This will tell us the worst-case overhead of this change.
2418
2419         Before:
2420           mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms
2421
2422         After:
2423           mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms
2424
2425         As shown above, I couldn't observe any performance regression.
2426
2427         No tests. No change in behavior.
2428
2429         * bindings/v8/DOMDataStore.h:
2430         (WebCore::DOMDataStore::setWrapperInObject):
2431         * bindings/v8/DOMWrapperWorld.h:
2432         (DOMWrapperWorld):
2433         (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck):
2434         * bindings/v8/V8Binding.h:
2435         (WebCore):
2436         (WebCore::worldForEnteredContextIfIsolated):
2437         (WebCore::worldForEnteredContextWithoutContextCheck):
2438         * bindings/v8/V8DOMWindowShell.cpp:
2439         (WebCore::V8DOMWindowShell::initializeIfNeeded):
2440         * bindings/v8/V8GCController.cpp:
2441         (WebCore::gcTree):
2442         (WebCore):
2443         (MinorGCWrapperVisitor):
2444         (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor):
2445         (WebCore::MinorGCWrapperVisitor::notifyFinished):
2446         (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor):
2447         (WebCore::V8GCController::gcPrologue):
2448         (WebCore::V8GCController::minorGCPrologue):
2449         (WebCore::V8GCController::majorGCPrologue):
2450         * bindings/v8/V8GCController.h:
2451         (V8GCController):
2452
2453 2013-02-06  Mihai Maerean  <mmaerean@adobe.com>
2454
2455         [CSSRegions] Assertion failure in Node::detach (!renderer || renderer->inRenderFlowThread())
2456         https://bugs.webkit.org/show_bug.cgi?id=104517
2457
2458         Reviewed by Julien Chaffraix.
2459
2460         The RenderObject::inRenderFlowThread bit could have become disconnected from the fact that the RenderObject
2461         has (or not) an enclosing RenderFlowThread.
2462         The cause of this was that, when setting or removing the parent of a RenderObject, the inRenderFlowThread flags
2463         wasn't being set/reset for the children too.
2464         This is now fixed by calling the new setInRenderFlowThreadIncludingDescendants.
2465
2466         The ASSERT was hit for anonymous blocks when detaching the document.
2467
2468         Test: fast/regions/detaching-regions-with-anonymous-blocks.html
2469
2470         * rendering/RenderObject.cpp:
2471         (WebCore::RenderObject::setInRenderFlowThreadRecursive):
2472         (WebCore):
2473         * rendering/RenderObject.h:
2474         (WebCore::RenderObject::setParent):
2475         (RenderObject):
2476
2477 2013-02-06  Marja Hölttä  <marja@chromium.org>
2478
2479         Take referrer policy into account when clearing the referrer header
2480         https://bugs.webkit.org/show_bug.cgi?id=86000
2481
2482         Reviewed by Alexey Proskuryakov.
2483
2484         The referrer should only be cleared when doing a https -> http redirect,
2485         if the policy is "default". Otherwise the referrer should be left intact.
2486
2487         In order to do that, added a function for checking the policy in
2488         NetworkingContext, and stored the NetworkingContext in ResourceHandle
2489         (like some ports already did).
2490
2491         No new tests (unskipped old tests).
2492
2493         * loader/FrameNetworkingContext.h:
2494         (WebCore::FrameNetworkingContext::shouldClearReferrerOnHTTPSToHTTPRedirect):
2495         (FrameNetworkingContext):
2496         * platform/network/BlobResourceHandle.cpp:
2497         (WebCore::BlobResourceHandle::BlobResourceHandle):
2498         * platform/network/NetworkingContext.h:
2499         (NetworkingContext):
2500         * platform/network/ResourceHandle.cpp:
2501         (WebCore::ResourceHandle::ResourceHandle):
2502         (WebCore::ResourceHandle::create):
2503         (WebCore::ResourceHandle::context):
2504         (WebCore):
2505         * platform/network/ResourceHandle.h:
2506         (ResourceHandle):
2507         * platform/network/ResourceHandleInternal.h:
2508         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2509         (ResourceHandleInternal):
2510         * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
2511         (WebCore::ResourceHandle::start):
2512         (WebCore::ResourceHandle::loadResourceSynchronously):
2513         * platform/network/cf/ResourceHandleCFNet.cpp:
2514         (WebCore::willSendRequest):
2515         (WebCore::ResourceHandle::start):
2516         (WebCore::ResourceHandle::loadResourceSynchronously):
2517         * platform/network/chromium/ResourceHandle.cpp:
2518         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2519         (WebCore::ResourceHandle::ResourceHandle):
2520         (WebCore::ResourceHandle::create):
2521         (WebCore::ResourceHandle::context):
2522         (WebCore):
2523         (WebCore::ResourceHandle::start):
2524         * platform/network/chromium/ResourceHandleInternal.h:
2525         (WebCore):
2526         (ResourceHandleInternal):
2527         (WebCore::ResourceHandleInternal::context):
2528         * platform/network/curl/ResourceHandleCurl.cpp:
2529         (WebCore::ResourceHandle::start):
2530         (WebCore::ResourceHandle::loadResourceSynchronously):
2531         * platform/network/mac/ResourceHandleMac.mm:
2532         (WebCore::ResourceHandle::start):
2533         (WebCore::ResourceHandle::loadResourceSynchronously):
2534         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
2535         * platform/network/qt/QNetworkReplyHandler.cpp:
2536         (WebCore::QNetworkReplyHandler::redirect):
2537         * platform/network/qt/ResourceHandleQt.cpp:
2538         (WebCore::ResourceHandle::start):
2539         (WebCore::ResourceHandle::loadResourceSynchronously):
2540         * platform/network/soup/ResourceHandleSoup.cpp:
2541         (WebCore::doRedirect):
2542         (WebCore::ResourceHandle::start):
2543         * platform/network/win/ResourceHandleWin.cpp:
2544         (WebCore::ResourceHandle::start):
2545         (WebCore::ResourceHandle::loadResourceSynchronously):
2546
2547 2013-02-06  Pavel Feldman  <pfeldman@chromium.org>
2548
2549         Web Inspector: file selector list jumps as I type or move Up/Down
2550         https://bugs.webkit.org/show_bug.cgi?id=108933
2551
2552         Reviewed by Vsevolod Vlasov.
2553
2554         Missing return was scheduling extra updates.
2555
2556         * inspector/front-end/FilteredItemSelectionDialog.js:
2557         (WebInspector.FilteredItemSelectionDialog):
2558         (WebInspector.FilteredItemSelectionDialog.prototype._filterItems):
2559         (WebInspector.FilteredItemSelectionDialog.prototype._onKeyDown):
2560         (WebInspector.FilteredItemSelectionDialog.prototype._updateSelection):
2561
2562 2013-02-06  Kentaro Hara  <haraken@chromium.org>
2563
2564         [V8] Pass an Isolate to remaining GetTemplate()s
2565         https://bugs.webkit.org/show_bug.cgi?id=109001
2566
2567         Reviewed by Adam Barth.
2568
2569         No tests. No change in behavior.
2570
2571         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2572         (WebCore::V8DOMWindow::namedSecurityCheck): Because this method is a callback from V8,
2573         we cannot change its signature to receive an Isolate.
2574         (WebCore::V8DOMWindow::indexedSecurityCheck): Ditto.
2575
2576         * bindings/scripts/CodeGeneratorV8.pm:
2577         (GenerateHeader):
2578         (GenerateToV8Converters):
2579         * bindings/scripts/test/V8/V8Float64Array.cpp:
2580         (WebCore::V8Float64Array::createWrapper):
2581         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2582         (WebCore::V8TestActiveDOMObject::createWrapper):
2583         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2584         (WebCore::V8TestCustomNamedGetter::createWrapper):
2585         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2586         (WebCore::V8TestEventConstructor::createWrapper):
2587         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2588         (WebCore::V8TestEventTarget::createWrapper):
2589         * bindings/scripts/test/V8/V8TestException.cpp:
2590         (WebCore::V8TestException::createWrapper):
2591         * bindings/scripts/test/V8/V8TestInterface.cpp:
2592         (WebCore::V8TestInterface::createWrapper):
2593         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2594         (WebCore::V8TestMediaQueryListListener::createWrapper):
2595         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2596         (WebCore::V8TestNamedConstructor::createWrapper):
2597         * bindings/scripts/test/V8/V8TestNode.cpp:
2598         (WebCore::V8TestNode::createWrapper):
2599         * bindings/scripts/test/V8/V8TestObj.cpp:
2600         (WebCore::V8TestObj::createWrapper):
2601         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
2602         (WebCore::V8TestOverloadedConstructors::createWrapper):
2603         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2604         (WebCore::V8TestSerializedScriptValueInterface::createWrapper):
2605         * bindings/v8/V8DOMWrapper.cpp:
2606         (WebCore::V8DOMWrapper::createWrapper):
2607         * bindings/v8/V8DOMWrapper.h:
2608         (V8DOMWrapper):
2609         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2610         (WebCore::V8HTMLDocument::wrapInShadowObject):
2611
2612 2013-02-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2613
2614         Unreviewed, rolling out r141961.
2615         http://trac.webkit.org/changeset/141961
2616         https://bugs.webkit.org/show_bug.cgi?id=109019
2617
2618         assertion failures on svn tests such as fonts-glyph-04-t.svg
2619         (Requested by falken on #webkit).
2620
2621         * platform/graphics/GlyphPage.h:
2622         (WebCore::GlyphPage::create):
2623         (WebCore::GlyphPage::glyphDataForCharacter):
2624         (WebCore::GlyphPage::glyphDataForIndex):
2625         (WebCore::GlyphPage::fontDataForCharacter):
2626         (WebCore::GlyphPage::setGlyphDataForIndex):
2627         (GlyphPage):
2628         (WebCore::GlyphPage::copyFrom):
2629         (WebCore::GlyphPage::clear):
2630         (WebCore::GlyphPage::clearForFontData):
2631         (WebCore::GlyphPage::GlyphPage):
2632         * platform/graphics/GlyphPageTreeNode.cpp:
2633         (WebCore::GlyphPageTreeNode::initializePage):
2634
2635 2013-02-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2636
2637         Unreviewed, rolling out r141964.
2638         http://trac.webkit.org/changeset/141964
2639         https://bugs.webkit.org/show_bug.cgi?id=109014
2640
2641         caused performance regression (Requested by hayato on
2642         #webkit).
2643
2644         * CMakeLists.txt:
2645         * GNUmakefile.list.am:
2646         * Target.pri:
2647         * WebCore.gypi:
2648         * WebCore.xcodeproj/project.pbxproj:
2649         * css/CSSAllInOne.cpp:
2650         * css/DocumentRuleSets.cpp: Removed.
2651         * css/DocumentRuleSets.h: Removed.
2652         * css/StyleResolver.cpp:
2653         (WebCore::StyleResolver::StyleResolver):
2654         (WebCore::StyleResolver::collectRulesFromUserStyleSheets):
2655         (WebCore):
2656         (WebCore::makeRuleSet):
2657         (WebCore::StyleResolver::resetAuthorStyle):
2658         (WebCore::StyleResolver::appendAuthorStyleSheets):
2659         (WebCore::StyleResolver::matchAuthorRules):
2660         (WebCore::StyleResolver::matchUserRules):
2661         (WebCore::StyleResolver::classNamesAffectedByRules):
2662         (WebCore::StyleResolver::locateCousinList):
2663         (WebCore::StyleResolver::canShareStyleWithElement):
2664         (WebCore::StyleResolver::locateSharedStyle):
2665         (WebCore::StyleResolver::styleForElement):
2666         (WebCore::StyleResolver::styleForPage):
2667         (WebCore::StyleResolver::checkRegionStyle):
2668         (WebCore::StyleResolver::applyProperty):
2669         (WebCore::StyleResolver::collectFeatures):
2670         (WebCore::StyleResolver::reportMemoryUsage):
2671         * css/StyleResolver.h:
2672         (StyleResolver):
2673         (WebCore::StyleResolver::usesSiblingRules):
2674         (WebCore::StyleResolver::usesFirstLineRules):
2675         (WebCore::StyleResolver::usesBeforeAfterRules):
2676         (WebCore::StyleResolver::hasSelectorForAttribute):
2677         (WebCore::StyleResolver::hasSelectorForClass):
2678         (WebCore::StyleResolver::hasSelectorForId):
2679         * dom/DocumentStyleSheetCollection.cpp:
2680         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
2681
2682 2013-02-05  Kentaro Hara  <haraken@chromium.org>
2683
2684         Add #if USE(V8) to Node::V8CollectableDuringMinorGCFlag
2685         https://bugs.webkit.org/show_bug.cgi?id=109009
2686
2687         Reviewed by Kent Tamura.
2688
2689         Node flags should be saved. V8CollectableDuringMinorGCFlag is used by V8 only.
2690
2691         * dom/Node.h:
2692         (Node):
2693
2694 2013-02-05  Vsevolod Vlasov  <vsevik@chromium.org>
2695
2696         Web Inspector: Add ending slashes automatically to file mappings.
2697         https://bugs.webkit.org/show_bug.cgi?id=108936
2698
2699         Reviewed by Pavel Feldman.
2700
2701         * inspector/front-end/SettingsScreen.js:
2702         (WebInspector.WorkspaceSettingsTab.prototype._addFileMappingClicked):
2703
2704 2013-02-05  Eric Carlson  <eric.carlson@apple.com>
2705
2706         More updates to Caption user preferences
2707         https://bugs.webkit.org/show_bug.cgi?id=108997
2708
2709         Reviewed by Dean Jackson.
2710
2711         * html/HTMLMediaElement.cpp:
2712         (WebCore::HTMLMediaElement::captionPreferencesChanged): Give the media controls a chance
2713             to update for a preferences change.
2714         * html/shadow/MediaControlElements.cpp:
2715         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Add optional "force update" 
2716             param to force font size recalc even when the video size hasn't changed.
2717         * html/shadow/MediaControlElements.h:
2718
2719         * html/shadow/MediaControls.cpp:
2720         (WebCore::MediaControls::textTrackPreferencesChanged): New, force a font size recalc.
2721         * html/shadow/MediaControls.h:
2722
2723         * html/track/TextTrackCueGeneric.cpp:
2724         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Don't set width/size of cues
2725             that use default positioning. Use "start" as the default alignment.
2726
2727         * page/CaptionUserPreferencesMac.mm:
2728         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Set padding when the window is visible
2729             so it shows around the cue background.
2730         (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Set padding to 0 when the background
2731             is visible.
2732         (WebCore::CaptionUserPreferencesMac::windowRoundedCornerRadiusCSS): Add "px" to the border radius
2733             so it actually works.
2734         * rendering/RenderTextTrackCue.cpp:
2735         (WebCore::RenderTextTrackCue::layout): Special case generic cues with default style.
2736         (WebCore::RenderTextTrackCue::repositionGenericCue):
2737         * rendering/RenderTextTrackCue.h:
2738
2739 2013-02-05  Hayato Ito  <hayato@chromium.org>
2740
2741         Split each RuleSet and feature out from StyleResolver into its own class.
2742         https://bugs.webkit.org/show_bug.cgi?id=107777
2743
2744         Reviewed by Dimitri Glazkov.
2745
2746         Splitting each RuleSet and feature out from StyleResover into its onw class, DocumentRuleSets,
2747         to manage them separately.
2748
2749         This is one of the attempts to try to resolve meta bug (bug 89879)
2750         to lose StyleResolver's weight.  We need further action to factor
2751         StyleResolver to separate it into some classes cleanly.
2752         See also https://bugs.webkit.org/show_bug.cgi?id=108890. A following patch will address that.
2753
2754         No tests. No change in behavior.
2755
2756         * CMakeLists.txt:
2757         * GNUmakefile.list.am:
2758         * Target.pri:
2759         * WebCore.gypi:
2760         * WebCore.xcodeproj/project.pbxproj:
2761         * css/CSSAllInOne.cpp:
2762         * css/DocumentRuleSets.cpp: Added.
2763         (WebCore):
2764         (WebCore::DocumentRuleSets::DocumentRuleSets):
2765         (WebCore::DocumentRuleSets::~DocumentRuleSets):
2766         (WebCore::DocumentRuleSets::initUserStyle): New helper to initialize each RuleSets.
2767         (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets): Factored out from StyleResolver.
2768         (WebCore::makeRuleSet): Ditto.
2769         (WebCore::DocumentRuleSets::resetAuthorStyle): Ditto.
2770         (WebCore::DocumentRuleSets::appendAuthorStyleSheets): Ditto.
2771         (WebCore::DocumentRuleSets::collectFeatures): Ditto.
2772         (WebCore::DocumentRuleSets::reportMemoryUsage): New methods to report memory usage. Factored out from StyleResolver.
2773         * css/DocumentRuleSets.h: Added.
2774         (WebCore):
2775         (DocumentRuleSets):
2776         (WebCore::DocumentRuleSets::authorStyle): Moved from StyleResolver.
2777         (WebCore::DocumentRuleSets::userStyle): Ditto.
2778         (WebCore::DocumentRuleSets::features): Ditto.
2779         (WebCore::DocumentRuleSets::sibling): Ditto.
2780         (WebCore::DocumentRuleSets::uncommonAttribute): Ditto.
2781         * css/StyleResolver.cpp:
2782         (WebCore::StyleResolver::StyleResolver):
2783         (WebCore::StyleResolver::appendAuthorStyleSheets): Now calls DocumentRuleSets::appendAuthorStyleSheets.
2784         (WebCore::StyleResolver::matchAuthorRules): Use m_ruleSets.
2785         (WebCore::StyleResolver::matchUserRules): Ditto.
2786         (WebCore::StyleResolver::classNamesAffectedByRules): Ditto.
2787         (WebCore::StyleResolver::locateCousinList): Ditto.
2788         (WebCore::StyleResolver::canShareStyleWithElement): Ditto.
2789         (WebCore::StyleResolver::locateSharedStyle): Ditto.
2790         (WebCore::StyleResolver::styleForPage): Ditto.
2791         (WebCore::StyleResolver::checkRegionStyle): Ditto.
2792         (WebCore::StyleResolver::applyProperty): Ditto.
2793         (WebCore::StyleResolver::reportMemoryUsage): Now calls DocumentRuleSets::reportMemoryUsage.
2794         * css/StyleResolver.h:
2795         (WebCore::StyleResolver::scopeResolver):
2796         (StyleResolver):
2797         (WebCore::StyleResolver::ruleSets): accessor r to DocumentRuleSets.
2798         (WebCore::StyleResolver::usesSiblingRules): Use m_ruleSets.
2799         (WebCore::StyleResolver::usesFirstLineRules): Ditto.
2800         (WebCore::StyleResolver::usesBeforeAfterRules): Ditto.
2801         (WebCore::StyleResolver::hasSelectorForAttribute): Ditto.
2802         (WebCore::StyleResolver::hasSelectorForClass): Ditto.
2803         (WebCore::StyleResolver::hasSelectorForId): Ditto.
2804         * dom/DocumentStyleSheetCollection.cpp:
2805         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
2806
2807 2013-02-05  Julien Chaffraix  <jchaffraix@webkit.org>
2808
2809         [CSS Grid Layout] Grid item's logical height is not properly recomputed after -webkit-grid-column / -webkit-grid-row changes
2810         https://bugs.webkit.org/show_bug.cgi?id=108975
2811
2812         Reviewed by Tony Chang.
2813
2814         Test: fast/css-grid-layout/implicit-position-dynamic-change.html
2815
2816         * rendering/RenderBox.cpp:
2817         (WebCore::RenderBox::clearContainingBlockOverrideSize):
2818         (WebCore::RenderBox::clearOverrideContainingBlockContentLogicalHeight):
2819         * rendering/RenderBox.h:
2820         Added clearOverrideContainingBlockContentLogicalHeight and updated clearContainingBlockOverrideSize
2821         to use it.
2822
2823         * rendering/RenderGrid.cpp:
2824         (WebCore::RenderGrid::minContentForChild):
2825         (WebCore::RenderGrid::maxContentForChild):
2826         Added missing clearContainingBlockOverrideSize to ensure we don't use a previous layout's override.
2827
2828 2013-02-05  Andreas Kling  <akling@apple.com>
2829
2830         Optimize GlyphPage for case where all glyphs are available in the same font.
2831         <http://webkit.org/b/108835>
2832         <rdar://problem/13157042>
2833
2834         Reviewed by Antti Koivisto.
2835
2836         Let GlyphPage begin optimistically assuming that all its glyphs will be represented in
2837         the same SimpleFontData*. In this (very common) case, only keep a single SimpleFontData*.
2838
2839         If glyphs from multiple fonts are mixed in one page, an array of per-glyph SimpleFontData*
2840         is allocated transparently.
2841
2842         4.98 MB progression on Membuster3.
2843
2844         * platform/graphics/GlyphPageTreeNode.cpp:
2845         (WebCore::GlyphPageTreeNode::initializePage):
2846         * platform/graphics/GlyphPage.h:
2847         (WebCore::GlyphPage::createUninitialized):
2848         (WebCore::GlyphPage::createZeroedSystemFallbackPage):
2849         (WebCore::GlyphPage::createCopiedSystemFallbackPage):
2850
2851             There are now three ways of constructing a GlyphPage, two of them are only used for
2852             creating system fallback pages.
2853
2854         (WebCore::GlyphPage::setGlyphDataForIndex):
2855
2856             Hold off creating a SimpleFontData* array until we're sure there are two different
2857             SimpleFontData* backing the glyphs in this page.
2858             We don't store font data for glyph #0, instead we let the getters always return null for it.
2859
2860         (WebCore::GlyphPage::~GlyphPage):
2861
2862             Free the SimpleFontData* array if needed.
2863
2864         (WebCore::GlyphPage::glyphDataForCharacter):
2865         (WebCore::GlyphPage::glyphDataForIndex):
2866         (WebCore::GlyphPage::fontDataForCharacter):
2867
2868             The font data for glyph #0 is always a null pointer now.
2869
2870         (WebCore::GlyphPage::clearForFontData):
2871
2872             Updated for new storage format.
2873
2874 2013-02-05  Kent Tamura  <tkent@chromium.org>
2875
2876         INPUT_MULTIPLE_FIELDS_UI: Read-only inputs should be focusable
2877         https://bugs.webkit.org/show_bug.cgi?id=108795
2878
2879         Reviewed by Kentaro Hara.
2880
2881         According to the standard [1], readonly form controls should be focusable.
2882
2883         - Sub-fields should be focusable if they are read-only. We should check
2884           isDisabled mainly.
2885         - All keyboard operations should not be handled if a field is disabled,
2886           and focus navigation keyboard operations should be handled even if a
2887           field is read-only.
2888
2889         [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-readonly-attribute
2890
2891         No new tests. Update
2892         fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html
2893         for the new behavior.
2894
2895         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2896         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isKeyboardFocusable):
2897         Make <input> focusable even if it is read-only.
2898         * html/shadow/DateTimeEditElement.cpp:
2899         (WebCore::DateTimeEditElement::isFieldOwnerDisabled):
2900         Separate isFieldOwnerDisabledOrReadOnly into two.
2901         (WebCore::DateTimeEditElement::isFieldOwnerReadOnly): Ditto.
2902         (WebCore::DateTimeEditElement::updateUIState):
2903         We don't need to focus out if this is read-only.
2904         * html/shadow/DateTimeEditElement.h:
2905         (DateTimeEditElement): Separate isFieldOwnerDisabledOrReadOnly into two.
2906         * html/shadow/DateTimeFieldElement.cpp:
2907         (WebCore::DateTimeFieldElement::defaultEventHandler):
2908         Skip handleKeyboardEvent if the field is disabled or the owner input is
2909         disabled or read-only. handleKeyboardEvent handles editing key
2910         operations.
2911         (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler):
2912         If this field is disabled or the owner input is disabled, all keyboard
2913         inputs are ignored.
2914         If this field is read-only, we handle only left and right arrows to
2915         change focus, and skip down/up/backspace/del keys.
2916         (WebCore::DateTimeFieldElement::isFieldOwnerDisabled):
2917         A helper function to check disable state of the owner input.
2918         (WebCore::DateTimeFieldElement::isFieldOwnerReadOnly):
2919         A helper function to check read-only state of the owner input.
2920         (WebCore::DateTimeFieldElement::isFocusable):
2921         This field should be focusable if it is read-only and not disabled.
2922         * html/shadow/DateTimeFieldElement.h:
2923         (FieldOwner): Separate isFieldOwnerDisabledOrReadOnly into two.
2924         (DateTimeFieldElement):
2925         Declare isFieldOwnerDisabled and isFieldOwnerReadOnly.
2926         * html/shadow/DateTimeNumericFieldElement.cpp:
2927         (WebCore::DateTimeNumericFieldElement::handleKeyboardEvent):
2928         Remove redundant isDisabled check. It is done in
2929         DateTimeFieldElement::defaultEventHandler.
2930
2931 2013-02-05  Eric Carlson  <eric.carlson@apple.com>
2932
2933         [Mac] Complete plumbing so captions menu can indicate track type
2934         https://bugs.webkit.org/show_bug.cgi?id=108994
2935
2936         Reviewed by Dean Jackson.
2937
2938         Plumb "isClosedCaptions" through to the Mac media engine.
2939
2940         Updated media/video-controls-captions-trackmenu-localized.html and results.
2941
2942         * html/track/InbandTextTrack.cpp:
2943         (WebCore::InbandTextTrack::isClosedCaptions): New, pass the call through to the private track.
2944         * html/track/InbandTextTrack.h:
2945         (InbandTextTrack):
2946         * html/track/TextTrack.cpp:
2947         (WebCore::TextTrack::TextTrack): Lose the member variable, this won't be accessed often enough
2948             to make it worth caching the value.
2949         * html/track/TextTrack.h:
2950         (WebCore::TextTrack::isClosedCaptions): Make virtual so derived classes can oveerride.
2951         * platform/graphics/InbandTextTrackPrivate.h:
2952         (WebCore::InbandTextTrackPrivate::isClosedCaptions): New.
2953         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
2954         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2955         (WebCore::InbandTextTrackPrivateAVFObjC::isClosedCaptions): New.
2956
2957 2013-02-05  Mark Lam  <mark.lam@apple.com>
2958
2959         Change DatabaseTask and DatabaseThread to work with DatabaseBackendAsync
2960         instead of Database.
2961         https://bugs.webkit.org/show_bug.cgi?id=108995.
2962
2963         Reviewed by Sam Weinig.
2964
2965         This change also moves the task inner classes from Database to
2966         DatabaseBackendAsync.
2967
2968         No new tests.
2969
2970         * Modules/webdatabase/Database.cpp:
2971         (WebCore::Database::from):
2972         * Modules/webdatabase/Database.h:
2973         (Database):
2974         * Modules/webdatabase/DatabaseBackend.h:
2975         (DatabaseBackend):
2976         * Modules/webdatabase/DatabaseBackendAsync.h:
2977         (DatabaseBackendAsync):
2978         * Modules/webdatabase/DatabaseTask.cpp:
2979         (WebCore::DatabaseTask::DatabaseTask):
2980         (WebCore::DatabaseBackendAsync::DatabaseOpenTask::DatabaseOpenTask):
2981         (WebCore::DatabaseBackendAsync::DatabaseOpenTask::doPerformTask):
2982         (WebCore::DatabaseBackendAsync::DatabaseOpenTask::debugTaskName):
2983         (WebCore::DatabaseBackendAsync::DatabaseCloseTask::DatabaseCloseTask):
2984         (WebCore::DatabaseBackendAsync::DatabaseCloseTask::doPerformTask):
2985         (WebCore::DatabaseBackendAsync::DatabaseCloseTask::debugTaskName):
2986         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::DatabaseTransactionTask):
2987         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::doPerformTask):
2988         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::debugTaskName):
2989         (WebCore::DatabaseBackendAsync::DatabaseTableNamesTask::DatabaseTableNamesTask):
2990         (WebCore::DatabaseBackendAsync::DatabaseTableNamesTask::doPerformTask):
2991         (WebCore::DatabaseBackendAsync::DatabaseTableNamesTask::debugTaskName):
2992         * Modules/webdatabase/DatabaseTask.h:
2993         (WebCore::DatabaseTask::database):
2994         (DatabaseTask):
2995         (WebCore::DatabaseBackendAsync::DatabaseOpenTask::create):
2996         (DatabaseBackendAsync::DatabaseOpenTask):
2997         (WebCore::DatabaseBackendAsync::DatabaseCloseTask::create):
2998         (DatabaseBackendAsync::DatabaseCloseTask):
2999         (WebCore::DatabaseBackendAsync::DatabaseTableNamesTask::create):
3000         (DatabaseBackendAsync::DatabaseTableNamesTask):
3001         * Modules/webdatabase/DatabaseThread.cpp:
3002         (WebCore::DatabaseThread::databaseThread):
3003         (WebCore::DatabaseThread::recordDatabaseOpen):
3004         (WebCore::DatabaseThread::recordDatabaseClosed):
3005         (WebCore::SameDatabasePredicate::SameDatabasePredicate):
3006         (SameDatabasePredicate):
3007         (WebCore::DatabaseThread::unscheduleDatabaseTasks):
3008         * Modules/webdatabase/DatabaseThread.h:
3009         (DatabaseThread):
3010
3011 2013-02-05  Mark Lam  <mark.lam@apple.com>
3012
3013         Rename ENUM_CLASS_BEGIN() macro to ENUM_CLASS(), and make DatabaseType a strong enum.
3014         https://bugs.webkit.org/show_bug.cgi?id=108988.
3015
3016         Reviewed by Alexey Proskuryakov.
3017
3018         No new tests.
3019
3020         * Modules/webdatabase/DatabaseBackend.cpp:
3021         (WebCore::DatabaseBackend::DatabaseBackend):
3022         * Modules/webdatabase/DatabaseBackend.h:
3023         (DatabaseBackend):
3024         * Modules/webdatabase/DatabaseBackendAsync.cpp:
3025         (WebCore::DatabaseBackendAsync::DatabaseBackendAsync):
3026         * Modules/webdatabase/DatabaseBackendSync.cpp:
3027         (WebCore::DatabaseBackendSync::DatabaseBackendSync):
3028         * Modules/webdatabase/DatabaseBasicTypes.h:
3029         (WebCore::ENUM_CLASS):
3030         * Modules/webdatabase/DatabaseError.h:
3031         (WebCore::ENUM_CLASS):
3032
3033 2013-02-05  Kentaro Hara  <haraken@chromium.org>
3034
3035         [V8] Remove deprecatedV8String() and deprecatedV8Integer()
3036         https://bugs.webkit.org/show_bug.cgi?id=108919
3037
3038         Reviewed by Adam Barth.
3039
3040         No tests. No change in behavior.
3041
3042         * bindings/v8/V8Binding.cpp:
3043         (WebCore::toXPathNSResolver):
3044         * bindings/v8/V8Binding.h:
3045         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
3046         (WebCore::V8CustomXPathNSResolver::create):
3047         (WebCore::V8CustomXPathNSResolver::V8CustomXPathNSResolver):
3048         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
3049         * bindings/v8/custom/V8CustomXPathNSResolver.h:
3050         (V8CustomXPathNSResolver):
3051
3052 2013-02-05   Vineet Chaudhary  <rgf748@motorola.com>
3053
3054         formenctype to have empty string as default value.
3055         https://bugs.webkit.org/show_bug.cgi?id=108969
3056
3057         Reviewed by Kent Tamura.
3058
3059         The spec says formEnctype should only have an invalid value default, not a missing value default.
3060         Spec: http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-formenctype
3061               http://www.whatwg.org/specs/web-apps/current-work/#attr-fs-formenctype
3062
3063         No new tests. Covered by existing test case fast/forms/submit-form-attributes.html
3064
3065         * html/HTMLFormControlElement.cpp: For the missing formEnctype attr return empty string.
3066         (WebCore::HTMLFormControlElement::formEnctype):
3067
3068 2013-02-04  Kentaro Hara  <haraken@chromium.org>
3069
3070         [V8] Reduce usage of deprecatedString() and deprecatedInteger()
3071         https://bugs.webkit.org/show_bug.cgi?id=108909
3072
3073         Reviewed by Adam Barth.
3074
3075         By passing an Isolate parameter around, we can reduce usage of
3076         deprecated methods.
3077
3078         No tests. No change in behavior.
3079
3080         * bindings/scripts/CodeGeneratorV8.pm:
3081         (GenerateNormalAttrSetter):
3082         (GenerateEventListenerCallback):
3083         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3084         (WebCore::TestEventTargetV8Internal::addEventListenerCallback):
3085         (WebCore::TestEventTargetV8Internal::removeEventListenerCallback):
3086         * bindings/scripts/test/V8/V8TestObj.cpp:
3087         (WebCore::TestObjV8Internal::addEventListenerCallback):
3088         (WebCore::TestObjV8Internal::removeEventListenerCallback):
3089         * bindings/v8/IDBBindingUtilities.cpp:
3090         (WebCore::get):
3091         (WebCore::set):
3092         (WebCore::getNthValueOnKeyPath):
3093         (WebCore::canInjectNthValueOnKeyPath):
3094         (WebCore::ensureNthValueOnKeyPath):
3095         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
3096         (WebCore::injectIDBKeyIntoScriptValue):
3097         (WebCore::canInjectIDBKeyIntoScriptValue):
3098         * bindings/v8/NPV8Object.cpp:
3099         (WebCore::createValueListFromVariantArgs):
3100         (_NPN_Invoke):
3101         (_NPN_InvokeDefault):
3102         (_NPN_SetProperty):
3103         (_NPN_Construct):
3104         * bindings/v8/ScriptController.cpp:
3105         (WebCore::ScriptController::compileAndRunScript):
3106         * bindings/v8/ScriptProfiler.cpp:
3107         (WebCore):
3108         (WebCore::ScriptProfiler::takeHeapSnapshot):
3109         * bindings/v8/ScriptSourceCode.cpp:
3110         (WebCore::ScriptSourceCode::compileScript):
3111         * bindings/v8/ScriptSourceCode.h:
3112         (ScriptSourceCode):
3113         * bindings/v8/V8LazyEventListener.cpp:
3114         (WebCore::V8LazyEventListener::prepareListenerObject):
3115         * bindings/v8/V8NPObject.cpp:
3116         (WebCore::npObjectInvokeImpl):
3117         (WebCore::npObjectGetProperty):
3118         * bindings/v8/V8NPUtils.cpp:
3119         (WebCore::convertNPVariantToV8Object):
3120         * bindings/v8/V8NPUtils.h:
3121         (WebCore):
3122         * bindings/v8/V8Utilities.cpp:
3123         (WebCore::createHiddenDependency):
3124         (WebCore::removeHiddenDependency):
3125         (WebCore::transferHiddenDependency):
3126         * bindings/v8/V8Utilities.h:
3127         (WebCore):
3128         * bindings/v8/WorkerScriptController.cpp:
3129         (WebCore::WorkerScriptController::evaluate):
3130         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3131         (WebCore::V8DOMWindow::addEventListenerCallback):
3132         (WebCore::V8DOMWindow::removeEventListenerCallback):
3133
3134 2013-02-05  Kentaro Hara  <haraken@chromium.org>
3135
3136         [V8] Make an Isolate parameter mandatory in HasInstance()
3137         https://bugs.webkit.org/show_bug.cgi?id=108917
3138
3139         Reviewed by Adam Barth.
3140
3141         No tests. No change in behavior.
3142
3143         * bindings/scripts/CodeGeneratorV8.pm:
3144         (GenerateHeader):
3145         (GenerateImplementation):
3146         * bindings/scripts/test/V8/V8Float64Array.cpp:
3147         (WebCore::V8Float64Array::HasInstance):
3148         * bindings/scripts/test/V8/V8Float64Array.h:
3149         (V8Float64Array):
3150         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3151         (WebCore::V8TestActiveDOMObject::HasInstance):
3152         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
3153         (V8TestActiveDOMObject):
3154         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3155         (WebCore::V8TestCustomNamedGetter::HasInstance):
3156         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
3157         (V8TestCustomNamedGetter):
3158         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3159         (WebCore::V8TestEventConstructor::HasInstance):
3160         * bindings/scripts/test/V8/V8TestEventConstructor.h:
3161         (V8TestEventConstructor):
3162         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3163         (WebCore::V8TestEventTarget::HasInstance):
3164         * bindings/scripts/test/V8/V8TestEventTarget.h:
3165         (V8TestEventTarget):
3166         * bindings/scripts/test/V8/V8TestException.cpp:
3167         (WebCore::V8TestException::HasInstance):
3168         * bindings/scripts/test/V8/V8TestException.h:
3169         (V8TestException):
3170         * bindings/scripts/test/V8/V8TestInterface.cpp:
3171         (WebCore::V8TestInterface::HasInstance):
3172         * bindings/scripts/test/V8/V8TestInterface.h:
3173         (V8TestInterface):
3174         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3175         (WebCore::V8TestMediaQueryListListener::HasInstance):
3176         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
3177         (V8TestMediaQueryListListener):
3178         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3179         (WebCore::V8TestNamedConstructor::HasInstance):
3180         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
3181         (V8TestNamedConstructor):
3182         * bindings/scripts/test/V8/V8TestNode.cpp:
3183         (WebCore::V8TestNode::HasInstance):
3184         * bindings/scripts/test/V8/V8TestNode.h:
3185         (V8TestNode):
3186         * bindings/scripts/test/V8/V8TestObj.cpp:
3187         (WebCore::V8TestObj::HasInstance):
3188         * bindings/scripts/test/V8/V8TestObj.h:
3189         (V8TestObj):
3190         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
3191         (WebCore::V8TestOverloadedConstructors::HasInstance):
3192         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
3193         (V8TestOverloadedConstructors):
3194         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3195         (WebCore::V8TestSerializedScriptValueInterface::HasInstance):
3196         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
3197         (V8TestSerializedScriptValueInterface):
3198         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3199         (WebCore::toWebGLUniformLocation):
3200
3201 2013-02-05  Kentaro Hara  <haraken@chromium.org>
3202
3203         [JSC] Clean up CodeGeneratorJS.pm by introducing HasCustom{Getter,Setter,Method}
3204         https://bugs.webkit.org/show_bug.cgi?id=108898
3205
3206         Reviewed by Sam Weinig.
3207
3208         No tests. No change in behavior.
3209
3210         * bindings/scripts/CodeGeneratorJS.pm:
3211         (GenerateHeader):
3212         (GenerateImplementation):
3213         (HasCustomGetter):
3214         (HasCustomSetter):
3215         (HasCustomMethod):
3216
3217 2013-02-05  Dana Jansens  <danakj@chromium.org>
3218
3219         [chromium] Provide compositor offscreen context through the WebLayerTreeViewClient interface
3220         https://bugs.webkit.org/show_bug.cgi?id=107776
3221
3222         Reviewed by James Robinson.
3223
3224         Allow the compositor thread's context to be retrieved on either thread,
3225         so the main thread can create and pass the context to the impl thread
3226         via its own mechanisms.
3227
3228         Move the code to bind the GrGLInterface to a WebGraphicsContext3D into
3229         chromium's GraphicsContext3DPrivate. The chromium-side code will need
3230         to implement this code itself.
3231
3232         * platform/chromium/support/GraphicsContext3DPrivate.cpp:
3233         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
3234         (WebCore):
3235         (WebCore::GraphicsContext3DPrivate::grContext):
3236         * platform/chromium/support/GraphicsContext3DPrivate.h:
3237         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
3238         (WebCore::SharedGraphicsContext3D::getForImplThread):
3239
3240 2013-02-05  Tony Gentilcore  <tonyg@chromium.org>
3241
3242         Continue making XSSAuditor thread safe: Remove dependency on the parser's tokenizer
3243         https://bugs.webkit.org/show_bug.cgi?id=108666
3244
3245         Reviewed by Adam Barth.
3246
3247         This is the final dependency on the parser, so we remove that as well. Yay!
3248
3249         No new tests because no new functionality.
3250
3251         * html/parser/HTMLDocumentParser.cpp:
3252         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3253         (WebCore::HTMLDocumentParser::pumpTokenizer): Pass m_tokenizer->shouldAllowCDATA()
3254         * html/parser/XSSAuditor.cpp:
3255         (WebCore::XSSAuditor::XSSAuditor): Remove isMainThread() check because we have one in init() anyway.
3256         Move m_isEnabled and m_documentURL initialization to init() because we have a Document* there.
3257         (WebCore::XSSAuditor::init):
3258         (WebCore::XSSAuditor::filterToken):
3259         (WebCore::XSSAuditor::filterStartToken):
3260         (WebCore::XSSAuditor::filterEndToken):
3261         (WebCore::XSSAuditor::filterScriptToken):
3262         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
3263         * html/parser/XSSAuditor.h:
3264         (WebCore::FilterTokenRequest::FilterTokenRequest):
3265         (FilterTokenRequest):
3266         (XSSAuditor):
3267
3268 2013-02-05  Enrica Casucci  <enrica@apple.com>
3269
3270         Make baseWritingDirectionForSelectionStart available to all platforms in the Editor class.
3271         https://bugs.webkit.org/show_bug.cgi?id=108977.
3272
3273         Reviewed by Ryosuke Niwa.
3274         
3275         Now that baseWritingDirectionForSelectionStart doesn't use
3276         platform specific type anymore, we can make it available for
3277         all platforms. This way it can be used for iOS as well.
3278
3279         No new tests, no functionality change.
3280
3281         * editing/Editor.cpp:
3282         (WebCore::Editor::baseWritingDirectionForSelectionStart): Added.
3283         * editing/Editor.h: Moved from PLATFORM(MAC).
3284         * editing/mac/EditorMac.mm: baseWritingDirectionForSelectionStart removed.
3285
3286 2013-02-05  Benjamin Poulain  <bpoulain@apple.com>
3287
3288         Avoid String->AtomicString conversion in Attr::childrenChanged()
3289         https://bugs.webkit.org/show_bug.cgi?id=108742
3290
3291         Reviewed by Andreas Kling.
3292
3293         * dom/Attr.cpp:
3294         (WebCore::Attr::childrenChanged): StringBuilder can output AtomicString directly.
3295
3296 2013-02-05  Yusuf Ozuysal  <yusufo@google.com>
3297
3298         [chromium] Enable shouldGesturesTriggerActive for Android
3299         https://bugs.webkit.org/show_bug.cgi?id=96948
3300
3301         Reviewed by James Robinson.
3302
3303         We need this to fix performance issues we are getting because of touchstart 
3304         triggering hover/active states.
3305
3306         No new tests. The tests introduced in https://bugs.webkit.org/show_bug.cgi?id=96060
3307         should run with the corrected behavior and would cover this change as well.
3308
3309         * page/EventHandler.cpp:
3310         (WebCore::shouldGesturesTriggerActive):
3311
3312 2013-02-05  Mark Lam  <mark.lam@apple.com>
3313
3314         Introduced back-end database classes + a few small fixes.
3315         https://bugs.webkit.org/show_bug.cgi?id=108759.
3316
3317         Reviewed by Brady Eidson.
3318
3319         1. Added DatabaseBackendContext, DatabaseBackendAsync, and DatabaseBackendSync.
3320            These are backends for DatabaseContext, Database, and DatabaseSync
3321            respectively.
3322         2. Added DatabaseBase to hold common code between Database and DatabaseSync.
3323         3. Renamed a few functions.
3324         4. Cleaned up unneeded code in ~DatabaseSync().
3325         5. Added some FIXMEs as reminders or places to clean up when we're done
3326            refactoring.
3327         6. Moved the calling of ScriptController::initializeThreading() from the Database
3328            constructor to DatabaseManager::openDatabase(). This just moves the call
3329            earlier in the same code path. System initialization work (i.e. initializing
3330            script threading in this case) should be done by the manager instead of by
3331            each Database instance.
3332
3333         No new tests.
3334
3335         * CMakeLists.txt:
3336         * GNUmakefile.list.am:
3337         * Modules/webdatabase/AbstractDatabaseServer.h:
3338         (AbstractDatabaseServer):
3339         * Modules/webdatabase/Database.cpp:
3340         (WebCore::Database::Database):
3341         (WebCore::Database::backend):
3342         * Modules/webdatabase/Database.h:
3343         (Database):
3344         * Modules/webdatabase/DatabaseBackend.cpp:
3345         (WebCore::DatabaseBackend::DatabaseBackend):
3346         (WebCore::DatabaseBackend::~DatabaseBackend):
3347         (WebCore::DatabaseBackend::incrementalVacuumIfNeeded):
3348         * Modules/webdatabase/DatabaseBackend.h:
3349         (DatabaseBackend):
3350         (WebCore::DatabaseBackend::databaseContext):
3351         (WebCore::DatabaseBackend::setFrontend):
3352         * Modules/webdatabase/DatabaseBackendAsync.cpp: Added.
3353         (WebCore::DatabaseBackendAsync::DatabaseBackendAsync):
3354         * Modules/webdatabase/DatabaseBackendAsync.h: Added.
3355         (DatabaseBackendAsync):
3356         * Modules/webdatabase/DatabaseBackendContext.cpp: Added.
3357         (WebCore::DatabaseBackendContext::securityOrigin):
3358         (WebCore::DatabaseBackendContext::isContextThread):
3359         * Modules/webdatabase/DatabaseBackendContext.h: Added.
3360         (DatabaseBackendContext):
3361         (WebCore::DatabaseBackendContext::scriptExecutionContext):
3362         * Modules/webdatabase/DatabaseBackendSync.cpp: Added.
3363         (WebCore::DatabaseBackendSync::DatabaseBackendSync):
3364         (WebCore::DatabaseBackendSync::~DatabaseBackendSync):
3365         * Modules/webdatabase/DatabaseBackendSync.h: Added.
3366         (DatabaseBackendSync):
3367         * Modules/webdatabase/DatabaseBase.cpp: Added.
3368         (WebCore::DatabaseBase::DatabaseBase):
3369         (WebCore::DatabaseBase::scriptExecutionContext):
3370         (WebCore::DatabaseBase::logErrorMessage):
3371         * Modules/webdatabase/DatabaseBase.h: Added.
3372         (DatabaseBase):
3373         * Modules/webdatabase/DatabaseContext.cpp:
3374         (WebCore::DatabaseContext::DatabaseContext):
3375         (WebCore::DatabaseContext::backend):
3376         * Modules/webdatabase/DatabaseContext.h:
3377         (DatabaseContext):
3378         * Modules/webdatabase/DatabaseManager.cpp:
3379         (WebCore::DatabaseManager::openDatabase):
3380         (WebCore::DatabaseManager::openDatabaseSync):
3381         (WebCore::DatabaseManager::hasOpenDatabases):
3382         (WebCore::DatabaseManager::interruptAllDatabasesForContext):
3383         (WebCore::DatabaseManager::getMaxSizeForDatabase):
3384         (WebCore::DatabaseManager::logErrorMessage):
3385         * Modules/webdatabase/DatabaseManager.h:
3386         (DatabaseManager):
3387         * Modules/webdatabase/DatabaseServer.cpp:
3388         (WebCore::DatabaseServer::interruptAllDatabasesForContext):
3389         (WebCore::DatabaseServer::canEstablishDatabase):
3390         * Modules/webdatabase/DatabaseServer.h:
3391         * Modules/webdatabase/DatabaseSync.cpp:
3392         (WebCore::DatabaseSync::DatabaseSync):
3393         (WebCore::DatabaseSync::~DatabaseSync):
3394         (WebCore::DatabaseSync::backend):
3395         * Modules/webdatabase/DatabaseSync.h:
3396         (DatabaseSync):
3397         * Modules/webdatabase/DatabaseTracker.cpp:
3398         (WebCore::DatabaseTracker::openTrackerDatabase):
3399         (WebCore::DatabaseTracker::canEstablishDatabase):
3400         (WebCore::DatabaseTracker::hasEntryForDatabase):
3401         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
3402         (WebCore::DatabaseTracker::populateOriginsIfNeeded):
3403         (WebCore::DatabaseTracker::databaseNamesForOriginNoLock):
3404         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
3405         (WebCore::DatabaseTracker::setDatabaseDetails):
3406         (WebCore::DatabaseTracker::usageForOriginNoLock):
3407         (WebCore::DatabaseTracker::setQuota):
3408         (WebCore::DatabaseTracker::addDatabase):
3409         (WebCore::DatabaseTracker::deleteOrigin):
3410         (WebCore::DatabaseTracker::isDeletingDatabaseOrOriginFor):
3411         (WebCore::DatabaseTracker::canDeleteDatabase):
3412         (WebCore::DatabaseTracker::isDeletingDatabase):
3413         (WebCore::DatabaseTracker::canDeleteOrigin):
3414         (WebCore::DatabaseTracker::isDeletingOrigin):
3415         (WebCore::DatabaseTracker::recordDeletingOrigin):
3416         (WebCore::DatabaseTracker::doneDeletingOrigin):
3417         (WebCore::DatabaseTracker::deleteDatabase):
3418         (WebCore::DatabaseTracker::deleteDatabaseFile):
3419         * Modules/webdatabase/DatabaseTracker.h:
3420         (DatabaseTracker):
3421         * Modules/webdatabase/SQLTransaction.cpp:
3422         * Modules/webdatabase/SQLTransactionClient.cpp:
3423         (WebCore::SQLTransactionClient::didExceedQuota):
3424         * Modules/webdatabase/SQLTransactionSync.cpp:
3425         * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp:
3426         (WebCore::DatabaseTracker::canEstablishDatabase):
3427         (WebCore::DatabaseTracker::removeOpenDatabase):
3428         (WebCore::DatabaseTracker::prepareToOpenDatabase):
3429         (WebCore::DatabaseTracker::failedToOpenDatabase):
3430         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
3431         (WebCore::DatabaseTracker::closeDatabasesImmediately):
3432         * Modules/webdatabase/chromium/SQLTransactionClientChromium.cpp:
3433         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
3434         (WebCore::SQLTransactionClient::didExceedQuota):