GTK+ and Qt build fix after r139833.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-01-15  Ryosuke Niwa  <rniwa@webkit.org>
2
3         GTK+ and Qt build fix after r139833.
4         Explicitly cast NodeRareDataBase to NodeRareData before deleting it.
5
6         * dom/Node.cpp:
7         (WebCore::Node::clearRareData):
8
9 2013-01-15  Qiankun Miao  <qiankun.miao@intel.com>
10
11         Remove extra space in CustomFilterRenderer.h
12         https://bugs.webkit.org/show_bug.cgi?id=105783
13
14         Reviewed by Dean Jackson.
15
16         * platform/graphics/filters/CustomFilterRenderer.h:
17         (CustomFilterRenderer):
18
19 2013-01-15  Tab Atkins  <tabatkins@google.com>
20
21         Update CSS3 gradient support to the latest spec version and unprefix.
22         https://bugs.webkit.org/show_bug.cgi?id=67166
23
24         Reviewed by Dean Jackson.
25
26         Tests: fast/gradients/unprefixed-color-stop-units.html
27                fast/gradients/unprefixed-color-stops.html
28                fast/gradients/unprefixed-generated-gradients.html
29                fast/gradients/unprefixed-gradient-parsing.html
30                fast/gradients/unprefixed-linear-angle-gradients.html
31                fast/gradients/unprefixed-linear-right-angle-gradients.html
32                fast/gradients/unprefixed-list-item-gradient.html
33                fast/gradients/unprefixed-radial-gradients.html
34                fast/gradients/unprefixed-radial-gradients2.html
35                fast/gradients/unprefixed-radial-gradients3.html
36                fast/gradients/unprefixed-repeating-end-fill.html
37                fast/gradients/unprefixed-repeating-linear-gradient.html
38                fast/gradients/unprefixed-repeating-radial-gradients.html
39                fast/gradients/unprefixed-zero-range-repeating-gradient-hang.html
40
41         * css/CSSGradientValue.cpp:
42         (WebCore::CSSGradientValue::computeEndPoint): Rename parameters to make more sense.
43         (WebCore::CSSLinearGradientValue::customCssText):
44         (WebCore::CSSLinearGradientValue::createGradient):
45         (WebCore::CSSRadialGradientValue::customCssText):
46         (WebCore::CSSRadialGradientValue::createGradient):
47         * css/CSSGradientValue.h:
48         (CSSGradientValue):
49         (CSSRadialGradientValue):
50         * css/CSSParser.cpp:
51         (WebCore::CSSParser::parseLinearGradient):
52         (WebCore::CSSParser::parseRadialGradient):
53         (WebCore::CSSParser::isGeneratedImageValue):
54         (WebCore::CSSParser::parseGeneratedImage):
55         * css/CSSParser.h:
56
57 2013-01-15  Ryosuke Niwa  <rniwa@webkit.org>
58
59         NodeRareData doesn't need to have a vtable pointer
60         https://bugs.webkit.org/show_bug.cgi?id=106965
61
62         Reviewed by Benjamin Poulain.
63
64         Made the destructor and reportMemoryUsage of NodeRareDataBase and NodeRareData
65         respectively and their subclasses non-virtual.
66
67         * dom/ElementRareData.cpp:
68         (SameSizeAsElementRareData): Added.
69         (WebCore): Added a compile assertion for the size of ElementRareData.
70         * dom/ElementRareData.h:
71         (ElementRareData):
72         * dom/Node.cpp:
73         (WebCore::Node::clearRareData): Explicitely delete NodeRareData or ElementRareData.
74         (WebCore::Node::reportMemoryUsage): Explicitely add NodeRareData or ElementRareData.
75         * dom/Node.h:
76         (NodeRareDataBase): Deleted the virtual destructor.
77         * dom/NodeRareData.cpp:
78         (SameSizeAsNodeRareData): Removed one pointer.
79         * dom/NodeRareData.h:
80         (NodeRareData): Removed the virtual destructor.
81         (NodeRareData::reportMemoryUsage): Made non-virtual.
82
83 2013-01-15  Ian Vollick  <vollick@chromium.org>
84
85         [chromium] Create GraphicsLayerChromiums using a factory
86         https://bugs.webkit.org/show_bug.cgi?id=103635
87
88         Reviewed by James Robinson.
89
90         Refactor graphics layer creation for chromium to go through a factory.
91
92         No new tests, no change in functionality.
93
94         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
95         (WebCore::GraphicsLayer::create):
96
97 2013-01-15  Charles Wei  <charles.wei@torchmobile.com.cn>
98
99         [BlackBerry]  LayerRenderingResults doesn't need to maintain the hole punch rect
100         https://bugs.webkit.org/show_bug.cgi?id=106896
101
102         Reviewed by George Staikos.
103         Internally reviewed by Arvid Nilsson and John Griggs.
104
105         No new tests,clean up code which is not used anymore.
106
107         * platform/graphics/blackberry/LayerRenderer.cpp:
108         (WebCore::LayerRenderer::drawHolePunchRect):
109         * platform/graphics/blackberry/LayerRenderer.h:
110         (LayerRenderingResults):
111
112 2013-01-15  Charles Wei  <charles.wei@torchmobile.com.cn>
113
114         Fullscreen element should not share styles with it's siblings.
115         https://bugs.webkit.org/show_bug.cgi?id=106888
116
117         Reviewed by George Staikos.
118
119         Test: fullscreen/full-screen-no-style-sharing.html
120
121         * css/StyleResolver.cpp:
122         (WebCore::StyleResolver::canShareStyleWithElement):
123
124 2013-01-15  Tim Horton  <timothy_horton@apple.com>
125
126         Clamp TileCache visibleRect to WKView's visibleRect
127         https://bugs.webkit.org/show_bug.cgi?id=106601
128         <rdar://problem/12843164>
129
130         Reviewed by Simon Fraser.
131
132         * platform/graphics/TiledBacking.h:
133         (TiledBacking): Add setExposedRect and setClipsToExposedRect.
134         * platform/graphics/ca/mac/TileCache.h:
135         (TileCache): Add setExposedRect, setClipsToExposedRect, and storage for their respective values.
136         * platform/graphics/ca/mac/TileCache.mm:
137         (WebCore::TileCache::TileCache): Initialize m_clipsToExposedRect to false.
138         (WebCore::TileCache::setExposedRect): Update exposedRect and revalidate tiles.
139         (WebCore::TileCache::setClipsToExposedRect): Update clipsToExposedRect and revalidate tiles;
140         if we're going from unclipped to clipped, we already have tiles, so we can skip tile revalidation.
141         (WebCore::TileCache::computeTileCoverageRect): Intersect exisiting visible rect with
142         exposed rect to get the visible rect we actually care about.
143         (WebCore::TileCache::revalidateTiles): Ditto.
144         * rendering/RenderLayerCompositor.cpp:
145         (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer): Don't create an overhang layer if the frame isn't scrollable.
146         (WebCore::RenderLayerCompositor::requiresContentShadowLayer): Don't create a shadow layer if the frame isn't scrollable.
147
148 2013-01-15  Roger Fong  <roger_fong@apple.com>
149
150         Get rid of a straggling dependency on SafariThemeConstants in RenderThemeWin.
151
152         Rubberstamped by Timothy Horton.
153
154         * rendering/RenderThemeWin.cpp:
155         (WebCore::RenderThemeWin::supportsClosedCaptioning):
156         * rendering/RenderThemeWin.h:
157
158 2013-01-15  Hayato Ito  <hayato@chromium.org>
159
160         Group all request parameters which are used to match CSS Rules into a parameter object.
161         https://bugs.webkit.org/show_bug.cgi?id=106879
162
163         Reviewed by Dimitri Glazkov.
164
165         Introduces a MatchRequest which groups all request parameters to match CSS rules.
166
167         Factoring, no change in behavior.
168
169         * css/StyleResolver.cpp:
170         (WebCore::StyleResolver::collectMatchingRules):
171         (WebCore::StyleResolver::collectMatchingRulesForRegion):
172         (WebCore::StyleResolver::matchScopedAuthorRules):
173         (WebCore::StyleResolver::matchHostRules):
174         (WebCore::StyleResolver::matchAuthorRules):
175         (WebCore::StyleResolver::matchUserRules):
176         (WebCore::StyleResolver::matchUARules):
177         (WebCore::StyleResolver::collectMatchingRulesForList):
178         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
179         * css/StyleResolver.h:
180         (WebCore::StyleResolver::MatchRequest::MatchRequest):
181         (MatchRequest):
182         (StyleResolver):
183
184 2013-01-15  Simon Fraser  <simon.fraser@apple.com>
185
186         Add the ability for a RenderLayerBacking to have a layer that renders backgrounds.
187         https://bugs.webkit.org/show_bug.cgi?id=106961
188
189         Reviewed by Dean Jackson.
190
191         In some cases we need a compositing layer to render its background into
192         a separate GraphicsLayer (e.g. for background-attachment: fixed in some scenarios).
193         
194         To support this, have RenderLayer optionally create a GraphicsLayer for the background.
195         Currently nothing causes background layers to get created.
196         
197         Having a background layer requires that we add an additional containment layer
198         which encloses the background, primary and foreground layers, since the 
199         background layer has to be composited behind the primary content. This containment
200         layer gets any transform, including page scale on the RenderView's layer.
201         
202         No new tests; there's no way to create a background layer yet. This was tested during
203         development by forcing a background layer.
204
205         * rendering/RenderLayerBacking.cpp:
206         (WebCore::RenderLayerBacking::updateDebugIndicators): Show borders on both new layers
207         and repaint counters on the background layer.
208         (WebCore::RenderLayerBacking::destroyGraphicsLayers): Clear the two new layers.
209         (WebCore::RenderLayerBacking::updateTransform): If we have a containment layer, it
210         takes the transform (and clear the transform on the primary layer).
211         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Make the background
212         layer if we need one (currently never).
213         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Position and size
214         the containment layer if we have one. If we do, then the m_graphicsLayer will
215         be at 0,0 in that containment layer. The background layer is also sized similarly
216         to the foreground layer.
217         (WebCore::RenderLayerBacking::updateInternalHierarchy): Adapt to the new hierarchy
218         with containment and background layers if we have them.
219         (WebCore::RenderLayerBacking::updateBackgroundLayer): Here's where we create the background
220         and containment layers.
221         (WebCore::RenderLayerBacking::childForSuperlayers): If we have a containment layer, that's
222         what gets attached to our parent.
223         (WebCore::RenderLayerBacking::getCurrentTransform): The containment layer gets the transform
224         if we have one, so check that here.
225         (WebCore::RenderLayerBacking::backingStoreMemoryEstimate):
226         (WebCore::RenderLayerBacking::reportMemoryUsage):
227         * rendering/RenderLayerBacking.h:
228         (RenderLayerBacking):
229         * rendering/RenderLayerCompositor.cpp:
230         (WebCore::RenderLayerCompositor::deviceOrPageScaleFactorChanged): We need to start notifying
231         about page/device scale on the containment layer if there is one (since it takes page scale), so
232         use childForSuperlayers() rather than just getting the primary layer.
233
234 2013-01-15  Pan Deng  <pan.deng@intel.com>
235
236         Remove Key3 and Challenge Response fields from Websocket implementation and Web Inspector.
237         https://bugs.webkit.org/show_bug.cgi?id=105738.
238
239         Reviewed by Kent Tamura.
240
241         Key3 and Challenge Response fields were obsoleted in IETF websocket spec, this patch removes related
242         code in Websocket and Web Inspector
243
244         No new tests as no new functionality added.
245
246         * Modules/websockets/WebSocketHandshakeRequest.cpp: remove Key3 related code
247         * Modules/websockets/WebSocketHandshakeRequest.h: 
248         (WebSocketHandshakeRequest):
249         * Modules/websockets/WebSocketHandshakeResponse.cpp: remove Challenge response related code
250         * Modules/websockets/WebSocketHandshakeResponse.h: 
251         (WebSocketHandshakeResponse):
252         * inspector/Inspector.json: remove Key3 and Challenge response fields definition
253         * inspector/InspectorResourceAgent.cpp: remove Key3 and Challenge response field from inspector agent
254         (WebCore):
255         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
256         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
257         * inspector/front-end/NetworkManager.js: 
258         (WebInspector.NetworkDispatcher.prototype.webSocketWillSendHandshakeRequest): 
259         (WebInspector.NetworkDispatcher.prototype.webSocketHandshakeResponseReceived): 
260         * inspector/front-end/RequestHeadersView.js: remove Key3 and Challenge response item from front-end.
261         (WebInspector.RequestHeadersView.prototype._refreshRequestHeaders):
262         (WebInspector.RequestHeadersView.prototype._refreshResponseHeaders):
263         (WebInspector.RequestHeadersView.prototype._refreshHeaders):
264
265 2013-01-15  Antti Koivisto  <antti@apple.com>
266
267         ASSERT(!m_queue.killed() && m_threadID) hit in StorageThread::scheduleTask on low memory warning
268         https://bugs.webkit.org/show_bug.cgi?id=106960
269
270         Reviewed by Mark Rowe.
271
272         We were scheduling a memory clearing task to terminated StorageThreads.
273         
274         Remove thread from the active thread list when terminate is scheduled. Add when thread is started.
275
276         * storage/StorageThread.cpp:
277         (WebCore::activeStorageThreads):
278         (WebCore::StorageThread::StorageThread):
279         (WebCore::StorageThread::~StorageThread):
280         (WebCore::StorageThread::start):
281         (WebCore::StorageThread::terminate):
282         (WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThreads):
283
284 2013-01-15  Luke Macpherson   <macpherson@chromium.org>
285
286         Don't do indiscriminate cast & call in StylePropertySet::PropertyReference::cssName() on release builds.
287         https://bugs.webkit.org/show_bug.cgi?id=106867
288
289         Reviewed by Darin Adler.
290
291         Check CSSValue::isVariableValue() before casting to CSSVariableValue.
292
293         Covered by existing variables tests.
294
295         * css/StylePropertySet.cpp:
296         (WebCore::StylePropertySet::PropertyReference::cssName):
297
298 2013-01-15  Emil A Eklund  <eae@chromium.org>
299
300         [Sub pixel layout] RTL cells with padding wraps
301         https://bugs.webkit.org/show_bug.cgi?id=106843
302
303         Reviewed by Levi Weintraub.
304         
305         At certain zoom levels table cells with padding wraps for rtl
306         content.
307
308         Test: fast/sub-pixel/table-rtl-padding.html
309
310         * rendering/RenderTable.h: Override paddingStart/End to return
311         integer values for padding as we do elsewhere in the table code.
312
313 2013-01-15  Dominic Mazzoni  <dmazzoni@google.com>
314
315         Use-after-free in AXObjectCache::notificationPostTimerFired
316         https://bugs.webkit.org/show_bug.cgi?id=106106
317
318         Reviewed by Ryosuke Niwa.
319
320         Fixes a crash that occurs when a Node is adopted by another document,
321         in particular one that isn't part of the page, and then deleted,
322         which wasn't triggering the code that removed the Node from
323         AXObjectCache. Now, a Node is removed from the AXObjectCache whenever
324         its Document changes.
325
326         Test: accessibility/crash-adopt-node-from-new-document.html
327
328         * dom/Node.cpp:
329         (WebCore::Node::didMoveToNewDocument):
330
331 2013-01-15  Arnaud Renevier  <a.renevier@sisa.samsung.com>
332
333         Add Canvas blend modes to Cairo
334         https://bugs.webkit.org/show_bug.cgi?id=105074
335
336         Reviewed by Martin Robinson.
337
338         Blend mode implementation for cairo. If BlendMode is normal, use
339         CompositeOperator; otherwise, consider CompositeOperator is
340         source-over.
341
342         Add toCairoOperator(BlendMode) to translate BlendMode to matching
343         cairo_operator_t. 
344
345         * platform/graphics/cairo/BitmapImageCairo.cpp:
346         (WebCore::BitmapImage::draw):
347         * platform/graphics/cairo/CairoUtilities.cpp:
348         (WebCore::toCairoOperator):
349         * platform/graphics/cairo/CairoUtilities.h:
350         (WebCore):
351         * platform/graphics/cairo/GraphicsContextCairo.cpp:
352         (WebCore::GraphicsContext::setPlatformCompositeOperation):
353
354 2013-01-15  Dima Gorbik  <dgorbik@apple.com>
355         Implement matching by the voice attribute for WebVTT ::cue pseudo element
356         https://bugs.webkit.org/show_bug.cgi?id=106762
357
358         Reviewed by Eric Carlson.
359
360         Implemented matching cue WebVTT elements by a voice attribute by adding a WebVTT specific voice attribute.
361         For DOM trees title attribute is used instead as this is required by specs.
362
363         * html/track/TextTrackCue.cpp:
364         (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree): set a title argument instead of a voice attribute for the DOM tree.
365         * html/track/TextTrackCue.h:
366         (WebCore::TextTrackCue::voiceAttributeName):
367         * html/track/WebVTTParser.cpp:
368         (WebCore::WebVTTParser::constructTreeFromToken):
369
370 2013-01-15  Simon Fraser  <simon.fraser@apple.com>
371
372         Some ScrollingCoördinator-related cleanup in RenderLayerBacking
373         https://bugs.webkit.org/show_bug.cgi?id=106950
374
375         Reviewed by Beth Dakin.
376         
377         Wrap up code that gets the ScrollingCoordinator into a utility function.
378         Pull code out of updateGraphicsLayerGeometry() that registers layers with
379         the ScrollingCoordinator, for cleanliness.
380
381         * rendering/RenderLayerBacking.cpp:
382         (WebCore::scrollingCoordinatorFromLayer):
383         (WebCore::RenderLayerBacking::adjustTileCacheCoverage):
384         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
385         (WebCore::RenderLayerBacking::registerScrollingLayers):
386         (WebCore::RenderLayerBacking::attachToScrollingCoordinatorWithParent):
387         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
388         * rendering/RenderLayerBacking.h:
389         (RenderLayerBacking):
390
391 2013-01-15  Beth Dakin  <bdakin@apple.com>
392
393         https://bugs.webkit.org/show_bug.cgi?id=106940
394         Suspend CSS animations for background tabs
395
396         Reviewed by Simon Fraser.
397
398         * page/Page.cpp:
399         (WebCore::Page::setVisibilityState):
400
401 2013-01-15  Levi Weintraub  <leviw@chromium.org>
402
403         Unreviewed, rolling out r139790.
404         http://trac.webkit.org/changeset/139790
405         https://bugs.webkit.org/show_bug.cgi?id=106948
406
407         The patch is failing its own test.
408
409         * dom/ContainerNode.cpp:
410         (WebCore::ContainerNode::parserInsertBefore):
411         (WebCore::ContainerNode::parserRemoveChild):
412         (WebCore::ContainerNode::parserAppendChild):
413         * html/parser/HTMLScriptRunner.cpp:
414         (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
415         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
416         (WebCore::HTMLScriptRunner::execute):
417         (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
418         (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets):
419         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
420         (WebCore::HTMLScriptRunner::runScript):
421
422 2013-01-15  Emil A Eklund  <eae@chromium.org>
423
424         REGRESSION (r121599): incorrect border scaling when zoomed
425         https://bugs.webkit.org/show_bug.cgi?id=106944
426
427         Reviewed by Levi Weintraub.
428         
429         Fix bug in ApplyPropertyComputeLength::applyValue where zooming
430         of non-pixel values was incorrect.
431
432         Test: fast/sub-pixel/zoomed-em-border.html
433
434         * css/StyleBuilder.cpp:
435         (WebCore::ApplyPropertyComputeLength::applyValue):
436
437 2013-01-15  Simon Fraser  <simon.fraser@apple.com>
438
439         Rename RenderLayerBacking's m_containmentLayer to m_childContainmentLayer to better describe its purpose
440         https://bugs.webkit.org/show_bug.cgi?id=106947
441
442         Reviewed by Dean Jackson.
443         
444         Simple rename of m_containmentLayer to m_childContainmentLayer. I'll
445         be adding another "container" layer for background layers shortly,
446         and wanted to improve clarity.
447
448         * rendering/RenderLayerBacking.cpp:
449         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
450         (WebCore::RenderLayerBacking::destroyGraphicsLayers):
451         (WebCore::RenderLayerBacking::updateInternalHierarchy):
452         (WebCore::RenderLayerBacking::updateClippingLayers):
453         (WebCore::RenderLayerBacking::parentForSublayers):
454         (WebCore::RenderLayerBacking::backingStoreMemoryEstimate):
455         (WebCore::RenderLayerBacking::reportMemoryUsage):
456         * rendering/RenderLayerBacking.h:
457         (WebCore::RenderLayerBacking::hasClippingLayer):
458         (WebCore::RenderLayerBacking::clippingLayer):
459         (WebCore::RenderLayerBacking::hasTileCacheFlatteningLayer):
460         (WebCore::RenderLayerBacking::tileCacheFlatteningLayer):
461         (RenderLayerBacking):
462
463 2013-01-15  Enrica Casucci  <enrica@apple.com>
464
465         Add a new set of WebKit2 APIs for text search and
466         search results management.
467         https://bugs.webkit.org/show_bug.cgi?id=106834.
468         <rdar://problem/12597159>
469
470         Reviewed by Simon Fraser.
471         
472         Adding new API to perform text search in WebKit2 without using
473         the stock UI. The new interface provides all the information
474         necessary to write a custom UI for search.
475
476         Added new TextWebKitAPI test.
477
478         * WebCore.exp.in: Added new exported methods.
479         * editing/Editor.cpp:
480         (WebCore::Editor::countMatchesForText): Added new parameter to store
481         all the ranges relative to the matches found.
482         * editing/Editor.h: Modified the interface of countMatchesForText and removed
483         the other definition of countMatchesForText with a different signature.
484         * page/Page.cpp:
485         (WebCore::Page::findStringMatchingRanges): Added.
486         (WebCore::Page::markAllMatchesForText): Changed to use the new unified
487         countMatchesForText.
488         * page/Page.h:
489
490 2013-01-15  Alexandru Chiculita  <achicu@adobe.com>
491
492         [Compositor] Do not disable overlap testing for layers in front of 3D transformed layers
493         https://bugs.webkit.org/show_bug.cgi?id=106721
494
495         Reviewed by Simon Fraser.
496
497         RenderLayerCompositor is checking for overlapping layers and tries to figure out all the layers that need
498         to be drawn using composited layers. It doesn't know anything about animations yet and it only works with "start"
499         and "end" states. However, it knows that animations might happen, so in that cases it will avoid to do any optimizations,
500         as layers might get moved.
501
502         The overlapping layers optimization was also disabled for 3D layers. However, 3D layers can be computed in WebKit and 
503         can be checked for overlap using just the "start"/"stop" states. In this patch I enable that optimization for 3D layers, too.
504         The result is that more layers are drawn in software mode now, so I've updated a couple of test results.
505
506         Tests: compositing/layer-creation/overlap-transformed-3d.html
507                compositing/layer-creation/overlap-transformed-preserved-3d.html
508
509         * rendering/RenderLayerCompositor.cpp:
510         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
511
512 2013-01-15  Elliott Sprehn  <esprehn@gmail.com>
513
514         HTML parser should queue MutationRecords for its operations
515         https://bugs.webkit.org/show_bug.cgi?id=89351
516
517         Reviewed by Eric Seidel.
518
519         Generate mutation records inside the parser. This is done by using a
520         ChildListMutationScope in the ContainerNode::parser* methods and then
521         adding delivery before each <script> element would be processed by
522         the parser.
523
524         Test: fast/dom/MutationObserver/parser-mutations.html
525
526         * dom/ContainerNode.cpp:
527         (WebCore::ContainerNode::parserInsertBefore):
528         (WebCore::ContainerNode::parserRemoveChild):
529         (WebCore::ContainerNode::parserAppendChild):
530         * html/parser/HTMLScriptRunner.cpp:
531         (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
532         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
533         (WebCore::HTMLScriptRunner::execute):
534         (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
535         (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets):
536         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
537         (WebCore::HTMLScriptRunner::runScript):
538
539 2013-01-15  Ojan Vafai  <ojan@chromium.org>
540
541         Unreviewed, rolling out r139782.
542         http://trac.webkit.org/changeset/139782
543         https://bugs.webkit.org/show_bug.cgi?id=106939
544
545         Broke preferred widths on list markers.
546
547         * rendering/RenderListMarker.cpp:
548         (WebCore::RenderListMarker::layout):
549         (WebCore::RenderListMarker::computePreferredLogicalWidths):
550
551 2013-01-15  Elliott Sprehn  <esprehn@chromium.org>
552
553         Heap-use-after-free in WebCore::RenderObject::willBeRemovedFromTree
554         https://bugs.webkit.org/show_bug.cgi?id=106384
555
556         Reviewed by Abhishek Arya.
557
558         Always walk up from beforeChild until the parent() is the owner of the
559         child list, otherwise we can end up in situations where
560         newChild->parent() == owner but newChild->nextSibling()->parent() != owner
561         which is a recipe for security bugs. Previously we only walked up through
562         anonymous blocks, but missed anonymous inline blocks like those generated
563         by <ruby>.
564
565         Test: fast/css-generated-content/bug-106384.html
566
567         * rendering/RenderObjectChildList.cpp:
568         (WebCore::RenderObjectChildList::insertChildNode):
569
570 2013-01-15  Ojan Vafai  <ojan@chromium.org>
571
572         Remove bogus assert added in http://trac.webkit.org/changeset/139772.
573         * rendering/RenderBox.h:
574         (WebCore::RenderBox::computePreferredLogicalWidths):
575
576 2013-01-15  Ojan Vafai  <ojan@chromium.org>
577
578         Moving updating of margins from computePreferredLogicalWidths to layout
579         https://bugs.webkit.org/show_bug.cgi?id=106939
580
581         Reviewed by Levi Weintraub.
582
583         The margins don't affect it's preferred width. We should update them
584         during layout like we do in other classes (e.g. RenderBlock).
585
586         * rendering/RenderListMarker.cpp:
587         (WebCore::RenderListMarker::layout):
588         (WebCore::RenderListMarker::computePreferredLogicalWidths):
589
590 2013-01-15  Adam Barth  <abarth@webkit.org>
591
592         Generalize DocumentWeakReference into WTF::WeakPtr
593         https://bugs.webkit.org/show_bug.cgi?id=106854
594
595         Reviewed by Darin Adler.
596
597         This patch replaces DocumentWeakReference with WeakPtr. There should be
598         no change in behavior.
599
600         * dom/Document.cpp:
601         (WebCore):
602         (WebCore::Document::Document):
603         (WebCore::Document::~Document):
604         (WebCore::PerformTaskContext::PerformTaskContext):
605         (PerformTaskContext):
606         (WebCore::Document::didReceiveTask):
607         (WebCore::Document::postTask):
608         (WebCore::Document::reportMemoryUsage):
609         * dom/Document.h:
610         (WebCore):
611         (Document):
612
613 2013-01-15  James Simonsen  <simonjam@chromium.org>
614
615         [User Timing] INVALID_ACCESS_ERR should be thrown if measuring from a 0 Nav Timing value
616         https://bugs.webkit.org/show_bug.cgi?id=106935
617
618         Reviewed by Tony Gentilcore.
619
620         Test: http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_measure_exception.html
621
622         * page/PerformanceUserTiming.cpp:
623         (WebCore::UserTiming::findExistingMarkStartTime):
624
625 2013-01-15  Tommy Widenflycht  <tommyw@google.com>
626
627         MediaStream API: Rename the [add|remove]Track callbacks to [add|remove]RemoteTrack for clarity
628         https://bugs.webkit.org/show_bug.cgi?id=106791
629
630         Reviewed by Adam Barth.
631
632         No tests needed.
633
634         * Modules/mediastream/MediaStream.cpp:
635         (WebCore::MediaStream::addRemoteTrack):
636         (WebCore::MediaStream::removeRemoteTrack):
637         * Modules/mediastream/MediaStream.h:
638         * platform/mediastream/MediaStreamCenter.cpp:
639         (WebCore::MediaStreamCenter::addMediaStreamTrack):
640         (WebCore::MediaStreamCenter::removeMediaStreamTrack):
641         * platform/mediastream/MediaStreamDescriptor.h:
642         (MediaStreamDescriptorClient):
643
644 2013-01-15  Mark Pilgrim  <pilgrim@chromium.org>
645
646         [Chromium] Move SocketStreamHandle and SocketStreamHandleInternal to WebCore/platform
647         https://bugs.webkit.org/show_bug.cgi?id=106899
648
649         Reviewed by Adam Barth.
650
651         Part of a larger refactoring series; see tracking bug 106829.
652
653         * WebCore.gypi:
654         * platform/network/chromium/SocketStreamHandle.cpp: Copied from Source/WebKit/chromium/src/SocketStreamHandle.cpp.
655         (WebCore::SocketStreamHandleInternal::send):
656         (WebCore::SocketStreamHandleInternal::didOpenStream):
657         (WebCore::SocketStreamHandleInternal::didSendData):
658         (WebCore::SocketStreamHandleInternal::didReceiveData):
659         (WebCore::SocketStreamHandleInternal::didClose):
660         (WebCore::SocketStreamHandleInternal::didFail):
661         * platform/network/chromium/SocketStreamHandleInternal.h: Copied from Source/WebKit/chromium/src/SocketStreamHandleInternal.h.
662
663 2013-01-15  Ojan Vafai  <ojan@chromium.org>
664
665         RenderText::computePreferredLogicalWidths does not need to be public
666         https://bugs.webkit.org/show_bug.cgi?id=106934
667
668         Reviewed by Levi Weintraub.
669
670         * rendering/RenderCounter.h:
671         Add OVERRIDE keyword.
672         * rendering/RenderText.h:
673         Make protected.
674
675 2013-01-15  Ojan Vafai  <ojan@chromium.org>
676
677         Cleanup visibility of some computePreferredLogicalWidths calls
678         https://bugs.webkit.org/show_bug.cgi?id=106933
679
680         Reviewed by Levi Weintraub.
681
682         No need for these to be public.
683
684         * rendering/RenderBox.h:
685         (WebCore::RenderBox::computePreferredLogicalWidths):
686         This should never get called in practice. Add an assert to that effect.
687
688         * rendering/RenderGrid.h:
689         (RenderGrid):
690         * rendering/RenderReplica.h:
691         (RenderReplica):
692         * rendering/RenderScrollbarPart.h:
693         (RenderScrollbarPart):
694
695 2013-01-13  Dirk Schulze  <dschulze@adobe.com>
696
697         [CSS Filters] brightness() function doesn't work as specified
698         https://bugs.webkit.org/show_bug.cgi?id=106674
699
700         Reviewed by Dean Jackson.
701
702         The brightness filter implementation modified the intercept instead of the slope on
703         the feComponentTransfer function. The passed amount acts as multiplier for each
704         color chanel now.
705
706         Existing tests cover the changes and were updated.
707
708         * css/CSSParser.cpp:
709         (WebCore::CSSParser::parseBuiltinFilterArguments):
710         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
711         (PlatformCALayer::setFilters):
712         * rendering/FilterEffectRenderer.cpp:
713         (WebCore::FilterEffectRenderer::build):
714
715 2013-01-15  Zan Dobersek  <zandobersek@gmail.com>
716
717         [GTK] Enable Performance Timeline, Resource Timing, Navigation Timing features
718         https://bugs.webkit.org/show_bug.cgi?id=106197
719
720         Reviewed by Martin Robinson.
721
722         No new tests - existing layout tests are being unskipped, only a few fail
723         (but their failures are of cross-platform nature).
724
725         * GNUmakefile.features.am.in: Add feature defines for all three features.
726         They are disabled by default for now.
727         * GNUmakefile.list.am: Add missing build targets.
728         * bindings/gobject/GNUmakefile.am: Ditto.
729         * bindings/js/JSPerformanceEntryCustom.cpp: Added the necessary custom bindings.
730         Mimics the custom V8 bindings.
731         (WebCore):
732         (WebCore::toJS):
733
734 2013-01-15  Alexis Menard  <alexis@webkit.org>
735
736         Unprefixed transitionend event doesn't seem to be implemented, which breaks many sites
737         https://bugs.webkit.org/show_bug.cgi?id=105647
738
739         Reviewed by Julien Chaffraix.
740
741         Add support for transitionend event delivery as part as the unprefixing
742         work on CSS Transitions. This patch adds some code in EventTarget to
743         figure out if the current event to dispatch has a prefixed version or
744         not. Then from the list of listeners we deduce which event should be delivered
745         (prefixed or unprefixed).
746
747         In the case of the CSS Transitions, WebKit will now behave as follow :
748         if an event listener is attached to the prefixed version of the
749         transition end event then only the prefixed event will be send.
750         If an event listener is attached to the unprefixed version
751         of the transition end event then only the unprefixed event will be
752         send. If there are event listeners on both unprefixed and prefixed
753         events then only the unprefixed event will be send.
754
755         The behavior was discussed here :
756         http://lists.webkit.org/pipermail/webkit-dev/2013-January/023301.html.
757
758         Tests: transitions/transition-end-event-unprefixed-01.html
759                transitions/transition-end-event-unprefixed-02.html
760
761         * dom/Document.cpp:
762         (WebCore::Document::addListenerTypeIfNeeded): Register the prefixed
763         listener too as transitionend listeners so that we properly dispatch
764         events for them.
765         * dom/EventNames.h:
766         (WebCore): Add the new transitionend name.
767         * dom/EventTarget.cpp:
768         (WebCore::createMatchingPrefixedEvent):
769         (WebCore::prefixedType):
770         (WebCore::EventTarget::fireEventListeners): Find out if somebody is
771         listening for unprefixed events, if so we always send the unprefixed
772         event, if not then we create a prefixed event and send it.
773         * page/animation/AnimationController.cpp:
774         (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
775         * page/animation/ImplicitAnimation.cpp:
776         (WebCore::ImplicitAnimation::sendTransitionEvent): Always create by
777         default unprefixed events.
778
779 2013-01-15  Tony Gentilcore  <tonyg@chromium.org>
780
781         Make AtomicMarkupTokenBase use a bare UChar* for external characters
782         https://bugs.webkit.org/show_bug.cgi?id=106919
783
784         Reviewed by Eric Seidel.
785
786         This allows an arbitrary backing for external characters which is necessary for the threaded HTML parser.
787
788         No new tests because no new functionality.
789
790         * html/parser/HTMLTreeBuilder.cpp:
791         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
792         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
793         * xml/parser/MarkupTokenBase.h:
794         (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
795         (WebCore::AtomicMarkupTokenBase::characters):
796         (AtomicMarkupTokenBase):
797         (WebCore::AtomicMarkupTokenBase::charactersLength):
798         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
799         * xml/parser/XMLTreeBuilder.cpp:
800         (WebCore::XMLTreeBuilder::processCharacter):
801
802 2013-01-15  Arko Saha  <arko@motorola.com>
803
804         Microdata: propertiesCollection[name] should return undefined if item doesn't have a property named 'name'
805         https://bugs.webkit.org/show_bug.cgi?id=106849
806
807         Reviewed by Kentaro Hara.
808
809         We should return undefined if hasNamedItem() is false.
810
811         Test: fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html
812
813         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
814         (WebCore::V8HTMLCollection::namedPropertyGetter):
815
816 2013-01-15  Michael Pruett  <michael@68k.org>
817
818         [GTK] Fix build after r139665
819         https://bugs.webkit.org/show_bug.cgi?id=106917
820
821         Reviewed by Dean Jackson.
822
823         * GNUmakefile.list.am:
824
825 2013-01-15  Antti Koivisto  <antti@apple.com>
826
827         Move parent pointer from TreeShared to subclass
828         https://bugs.webkit.org/show_bug.cgi?id=106910
829
830         Reviewed by Darin Adler.
831
832         This simplifies both TreeShared and clients, and makes code dealing with parents more understandable in general.
833
834         * dom/Document.h:
835         (WebCore::Node::Node):
836         * dom/Node.cpp:
837         (WebCore::Node::reportMemoryUsage):
838         * dom/Node.h:
839     
840             Add m_parentOrHostNode variable (matching the accessor names).
841
842         (Node):
843         (WebCore::Node::hasTreeSharedParent):
844         (WebCore::Node::parentNode):
845         (WebCore::Node::setParentOrHostNode):
846         (WebCore::Node::parentOrHostNode):
847         * platform/TreeShared.h:
848         (WebCore):
849         (WebCore::TreeShared::TreeShared):
850         (WebCore::TreeShared::deref):
851         
852             Call subclass hasTreeSharedParent() to figure out if it is time to delete.
853
854         (TreeShared):
855
856             Remove parent pointer and accessors.
857             Remove ParentNodeType template parameter.
858             Remove now unnecessay reportMemoryUsage().
859
860         (WebCore::adopted):
861         * svg/SVGElementInstance.cpp:
862         (WebCore::SVGElementInstance::SVGElementInstance):
863         * svg/SVGElementInstance.h:
864         
865             Add m_parentInstance variable.
866
867         (WebCore::SVGElementInstance::setParentOrHostNode):
868         (WebCore::SVGElementInstance::parentNode):
869         (SVGElementInstance):
870         (WebCore::SVGElementInstance::hasTreeSharedParent):
871
872 2013-01-15  Simon Fraser  <simon.fraser@apple.com>
873
874         Allow tiled WKViews to have transparent backgrounds
875         https://bugs.webkit.org/show_bug.cgi?id=106400
876
877         Reviewed by Anders Carlsson.
878         
879         When WKViews were set to have transparent backgrounds, they still
880         obscured content behind the view, for several reasons.
881         
882         First, when in tiled scrolling mode, WKView set the background
883         of its layer to opaque white. Fix by using the clearColor (effectively
884         removing the background color) if the view has a non-opaque background.
885         
886         Second, RenderLayerBacking just looked at FrameViews's isTransparent()
887         when deciding to make TileCache tiles non-opaque, but it also needs to
888         consider FrameViews with a non-opaque base background color. The
889         same logic was necessary to avoid setting an opaque white background
890         color on the TileCache layer.
891         
892         Finally, for views with non-opaque backgrounds, we don't want to display
893         linen, so RenderLayerCompositor::requiresOverhangAreasLayer() was changed
894         to return false in that case.
895         
896         View transparency is not testable in layout tests.
897
898         * page/FrameView.cpp:
899         (WebCore::FrameView::hasOpaqueBackground):
900         * page/FrameView.h:
901         * rendering/RenderLayerBacking.cpp:
902         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
903         (WebCore::RenderLayerBacking::updateBackgroundColor):
904         * rendering/RenderLayerCompositor.cpp:
905         (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer):
906
907 2013-01-15  Ojan Vafai  <ojan@chromium.org>
908
909         RenderView does not need to override computePreferredLogicalWidth
910         https://bugs.webkit.org/show_bug.cgi?id=106852
911
912         Reviewed by Levi Weintraub.
913
914         Calling minPreferredLogicalWidth calls computePreferredLogicalWidth,
915         which happens a few lines later in layoutWithFlattening. No need
916         to call it explicitly.
917
918         * rendering/RenderFrameBase.cpp:
919         (WebCore::RenderFrameBase::layoutWithFlattening):
920         * rendering/RenderView.cpp:
921         * rendering/RenderView.h:
922
923 2013-01-15  Vsevolod Vlasov  <vsevik@chromium.org>
924
925         Unreviewed, remove file that was accidentally added to the wrong patch.
926
927         * inspector/front-end/FileSystemWorkspaceProvider.js: Removed.
928
929 2013-01-15  Florin Malita  <fmalita@chromium.org>
930
931         [Chromium] Incorrect opaque region tracking for PlatformContextSkia::drawRRect
932         https://bugs.webkit.org/show_bug.cgi?id=106898
933
934         Reviewed by Stephen White.
935
936         Since drawRRect() doesn't cover the whole bounding rect, it needs to pass a didDrawBounded
937         notification down to the opaque region tracker (instead of didDrawRect as it currently
938         does).
939
940         Test: platform/chromium/compositing/rounded-corners.html
941
942         * platform/graphics/skia/PlatformContextSkia.h:
943         (WebCore::PlatformContextSkia::drawRRect):
944
945 2013-01-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
946
947         [Qt] WebGL does not require accelerated compositing
948         https://bugs.webkit.org/show_bug.cgi?id=106892
949
950         Reviewed by Jocelyn Turcotte.
951
952         Allow the creation of WebGL canvas even when accelerated compositing is not enabled.
953
954         * html/HTMLCanvasElement.cpp:
955         (WebCore::HTMLCanvasElement::getContext):
956
957 2013-01-15  Andrey Lushnikov  <lushnikov@chromium.org>
958
959         Web Inspector: refactor DefaultTextEditor's paintLine method
960         https://bugs.webkit.org/show_bug.cgi?id=106893
961
962         Reviewed by Pavel Feldman.
963
964         Move render ranges functionality out of paintLine method into separate subroutine.
965
966         No new tests: no change in behaviour.
967
968         * inspector/front-end/DefaultTextEditor.js:
969         (WebInspector.TextEditorMainPanel.prototype._renderRanges): Added.
970         (WebInspector.TextEditorMainPanel.prototype._paintLine):
971         (WebInspector.TextEditorMainPanel.prototype._insertSpanBefore):
972
973 2013-01-15  Elliott Sprehn  <esprehn@gmail.com>
974
975         display:inline's hover behavior is not applied to ::before and ::after pseudo elements
976         https://bugs.webkit.org/show_bug.cgi?id=91723
977
978         Reviewed by Eric Seidel.
979
980         When hovering over the anonymous text renderers inside :before and :after
981         we would correctly detect a hit in InlineTextBox::nodeAtPoint, but would
982         then fail to set the correct node for the hit test because in
983         RenderObject::updateHitTestResult node() is null. Instead we should walk
984         up the render tree to the PseudoElement and treat it as if we hit that.
985
986         Test: fast/css-generated-content/hover-inline.html
987
988         * rendering/RenderObject.cpp:
989         (WebCore::RenderObject::updateHitTestResult):
990
991 2013-01-15  Zeno Albisser  <zeno@webkit.org>
992
993         GraphicsSurface: Canvas with WebGL content is painted off by one pixel
994         https://bugs.webkit.org/show_bug.cgi?id=106446
995
996         When painting to TextureMapper the provided targetRect is in contents
997         coordinate system. This leads to an off by one pixel error when painting
998         outlines of 1px.
999         This needs to be taken into account in the transformation matrix
1000         and in the TextureMapperGL::drawTexture call.
1001
1002         Test: fast/canvas/webgl/webgl-composite-modes.html
1003
1004         Reviewed by Noam Rosenthal.
1005
1006         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
1007         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
1008         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1009         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
1010         * platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:
1011         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
1012
1013 2013-01-14  Kentaro Hara  <haraken@chromium.org>
1014
1015         [V8] Make an Isolate parameter mandatory in SerializedScriptValue methods
1016         https://bugs.webkit.org/show_bug.cgi?id=106800
1017
1018         Reviewed by Adam Barth.
1019
1020         SerializedScriptValue methods are used by both V8 bindings
1021         and WebCore. So they should support both an Isolate-version
1022         method and an non-Isolate version method.
1023
1024         There are two ways to accomplish that:
1025
1026         [1] Use an optional Isolate parameter.
1027
1028         [2] Implement two versions and delegate the non-Isolate
1029         version method to the Isolate version method.
1030
1031         I would prefer the approach [2], because I'd like to statically
1032         make sure that we never pass a 0 Isolate. If we take the approach
1033         [1], we need to insert ASSERT(isolate) here and there.
1034
1035         This patch implements the approach [2].
1036
1037         No tests. No change in behavior.
1038
1039         * bindings/v8/SerializedScriptValue.cpp:
1040         (WebCore::SerializedScriptValue::create):
1041         (WebCore):
1042         (WebCore::SerializedScriptValue::nullValue):
1043         (WebCore::SerializedScriptValue::undefinedValue):
1044         (WebCore::SerializedScriptValue::booleanValue):
1045         (WebCore::SerializedScriptValue::numberValue):
1046         (WebCore::SerializedScriptValue::SerializedScriptValue):
1047         * bindings/v8/SerializedScriptValue.h:
1048         (SerializedScriptValue):
1049
1050 2013-01-15  Dongwoo Joshua Im  <dw.im@samsung.com>
1051
1052         [CSS] Rename the enum, from "ETextAlignLast" to "TextAlignLast"
1053         https://bugs.webkit.org/show_bug.cgi?id=106887
1054
1055         Reviewed by Alexis Menard.
1056
1057         No new tests are added since there is no behavior changes.
1058
1059         * css/CSSPrimitiveValueMappings.h:
1060         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1061         (WebCore::CSSPrimitiveValue::operator TextAlignLast):
1062         * css/StyleBuilder.cpp:
1063         (WebCore::StyleBuilder::StyleBuilder):
1064         * rendering/style/RenderStyle.h:
1065         * rendering/style/RenderStyleConstants.h:
1066         * rendering/style/StyleRareInheritedData.h:
1067         (StyleRareInheritedData):
1068
1069 2013-01-15  Tommy Widenflycht  <tommyw@google.com>
1070
1071         MediaStream API: Fixing crashing bug in MediaStream
1072         https://bugs.webkit.org/show_bug.cgi?id=106886
1073
1074         Reviewed by Eric Seidel.
1075
1076         Fixing crashing bug during destruction.
1077
1078         No new tests needed.
1079
1080         * Modules/mediastream/MediaStream.cpp:
1081         (WebCore::MediaStream::contextDestroyed):
1082
1083 2013-01-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1084
1085         [Qt][CSS Shaders] Make custom filter render in Wk1 mode
1086         https://bugs.webkit.org/show_bug.cgi?id=101532
1087
1088         Reviewed by Noam Rosenthal.
1089
1090         Handle ValidatedCustomFilterOperations which are used by WebKit1. To keep the cache of compiled programs working, 
1091         the cache has been updated to use CustomFilterProgramInfo as a hash key. CustomFilterProgramInfo is an existing
1092         class specifically designed for this purpose.
1093
1094         * platform/graphics/texmap/TextureMapperGL.cpp:
1095         (WebCore::getPassesRequiredForFilter):
1096         (WebCore::TextureMapperGL::removeCachedCustomFilterProgram):
1097         (WebCore::TextureMapperGL::drawUsingCustomFilter):
1098         (WebCore::BitmapTextureGL::applyFilters):
1099         * platform/graphics/texmap/TextureMapperGL.h:
1100         (TextureMapperGL):
1101
1102 2013-01-15  Andrey Adaikin  <aandrey@chromium.org>
1103
1104         Web Inspector: [Canvas] introduce CallArgument type into the protocol
1105         https://bugs.webkit.org/show_bug.cgi?id=106640
1106
1107         Reviewed by Yury Semikhatsky.
1108
1109         CallArgument type abstraction to describe arguments of a canvas context call.
1110         Drive-by: Introduce a CanvasContext to fix the wrong contextId value in the protocol.
1111         The contextId should point to the Resource that represents a context (2D or 3D canvas).
1112
1113         * inspector/InjectedScriptCanvasModuleSource.js:
1114         (.):
1115         * inspector/Inspector.json:
1116         * inspector/front-end/CanvasProfileView.js:
1117
1118 2012-12-28  Vsevolod Vlasov  <vsevik@chromium.org>
1119
1120         Web Inspector: Support inspector file system access with isolated file system through InspectorFrontendHost.
1121         https://bugs.webkit.org/show_bug.cgi?id=105727
1122
1123         Reviewed by Pavel Feldman.
1124
1125         File system access through isolated file system is implemented in inspector.
1126         File system access requests are sent through InspectorFrontendHost.
1127         Introduced IsolatedFileSystemModel encapsulating file system access logic. 
1128         Introduced FileSystemMapping that provides mapping between workspace uris and file system pathes.
1129         DOMFileSystem.createIsolatedFileSystem modified to accept optional registeredName parameter.
1130
1131         * Modules/filesystem/DOMFileSystem.cpp:
1132         (WebCore::DOMFileSystem::createIsolatedFileSystem):
1133         * Modules/filesystem/DOMFileSystem.h:
1134         (DOMFileSystem):
1135         * WebCore.gypi:
1136         * WebCore.vcproj/WebCore.vcproj:
1137         * inspector/InspectorFrontendClient.h:
1138         (InspectorFrontendClient):
1139         * inspector/InspectorFrontendClientLocal.h:
1140         (WebCore::InspectorFrontendClientLocal::supportsFileSystems):
1141         (WebCore::InspectorFrontendClientLocal::requestFileSystems):
1142         (WebCore::InspectorFrontendClientLocal::addFileSystem):
1143         (WebCore::InspectorFrontendClientLocal::removeFileSystem):
1144         (InspectorFrontendClientLocal):
1145         * inspector/InspectorFrontendHost.cpp:
1146         (WebCore::InspectorFrontendHost::supportsFileSystems):
1147         (WebCore):
1148         (WebCore::InspectorFrontendHost::requestFileSystems):
1149         (WebCore::InspectorFrontendHost::addFileSystem):
1150         (WebCore::InspectorFrontendHost::removeFileSystem):
1151         (WebCore::InspectorFrontendHost::isolatedFileSystem):
1152         * inspector/InspectorFrontendHost.h:
1153         (WebCore):
1154         (InspectorFrontendHost):
1155         * inspector/InspectorFrontendHost.idl:
1156         * inspector/compile-front-end.py:
1157         * inspector/front-end/FileSystemMapping.js: Added.
1158         * inspector/front-end/InspectorFrontendAPI.js:
1159         (InspectorFrontendAPI.fileSystemsLoaded):
1160         (InspectorFrontendAPI.fileSystemRemoved):
1161         (InspectorFrontendAPI.fileSystemAdded):
1162         * inspector/front-end/InspectorFrontendHostStub.js:
1163         (.WebInspector.InspectorFrontendHostStub.prototype.supportsFileSystems):
1164         (.WebInspector.InspectorFrontendHostStub.prototype.requestFileSystems):
1165         (.WebInspector.InspectorFrontendHostStub.prototype.addFileSystem):
1166         (.WebInspector.InspectorFrontendHostStub.prototype.removeFileSystem):
1167         (.WebInspector.InspectorFrontendHostStub.prototype.isolatedFileSystem):
1168         * inspector/front-end/IsolatedFileSystemModel.js: Added.
1169         * inspector/front-end/WebKit.qrc:
1170         * inspector/front-end/externs.js:
1171         (DOMFileSystem):
1172         (InspectorFrontendHostAPI.prototype.supportsFileSystems):
1173         (InspectorFrontendHostAPI.prototype.requestFileSystems):
1174         (InspectorFrontendHostAPI.prototype.addFileSystem):
1175         (InspectorFrontendHostAPI.prototype.removeFileSystem):
1176         (InspectorFrontendHostAPI.prototype.isolatedFileSystem):
1177         * inspector/front-end/inspector.html:
1178         * inspector/front-end/inspector.js:
1179
1180 2013-01-15  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1181
1182         [EFL][WebGL] Add error handling to carefully manage Window backing pixmaps.
1183         https://bugs.webkit.org/show_bug.cgi?id=106582
1184
1185         Reviewed by Kenneth Rohde Christiansen.
1186
1187         We use XCompositeNameWindowPixmap to create a pixmap that serves as a reference to
1188         the off-screen storage for a Window Handle. We expect the Window to be valid and
1189         the created glx pixmap to be a valid drawable. This may not be true always.
1190         This patch adds support for X Error checks and handles the generated errors.
1191
1192         Covered by existing WebGL layout tests.
1193
1194         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
1195         (WebCore):
1196         (WebCore::handleXPixmapCreationError):
1197         (ScopedXPixmapCreationErrorHandler):
1198         (WebCore::ScopedXPixmapCreationErrorHandler::ScopedXPixmapCreationErrorHandler):
1199         (WebCore::ScopedXPixmapCreationErrorHandler::~ScopedXPixmapCreationErrorHandler):
1200         (WebCore::ScopedXPixmapCreationErrorHandler::isValidOperation):
1201         Helper Class to catch XErrors.
1202
1203         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
1204         (WebCore::GraphicsSurfacePrivate::createPixmap): Added support to check and handle generated XErrors.
1205         (WebCore::GraphicsSurfacePrivate::findFBConfigWithAlpha):
1206         (WebCore::GraphicsSurfacePrivate::clear): Destroys GL Resources.
1207         (GraphicsSurfacePrivate):
1208
1209 2013-01-15  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1210
1211         [EFL] [WebGL] Minor cleanup in PlatformContext.
1212         https://bugs.webkit.org/show_bug.cgi?id=106758
1213
1214         Reviewed by Kenneth Rohde Christiansen.
1215
1216         We currently have different implementations of CurrentContextWrapper for EGL and GLX.
1217         This patch cleans up the code to use same implementation for both the backends.
1218
1219         * platform/graphics/opengl/GLPlatformContext.cpp:
1220         (GLCurrentContextWrapper):
1221         (WebCore::GLCurrentContextWrapper::GLCurrentContextWrapper):
1222         (WebCore::GLCurrentContextWrapper::~GLCurrentContextWrapper):
1223
1224         Common implementation for both EGL and GLX.
1225         (WebCore::createOffScreenContext):
1226         (WebCore::GLPlatformContext::createContext):
1227         * platform/graphics/surfaces/egl/EGLContext.cpp:
1228         * platform/graphics/surfaces/egl/EGLContext.h:
1229         * platform/graphics/surfaces/glx/GLXContext.h:
1230
1231         Removed code related to CurrentContextWrapper.
1232
1233 2013-01-14  Ryosuke Niwa  <rniwa@webkit.org>
1234
1235         platform/mac/accessibility/progressbar.html fails on Mac WK1 and WK2
1236         https://bugs.webkit.org/show_bug.cgi?id=106850
1237
1238         Reviewed by Chris Fleizach.
1239
1240         The bug was caused by some callers of supportsFocus directly calling that of Node.
1241         Fixed the bug by calling HTMLElement's so that the virtual function on Element gets
1242         called as needed.
1243
1244         * html/HTMLMeterElement.cpp:
1245         (WebCore::HTMLMeterElement::supportsFocus):
1246         * html/HTMLOutputElement.cpp:
1247         (WebCore::HTMLOutputElement::supportsFocus):
1248         * html/HTMLProgressElement.cpp:
1249         (WebCore::HTMLProgressElement::supportsFocus):
1250
1251 2013-01-14  Dima Gorbik  <dgorbik@apple.com>
1252
1253         Implement ID selector matching for the WebVTT ::cue pseudo element
1254         https://bugs.webkit.org/show_bug.cgi?id=105481
1255
1256         Reviewed by Eric Carlson.
1257
1258         Implemented matching cue WebVTT elements by an identifier. Identifiers of all WebVTT nodes in the rendering tree for 
1259         a given cue are set to match the cue identifier.
1260
1261         Existing tests were modified to cover this case.
1262
1263         * html/track/TextTrackCue.cpp:
1264         (WebCore::TextTrackCue::markFutureAndPastNodes):
1265
1266 2013-01-14  Mark Pilgrim  <pilgrim@chromium.org>
1267
1268         [Chromium] Use explicit WebKit prefixes in BlobRegistryProxy
1269         https://bugs.webkit.org/show_bug.cgi?id=106859
1270
1271         Reviewed by Adam Barth.
1272
1273         As requested in https://bugs.webkit.org/show_bug.cgi?id=106831#c2
1274
1275         * platform/network/chromium/BlobRegistryProxy.cpp:
1276         (WebCore::BlobRegistryProxy::registerBlobURL):
1277
1278 2013-01-14  Max Vujovic  <mvujovic@adobe.com>
1279
1280         [ANGLE] Update ANGLE in WebKit
1281         https://bugs.webkit.org/show_bug.cgi?id=106274
1282
1283         Unreviewed build fix for GTK after http://trac.webkit.org/changeset/139702
1284
1285         * GNUmakefile.am:
1286
1287 2013-01-14  Dean Jackson  <dino@apple.com>
1288
1289         Yet another unreviewed attempted QT build fix, this time because
1290         it's falling over on Filters.
1291
1292         * rendering/RenderSnapshottedPlugIn.cpp:
1293         (WebCore):
1294         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshotWithLabel):
1295
1296 2013-01-14  Dean Jackson  <dino@apple.com>
1297
1298         Unreviewed EFL build fix.
1299
1300         * CMakeLists.txt:
1301
1302 2013-01-14  Dean Jackson  <dino@apple.com>
1303
1304         Blur the label background of a snapshotted plugin
1305         https://bugs.webkit.org/show_bug.cgi?id=106630
1306
1307         Reviewed by Simon Fraser.
1308
1309         When we are showing a label indicating the plugin has been snapshotted,
1310         slightly blur the snapshot behind the label so that it is more clear. I expect
1311         that if/when other ports pick up this code, we'll need to separate the
1312         UI treatment somewhat, but this is ok for a first step.
1313
1314         * rendering/RenderSnapshottedPlugIn.cpp:
1315         (RenderSnapshottedPlugInBlurFilter): Private class to use FEGaussianBlur to blur an image.
1316         (WebCore::RenderSnapshottedPlugInBlurFilter::create):
1317         (WebCore::RenderSnapshottedPlugInBlurFilter::setSourceImageRect):
1318         (WebCore::RenderSnapshottedPlugInBlurFilter::sourceImageRect):
1319         (WebCore::RenderSnapshottedPlugInBlurFilter::filterRegion):
1320         (WebCore::RenderSnapshottedPlugInBlurFilter::output):
1321         (WebCore::RenderSnapshottedPlugInBlurFilter::RenderSnapshottedPlugInBlurFilter):
1322         (WebCore::RenderSnapshottedPlugInBlurFilter::apply):
1323         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New member variable to hold a cached version of a preblurred snapshot.
1324         (WebCore::RenderSnapshottedPlugIn::~RenderSnapshottedPlugIn): Remember to remove the preblurred image from the cache.
1325         (WebCore::RenderSnapshottedPlugIn::updateSnapshot): Zero the preblurred version if it exists.
1326         (WebCore::RenderSnapshottedPlugIn::paintReplaced): Either paint snapshot or blurred snapshot with label.
1327         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): New method to paint a full sized snapshot.
1328         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshot):
1329         (WebCore::snapshottedPluginImageForLabelDisplay): Static function to produce the blurred snapshot.
1330         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshotWithLabel): Calls paintSnapshot with the blurred snapshot on Mac.
1331         * rendering/RenderSnapshottedPlugIn.h:
1332
1333 2013-01-14  Mark Pilgrim  <pilgrim@chromium.org>
1334
1335         [Chromium] Move BlobRegistryProxy into WebCore
1336         https://bugs.webkit.org/show_bug.cgi?id=106831
1337
1338         Reviewed by Adam Barth.
1339
1340         Part of a larger refactoring series to remove layering violations
1341         in Chromium. See tracking bug 106829.
1342
1343         * WebCore.gypi:
1344         * platform/network/chromium/BlobRegistryProxy.cpp: Added.
1345         (WebCore):
1346         (WebCore::blobRegistry):
1347         (WebCore::BlobRegistryProxy::BlobRegistryProxy):
1348         (WebCore::BlobRegistryProxy::registerBlobURL):
1349         (WebCore::BlobRegistryProxy::unregisterBlobURL):
1350         * platform/network/chromium/BlobRegistryProxy.h: Added.
1351         (WebCore):
1352         (BlobRegistryProxy):
1353         (WebCore::BlobRegistryProxy::loadResourceSynchronously):
1354         (WebCore::BlobRegistryProxy::~BlobRegistryProxy):
1355
1356 2013-01-14  Levi Weintraub  <leviw@chromium.org>
1357
1358         Rolling out r139618. Appears to be causing sporadic crashes on Debug bots.
1359
1360         * Modules/mediastream/MediaStream.cpp:
1361         (WebCore::processTrack):
1362         * Modules/mediastream/MediaStreamTrack.cpp:
1363         (WebCore::MediaStreamTrack::readyState):
1364         * Modules/mediastream/MediaStreamTrack.h:
1365         * Modules/mediastream/MediaStreamTrack.idl:
1366
1367 2013-01-14  Levi Weintraub  <leviw@chromium.org>
1368
1369         Rolling out r139678. This triggered a number of WebAudio crashes on Debug bots.
1370
1371         * platform/audio/chromium/AudioDestinationChromium.cpp:
1372         (WebCore::AudioDestinationChromium::AudioDestinationChromium):
1373
1374 2013-01-09  Levi Weintraub <leviw@chromium.org>
1375
1376         Rolling out r139683. It broke a bunch of webkit_unit_tests.
1377
1378 2013-01-14  Ojan Vafai  <ojan@chromium.org>
1379
1380         RenderListItem does not need to override computePreferredLogicalWidth
1381         https://bugs.webkit.org/show_bug.cgi?id=106839
1382
1383         Reviewed by Levi Weintraub.
1384
1385         Apparently there was a time when the list marker was considered part of
1386         the list item's preferred width, but that is no longer the case.
1387         This code was added in r3421. The code around preferred widths has change
1388         a lot since then.
1389
1390         * rendering/RenderListItem.cpp:
1391         * rendering/RenderListItem.h:
1392
1393 2013-01-13  Dima Gorbik  <dgorbik@apple.com>
1394
1395         Implement element type selectors for the WebVTT ::cue pseudo class
1396         https://bugs.webkit.org/show_bug.cgi?id=105480
1397
1398         Reviewed by Antti Koivisto.
1399
1400         Implemented tag matching for the WebVTT specific tags "c" and "v". All common html tags like "b" and "i" are 
1401         handled without any changes to the code. Creating a rendering tree and DOM tree now use different code paths. 
1402         They both are made by cloning and modifying the tree produced by the parser. Voice tags now use spans for both 
1403         rendering and DOM trees to conform to specs. Since this changes a lot of code little refactoring has been
1404         done. Removed m_hasInnerTimestamps since it is no longer needed, it doesn't affect anything. m_documentFragment 
1405         was renamed to m_webVTTNodeTree.
1406
1407         Existing tests were modified to cover this case.
1408
1409         * html/track/TextTrackCue.cpp:
1410         (WebCore::TextTrackCue::TextTrackCue):
1411         (WebCore::TextTrackCue::setText): rename m_documentFragment to m_webVTTNodeTree
1412         (WebCore::TextTrackCue::createWebVTTNodeTree): parse the cue if it hasn't been parsed before.
1413         (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree): clone and prepare a node for using in the DOM tree according to specs.
1414         (WebCore::TextTrackCue::getCueAsHTML): get a DOM tree for the cue.
1415         (WebCore::TextTrackCue::createCueRenderingTree): create a rendering tree (main tree is just being cloned for now).
1416         (WebCore::TextTrackCue::markFutureAndPastNodes): tightening the argument type.
1417         (WebCore::TextTrackCue::updateDisplayTree):
1418         (WebCore::TextTrackCue::getDisplayTree): code cleanup, removed m_hasInnerTimeStamps.
1419         * html/track/TextTrackCue.h:
1420         (WebCore::TextTrackCue::voiceElementTagName):
1421         (TextTrackCue):
1422         (WebCore::TextTrackCue::classElementTagName):
1423         * html/track/WebVTTParser.cpp:
1424         (WebCore::WebVTTParser::constructTreeFromToken): type of the newly created elements was changed to Element to avoid hitting 
1425         an assertion when cloning because a cloned element will not have HTMLElement type for elements with "v" and "c" tag.
1426
1427 2013-01-14  Xianzhu Wang  <wangxianzhu@chromium.org>
1428
1429         Sometimes RenderLayer::updateNeedsCompositedScrolling is not called
1430         https://bugs.webkit.org/show_bug.cgi?id=106271
1431
1432         Reviewed by Simon Fraser.
1433
1434         1. If a layer has no out-of-flow descendant, m_hasOutOfFlowPositionedDescendant won't change and won't trigger updateNeedsCompositedScrolling in updateDescendantDependentFlags. Set m_hasOutOfFlowPositionedDescendantDirty to true and call updateNeedsCompositedScrolling when the dirty flag becomes false from true.
1435         2. When the content size changes causing change of scrollable status, updateNeedsCompositedScrolling should also be called.
1436
1437         Test: compositing/overflow/dynamic-composited-scrolling-status.html
1438
1439         * page/FrameView.cpp:
1440         (WebCore::FrameView::addScrollableArea): Returns whether the scrollable area has just been newly added.
1441         (WebCore::FrameView::removeScrollableArea): Returns whether the scrollable area has just been removed.
1442         * page/FrameView.h:
1443         (FrameView):
1444         * rendering/RenderLayer.cpp:
1445         (WebCore::RenderLayer::RenderLayer): Changed the initial value of m_hasOutOfFlowPositionedDescendantDirty to true to make sure m_hasOutOfFlowPositionedDescendant will be updated initially.
1446         (WebCore::RenderLayer::updateDescendantDependentFlags): Call updateNeedsCompositedScrolling when m_hasOutOfFlowPositionedDescendantDirty is true.
1447         (RenderLayer::updateScrollableAreaSet): Calls updateNeedsCompositedScrolling() when scrollable status changes.
1448         * rendering/RenderLayer.h:
1449         (RenderLayer):
1450
1451 2013-01-14  Ryosuke Niwa  <rniwa@webkit.org>
1452
1453         EFL build fix after r139681.
1454
1455         * dom/NodeRareData.h:
1456         (WebCore::NodeMicroDataTokenLists::NodeMicroDataTokenLists):
1457
1458 2013-01-14  Tien-Ren Chen  <trchen@chromium.org>
1459
1460         Correct FrameView::scrollableAreaBoundingBox() calculation in the presence of transforms
1461         https://bugs.webkit.org/show_bug.cgi?id=105075
1462
1463         Reviewed by Simon Fraser.
1464
1465         As mentioned by the FIXME comment, we need to ask the renderer for the
1466         absolute bounding box of a frame for correct transformation.
1467         This fixes the bug that iframe cannot be scrolled properly when it is
1468         transformed.
1469
1470         Tests: scrollingcoordinator/non-fast-scrollable-region-scaled-iframe.html
1471                scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html
1472
1473         * page/FrameView.cpp:
1474         (WebCore::FrameView::scrollableAreaBoundingBox):
1475
1476 2013-01-14  Nate Chapin  <japhet@chromium.org>
1477
1478         Enable reuse of cached main resources
1479         https://bugs.webkit.org/show_bug.cgi?id=105667
1480
1481         Reviewed by Antti Koivisto.
1482
1483         Test: http/tests/cache/cached-main-resource.html
1484
1485         * WebCore.exp.in:
1486         * dom/Document.cpp:
1487         (WebCore::Document::hasManifest): Returns true if the <html> element has a non-empty manifest attribute.
1488         * dom/Document.h:
1489         (Document):
1490         * loader/FrameLoader.cpp:
1491         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Don't send delegate callbacks for cache hit here, since
1492             MainResourceLoader will take care of it.
1493         * loader/MainResourceLoader.cpp:
1494         (WebCore::MainResourceLoader::MainResourceLoader):
1495         (WebCore::MainResourceLoader::receivedError):
1496         (WebCore::MainResourceLoader::willSendRequest):
1497         (WebCore::MainResourceLoader::responseReceived): Don't try to cache loads from the application cache.
1498         (WebCore::MainResourceLoader::didFinishLoading): Don't try to cache loads from the application cache.
1499         (WebCore::MainResourceLoader::load): Ensure we create a resource load identifier for cache hits. Also,
1500             ensure we correctly popualate fragment identifiers in the ResourceRequest reported to DocumentLoader.
1501         (WebCore::MainResourceLoader::identifier):
1502         * loader/MainResourceLoader.h: Rename m_substituteDataLoadIdentifier to m_identifierForLoadWithoutResourceLoader
1503             to better describe when it is used.
1504         * loader/cache/CachedRawResource.cpp:
1505         (WebCore::CachedRawResource::didAddClient): Synthesize redirect notifications for cache hits if necessary.
1506         (WebCore::CachedRawResource::willSendRequest): Note the redirects we received.
1507         (WebCore::CachedRawResource::canReuse): Don't reuse a resource if the redirect chain included a "Cache-control: no-store".
1508         * loader/cache/CachedRawResource.h:
1509         (CachedRawResource):
1510         (RedirectPair):
1511         (WebCore::CachedRawResource::RedirectPair::RedirectPair):
1512         * loader/cache/CachedResource.cpp:
1513         (WebCore::CachedResource::addClientToSet):: Don't return cached data for a main resource synchronously
1514         * loader/cache/CachedResource.h:
1515         (WebCore::CachedResource::canReuse):
1516         (CachedResource):
1517         * loader/cache/CachedResourceLoader.cpp:
1518         (WebCore::CachedResourceLoader::determineRevalidationPolicy): Permit cache reuse for main resources.
1519         * testing/Internals.cpp:
1520         (WebCore::Internals::isLoadingFromMemoryCache):
1521         (WebCore):
1522         * testing/Internals.h:
1523         (Internals):
1524         * testing/Internals.idl:
1525
1526 2013-01-11  Ryosuke Niwa  <rniwa@webkit.org>
1527
1528         Move functions from NodeRareData to ElementRareData and other classes
1529         https://bugs.webkit.org/show_bug.cgi?id=106679
1530
1531         Reviewed by Benjamin Poulain.
1532
1533         Moved tab index related functions from NodeRareData to ElementRareData since only
1534         HTMLElement uses them, and moved related functions on Node to Element accordingly.
1535
1536         Also replaced transientMutationObserverRegistry and ensureTransientMutationObserverRegistry
1537         by ensureMutationObserverData, and moved micro-data related member functions into
1538         NodeMicroDataTokenLists, and moved NodeMutationObserverData and NodeMicroDataTokenLists
1539         out of NodeRareData as they're used outside of NodeRareData now.
1540
1541         The intention is to move more code into NodeMutationObserverData and NodeMicroDataTokenLists
1542         in the follow up patches so that they can detect the removability of NodeRareData.
1543
1544         No new tests are added since there should be no behavior changes.
1545
1546         * dom/Element.cpp:
1547         (WebCore::Element::clearTabIndexExplicitlyIfNeeded):
1548         (WebCore::Element::setTabIndexExplicitly):
1549         (WebCore::Element::tabIndex):
1550         (WebCore::Element::supportsFocus):
1551         * dom/Element.h:
1552         (Element):
1553         * dom/ElementRareData.h:
1554         (ElementRareData):
1555         (WebCore::ElementRareData::tabIndex):
1556         (WebCore::ElementRareData::setTabIndexExplicitly):
1557         (WebCore::ElementRareData::tabIndexSetExplicitly):
1558         (WebCore::ElementRareData::clearTabIndexExplicitly):
1559         * dom/Node.cpp:
1560         (WebCore::Node::tabIndex):
1561         (WebCore::Node::supportsFocus):
1562         (WebCore::Node::mutationObserverRegistry):
1563         (WebCore::Node::transientMutationObserverRegistry):
1564         (WebCore::Node::registerMutationObserver):
1565         (WebCore::Node::registerTransientMutationObserver):
1566         (WebCore::Node::itemProp):
1567         (WebCore::Node::setItemProp):
1568         (WebCore::Node::itemRef):
1569         (WebCore::Node::setItemRef):
1570         (WebCore::Node::itemType):
1571         (WebCore::Node::setItemType):
1572         * dom/Node.h:
1573         (Node):
1574         * dom/NodeRareData.h:
1575         (NodeMutationObserverData):
1576         (WebCore::NodeMutationObserverData::create):
1577         (NodeMicroDataTokenLists):
1578         (WebCore::NodeMicroDataTokenLists::create):
1579         (WebCore::NodeMicroDataTokenLists::itemProp):
1580         (WebCore::NodeMicroDataTokenLists::itemRef):
1581         (WebCore::NodeMicroDataTokenLists::itemType):
1582         (NodeRareData):
1583         (WebCore::NodeRareData::mutationObserverData):
1584         (WebCore::NodeRareData::ensureMutationObserverData):
1585         (WebCore::NodeRareData::ensureMicroDataTokenLists):
1586         * html/HTMLElement.cpp:
1587         (WebCore::HTMLElement::parseAttribute):
1588
1589 2013-01-14  Ojan Vafai  <ojan@chromium.org>
1590
1591         Remove unnecessary setNeedsLayoutAndPrefWidthsRecalc from RenderTable
1592         https://bugs.webkit.org/show_bug.cgi?id=106832
1593
1594         Reviewed by Levi Weintraub.
1595
1596         These are both called from locations that either set these bits themselves
1597         or clearly don't need these bits set (e.g. computePreferredLogicalWidths).
1598
1599         * rendering/RenderTable.cpp:
1600         (WebCore::RenderTable::splitColumn):
1601         (WebCore::RenderTable::appendColumn):
1602
1603 2013-01-14  Chris Rogers  <crogers@google.com>
1604
1605         Switch AudioDestinationChromium over to new createAudioDevice() method
1606         https://bugs.webkit.org/show_bug.cgi?id=106816
1607
1608         Reviewed by James Robinson.
1609
1610         * platform/audio/chromium/AudioDestinationChromium.cpp:
1611         (WebCore::AudioDestinationChromium::AudioDestinationChromium):
1612
1613 2013-01-14  Huang Dongsung  <luxtella@company100.net>
1614
1615         [TexMap] Use a premuliplied color in TextureMapperGL.
1616         https://bugs.webkit.org/show_bug.cgi?id=105786
1617
1618         Reviewed by Noam Rosenthal.
1619
1620         TextureMapperGL always uses a premultiplied color, so we must convert
1621         an unmultiplied color to a premultiplied color before setting the uniform value of
1622         colorLocation.
1623
1624         Test: compositing/background-color/background-color-alpha-with-opacity.html
1625
1626         * platform/graphics/texmap/TextureMapperGL.cpp:
1627         (WebCore::TextureMapperGL::drawBorder):
1628         (WebCore::TextureMapperGL::drawSolidColor):
1629         (WebCore::prepareFilterProgram):
1630         * platform/graphics/texmap/TextureMapperLayer.cpp:
1631         (WebCore::blendWithOpacity):
1632         (WebCore):
1633         (WebCore::TextureMapperLayer::paintSelf):
1634             TextureMapperLayer must not convert solidColor to premultiplied
1635             color, because TextureMapperImageBuffer expects unmultiplied color.
1636
1637 2013-01-14  Arko Saha  <arko@motorola.com>
1638
1639         Microdata: REGRESSION(r138725): Causes crash in chromium port
1640         https://bugs.webkit.org/show_bug.cgi?id=106828
1641
1642         Reviewed by Ryosuke Niwa.
1643
1644         We should hold PropertyNodeList in RefPtr<PropertyNodeList>.
1645
1646         Test: fast/dom/MicroData/propertiescollection-crash.html
1647
1648         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
1649         (WebCore::V8HTMLCollection::namedPropertyGetter):
1650
1651 2013-01-14  Tien-Ren Chen  <trchen@chromium.org>
1652
1653         Positioned children of an overflow:visible container should ignore scroll offset when updating layer position
1654         https://bugs.webkit.org/show_bug.cgi?id=106814
1655
1656         Reviewed by Simon Fraser.
1657
1658         This patch fixes a bug in RenderLayer::updateLayerPosition that
1659         scrollLeft / scrollTop of a block should only be effective when the
1660         block has overflow clipping. The bug results in rendering artifacts
1661         and triggers a RenderGeometryMap assertion falure.
1662
1663         Fixes http://crbug.com/167985
1664
1665         Test: fast/overflow/overflow-visible-should-ignore-scroll.html
1666
1667         * rendering/RenderLayer.cpp:
1668         (WebCore::RenderLayer::updateLayerPosition):
1669
1670 2013-01-14  Alec Flett  <alecflett@chromium.org>
1671
1672         IndexedDB: Remove IDBObjectStore/IndexBackendImpl and support functions
1673         https://bugs.webkit.org/show_bug.cgi?id=106605
1674
1675         Remove all uses of IDBObjectStoreBackendInterface and IDBIndexBackend*,
1676         as they are no longer used after recent refactoring.
1677
1678         Reviewed by Darin Fisher.
1679
1680         * GNUmakefile.list.am:
1681         * Modules/indexeddb/IDBCallbacks.h:
1682         (WebCore):
1683         * Modules/indexeddb/IDBCursor.cpp:
1684         (WebCore::IDBCursor::update):
1685         * Modules/indexeddb/IDBDatabase.cpp:
1686         (WebCore::IDBDatabase::createObjectStore):
1687         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1688         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1689         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1690         (IDBDatabaseBackendImpl):
1691         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
1692         (WebCore):
1693         (IDBDatabaseBackendInterface):
1694         * Modules/indexeddb/IDBFactoryBackendImpl.h:
1695         (IDBFactoryBackendImpl):
1696         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1697         (IDBFactoryBackendInterface):
1698         * Modules/indexeddb/IDBIndex.cpp:
1699         * Modules/indexeddb/IDBIndexBackendInterface.h: Removed.
1700         * Modules/indexeddb/IDBObjectStore.cpp:
1701         (WebCore::IDBObjectStore::add):
1702         (WebCore::IDBObjectStore::put):
1703         * Modules/indexeddb/IDBObjectStore.h:
1704         (IDBObjectStore):
1705         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1706         (WebCore::IDBObjectStoreBackendImpl::makeIndexWriters):
1707         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
1708         (WebCore::IDBObjectStoreBackendImpl::IndexWriter::IndexWriter):
1709         (IndexWriter):
1710         (IDBObjectStoreBackendImpl):
1711         * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Removed.
1712         * Modules/indexeddb/IDBTransaction.cpp:
1713         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1714         (IDBTransactionBackendImpl):
1715         * Modules/indexeddb/IDBTransactionBackendInterface.h:
1716         (WebCore):
1717         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
1718         * Target.pri:
1719         * WebCore.gypi:
1720         * WebCore.vcproj/WebCore.vcproj:
1721         * WebCore.xcodeproj/project.pbxproj:
1722
1723 2013-01-14  Max Vujovic  <mvujovic@adobe.com>
1724
1725         [ANGLE] Update ANGLE in WebKit
1726         https://bugs.webkit.org/show_bug.cgi?id=106274
1727
1728         Reviewed by Dean Jackson.
1729
1730         Update ANGLE to r1641.
1731
1732         Update the files used in the EFL and GTK builds.
1733
1734         No new tests. No change in behavior.
1735
1736         * CMakeLists.txt:
1737         * GNUmakefile.list.am:
1738
1739 2013-01-14  Julien Chaffraix  <jchaffraix@webkit.org>
1740
1741         REGRESSION (r132591): Underpainting @ uofmchildrenshospital.org
1742         https://bugs.webkit.org/show_bug.cgi?id=105861
1743
1744         Reviewed by David Hyatt.
1745
1746         Test: fast/repaint/overhanging-float-detach-repaint.html
1747
1748         The issue comes from overhanging float not contributing to their containing block's
1749         overflow. This meant that repaint() would ignore them leading to an under-repaint.
1750         The fix is simple: force all the overhanging floats to repaint themselves.
1751
1752         * rendering/RenderObject.cpp:
1753         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
1754
1755 2013-01-14  Dominic Mazzoni  <dmazzoni@google.com>
1756
1757         AX: Need to implement ColorWellRole
1758         https://bugs.webkit.org/show_bug.cgi?id=106756
1759
1760         Reviewed by Chris Fleizach.
1761
1762         Maps input type=color to the accessible role ColorWellRole.
1763         Adds a new accessor to AccessibilityObject to get the color
1764         value in a cross-platform way that doesn't require parsing.
1765
1766         Test: accessibility/color-well.html
1767
1768         * accessibility/AccessibilityNodeObject.cpp:
1769         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
1770         (WebCore::AccessibilityNodeObject::colorValue):
1771         (WebCore):
1772         * accessibility/AccessibilityNodeObject.h:
1773         (AccessibilityNodeObject):
1774         * accessibility/AccessibilityObject.h:
1775         (WebCore::AccessibilityObject::isColorWell):
1776         (AccessibilityObject):
1777         (WebCore::AccessibilityObject::colorValue):
1778         * accessibility/AccessibilityRenderObject.cpp:
1779         (WebCore::AccessibilityRenderObject::stringValue):
1780         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1781         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
1782         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1783         * html/HTMLInputElement.cpp:
1784         (WebCore):
1785         (WebCore::HTMLInputElement::isColorControl):
1786         * html/HTMLInputElement.h:
1787         (HTMLInputElement):
1788
1789 2013-01-11  Emil A Eklund  <eae@chromium.org>
1790
1791         offsetWidth/height incorrect for images when zoomed
1792         https://bugs.webkit.org/show_bug.cgi?id=106624
1793
1794         Reviewed by Levi Weintraub.
1795         
1796         offsetWidth and height are incorrect for images at certain zoom
1797         levels due to flooring the values ones adjusted for zoom.
1798         By rounding the value instead we avoid the problem and return
1799         the right size.
1800
1801         Test: fast/images/zoomed-offset-size.html
1802
1803         * dom/Element.cpp:
1804         (WebCore::Element::offsetWidth):
1805         (WebCore::Element::offsetHeight):
1806         (WebCore::Element::clientWidth):
1807         (WebCore::Element::clientHeight):
1808         Change to round (as opposed to floor) the zoom adjusted value.
1809         
1810         * rendering/RenderObject.h:
1811         (WebCore::adjustLayoutUnitForAbsoluteZoom):
1812         * rendering/style/RenderStyle.h:
1813         (WebCore::adjustLayoutUnitForAbsoluteZoom):
1814         Add LayoutUnit version of adjustForAbsoluteZoom to avoid float
1815         conversion.
1816
1817 2013-01-14  Mark Pilgrim  <pilgrim@chromium.org>
1818
1819         [Chromium] Move AudioDestinationChromium into WebCore
1820         https://bugs.webkit.org/show_bug.cgi?id=106803
1821
1822         Reviewed by Adam Barth.
1823
1824         This doesn't really belong in WebKit/chromium/src since it defines
1825         things directly in the WebCore namespace.
1826
1827         * WebCore.gypi:
1828         * platform/audio/chromium/AudioDestinationChromium.cpp: Added.
1829         (WebCore):
1830         (WebCore::AudioDestination::create):
1831         (WebCore::AudioDestinationChromium::AudioDestinationChromium):
1832         (WebCore::AudioDestinationChromium::~AudioDestinationChromium):
1833         (WebCore::AudioDestinationChromium::start):
1834         (WebCore::AudioDestinationChromium::stop):
1835         (WebCore::AudioDestination::hardwareSampleRate):
1836         (WebCore::AudioDestinationChromium::render):
1837         (WebCore::AudioDestinationChromium::provideInput):
1838         * platform/audio/chromium/AudioDestinationChromium.h: Added.
1839         (WebCore):
1840         (AudioDestinationChromium):
1841         (WebCore::AudioDestinationChromium::isPlaying):
1842         (WebCore::AudioDestinationChromium::sampleRate):
1843
1844 2013-01-14  Adrian Perez de Castro  <aperez@igalia.com>
1845
1846         [GTK] Fix indentation for GStreamer supported MIME types list
1847         https://bugs.webkit.org/show_bug.cgi?id=106812
1848
1849         Reviewed by Philippe Normand.
1850
1851         No tests. No change in behavior.
1852
1853         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1854
1855 2013-01-14  John Bauman  <jbauman@chromium.org>
1856
1857         Use correct size for DrawingBuffer readback
1858         https://bugs.webkit.org/show_bug.cgi?id=106744
1859
1860         Reviewed by Kenneth Russell.
1861
1862         The value getInternalFramebufferSize is bogus if there's a
1863         DrawingBuffer, so use size() instead.
1864
1865         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1866         (WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
1867
1868 2013-01-14  Joshua Bell  <jsbell@chromium.org>
1869
1870         Bindings: Remove special cases for DOMString[]
1871         https://bugs.webkit.org/show_bug.cgi?id=106506
1872
1873         Remove special in binding code generators that map DOMString[] to DOMStringList.
1874         Array (T[]) and sequence (sequence<T>) are supported enough now that to be used
1875         for Internals, which is the only IDL that needed updating.
1876
1877         Reviewed by Adam Barth.
1878
1879         Tests: fast/forms/file/selected-files-from-history-state.html
1880                fast/forms/state-restore-broken-state.html
1881                fast/forms/state-restore-skip-stateless.html
1882
1883         Bindings test results updated for JS/V8.
1884
1885         * bindings/scripts/CodeGenerator.pm: Remove redundant IsArrayType (use GetArrayType instead)
1886         (IsRefPtrType): Array and Sequence types are not RefPtr types.
1887         * bindings/scripts/CodeGeneratorJS.pm:
1888         (IndexGetterReturnsStrings): Remove special case for DOMString[].
1889         (AddIncludesForType): Skip Array types, just like Sequence types. (Should probably recurse
1890         for the base type, but not needed for now.)
1891         (GenerateParametersCheckExpression): s/IsArrayType/GetArrayType/
1892         (GetNativeType): Remove special case for DOMString[].
1893         (GetNativeTypeForCallbacks): Ditto.
1894         (JSValueToNative): Ditto.
1895         * bindings/scripts/CodeGeneratorV8.pm:
1896         (GenerateParametersCheckExpression): s/IsArrayType/GetArrayType/
1897         (GetNativeType): Remove special case for DOMString[].
1898         (JSValueToNative): Ditto.
1899         (GetV8HeaderName): Ditto.
1900         (IsWrapperType):
1901         * bindings/scripts/test/JS/JSTestObj.cpp:
1902         (WebCore):
1903         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
1904         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
1905         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
1906         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
1907         * bindings/scripts/test/JS/JSTestObj.h:
1908         (WebCore):
1909         * bindings/scripts/test/TestObj.idl: Added explicit new cases for DOMStringList
1910         * bindings/scripts/test/V8/V8TestObj.cpp:
1911         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
1912         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
1913         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
1914         (TestObjV8Internal):
1915         (WebCore::TestObjV8Internal::domStringListFunctionCallback):
1916         (WebCore):
1917         (WebCore::ConfigureV8TestObjTemplate):
1918         * testing/Internals.cpp:
1919         (WebCore::Internals::formControlStateOfPreviousHistoryItem):
1920         (WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
1921         (WebCore::Internals::iconURLs):
1922         (WebCore::Internals::getReferencedFilePaths):
1923         * testing/Internals.h:
1924         (Internals):
1925         * testing/Internals.idl: Produce DOMString[], consume sequence<DOMString> to match tests.
1926
1927 2013-01-14  Elliott Sprehn  <esprehn@chromium.org>
1928
1929         Clean up WebVTTNodeType code
1930         https://bugs.webkit.org/show_bug.cgi?id=106714
1931
1932         Reviewed by Tony Chang.
1933
1934         There's no reason for so many methods just to compare some enums.
1935         The existing code can also be simplified quite a bit.
1936
1937         No new tests, just refactoring.
1938
1939         * css/SelectorChecker.cpp:
1940         (WebCore::SelectorChecker::checkOne):
1941         * css/StyleResolver.cpp:
1942         (WebCore::StyleResolver::collectMatchingRules):
1943         (WebCore::StyleResolver::canShareStyleWithElement):
1944         * dom/Element.cpp:
1945         (WebCore::Element::webVTTNodeType):
1946         (WebCore::Element::setWebVTTNodeType):
1947         * dom/Element.h:
1948         (Element):
1949         * dom/ElementRareData.h:
1950         (WebCore::ElementRareData::setWebVTTNodeType):
1951         (WebCore::ElementRareData::webVTTNodeType):
1952         (ElementRareData):
1953         * dom/NodeRareData.h:
1954         (WebCore::NodeRareData::NodeRareData):
1955         (NodeRareData):
1956         * html/track/TextTrack.h:
1957         * html/track/TextTrackCue.cpp:
1958         (WebCore::TextTrackCue::markFutureAndPastNodes):
1959
1960 2013-01-14  Antti Koivisto  <antti@apple.com>
1961
1962         REGRESSION (r139218): Flaky assertion in WebCore::StorageTask::StorageTask releasing memory
1963         https://bugs.webkit.org/show_bug.cgi?id=106718
1964
1965         Reviewed by Andreas Kling.
1966
1967         Type assertion was missing a new type.
1968
1969         * storage/StorageTask.cpp:
1970         (WebCore::StorageTask::StorageTask):
1971
1972 2013-01-14  Yury Semikhatsky  <yurys@chromium.org>
1973
1974         [REGRESSION] Dev Tools popup for Workers forgets sizes/shows tiny in top left
1975         https://bugs.webkit.org/show_bug.cgi?id=106807
1976
1977         Reviewed by Pavel Feldman.
1978
1979         Open dedicated worker inspector 600x600 by default and remember its size
1980         after resizing.
1981
1982         * inspector/front-end/Settings.js:
1983         * inspector/front-end/WorkerManager.js:
1984
1985 2013-01-14  Kentaro Hara  <haraken@chromium.org>
1986
1987         [V8] Make an Isolate parameter mandatory in associateObjectWithWrapper()
1988         https://bugs.webkit.org/show_bug.cgi?id=106784
1989
1990         Reviewed by Adam Barth.
1991
1992         No tests. No change in behavior.
1993
1994         * bindings/v8/V8DOMWrapper.h:
1995         (V8DOMWrapper):
1996
1997 2013-01-14  Kentaro Hara  <haraken@chromium.org>
1998
1999         [V8] Make an Isolate parameter mandatory in ScriptDebugServer::interruptAndRun()
2000         https://bugs.webkit.org/show_bug.cgi?id=106779
2001
2002         Reviewed by Adam Barth.
2003
2004         This is one of steps to make an Isolate parameter mandatory.
2005
2006         No tests. No change in behavior.
2007
2008         * bindings/v8/ScriptDebugServer.h:
2009         (ScriptDebugServer):
2010
2011 2013-01-14  Kentaro Hara  <haraken@chromium.org>
2012
2013         [V8] Make an Isolate parameter mandatory in wrap()
2014         https://bugs.webkit.org/show_bug.cgi?id=106783
2015
2016         Reviewed by Adam Barth.
2017
2018         Now it's safe to make an Isolate parameter in wrap().
2019
2020         No tests. No change in behavior.
2021
2022         * bindings/scripts/CodeGeneratorV8.pm:
2023         (GenerateHeader):
2024         * bindings/scripts/test/V8/V8Float64Array.h:
2025         (WebCore):
2026         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2027         (WebCore::wrap):
2028         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2029         (WebCore::wrap):
2030         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2031         (WebCore::wrap):
2032         * bindings/scripts/test/V8/V8TestEventTarget.h:
2033         (WebCore::wrap):
2034         * bindings/scripts/test/V8/V8TestException.h:
2035         (WebCore::wrap):
2036         * bindings/scripts/test/V8/V8TestInterface.h:
2037         (WebCore::wrap):
2038         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2039         (WebCore::wrap):
2040         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2041         (WebCore::wrap):
2042         * bindings/scripts/test/V8/V8TestNode.h:
2043         (WebCore::wrap):
2044         * bindings/scripts/test/V8/V8TestObj.h:
2045         (WebCore::wrap):
2046         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
2047         (WebCore::wrap):
2048         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2049         (WebCore::wrap):
2050
2051 2013-01-14  Tommy Widenflycht  <tommyw@google.com>
2052
2053         MediaStream API: Update MediaStreamTrack::readyState to match specification
2054         https://bugs.webkit.org/show_bug.cgi?id=106781
2055
2056         Reviewed by Adam Barth.
2057
2058         MediaStreamTrack::readyState now returns a string like the rest of the RTC classes.
2059
2060         Existing tests expanded to cover patch.
2061
2062         * Modules/mediastream/MediaStream.cpp:
2063         (WebCore::processTrack):
2064         * Modules/mediastream/MediaStreamTrack.cpp:
2065         (WebCore::MediaStreamTrack::readyState):
2066         (WebCore::MediaStreamTrack::ended):
2067         (WebCore):
2068         * Modules/mediastream/MediaStreamTrack.h:
2069         (MediaStreamTrack):
2070         * Modules/mediastream/MediaStreamTrack.idl:
2071
2072 2013-01-14  Vsevolod Vlasov  <vsevik@chromium.org>
2073
2074         Web Inspector: Audit Tool's False Positive on Set-Cookie header
2075         https://bugs.webkit.org/show_bug.cgi?id=106794
2076
2077         Reviewed by Pavel Feldman.
2078
2079         Header value is now returned as undefined if there is no such header as it was before regression.
2080
2081         Test: http/tests/inspector/audits/set-cookie-header-audit-no-false-positive.html
2082
2083         * inspector/front-end/AuditRules.js:
2084         (WebInspector.AuditRules.CSSRuleBase.prototype.sheetsCallback): Drive-by fix, callback should be called even when there is no headers. 
2085         * inspector/front-end/NetworkRequest.js:
2086         (WebInspector.NetworkRequest.prototype._headerValue):
2087
2088 2013-01-14  Eric Carlson  <eric.carlson@apple.com>
2089
2090         Do not pass nil when initializing legible output
2091         https://bugs.webkit.org/show_bug.cgi?id=106799
2092
2093         Reviewed by Jessie Berlin.
2094
2095         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2096         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): -[AVPlayerItemLegibleOutput initWithDependencyFactory:mediaSubtypesForNativeRepresentation:]
2097             wants an empty NSArray rather than nil.
2098
2099 2013-01-14  Andrey Adaikin  <aandrey@chromium.org>
2100
2101         Web Inspector: [Canvas] UI: add control buttons for doing the replay steps
2102         https://bugs.webkit.org/show_bug.cgi?id=106788
2103
2104         Reviewed by Pavel Feldman.
2105
2106         Adding UI control buttons for doing the Canvas replay steps.
2107         Drive-by: fixed a bug in DataGrid (found by the JSCompiler).
2108
2109         * inspector/front-end/CanvasProfileView.js:
2110         (WebInspector.CanvasProfileView):
2111         (WebInspector.CanvasProfileView.prototype._createControlButton):
2112         (WebInspector.CanvasProfileView.prototype._onReplayStepClick):
2113         (WebInspector.CanvasProfileView.prototype._onReplayFirstStepClick):
2114         (WebInspector.CanvasProfileView.prototype._onReplayLastStepClick):
2115         (WebInspector.CanvasProfileView.prototype._enableWaitIcon):
2116         (WebInspector.CanvasProfileView.prototype._replayTraceLog.didReplayTraceLog):
2117         (WebInspector.CanvasProfileView.prototype._replayTraceLog):
2118         (WebInspector.CanvasProfileView.prototype._didReceiveTraceLog):
2119         (WebInspector.CanvasProfileType.prototype._updateDecorationElement):
2120         * inspector/front-end/DOMExtension.js:
2121         (Element.prototype.enableStyleClass):
2122         * inspector/front-end/DataGrid.js:
2123         (WebInspector.DataGrid.prototype.setRootNode):
2124         (WebInspector.DataGrid.prototype._startEditingColumnOfDataGridNode):
2125         (WebInspector.DataGrid.prototype.moveToNextIfNeeded):
2126         (WebInspector.DataGrid.prototype._editingCommitted):
2127         (WebInspector.DataGridNode):
2128         * inspector/front-end/canvasProfiler.css:
2129         (.canvas-replay-image):
2130         (.canvas-replay-image.wait):
2131         (.canvas-replay-controls):
2132         (.canvas-replay-log):
2133         (.canvas-control-button):
2134         (.canvas-control-button:active):
2135         (.canvas-control-button:disabled):
2136         (.canvas-control-button img):
2137         (.canvas-replay-first-step img):
2138         (.canvas-replay-next-step img):
2139         (.canvas-replay-prev-step img):
2140         (.canvas-replay-last-step img):
2141
2142 2013-01-14  Tommy Widenflycht  <tommyw@google.com>
2143
2144         MediaStream API: Update the track accessors on MediaStream to match the latest specification
2145         https://bugs.webkit.org/show_bug.cgi?id=106660
2146
2147         Reviewed by Adam Barth.
2148
2149         The spec has significantly changed how tracks are accessed from a MediaStream:
2150         http://dev.w3.org/2011/webrtc/editor/getusermedia.html
2151
2152         In short: the attributes audioTrack/videoTrack that returned special MediaStreamTrackLists have been
2153         replaced by the functions getAudioTracks()/getVideoTracks that return standard sequences of
2154         MediaStreamTracks.
2155
2156         Existing tests updated and expanded to cover patch.
2157
2158         * CMakeLists.txt:
2159         * GNUmakefile.list.am:
2160         * Modules/mediastream/MediaStream.cpp:
2161         (WebCore::MediaStream::create):
2162         (WebCore::MediaStream::MediaStream):
2163         (WebCore::MediaStream::~MediaStream):
2164         (WebCore::MediaStream::readyState):
2165         (WebCore):
2166         (WebCore::MediaStream::addTrack):
2167         (WebCore::MediaStream::removeTrack):
2168         (WebCore::MediaStream::getTrackById):
2169         (WebCore::MediaStream::streamEnded):
2170         (WebCore::MediaStream::contextDestroyed):
2171         (WebCore::MediaStream::scheduleDispatchEvent):
2172         (WebCore::MediaStream::scheduledEventTimerFired):
2173         * Modules/mediastream/MediaStream.h:
2174         (MediaStream):
2175         (WebCore::MediaStream::getAudioTracks):
2176         (WebCore::MediaStream::getVideoTracks):
2177         * Modules/mediastream/MediaStream.idl:
2178         * Modules/mediastream/MediaStreamTrackList.cpp: Removed.
2179         * Modules/mediastream/MediaStreamTrackList.h: Removed.
2180         * Modules/mediastream/MediaStreamTrackList.idl: Removed.
2181         * Modules/webaudio/AudioContext.cpp:
2182         (WebCore::AudioContext::createMediaStreamSource):
2183         * WebCore.gypi:
2184         * dom/EventTargetFactory.in:
2185         * platform/mediastream/MediaStreamDescriptor.h:
2186         (WebCore::MediaStreamDescriptor::addAudioComponent):
2187         (WebCore::MediaStreamDescriptor::removeAudioComponent):
2188         (WebCore::MediaStreamDescriptor::addVideoComponent):
2189         (WebCore::MediaStreamDescriptor::removeVideoComponent):
2190
2191 2013-01-14  Kentaro Hara  <haraken@chromium.org>
2192
2193         [V8] Add m_isolate to ScriptController, WorkerScriptController and V8DOMWindowShell
2194         https://bugs.webkit.org/show_bug.cgi?id=106771
2195
2196         Reviewed by Adam Barth.
2197
2198         This is one of the steps to pass an Isolate everywhere.
2199
2200         No tests. No change in behavior.
2201
2202         * bindings/v8/ScriptController.cpp:
2203         (WebCore::ScriptController::ScriptController):
2204         (WebCore::ScriptController::windowShell):
2205         * bindings/v8/ScriptController.h:
2206         (ScriptController):
2207         * bindings/v8/V8DOMWindowShell.cpp:
2208         (WebCore::V8DOMWindowShell::create):
2209         (WebCore::V8DOMWindowShell::V8DOMWindowShell):
2210         (WebCore::V8DOMWindowShell::initializeIfNeeded):
2211         (WebCore::V8DOMWindowShell::installDOMWindow):
2212         * bindings/v8/V8DOMWindowShell.h:
2213         (V8DOMWindowShell):
2214         * bindings/v8/V8Initializer.cpp:
2215         (WebCore::V8Initializer::initializeMainThreadIfNeeded):
2216         (WebCore::V8Initializer::initializeWorker):
2217         * bindings/v8/V8Initializer.h:
2218         (V8Initializer):
2219         * bindings/v8/WorkerScriptController.cpp:
2220         (WebCore::WorkerScriptController::WorkerScriptController):
2221         (WebCore::WorkerScriptController::initializeContextIfNeeded):
2222
2223 2013-01-14  Alexander Pavlov  <apavlov@chromium.org>
2224
2225         Web Inspector: [Styles] Color names parsed inside "background-image" values
2226         https://bugs.webkit.org/show_bug.cgi?id=106770
2227
2228         Reviewed by Pavel Feldman.
2229
2230         Test: inspector/styles/url-color-swatch.html
2231
2232         Spaces were not allowed in url(...) CSS property values.
2233
2234         * inspector/front-end/StylesSidebarPane.js:
2235
2236 2013-01-14  Kentaro Hara  <haraken@chromium.org>
2237
2238         [V8] Pass an Isolate to associateObjectWithWrapper()
2239         https://bugs.webkit.org/show_bug.cgi?id=106773
2240
2241         Reviewed by Adam Barth.
2242
2243         In preparation for making an Isolate parameter mandatory
2244         in associateObjectWithWrapper(), this patch passes an
2245         Isolate to associateObjectWithWrapper().
2246
2247         No tests. No change in behavior.
2248
2249         * bindings/v8/custom/V8ArrayBufferCustom.cpp:
2250         (WebCore::V8ArrayBuffer::constructorCallbackCustom):
2251         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
2252         (WebCore::wrapArrayBufferView):
2253         (WebCore::constructWebGLArray):
2254         * bindings/v8/custom/V8AudioContextCustom.cpp:
2255         (WebCore::V8AudioContext::constructorCallbackCustom):
2256         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
2257         (WebCore::V8DOMFormData::constructorCallbackCustom):
2258         * bindings/v8/custom/V8DataViewCustom.cpp:
2259         (WebCore::V8DataView::constructorCallbackCustom):
2260         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2261         (WebCore::v8HTMLImageElementConstructorCallback):
2262         * bindings/v8/custom/V8IntentCustom.cpp:
2263         (WebCore::V8Intent::constructorCallbackCustom):
2264         * bindings/v8/custom/V8MessageChannelCustom.cpp:
2265         (WebCore::V8MessageChannel::constructorCallbackCustom):
2266         * bindings/v8/custom/V8MutationObserverCustom.cpp:
2267         (WebCore::V8MutationObserver::constructorCallbackCustom):
2268         * bindings/v8/custom/V8WebKitPointCustom.cpp:
2269         (WebCore::V8WebKitPoint::constructorCallbackCustom):
2270         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2271         (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
2272
2273 2013-01-14  Kentaro Hara  <haraken@chromium.org>
2274
2275         [V8] Call Isolate::GetCurrent() in a callback from WebCore
2276         https://bugs.webkit.org/show_bug.cgi?id=106766
2277
2278         Reviewed by Adam Barth.
2279
2280         The objective is to pass an Isolate everywhere.
2281         Given that a callback from WebCore is an entry point to V8,
2282         we can call Isolate::GetCurrent() at the head of the callback
2283         and pass it to other places. (In practice, handleEvent() is
2284         the only callback used in the current WebKit.)
2285
2286         No tests. No change in behavior.
2287
2288         * bindings/scripts/CodeGeneratorV8.pm:
2289         (GenerateCallbackImplementation):
2290         (NativeToJSValue):
2291         * bindings/scripts/test/V8/V8TestCallback.cpp:
2292         (WebCore::V8TestCallback::callbackWithNoParam):
2293         (WebCore::V8TestCallback::callbackWithClass1Param):
2294         (WebCore::V8TestCallback::callbackWithClass2Param):
2295         (WebCore::V8TestCallback::callbackWithStringList):
2296         (WebCore::V8TestCallback::callbackWithBoolean):
2297         (WebCore::V8TestCallback::callbackRequiresThisToPass):
2298
2299 2013-01-14  Tommy Widenflycht  <tommyw@google.com>
2300
2301         MediaStream API: Change MediaStream::readyState to an boolean attribute called ended.
2302         https://bugs.webkit.org/show_bug.cgi?id=106568
2303
2304         Reviewed by Adam Barth.
2305
2306         See specification: http://dev.w3.org/2011/webrtc/editor/getusermedia.html
2307
2308         Existings tests updated to cover patch.
2309
2310         * Modules/mediastream/LocalMediaStream.cpp:
2311         (WebCore::LocalMediaStream::stop):
2312         * Modules/mediastream/MediaStream.cpp:
2313         (WebCore::MediaStream::ended):
2314         (WebCore::MediaStream::streamEnded):
2315         * Modules/mediastream/MediaStream.h:
2316         (MediaStream):
2317         (WebCore::MediaStream::isLocal):
2318         * Modules/mediastream/MediaStream.idl:
2319         * Modules/mediastream/MediaStreamTrackList.cpp:
2320         (WebCore::MediaStreamTrackList::add):
2321         (WebCore::MediaStreamTrackList::remove):
2322
2323 2013-01-14  Alexander Pavlov  <apavlov@chromium.org>
2324
2325         Web Inspector: [Styles] HTML color names not converted to RGB/HEX/HSL when "Color format" feature used
2326         https://bugs.webkit.org/show_bug.cgi?id=106767
2327
2328         Reviewed by Vsevolod Vlasov.
2329
2330         We used to render named colors as names regardless of the selected color format option.
2331
2332         * inspector/front-end/StylesSidebarPane.js:
2333         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.):
2334
2335 2013-01-14  Andrei Bucur  <abucur@adobe.com>
2336
2337         Crash caused by incomplete cleanup of regions information for anonymous block
2338         https://bugs.webkit.org/show_bug.cgi?id=106191
2339
2340         Reviewed by Abhishek Arya.
2341
2342         When an anonymous block is no longer required it is removed from the render tree and deleted. For example, this can happen when an anonymous block children change
2343         from inlines to blocks. The patch updates the removeLeftoverAnonymousBlock function to delete the flow thread information attached to the obsolete anonymous block.
2344         The removeFromRenderFlowThread() function is recursive and it needs to be called after the anonymous block children were reparented and the child list cleared.
2345         I've also placed the children reset operation before clearing the parent because the latter also deletes the inRenderFlowThread flag from the object and it makes
2346         flow thread ownership detection impossible.
2347
2348         Tests: fast/regions/remove-leftover-anon-block-crash.html
2349
2350         * rendering/RenderBlock.cpp:
2351         (WebCore::RenderBlock::removeLeftoverAnonymousBlock):
2352
2353 2013-01-14  Kentaro Hara  <haraken@chromium.org>
2354
2355         [V8] Make an Isolate parameter mandatory in v8DateOrNull()
2356         https://bugs.webkit.org/show_bug.cgi?id=106765
2357
2358         Reviewed by Adam Barth.
2359
2360         This is one of the efforts to kill all optional Isolate parameters.
2361
2362         No tests. No change in behavior.
2363
2364         * bindings/v8/V8Binding.h:
2365         (WebCore::v8DateOrNull):
2366
2367 2013-01-14  Pablo Flouret  <pablof@motorola.com>
2368
2369         Allow nesting of at-rules
2370         https://bugs.webkit.org/show_bug.cgi?id=106696
2371
2372         Reviewed by Allan Sandfeld Jensen.
2373
2374         http://dev.w3.org/csswg/css3-conditional/ introduces the
2375         concept of grouping rules, and allows for them to be nested. In
2376         particular, this change affects @media (and is needed for @supports as
2377         well).
2378
2379         Test: fast/css/nested-at-rules.html
2380
2381         * css/CSSGrammar.y.in:
2382             Move media to the block_valid_rule list.
2383
2384         * css/RuleSet.cpp:
2385         (WebCore::RuleSet::addRegionRule):
2386         (WebCore::RuleSet::addChildRules):
2387         (WebCore::RuleSet::addRulesFromSheet):
2388         * css/RuleSet.h:
2389             Rip out the rule-adding loop into a new method, for added
2390             cleanliness and recursing.
2391
2392 2013-01-14  Eugene Klyuchnikov  <eustas@chromium.org>
2393
2394         Web Inspector: [Network] Add domain column
2395         https://bugs.webkit.org/show_bug.cgi?id=106757
2396
2397         Reviewed by Pavel Feldman.
2398
2399         Adding new column will ease domain tracking / sorting.
2400
2401         * inspector/front-end/NetworkPanel.js: Added column.
2402         * inspector/front-end/NetworkRequest.js:
2403         (WebInspector.NetworkRequest.prototype.get domain): Added getter.
2404
2405 2013-01-14  Qiankun Miao  <qiankun.miao@intel.com>
2406
2407         Fix a typo error in the comments in PlatformContextSkia.h
2408         https://bugs.webkit.org/show_bug.cgi?id=105612
2409
2410         Reviewed by Stephen White.
2411
2412         "If false we're rendering to a GraphicsContext for a web page, if false
2413         we're not (as is the case when rendering to a canvas object)." is
2414         self-contradictory. The second "flase" in the comments should be
2415         "true". If true, we're rendering to an ImageBuffer which has a canvas
2416         object.
2417
2418         * platform/graphics/skia/PlatformContextSkia.h:
2419         (PlatformContextSkia):
2420
2421 2013-01-14  Ilya Tikhonovsky  <loislo@chromium.org>
2422
2423         Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrumented classes 3/3
2424         https://bugs.webkit.org/show_bug.cgi?id=106764
2425
2426         Reviewed by Vsevolod Vlasov.
2427
2428         Last three classes with not instrumented members were fixed.
2429
2430         * css/CSSGroupingRule.cpp:
2431         (WebCore::CSSGroupingRule::reportMemoryUsage):
2432         * css/StyleScopeResolver.cpp:
2433         (WebCore::StyleScopeResolver::reportMemoryUsage):
2434         * loader/cache/CachedResourceLoader.cpp:
2435         (WebCore::CachedResourceLoader::reportMemoryUsage):
2436
2437 2013-01-10  Ilya Tikhonovsky  <loislo@chromium.org>
2438
2439         Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrumented classes 2/N
2440         https://bugs.webkit.org/show_bug.cgi?id=106546
2441
2442         Reviewed by Vsevolod Vlasov.
2443
2444         Many nontrivial class members were added into reportMemoryUsage methods.
2445
2446         * bindings/v8/V8PerIsolateData.cpp:
2447         (WebCore::V8PerIsolateData::reportMemoryUsage):
2448         * css/CSSMediaRule.cpp:
2449         (WebCore::CSSMediaRule::reportMemoryUsage):
2450         * css/CSSProperty.cpp:
2451         (WebCore::CSSProperty::reportMemoryUsage):
2452         * css/CSSStyleSheet.cpp:
2453         (WebCore::CSSStyleSheet::reportMemoryUsage):
2454         * css/MediaList.cpp:
2455         (WebCore::MediaList::reportMemoryUsage):
2456         * css/RuleSet.cpp:
2457         (WebCore::RuleData::reportMemoryUsage):
2458         (WebCore::RuleSet::reportMemoryUsage):
2459         (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
2460         * css/StyleResolver.cpp:
2461         (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
2462         (WebCore::StyleResolver::reportMemoryUsage):
2463         * css/StyleSheetContents.cpp:
2464         (WebCore::StyleSheetContents::reportMemoryUsage):
2465         * dom/TreeScope.cpp:
2466         (WebCore::TreeScope::reportMemoryUsage):
2467         * inspector/HeapGraphSerializer.cpp:
2468         (WebCore::HeapGraphSerializer::reportMemoryUsage):
2469         * inspector/InspectorMemoryAgent.cpp:
2470         * inspector/InspectorProfilerAgent.cpp:
2471         (WebCore::InspectorProfilerAgent::reportMemoryUsage):
2472         * inspector/MemoryInstrumentationImpl.cpp:
2473         (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
2474         * loader/DocumentLoader.cpp:
2475         (WebCore::DocumentLoader::reportMemoryUsage):
2476         * loader/FrameLoader.cpp:
2477         (WebCore::FrameLoader::reportMemoryUsage):
2478         * loader/MainResourceLoader.cpp:
2479         (WebCore::MainResourceLoader::reportMemoryUsage):
2480         * loader/Prerenderer.cpp:
2481         (WebCore::Prerenderer::reportMemoryUsage):
2482         * loader/ResourceLoader.cpp:
2483         (WebCore::ResourceLoader::reportMemoryUsage):
2484         * loader/cache/CachedImage.cpp:
2485         (WebCore::CachedImage::reportMemoryUsage):
2486         * page/Page.cpp:
2487         (WebCore::Page::reportMemoryUsage):
2488
2489 2013-01-13  Levi Weintraub  <leviw@chromium.org>
2490
2491         Unreviewed gardening. Rolling out r139537. It broke platforms without sub-pixel layout.
2492
2493         * dom/Element.cpp:
2494         (WebCore::Element::offsetWidth):
2495         (WebCore::Element::offsetHeight):
2496         (WebCore::Element::clientWidth):
2497         (WebCore::Element::clientHeight):
2498         * rendering/RenderObject.h:
2499         (WebCore::adjustLayoutUnitForAbsoluteZoom):
2500         * rendering/style/RenderStyle.h:
2501         (WebCore::adjustLayoutUnitForAbsoluteZoom):
2502
2503 2013-01-13  Dima Gorbik  <dgorbik@apple.com>
2504
2505         Styling disappears from the cue that's being styled by ::cue pseudo element
2506         https://bugs.webkit.org/show_bug.cgi?id=106723
2507
2508         Reviewed by Antti Koivisto.
2509
2510         Fixes a regression caused by r138966. Setting a pseudoId in TextTrackCue::updateDisplayTree for m_allDocumentNodes
2511         was triggering recalculating styles the next run loop. Now when this was removed we append the WebVTT tree after its children have
2512         been marked by markFutureAndPastNodes so that correct styles are set within this append call.
2513
2514         Test: media/track/track-css-cue-lifetime.html
2515
2516         * html/track/TextTrackCue.cpp:
2517         (WebCore::TextTrackCue::markFutureAndPastNodes): changing the type of the first argument because DocumentFragment is not a subclass
2518         of Element.
2519         (WebCore::TextTrackCue::updateDisplayTree): appending the WebVTT rendering tree after its children have been marked properly.
2520         * html/track/TextTrackCue.h:
2521         (TextTrackCue):
2522
2523 2013-01-12  David Grogan  <dgrogan@chromium.org>
2524
2525         IndexedDB: Provide LevelDB with IDBEnv instead of Env::Default
2526         https://bugs.webkit.org/show_bug.cgi?id=106135
2527
2528         Reviewed by Tony Chang.
2529
2530         IDBEnv only changes the name of the histogram where errors are logged.
2531
2532         * platform/leveldb/LevelDBDatabase.cpp:
2533         (WebCore::LevelDBDatabase::destroy):
2534         (WebCore::LevelDBDatabase::open):
2535         (WebCore::LevelDBDatabase::openInMemory):
2536
2537 2013-01-12  Gavin Peters  <gavinp@chromium.org>
2538
2539         Regression(r119759): Heap-use-after-free in webkit_glue::WebURLLoaderImpl::Context::OnReceivedResponse
2540         https://bugs.webkit.org/show_bug.cgi?id=103563
2541
2542         A subresource could receive a body on a 404 if its call to CachedResource::error() resulted in a nested message loop.
2543         That caused a crash when data was received, as the Subresource was in the Finished state already. Now when receiving
2544         data we ignore these bodies, avoiding the crash.
2545
2546         Reviewed by Nate Chapin.
2547
2548         No new tests in WebKit, since it required a nested message loop which isn't present in chromium DumpRender tree.
2549         There's a Chrome side browser test, see https://codereview.chromium.org/11778083/
2550
2551         * loader/SubresourceLoader.cpp:
2552         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
2553
2554 2013-01-12  Robert Hogan  <robert@webkit.org>
2555
2556         Available height should respect min and max height
2557         https://bugs.webkit.org/show_bug.cgi?id=106479
2558
2559         Reviewed by Ojan Vafai.
2560         
2561         When calculating a relative positioned block's offset as a percentage of its container, respect the min
2562         and max height set on the container
2563
2564         Tests: fast/block/percent-top-respects-max-height.html
2565                fast/block/percent-top-respects-min-height.html
2566
2567         * rendering/RenderBox.cpp:
2568         (WebCore::RenderBox::availableLogicalHeight):
2569
2570 2013-01-12  Victor Carbune  <victor@rosedu.org>
2571
2572         CC Button doesn't always show up
2573         https://bugs.webkit.org/show_bug.cgi?id=106653
2574
2575         Reviewed by Eric Carlson.
2576
2577         Added extra checks to existing test.
2578
2579         * html/shadow/MediaControls.cpp:
2580         (WebCore::MediaControls::closedCaptionTracksChanged):
2581         Enforced visibility of captions button whenever the track list changes.
2582         (WebCore):
2583         * html/shadow/MediaControls.h:
2584         (MediaControls):
2585
2586 2013-01-11  Dan Beam  <dbeam@chromium.org>
2587
2588         [clean up] Remove HTMLFormElement::AutocompleteResultError in favor of more specific Error reasons
2589         https://bugs.webkit.org/show_bug.cgi?id=106610
2590
2591         Reviewed by Darin Fisher.
2592
2593         No new tests (none needed).
2594
2595         * html/HTMLFormElement.cpp: 
2596         (WebCore::HTMLFormElement::finishRequestAutocomplete): Removed handling of AutocompleteResultError.
2597         * html/HTMLFormElement.h: Removed HTMLFormElement::AutocompleteResultError in favor of more specific errors.
2598
2599 2013-01-10  Filip Pizlo  <fpizlo@apple.com>
2600
2601         JITThunks should not compile only because of luck
2602         https://bugs.webkit.org/show_bug.cgi?id=105696
2603
2604         Rubber stamped by Sam Weinig.
2605
2606         All .cpp files that use the JSC internal API must now transitively include
2607         Operations.h, and none of the major JSC headers do it for you to avoid
2608         circularity. WebCore doesn't have to worry about circularity with JSC, so
2609         this changes all of the major WebCore JSC base headers to include
2610         Operations.h.
2611
2612         * bindings/js/BindingState.h:
2613         * bindings/js/JSArrayBufferViewHelper.h:
2614         * bindings/js/JSCustomXPathNSResolver.h:
2615         * bindings/js/JSDOMBinding.h:
2616         * bindings/js/JSDOMGlobalObject.h:
2617         * bindings/js/JSDictionary.h:
2618         * bindings/js/JSMessagePortCustom.h:
2619         * bindings/js/JSNodeFilterCondition.h:
2620         * bindings/js/ScriptValue.h:
2621         * bindings/js/ScriptWrappable.h:
2622         * bindings/js/SerializedScriptValue.cpp:
2623         * bridge/c/c_utility.h:
2624         * bridge/jsc/BridgeJSC.h:
2625         * dom/Node.cpp:
2626         * html/HTMLCanvasElement.cpp:
2627         * html/HTMLImageLoader.cpp:
2628         * plugins/efl/PluginViewEfl.cpp:
2629         * xml/XMLHttpRequest.cpp:
2630
2631 2013-01-11  Emil A Eklund  <eae@chromium.org>
2632
2633         offsetWidth/height incorrect for images when zoomed
2634         https://bugs.webkit.org/show_bug.cgi?id=106624
2635
2636         Reviewed by Levi Weintraub.
2637         
2638         offsetWidth and height are incorrect for images at certain zoom
2639         levels due to flooring the values ones adjusted for zoom.
2640         By rounding the value instead we avoid the problem and return
2641         the right size.
2642
2643         Test: fast/images/zoomed-offset-size.html
2644
2645         * dom/Element.cpp:
2646         (WebCore::Element::offsetWidth):
2647         (WebCore::Element::offsetHeight):
2648         (WebCore::Element::clientWidth):
2649         (WebCore::Element::clientHeight):
2650         Change to round (as opposed to floor) the zoom adjusted value.
2651         
2652         * rendering/RenderObject.h:
2653         (WebCore::adjustLayoutUnitForAbsoluteZoom):
2654         * rendering/style/RenderStyle.h:
2655         (WebCore::adjustLayoutUnitForAbsoluteZoom):
2656         Add LayoutUnit version of adjustForAbsoluteZoom to avoid float
2657         conversion.
2658
2659 2013-01-11  Ojan Vafai  <ojan@chromium.org>
2660
2661         Fixed width overrides intrinsic min-width/max-width for text inputs and listboxes
2662         https://bugs.webkit.org/show_bug.cgi?id=106675
2663
2664         Reviewed by Emil A Eklund.
2665
2666         Implement computeIntrinsicLogicalWidths so that RenderBox::computeLogicalWidthInRegionUsing
2667         can get the correct intrinsic sizes instead of the preferred sizes.
2668
2669         Test: fast/forms/select/listbox-intrinsic-min-width-applies-with-fixed-width.html
2670
2671         * rendering/RenderListBox.cpp:
2672         (WebCore::RenderListBox::computeIntrinsicLogicalWidths):
2673         (WebCore):
2674         (WebCore::RenderListBox::computePreferredLogicalWidths):
2675         * rendering/RenderListBox.h:
2676         (RenderListBox):
2677         * rendering/RenderTextControl.cpp:
2678         (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
2679         (WebCore):
2680         (WebCore::RenderTextControl::computePreferredLogicalWidths):
2681         * rendering/RenderTextControl.h:
2682         (RenderTextControl):
2683
2684 2013-01-10  Ojan Vafai  <ojan@chromium.org>
2685
2686         Setting width overrides intrinsic min-width/max-width on flexboxes and their subclasses
2687         https://bugs.webkit.org/show_bug.cgi?id=106617
2688
2689         Reviewed by Tony Chang.
2690
2691         Override computeIntrinsicLogicalWidths for all RenderFlexibleBox and RenderDeprecatedFlexibleBox
2692         classes that override computePreferredLogicalWidths so that RenderBox can use
2693         computeIntrinsicLogicalWidths in order to get the correct intrinsic values.
2694
2695         Tests: css3/flexbox/intrinsic-min-width-applies-with-fixed-width.html
2696                fast/flexbox/intrinsic-min-width-applies-with-fixed-width.html
2697                fast/forms/select/intrinsic-min-width-applies-with-fixed-width.html
2698
2699         * rendering/RenderBox.cpp:
2700         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
2701         fit-content needs to use the intrinsic sizes not the preferred sizes
2702         since a fixed width overrides the preferred size.
2703         As best I can tell, the sizesLogicalWidthToFitContent codepath can keep
2704         using preferred widths, which are considerably faster, since that's only used
2705         computing width values. Added a clause to that if-statement to make this more
2706         explicit.
2707
2708         * rendering/RenderDeprecatedFlexibleBox.cpp:
2709         (WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
2710         (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
2711         * rendering/RenderDeprecatedFlexibleBox.h:
2712         (RenderDeprecatedFlexibleBox):
2713         * rendering/RenderFlexibleBox.cpp:
2714         (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
2715         (WebCore):
2716         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
2717         * rendering/RenderFlexibleBox.h:
2718         * rendering/RenderMenuList.cpp:
2719         (WebCore::RenderMenuList::computeIntrinsicLogicalWidths):
2720         (WebCore):
2721         (WebCore::RenderMenuList::computePreferredLogicalWidths):
2722         * rendering/RenderMenuList.h:
2723         (RenderMenuList):
2724         * rendering/RenderSlider.cpp:
2725         (WebCore::RenderSlider::computeIntrinsicLogicalWidths):
2726         (WebCore):
2727         (WebCore::RenderSlider::computePreferredLogicalWidths):
2728         * rendering/RenderSlider.h:
2729         (RenderSlider):
2730         No logic changes in any of these computeIntrinsic methods. Just moving
2731         the code over from the computePreferred methods.
2732
2733 2013-01-11  Tony Gentilcore  <tonyg@chromium.org>
2734
2735         Move HTMLTokenTypes to its own file
2736         https://bugs.webkit.org/show_bug.cgi?id=106722
2737
2738         Reviewed by Levi Weintraub.
2739
2740         Also mark AtomicHTMLToken ctor as explicit.
2741
2742         No new tests because no new functionality.
2743
2744         * GNUmakefile.list.am:
2745         * Target.pri:
2746         * WebCore.gypi:
2747         * WebCore.vcproj/WebCore.vcproj:
2748         * WebCore.xcodeproj/project.pbxproj:
2749         * html/parser/HTMLToken.h:
2750         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
2751         * html/parser/HTMLTokenTypes.h: Added.
2752         (WebCore):
2753         (HTMLTokenTypes):
2754         (DoctypeData):
2755         (WebCore::HTMLTokenTypes::DoctypeData::DoctypeData):
2756
2757 2013-01-11  Elliott Sprehn  <esprehn@chromium.org>
2758
2759         No need to initialize RefPtrs to 0 in ElementRareData
2760         https://bugs.webkit.org/show_bug.cgi?id=106717
2761
2762         Reviewed by Ryosuke Niwa.
2763
2764         RefPtrs initialize themself to null, so there's no reason
2765         to do it manually. This was code leftover from when
2766         PseudoElements were stored in bare ptrs instead of in
2767         RefPtrs.
2768
2769         No new tests, just refactoring.
2770
2771         * dom/ElementRareData.h:
2772         (WebCore::ElementRareData::ElementRareData):
2773
2774 2013-01-11  Huang Dongsung  <luxtella@company100.net>
2775
2776         [TexMap] Rename current[Transform|Opacity|Filters] in TextureMapperLayer.
2777         https://bugs.webkit.org/show_bug.cgi?id=105760
2778
2779         Reviewed by Noam Rosenthal.
2780
2781         TextureMapperLayer has two transform members: an original value and a
2782         changeable value. The changeable value would be changed by animations.
2783         This patch puts 'current' prefix on the changeable value to clarify
2784         its purpose. Opacity and filters ditto.
2785
2786         No new tests. Refactoring only.
2787
2788         * platform/graphics/texmap/TextureMapperLayer.cpp:
2789         (WebCore::TextureMapperLayer::computeTransformsRecursive):
2790         (WebCore::TextureMapperLayer::paintSelf):
2791         (WebCore::TextureMapperLayer::paintSelfAndChildren):
2792         (WebCore::TextureMapperLayer::intermediateSurfaceRect):
2793         (WebCore::TextureMapperLayer::shouldPaintToIntermediateSurface):
2794         (WebCore::TextureMapperLayer::isVisible):
2795         (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
2796         (WebCore::TextureMapperLayer::paintRecursive):
2797         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
2798         (WebCore::TextureMapperLayer::syncAnimations):
2799         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
2800         * platform/graphics/texmap/TextureMapperLayer.h:
2801         (WebCore::TextureMapperLayer::TextureMapperLayer):
2802         (TextureMapperLayer):
2803         (WebCore::TextureMapperLayer::State::State):
2804
2805 2013-01-11  Tony Gentilcore  <tonyg@chromium.org>
2806
2807         Move constructTreeFromHTMLToken into HTMLDocumentParser
2808         https://bugs.webkit.org/show_bug.cgi?id=106694
2809
2810         Reviewed by Adam Barth.
2811
2812         This way it will sit parallel to a new constructTreeFromCompactHTMLToken method.
2813
2814         No new tests because no new functionality.
2815
2816         * html/parser/HTMLDocumentParser.cpp:
2817         (WebCore::HTMLDocumentParser::pumpTokenizer):
2818         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
2819         (WebCore):
2820         * html/parser/HTMLDocumentParser.h:
2821         * html/parser/HTMLTreeBuilder.cpp:
2822         * html/parser/HTMLTreeBuilder.h:
2823         (HTMLTreeBuilder):
2824
2825 2013-01-11  Robert Iannucci  <iannucci@chromium.org>
2826
2827         Explicitly set msvs_cygwin_shell to true for actions in WebKit
2828         https://bugs.webkit.org/show_bug.cgi?id=106706
2829
2830         Reviewed by Tony Chang.
2831
2832         Currently, msvs_cygwin_shell is set to 1 by default. This patch
2833         explicitly sets it on the actions which will break if msvs_cygwin_shell
2834         were set to 0. This is in preparation for changing the default value of
2835         msvs_cygwin_shell, which in turn is in preparation of the removal of
2836         cygwin as a buld-system requirement.
2837
2838         Since this change will have no semantic effect, no new tests are
2839         required.
2840
2841         * WebCore.gyp/WebCore.gyp:
2842
2843 2013-01-11  Joshua Bell  <jsbell@chromium.org>
2844
2845         IndexedDB: IDBTransaction should manage lifetime of IDBRequests
2846         https://bugs.webkit.org/show_bug.cgi?id=106678
2847
2848         Reviewed by Tony Chang.
2849
2850         Ensure reference count of IDBRequests don't bounce off zero if there are no script
2851         references are while the events are arriving.
2852
2853         No new tests - no detectable behavior changes.
2854
2855         * Modules/indexeddb/IDBRequest.cpp:
2856         (WebCore::IDBRequest::create): Register with transaction (which now takes a ref) here to...
2857         (WebCore::IDBRequest::IDBRequest): ...avoid having to relax adoption requirements here.
2858         * Modules/indexeddb/IDBTransaction.cpp: Keep RefPtr<>s to outstanding requests.
2859         (WebCore::IDBTransaction::~IDBTransaction):
2860         (WebCore::IDBTransaction::abort):
2861         (WebCore::IDBTransaction::onAbort):
2862         * Modules/indexeddb/IDBTransaction.h:
2863
2864 2013-01-11  James Simonsen  <simonjam@chromium.org>
2865
2866         [Resource Timing] XMLHttpRequests should have initiator type 'xmlhttprequest'
2867         https://bugs.webkit.org/show_bug.cgi?id=106409
2868
2869         Reviewed by Nate Chapin.
2870
2871         The initiator is passed through ThreadableLoaderOptions to the CachedResourceRequest. This is
2872         optional, so other users of ThreadableLoader will have the default initiator of 'request'. Note
2873         that synchronous XHRs don't show up in the Resource Timing buffer yet.
2874
2875         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_initiator_types.html
2876
2877         * loader/DocumentThreadableLoader.cpp:
2878         (WebCore::DocumentThreadableLoader::loadRequest):
2879         * loader/ThreadableLoader.h:
2880         (ThreadableLoaderOptions):
2881         * loader/cache/CachedResourceRequestInitiators.cpp:
2882         (WebCore::CachedResourceRequestInitiators::CachedResourceRequestInitiators):
2883         * loader/cache/CachedResourceRequestInitiators.h:
2884         (CachedResourceRequestInitiators):
2885         * xml/XMLHttpRequest.cpp:
2886         (WebCore::XMLHttpRequest::createRequest):
2887
2888 2013-01-11  James Simonsen  <simonjam@chromium.org>
2889
2890         Restore old semantics to webkitRequestAnimationFrame callbacks
2891         https://bugs.webkit.org/show_bug.cgi?id=106697
2892
2893         Reviewed by James Robinson.
2894
2895         Sites that use GWT <= 2.4 are buggy and rely on Date.now()-like callback values.
2896         We'll restore that behavior to the prefixed version of webkitRequestAnimationFrame.
2897         requestAnimationFrame will continue to follow the spec.
2898
2899         Test: fast/animation/request-animation-frame-prefix.html
2900
2901         * dom/RequestAnimationFrameCallback.h:
2902         (RequestAnimationFrameCallback):
2903         * dom/ScriptedAnimationController.cpp:
2904         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
2905         * page/DOMWindow.cpp:
2906         (WebCore::DOMWindow::requestAnimationFrame):
2907         (WebCore):
2908         (WebCore::DOMWindow::webkitRequestAnimationFrame):
2909         * page/DOMWindow.h:
2910         (DOMWindow):
2911         * page/DOMWindow.idl:
2912
2913 2013-01-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2914
2915         Unreviewed, rolling out r139044.
2916         http://trac.webkit.org/changeset/139044
2917         https://bugs.webkit.org/show_bug.cgi?id=106702
2918
2919         Caused various scrolling anomolies on Mac with drag and drop
2920         (Requested by smfr on #webkit).
2921
2922         * page/AutoscrollController.cpp:
2923         (WebCore::AutoscrollController::AutoscrollController):
2924         (WebCore::AutoscrollController::autoscrollTimerFired):
2925         * page/AutoscrollController.h:
2926         (WebCore):
2927         (AutoscrollController):
2928         * page/EventHandler.cpp:
2929         (WebCore::EventHandler::updateDragAndDrop):
2930         * rendering/RenderBox.cpp:
2931         (WebCore):
2932         (WebCore::RenderBox::autoscroll):
2933         * rendering/RenderBox.h:
2934         (RenderBox):
2935         * rendering/RenderLayer.cpp:
2936         (WebCore::RenderLayer::autoscroll):
2937         * rendering/RenderLayer.h:
2938         (RenderLayer):
2939         * rendering/RenderListBox.cpp:
2940         (WebCore::RenderListBox::autoscroll):
2941         * rendering/RenderListBox.h:
2942         (RenderListBox):
2943         * rendering/RenderTextControlSingleLine.cpp:
2944         (WebCore::RenderTextControlSingleLine::autoscroll):
2945         * rendering/RenderTextControlSingleLine.h:
2946         (RenderTextControlSingleLine):
2947
2948 2013-01-11  Rafael Weinstein  <rafaelw@chromium.org>
2949
2950         Prevent HTMLPreloadScanner from fetching resources inside <template>
2951         https://bugs.webkit.org/show_bug.cgi?id=106687
2952
2953         Reviewed by Adam Barth.
2954
2955         This patch adds a simple counter to the preload scanner which increments on template start
2956         tag and decrements on template element. It only fetchs resources when the counter is at zero
2957         (i.e. for elements not contained by a template element).
2958
2959         Test re-enabled within fast/dom/HTMLTemplateElement/inertContents.html
2960
2961         * html/parser/HTMLPreloadScanner.cpp:
2962         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
2963         (WebCore::HTMLPreloadScanner::processToken):
2964         * html/parser/HTMLPreloadScanner.h:
2965         (HTMLPreloadScanner):
2966
2967 2013-01-11  Tony Gentilcore  <tonyg@chromium.org>
2968
2969         We should be able to checkpoint and restore the HTMLTokenizer across threads
2970         https://bugs.webkit.org/show_bug.cgi?id=106597
2971
2972         Based on patch by Adam Barth.
2973
2974         This has the ability to create a checkpoint any time the parser is blocked on a script.
2975         We clear m_appropriateEndTagName after each end tag is flushed so that the ASSERT in
2976         canCreateCheckpoint() will pass.
2977
2978         Reviewed by Adam Barth.
2979
2980         No new tests because no new functionality.
2981
2982         * html/parser/HTMLDocumentParser.cpp:
2983         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
2984         (WebCore::HTMLDocumentParser::pumpTokenizer):
2985         * html/parser/HTMLDocumentParser.h:
2986         (WebCore):
2987         (HTMLDocumentParser):
2988         * html/parser/HTMLTokenizer.cpp:
2989         (WebCore):
2990         (WebCore::HTMLTokenizer::canCreateCheckpoint):
2991         (WebCore::HTMLTokenizer::createCheckpoint):
2992         (WebCore::HTMLTokenizer::restoreFromCheckpoint):
2993         * html/parser/HTMLTokenizer.h:
2994         (HTMLTokenizer):
2995         (Checkpoint):
2996         (WebCore::HTMLTokenizer::Checkpoint::Checkpoint):
2997         * xml/parser/MarkupTokenizerBase.h:
2998         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::InputStreamPreprocessor):
2999         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::skipNextNewLine):
3000         (InputStreamPreprocessor):
3001         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::reset):
3002
3003 2013-01-11  Tony Chang  <tony@chromium.org>
3004
3005         [chromium] Don't regenerate all bindings when any idl file changes
3006         https://bugs.webkit.org/show_bug.cgi?id=106604
3007
3008         Reviewed by Kentaro Hara.
3009
3010         Currently, every idl file is a dependency of generating the supplemental dependency map
3011         and generating bindings is a dependency of the map. This means that touching any idl file
3012         causes us to regenerate all the bindings.
3013
3014         Change it so that generating bindings only depends on the idl files that have Supplemental= in them.
3015         We only have 24 idl files with Supplemental (3.7% of the 638 idl files in WebCore) so modifying
3016         any of those will cause all bindings to be regenerated.
3017
3018         If you add or remove a new idl file, you have to rerun gyp which will fix up any dependencies.
3019         If you edit an existing file and add Supplemental= to it, you will now need to rerun gyp_{webkit,chromium}.
3020         I think that's a reasonable tradeoff since it seems highly unlikely that you would adding Supplemental=
3021         to an existing file without renaming it. The bots will always be fine because they always run
3022         gyp after updating.
3023
3024         No new tests, this is a build only change.
3025
3026         * WebCore.gyp/WebCore.gyp: Remove <(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp, which was causing
3027         the full rebuild. The step to generate this file is still a hard dependency so it will still be generated and
3028         used by generate-bindings.pl. Also remove <@(webcore_test_support_idl_files). This was saying we should regenerate
3029         all bindings if a test idl file changed. That doesn't make sense.
3030         * WebCore.gyp/scripts/supplemental_idl_files.py: Added.
3031         (DoMain):
3032
3033 2013-01-11  Alexandru Chiculita  <achicu@adobe.com>
3034
3035         Element is displayed behind a composited layer when clipping is used on a previous element
3036         https://bugs.webkit.org/show_bug.cgi?id=104981
3037
3038         Reviewed by Simon Fraser.
3039
3040         RenderLayerCompositor::computeCompositingRequirements uses the local bounding box of the layers to optimize the number of composited 
3041         layers that are created. That's needed in order to make sure that composited layers that are displayed behind non-composited
3042         layers are correctly promoting the layers in front to be composited. Otherwise the non-composited layers are rendered
3043         in the parent composited layer, displaying behind the other composited layers. That might be wrong as the correct paint order might not be
3044         preserved.
3045
3046         In order to make animations work, there's a flag that will disable that optimization. That's because the animations run in the platform
3047         layer and the platform layer doesn't know about the layers that are not promoted to composited layers. When the overlapping of the layers
3048         is computed it just uses the start or the stop state, but no intermediate states. For that reason, all the 'top' layers in front of animated 
3049         elements will become composited.
3050
3051         When an animation has a clipping rectangle, then we know for sure that the animation is going to be contained inside the clip area, so WebKit 
3052         uses the bounding box of the clipping area to detect the overlapping layers, so there's no need to disable the optimization in that case.
3053
3054         However, if there is a different animation displaying behind the clipping container, we cannot safely disable that optimization anymore. That's
3055         because we still don't know what are the intermediate states of that particular animated layer. The bug was that the optimization was re-enabled
3056         anyway, even in this particular case.
3057
3058         In order to fix it, I changed the logic, so that instead of re-enabling the optimization after a clipping container, it will just avoid to propagate 
3059         the internal state to the following layers when there's no need to so.
3060
3061         Note that 3D transforms behave like animations for now and disable the optimization. Because of that some of the existing tests ended up
3062         creating more layers than needed. That's because the tests had an overflow area that recreated the issue that this patch fixes, but with
3063         3D transforms instead of animations. 3D transforms will be treated in a separate patch.
3064
3065         Tests: compositing/layer-creation/overlap-animation-clipping.html
3066                compositing/layer-creation/overlap-animation-container.html
3067
3068         * rendering/RenderLayerCompositor.cpp:
3069         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3070
3071 2013-01-11  Philip Rogers  <pdr@google.com>
3072
3073         Skip CachedImage::CreateImage if we don't have image data
3074         https://bugs.webkit.org/show_bug.cgi?id=106156
3075
3076         Reviewed by Nate Chapin.
3077
3078         This patch skips image creation if we do not have image data. This can occur during
3079         cache revalidation when the revalidation request (304 not modified) comes back without
3080         any content. In this revalidation case, the http spec requires that a mimetype not be set
3081         on the response to prevent a cached resource from having a different mimetype
3082         from the revalidated resource. Because revalidation requests do not have a mimetype,
3083         CachedImage::CreateImage() will fail on SVG images. This patch prevents
3084         CachedImage::CreateImage() from being called during revalidation.
3085
3086         No new tests as there are no observable changes from this patch.
3087
3088         * loader/cache/CachedImage.cpp:
3089         (WebCore::CachedImage::data):
3090
3091 2013-01-11  Kentaro Hara  <haraken@chromium.org>
3092
3093         Unreviewed. Rebaselined run-bindings-tests.
3094
3095         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3096         (WebCore::TestEventConstructorV8Internal::attr1AttrGetter):
3097         (WebCore::TestEventConstructorV8Internal::attr2AttrGetter):
3098         * bindings/scripts/test/V8/V8TestException.cpp:
3099         (WebCore::TestExceptionV8Internal::nameAttrGetter):
3100         * bindings/scripts/test/V8/V8TestInterface.cpp:
3101         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetter):
3102         (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter):
3103         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter):
3104         * bindings/scripts/test/V8/V8TestObj.cpp:
3105         (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter):
3106         (WebCore::TestObjV8Internal::staticStringAttrAttrGetter):
3107         (WebCore::TestObjV8Internal::stringAttrAttrGetter):
3108         (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter):
3109         (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter):
3110         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter):
3111         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter):
3112         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter):
3113         (WebCore::TestObjV8Internal::hashAttrGetter):
3114         (WebCore::TestObjV8Internal::conditionalMethod1Callback):
3115
3116 2013-01-11  Levi Weintraub  <leviw@chromium.org>
3117
3118         RenderGeometryMap and TransformState disagree with sub-pixel layout and translations
3119         https://bugs.webkit.org/show_bug.cgi?id=106047
3120
3121         Reviewed by Simon Fraser.
3122
3123         Mirror RenderGeometryMap's optimization for integer-translated transforms in TransformState.
3124         This avoids the current behavior where the two can disagree on mappings, since RenderGeometryMap
3125         pixel-snapped later when a translation occurred between two sub-pixel containers.
3126
3127         Test: fast/layers/geometry-map-transform-state-translation-mismatch.html
3128
3129         * platform/graphics/transforms/TransformState.h:
3130         (WebCore::TransformState::setQuad): Clear accumulatedOffset when setting a new quad. Note: this
3131         implementation only works properly when only tracking a quad.
3132         * platform/graphics/transforms/TransformState.cpp:
3133         (WebCore::TransformState::applyTransform): apply integral translations to the accumulatedOffset
3134         for performance and consistency with RenderGeometryMap.
3135
3136 2013-01-11  Abhishek Arya  <inferno@chromium.org>
3137
3138         Heap-use-after-free in WebCore::RenderText::computePreferredLogicalWidths
3139         https://bugs.webkit.org/show_bug.cgi?id=95901
3140
3141         Reviewed by Simon Fraser.
3142
3143         Prevent re-entrancy of view layout. Loading of SVG document during font load
3144         causes it to re-enter layout and blowing the style away from underneath.
3145         
3146         Test: Go to http://www.speckproducts.com and make sure crash does not happen.
3147
3148         * dom/Document.cpp:
3149         (WebCore::Document::updateLayout):
3150
3151 2013-01-11  Kentaro Hara  <haraken@chromium.org>
3152
3153         [V8] Do not create a local handle for a cached v8 string that is returned to V8 immediately
3154         https://bugs.webkit.org/show_bug.cgi?id=106557
3155
3156         Reviewed by Adam Barth.
3157
3158         Currently we are always creating a local handle for a cached
3159         V8 string returned to V8:
3160
3161           Handle<Value> v8String(StringImpl* impl, Isolate* isolate) {
3162             ...;
3163             return Local<String>::New(isolate, m_cachedString);
3164           }
3165
3166         However, we don't need to create a local handle in a case
3167         where it is guaranteed that no V8 object allocation is conducted
3168         before a control flow returns back to V8. In particular, in a case
3169         where a cached V8 string is immediately returned to V8, we don't
3170         need to create a local handle:
3171
3172           Handle<Value> xxxxAttrGetter() {
3173             ...;
3174             return v8String(imp->xxxx(), isolate);  // This can return a persistent handle safely.
3175           }
3176
3177         This patch improves performance of div.id by 9.2%.
3178
3179         No tests. No change in behavior.
3180
3181         * bindings/scripts/CodeGeneratorV8.pm:
3182         (GenerateNormalAttrGetter):
3183         (GenerateCallbackImplementation):
3184         (GenerateFunctionCallString):
3185         (NativeToJSValue):
3186         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3187         (WebCore::TestEventConstructorV8Internal::attr1AttrGetter):
3188         (WebCore::TestEventConstructorV8Internal::attr2AttrGetter):
3189         * bindings/scripts/test/V8/V8TestException.cpp:
3190         (WebCore::TestExceptionV8Internal::nameAttrGetter):
3191         * bindings/scripts/test/V8/V8TestInterface.cpp:
3192         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetter):
3193         (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter):
3194         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter):
3195         * bindings/scripts/test/V8/V8TestObj.cpp:
3196         (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter):
3197         (WebCore::TestObjV8Internal::staticStringAttrAttrGetter):
3198         (WebCore::TestObjV8Internal::stringAttrAttrGetter):
3199         (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter):
3200         (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter):
3201         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter):
3202         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter):
3203         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter):
3204         (WebCore::TestObjV8Internal::hashAttrGetter):
3205         (WebCore::TestObjV8Internal::conditionalMethod1Callback):
3206         * bindings/v8/V8Binding.h:
3207         (WebCore::v8String):
3208         (WebCore::v8StringOrNull):
3209         (WebCore::v8StringOrUndefined):
3210         * bindings/v8/V8ValueCache.cpp:
3211         (WebCore::StringCache::v8ExternalStringSlow):
3212         * bindings/v8/V8ValueCache.h:
3213         (WebCore::StringCache::v8ExternalString):
3214         (StringCache):
3215
3216 2013-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
3217
3218         Unreviewed. Fix make distcheck.
3219
3220         * GNUmakefile.list.am: Add missing header files.
3221
3222 2013-01-11  Xianzhu Wang  <wangxianzhu@chromium.org>
3223
3224         RenderLayerCompositor should let ScrollingCoordinator update main thread scrolling reasons after change of layers
3225         https://bugs.webkit.org/show_bug.cgi?id=105652
3226
3227         Reviewed by Simon Fraser.
3228
3229         Let ScrollingCoordinator know the change of ViewportConstrainedNotCompositedReason in time.
3230         By the way moved RenderLayerCompositor::FixedPositionLayerNotCompositedReason to RenderLayer::ViewportConstrainedNotCompositedReason.
3231
3232         Tests: compositing/layer-creation/fixed-position-in-view-dynamic.html
3233                compositing/layer-creation/fixed-position-out-of-view-dynamic.html
3234
3235         * page/scrolling/ScrollingCoordinator.cpp:
3236         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
3237         (WebCore::ScrollingCoordinator::mainThreadScrollingReasons):
3238         (WebCore::ScrollingCoordinator::mainThreadScrollingReasonsAsText):
3239         * page/scrolling/ScrollingCoordinator.h:
3240         (ScrollingCoordinator):
3241         * page/scrolling/mac/ScrollingCoordinatorMac.h:
3242         (WebCore::ScrollingCoordinatorMac::hasVisibleSlowRepaintViewportConstrainedObjects):
3243         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
3244         (WebCore::logThreadedScrollingMode):
3245         * rendering/RenderLayer.cpp:
3246         (WebCore::RenderLayer::RenderLayer):
3247         (WebCore::RenderLayer::paintLayer):
3248         * rendering/RenderLayer.h:
3249         (RenderLayer): Moved RenderLayerCompositor::FixedPositionLayerNotCompositedReason to here and renamed it to ViewportConstrainedNotCompositedReason.
3250         (WebCore::RenderLayer::setViewportConstrainedNotCompositedReason):
3251         (WebCore::RenderLayer::viewportConstrainedNotCompositedReason):
3252         * rendering/RenderLayerCompositor.cpp:
3253         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3254         (WebCore::RenderLayerCompositor::updateBacking): Now updates ViewportConstrainedNotCompositedReason here instead of in computeCompositingRequirements before so that the reason is updated in time.
3255         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3256         (WebCore::RenderLayerCompositor::needsToBeComposited):
3257         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
3258         (WebCore::RenderLayerCompositor::reasonForCompositing):
3259         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
3260         (WebCore::RenderLayerCompositor::reportMemoryUsage):
3261         * rendering/RenderLayerCompositor.h:
3262         (RenderLayerCompositor):
3263
3264 2013-01-11  Kenneth Russell  <kbr@google.com>
3265
3266         [Chromium] WebGL typed array constructor crashes on exception
3267         https://bugs.webkit.org/show_bug.cgi?id=106308
3268
3269         Reviewed by Kentaro Hara.
3270
3271         Check for empty handles (indicating exception thrown) after calls
3272         into V8 VM.
3273
3274         Added new case from Khronos typed array conformance tests to
3275         fast/canvas/webgl/array-unit-tests.html.
3276
3277         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
3278         (WebCore::constructWebGLArray):
3279             Check for empty handles after calls into V8 VM.
3280
3281 2013-01-11  Kentaro Hara  <haraken@chromium.org>
3282
3283         [V8] Slightly optimize getWrapperFast()
3284         https://bugs.webkit.org/show_bug.cgi?id=106667
3285
3286         Reviewed by Adam Barth.
3287
3288         This patch improves an if condition in getWrapperFast(),
3289         as commented in DOMDataStore.h.
3290
3291         This patch improves performance of div.firstChild from
3292         15.1 ns to 14.0 ns (+7.8%), although I couldn't observe
3293         performance improvement in Dromaeo/dom-traverse.
3294
3295         No tests. No change in behavior.
3296
3297         * bindings/v8/DOMDataStore.h:
3298         (WebCore::DOMDataStore::getWrapperFast):
3299
3300 2013-01-11  Florin Malita  <fmalita@chromium.org>
3301
3302         [SVG] Suppress resource rebuilding for unattached and shadow elements
3303         https://bugs.webkit.org/show_bug.cgi?id=106664
3304
3305         Reviewed by Dirk Schulze.
3306
3307         SVGStyledElement::buildPendingResourcesIfNeeded() can be called while cloning a subtree
3308         (as nodes are inserted into the clone, while still detached) or when elements are inserted
3309         into the shadow tree. Both of these cases are problematic for SVGUseElement and can trigger
3310         indirect recursion in SVGUseElement::buildPendingResource.
3311
3312         Since shadow and !inDocument() nodes are of no interest to ID dependents (they cannot be
3313         found by ID in the document), the patch short-circuits buildPendingResource() for these
3314         cases.
3315
3316         Test: svg/custom/use-rebuild-resources-crash.svg
3317
3318         * svg/SVGStyledElement.cpp:
3319         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
3320
3321 2013-01-11  Dominic Mazzoni  <dmazzoni@google.com>
3322
3323         AX: Computed hierarchical level is not consistent with aria-level
3324         https://bugs.webkit.org/show_bug.cgi?id=106638
3325
3326         Reviewed by Chris Fleizach.
3327
3328         Make hierarchicalLevel computation 1-based to match the aria-level spec.
3329
3330         Extends an existing test: platform/mac/accessibility/aria-tree.html.
3331
3332         * accessibility/AccessibilityNodeObject.cpp:
3333         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
3334         * accessibility/AccessibilityObject.h:
3335         (AccessibilityObject):
3336         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
3337         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3338
3339 2013-01-11  Vsevolod Vlasov  <vsevik@chromium.org>
3340
3341         Web Inspector: Workspace should support several projects and should not have temporary UISourceCodes.
3342         https://bugs.webkit.org/show_bug.cgi?id=105856
3343
3344         Reviewed by Pavel Feldman.
3345
3346         Workspace now supports several projects with the networkProject being a main one.
3347         Replaced temporary UISourceCodes with specific projects (debugger and liveedit).
3348         The concept of workspace reset on navigation is now replaced with project reset concept instead.
3349         Introduced snippets project (that is not reset on navigation).
3350         Script mappings are now reset on GlobalObjectCleared event.
3351
3352         * inspector/front-end/BreakpointManager.js:
3353         (WebInspector.BreakpointManager):
3354         (WebInspector.BreakpointManager.prototype._innerSetBreakpoint):
3355         (WebInspector.BreakpointManager.prototype._filteredBreakpointLocations):
3356         (WebInspector.BreakpointManager.prototype.toggleAllBreakpoints):
3357         (WebInspector.BreakpointManager.prototype.removeAllBreakpoints):
3358         (WebInspector.BreakpointManager.prototype._projectWillReset.get for):
3359         (WebInspector.BreakpointManager.prototype._projectWillReset):
3360         * inspector/front-end/CSSStyleModel.js:
3361         (WebInspector.CSSStyleModel):
3362         (WebInspector.CSSStyleModel.prototype._inspectedURLChanged):
3363         (WebInspector.CSSStyleModel.prototype._resetSourceMappings):
3364         (WebInspector.CSSStyleModelResourceBinding):
3365         (WebInspector.CSSStyleModelResourceBinding.prototype._viaInspectorResourceURL):
3366         (WebInspector.CSSStyleModelResourceBinding.prototype._reset):
3367         * inspector/front-end/CompilerScriptMapping.js:
3368         (WebInspector.CompilerScriptMapping):
3369         (WebInspector.CompilerScriptMapping.prototype._debuggerReset):
3370         * inspector/front-end/DebuggerScriptMapping.js:
3371         * inspector/front-end/DefaultScriptMapping.js:
3372         (WebInspector.DefaultScriptMapping):
3373         (WebInspector.DefaultScriptMapping.prototype.addScript):
3374         (WebInspector.DefaultScriptMapping.prototype._debuggerReset):
3375         * inspector/front-end/ExtensionServer.js:
3376         (WebInspector.ExtensionServer.prototype._onGetPageResources):
3377         * inspector/front-end/FilteredItemSelectionDialog.js:
3378         (WebInspector.OpenResourceDialog.show):
3379         * inspector/front-end/LiveEditSupport.js:
3380         (WebInspector.LiveEditSupport):
3381         (WebInspector.LiveEditSupport.prototype.uiSourceCodeForLiveEdit):
3382         (WebInspector.LiveEditSupport.prototype._debuggerReset):
3383         * inspector/front-end/NetworkUISourceCodeProvider.js:
3384         (WebInspector.NetworkUISourceCodeProvider):
3385         (WebInspector.NetworkUISourceCodeProvider.prototype._mainFrameNavigated):
3386         (WebInspector.NetworkUISourceCodeProvider.prototype._addFile):
3387         (WebInspector.NetworkUISourceCodeProvider.prototype._reset):
3388         * inspector/front-end/ResourceScriptMapping.js:
3389         (WebInspector.ResourceScriptMapping):
3390         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAddedToWorkspace):
3391         (WebInspector.ResourceScriptMapping.prototype._debuggerReset):
3392         * inspector/front-end/RevisionHistoryView.js:
3393         (WebInspector.RevisionHistoryView):
3394         (WebInspector.RevisionHistoryView.prototype._projectWillReset):
3395         * inspector/front-end/SASSSourceMapping.js:
3396         (_bindUISourceCode):
3397         * inspector/front-end/ScriptSnippetModel.js:
3398         (WebInspector.ScriptSnippetModel):
3399         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
3400         (WebInspector.ScriptSnippetModel.prototype.reset):
3401         * inspector/front-end/ScriptsNavigator.js:
3402         * inspector/front-end/ScriptsPanel.js:
3403         (WebInspector.ScriptsPanel):
3404         (WebInspector.ScriptsPanel.prototype._addUISourceCode):
3405         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
3406         (WebInspector.ScriptsPanel.prototype._removeUISourceCodes):
3407         (WebInspector.ScriptsPanel.prototype._debuggerWasDisabled):
3408         (WebInspector.ScriptsPanel.prototype._debuggerReset):
3409         (WebInspector.ScriptsPanel.prototype._projectWillReset):
3410         (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation):
3411         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
3412         (WebInspector.ScriptsPanel.prototype.showGoToSourceDialog):
3413         * inspector/front-end/SimpleWorkspaceProvider.js:
3414         (WebInspector.SimpleWorkspaceProvider):
3415         (WebInspector.SimpleWorkspaceProvider.prototype.addFile):
3416         (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
3417         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
3418         * inspector/front-end/StylesSourceMapping.js:
3419         (WebInspector.StylesSourceMapping):
3420         (WebInspector.StylesSourceMapping.prototype._projectWillReset):
3421         * inspector/front-end/TabbedEditorContainer.js:
3422         (WebInspector.TabbedEditorContainer.prototype.reset):
3423         * inspector/front-end/UISourceCode.js:
3424         (WebInspector.UISourceCode.prototype.project):
3425         * inspector/front-end/Workspace.js:
3426         (WebInspector.WorkspaceController):
3427         (WebInspector.WorkspaceController.prototype._inspectedURLChanged):
3428         (WebInspector.Project):
3429         (WebInspector.Project.prototype.name):
3430         (WebInspector.Project.prototype.isServiceProject):
3431         (WebInspector.Project.prototype._reset):
3432         (WebInspector.Workspace):
3433         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
3434         (WebInspector.Workspace.prototype.uiSourceCodeForURI):
3435         (WebInspector.Workspace.prototype.addProject):
3436         (WebInspector.Workspace.prototype.project):
3437         (WebInspector.Workspace.prototype.projects):
3438         (WebInspector.Workspace.prototype.uiSourceCodes):
3439         (WebInspector.Workspace.prototype.projectForUISourceCode):
3440         (WebInspector.Workspace.prototype.requestFileContent):
3441         (WebInspector.Workspace.prototype.setFileContent):
3442         (WebInspector.Workspace.prototype.searchInFileContent):
3443         * inspector/front-end/inspector.js:
3444         * inspector/front-end/utilities.js:
3445
3446 2013-01-11  Eugene Klyuchnikov  <eustas@chromium.org>
3447
3448         Web Inspector: [Resources] Make grid columns set configurable.
3449         https://bugs.webkit.org/show_bug.cgi?id=105739
3450
3451         Reviewed by Pavel Feldman.
3452
3453         Added context menu on grid header to hide/show grid columns.
3454         Hidden columns set is persisted.
3455
3456         * inspector/front-end/DataGrid.js:
3457         Fixed show/hide behavior, introduced weight control.
3458         * inspector/front-end/NetworkPanel.js:
3459         Added member to track visibility of columns in detailerd mode. Added
3460         context menu for grid header.
3461
3462 2013-01-11  Andras Becsi  <andras.becsi@digia.com>
3463
3464         [Qt] Fix the build if libxslt is not available but libxml2 is
3465         https://bugs.webkit.org/show_bug.cgi?id=106661
3466
3467         Reviewed by Simon Hausmann.
3468
3469         On Linux building the xml parser sources fails if the needed libxslt
3470         dependencies are not installed but libxml2 is.
3471
3472         * WebCore.pri: add libxml2 to pkg-config if not on mac.
3473
3474 2013-01-11  Stephen Chenney  <schenney@chromium.org>
3475         Objects can be re-added to the AXObjectCache during removal
3476         https://bugs.webkit.org/show_bug.cgi?id=104171
3477
3478         The problem occurs when a label's corresponding element is a sibling
3479         that precedes it in the render tree, and the