Web Inspector: speedup highlight regex API in DefaultTextEditor
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-01-23  Andrey Lushnikov  <lushnikov@chromium.org>
2
3         Web Inspector: speedup highlight regex API in DefaultTextEditor
4         https://bugs.webkit.org/show_bug.cgi?id=107238
5
6         Reviewed by Pavel Feldman.
7
8         Move overlay highlight measurement (highlight regex API) from DefaultTextEditor._paintLine
9         method to the DefaultTextEditor._paintLines method which allows to relayout dom only
10         once. This is a significant improvement to the current state of the
11         art which does relayout on each regex occurence.
12         In addition, use "left" css attribute instead of "margin-left": this
13         way it will be possible to avoid an unnecessary relayouting during
14         appending overlay highlight.
15
16         No new tests: no change in behaviour.
17
18         * inspector/front-end/DefaultTextEditor.js:
19         (WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
20         (WebInspector.TextEditorMainPanel.prototype._paintLines):
21         (WebInspector.TextEditorMainPanel.prototype._measureRegexHighlight):
22         (WebInspector.TextEditorMainPanel.prototype._measureSpans):
23         (WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight):
24         (WebInspector.TextEditorMainPanel.prototype._paintLine):
25         (WebInspector.TextEditorMainPanel.ElementMetrics):
26         (WebInspector.TextEditorMainPanel.LineOverlayHighlight):
27         (WebInspector.TextEditorMainChunk.prototype.expand):
28
29 2013-01-23  Ojan Vafai  <ojan@chromium.org>
30
31         Assert that computePreferredLogicalWidths never calls setNeedsLayout
32         https://bugs.webkit.org/show_bug.cgi?id=107613
33
34         Reviewed by Eric Seidel.
35
36         computePreferredLogicalWidths should only set m_minPreferredLogicalWidth
37         and m_maxPreferredLogicalWidth. It shouldn't have other side-effects.
38         The mathml bits can be removed once https://bugs.webkit.org/show_bug.cgi?id=107353
39         is resolved.
40
41         * rendering/RenderBox.cpp:
42         (WebCore::RenderBox::minPreferredLogicalWidth):
43         * rendering/mathml/RenderMathMLOperator.cpp:
44         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
45         * rendering/mathml/RenderMathMLRoot.cpp:
46         (WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
47         * rendering/mathml/RenderMathMLRow.cpp:
48         (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
49
50 2013-01-23  Noam Rosenthal  <noam@webkit.org>
51
52         REGRESSION(r140518): Broke Chromium Win build (gyp file not updated) (Requested by arv on #webkit).
53         https://bugs.webkit.org/show_bug.cgi?id=107691
54
55         Unreviewed build fix. Removed TextureMapperShaderManager.* from WebCore.gypi.
56
57         * WebCore.gypi:
58
59 2013-01-23  Sheriff Bot  <webkit.review.bot@gmail.com>
60
61         Unreviewed, rolling out r140307, r140411, and r140512.
62         http://trac.webkit.org/changeset/140307
63         http://trac.webkit.org/changeset/140411
64         http://trac.webkit.org/changeset/140512
65         https://bugs.webkit.org/show_bug.cgi?id=107689
66
67         Perf regression on DOMDivWalk (bug 106726) (Requested by
68         falken on #webkit).
69
70         * dom/Element.cpp:
71         (WebCore::Element::removedFrom):
72         (WebCore):
73         (WebCore::Element::isInTopLayer):
74         (WebCore::Element::setIsInTopLayer):
75         * dom/Element.h:
76         * dom/ElementRareData.h:
77         (ElementRareData):
78         (WebCore::ElementRareData::isInTopLayer):
79         (WebCore::ElementRareData::setIsInTopLayer):
80         (WebCore::ElementRareData::ElementRareData):
81         * dom/Node.cpp:
82         * dom/Node.h:
83         (Node):
84         * dom/NodeRenderingContext.cpp:
85         (WebCore::isRendererReparented):
86         (WebCore::NodeRenderingContext::previousRenderer):
87         (WebCore::NodeRenderingContext::parentRenderer):
88         * rendering/RenderLayer.cpp:
89         (WebCore::RenderLayer::isInTopLayer):
90         (WebCore::RenderLayer::rebuildZOrderLists):
91
92 2013-01-23  Dmitry Gozman  <dgozman@chromium.org>
93
94         Web Inspector: allow user to resize inspector window by dragging the toolbar
95         https://bugs.webkit.org/show_bug.cgi?id=107648
96
97         Reviewed by Pavel Feldman.
98
99         This did not work before you click dock button once.
100         Also, last drag position was not respected.
101
102         No new tests, because of pure inspector UI change.
103
104         * inspector/front-end/DockController.js:
105         (WebInspector.DockController.prototype.isDockedToBottom):
106         * inspector/front-end/Toolbar.js:
107         (WebInspector.Toolbar.prototype._isDockedToBottom):
108         (WebInspector.Toolbar.prototype._toolbarDragStart):
109         (WebInspector.Toolbar.prototype._toolbarDragEnd):
110         (WebInspector.Toolbar.prototype._toolbarDrag):
111
112 2013-01-23  Shinya Kawanaka  <shinyak@chromium.org>
113
114         shadowAncestorNode() should be renamed to deprecatedShadowAncestorNode()
115         https://bugs.webkit.org/show_bug.cgi?id=107624
116
117         Reviewed by Dimitri Glazkov.
118
119         Since Node::shadowAncestorNode() is deprecated, we would like to rename it to prevent from further use.
120
121         No new tests, simple refactoring.
122
123         * WebCore.order:
124         * accessibility/AccessibilityRenderObject.cpp:
125         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
126         * dom/Document.cpp:
127         (WebCore::Document::handleZeroPadding):
128         * dom/Node.cpp:
129         (WebCore::Node::deprecatedShadowAncestorNode):
130         * dom/Node.h:
131         (Node):
132         * editing/Editor.cpp:
133         (WebCore::Editor::rangeOfString):
134         (WebCore::Editor::countMatchesForText):
135         * editing/ReplaceSelectionCommand.cpp:
136         (WebCore::ReplacementFragment::ReplacementFragment):
137         * page/DragController.cpp:
138         (WebCore::elementUnderMouse):
139         * page/EventHandler.cpp:
140         (WebCore::EventHandler::handleMouseReleaseEvent):
141         (WebCore::EventHandler::bestClickableNodeForTouchPoint):
142         * page/FocusController.cpp:
143         (WebCore::clearSelectionIfNeeded):
144         * platform/blackberry/RenderThemeBlackBerry.cpp:
145         (WebCore::RenderThemeBlackBerry::paintSearchFieldCancelButton):
146         * rendering/HitTestResult.cpp:
147         (WebCore::HitTestResult::setToNonShadowAncestor):
148         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
149
150 2013-01-22  Pavel Feldman  <pfeldman@chromium.org>
151
152         Web Inspector: only allow evaluateForTestInFrontend for front-ends under test.
153         https://bugs.webkit.org/show_bug.cgi?id=107523
154
155         Reviewed by Yury Semikhatsky.
156
157         * inspector/InspectorController.cpp:
158         (WebCore::InspectorController::InspectorController):
159         (WebCore::InspectorController::isUnderTest):
160         (WebCore):
161         (WebCore::InspectorController::evaluateForTestInFrontend):
162         * inspector/InspectorController.h:
163         (InspectorController):
164         * inspector/InspectorFrontendClient.h:
165         (InspectorFrontendClient):
166         * inspector/InspectorFrontendClientLocal.cpp:
167         (WebCore::InspectorFrontendClientLocal::canAttachWindow):
168         (WebCore::InspectorFrontendClientLocal::isUnderTest):
169         (WebCore):
170         * inspector/InspectorFrontendClientLocal.h:
171         (InspectorFrontendClientLocal):
172         * inspector/InspectorFrontendHost.cpp:
173         (WebCore::InspectorFrontendHost::isUnderTest):
174         (WebCore):
175         * inspector/InspectorFrontendHost.h:
176         (InspectorFrontendHost):
177         * inspector/InspectorFrontendHost.idl:
178         * inspector/front-end/DOMExtension.js:
179         * inspector/front-end/InspectorFrontendHostStub.js:
180         (.WebInspector.InspectorFrontendHostStub.prototype.canInspectWorkers):
181         (.WebInspector.InspectorFrontendHostStub.prototype.isUnderTest):
182         * inspector/front-end/TestController.js:
183         (.invokeMethod):
184         (WebInspector.evaluateForTestInFrontend):
185         * inspector/front-end/externs.js:
186
187 2013-01-23  Andrey Lushnikov  <lushnikov@chromium.org>
188
189         Web Inspector: remove invisibleLineRow code from paintLines DTE method
190         https://bugs.webkit.org/show_bug.cgi?id=107649
191
192         Reviewed by Pavel Feldman.
193
194         Remove invisibleLineRow logic from TextEditorMainPanel._paintLines method.
195
196         No new tests: no change in behaviour.
197
198         * inspector/front-end/DefaultTextEditor.js:
199         (WebInspector.TextEditorMainPanel.prototype._paintLines):
200
201 2013-01-23  Rafael Weinstein  <rafaelw@chromium.org>
202
203         REGRESSION(r140101): caused debug asserts in fast/forms/associated-element-crash.html and html5lib/run-template.html
204         https://bugs.webkit.org/show_bug.cgi?id=107237
205
206         Reviewed by Adam Barth.
207
208         No new tests needed.
209
210         When the parser foster-parent's a node out of a table context and the foster parent is a template element, set the Task.parent
211         to be the template element's content, rather than the element itself. This ensures the foster-parented node isn't errorenously
212         reparented.
213
214         * html/parser/HTMLConstructionSite.cpp:
215         (WebCore::HTMLConstructionSite::findFosterSite):
216
217 2013-01-23  Yury Semikhatsky  <yurys@chromium.org>
218
219         Web Inspector: heap profiler shows nodes with distance 0
220         https://bugs.webkit.org/show_bug.cgi?id=107425
221
222         Reviewed by Pavel Feldman.
223
224         "Document DOM tree" entities now have distance 1. So if there is a DOM
225         wrapper that is not referenced from javascript it will anyways be shown
226         in the heap snapshot and will have distance 2. Also such DOM wrappers
227         are considered to be reachable from user roots (e.g. global Window objects)
228         otherwice they are not event shown in the heap snapshots.
229
230         * inspector/front-end/HeapSnapshot.js:
231         (WebInspector.HeapSnapshot.prototype.distanceForUserRoot):
232         (WebInspector.HeapSnapshot.prototype._calculateDistances):
233         * inspector/front-end/JSHeapSnapshot.js:
234         (WebInspector.JSHeapSnapshot.prototype.distanceForUserRoot): distance for 
235         "(Document DOM trees)" is set to 0 to make sure distance of "Ddocument DOM tree" is 1.
236         (WebInspector.JSHeapSnapshot.prototype._markPageOwnedNodes):
237         (WebInspector.JSHeapSnapshotNode.prototype.isDocumentDOMTreesRoot):
238
239 2013-01-23  Adrian Perez de Castro  <aperez@igalia.com>
240
241         [GStreamer] Add Opus MIME type to the list of supported ones
242         https://bugs.webkit.org/show_bug.cgi?id=98759
243
244         Reviewed by Philippe Normand.
245
246         GStreamer has support for the Opus codec (http://opus-codec.org) by
247         using a plugin present in the "gst-plugins-bad" repository. Opus
248         streams may be embedded in a Ogg container, or standalone. The case
249         of the Ogg container is already covered by the "*/ogg" MIME types
250         declared as supported by the GStreamer media playing code, but for
251         standalone streams to work, "audio/opus" has to be added.
252
253         With this, and the needed GStreamer plugin installed, the GTK+
254         launcher is able to correctly play the example streams from
255         http://opus-codec.org/examples
256
257         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
258
259 2013-01-23  Takashi Sakamoto  <tasak@google.com>
260
261         [Refactoring] Remove elementParentStyle from SelectorCheckerContext
262         https://bugs.webkit.org/show_bug.cgi?id=107496
263
264         Reviewed by Darin Adler.
265
266         Since childrenAffectedBy bits were moved from RenderStyle to element,
267         now elementParentStyle is not used in SelectorChecker and
268         StyleResolver. We should remove the member varaiable from
269         SelectorCheckerContext.
270
271         No new tests, because just refactoring.
272
273         * css/SelectorChecker.cpp:
274         (WebCore::SelectorChecker::match):
275         * css/SelectorChecker.h:
276         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
277         (SelectorCheckingContext):
278         * css/StyleResolver.cpp:
279         (WebCore::StyleResolver::ruleMatches):
280         Removed elementParentStyle.
281
282 2013-01-23  Andreas Kling  <akling@apple.com>
283
284         Pass CSSSelector pointers around as const after parsing stage.
285         <http://webkit.org/b/107645>
286
287         Reviewed by Antti Koivisto.
288
289         Have CSSSelectorList vend const CSSSelector* and make the style resolution code
290         operate on const pointers instead.
291
292         This gives us some compile-time confidence that nobody is changing the selectors
293         after we've parsed them.
294
295         * css/CSSSelector.cpp:
296         (WebCore::CSSSelector::operator==):
297         (WebCore::CSSSelector::selectorText):
298         (WebCore::CSSSelector::parseNth):
299         (WebCore::CSSSelector::matchNth):
300         * css/CSSSelector.h:
301         (CSSSelector):
302         (WebCore::CSSSelector::tagHistory):
303         (WebCore::CSSSelector::selectorList):
304         * css/CSSSelectorList.cpp:
305         (WebCore::CSSSelectorList::selectorsText):
306         (WebCore::forEachTagSelector):
307         (WebCore::forEachSelector):
308         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
309         (WebCore::SelectorHasInvalidSelectorFunctor::operator()):
310         * css/CSSSelectorList.h:
311         (WebCore::CSSSelectorList::first):
312         (CSSSelectorList):
313         (WebCore::CSSSelectorList::selectorAt):
314         (WebCore::CSSSelectorList::indexOfNextSelectorAfter):
315         (WebCore::CSSSelectorList::next):
316         * css/CSSStyleRule.cpp:
317         (WebCore::CSSStyleRule::generateSelectorText):
318         * css/RuleSet.cpp:
319         (WebCore::selectorListContainsUncommonAttributeSelector):
320         (WebCore::collectFeaturesFromRuleData):
321         * css/RuleSet.h:
322         (WebCore::RuleData::selector):
323         (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
324         (RuleSetSelectorPair):
325         * css/SelectorChecker.cpp:
326         (WebCore::SelectorChecker::matches):
327         (WebCore::SelectorChecker::match):
328         (WebCore::SelectorChecker::checkOne):
329         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
330         (WebCore::SelectorChecker::determineLinkMatchType):
331         * css/SelectorChecker.h:
332         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
333         (SelectorCheckingContext):
334         (SelectorChecker):
335         * css/StyleInvalidationAnalysis.cpp:
336         (WebCore::determineSelectorScopes):
337         * css/StyleResolver.cpp:
338         (WebCore::StyleResolver::collectMatchingRulesForRegion):
339         (WebCore::StyleResolver::checkRegionSelector):
340         * css/StyleResolver.h:
341         (StyleResolver):
342         * dom/SelectorQuery.cpp:
343         (WebCore::SelectorDataList::initialize):
344         (WebCore::SelectorDataList::execute):
345         * dom/SelectorQuery.h:
346         (WebCore::SelectorDataList::SelectorData::SelectorData):
347         (SelectorData):
348         * html/shadow/ContentDistributor.cpp:
349         (WebCore::ContentDistributor::collectSelectFeatureSetFrom):
350         * html/shadow/ContentSelectorQuery.cpp:
351         (WebCore::ContentSelectorChecker::checkContentSelector):
352         (WebCore::ContentSelectorDataList::initialize):
353         * html/shadow/ContentSelectorQuery.h:
354         (ContentSelectorChecker):
355         (ContentSelectorDataList):
356         * html/shadow/HTMLContentElement.cpp:
357         (WebCore::validateSubSelector):
358         (WebCore::validateSelector):
359         (WebCore::HTMLContentElement::validateSelect):
360         * inspector/InspectorCSSAgent.cpp:
361         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
362         * inspector/InspectorStyleSheet.cpp:
363         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
364
365 2013-01-23  Sergio Villar Senin  <svillar@igalia.com>
366
367         [GTK] Unreviewed build fix after r140518.
368
369         * GNUmakefile.list.am: rename TextureMapperShaderManager to
370         TextureMapperShaderProgram.
371
372 2013-01-23  Yoshifumi Inoue  <yosin@chromium.org>
373
374         REGRESSION(r139044): Pan icon remains on screen on Chromium-WinXP
375         https://bugs.webkit.org/show_bug.cgi?id=107623
376
377         Reviewed by Hajime Morita.
378
379         The issue is caused by AutoscrollController::stopAutoscrollTimer()
380         doesn't call View::removePanScrollIcon() because m_autoscrollType
381         is reset before checking it.
382
383         This patch changes to reset m_autoscrollType after all references.
384
385         Test: platform/chromium-win/fast/events/panScroll-panIcon.html
386
387         * page/AutoscrollController.cpp:
388         (WebCore::AutoscrollController::stopAutoscrollTimer):
389
390 2013-01-23  Sergio Villar Senin  <svillar@igalia.com>
391
392         REGRESSION(r140338): WebKitGtk+ trying to allocate a buffer too big
393         https://bugs.webkit.org/show_bug.cgi?id=107646
394
395         Reviewed by Carlos Garcia Campos.
396
397         g_input_stream_skip_async() was replaced in r140338 by
398         g_input_stream_read_async() to workaround a glib buffer. The former
399         was using G_MAXSSIZE to skip the whole redirect message but we
400         cannot use it for the latter because it will try to
401         allocate a buffer of that size. Replaced it by READ_BUFFER_SIZE. No
402         new tests required, functionality already covered by network tests..
403
404         * platform/network/soup/ResourceHandleSoup.cpp:
405         (WebCore::redirectSkipCallback):
406         (WebCore::sendRequestCallback):
407
408 2013-01-23  Andrey Adaikin  <aandrey@chromium.org>
409
410         Web Inspector: use inspectedWindow.document instead of document in InjectedScript
411         https://bugs.webkit.org/show_bug.cgi?id=107642
412
413         Reviewed by Pavel Feldman.
414
415         * inspector/InjectedScriptSource.js:
416         (.):
417
418 2013-01-23  Vivek Galatage  <vivek.vg@samsung.com>
419
420         xml-stylesheet XSL is not requested with JavaScript disabled
421         https://bugs.webkit.org/show_bug.cgi?id=103902
422
423         Reviewed by Adam Barth.
424
425         Currently CachedResourceLoader::canRequest() calls allowScriptFromSource() on
426         ContentSecurityPolicy and FrameLoaderClient for the given XSLStyleSheet. This
427         should be restricted to only calling allowScriptFromSource() for the
428         ContentSecurityPolicy.
429
430         Test: http/tests/xsl/xslt-transform-with-javascript-disabled.html
431
432         * loader/cache/CachedResourceLoader.cpp:
433         (WebCore::CachedResourceLoader::canRequest):
434
435 2013-01-23  Kentaro Hara  <haraken@chromium.org>
436
437         [V8] Remove if(isolate) checks from v8String() and v8Integer()
438         https://bugs.webkit.org/show_bug.cgi?id=107540
439
440         Reviewed by Adam Barth.
441
442         Now there is no optional Isolate parameter in the code base
443         (except for throwError()). We can safely remove if(isolate) checks
444         from v8String() and v8Integer().
445
446         div.id:       17.8 ns => 17.8 ns (no performance change)
447         div.nodeType:  9.7 ns =>  8.9 ns (+8.9% performance improvement)
448
449         No tests. No change in behavior.
450
451         * bindings/v8/ScriptDebugServer.cpp:
452         (WebCore::ScriptDebugServer::handleV8DebugEvent):
453         * bindings/v8/V8Binding.h:
454         (WebCore::v8String):
455         (WebCore::v8Integer):
456         * bindings/v8/V8WindowErrorHandler.cpp:
457         (WebCore::V8WindowErrorHandler::callListenerFunction):
458         * bindings/v8/V8WorkerContextErrorHandler.cpp:
459         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
460
461 2013-01-23  Hajime Morrita  <morrita@google.com>
462
463         Invalidated SVG shadow tree should be always detached.
464         https://bugs.webkit.org/show_bug.cgi?id=107634
465
466         Reviewed by Ryosuke Niwa.
467
468         SVGUseElement::clearResourceReferences() uses removeAllChildren() for
469         clearing its shadow DOM, but this is wrong.
470         removeAllChildren() is designed for removing children of an out-of-document Node.
471         For efficiency, it skips a series of cleanup sequences like detach().
472
473         For removing SVG shadow tree which is in Document, removeChildren() should be used.
474         It does proper cleanup for the chilren.
475
476         Test: svg/custom/use-invalidate-click-crash.xhtml
477
478         * svg/SVGUseElement.cpp:
479         (WebCore::SVGUseElement::clearResourceReferences):
480
481 2013-01-23  Huang Dongsung  <luxtella@company100.net>
482
483         [TexMap] Don't call GraphicsLayer::setNeedsDisplay() from TextureMapperLayer.
484         https://bugs.webkit.org/show_bug.cgi?id=107629
485
486         Reviewed by Noam Rosenthal.
487
488         We are removing the dependency on GraphicsLayer from TextureMapperLayer.
489
490         This is in preparation for refactoring TextureMapper to work in an actor
491         model (http://webkit.org/b/103854).
492
493         No new tests, refactoring only.
494
495         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
496         (WebCore::GraphicsLayerTextureMapper::setDrawsContent):
497         * platform/graphics/texmap/TextureMapperLayer.cpp:
498         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
499
500 2013-01-23  No'am Rosenthal  <noam@webkit.org>
501
502         [Texmap] Rename TextureMapperShaderManager.* TextureMapperShaderProgram.*
503         https://bugs.webkit.org/show_bug.cgi?id=105847
504
505         TextureMapperShaderManager contains very little "manager" code.
506         Moved the map of shaders to TextureMapperGL, and renamed the files containing
507         the shader implementation TextureMapperShaderProgram.cpp|h.
508
509         Reviewed by Kenneth Rohde Christiansen.
510
511         No new tests - renames/refactors only.
512
513         * GNUmakefile.list.am:
514         * PlatformEfl.cmake:
515         * Target.pri:
516         * platform/graphics/texmap/TextureMapperGL.cpp:
517         (WebCore::TextureMapperGLData::SharedGLData::getShaderProgram):
518                 This function is copied from TextureMapperShaderManager.
519         (SharedGLData):
520         (WebCore::TextureMapperGLData::SharedGLData::SharedGLData):
521         (WebCore::TextureMapperGL::drawBorder):
522         (WebCore::TextureMapperGL::drawTexture):
523         (WebCore::TextureMapperGL::drawSolidColor):
524         (WebCore::optionsForFilterType):
525         (WebCore::TextureMapperGL::drawFiltered):
526         (WebCore::TextureMapperGL::beginClip):
527         * platform/graphics/texmap/TextureMapperShaderProgram.cpp: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.cpp.
528         (WebCore):
529         (WebCore::compositingLogEnabled):
530         (WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram):
531         (WebCore::TextureMapperShaderProgram::setMatrix):
532         (WebCore::TextureMapperShaderProgram::getLocation):
533         (WebCore::TextureMapperShaderProgram::~TextureMapperShaderProgram):
534         (WebCore::TextureMapperShaderProgram::create):
535         * platform/graphics/texmap/TextureMapperShaderProgram.h: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.h.
536         (WebCore):
537         (TextureMapperShaderProgram):
538         (WebCore::TextureMapperShaderProgram::programID):
539         (WebCore::TextureMapperShaderProgram::context):
540
541 2013-01-23  Kentaro Hara  <haraken@chromium.org>
542
543         [V8] Make an Isolate parameter mandatory in throwError()
544         https://bugs.webkit.org/show_bug.cgi?id=107636
545
546         Reviewed by Adam Barth.
547
548         No tests. No change in behavior.
549
550         * bindings/v8/NPV8Object.cpp:
551         (_NPN_SetException):
552         * bindings/v8/V8Binding.cpp:
553         (WebCore::handleMaxRecursionDepthExceeded):
554         * bindings/v8/V8Binding.h:
555         (WebCore):
556         * bindings/v8/WorkerScriptController.cpp:
557         (WebCore::WorkerScriptController::evaluate):
558         (WebCore::WorkerScriptController::setException):
559
560 2013-01-22  Kentaro Hara  <haraken@chromium.org>
561
562         [V8] Make an Isolate parameter mandatory in throwTypeError()
563         https://bugs.webkit.org/show_bug.cgi?id=107632
564
565         Reviewed by Adam Barth.
566
567         No tests. No change in behavior.
568
569         * bindings/scripts/CodeGeneratorV8.pm:
570         (GenerateParametersCheck):
571         (GenerateConstructorHeader):
572         (JSValueToNative):
573         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
574         (WebCore::V8TestEventConstructor::constructorCallback):
575         * bindings/scripts/test/V8/V8TestInterface.cpp:
576         (WebCore::V8TestInterface::constructorCallback):
577         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
578         (WebCore::V8TestNamedConstructorConstructorCallback):
579         * bindings/scripts/test/V8/V8TestNode.cpp:
580         (WebCore::V8TestNode::constructorCallback):
581         * bindings/scripts/test/V8/V8TestObj.cpp:
582         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
583         (WebCore::V8TestObj::constructorCallback):
584         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
585         (WebCore::V8TestOverloadedConstructors::constructorCallback):
586         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
587         (WebCore::TestSerializedScriptValueInterfaceV8Internal::acceptTransferListCallback):
588         (WebCore::TestSerializedScriptValueInterfaceV8Internal::multiTransferListCallback):
589         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
590         * bindings/v8/V8Binding.h:
591         (WebCore):
592         (WebCore::toRefPtrNativeArray):
593         (WebCore::toV8Sequence):
594         * bindings/v8/V8NodeFilterCondition.cpp:
595         (WebCore::V8NodeFilterCondition::acceptNode):
596         * bindings/v8/V8Utilities.cpp:
597         (WebCore::extractTransferables):
598         (WebCore::getMessagePortArray):
599
600 2013-01-22  Matt Falkenhagen  <falken@chromium.org>
601
602         20% regression on dom_perf/DomDivWalk
603         https://bugs.webkit.org/show_bug.cgi?id=106726
604
605         Reviewed by Hajime Morita.
606
607         This patch moves the checks in Element::removedFrom for Fullscreen and top layer flags
608         into a slow path. The idea is for the two checks for Fullscreen and top layer
609         to be replaced by one faster check in the fast path.
610
611         The plan is to migrate the Fullscreen implementation to use top layer, so this is just a
612         short-term fix for the perf regression.
613
614         No new tests: no functionality change
615
616         * dom/Element.cpp:
617         (WebCore::Element::removedFrom): Create a slow path to move the Fullscreen and top layer checks into.
618         * dom/Node.cpp:
619         (WebCore::Node::setIsInTopLayer): To allow for cleaner code in Element::removedFrom, define
620         setIsInTopLayer and isInTopLayer even when the feature flag is off.
621         * dom/Node.h:
622         (WebCore::Node::isInTopLayer): Ditto.
623         (Node):
624
625 2013-01-22  Mark Lam  <mark.lam@apple.com>
626
627         Change the Supplementable class to not use AtomicString.
628         https://bugs.webkit.org/show_bug.cgi?id=107535.
629
630         Reviewed by Adam Barth.
631
632         Replaced the use of AtomicString keys with literal const char* keys.
633         This simplifies the SupplementMap and makes it slightly leaner and faster.
634
635         No new tests.
636
637         * Modules/battery/BatteryController.cpp:
638         (WebCore::BatteryController::supplementName):
639         * Modules/battery/BatteryController.h:
640         (BatteryController):
641         * Modules/battery/NavigatorBattery.cpp:
642         (WebCore::NavigatorBattery::supplementName):
643         (WebCore):
644         (WebCore::NavigatorBattery::from):
645         * Modules/battery/NavigatorBattery.h:
646         (NavigatorBattery):
647         * Modules/filesystem/chromium/DraggedIsolatedFileSystem.cpp:
648         (WebCore::DraggedIsolatedFileSystem::supplementName):
649         * Modules/filesystem/chromium/DraggedIsolatedFileSystem.h:
650         (DraggedIsolatedFileSystem):
651         * Modules/gamepad/NavigatorGamepad.cpp:
652         (WebCore::NavigatorGamepad::supplementName):
653         (WebCore):
654         (WebCore::NavigatorGamepad::from):
655         * Modules/gamepad/NavigatorGamepad.h:
656         (NavigatorGamepad):
657         * Modules/geolocation/GeolocationController.cpp:
658         (WebCore::GeolocationController::supplementName):
659         * Modules/geolocation/GeolocationController.h:
660         (GeolocationController):
661         * Modules/geolocation/NavigatorGeolocation.cpp:
662         (WebCore::NavigatorGeolocation::supplementName):
663         (WebCore):
664         (WebCore::NavigatorGeolocation::from):
665         * Modules/geolocation/NavigatorGeolocation.h:
666         (NavigatorGeolocation):
667         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
668         (WebCore::DOMWindowIndexedDatabase::supplementName):
669         (WebCore):
670         (WebCore::DOMWindowIndexedDatabase::from):
671         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
672         (DOMWindowIndexedDatabase):
673         * Modules/indexeddb/PageGroupIndexedDatabase.cpp:
674         (WebCore::PageGroupIndexedDatabase::supplementName):
675         (WebCore):
676         (WebCore::PageGroupIndexedDatabase::from):
677         * Modules/indexeddb/PageGroupIndexedDatabase.h:
678         (PageGroupIndexedDatabase):
679         * Modules/indexeddb/WorkerContextIndexedDatabase.cpp:
680         (WebCore::WorkerContextIndexedDatabase::supplementName):
681         (WebCore):
682         (WebCore::WorkerContextIndexedDatabase::from):
683         * Modules/indexeddb/WorkerContextIndexedDatabase.h:
684         (WorkerContextIndexedDatabase):
685         * Modules/intents/DOMWindowIntents.cpp:
686         (WebCore::DOMWindowIntents::supplementName):
687         (WebCore):
688         (WebCore::DOMWindowIntents::from):
689         * Modules/intents/DOMWindowIntents.h:
690         (DOMWindowIntents):
691         * Modules/mediastream/UserMediaController.cpp:
692         (WebCore::UserMediaController::supplementName):
693         * Modules/mediastream/UserMediaController.h:
694         (UserMediaController):
695         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
696         (WebCore::NavigatorContentUtils::supplementName):
697         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
698         (NavigatorContentUtils):
699         * Modules/networkinfo/NavigatorNetworkInfoConnection.cpp:
700         (WebCore::NavigatorNetworkInfoConnection::supplementName):
701         (WebCore):
702         (WebCore::NavigatorNetworkInfoConnection::from):
703         * Modules/networkinfo/NavigatorNetworkInfoConnection.h:
704         (NavigatorNetworkInfoConnection):
705         * Modules/networkinfo/NetworkInfoController.cpp:
706         (WebCore::NetworkInfoController::supplementName):
707         * Modules/networkinfo/NetworkInfoController.h:
708         (NetworkInfoController):
709         * Modules/notifications/DOMWindowNotifications.cpp:
710         (WebCore::DOMWindowNotifications::supplementName):
711         (WebCore):
712         (WebCore::DOMWindowNotifications::from):
713         * Modules/notifications/DOMWindowNotifications.h:
714         (DOMWindowNotifications):
715         * Modules/notifications/NotificationController.cpp:
716         (WebCore::NotificationController::supplementName):
717         * Modules/notifications/NotificationController.h:
718         (NotificationController):
719         * Modules/notifications/WorkerContextNotifications.cpp:
720         (WebCore::WorkerContextNotifications::supplementName):
721         (WebCore):
722         (WebCore::WorkerContextNotifications::from):
723         * Modules/notifications/WorkerContextNotifications.h:
724         (WorkerContextNotifications):
725         * Modules/quota/DOMWindowQuota.cpp:
726         (WebCore::DOMWindowQuota::supplementName):
727         (WebCore):
728         (WebCore::DOMWindowQuota::from):
729         * Modules/quota/DOMWindowQuota.h:
730         (DOMWindowQuota):
731         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
732         (WebCore::DOMWindowSpeechSynthesis::supplementName):
733         (WebCore):
734         (WebCore::DOMWindowSpeechSynthesis::from):
735         * Modules/speech/DOMWindowSpeechSynthesis.h:
736         (DOMWindowSpeechSynthesis):
737         * Modules/speech/SpeechRecognitionController.cpp:
738         (WebCore::SpeechRecognitionController::supplementName):
739         * Modules/speech/SpeechRecognitionController.h:
740         (SpeechRecognitionController):
741         * Modules/vibration/Vibration.cpp:
742         (WebCore::Vibration::supplementName):
743         * Modules/vibration/Vibration.h:
744         (Vibration):
745         * Modules/webdatabase/DatabaseContext.cpp:
746         (WebCore::DatabaseContext::supplementName):
747         (WebCore):
748         (WebCore::DatabaseContext::existingDatabaseContextFrom):
749         (WebCore::DatabaseContext::from):
750         * Modules/webdatabase/DatabaseContext.h:
751         (DatabaseContext):
752         * dom/ContextFeatures.cpp:
753         (WebCore::ContextFeatures::supplementName):
754         * dom/ContextFeatures.h:
755         * dom/DeviceMotionController.cpp:
756         (WebCore::DeviceMotionController::supplementName):
757         * dom/DeviceMotionController.h:
758         (DeviceMotionController):
759         * dom/DeviceOrientationController.cpp:
760         (WebCore::DeviceOrientationController::supplementName):
761         * dom/DeviceOrientationController.h:
762         (DeviceOrientationController):
763         * loader/PrerendererClient.cpp:
764         (WebCore::PrerendererClient::supplementName):
765         * loader/PrerendererClient.h:
766         (PrerendererClient):
767         * page/DOMWindowPagePopup.cpp:
768         (WebCore::DOMWindowPagePopup::supplementName):
769         * page/DOMWindowPagePopup.h:
770         (DOMWindowPagePopup):
771         * page/SpeechInput.cpp:
772         (WebCore::SpeechInput::supplementName):
773         * page/SpeechInput.h:
774         (SpeechInput):
775         * platform/RefCountedSupplement.h:
776         (WebCore::RefCountedSupplement::provideTo):
777         (WebCore::RefCountedSupplement::from):
778         * platform/Supplementable.h:
779         (WebCore):
780         (WebCore::Supplement::provideTo):
781         (WebCore::Supplement::from):
782         (WebCore::Supplementable::provideSupplement):
783         (WebCore::Supplementable::removeSupplement):
784         (WebCore::Supplementable::requireSupplement):
785         (Supplementable):
786         * testing/InternalSettings.cpp:
787         (WebCore::InternalSettings::supplementName):
788         (WebCore):
789         (WebCore::InternalSettings::from):
790         * testing/InternalSettings.h:
791         (InternalSettings):
792
793 2013-01-22  Hajime Morrita  <morrita@google.com>
794
795         non-ENABLE(DETAILS_ELEMENT) build fails.
796         https://bugs.webkit.org/show_bug.cgi?id=107626
797
798         Reviewed by Kent Tamura.
799
800         No new tests, build configuration change.
801
802         * rendering/RenderObject.h:
803         (RenderObject): Added a missing condition.
804
805 2013-01-22  Dima Gorbik  <dgorbik@apple.com>
806
807         Whitelist should also work for the WebVTT ::cue element without an argument
808         https://bugs.webkit.org/show_bug.cgi?id=107488
809
810         Reviewed by Andreas Kling.
811         
812         Apply filtering if the cue shadow pseudoId is set on the selector.
813
814         Existing tests were modified to cover this case.
815
816         * css/RuleSet.cpp:
817         (WebCore::determinePropertyWhitelistType):
818         * html/shadow/MediaControlElements.cpp:
819         (WebCore::MediaControlTextTrackContainerElement::createSubtrees):
820         * html/track/TextTrackCue.h:
821         (WebCore::TextTrackCue::cueShadowPseudoId):
822
823 2013-01-22  Hayato Ito  <hayato@chromium.org>
824
825         Make MediaQueryEvaluator(bool) constructor explicit.
826         https://bugs.webkit.org/show_bug.cgi?id=107620
827
828         Reviewed by Hajime Morita.
829
830         No new tests: no change in behavior.
831
832         * css/MediaQueryEvaluator.h:
833         (MediaQueryEvaluator):
834
835 2013-01-22  Anders Carlsson  <andersca@apple.com>
836
837         Use a platform strategy for local storage
838         https://bugs.webkit.org/show_bug.cgi?id=107600
839
840         Reviewed by Andreas Kling.
841
842         * CMakeLists.txt:
843         * GNUmakefile.list.am:
844         * WebCore.exp.in:
845         * WebCore.gypi:
846         * WebCore.vcproj/WebCore.vcproj:
847         * WebCore.xcodeproj/project.pbxproj:
848         Add new files.
849
850         * platform/PlatformStrategies.h:
851         Add a way to create/get the storage strategy.
852
853         * storage/StorageNamespace.cpp:
854         (WebCore::StorageNamespace::localStorageNamespace):
855         (WebCore::StorageNamespace::sessionStorageNamespace):
856         Call the storage strategy.
857
858         * storage/StorageNamespace.h:
859         * storage/StorageStrategy.cpp: Added.
860         (WebCore::StorageStrategy::localStorageNamespace):
861         (WebCore::StorageStrategy::sessionStorageNamespace):
862         Call through to StorageNamespaceImpl.
863
864         * storage/StorageStrategy.h: Added.
865
866 2013-01-22  Jun Jiang  <jun.a.jiang@intel.com>
867
868         Optimize the texture packing for texImage2D() and texSubImage2D() in WebGL
869         https://bugs.webkit.org/show_bug.cgi?id=105821
870
871         Reviewed by Kenneth Russell.
872
873         The original texture packing code uses function pointers to denote each unpack and pack operations for different combination of Source formats,
874         Destination formats and Alpha Operations. It could be made cleaner and simpler. In this patch, template functions are used and try best to avoid
875         generating useless code for unreachable path to avoid code bloat. Moreover, the flipY operation is moved into the pack operation instead of
876         operating in a standalone method to improve performance.
877
878         Already covered by current test.
879
880         * html/canvas/WebGLRenderingContext.cpp:
881         (WebCore):
882         (WebCore::WebGLRenderingContext::texImage2DImpl):
883         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
884         * platform/graphics/GraphicsContext3D.cpp:
885         (WebCore::GraphicsContext3D::packImageData):
886         (WebCore::GraphicsContext3D::extractImageData):
887         (WebCore::GraphicsContext3D::extractTextureData):
888         (WebCore):
889         (WebCore::GraphicsContext3D::packPixels):
890         * platform/graphics/GraphicsContext3D.h:
891         (WebCore::GraphicsContext3D::srcFormatComeFromDOMElementOrImageData):
892         (GraphicsContext3D):
893         (WebCore::GraphicsContext3D::ImageExtractor::imageSourceFormat):
894         (ImageExtractor):
895         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
896         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
897         * platform/graphics/cg/GraphicsContext3DCG.cpp:
898         (WebCore::getSourceDataFormat):
899         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
900         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
901         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
902         * platform/graphics/qt/GraphicsContext3DQt.cpp:
903         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
904         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
905         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
906
907 2013-01-21  Kentaro Hara  <haraken@chromium.org>
908
909         Implement UIEvent constructor
910         https://bugs.webkit.org/show_bug.cgi?id=107430
911
912         Reviewed by Adam Barth.
913
914         Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
915
916         UIEvent constructor is implemented under a DOM4_EVENTS_CONSTRUCTOR flag,
917         which is enabled on Safari and Chromium for now.
918
919         Test: fast/events/constructors/ui-event-constructor.html
920
921         * Configurations/FeatureDefines.xcconfig:
922         * bindings/scripts/CodeGeneratorV8.pm:
923         (GenerateHeader):
924         * bindings/scripts/test/V8/V8TestInterface.h:
925         (V8TestInterface):
926         * dom/UIEvent.cpp:
927         (WebCore::UIEventInit::UIEventInit):
928         (WebCore):
929         (WebCore::UIEvent::UIEvent):
930         * dom/UIEvent.h:
931         (WebCore):
932         (UIEventInit):
933         (UIEvent):
934         (WebCore::UIEvent::create):
935         (WebCore::UIEvent::view):
936         (WebCore::UIEvent::detail):
937         (FocusInEventDispatchMediator):
938         (FocusOutEventDispatchMediator):
939         * dom/UIEvent.idl:
940
941 2013-01-22  Joshua Bell  <jsbell@chromium.org>
942
943         IndexedDB: Remove IDBKey from WebKitIDL
944         https://bugs.webkit.org/show_bug.cgi?id=97375
945
946         Reviewed by Kentaro Hara.
947
948         Now that references to the artificial IDBKey type have been removed from all IDLs, remove
949         the support code, and move the conversion code into the IDBBindingUtilities. Removes
950         references to the autogenerated {V8,JS}IDBKey{Custom,}.{cpp,h} from the project files.
951
952         No new tests - just code moves/removing unused code. Updated binding reference test results.
953
954         * CMakeLists.txt:
955         * DerivedSources.cpp:
956         * DerivedSources.make:
957         * DerivedSources.pri:
958         * GNUmakefile.list.am:
959         * Modules/indexeddb/IDBKey.idl: Removed.
960         * Target.pri:
961         * UseJSC.cmake:
962         * UseV8.cmake:
963         * WebCore.gypi:
964         * WebCore.vcproj/WebCore.vcproj:
965         * WebCore.xcodeproj/project.pbxproj:
966         * bindings/js/IDBBindingUtilities.cpp:
967         (WebCore::toJS): Moved here from JSIDBKeyCustom.cpp
968         (WebCore):
969         * bindings/js/JSIDBKeyCustom.cpp: Removed.
970         * bindings/scripts/CodeGeneratorJS.pm:
971         (JSValueToNative):
972         * bindings/scripts/CodeGeneratorV8.pm:
973         (GenerateFunctionCallString):
974         (GetNativeType):
975         (JSValueToNative):
976         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
977         * bindings/scripts/test/CPP/WebDOMTestObj.h:
978         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
979         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
980         * bindings/scripts/test/JS/JSTestObj.cpp:
981         * bindings/scripts/test/JS/JSTestObj.h:
982         * bindings/scripts/test/ObjC/DOMTestObj.h:
983         * bindings/scripts/test/ObjC/DOMTestObj.mm:
984         * bindings/scripts/test/TestObj.idl: Removed IDBKey-specific test.
985         * bindings/scripts/test/V8/V8TestObj.cpp:
986         * bindings/v8/IDBBindingUtilities.cpp:
987         (WebCore::toV8): Moved here from V8IDBKeyCustom.cpp
988         (WebCore):
989         * bindings/v8/custom/V8IDBKeyCustom.cpp: Removed.
990
991 2013-01-22  Tony Gentilcore  <tonyg@chromium.org>
992
993         Fix assertions in make8BitFrom16BitSource() with threaded parser
994         https://bugs.webkit.org/show_bug.cgi?id=107596
995
996         Reviewed by Adam Barth.
997
998         This fixes an assertion in several fast/parser tests. We need to keep track of whether the data is all 8bit.
999         Luckily this doesn't cost us any size on CompactHTMLToken because the bitfields are collapsed (verified by COMPILE_ASSERT).
1000
1001         No new tests because covered by existing fast/parser tests.
1002
1003         * html/parser/CompactHTMLToken.cpp:
1004         (WebCore::CompactHTMLToken::CompactHTMLToken):
1005         * html/parser/CompactHTMLToken.h:
1006         (WebCore::CompactHTMLToken::isAll8BitData):
1007         (CompactHTMLToken):
1008         * html/parser/HTMLToken.h:
1009         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1010
1011 2013-01-22  Tony Gentilcore  <tonyg@chromium.org>
1012
1013         Fix ASSERT(!hasInsertionPoint()) in threaded HTML parser
1014         https://bugs.webkit.org/show_bug.cgi?id=107593
1015
1016         Reviewed by Adam Barth.
1017
1018         Prior to this patch, several fast/parser tests hit ASSERT(!hasInsertionPoint()) in prepareToStopParsing().
1019         That was because hasInsertionPoint() checks m_input.haveSeenEndOfFile() which was skipped for the threaded
1020         parser case. This patch causes us to call markEndOfFile().
1021
1022         No new tests because covered by existing fast/parser tests.
1023
1024         * html/parser/HTMLDocumentParser.cpp:
1025         (WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser): This FIXME was done in a previous patch.
1026         (WebCore::HTMLDocumentParser::finish):
1027
1028 2013-01-22  Joshua Bell  <jsbell@chromium.org>
1029
1030         Prevent race condition during Worker shutdown
1031         https://bugs.webkit.org/show_bug.cgi?id=107577
1032
1033         Reviewed by Dmitry Titov.
1034
1035         During worker shutdown, from the main thread a cleanup task is posted followed by
1036         terminating the message queue, which prevents further tasks from being processed. It was
1037         possible for another task be posted by another thread between the main thread calls
1038         to postTask and terminate(), which would cause that task to run after cleanup. Expose
1039         a new WTF::MessageQueue::appendAndKill() method which keeps a mutex around the two steps,
1040         and use that during worker shutdown.
1041
1042         No reliable tests for the race - problem identified by inspection of user crash stacks.
1043
1044         * workers/WorkerRunLoop.cpp:
1045         (WebCore::WorkerRunLoop::postTaskAndTerminate): New method, uses MessageQueue::appendAndKill()
1046         * workers/WorkerRunLoop.h:
1047         * workers/WorkerThread.cpp:
1048         (WebCore::WorkerThread::stop): Uses postTaskAndTerminate() to avoid race.
1049
1050 2013-01-22  Tony Chang  <tony@chromium.org>
1051
1052         Unreviewed, rolling out r140171.
1053         http://trac.webkit.org/changeset/140171
1054         https://bugs.webkit.org/show_bug.cgi?id=107193
1055
1056         Regressed scrollable region size in other cases.
1057
1058         * rendering/RenderBlock.cpp:
1059         (WebCore::RenderBlock::simplifiedLayout):
1060
1061 2013-01-22  Alexey Proskuryakov  <ap@apple.com>
1062
1063         [WK2] WebProcessService is not terminated when page is closed
1064         https://bugs.webkit.org/show_bug.cgi?id=107595
1065
1066         Reviewed by Anders Carlsson.
1067
1068         * platform/mac/RunLoopMac.mm: (WebCore::RunLoop::stop): Allow stopping XPC service
1069         run loop. Also, harmonized NSApp vs. [NSApplication sharedApplication] usage.
1070
1071 2013-01-22  Ojan Vafai  <ojan@chromium.org>
1072
1073         REGRESION(r130774): preferred width of tables does not take max-width into account
1074         https://bugs.webkit.org/show_bug.cgi?id=107576
1075
1076         Reviewed by Tony Chang.
1077
1078         Constrain preferred widths by min/max the way we do in other
1079         RenderBlock subclasses. Eventually, we'll shared the code with
1080         RenderBlock, but this is an incremental step in that direction
1081         that we can safely merge into release branches.
1082
1083         Test: fast/table/min-max-width-preferred-size.html
1084
1085         * rendering/RenderTable.cpp:
1086         (WebCore::RenderTable::computePreferredLogicalWidths):
1087
1088 2013-01-22  Adam Barth  <abarth@webkit.org>
1089
1090         The BackgroundHTMLParser shouldn't pause when waiting for scripts
1091         https://bugs.webkit.org/show_bug.cgi?id=107584
1092
1093         Reviewed by Eric Seidel.
1094
1095         Previously, the BackgroundHTMLParser would pause itself when it
1096         encountered a scrip tag and wait for a signal from the main thread to
1097         continue. After this patch, the BackgroundHTMLParser continues ahead
1098         and the main thread keeps a queue of pending tokens.
1099
1100         This patch brings us closer to speculative parsing because when the
1101         BackgroundHTMLParser is continuing ahead, it is speculating that it is
1102         in the correct state. A future patch will let us abort incorret
1103         speculations and resume from an eariler point in the input stream.
1104
1105         * html/parser/BackgroundHTMLParser.cpp:
1106         (WebCore::checkThatTokensAreSafeToSendToAnotherThread):
1107         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
1108         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
1109         (WebCore::BackgroundHTMLParser::pumpTokenizer):
1110         (WebCore::TokenDelivery::TokenDelivery):
1111         (TokenDelivery):
1112         (WebCore::TokenDelivery::execute):
1113         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
1114         * html/parser/BackgroundHTMLParser.h:
1115         (BackgroundHTMLParser):
1116         * html/parser/CompactHTMLToken.h:
1117         (WebCore):
1118         * html/parser/HTMLDocumentParser.cpp:
1119         (WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser):
1120         (WebCore):
1121         (WebCore::HTMLDocumentParser::processTokensFromBackgroundParser):
1122         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
1123         * html/parser/HTMLDocumentParser.h:
1124         (HTMLDocumentParser):
1125
1126 2013-01-22  Simon Fraser  <simon.fraser@apple.com>
1127
1128         Fix scrollperf logging
1129         https://bugs.webkit.org/show_bug.cgi?id=107589
1130
1131         Reviewed by Tim Horton.
1132
1133         The scrollperf logging had two issues:
1134
1135         1. It relied on a paint logging a "filled" event, but it's possible
1136         for existing tiles to be moved into the viewport and filling it, so
1137         we need to log from the scrolling thread both when we have unfilled pixels,
1138         and when the last scroll revealed unfilled pixels.
1139         
1140         2. On some pages, z-index:-1 elements behind the body cause the root
1141         TileCache to have drawsContent set to false, so none of its tiles paint. In
1142         that case, the check for a non-zero paintCount in TileCache::blankPixelCountForTiles()
1143         was wrong; we don't think there's a way to have an unpainted tile in the tree.
1144         
1145         Also fix the signature of blankPixelCountForTiles() to take references.
1146
1147         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
1148         (ScrollingTreeScrollingNodeMac):
1149         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1150         (WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
1151         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
1152         * platform/graphics/ca/mac/TileCache.h:
1153         * platform/graphics/ca/mac/TileCache.mm:
1154         (WebCore::TileCache::blankPixelCountForTiles):
1155
1156 2013-01-22  Eric Seidel  <eric@webkit.org>
1157
1158         Make CompactHTMLToken a little more compact
1159         https://bugs.webkit.org/show_bug.cgi?id=107317
1160
1161         Reviewed by Adam Barth.
1162
1163         The windows builders got sad because MSVC won't combine
1164         adjacent bit-fields with different types.  Changing
1165         bool to unsigned should fix the problem.
1166
1167         * html/parser/CompactHTMLToken.h:
1168         (CompactHTMLToken):
1169
1170 2013-01-22  Anthony Scian  <ascian@rim.com>
1171
1172         [Blackberry] Static code analysis warning fixes
1173         https://bugs.webkit.org/show_bug.cgi?id=107464
1174
1175         Reviewed by Rob Buis.
1176
1177         Klocwork issues: 1367, 2367
1178         - add NULL pointer checks detected by static code analysis
1179
1180         * platform/blackberry/WidgetBlackBerry.cpp:
1181         (WebCore::Widget::setCursor):
1182         * plugins/blackberry/PluginViewBlackBerry.cpp:
1183         (WebCore::PluginView::updatePluginWidget):
1184
1185 2013-01-22  Joseph Pecoraro  <pecoraro@apple.com>
1186
1187         [Mac] Enable Page Visibility (PAGE_VISIBILITY_API)
1188         https://bugs.webkit.org/show_bug.cgi?id=107230
1189
1190         Reviewed by David Kilzer.
1191
1192         No new tests. Covered by existing tests which are now unskipped.
1193
1194         * Configurations/FeatureDefines.xcconfig:
1195
1196 2013-01-22  Tony Gentilcore  <tonyg@chromium.org>
1197
1198         Make BackgroundHTMLParser track line/column numbers
1199         https://bugs.webkit.org/show_bug.cgi?id=107561
1200
1201         Reviewed by Adam Barth.
1202
1203         No new tests because covered by existing fast/parser tests.
1204
1205         * html/parser/BackgroundHTMLParser.cpp:
1206         (WebCore::BackgroundHTMLParser::pumpTokenizer):
1207         * html/parser/CompactHTMLToken.cpp:
1208         (WebCore::CompactHTMLToken::CompactHTMLToken):
1209         * html/parser/CompactHTMLToken.h:
1210         (CompactHTMLToken):
1211         (WebCore::CompactHTMLToken::textPosition):
1212         * html/parser/HTMLDocumentParser.cpp:
1213         (WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser):
1214         (WebCore::HTMLDocumentParser::lineNumber):
1215         (WebCore::HTMLDocumentParser::textPosition):
1216         * html/parser/HTMLDocumentParser.h:
1217         (HTMLDocumentParser):
1218
1219 2013-01-22  Alec Flett  <alecflett@chromium.org>
1220
1221         IndexedDB: Don't assert when deprecated setCallbacks is called
1222         https://bugs.webkit.org/show_bug.cgi?id=107580
1223
1224         Reviewed by Tony Chang.
1225
1226         Remove an assert for IDBTransactionBackendImpl that was deprecated
1227         in a previous commit, but is still called by old chromium code.
1228         After the chromium code is removed, this method will be removed
1229         entirely.
1230
1231         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1232         (WebCore::IDBTransactionBackendImpl::setCallbacks):
1233
1234 2013-01-22  Zan Dobersek  <zandobersek@gmail.com>
1235
1236         [GTK] Disable CSS Regions in release builds
1237         https://bugs.webkit.org/show_bug.cgi?id=106541
1238
1239         Reviewed by Martin Robinson.
1240
1241         The CSS Regions feature is not yet deemed stable enough to be enabled
1242         in release builds, so disable it. It's still enabled for development
1243         builds, via FeatureList.pm.
1244
1245         No new tests - no testable changes.
1246
1247         * GNUmakefile.features.am.in:
1248
1249 2013-01-22  Zan Dobersek  <zandobersek@gmail.com>
1250
1251         [GTK] Enable the <template> element support in development builds
1252         https://bugs.webkit.org/show_bug.cgi?id=106575
1253
1254         Reviewed by Martin Robinson.
1255
1256         Add a missing build target that contains the custom JS bindings.
1257
1258         No new tests - the related tests are being unskipped and mostly pass.
1259
1260         * GNUmakefile.list.am:
1261
1262 2013-01-22  Joshua Bell  <jsbell@chromium.org>
1263
1264         IndexedDB: Remove dependency on IDBKey type from IDLs
1265         https://bugs.webkit.org/show_bug.cgi?id=106912
1266
1267         Reviewed by Kentaro Hara.
1268
1269         This is a preamble to wkbug.com/97375 "Remove IDBKey from WebKitIDL"; IDBKey is
1270         not a concept from the Indexed DB spec but a convenient internal type. It was
1271         exposed in the IDL with custom binding code and special cases in the generator
1272         to map from script values to the WebCore type. To remove those special cases
1273         and match the WebIDL in the spec, the IDLs are changed to use "any" and the
1274         implementations now take ScriptValues. This does mean that each call site must
1275         call into IDBBindingUtilities to map from ScriptValue to IDBKey.
1276
1277         No new tests - just a refactor.
1278
1279         * Modules/indexeddb/IDBAny.cpp: Remove IDBKey as a variant type - just use ScriptValue.
1280         * Modules/indexeddb/IDBAny.h:
1281         (WebCore):
1282         (IDBAny):
1283         * Modules/indexeddb/IDBCursor.cpp:
1284         (WebCore::IDBCursor::continueFunction): Now takes any/ScriptValue.
1285         (WebCore):
1286         * Modules/indexeddb/IDBCursor.h:
1287         (WebCore::IDBCursor::continueFunction):
1288         (IDBCursor):
1289         * Modules/indexeddb/IDBCursor.idl:
1290         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
1291         (WebCore::IDBCursorBackendImpl::deleteFunction):
1292         * Modules/indexeddb/IDBFactory.cpp:
1293         (WebCore::IDBFactory::cmp): Now takes any/ScriptValue.
1294         * Modules/indexeddb/IDBFactory.h:
1295         (IDBFactory):
1296         * Modules/indexeddb/IDBFactory.idl:
1297         * Modules/indexeddb/IDBIndex.cpp:
1298         (WebCore::IDBIndex::openCursor): Now takes any/ScriptValue.
1299         (WebCore::IDBIndex::count): Now takes any/ScriptValue.
1300         (WebCore::IDBIndex::openKeyCursor): Now takes any/ScriptValue.
1301         (WebCore::IDBIndex::get): Now takes any/ScriptValue.
1302         (WebCore::IDBIndex::getKey): Now takes any/ScriptValue.
1303         * Modules/indexeddb/IDBIndex.h:
1304         (WebCore::IDBIndex::openCursor):
1305         (IDBIndex):
1306         (WebCore::IDBIndex::openKeyCursor):
1307         * Modules/indexeddb/IDBIndex.idl:
1308         * Modules/indexeddb/IDBKeyRange.cpp:
1309         (WebCore::IDBKeyRange::create): Add helper for back-end creation of single-key ranges.
1310         (WebCore):
1311         (WebCore::IDBKeyRange::lowerValue): Impl. of new "any" type accessor exposed to script.
1312         (WebCore::IDBKeyRange::upperValue): Ditto.
1313         (WebCore::IDBKeyRange::only): Now takes any/ScriptValue.
1314         (WebCore::IDBKeyRange::lowerBound): Now takes any/ScriptValue.
1315         (WebCore::IDBKeyRange::upperBound): Now takes any/ScriptValue.
1316         (WebCore::IDBKeyRange::bound): Now takes any/ScriptValue.
1317         * Modules/indexeddb/IDBKeyRange.h:
1318         (IDBKeyRange):
1319         (WebCore::IDBKeyRange::lowerBound):
1320         (WebCore::IDBKeyRange::upperBound):
1321         (WebCore::IDBKeyRange::bound):
1322         * Modules/indexeddb/IDBKeyRange.idl:
1323         * Modules/indexeddb/IDBObjectStore.cpp:
1324         (WebCore::IDBObjectStore::get): Now takes any/ScriptValue.
1325         (WebCore::IDBObjectStore::add): Now takes any/ScriptValue.
1326         (WebCore):
1327         (WebCore::IDBObjectStore::put): Now takes any/ScriptValue.
1328         (WebCore::IDBObjectStore::deleteFunction): Now takes any/ScriptValue.
1329         (WebCore::IDBObjectStore::openCursor): Now takes any/ScriptValue.
1330         (WebCore::IDBObjectStore::count): Now takes any/ScriptValue.
1331         * Modules/indexeddb/IDBObjectStore.h:
1332         (IDBObjectStore):
1333         (WebCore::IDBObjectStore::openCursor):
1334         * Modules/indexeddb/IDBObjectStore.idl:
1335         * Modules/indexeddb/IDBRequest.cpp: Result IDBAny type is now ScriptValue.
1336         (WebCore::IDBRequest::onSuccess):
1337         * bindings/js/IDBBindingUtilities.cpp:
1338         (WebCore::scriptValueToIDBKey): The inverse of idbKeyToScriptValue().
1339         (WebCore):
1340         * bindings/js/IDBBindingUtilities.h:
1341         (WebCore):
1342         * bindings/js/JSIDBAnyCustom.cpp:
1343         (WebCore::toJS):
1344         * bindings/v8/IDBBindingUtilities.cpp:
1345         (WebCore::scriptValueToIDBKey): Ditto.
1346         (WebCore):
1347         * bindings/v8/IDBBindingUtilities.h:
1348         (WebCore):
1349         * bindings/v8/custom/V8IDBAnyCustom.cpp:
1350         (WebCore::toV8): Remove IDBKey variant type.
1351
1352 2013-01-22  Justin Schuh  <jschuh@chromium.org>
1353
1354         TRANSFORMATION_MATRIX_USE_X86_64_SSE2 broken for 64-bit Windows builds
1355         https://bugs.webkit.org/show_bug.cgi?id=107498
1356
1357         Reviewed by James Robinson.
1358         
1359         Enable TRANSFORMATION_MATRIX_USE_X86_64_SSE2 for 64-bit Windows.
1360
1361         No new tests. Covered by existing tests.
1362
1363         * platform/graphics/transforms/TransformationMatrix.h:
1364         (WebCore):
1365         (TransformationMatrix):
1366
1367 2013-01-22  Min Qin  <qinmin@chromium.org>
1368
1369         Fix a race condition on SkBitmap::lockPixels()/unlockPixels() for lazy image decoding
1370         https://bugs.webkit.org/show_bug.cgi?id=107404
1371
1372         Reviewed by Stephen White.
1373
1374         Skbitmap::lockPixels()/unlockPixels() are not threadsafe.
1375         unlike SkPixelRef, these 2 calls are not protected by an internal mutex.
1376         Bugfix, no behaviral change and hard to test as tests will be flaky.
1377
1378         * platform/graphics/chromium/ImageDecodingStore.cpp:
1379         (WebCore::ImageDecodingStore::lockCache):
1380         (WebCore::ImageDecodingStore::unlockCache):
1381         (WebCore::ImageDecodingStore::insertAndLockCache):
1382         (WebCore::ImageDecodingStore::overwriteAndLockCache):
1383         * platform/graphics/chromium/ImageDecodingStore.h:
1384         (ImageDecodingStore):
1385
1386 2013-01-22  Eric Seidel  <eric@webkit.org>
1387
1388         Make CompactHTMLToken a little more compact
1389         https://bugs.webkit.org/show_bug.cgi?id=107317
1390
1391         Reviewed by Darin Adler.
1392
1393         Reduce the size of CompactHTMLToken by two pointers.
1394         The abuse of the attribute vector to store the DOCTYPE strings
1395         is kinda lame, but makes a lot of sense given how rare DOCTYPE tokens are.
1396
1397         The resulting CompactHTMLToken vector should be a smaller malloc and thus faster.
1398         However I saw no perf change on html-parser-srcdoc.html.
1399
1400         * html/parser/CompactHTMLToken.cpp:
1401         (SameSizeAsCompactHTMLToken):
1402         (WebCore):
1403         (WebCore::CompactHTMLToken::CompactHTMLToken):
1404         (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread):
1405         * html/parser/CompactHTMLToken.h:
1406         (WebCore::CompactHTMLToken::type):
1407         (CompactHTMLToken):
1408         (WebCore::CompactHTMLToken::publicIdentifier):
1409         (WebCore::CompactHTMLToken::systemIdentifier):
1410
1411 2013-01-22  Elliott Sprehn  <esprehn@chromium.org>
1412
1413         Assertion parent->inDocument() failed in WebCore::PseudoElement::PseudoElement
1414         https://bugs.webkit.org/show_bug.cgi?id=106224
1415
1416         Reviewed by Ojan Vafai.
1417
1418         Appending a node that contains a <style> and also elements that should have
1419         generated content can cause us to create PseudoElements in nodes that are not
1420         yet inDocument because we may recalcStyle in HTMLStyleElement::insertedInto
1421         triggering a reattach() which could then traverse into the siblings of the
1422         <style> attaching them even though they are not yet inDocument.
1423
1424         This means that we should not assert about the parent of a PseudoElement
1425         being inDocument as this is not always the case.
1426
1427         Instead forward Node::insertedInto and removedFrom notifications to
1428         PseudoElements so they will correctly get their inDocument bit set. Nothing
1429         in the code appears to depend on them being inDocument we just make sure to
1430         set it so they're consistent with the rest of the document.
1431
1432         No new tests, there's no way to test that PseudoElements are really inDocument.
1433
1434         * dom/Element.cpp:
1435         (WebCore::Element::insertedInto):
1436         (WebCore::Element::removedFrom):
1437         * dom/PseudoElement.cpp:
1438         (WebCore::PseudoElement::PseudoElement):
1439
1440 2013-01-22  Alexis Menard  <alexis@webkit.org>
1441
1442         Allow construction of unprefixed transition DOM events.
1443         https://bugs.webkit.org/show_bug.cgi?id=107319
1444
1445         Reviewed by Dean Jackson.
1446
1447         Make possible to construct unprefixed DOM events for transitions.
1448         Unfortunately I have to duplicate the C++ implementation class of the
1449         events (TransitionEvent.h and TransitionEvent.cpp). I can't find a
1450         better way to re-use the WebKitTransitionEvent class to back the
1451         TransitionEvent.idl as our code generators don't allow to have a
1452         different name for the C++ class used in the generated file than the
1453         interface name specified in the IDL file. Unfortunately
1454         https://trac.webkit.org/wiki/WebKitIDL#InterfaceName doesn't help as
1455         it's only a way to unlink the interface name specified in the IDL with
1456         the one exposed in JavaScript. I don't think we should support such a
1457         feature in our code generators as WebKitTransitionEvent class and more
1458         exactly prefixed DOM events for transitions will be removed one day so
1459         this use case will become obselete.
1460
1461         Test: fast/events/constructors/transition-event-constructor.html
1462
1463         * CMakeLists.txt:
1464         * DerivedSources.cpp:
1465         * DerivedSources.make:
1466         * DerivedSources.pri:
1467         * GNUmakefile.list.am:
1468         * Target.pri:
1469         * WebCore.gypi:
1470         * WebCore.vcproj/WebCore.vcproj:
1471         * WebCore.xcodeproj/project.pbxproj:
1472         * dom/DOMAllInOne.cpp:
1473         * dom/EventNames.in:
1474         * dom/TransitionEvent.cpp: Added.
1475         (WebCore):
1476         (WebCore::TransitionEventInit::TransitionEventInit):
1477         (WebCore::TransitionEvent::TransitionEvent):
1478         (WebCore::TransitionEvent::~TransitionEvent):
1479         (WebCore::TransitionEvent::propertyName):
1480         (WebCore::TransitionEvent::elapsedTime):
1481         (WebCore::TransitionEvent::interfaceName):
1482         * dom/TransitionEvent.h: Added.
1483         (WebCore):
1484         (TransitionEventInit):
1485         (TransitionEvent):
1486         (WebCore::TransitionEvent::create):
1487         * dom/TransitionEvent.idl: Added.
1488         * page/DOMWindow.idl:
1489         * page/animation/AnimationController.cpp:
1490         (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): always
1491         create a TransitionEvent now. EventTarget will be responsible to create
1492         a WebKitTransitionEvent if necessary.
1493
1494 2013-01-22  Adam Barth  <abarth@webkit.org>
1495
1496         Wean BackgroundHTMLParser off HTMLInputStream
1497         https://bugs.webkit.org/show_bug.cgi?id=107575
1498
1499         Reviewed by Eric Seidel.
1500
1501         The BackgroundHTMLParser doesn't need to use HTMLInputStream because it
1502         doesn't need to handle nested calls to document.write. Instead, we can
1503         just use a SegmentedString directly, which will let us checkpoint
1504         m_input for speculation.
1505
1506         * html/parser/BackgroundHTMLParser.cpp:
1507         (WebCore::BackgroundHTMLParser::append):
1508         (WebCore::BackgroundHTMLParser::finish):
1509         (WebCore::BackgroundHTMLParser::markEndOfFile):
1510         (WebCore):
1511         (WebCore::BackgroundHTMLParser::pumpTokenizer):
1512         * html/parser/BackgroundHTMLParser.h:
1513         (BackgroundHTMLParser):
1514
1515 2013-01-22  Sergio Villar Senin  <svillar@igalia.com>
1516
1517         [Soup] Random thread crashes
1518         https://bugs.webkit.org/show_bug.cgi?id=107439
1519
1520         Reviewed by Martin Robinson.
1521
1522         Process all pending requests in the inner GMainContext created to
1523         perform synchronous requests before restoring the thread default. No
1524         new tests required, already covered by network tests.
1525
1526         * platform/network/soup/ResourceHandleSoup.cpp:
1527         (WebCore::WebCoreSynchronousLoader::~WebCoreSynchronousLoader):
1528
1529 2013-01-22  Christophe Dumez  <christophe.dumez@intel.com>
1530
1531         [gstreamer] GstBus signal watch should be removed on clean up
1532         https://bugs.webkit.org/show_bug.cgi?id=107544
1533
1534         Reviewed by Philippe Normand.
1535
1536         Our gstreamer backend code currently calls gst_bus_add_signal_watch()
1537         on GstBus to add a signal watch. As per the gstreamer  documentation,
1538         "To clean up, the caller is responsible for calling
1539         gst_bus_remove_signal_watch() as many times as this function is
1540         called". This is because gst_bus_add_signal_watch() causes the GstBus
1541         object to be ref'd and gst_bus_remove_signal_watch() needs to be
1542         called to properly unref it.
1543
1544         This patch makes sure that gst_bus_remove_signal_watch() is called
1545         on the GstBus object when cleaning up. This patch also uses smart
1546         pointers for GstBus objects for consistency.
1547
1548         No new tests, no behavior change for layout tests.
1549
1550         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
1551         (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
1552         (WebCore::AudioDestinationGStreamer::~AudioDestinationGStreamer):
1553         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1554         (WebCore::AudioFileReader::~AudioFileReader):
1555         (WebCore::AudioFileReader::decodeAudioForBusCreation):
1556         * platform/graphics/gstreamer/GStreamerGWorld.cpp:
1557         (WebCore::GStreamerGWorld::GStreamerGWorld):
1558         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
1559         (webkitGstPipelineGetBus):
1560         * platform/graphics/gstreamer/GStreamerVersioning.h:
1561         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1562         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1563
1564 2013-01-22  Adam Barth  <abarth@webkit.org>
1565
1566         BackgroundHTMLParser should simulate tree building in a separate function
1567         https://bugs.webkit.org/show_bug.cgi?id=107569
1568
1569         Reviewed by Eric Seidel.
1570
1571         This patch cleans up BackgroundHTMLParser::pumpTokenizer to prepare for
1572         implementing speculative parsing.
1573
1574         * html/parser/BackgroundHTMLParser.cpp:
1575         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
1576         (WebCore):
1577         (WebCore::BackgroundHTMLParser::pumpTokenizer):
1578         * html/parser/BackgroundHTMLParser.h:
1579         (BackgroundHTMLParser):
1580         * page/Settings.in:
1581
1582 2013-01-22  Sheriff Bot  <webkit.review.bot@gmail.com>
1583
1584         Unreviewed, rolling out r140435.
1585         http://trac.webkit.org/changeset/140435
1586         https://bugs.webkit.org/show_bug.cgi?id=107565
1587
1588         Crashes on ClusterFuzz due to float not removed (Requested by
1589         inferno-sec on #webkit).
1590
1591         * rendering/RenderBox.cpp:
1592         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
1593
1594 2013-01-22  Robert Hogan  <robert@webkit.org>
1595
1596         When we do setAttribute("border", null) on a table we should create a border like every other browser
1597         https://bugs.webkit.org/show_bug.cgi?id=102112
1598
1599         Reviewed by Ryosuke Niwa.
1600
1601         http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#tables says:
1602         "If the [table's border] attribute is present but parsing the attribute's value using the rules for parsing 
1603         non-negative integers generates an error, a default value of 1px is expected to be used for that property instead."
1604
1605         Match the spec and bring us into line with other browsers by observing the 'parsing non-negative integers' algorithm.
1606
1607         Tests: fast/dom/HTMLTableElement/table-with-invalid-border.html
1608                fast/table/table-with-borderattr-null.html
1609                fast/table/table-with-borderattr-set-to-null.html
1610
1611         * html/HTMLElement.cpp:
1612         (WebCore::HTMLElement::parseBorderWidthAttribute):
1613         (WebCore::HTMLElement::applyBorderAttributeToStyle):
1614         * html/HTMLElement.h:
1615         (HTMLElement):
1616         * html/HTMLTableElement.cpp:
1617         (WebCore::HTMLTableElement::collectStyleForPresentationAttribute):
1618         (WebCore::HTMLTableElement::parseAttribute):
1619
1620 2013-01-22  Abhishek Arya  <inferno@chromium.org>
1621
1622         Heap-use-after-free in WebCore::RenderObject::isDescendantOf
1623         https://bugs.webkit.org/show_bug.cgi?id=107226
1624
1625         Reviewed by Emil A Eklund.
1626
1627         Test: fast/block/float/overhanging-float-not-removed-crash.html
1628
1629         * rendering/RenderBox.cpp:
1630         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
1631         Skip anonymous blocks in the chain to get the enclosing block and
1632         be able to correctly mark the overhanging floats in the next siblings.
1633
1634 2013-01-22  Justin Schuh  <jschuh@chromium.org>
1635
1636         Silence MSVC 64-bit build warning c4309 for FrameTree::invalidCount
1637         https://bugs.webkit.org/show_bug.cgi?id=107439
1638
1639         Reviewed by Dimitri Glazkov.
1640         
1641         MSVC detects that the constant notFound is truncated on assignment to
1642         invalidCount. Since we never compare them (as it would always fail on
1643         64-bit anyway), just initialize invalidCount directly to -1.
1644
1645         No new tests. No behavior changed.
1646
1647         * page/FrameTree.h:
1648         (FrameTree):
1649
1650 2013-01-22  Zan Dobersek  <zdobersek@igalia.com>
1651
1652         [Autotools] Remove the Canvas Path configuration option
1653         https://bugs.webkit.org/show_bug.cgi?id=107537
1654
1655         Reviewed by Martin Robinson.
1656
1657         No new tests - no new testable functionality.
1658
1659         * GNUmakefile.am: Remove the Automake conditional analysis, the related
1660         configuration option is being removed as well.
1661         * GNUmakefile.features.am.in: Add the ENABLE_CANVAS_PATH feature define,
1662         defaulting to 0 in release builds (but is disabled in development builds
1663         of the GTK port as well at the moment).
1664
1665 2013-01-18  Stephen Chenney  <schenney@chromium.org>
1666
1667         Asserts when textPath is used with no path
1668         https://bugs.webkit.org/show_bug.cgi?id=107324
1669
1670         Reviewed by Eric Seidel.
1671
1672         We assert when there is no path associated with an SVG text path
1673         element. Instead, this patch detects the condition and stops trying to
1674         layout text for that textPath  element.
1675
1676         Test: svg/text/tpath-without-path.svg
1677
1678         * rendering/svg/SVGTextLayoutEngine.cpp:
1679         (WebCore::SVGTextLayoutEngine::beginTextPathLayout):
1680         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
1681
1682 2013-01-22  Andrey Adaikin  <aandrey@chromium.org>
1683
1684         Web Inspector: [Canvas] jump to prev/next drawing call in the replay
1685         https://bugs.webkit.org/show_bug.cgi?id=107551
1686
1687         Reviewed by Pavel Feldman.
1688
1689         Implement jumping to the next(previous) drawing call in the WebGL and canvas 2D replay.
1690
1691         * English.lproj/localizedStrings.js:
1692         * inspector/InjectedScriptCanvasModuleSource.js:
1693         (.):
1694         * inspector/Inspector.json:
1695         * inspector/front-end/CanvasProfileView.js:
1696         (WebInspector.CanvasProfileView):
1697         (WebInspector.CanvasProfileView.prototype.dispose):
1698         (WebInspector.CanvasProfileView.prototype._onReplayDrawingCallClick):
1699         * inspector/front-end/canvasProfiler.css:
1700         (.canvas-replay-prev-draw img):
1701         (.canvas-replay-next-draw img):
1702
1703 2013-01-22  Andrey Lushnikov  <lushnikov@chromium.org>
1704
1705         Web Inspector: remove asynchronous behavior from DTE paintLines method
1706         https://bugs.webkit.org/show_bug.cgi?id=107550
1707
1708         Reviewed by Pavel Feldman.
1709
1710         Remove paintLinesOperationCredit and all asynchronous behaviour from paintLines method;
1711         also, remove paintLineChunks method.
1712
1713         * inspector/front-end/DefaultTextEditor.js:
1714         (WebInspector.TextEditorMainPanel.prototype.expandChunks):
1715         (WebInspector.TextEditorMainPanel.prototype._highlightDataReady):
1716         (WebInspector.TextEditorMainPanel.prototype._paintLines):
1717         (WebInspector.TextEditorMainPanel.prototype._renderRanges):
1718         (WebInspector.TextEditorMainPanel.prototype._paintLine):
1719         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
1720
1721 2013-01-22  Eugene Klyuchnikov  <eustas@chromium.org>
1722
1723         Web Inspector: [Network] "Secure" cookies can not be deleted.
1724         https://bugs.webkit.org/show_bug.cgi?id=107543
1725
1726         Reviewed by Pavel Feldman.
1727
1728         To delete secure cookie URL schema need to be "https" instead of "http".
1729
1730         * inspector/front-end/CookieItemsView.js:
1731         (WebInspector.CookieItemsView.prototype._deleteCookie):
1732         Take care of secure cookies.
1733
1734 2013-01-22  Sheriff Bot  <webkit.review.bot@gmail.com>
1735
1736         Unreviewed, rolling out r140420.
1737         http://trac.webkit.org/changeset/140420
1738         https://bugs.webkit.org/show_bug.cgi?id=107557
1739
1740         Still causes crashes (EFL this time) (Requested by kov on
1741         #webkit).
1742
1743         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
1744         * platform/graphics/gstreamer/GStreamerVersioning.h:
1745         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1746         (StreamingClient):
1747         (_WebKitWebSrcPrivate):
1748         (webKitWebSrcFinalize):
1749         (webKitWebSrcStop):
1750         (StreamingClient::didReceiveData):
1751         * platform/network/ResourceHandleClient.h:
1752         (ResourceHandleClient):
1753         * platform/network/ResourceHandleInternal.h:
1754         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1755         (ResourceHandleInternal):
1756         * platform/network/soup/ResourceHandleSoup.cpp:
1757         (WebCore::cleanupSoupRequestOperation):
1758         (WebCore::nextMultipartResponsePartCallback):
1759         (WebCore::sendRequestCallback):
1760         (WebCore::readCallback):
1761
1762 2013-01-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1763
1764         [Qt] Crash in PasteboardQt.cpp Pasteboard::writeSelection
1765         https://bugs.webkit.org/show_bug.cgi?id=102192
1766
1767         Patch by Fabien Valée
1768         Reviewed by Jocelyn Turcotte.
1769
1770         QClipboard::setMimeData transfers ownership of QMimeData to the clipboard,
1771         so we should not access it afterwards.
1772
1773         * platform/qt/PasteboardQt.cpp:
1774         (WebCore::Pasteboard::writeSelection):
1775         (WebCore::Pasteboard::writePlainText):
1776
1777 2013-01-22  Christophe Dumez  <christophe.dumez@intel.com>
1778
1779         Regression(r140414): It is causing crashes with gstreamer 0.10
1780         https://bugs.webkit.org/show_bug.cgi?id=107554
1781
1782         Reviewed by Philippe Normand.
1783
1784         gstreamer 0.10 doc led me to believe that gst_element_factory_make()
1785         was not returning a floating reference. However, based on testing
1786         (and results on Qt port) it does so we should NOT adopt the
1787         returned GstElement object.
1788
1789         No new tests, already covered by existing tests.
1790
1791         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1792
1793 2013-01-22  Andrey Lushnikov  <lushnikov@chromium.org>
1794
1795         Web Inspector: do not highlight really long lines in DTE.
1796         https://bugs.webkit.org/show_bug.cgi?id=107531
1797
1798         Reviewed by Pavel Feldman.
1799
1800         Improve TextEditorHighlighter.orderedRangesPerLine method to return
1801         only ranges that start before particular column.
1802
1803         Test: inspector/editor/text-editor-long-line.html
1804
1805         * inspector/front-end/TextEditorHighlighter.js:
1806         (WebInspector.TextEditorHighlighter):
1807         (WebInspector.TextEditorHighlighter.prototype.setHighlightLineLimit):
1808         (WebInspector.TextEditorHighlighter.prototype.orderedRangesPerLine.comparator):
1809         (WebInspector.TextEditorHighlighter.prototype.orderedRangesPerLine):
1810
1811 2013-01-22  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1812
1813         [GStreamer][Soup] Let GStreamer provide the buffer data is downloaded to, to avoid copying
1814         https://bugs.webkit.org/show_bug.cgi?id=105552
1815
1816         Reviewed by Philippe Normand.
1817
1818         Makes it possible for the GStreamer media backend to provide the buffer to which
1819         the Soup networking backend will use to download data to. This makes copying
1820         memory unnecessary when ResourceHandle hands data over to the media player's
1821         StreamingClient. Thanks to Dan Winship for help designing the interface.
1822
1823         No behaviour change, covered by existing tests.
1824
1825         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
1826         (createGstBufferForData): New helper to create a GstBuffer when
1827         we have a data pointer and a length.
1828         (getGstBufferSize): Abstract obtaining the size of the buffer, so the code
1829         is cleaner while still working for both GST 0.10 and 1.0.
1830         (setGstBufferSize): Ditto, but for setting the size.
1831         (getGstBufferDataPointer): Ditto, but for grabbing the data pointer.
1832         (mapGstBuffer): Convenience method to take care of mapping the buffer so that
1833         we can provide the data pointer to ResourceHandle.
1834         (unmapGstBuffer): Convenience method which takes care of unmapping the buffer
1835         and properly freeing the GstMapInfo.
1836         * platform/graphics/gstreamer/GStreamerVersioning.h:
1837         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1838         (StreamingClient): New methods.
1839         (_WebKitWebSrcPrivate): We now store the GstBuffer we provided the data pointer from
1840         so we can later unmap it and push it to the pipeline.
1841         (webKitWebSrcDispose): Deal with the GstBuffer in case it exists when the source is
1842         destroyed.
1843         (webKitWebSrcStop): Also clear the GstBuffer in this case.
1844         (StreamingClient::didReceiveData): Handle the hand-over of the buffer.
1845         (StreamingClient::getBuffer): Provide ResourceHandle with a new GstBuffer's data pointer.
1846         * platform/network/ResourceHandleClient.h:
1847         (ResourceHandleClient):
1848         (WebCore::ResourceHandleClient::ResourceHandleClient): Constructor to initialize the buffer
1849         member variable to 0.
1850         (WebCore::ResourceHandleClient::~ResourceHandleClient): Destructor to free the buffer if it
1851         has been allocated.
1852         (WebCore::ResourceHandleClient::getBuffer): Default implementation which returns a
1853         newly allocated char pointer.
1854         * platform/network/ResourceHandleInternal.h:
1855         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1856         (ResourceHandleInternal): Store actual buffer size, which is no longer a constant.
1857         * platform/network/soup/ResourceHandleSoup.cpp:
1858         (WebCore::cleanupSoupRequestOperation): Clear the buffer pointer, the life-cycle of the
1859         buffer is handled by the ResourceHandleClient.
1860         (WebCore::nextMultipartResponsePartCallback): Get a new buffer from the client before reading.
1861         (WebCore::sendRequestCallback): Ditto.
1862         (WebCore::readCallback): Ditto.
1863
1864 2013-01-22  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1865
1866         [EFL] Fix context menu localized string
1867         https://bugs.webkit.org/show_bug.cgi?id=107536
1868
1869         One of localized string has a marker. Since EFL port does not support them
1870         it has to be removed, so the string will be displayed properly.
1871
1872         Reviewed by Laszlo Gombos.
1873
1874         * platform/efl/LocalizedStringsEfl.cpp:
1875         (WebCore::contextMenuItemTagCheckSpellingWhileTyping)
1876
1877 2013-01-22  Sheriff Bot  <webkit.review.bot@gmail.com>
1878
1879         Unreviewed, rolling out r140412.
1880         http://trac.webkit.org/changeset/140412
1881         https://bugs.webkit.org/show_bug.cgi?id=107549
1882
1883         Broke rendering of buttons on gmail (Requested by carewolf on
1884         #webkit).
1885
1886         * platform/graphics/qt/TransparencyLayer.h:
1887         (WebCore::TransparencyLayer::TransparencyLayer):
1888
1889 2013-01-22  Christophe Dumez  <christophe.dumez@intel.com>
1890
1891         [gstreamer] MediaPlayerPrivateGStreamer should take ownership of the playbin
1892         https://bugs.webkit.org/show_bug.cgi?id=107445
1893
1894         Reviewed by Philippe Normand.
1895
1896         In gstreamer 1.0, gst_element_factory_make() now returns a floating reference.
1897         MediaPlayerPrivateGStreamer calls gst_element_factory_make() to create the
1898         playbin object but does not take ownership of the object. As a consequence,
1899         the object keeps floating until it is unref'd in the
1900         MediaPlayerPrivateGStreamer destructor.
1901
1902         This patch uses a GRefPtr<GstElement> to store the playbin object and only
1903         adopt the object returned by gst_element_factory_make() if gstreamer 0.10
1904         is used. When gstreamer 1.0 is used, the returned object will not be adopted,
1905         which will remove the floating reference. This way, we ensure that the
1906         playbin object is owned by MediaPlayerPrivateGStreamer.
1907
1908         No new tests, no behavior change for layout tests.
1909
1910         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1911         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1912         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1913         (WebCore::MediaPlayerPrivateGStreamer::load):
1914         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
1915         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
1916         (WebCore::MediaPlayerPrivateGStreamer::duration):
1917         (WebCore::MediaPlayerPrivateGStreamer::seek):
1918         (WebCore::MediaPlayerPrivateGStreamer::paused):
1919         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
1920         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
1921         (WebCore::MediaPlayerPrivateGStreamer::setVolume):
1922         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVolumeChange):
1923         (WebCore::MediaPlayerPrivateGStreamer::setRate):
1924         (WebCore::MediaPlayerPrivateGStreamer::buffered):
1925         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1926         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
1927         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1928         (MediaPlayerPrivateGStreamer):
1929
1930 2013-01-22  Yury Semikhatsky  <yurys@chromium.org>
1931
1932         Unreviewed. Fix closure compiler warning in inspector front-end after r140390.
1933
1934         * inspector/front-end/HeapSnapshotView.js:
1935
1936 2013-01-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1937
1938         [Qt] Box shadows on a transparency layer is very slow
1939         https://bugs.webkit.org/show_bug.cgi?id=107547
1940
1941         Reviewed by Noam Rosenthal.
1942
1943         Set an initial clip on the transparency layer, so that the clipping
1944         bounds will never end up larger than the layer.
1945
1946         * platform/graphics/qt/TransparencyLayer.h:
1947         (WebCore::TransparencyLayer::TransparencyLayer):
1948
1949 2013-01-22  Matt Falkenhagen  <falken@chromium.org>
1950
1951         Move top layer flag from ElementRareData to NodeFlags
1952         https://bugs.webkit.org/show_bug.cgi?id=107542
1953
1954         Reviewed by Hajime Morita.
1955
1956         This is a speculative fix for a perf regression (https://bugs.webkit.org/show_bug.cgi?id=106726)
1957         likely due to checking the top layer flag in Element::removedFrom. It
1958         also simplifies code dealing with top layer and makes it no longer
1959         necessary to allocate rare data for top layer.
1960
1961         * dom/Element.cpp:
1962         (WebCore::Element::removedFrom): Check isInTopLayer first in case it helps fix the perf regression.
1963         (WebCore):
1964         * dom/Element.h: Move top layer functions from Element to Node.
1965         * dom/ElementRareData.h:
1966         (ElementRareData):
1967         (WebCore::ElementRareData::ElementRareData): Remove top layer flag from ElementRareData.
1968         * dom/Node.cpp: Move top layer functions from Element to Node.  
1969         (WebCore):
1970         (WebCore::Node::setIsInTopLayer):
1971         * dom/Node.h:
1972         (Node):
1973         (WebCore::Node::isInTopLayer):
1974         * dom/NodeRenderingContext.cpp: Remove unnecessary casts to Element for isInTopLayer().
1975         (WebCore::isRendererReparented):
1976         (WebCore::NodeRenderingContext::previousRenderer):
1977         (WebCore::NodeRenderingContext::parentRenderer):
1978         * rendering/RenderLayer.cpp: Ditto.
1979         (WebCore::RenderLayer::isInTopLayer):
1980         (WebCore::RenderLayer::rebuildZOrderLists):
1981
1982 2013-01-22  Mark Lam  <mark.lam@apple.com>
1983
1984         Fix broken mac builds due to <http://trac.webkit.org/changeset/140399>.
1985         https://bugs.webkit.org/show_bug.cgi?id=100710.
1986
1987         Not reviewed.
1988
1989         No new tests.
1990
1991         * WebCore.xcodeproj/project.pbxproj:
1992
1993 2013-01-22  Dan Carney  <dcarney@google.com>
1994
1995         [v8] Convert string conversion calls to one byte versions
1996         https://bugs.webkit.org/show_bug.cgi?id=107524
1997
1998         Reviewed by Kentaro Hara.
1999
2000         No new tests. No change in functionality.
2001
2002         * bindings/v8/SerializedScriptValue.cpp:
2003         * bindings/v8/V8StringResource.cpp:
2004         (WebCore::WebCoreStringResourceBase::toWebCoreStringResourceBase):
2005         (StringTraits):
2006         (WebCore::true):
2007         (WebCore::v8StringToWebCoreString):
2008
2009 2013-01-22  Eugene Klyuchnikov  <eustas@chromium.org>
2010
2011         Web Inspector: [Network] CookiesTable refactoring.
2012         https://bugs.webkit.org/show_bug.cgi?id=107511
2013
2014         Reviewed by Pavel Feldman.
2015
2016         CookiesTable uses integer indexes as column identifiers.
2017         This leads to cryptic code.
2018
2019         Descriptive column identifiers will make code clearer.
2020         Also "addCookiesFolder" replaced with "setCookieFolders" to avoid
2021         repetitive "_rebuildTable" invocation.
2022
2023         * inspector/front-end/CookiesTable.js:
2024         (WebInspector.CookiesTable): Use descriptive column identifiers.
2025         (WebInspector.CookiesTable.prototype.setCookieFolders):
2026         Accept multiple folders.
2027         (WebInspector.CookiesTable.prototype._rebuildTable):
2028         Use descriptive column identifiers.
2029         (WebInspector.CookiesTable.prototype._sortCookies):
2030         Ditto.
2031         (WebInspector.CookiesTable.prototype._createGridNode):
2032         Ditto.
2033         * inspector/front-end/RequestCookiesView.js:
2034         (WebInspector.RequestCookiesView.prototype._buildCookiesTable):
2035         Use "setCookieFolders".
2036
2037 2013-01-22  Zan Dobersek  <zdobersek@igalia.com>
2038
2039         [GTK] Disable support for unprefixed CSS animations, transitions, transforms in release builds
2040         https://bugs.webkit.org/show_bug.cgi?id=107436
2041
2042         Reviewed by Alexis Menard.
2043
2044         Disable the unprefixed CSS animations, transitions and transforms support
2045         in the release builds for now. The work in this area is not yet complete
2046         and should not ship in such state.
2047
2048         No new tests - no new functionality.
2049
2050         * GNUmakefile.features.am.in:
2051
2052 2013-01-22  Alexander Pavlov  <apavlov@chromium.org>
2053
2054         Web Inspector: [REGRESSION] SASSSourceMapping broken: _bindUISourceCode method is absent
2055         https://bugs.webkit.org/show_bug.cgi?id=107529
2056
2057         Reviewed by Pavel Feldman.
2058
2059         * inspector/front-end/SASSSourceMapping.js:
2060         (WebInspector.SASSSourceMapping.prototype._fileSaveFinished):
2061
2062 2013-01-22  Adam Barth  <abarth@webkit.org>
2063
2064         AtomicMarkupTokenBase must die
2065         https://bugs.webkit.org/show_bug.cgi?id=107513
2066
2067         Reviewed by Eric Seidel.
2068
2069         Now that NEW_XML has been removed from the tree, there is no reason to
2070         have AtomicMarkupTokenBase exist as a templated base class for
2071         AtomicHTMLToken. This patch just merges the code back into
2072         AtomicHTMLToken.
2073
2074         * html/parser/HTMLToken.h:
2075         (AtomicHTMLToken):
2076         (WebCore::AtomicHTMLToken::type):
2077         (WebCore::AtomicHTMLToken::name):
2078         (WebCore::AtomicHTMLToken::setName):
2079         (WebCore::AtomicHTMLToken::selfClosing):
2080         (WebCore::AtomicHTMLToken::getAttributeItem):
2081         (WebCore::AtomicHTMLToken::attributes):
2082         (WebCore::AtomicHTMLToken::characters):
2083         (WebCore::AtomicHTMLToken::charactersLength):
2084         (WebCore::AtomicHTMLToken::isAll8BitData):
2085         (WebCore::AtomicHTMLToken::comment):
2086         (WebCore::AtomicHTMLToken::publicIdentifier):
2087         (WebCore::AtomicHTMLToken::systemIdentifier):
2088         (WebCore::AtomicHTMLToken::clearExternalCharacters):
2089         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
2090         (WebCore::AtomicMarkupTokenBase::initializeAttributes):
2091         (WebCore):
2092         * xml/parser/MarkupTokenBase.h:
2093
2094 2013-01-22  Eric Seidel  <eric@webkit.org>
2095
2096         Turn on ENABLE_THREADED_HTML_PARSER for Chromium (it's still disabled at runtime)
2097         https://bugs.webkit.org/show_bug.cgi?id=107519
2098
2099         Reviewed by Adam Barth.
2100
2101         Add some ASSERTs to be double-dog-sure that we're never using
2102         any of the threading code when threading is not enabled.
2103
2104         I also removed an if-branch in the !ENABLE_THREADED_HTML_PARSER case
2105         as it's not needed.
2106
2107         * html/parser/HTMLDocumentParser.cpp:
2108         (WebCore::HTMLDocumentParser::prepareToStopParsing):
2109         (WebCore::HTMLDocumentParser::startBackgroundParser):
2110         (WebCore::HTMLDocumentParser::stopBackgroundParser):
2111
2112 2013-01-22  Kentaro Hara  <haraken@chromium.org>
2113
2114         [V8] Make an Isolate parameter mandatory in toV8()
2115         https://bugs.webkit.org/show_bug.cgi?id=107520
2116
2117         Reviewed by Adam Barth.
2118
2119         Now it's safe to remove an optional Isolate parameter.
2120
2121         No tests. No change in behavior.
2122
2123         * bindings/scripts/CodeGeneratorV8.pm:
2124         (GenerateHeader):
2125         * bindings/scripts/test/V8/V8Float64Array.h:
2126         (WebCore::toV8):
2127         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2128         (WebCore::toV8):
2129         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2130         (WebCore::toV8):
2131         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2132         (WebCore::toV8):
2133         * bindings/scripts/test/V8/V8TestEventTarget.h:
2134         (WebCore::toV8):
2135         * bindings/scripts/test/V8/V8TestException.h:
2136         (WebCore::toV8):
2137         * bindings/scripts/test/V8/V8TestInterface.h:
2138         (WebCore::toV8):
2139         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2140         (WebCore::toV8):
2141         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2142         (WebCore::toV8):
2143         * bindings/scripts/test/V8/V8TestNode.h:
2144         (WebCore::toV8):
2145         * bindings/scripts/test/V8/V8TestObj.h:
2146         (WebCore::toV8):
2147         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
2148         (WebCore::toV8):
2149         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2150         (WebCore::toV8):
2151         * css/MediaQueryListListener.cpp:
2152         (WebCore::MediaQueryListListener::queryChanged):
2153         * testing/v8/WebCoreTestSupport.cpp:
2154         (WebCoreTestSupport::injectInternalsObject):
2155
2156 2013-01-22  Mihnea Ovidenie  <mihnea@adobe.com>
2157
2158         [CSS Regions] min-max height will not trigger a relayout when set on a region with auto-height
2159         https://bugs.webkit.org/show_bug.cgi?id=103738
2160
2161         Reviewed by David Hyatt.
2162
2163         When the style of an auto-height region changes with different min/max-height, we have to make sure
2164         that the 2-pass layout algorithm is run so that the region height is properly computed. When doing a 2-pass layout 
2165         for auto-height regions, we have to make sure that in the first pass, all auto-height regions start without a previously
2166         computed overrideLogicalContentHeight, otherwise we may end-up with incorrect results, illustrated by tests
2167         autoheight-two-pass-layout-complex-001.html and autoheight-two-pass-layout-complex-002.html.
2168
2169         If we do not have auto height regions, a single pass layout in enough to correctly flow content inside regions.
2170         When we have auto height regions, the algorithm to lay out content should be:
2171         1. If the flow thread content does not need lay out, we do a single pass layout.
2172         If during the layout, an auto-height region needs layout or a normal (not auto height) region changes its box dimensions,
2173         we need to perform a new 2-pass layout after this layout completes. If not, we bail out and skip step 2.
2174         2. Do a full two pass layout and make sure that all auto height regions start the 2-pass layout without a previously computed
2175         override logical content height.
2176
2177         Tests: fast/regions/autoheight-region-decrease-maxheight.html
2178                fast/regions/autoheight-region-decrease-minheight.html
2179                fast/regions/autoheight-region-decrease-width.html
2180                fast/regions/autoheight-region-increase-maxheight.html
2181                fast/regions/autoheight-region-increase-minheight.html
2182                fast/regions/autoheight-region-increase-width.html
2183                fast/regions/autoheight-region-new-maxheight-vrl.html
2184                fast/regions/autoheight-region-new-maxheight.html
2185                fast/regions/autoheight-region-new-minheight-vlr.html
2186                fast/regions/autoheight-region-new-minheight.html
2187                fast/regions/autoheight-region-remove-maxheight.html
2188                fast/regions/autoheight-region-remove-minheight.html
2189                fast/regions/autoheight-two-pass-layout-complex-001.html
2190                fast/regions/autoheight-two-pass-layout-complex-002.html
2191                fast/regions/region-height-auto-to-defined.html
2192                fast/regions/region-height-defined-to-auto.html
2193
2194         * rendering/FlowThreadController.cpp: Added a flag that is needed to mark whether we need a full 2-pass layout.
2195         (WebCore::FlowThreadController::FlowThreadController):
2196         * rendering/FlowThreadController.h:
2197         (WebCore::FlowThreadController::needsTwoPassLayoutForAutoHeightRegions):
2198         (WebCore::FlowThreadController::setNeedsTwoPassLayoutForAutoHeightRegions):
2199         * rendering/RenderFlowThread.cpp:
2200         (WebCore::RenderFlowThread::resetRegionsOverrideLogicalContentHeight): Use invalidateRegions because we need also to mark the flow thread as needing layout.
2201         (WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
2202         * rendering/RenderRegion.cpp:
2203         (WebCore::RenderRegion::layout): Make sure we do a 2-pass layout if needed.
2204         * rendering/RenderView.cpp:
2205         (WebCore::RenderView::layoutContentInAutoLogicalHeightRegions): Added a new function that models the layout algorithm for the case when we have auto height regions
2206         and flow threads.
2207         (WebCore::RenderView::layout):
2208         (WebCore::RenderView::checkTwoPassLayoutForAutoHeightRegions):
2209         * rendering/RenderView.h:
2210
2211 2013-01-22  Adam Barth  <abarth@webkit.org>
2212
2213         ENABLE(NEW_XML) isn't used by anyone and no one is actively working on it
2214         https://bugs.webkit.org/show_bug.cgi?id=100710
2215
2216         Reviewed by Eric Seidel.
2217
2218         As discussed on webkit-dev
2219         <http://lists.webkit.org/pipermail/webkit-dev/2012-August/022103.html>,
2220         ENABLE(NEW_XML) isn't used by anyone and no one is actively working on
2221         it. We should remove it from the code base for the time being. If folks
2222         want to work on it again, we can restore it from SVN history.
2223
2224         * GNUmakefile.list.am:
2225         * Target.pri:
2226         * WebCore.gypi:
2227         * WebCore.vcproj/WebCore.vcproj:
2228         * WebCore.xcodeproj/project.pbxproj:
2229         * dom/Document.cpp:
2230         (WebCore::Document::createParser):
2231         * dom/DocumentFragment.cpp:
2232         (WebCore::DocumentFragment::parseXML):
2233         * xml/parser/NewXMLDocumentParser.cpp: Removed.
2234         * xml/parser/NewXMLDocumentParser.h: Removed.
2235         * xml/parser/XMLCharacterReferenceParser.cpp: Removed.
2236         * xml/parser/XMLCharacterReferenceParser.h: Removed.
2237         * xml/parser/XMLToken.h: Removed.
2238         * xml/parser/XMLTokenizer.cpp: Removed.
2239         * xml/parser/XMLTokenizer.h: Removed.
2240         * xml/parser/XMLTreeBuilder.cpp: Removed.
2241         * xml/parser/XMLTreeBuilder.h: Removed.
2242
2243 2013-01-22  Kentaro Hara  <haraken@chromium.org>
2244
2245         [V8] Pass an Isolate to toV8() of event listeners
2246         https://bugs.webkit.org/show_bug.cgi?id=107517
2247
2248         Reviewed by Adam Barth.
2249
2250         By using Context::GetIsolate(), this patch passes an Isolate to toV8().
2251         I think this would be the last patch to pass an Isolate to toV8().
2252         In the next patch, I will make an Isolate parameter mandatory for toV8().
2253
2254         No tests. No change in behavior.
2255
2256         * bindings/v8/V8AbstractEventListener.cpp:
2257         (WebCore::V8AbstractEventListener::getReceiverObject):
2258         * bindings/v8/V8AbstractEventListener.h:
2259         (V8AbstractEventListener):
2260         * bindings/v8/V8EventListener.cpp:
2261         (WebCore::V8EventListener::callListenerFunction):
2262         * bindings/v8/V8LazyEventListener.cpp:
2263         (WebCore::toObjectWrapper):
2264         (WebCore::V8LazyEventListener::callListenerFunction):
2265         (WebCore::V8LazyEventListener::prepareListenerObject):
2266         * bindings/v8/V8WorkerContextEventListener.cpp:
2267         (WebCore::V8WorkerContextEventListener::getReceiverObject):
2268
2269 2013-01-22  Tim Horton  <timothy_horton@apple.com>
2270
2271         PDFPlugin: Build PDFPlugin everywhere, enable at runtime
2272         https://bugs.webkit.org/show_bug.cgi?id=107117
2273
2274         Reviewed by Alexey Proskuryakov.
2275
2276         Since PDFLayerController SPI is all forward-declared, the plugin should build
2277         on all Mac platforms, and can be enabled at runtime.
2278
2279         * Configurations/FeatureDefines.xcconfig:
2280
2281 2013-01-22  Dominic Mazzoni  <dmazzoni@google.com>
2282
2283         AX: Should assert if we try to create two AXObjects that point to the same renderer or node
2284         https://bugs.webkit.org/show_bug.cgi?id=107504
2285
2286         Reviewed by Chris Fleizach.
2287
2288         If two accessibility objects get created that point to the
2289         same widget, renderer, or node, that can lead to crashes or
2290         memory corruption later; make it assert instead of crashing.
2291
2292         * accessibility/AXObjectCache.cpp:
2293         (WebCore::AXObjectCache::getOrCreate):
2294
2295 2013-01-22  Kentaro Hara  <haraken@chromium.org>
2296
2297         [V8] Pass an Isolate to toV8()
2298         https://bugs.webkit.org/show_bug.cgi?id=107512
2299
2300         Reviewed by Adam Barth.
2301
2302         By using Context::GetIsolate(), this patch passes an Isolate to toV8().
2303
2304         No tests. No change in behavior.
2305
2306         * bindings/v8/IDBBindingUtilities.cpp:
2307         (WebCore::injectIDBKeyIntoScriptValue):
2308         (WebCore::idbKeyToScriptValue):
2309         * bindings/v8/ScriptController.cpp:
2310         (WebCore::createScriptObject):
2311         (WebCore::ScriptController::createScriptObjectForPluginElement):
2312         * bindings/v8/ScriptDebugServer.cpp:
2313         (WebCore::ScriptDebugServer::currentCallFrame):
2314         * bindings/v8/ScriptObject.cpp:
2315         (WebCore::ScriptGlobalObject::set):
2316         * bindings/v8/V8AbstractEventListener.cpp:
2317         (WebCore::V8AbstractEventListener::handleEvent):
2318         * bindings/v8/V8DOMWindowShell.cpp:
2319         (WebCore::V8DOMWindowShell::updateDocumentProperty):
2320         * bindings/v8/V8MutationCallback.cpp:
2321         (WebCore::V8MutationCallback::handleEvent):
2322         * bindings/v8/V8NodeFilterCondition.cpp:
2323         (WebCore::V8NodeFilterCondition::acceptNode):
2324         * bindings/v8/V8WorkerContextEventListener.cpp:
2325         (WebCore::V8WorkerContextEventListener::handleEvent):
2326         * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
2327         (WebCore::V8SQLStatementErrorCallback::handleEvent):
2328         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2329         (WebCore::InjectedScriptHost::nodeAsScriptValue):
2330
2331 2013-01-22  Sergey Ryazanov  <serya@chromium.org>
2332
2333         Web Inspector: Show requests in `curl` syntax in DevTools → Network → Headers
2334         https://bugs.webkit.org/show_bug.cgi?id=107276
2335
2336         Reviewed by Pavel Feldman.
2337
2338         Test: inspector/curl-command.html
2339
2340         * inspector/front-end/NetworkPanel.js:
2341         (WebInspector.NetworkLogView.prototype._generateCurlCommand):
2342
2343 2013-01-22  Yury Semikhatsky  <yurys@chromium.org>
2344
2345         Web Inspector: reuse JS heap profiler UI for native heap graph representaion
2346         https://bugs.webkit.org/show_bug.cgi?id=107452
2347
2348         Reviewed by Pavel Feldman.
2349
2350         NativeHeapSnapshot is introduced to leverage JS heap snapshot processing algorithms
2351         for native heap graph. New snapshot type ("Native Heap Snapshot") is added to the
2352         profiles panel. It will represent native heap snapshots using the same UI as we use
2353         for JS heap snapshots.
2354
2355         * WebCore.gypi:
2356         * WebCore.vcproj/WebCore.vcproj:
2357         * inspector/compile-front-end.py:
2358         * inspector/front-end/HeapSnapshot.js:
2359         (WebInspector.HeapSnapshot):
2360         (WebInspector.HeapSnapshot.prototype._init):
2361         * inspector/front-end/HeapSnapshotProxy.js:
2362         (WebInspector.HeapSnapshotWorker):
2363         * inspector/front-end/HeapSnapshotView.js:
2364         (WebInspector.HeapProfileHeader.prototype.load):
2365         (WebInspector.HeapProfileHeader.prototype.startSnapshotTransfer): extracted a few methods
2366         to support overrides for native heap snapshots.
2367         (WebInspector.HeapProfileHeader.prototype.snapshotConstructorName):
2368         (WebInspector.HeapProfileHeader.prototype._setupWorker):
2369         * inspector/front-end/NativeHeapSnapshot.js: Added.
2370         (WebInspector.NativeHeapSnapshot):
2371         (WebInspector.NativeHeapSnapshot.prototype.createNode):
2372         (WebInspector.NativeHeapSnapshot.prototype.createEdge):
2373         (WebInspector.NativeHeapSnapshot.prototype.createRetainingEdge):
2374         (WebInspector.NativeHeapSnapshot.prototype._markInvisibleEdges):
2375         (WebInspector.NativeHeapSnapshot.prototype._calculateFlags):
2376         (WebInspector.NativeHeapSnapshot.prototype.canHaveDistanceOne):
2377         (WebInspector.NativeHeapSnapshot.prototype.userObjectsMapAndFlag):
2378         (WebInspector.NativeHeapSnapshotNode):
2379         (WebInspector.NativeHeapSnapshotNode.prototype.canBeQueried):
2380         (WebInspector.NativeHeapSnapshotNode.prototype.isUserObject):
2381         (WebInspector.NativeHeapSnapshotNode.prototype.className):
2382         (WebInspector.NativeHeapSnapshotNode.prototype.classIndex):
2383         (WebInspector.NativeHeapSnapshotNode.prototype.id):
2384         (WebInspector.NativeHeapSnapshotNode.prototype.name):
2385         (WebInspector.NativeHeapSnapshotNode.prototype.isHidden):
2386         (WebInspector.NativeHeapSnapshotNode.prototype.isSynthetic):
2387         (WebInspector.NativeHeapSnapshotNode.prototype.isWindow):
2388         (WebInspector.NativeHeapSnapshotNode.prototype.isDetachedDOMTreesRoot):
2389         (WebInspector.NativeHeapSnapshotNode.prototype.isDetachedDOMTree):
2390         (WebInspector.NativeHeapSnapshotEdge):
2391         (WebInspector.NativeHeapSnapshotEdge.prototype.clone):
2392         (WebInspector.NativeHeapSnapshotEdge.prototype.hasStringName):
2393         (WebInspector.NativeHeapSnapshotEdge.prototype.isElement):
2394         (WebInspector.NativeHeapSnapshotEdge.prototype.isHidden):
2395         (WebInspector.NativeHeapSnapshotEdge.prototype.isWeak):
2396         (WebInspector.NativeHeapSnapshotEdge.prototype.isInternal):
2397         (WebInspector.NativeHeapSnapshotEdge.prototype.isInvisible):
2398         (WebInspector.NativeHeapSnapshotEdge.prototype.isShortcut):
2399         (WebInspector.NativeHeapSnapshotEdge.prototype.name):
2400         (WebInspector.NativeHeapSnapshotEdge.prototype.toString):
2401         (WebInspector.NativeHeapSnapshotEdge.prototype._nameOrIndex):
2402         (WebInspector.NativeHeapSnapshotRetainerEdge):
2403         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.clone):
2404         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.isElement):
2405         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.isHidden):
2406         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.isInternal):
2407         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.isInvisible):
2408         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.isShortcut):
2409         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.isWeak):
2410         * inspector/front-end/NativeMemorySnapshotView.js:
2411         (WebInspector.NativeSnapshotProfileType):
2412         (WebInspector.NativeSnapshotProfileType.prototype.get buttonTooltip):
2413         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
2414         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked):
2415         (WebInspector.NativeSnapshotProfileType.prototype.get treeItemTitle):
2416         (WebInspector.NativeSnapshotProfileType.prototype.get description):
2417         (WebInspector.NativeSnapshotProfileType.prototype.createTemporaryProfile):
2418         (WebInspector.NativeSnapshotProfileType.prototype.createProfile):
2419         (WebInspector.NativeSnapshotProfileHeader):
2420         (WebInspector.NativeSnapshotProfileHeader.prototype.createView):
2421         (WebInspector.NativeSnapshotProfileHeader.prototype.startSnapshotTransfer):
2422         (WebInspector.NativeSnapshotProfileHeader.prototype.snapshotConstructorName):
2423         (WebInspector.NativeSnapshotProfileHeader.prototype._takeNativeSnapshot): build a datastructure
2424         resembling one used for JS heap snapshots but populated with the data from the native snaphot.
2425         (WebInspector.NativeHeapSnapshotView):
2426         (WebInspector.NativeHeapSnapshotView.prototype.get profile):
2427         (WebInspector.NativeMemoryProfileType):
2428         (WebInspector.NativeMemoryProfileType.prototype.get buttonTooltip):
2429         * inspector/front-end/ProfilesPanel.js:
2430         (WebInspector.ProfilesPanel):
2431         * inspector/front-end/WebKit.qrc:
2432
2433 2013-01-21  Kentaro Hara  <haraken@chromium.org>
2434
2435         [V8] ScriptState::isolate() should use Context::GetIsolate()
2436         https://bugs.webkit.org/show_bug.cgi?id=107490
2437
2438         Reviewed by Adam Barth.
2439
2440         Now V8 provides Context::GetIsolate(). We should use it
2441         in ScriptState::isolate().
2442
2443         * bindings/v8/ScriptState.h:
2444         (WebCore::ScriptState::isolate):
2445         (ScriptState):
2446
2447 2013-01-21  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2448
2449         [EFL] Missing context menus strings
2450         https://bugs.webkit.org/show_bug.cgi?id=107104
2451
2452         Reviewed by Kenneth Rohde Christiansen.
2453
2454         Add 5 missing localization strings for text direction context menus.
2455
2456         * platform/efl/LocalizedStringsEfl.cpp:
2457         (WebCore::contextMenuItemTagRightToLeft):
2458         (WebCore::contextMenuItemTagLeftToRight):
2459         (WebCore::contextMenuItemTagWritingDirectionMenu):
2460         (WebCore::contextMenuItemTagTextDirectionMenu):
2461         (WebCore::contextMenuItemTagDefaultDirection):
2462
2463 2013-01-21  Kent Tamura  <tkent@chromium.org>
2464
2465         Date selection from calendar picker should dispatch 'input' event in addition to 'change' event
2466         https://bugs.webkit.org/show_bug.cgi?id=107427
2467
2468         Reviewed by Kentaro Hara.
2469
2470         According to the specification and Opera's behavior, we should dispatch
2471         not only 'change' event but also 'input' event when a user chooses a
2472         date from the calender picker.
2473
2474         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#common-event-behaviors
2475         > When the user agent changes the element's value on behalf of the user
2476         > (e.g. as part of a form prefilling feature), the user agent must follow
2477         > these steps:
2478         > 1. If the input event applies, queue a task to fire a simple event
2479         > that bubbles named input at the input element.
2480         > 2. If the change event applies, queue a task to fire a simple event
2481         > that bubbles named change at the input element.
2482
2483         Tests: platform/chromium/fast/forms/calendar-picker/date-picker-events.html
2484                platform/chromium/fast/forms/calendar-picker/datetimelocal-picker-events.html
2485
2486         * html/InputType.cpp:
2487         (WebCore::InputType::setValue): Add DispatchInputAndChangeEvent support.
2488         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
2489         (WebCore::BaseChooserOnlyDateAndTimeInputType::didChooseValue):
2490         Use DispatchInputAndChangeEvent, not DispatchChangeEvent.
2491         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2492         (WebCore::BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue):
2493         Ditto.
2494
2495 2013-01-21  Justin Schuh  <jschuh@chromium.org>
2496
2497         [CHROMIUM] Suppress c4267 build warnings for Win64 targets
2498         https://bugs.webkit.org/show_bug.cgi?id=107499
2499
2500         Reviewed by Abhishek Arya.
2501
2502         No new tests. No code changes.
2503
2504         * WebCore.gyp/WebCore.gyp:
2505
2506 2013-01-21  Andreas Kling  <akling@apple.com>
2507
2508         CSSSelector::value() should assert that m_match != Tag.
2509         <http://webkit.org/b/107500>
2510
2511         Reviewed by Anders Carlsson.
2512
2513         Add an assertion to catch anyone trying to extract a value() from a Tag selector.
2514
2515         * css/CSSSelector.h:
2516         (CSSSelector):
2517         (WebCore::CSSSelector::value):
2518
2519 2013-01-21  Dimitri Glazkov  <dglazkov@chromium.org>
2520
2521         Move HTML Attribute case-sensitivity logic out of SelectorChecker to HTMLDocument.
2522         https://bugs.webkit.org/show_bug.cgi?id=107460
2523
2524         The case-sensitivity of HTML attributes is defined in HTML spec and is only applicable in HTML documents,
2525         so having this logic in HTMLDocument seems like a good thing.
2526
2527         Reviewed by Eric Seidel.
2528
2529         Refactoring, covered by existing tests.
2530
2531         * css/SelectorChecker.cpp:
2532         (WebCore): Moved code out of here.
2533         (WebCore::isFastCheckableMatch): Changed the callsite to use new location.
2534         (WebCore::SelectorChecker::checkOne): Ditto.
2535         * html/HTMLDocument.cpp:
2536         (WebCore::addLocalNameToSet): Moved the code into here.
2537         (WebCore): Ditto.
2538         (WebCore::createHtmlCaseInsensitiveAttributesSet): Ditto.
2539         (WebCore::HTMLDocument::isCaseSensitiveAttribute): Ditto.
2540         * html/HTMLDocument.h:
2541         (HTMLDocument): Added decl for the newly moved function.
2542
2543 2013-01-21  Shinya Kawanaka  <shinyak@chromium.org>
2544
2545         FrameSelection should use shadowHost instead of shadowAncestorNode
2546         https://bugs.webkit.org/show_bug.cgi?id=107220
2547
2548         Reviewed by Kent Tamura.
2549
2550         shadowAncestorNode() is deprecated and we want to use shadowHost.
2551         Here, all objects calling shadowAncestorNode() is in ShadowDOM, we can safely convert
2552         the call to shadowHost().
2553
2554         No new tests, simple refactoring.
2555
2556         * editing/FrameSelection.cpp:
2557         (WebCore::FrameSelection::selectAll):
2558
2559 2013-01-21  Dirk Schulze  <dschulze@adobe.com>
2560
2561         Add build flag for Canvas's Path object (disabled by default)
2562         https://bugs.webkit.org/show_bug.cgi?id=107473
2563
2564         Reviewed by Dean Jackson.
2565
2566         Add CANVAS_PATH build flag to build systems.
2567
2568         * Configurations/FeatureDefines.xcconfig:
2569         * GNUmakefile.am:
2570
2571 2013-01-21  Andreas Kling  <akling@apple.com>
2572
2573         CSS: Make tag sub-selectors standalone CSSSelectors.
2574         <http://webkit.org/b/107111>
2575
2576         Reviewed by Antti Koivisto.
2577
2578         TL;DR: Instead of storing a QualifiedName with every CSSSelector, special-case tag selectors
2579                by promoting them to stand-alone CSSSelectors.
2580                33% reduction in CSS selector memory usage, 4.77 MB progression on Membuster3.
2581                Fixed some bugs in Shadow DOM that were exposed by these changes.
2582
2583         A selector like this:
2584
2585             div.tripp.trapp#trull { }
2586
2587         Would previously be represented by a chain of 3 CSSSelector objects like so:
2588
2589             [ Tag: "div",  Type: Class,  Value: "tripp" ]
2590             [ Tag:     *,  Type: Class,  Value: "trapp" ]
2591             [ Tag:     *,  Type: ID,     Value: "trull" ]
2592
2593         After this change, the memory layout becomes:
2594
2595             [ Type: Tag,    Value: "div"   ]
2596             [ Type: Class,  Value: "tripp" ]
2597             [ Type: Class,  Value: "trapp" ]
2598             [ Type: ID,     Value: "trull" ]
2599
2600         This is a huge net memory win since the majority of selectors don't even have a tag name
2601         and those that do now have a flat cost of one more CSSSelector.
2602         Traversal is also slightly cleaner since any tag name will now be in a predictable place.
2603
2604         * css/SelectorChecker.cpp:
2605         (WebCore::isFastCheckableMatch):
2606         * html/shadow/HTMLContentElement.cpp:
2607         (WebCore::validateSubSelector):
2608
2609             Renamed CSSSelector::None to CSSSelector::Tag.
2610
2611         * css/SelectorChecker.h:
2612         (WebCore::SelectorChecker::tagMatches):
2613         * css/StyleResolver.cpp:
2614         (WebCore::StyleResolver::ruleMatches):
2615
2616             Changed SelectorChecker::tagMatches() to take a QualifiedName instead of a CSSSelector.
2617
2618         * dom/QualifiedName.cpp:
2619         (WebCore::QualifiedName::deref):
2620         (WebCore::QualifiedName::QualifiedNameImpl::~QualifiedNameImpl):
2621         * dom/QualifiedName.h:
2622         (QualifiedNameImpl):
2623
2624             Give QualifiedNameImpl a destructor so it can remove itself from the global cache instead of
2625             having QualifiedName do it. This makes it possible to participate in ownership of QualifiedNames
2626             via a QualifiedNameImpl pointer, as used by the union member in CSSSelector.
2627
2628         * css/CSSGrammar.y.in:
2629         * css/CSSParser.cpp:
2630         (WebCore::CSSParser::createFloatingSelectorWithTagName):
2631         (WebCore::CSSParser::updateSpecifiersWithNamespaceIfNeeded):
2632         (WebCore::CSSParser::updateSpecifiersWithElementName):
2633         * css/CSSParser.h:
2634         * css/CSSParserValues.h:
2635         (CSSParserSelector):
2636         * css/CSSParserValues.cpp:
2637         (WebCore::CSSParserSelector::CSSParserSelector):
2638         (WebCore::CSSParserSelector::prependTagSelector):
2639
2640             Make the CSS parser slap a CSSSelector with m_match=Tag at the head of all selectors that match
2641             one or more of these criteria:
2642
2643             - The selector starts with a tag, e.g "div.foo" or just plain "span"
2644             - There is a @namespace rule in effect, and the override namespace needs to be stored with the selector.
2645               These will have CSSSelectors::m_isTagForNamespaceRule set, this is only so that selector serialization
2646               can avoid outputting a '*' tag where we previously didn't.
2647
2648         (WebCore::CSSParserSelector::isSimple):
2649
2650             Merged the CSSSelector::isSimple() logic into CSSParserSelector, since it's only needed during parsing
2651             to figure out if a selector is allowed within :not().
2652
2653         * css/CSSSelector.h:
2654         (CSSSelector):
2655         (WebCore::CSSSelector::setValue):
2656         (WebCore::CSSSelector::CSSSelector):
2657         (WebCore::CSSSelector::~CSSSelector):
2658         (WebCore::CSSSelector::tagQName):
2659         * css/CSSSelector.cpp:
2660         (WebCore::CSSSelector::createRareData):
2661         (WebCore::CSSSelector::operator==):
2662
2663             Add a QualifiedNameImpl* m_tagQName member to the CSSSelector data union. This union pointer is used
2664             if m_match == Tag. tagQName() is used to retrieve the tag (renamed from tag().) 
2665
2666         (WebCore::CSSSelector::selectorText):
2667
2668             Only serialize Tag selector components that aren't namespace placeholders. This behavior is web-facing
2669             so we make an effort to stay consistent.
2670
2671         (WebCore::CSSSelector::specificityForOneSelector):
2672         (WebCore::CSSSelector::specificityForPage):
2673         * css/CSSSelectorList.cpp:
2674         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
2675         * css/RuleSet.cpp:
2676         (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
2677         * css/SelectorFilter.cpp:
2678         (WebCore::collectDescendantSelectorIdentifierHashes):
2679         (WebCore::SelectorFilter::collectIdentifierHashes):
2680
2681             Adapt algorithms to having Tag selectors.
2682
2683         (WebCore::selectorListContainsUncommonAttributeSelector):
2684
2685             Loop through all selector components when looking for uncommon attributes.
2686
2687         (WebCore::determinePropertyWhitelistType):
2688
2689             Loop through all selector components when looking for ::cue().
2690
2691         (WebCore::RuleSet::addRule):
2692         (WebCore::RuleSet::findBestRuleSetAndAdd):
2693
2694             Break addRule into two methods to be able to peek ahead if the first selector is a Tag.
2695             Otherwise we'd end up sticking most selectors in m_tagRules, breaking the class/ID/etc optimizations.
2696
2697         * css/SelectorChecker.cpp:
2698         (WebCore::SelectorChecker::fastCheck):
2699         (WebCore::SelectorChecker::fastCheckSingleSelector):
2700
2701             It's no longer necessary to check the tagQName for every selector component, so don't.
2702             Also simplified the signature of the template argument function.
2703
2704         (WebCore::SelectorChecker::fastCheckRightmostSelector):
2705
2706             Updated for Tag selectors.
2707
2708         (WebCore::SelectorChecker::checkOne):
2709         (WebCore::SelectorChecker::matches):
2710         (WebCore::SelectorChecker::match):
2711
2712             Have match() take a SiblingTraversalStrategy so it can forward that to checkOne().
2713             This is necessary for shadow DOM code that was incorrectly calling checkOne() instead of match().
2714
2715         * css/StyleResolver.cpp:
2716         (WebCore::StyleResolver::ruleMatches):
2717
2718             The meaning of "single-part selector" changes a bit with this patch, and no longer includes "div.foo"
2719             as that is now a Tag, followed by a Class. Given that, we can't assume the tag check is unnecessary
2720             just because the rightmost descendant was found in one of the hashes.
2721
2722         (WebCore::StyleResolver::matchPageRulesForList):
2723
2724             Loop through all selector components when matching @page since pseudo types may not always be in
2725             the first subselector now.
2726
2727         * html/shadow/ContentDistributor.cpp:
2728         (WebCore::ContentDistributor::collectSelectFeatureSetFrom):
2729
2730             Collect feature information from subselectors to make sure nothing is missed. (This bug was exposed
2731             by offsetting the subselectors.)
2732
2733         * html/shadow/ContentSelectorQuery.cpp:
2734         (WebCore::ContentSelectorChecker::checkContentSelector):
2735
2736             Call SelectorChecker::match() instead of checkOne() to make subselector traversal work properly.
2737
2738 2013-01-21  Levi Weintraub  <leviw@chromium.org>
2739
2740         Event target rects on the top level document shouldn't be clipped.
2741         https://bugs.webkit.org/show_bug.cgi?id=107339
2742
2743         Reviewed by James Robinson.
2744
2745         clippedOverflowRectForRepaint clips the top-level RenderView to the viewport, which
2746         is wrong for generating event target rects, as the result will not extend to the bounds
2747         of the document on pages that scroll. Changing the top-level view to use documentRect
2748         instead.
2749
2750         Tests updated to cover bug: platform/chromium/fast/events/touch/touch-hit-rects-in-iframe.html
2751                                     platform/chromium/fast/events/touch/compositor-touch-hit-rects.html
2752
2753         * page/scrolling/ScrollingCoordinator.cpp:
2754         (WebCore::accumulateRendererTouchEventTargetRects): Use converToRootView instead of
2755         a loop around convertToContaining view. This is not a change in behavior.
2756         (WebCore::accumulateDocumentEventTargetRects): Switch to use documentRect instead of
2757         clippedOverflowRectForRepaint for the top-level Document, and use converToRootView
2758         to put rects in the coordinates of the top-level document.
2759
2760 2013-01-17  Andy Estes  <aestes@apple.com>
2761
2762         Add a USE() macro for content filtering code
2763         https://bugs.webkit.org/show_bug.cgi?id=107098
2764
2765         Reviewed by Mark Rowe.
2766
2767         * WebCore.exp.in: Use USE(CONTENT_FILTERING).
2768         * loader/MainResourceLoader.cpp:
2769         (WebCore::MainResourceLoader::MainResourceLoader): Ditto.
2770         (WebCore::MainResourceLoader::~MainResourceLoader): Ditto.
2771         (WebCore::MainResourceLoader::cancel): Ditto.
2772         (WebCore::MainResourceLoader::responseReceived): Ditto.
2773         (WebCore::MainResourceLoader::dataReceived): Ditto.
2774         (WebCore::MainResourceLoader::didFinishLoading): Ditto.
2775         (WebCore::MainResourceLoader::notifyFinished): Ditto.
2776         * loader/MainResourceLoader.h:
2777         (MainResourceLoader): Ditto.
2778         * platform/mac/WebCoreSystemInterface.h: Ditto.
2779         * platform/mac/WebCoreSystemInterface.mm: Ditto.
2780
2781 2013-01-21  Bem Jones-Bey  <bjonesbe@adobe.com>
2782
2783         [CSS Exclusions] shape-outside on floats for rectangle shapes positioning
2784         https://bugs.webkit.org/show_bug.cgi?id=100399
2785
2786         Reviewed by David Hyatt.
2787
2788         When a float has a shape-outside with non-zero x or y, the float's
2789         exclusion behavior can happen at a completely different location than
2790         where the float's content is painted. This patch brings initial
2791         support for this behavior.
2792
2793         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-positioning.html
2794
2795         * rendering/RenderBlock.cpp:
2796         (WebCore::RenderBlock::flipFloatForWritingModeForChild): If called
2797             during painting, make sure to pass that state down to the float
2798             positioning so that it can use the proper position.
2799         (WebCore::RenderBlock::paintFloats): Since this is concerned with
2800             painting, use the position of the float, not the shape.
2801         (WebCore::RenderBlock::positionNewFloats): Set the correct location
2802             for the float, relative to the location of the shape.
2803         (WebCore::RenderBlock::addOverhangingFloats): Add FIXME.
2804         * rendering/RenderBlock.h:
2805         (WebCore::RenderBlock::xPositionForFloatIncludingMargin): 
2806         (WebCore::RenderBlock::yPositionForFloatIncludingMargin): Since the 
2807             position of the shape (FloatingObject) can be different from the
2808             position of the float's box (RenderBox), the position needs to be
2809             computed differently for painting than for determining layout.
2810         (WebCore::RenderBlock::flipFloatForWritingModeForChild): Change
2811             signature to take painting flag.
2812
2813 2013-01-21  Eric Carlson  <eric.carlson@apple.com>
2814
2815         Support non-WebVTT cues from in-band text tracks
2816         https://bugs.webkit.org/show_bug.cgi?id=107046
2817
2818         Reviewed by Sam Weinig.
2819
2820         * CMakeLists.txt: Add new files.
2821         * GNUmakefile.list.am: Ditto.
2822         * Target.pri: Ditto.
2823         * WebCore.gypi: Ditto.
2824         * WebCore.vcproj/WebCore.vcproj: Ditto.
2825         * WebCore.xcodeproj/project.pbxproj: Ditto.
2826
2827         * html/shadow/MediaControlElements.cpp:
2828         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Pass video size to getDisplayTree.
2829
2830         * html/track/InbandTextTrack.cpp:
2831         (WebCore::InbandTextTrack::addGenericCue): New, create a generic cue if it doesn't already exist.
2832         (WebCore::InbandTextTrack::addWebVTTCue): Renamed from addCue.
2833         * html/track/InbandTextTrack.h:
2834
2835         * html/track/TextTrack.cpp:
2836         (WebCore::TextTrack::hasCue): Moved from InbandTextTrack.cpp, use operator == instead of inline
2837             comparison so derived TextTrackCues can be compared.
2838         * html/track/TextTrack.h:
2839
2840         * html/track/TextTrackCue.cpp:
2841         (WebCore::TextTrackCueBox::applyCSSProperties): Interface change.
2842         (WebCore::TextTrackCue::TextTrackCue): Don't create the display tree in the constructor, it may
2843             never be needed.
2844         (WebCore::TextTrackCue::createDisplayTree): New, create the display tree.
2845         (WebCore::TextTrackCue::displayTreeInternal): Display tree accessor, allows it to be created lazily.
2846         (WebCore::TextTrackCue::setAlign): Alignment -> CueAlignment.
2847         (WebCore::TextTrackCue::setIsActive): Use displayTreeInternal().
2848         (WebCore::TextTrackCue::getDisplayTree): Use displayTreeInternal(), pass video size to applyCSSProperties.
2849         (WebCore::TextTrackCue::removeDisplayTree): Use displayTreeInternal().
2850         (WebCore::TextTrackCue::operator==): New.
2851         * html/track/TextTrackCue.h:
2852         (WebCore::TextTrackCue::getAlignment): Alignment -> CueAlignment.
2853         (WebCore::TextTrackCue::operator!=): New.
2854         (WebCore::TextTrackCue::cueType): New, cue type identified needed by operator==.
2855         (WebCore::TextTrackCue::ownerDocument): New.
2856
2857         * html/track/TextTrackCueGeneric.cpp: Added.
2858         (WebCore::TextTrackCueGenericBox::create):
2859         (WebCore::TextTrackCueGenericBox::TextTrackCueGenericBox):
2860         (WebCore::TextTrackCueGenericBox::applyCSSProperties):
2861         (WebCore:::TextTrackCue):
2862         (WebCore::TextTrackCueGeneric::createDisplayTree):
2863         (WebCore::TextTrackCueGeneric::operator==):
2864         * html/track/TextTrackCueGeneric.h: Added.
2865         (WebCore::TextTrackCueGeneric::create):
2866         (WebCore::TextTrackCueGeneric::~TextTrackCueGeneric):
2867         (WebCore::TextTrackCueGeneric::baseFontSizeRelativeToVideoHeight):
2868         (WebCore::TextTrackCueGeneric::setBaseFontSizeRelativeToVideoHeight):
2869         (WebCore::TextTrackCueGeneric::fontSizeMultiplier):
2870         (WebCore::TextTrackCueGeneric::setFontSizeMultiplier):
2871         (WebCore::TextTrackCueGeneric::fontName):
2872         (WebCore::TextTrackCueGeneric::setFontName):
2873         (WebCore::TextTrackCueGeneric::operator!=):
2874         (WebCore::TextTrackCueGeneric::cueType):
2875
2876         * platform/graphics/InbandTextTrackPrivateClient.h:
2877         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2878         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Copy cue attributes into GenericCueData
2879             struct instead of trying to convert to WebVTT settings string. Process font size,font base
2880             size, font name, and vertical layout attributes,
2881         (WebCore::InbandTextTrackPrivateAVF::processCue): Create separate cues for each attributed
2882             string in the array because each one can be at a different screen location.
2883         (WebCore::InbandTextTrackPrivateAVF::resetCueValues):
2884         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
2885         (InbandTextTrackPrivateAVF):
2886
2887         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2888         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Reset any partially accumulated cues
2889             delivered since the seek was started.
2890         (WebCore::MediaPlayerPrivateAVFoundation::addGenericCue): Renamed from flushCurrentCue.
2891         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2892
2893         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2894         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Whitespace cleanup.
2895         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Ditto.
2896         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Tell legible output to deliver cues
2897             without any additional styling needed by the internal renderer.
2898         (WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks):
2899         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Do nothing if asked to change
2900             to the track that is already current.
2901         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
2902             Check to make sure that the client callback isn't NULL.
2903
2904 2013-01-21  Robert Hogan  <robert@webkit.org>
2905
2906         Misaligned logo on www.nzherald.co.nz possibly due to negative margin-top
2907         https://bugs.webkit.org/show_bug.cgi?id=14664
2908
2909         Reviewed by David Hyatt.
2910
2911         Test: fast/block/float/clear-negative-margin-top.html
2912
2913         * rendering/RenderBlock.cpp:
2914         (WebCore::RenderBlock::collapseMargins): If a negative margin pulls a block up so that floats from
2915         siblings overhang, then ensure addOverHangingFloats() uses the revised logical top position when
2916         deciding whether a float does indeed overhang into the block after margin-collapsing.
2917         (WebCore::RenderBlock::clearFloatsIfNeeded):
2918
2919 2013-01-21  Rik Cabanier  <cabanier@adobe.com>
2920
2921         Proposal: Add support for even-odd fill and clip to Canvas
2922         https://bugs.webkit.org/show_bug.cgi?id=106188
2923
2924         Reviewed by Dirk Schulze.
2925
2926         This patch adds support for an optional winding rule to fill, clip
2927         and isPointInPath in canvas 2d. By default, the fill is non-zero but
2928         you can now pass in an optional winding rule string ("nonzero" or "evenodd")
2929         to make an explicit choice.
2930
2931         Tests: fast/canvas/canvas-clip-rule.html
2932                fast/canvas/canvas-fill-rule.html
2933                fast/canvas/canvas-isPointInPath-winding.html
2934
2935         * html/canvas/CanvasRenderingContext2D.cpp: Change implementation so it sets the windig rule in the context.
2936         (WebCore::parseWinding):
2937         (WebCore):
2938         (WebCore::CanvasRenderingContext2D::fill):
2939         (WebCore::CanvasRenderingContext2D::clip):
2940         (WebCore::CanvasRenderingContext2D::isPointInPath):
2941         * html/canvas/CanvasRenderingContext2D.h: 
2942         (CanvasRenderingContext2D):
2943         * html/canvas/CanvasRenderingContext2D.idl: Change the idl so the new API is exposed to JavaScript.
2944         * platform/graphics/cg/GraphicsContextCG.cpp: Fixes a bug where the wrong winding rule was set for clipping in Core Graphics.
2945         (WebCore::GraphicsContext::clip):
2946
2947 2013-01-21  ChangSeok Oh  <shivamidow@gmail.com>
2948
2949         [GTK][AC] setOpacity doesn't work for GraphicsLayerClutter
2950         https://bugs.webkit.org/show_bug.cgi?id=105436
2951
2952         Reviewed by Gustavo Noronha Silva.
2953
2954         Implement GraphicsLayerClutter::setOpacity based on Mac's GraphicsLayer implementation.
2955
2956         No new tests since this patch can be covered by already existing gtk ac tests.
2957
2958         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2959         (WebCore::GraphicsLayerClutter::setOpacity):
2960         (WebCore):
2961         (WebCore::GraphicsLayerClutter::updateOpacityOnLayer):
2962         (WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers):
2963         * platform/graphics/clutter/GraphicsLayerClutter.h:
2964
2965 2013-01-21  ChangSeok Oh  <shivamidow@gmail.com>
2966
2967         [Texmap][GTK] The poster-circle doesn't appear.
2968         https://bugs.webkit.org/show_bug.cgi?id=106672
2969
2970         Reviewed by Noam Rosenthal.
2971
2972         We need to call setNeedsDisplay to redraw GraphicsLayer after we set drawsContent
2973         a new value for the layer. Otherwise we can't get a chance for first drawing the layer.
2974
2975         Test: compositing/visibility/visibility-composited-animation.html
2976
2977         * platform/graphics/texmap/TextureMapperLayer.cpp:
2978         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
2979
2980 2013-01-21  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
2981
2982         [EFL][Qt][WebGl] Random crash in GraphicsContext3D::drawArrays
2983         https://bugs.webkit.org/show_bug.cgi?id=107178
2984
2985         Reviewed by Noam Rosenthal.
2986
2987         Workaround for the problem in mesa when internal llvm pipe object is deleted
2988         later than the screen object. Screen object is deleted because the corresponding 
2989         X server display connection closed.
2990         Keep X server display connection open until program shutdown. 
2991         OffScreenRootWindow::display is now static, so there is no need to create
2992         OffScreenRootWindow object on client side.
2993
2994         Fixes crash that appears during run of fast/canavs/webgl tests.
2995
2996         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
2997         (OffScreenRootWindow):
2998         (WebCore::OffScreenRootWindow::DisplayConnection::DisplayConnection):
2999         (DisplayConnection):
3000         (WebCore::OffScreenRootWindow::DisplayConnection::~DisplayConnection):
3001         (WebCore::OffScreenRootWindow::DisplayConnection::display):
3002         (WebCore::OffScreenRootWindow::display):
3003         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
3004         (WebCore):
3005         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
3006         (WebCore::GraphicsSurfacePrivate::createSurface):
3007         (WebCore::GraphicsSurfacePrivate::createPixmap):
3008         (WebCore::GraphicsSurfacePrivate::makeCurrent):
3009         (WebCore::GraphicsSurfacePrivate::doneCurrent):
3010         (WebCore::GraphicsSurfacePrivate::swapBuffers):
3011         (WebCore::GraphicsSurfacePrivate::display):
3012         (WebCore::GraphicsSurfacePrivate::size):
3013         (WebCore::GraphicsSurfacePrivate::findFBConfigWithAlpha):
3014         (WebCore::GraphicsSurfacePrivate::clear):
3015         (GraphicsSurfacePrivate):
3016
3017 2013-01-21  Michael[tm] Smith  <mike@w3.org>
3018
3019         Implement the HTML <main> element.
3020         https://bugs.webkit.org/show_bug.cgi?id=103172
3021
3022         Reviewed by Chris Fleizach.
3023
3024         Authored by Steve Faulkner <faulkner.steve@gmail.com>
3025
3026         <main> should behave the same as <nav>, <section>, and <article>, and <aside>.
3027         <main> should expose AXLandmarkMain correctly on each platform.
3028
3029         Tests: fast/html/main-element.html
3030                platform/chromium/accessibility/main-element.html
3031                platform/mac/accessibility/main-element.html
3032
3033         * accessibility/AccessibilityRenderObject.cpp:
3034         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3035         * css/html.css:
3036         (article, aside, footer, header, hgroup, main, nav, section):
3037         * editing/FormatBlockCommand.cpp:
3038         (WebCore::isElementForFormatBlock):
3039         * html/HTMLTagNames.in:
3040         * html/parser/HTMLStackItem.h:
3041         (WebCore::HTMLStackItem::isSpecialNode):
3042         * html/parser/HTMLTreeBuilder.cpp:
3043         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3044         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
3045
3046 2013-01-21  Joanmarie Diggs  <jdiggs@igalia.com>
3047
3048         Crash in AccessibilityTableCell::parentTable()
3049         https://bugs.webkit.org/show_bug.cgi?id=107261
3050
3051         Reviewed by Chris Fleizach.
3052
3053         Test: accessibility/table-destroyed-crash.html
3054
3055         Getting the parent table in order to get the role value should not be
3056         done when objects are being destroyed. Also, it does not seem safe to
3057         assume we have an AXObjectCache.
3058
3059         Moving the logic from roleValue() to determineAccessibilityRole() has
3060         the side effect of not being able to verify the cell is in an AXTable
3061         when that AXTable has not yet been created. Therefore isTableCell()
3062         should look to see if it is the descendant of an AXRow.
3063
3064         * accessibility/AccessibilityTableCell.cpp:
3065         (WebCore::AccessibilityTableCell::parentTable):
3066         (WebCore::AccessibilityTableCell::isTableCell):
3067         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
3068         * accessibility/AccessibilityTableCell.h:
3069         (AccessibilityTableCell):
3070
3071 2013-01-21  Halton Huo  <halton.huo@intel.com>
3072
3073         [GTK] Volume button should not be shown for videos without audio
3074         https://bugs.webkit.org/show_bug.cgi?id=106436
3075
3076         Reviewed by Philippe Normand.
3077
3078         The volume control is no longer shown for videos with no audio.
3079
3080         No new tests, tested by media/video-no-audio.html.
3081
3082         * platform/gtk/RenderThemeGtk.cpp:
3083         (WebCore::RenderThemeGtk::hasOwnDisabledStateHandlingFor):
3084         (WebCore):
3085         * platform/gtk/RenderThemeGtk.h:
3086
3087 2013-01-21  Dan Winship  <danw@gnome.org>
3088
3089         [Soup] Work around a glib bug
3090         https://bugs.webkit.org/show_bug.cgi?id=106789
3091
3092         Reviewed by Martin Robinson.
3093
3094         In glib <= 2.35.4, g_input_stream_skip_async() applied to a
3095         libsoup response stream will do a synchronous skip() in another
3096         thread, which libsoup isn't expecting and doesn't have proper
3097         locking for. Work around this until the next time we bump the glib
3098         requirement by using read_async() (and throwing away the result)
3099         instead of skip_async().
3100
3101         No new tests; fixes a race condition in existing tests with older
3102         glib
3103
3104         * platform/network/soup/ResourceHandleSoup.cpp:
3105         (WebCore::redirectSkipCallback):
3106         (WebCore::sendRequestCallback):
3107
3108 2013-01-18  Andrey Kosyakov  <caseq@chromium.org>
3109
3110         Web Inspector: data grid resize is slow
3111         https://bugs.webkit.org/show_bug.cgi?id=107291
3112
3113         Reviewed by Pavel Feldman.
3114
3115         - avoid (most of) unnecessary relayouts and style recalculation when dragging data grid resizer.
3116
3117         * inspector/front-end/DataGrid.js:
3118         (WebInspector.DataGrid.prototype._positionResizers):
3119         (WebInspector.DataGrid.prototype._resizerDragging):
3120
3121 2013-01-21  Vladislav Kaznacheev  <kaznacheev@chromium.org>
3122
3123         [Inspector] Layout Elements panel in a single column when docked right.
3124         https://bugs.webkit.org/show_bug.cgi?id=107129
3125
3126         Reviewed by Pavel Feldman.
3127
3128         If the Inspector is docked right, the style panes in the Elements panel
3129         are put below the DOM tree pane, not to the right. This behavior
3130         is experimental (hidden behind a new flag "elementsPanelSingleColumn").
3131
3132         No new tests.
3133
3134         * inspector/front-end/DockController.js:
3135         (WebInspector.DockController.prototype.dockSide):
3136         (WebInspector.DockController.prototype._updateUI):
3137         (WebInspector.DockController.prototype._toggleDockState):
3138         * inspector/front-end/ElementsPanel.js:
3139         (WebInspector.ElementsPanel.prototype.onResize):
3140         (WebInspector.ElementsPanel.prototype._onDockStateChanged):
3141         (WebInspector.ElementsPanel.prototype._sidebarPosition):
3142         * inspector/front-end/Panel.js:
3143         (WebInspector.Panel.prototype.createSidebarView):
3144         * inspector/front-end/Settings.js:
3145         (WebInspector.ExperimentsSettings):
3146         * inspector/front-end/SidebarView.js:
3147         (WebInspector.SidebarView):
3148         (WebInspector.SidebarView.prototype.get mainElement):
3149         (WebInspector.SidebarView.prototype.get sidebarElement):
3150         (WebInspector.SidebarView.prototype._setSidebarElementStyle):
3151         (WebInspector.SidebarView.prototype.setSidebarPosition):
3152         (WebInspector.SidebarView.prototype._innerSetSidebarPosition):
3153         (WebInspector.SidebarView.prototype.setMinimumSidebarHeight):
3154         (WebInspector.SidebarView.prototype.setMinimumMainHeightPercent):
3155         (WebInspector.SidebarView.prototype.applyConstraints):
3156         (WebInspector.SidebarView.prototype.hideMainElement):
3157         (WebInspector.SidebarView.prototype.hideSidebarElement):
3158         * inspector/front-end/SplitView.js:
3159         (WebInspector.SplitView):
3160         * inspector/front-end/splitView.css:
3161         (.split-view-sidebar-top):
3162         (.split-view-sidebar-top.maximized):
3163         (.split-view-sidebar-bottom):
3164         (.split-view-sidebar-bottom.maximized):
3165
3166 2013-01-21  Yury Semikhatsky  <yurys@chromium.org>
3167
3168         Web Inspector: do not serialize native heap graph when collecting information about memory distribution
3169         https://bugs.webkit.org/show_bug.cgi?id=107450
3170
3171         Reviewed by Pavel Feldman.
3172
3173         Native heap graph is not reported when we need to show only high-level memory distribution.
3174
3175         * inspector/front-end/NativeMemorySnapshotView.js:
3176         (WebInspector.NativeMemorySnapshotView):
3177         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
3178         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
3179
3180 2013-01-21  Alexander Pavlov  <apavlov@chromium.org>
3181
3182         Web Inspector: [REGRESSION] Forced :visited pseudoclass has no effect on A elements
3183         https://bugs.webkit.org/show_bug.cgi?id=107448
3184
3185         Reviewed by Antti Koivisto.
3186
3187         * css/StyleResolver.cpp:
3188         (WebCore::StyleResolver::sortAndTransferMatchedRules): Remove totally bad code.
3189         (WebCore::StyleResolver::styleForElement):
3190           Use InsideVisitedLink if PseudoVisited has been forced by Inspector.
3191
3192 2013-01-18  Andrey Adaikin  <aandrey@chromium.org>
3193
3194         Web Inspector: modify generate_protocol_externs.py to generate JSON typedef's for @constructors
3195         https://bugs.webkit.org/show_bug.cgi?id=107287
3196
3197         Reviewed by Pavel Feldman.
3198
3199         Modify generate_protocol_externs.py to generate @typedefs instead of @constructors,
3200
3201         * inspector/InjectedScriptCanvasModuleSource.js:
3202         (.):
3203         * inspector/InjectedScriptSource.js:
3204         * inspector/compile-front-end.py:
3205         * inspector/generate_protocol_externs.py:
3206         (param_type):
3207
3208 2013-01-21  Oleg Smirnov  <oleg.smirnov@lge.com>
3209
3210         [Gtk] [Cairo] Memory leak when is WebView destroy.
3211         https://bugs.webkit.org/show_bug.cgi?id=107112
3212
3213         Reviewed by Martin Robinson.
3214
3215         Make createSurfaceForBackingStore return a smart pointer in all supported
3216         build configurations to avoid a memory leak.
3217         
3218         No new tests. There is memory leak only.
3219
3220         * platform/cairo/WidgetBackingStoreCairo.cpp:
3221         (WebCore::createSurfaceForBackingStore):
3222
3223 2013-01-21  Kent Tamura  <tkent@chromium.org>
3224
3225         INPUT_MULTIPLE_FIELDS_UI: should not dispatch 'input' events if the element value is not updated
3226         https://bugs.webkit.org/show_bug.cgi?id=107429
3227
3228         Reviewed by Kentaro Hara.
3229
3230         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#common-event-behaviors
3231         > any time the user causes the element's value to change, the user agent
3232         > must queue a task to fire a simple event that bubbles named input at the
3233         > input element.
3234
3235         Tests:
3236         fast/forms/time-multiple-fields/time-multiple-fields-keyboard-event.html
3237         is updated to cover this change.
3238
3239         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
3240         (WebCore::BaseMultipleFieldsDateAndTimeInputType::editControlValueChanged):
3241         If the new value is equivalent to the old value, don't dispatch events.
3242         However we should recalculate validity and call notifyFormStateChanged
3243         because input.validity.badInput state might be changed.
3244
3245 2013-01-21  Alexander Pavlov  <apavlov@chromium.org>
3246
3247         Web Inspector: Do not dispatch mousemove when emulating touch event and no touch is active
3248         https://bugs.webkit.org/show_bug.cgi?id=107419
3249
3250         Reviewed by Pavel Feldman.
3251
3252         mousemove event should not be dispatched when emulating touch events and mouse button is not pressed
3253
3254         * page/EventHandler.cpp:
3255         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
3256
3257 2013-01-21  Andrey Lushnikov  <lushnikov@chromium.org>
3258
3259         Web Inspector: fix highlight bug in DTE.
3260         https://bugs.webkit.org/show_bug.cgi?id=107433
3261
3262         Reviewed by Pavel Feldman.
3263
3264         Do not re-create |state.ranges| array when it already contains highlight.
3265
3266         Test: inpector/editor/highlighter-chunk-limit.txt
3267
3268         * inspector/front-end/TextEditorHighlighter.js:
3269         (WebInspector.TextEditorHighlighter.prototype._highlightLines):
3270
3271 2013-01-21  Takashi Sakamoto  <tasak@google.com>
3272
3273         [Refactoring] rename StyleRuleBlock -> StyleRuleGroup
3274         https://bugs.webkit.org/show_bug.cgi?id=107415
3275
3276         Reviewed by Antti Koivisto.
3277
3278         StyleRuleBlock should be renamed StyleRuleGroup, because
3279         CSSGroupingRule (not CSSBlockRule) is an interface for an at-rule that
3280         contains other rules nested inside itself:
3281         http://www.w3.org/TR/2012/WD-css3-conditional-20121213/#the-cssgroupingrule-interface
3282         To match the name: CSSGroupingRule, StyleRuleGroup looks better.
3283
3284         No new tests, because just refactoring.
3285
3286         * css/CSSGroupingRule.cpp:
3287         (WebCore::CSSGroupingRule::CSSGroupingRule):
3288         (WebCore::CSSGroupingRule::reattach):
3289         * css/CSSGroupingRule.h:
3290         (CSSGroupingRule):
3291         * css/StyleRule.cpp:
3292         (WebCore::StyleRuleGroup::StyleRuleGroup):
3293         (WebCore::StyleRuleGroup::wrapperInsertRule):
3294         (WebCore::StyleRuleGroup::wrapperRemoveRule):
3295         (WebCore::StyleRuleGroup::reportDescendantMemoryUsage):
3296         (WebCore::StyleRuleMedia::StyleRuleMedia):
3297         (WebCore::StyleRuleSupports::StyleRuleSupports):
3298         (WebCore::StyleRuleRegion::StyleRuleRegion):
3299         * css/StyleRule.h:
3300         (StyleRuleGroup):
3301         (WebCore::StyleRuleHost::StyleRuleHost):
3302         (WebCore::toStyleRuleMedia):
3303         (WebCore::toStyleRuleSupports):
3304         (WebCore::toStyleRuleRegion):
3305         Just replaced StyleRuleBlock with StyleRuleGroup.
3306
3307 2013-01-21  Andrey Lushnikov  <lushnikov@chromium.org>
3308
3309         Web Inspector: refactoring to use string as argument for highlightRegex API
3310         https://bugs.webkit.org/show_bug.cgi?id=107243
3311
3312         Reviewed by Pavel Feldman.
3313
3314         Use string as argument for highlightRegex API instead of using regex object.
3315
3316         No new tests: no change in behaviour.
3317
3318         * inspector/front-end/DefaultTextEditor.js:
3319         (WebInspector.TextEditorMainPanel.prototype.highlightRegex):
3320         * inspector/front-end/TextEditor.js:
3321
3322 2013-01-21  Sheriff Bot  <webkit.review.bot@gmail.com>
3323
3324         Unreviewed, rolling out r140311.
3325         http://trac.webkit.org/changeset/140311
3326         https://bugs.webkit.org/show_bug.cgi?id=107431
3327
3328         Broke selection-related tests (Requested by apavlov on
3329         #webkit).
3330
3331         * page/EventHandler.cpp:
3332         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
3333
3334 2013-01-21  Kentaro Hara  <haraken@chromium.org>
3335
3336         Unreviewed. Build fix.
3337
3338         * bindings/v8/V8NPObject.cpp:
3339         (WebCore::createV8ObjectForNPObject):
3340
3341 2013-01-20  Alexander Pavlov  <apavlov@chromium.org>
3342
3343         Web Inspector: Do not dispatch mousemove when emulating touch event and no touch is active
3344         https://bugs.webkit.org/show_bug.cgi?id=107419
3345
3346         Reviewed by Pavel Feldman.
3347
3348         mousemove event should not be dispatched when emulating touch events and mouse button is not pressed
3349
3350         * page/EventHandler.cpp:
3351         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
3352
3353 2013-01-21  Tommy Widenflycht  <tommyw@google.com>
3354
3355         MediaStream API: Update the RTCPeerConnection states to match the latest specification
3356         https://bugs.webkit.org/show_bug.cgi?id=107120
3357
3358         Reviewed by Adam Barth.
3359
3360         http://dev.w3.org/2011/webrtc/editor/webrtc.html#interface-definition
3361
3362         RTCPeerConnection::readyState and iceState are history and instead signalingState,
3363         iceConnectionState and iceGatheringState have been introduced.
3364
3365         Existing tests updated to cover this patch.
3366
3367         * Modules/mediastream/RTCPeerConnection.cpp:
3368         (WebCore::RTCPeerConnection::RTCPeerConnection):
3369         (WebCore::RTCPeerConnection::createOffer):
3370         (WebCore::RTCPeerConnection::createAnswer):
3371         (WebCore::RTCPeerConnection::setLocalDescription):
3372         (WebCore::RTCPeerConnection::localDescription):
3373         (WebCore::RTCPeerConnection::setRemoteDescription):
3374         (WebCore::RTCPeerConnection::remoteDescription):
3375         (WebCore::RTCPeerConnection::updateIce):
3376         (WebCore::RTCPeerConnection::addIceCandidate):
3377         (WebCore::RTCPeerConnection::readyState):
3378         (WebCore):
3379         (WebCore::RTCPeerConnection::signalingState):
3380         (WebCore::RTCPeerConnection::iceConnectionState):
3381         (WebCore::RTCPeerConnection::addStream):
3382         (WebCore::RTCPeerConnection::removeStream):
3383         (WebCore::RTCPeerConnection::createDataChannel):
3384         (WebCore::RTCPeerConnection::close):
3385         (WebCore::RTCPeerConnection::didChangeSignalingState):
3386         (WebCore::RTCPeerConnection::didChangeIceGatheringState):
3387         (WebCore::RTCPeerConnection::didChangeIceConnectionState):
3388         (WebCore::RTCPeerConnection::didAddRemoteStream):
3389         (WebCore::RTCPeerConnection::didRemoveRemoteStream):
3390         (WebCore::RTCPeerConnection::didAddRemoteDataChannel):
3391         (WebCore::RTCPeerConnection::stop):
3392         (WebCore::RTCPeerConnection::changeSignalingState):
3393         (WebCore::RTCPeerConnection::changeIceGatheringState):
3394         (WebCore::RTCPeerConnection::changeIceConnectionState):
3395         * Modules/mediastream/RTCPeerConnection.h:
3396         (RTCPeerConnection):
3397         * Modules/mediastream/RTCPeerConnection.idl:
3398         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
3399         (RTCPeerConnectionHandlerClient):
3400         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
3401         (WebCore::RTCPeerConnectionHandlerChromium::didChangeSignalingState):
3402         (WebCore::RTCPeerConnectionHandlerChromium::didChangeICEConnectionState):
3403         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
3404         (RTCPeerConnectionHandlerChromium):
3405
3406 2013-01-21  Kent Tamura  <tkent@chromium.org>
3407
3408         Use ISO8601 date/time formats as fallbacks for date/time input types
3409         https://bugs.webkit.org/show_bug.cgi?id=107418
3410
3411         Reviewed by Kentaro Hara.
3412
3413         We obtain date/time formats from OSes to build date/time input type
3414         UIs. If something wrong happens in the code, fallback formats are
3415         used. Such fallback formats should not be English formats in order that
3416         we can find defects easily.
3417
3418         No new tests. These formats should not be used unless the current code
3419         has defects.
3420
3421         * html/DateTimeInputType.cpp:
3422         (WebCore::DateTimeInputType::setupLayoutParameters):
3423         Use an ISO8601 format which is same as a format used in HTML5.
3424         * html/DateTimeLocalInputType.cpp:
3425         (WebCore::DateTimeLocalInputType::setupLayoutParameters): Ditto.
3426         * html/MonthInputType.cpp:
3427         (WebCore::MonthInputType::setupLayoutParameters): Ditto.
3428         * html/WeekInputType.cpp:
3429         (WebCore::WeekInputType::setupLayoutParameters): Ditto.
3430         * platform/text/LocaleICU.cpp:
3431         (WebCore::LocaleICU::dateFormat): Ditto.
3432         * platform/text/LocaleNone.cpp:
3433         (WebCore::LocaleNone::dateFormat): Ditto.
3434         (WebCore::LocaleNone::dateTimeFormatWithSeconds): Ditto.
3435         (WebCore::LocaleNone::dateTimeFormatWithoutSeconds): Ditto.
3436
3437 2013-01-20  Matt Falkenhagen  <falken@chromium.org>
3438
3439         Elements must be reattached when inserted/removed from top layer
3440         https://bugs.webkit.org/show_bug.cgi?id=105489
3441
3442         Relanding r139402 as rollout due to suspected perf regression did not help (bug 106726).
3443
3444         Reviewed by Julien Chaffraix.
3445
3446         Ensure a reattach occurs when an element is inserted/removed from top layer, so its renderer can be inserted correctly:
3447         as a child of RenderView in top layer sibling order if it's in the top layer, and in the usual place otherwise.
3448
3449         We previously relied on style recalc to catch when an element is inserted/removed from the top layer, because it
3450         only happens on dialog.show/close which toggle display: none. But that is incorrect because, for example, close()
3451         followed immediately by show() results in no style change.
3452
3453         Tests: fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer.html
3454                fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd.html
3455
3456         * dom/Element.cpp:
3457         (WebCore::Element::removedFrom): Call Document::removeFromTopLayer to let the element be removed from the top layer vector.
3458         removeFromTopLayer calls Element::setIsInTopLayer(false) itself if needed.
3459         (WebCore::Element::setIsInTopLayer): Ensure a reattach occurs if the element is already attached.
3460
3461 2013-01-20  Yury Semikhatsky  <yurys@chromium.org>
3462
3463         Web Inspector: change HeapSnapshotLoader to allow loading native heap snapshots
3464         https://bugs.webkit.org/show_bug.cgi?id=107282
3465
3466         Reviewed by Pavel Feldman.