NodeRenderingContext is slow due to ComposedShadowTreeWalker
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-13  Hajime Morrita  <morrita@google.com>
2
3         NodeRenderingContext is slow due to ComposedShadowTreeWalker
4         https://bugs.webkit.org/show_bug.cgi?id=104332
5
6         Reviewed by Dimitri Glazkov.
7
8         NodeRenderingContext has some slowness due to the complexity of
9         ComposedShadowTreeWalker that NRC relies on. This change
10         creates some fast paths to address such slowness.
11
12         = NodeRenderingTraversal module:
13
14         This change introduces NodeRenderingTraversal namespace, a sister
15         of NodeTraversal. NRT consists of a set of tree traversal
16         functions that is responsible for traversal in NRC.  Before this
17         change, NRC directly used CSTW. This NRT module hides and narrows
18         the usage of CSTW.
19
20         - Traversals provided by NRT have fast paths. In many case, such traversals
21           don't need to use CSTW and just goes to neighboring nodes in a plain DOM way.
22         - It also handles NRC specific traversal concerns like pseudo elements.
23           CSTW::pseudoAwareNextSibling() and CSTW::pseudoAwarePreviousSibling() are
24           merged into this module.
25         - CSTW::ParentTraversalDetails is moved and renamed to
26           NRT::ParentDetails with small modification. This is a pure
27           refactoring: As the name implies, This class is used only by NRC
28           and used during a traversal there.
29
30         NodeRenderingTraversal is an isolation layer between generic DOM and CSTW. This hides CSTW
31         behind the wall and will help further reduction of its usage.
32
33         = Node::NeedsShadowTreeWalkerFlag flag:
34
35         NRT fast path is enabled by newly introduced NeedsShadowTreeWalker
36         node flag. Each DOM node is now markd as NeedsShadowTreeWalker if
37         it requires non-trivial traversal in NRT which uses CSTW. This
38         means that each node can go fast path unless it is marked with this flag.
39
40         A node is marked as it NeedsShadowTreeWalker if:
41
42         - The node is a shadow boundary like InsertionPoint or ShadowRoot,
43         - The node has pseudo elements like generated content or
44         - The node is a pseudo element.
45
46         This criteria is defined in Node::needsShadowTreeWalkerSlow(). The node actually needs
47         the walker if the node or its parent is marked with this flag.
48
49         The original idea of this change was demonstrated by Antti Koivisto on bug 103208 and bug 104507.
50         This chagne has 2-3% speedup on Dromaeo/dom-modify/innerHTML on Apple Mac.
51
52         No new tests. Covered by existing tests.
53
54         * CMakeLists.txt:
55         * GNUmakefile.list.am:
56         * Target.pri:
57         * WebCore.gypi:
58         * WebCore.xcodeproj/project.pbxproj:
59         * dom/ComposedShadowTreeWalker.cpp:
60         * dom/ComposedShadowTreeWalker.h:
61         (ComposedShadowTreeWalker): Move some part to NodeRenderingTraversal
62         * dom/ContainerNode.h:
63         (WebCore::Node::needsShadowTreeWalker): Added. This is located here since it refers ContainerNode definition.
64         (WebCore):
65         * dom/DOMAllInOne.cpp:
66         * dom/Element.cpp:
67         (WebCore::Element::updatePseudoElement): Refactored.
68         (WebCore::Element::hasPseudoElements): Ditto.
69         (WebCore::Element::pseudoElement): Ditto.
70         (WebCore::Element::setPseudoElement): Refactored and added a flag update logic.
71         (WebCore):
72         * dom/Element.h:
73         (Element):
74         (WebCore::Element::beforePseudoElement): Refactored.
75         (WebCore::Element::afterPseudoElement): Refactored.
76         * dom/ElementRareData.h:
77         (WebCore::ElementRareData::hasPseudoElements): Factored out.
78         * dom/ElementShadow.cpp:
79         (WebCore::ElementShadow::addShadowRoot): Added a flag update logic.
80         * dom/Node.cpp:
81         (WebCore::Node::needsShadowTreeWalkerSlow): Added.
82         * dom/Node.h:
83         (WebCore::Node::isInsertionPointNode): Added.
84         (Node):
85         (WebCore::Node::isInsertionPoint): Changed to use NeedsShadowTreeWalkerFlag.
86         (WebCore::Node::setNeedsShadowTreeWalker):
87         (WebCore::Node::resetNeedsShadowTreeWalker):
88         * dom/NodeRenderingContext.cpp: Adopted NodeRenderingTraversal.
89         (WebCore::NodeRenderingContext::NodeRenderingContext):
90         (WebCore::NodeRenderingContext::nextRenderer):
91         (WebCore::NodeRenderingContext::previousRenderer):
92         (WebCore::NodeRenderingContext::parentRenderer):
93         (WebCore::NodeRenderingContext::shouldCreateRenderer):
94         * dom/NodeRenderingContext.h: Ditto.
95         (NodeRenderingContext):
96         (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle):
97         * dom/NodeRenderingTraversal.cpp: Added.
98         (WebCore):
99         (NodeRenderingTraversal):
100         (WebCore::NodeRenderingTraversal::ParentDetails::didTraverseInsertionPoint): Moved from ComposedShadowTreeWalker
101         (WebCore::NodeRenderingTraversal::ParentDetails::didTraverseShadowRoot): Ditto.
102         (WebCore::NodeRenderingTraversal::parentSlow): Ditto.
103         (WebCore::NodeRenderingTraversal::nextSiblingSlow): Ditto. The original was pseudoAwareNextSibling.
104         (WebCore::NodeRenderingTraversal::previousSiblingSlow): Ditto. The original was pseudoAwarePreviousSibling.
105         * dom/NodeRenderingTraversal.h: Added.
106         (WebCore):
107         (NodeRenderingTraversal):
108         (ParentDetails): Moved from ComposedShadowTreeWalker.
109         (WebCore::NodeRenderingTraversal::ParentDetails::ParentDetails):
110         (WebCore::NodeRenderingTraversal::ParentDetails::insertionPoint):
111         (WebCore::NodeRenderingTraversal::ParentDetails::resetStyleInheritance):
112         (WebCore::NodeRenderingTraversal::ParentDetails::outOfComposition):
113         (WebCore::NodeRenderingTraversal::ParentDetails::childWasOutOfComposition):
114         (WebCore::NodeRenderingTraversal::ParentDetails::operator==):
115         (WebCore::NodeRenderingTraversal::parent):
116         (WebCore::NodeRenderingTraversal::nextSibling):
117         (WebCore::NodeRenderingTraversal::previousSibling):
118         * dom/PseudoElement.cpp:
119         (WebCore::PseudoElement::PseudoElement): Added an assertion.
120         * dom/Text.cpp:
121         * html/HTMLOptGroupElement.cpp: Added a #include which revealed by a chagne on NodeRenderingContext.h
122         * html/HTMLOptionElement.cpp: Ditto.
123         * html/HTMLProgressElement.cpp: Dito.
124         * html/shadow/InsertionPoint.h: Added an override of isInsertionPointNode().
125
126 2012-12-13  Kent Tamura  <tkent@chromium.org>
127
128         Refactoring: Fix indentation of ChromeClient.h
129         https://bugs.webkit.org/show_bug.cgi?id=104989
130
131         Reviewed by Kentaro Hara.
132
133         The contents of an outermost namespace block should not be indented.
134         http://www.webkit.org/coding/coding-style.html#indentation-namespace
135
136         No behavior change.
137
138         * page/ChromeClient.h:
139
140 2012-12-13  Kunihiko Sakamoto  <ksakamoto@chromium.org>
141
142         Seconds/Minutes field of date/time input UI should respect step attribute
143         https://bugs.webkit.org/show_bug.cgi?id=104985
144
145         Reviewed by Kent Tamura.
146
147         This patch makes step-up/-down UI of the seconds and minutes fields respect
148         step attribute when possible.
149
150         Test: fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html
151
152         * html/shadow/DateTimeEditElement.cpp:
153         (DateTimeEditBuilder):
154         (WebCore::DateTimeEditBuilder::visitField): Compute step parameters for seconds and minutes fields, and pass it to the field element constructors.
155         (WebCore::DateTimeEditBuilder::createNumericFieldParameters): Added.
156         * html/shadow/DateTimeFieldElements.cpp:
157         (WebCore::DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement): Use Parameters instead of step and stepBase.
158         (WebCore::DateTimeMillisecondFieldElement::create): Ditto.
159         (WebCore::DateTimeMinuteFieldElement::DateTimeMinuteFieldElement): Add Parameters argument.
160         (WebCore::DateTimeMinuteFieldElement::create): Ditto.
161         (WebCore::DateTimeSecondFieldElement::DateTimeSecondFieldElement): Ditto.
162         (WebCore::DateTimeSecondFieldElement::create): Ditto.
163         * html/shadow/DateTimeFieldElements.h:
164         (DateTimeMillisecondFieldElement): Use Parameters instead of step and stepBase.
165         (DateTimeMinuteFieldElement): Add Parameters argument.
166         (DateTimeSecondFieldElement): Ditto.
167         * html/shadow/DateTimeNumericFieldElement.cpp:
168         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement): Use Parameters instead of step and stepBase.
169         * html/shadow/DateTimeNumericFieldElement.h:
170         (DateTimeNumericFieldElement):
171         (WebCore::DateTimeNumericFieldElement::Parameters::Parameters):
172         (Parameters): Added.
173
174 2012-12-13  Filip Pizlo  <fpizlo@apple.com>
175
176         Attempt to rationalize and simplify WTF::binarySearch
177         https://bugs.webkit.org/show_bug.cgi?id=104890
178
179         Reviewed by Maciej Stachowiak.
180
181         Switch to using the new binarySearch() API. No change in behavior, so no new tests.
182
183         * svg/animation/SVGSMILElement.cpp:
184         (WebCore::SVGSMILElement::findInstanceTime):
185
186 2012-12-13  Takashi Sakamoto  <tasak@google.com>
187
188         [Shadow DOM]: scoped styles are not applied in the cascade order.
189         https://bugs.webkit.org/show_bug.cgi?id=103239
190
191         Reviewed by Dimitri Glazkov.
192
193         If the scoping elements of two declarations have an ancestor/
194         descendant relationship, the declaration whose scoping element is
195         the descendant should win.
196         c.f. http://dev.w3.org/csswg/css3-cascade/#cascade
197
198         Test: fast/css/style-scoped/style-scoped-nested.html
199               fast/css/style-scoped/style-scoped-with-important-rule.html
200
201         * css/RuleSet.cpp:
202         (WebCore::RuleSet::addRule):
203         Removed specificity for @host @-rules. Now @host @-rules use the
204         cascading order instead.
205         * css/RuleSet.h:
206         Removed increaseSpecificity. The method is used by only @host @-rules.
207         * css/StyleResolver.cpp:
208         (WebCore::StyleResolver::matchScopedAuthorRules):
209         (WebCore::StyleResolver::matchHostRules):
210         (WebCore::StyleResolver::matchAuthorRules):
211         Modified to invoke sortAndTransferMatchedRules per scoping element.
212         The order of "matchXXXRules" must be the same as the cascading order.
213         So matchHostRules was invoked after collecting all scoped author rules.
214         * css/StyleScopeResolver.cpp:
215         (WebCore::StyleScopeResolver::addHostRule):
216         Removed RuleIsHostRule. We don't need the flag.
217         * html/HTMLStyleElement.cpp:
218         (WebCore::HTMLStyleElement::registerWithScopingNode):
219         Needs to pass the last test case of style-scoped-nested.html.
220         When appending some style element to a shadow root, we should recalc
221         styles of all elements in the shadow dom tree. And if the style
222         element has @host @-rules, we have to update the host's style.
223
224 2012-12-13  Filip Pizlo  <fpizlo@apple.com>
225
226         MediaPlayerPrivateAVFoundation::m_inbandTrackConfigurationPending is unused except when HAVE(AVFOUNDATION_TEXT_TRACK_SUPPORT)
227         https://bugs.webkit.org/show_bug.cgi?id=104987
228
229         Rubber stamped by Michael Saboff.
230
231         No change in behavior so no new tests.
232
233         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
234         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
235         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
236         (MediaPlayerPrivateAVFoundation):
237
238 2012-12-13  Kentaro Hara  <haraken@chromium.org>
239
240         Unreviewed. Rebaselined run-bindings-tests results.
241
242         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
243         (JSTestCustomNamedGetter):
244         * bindings/scripts/test/JS/JSTestEventTarget.h:
245         (JSTestEventTarget):
246
247 2012-12-13  Yoshifumi Inoue  <yosin@chromium.org>
248
249         Unreviewed, rolling out r137691.
250         http://trac.webkit.org/changeset/137691
251         https://bugs.webkit.org/show_bug.cgi?id=104764
252
253         panscroll test on AppleWin failed
254
255         * CMakeLists.txt:
256         * GNUmakefile.list.am:
257         * Target.pri:
258         * WebCore.gypi:
259         * WebCore.vcproj/WebCore.vcproj:
260         * WebCore.xcodeproj/project.pbxproj:
261         * page/AutoscrollController.cpp: Removed.
262         * page/AutoscrollController.h: Removed.
263         * page/EventHandler.cpp:
264         (WebCore):
265         (WebCore::EventHandler::EventHandler):
266         (WebCore::canAutoscroll):
267         (WebCore::EventHandler::handleMouseDraggedEvent):
268         (WebCore::EventHandler::handleMouseReleaseEvent):
269         (WebCore::EventHandler::handleAutoscroll):
270         (WebCore::EventHandler::autoscrollTimerFired):
271         (WebCore::EventHandler::startPanScrolling):
272         (WebCore::EventHandler::updatePanScrollState):
273         (WebCore::EventHandler::autoscrollRenderer):
274         (WebCore::EventHandler::updateAutoscrollRenderer):
275         (WebCore::EventHandler::setAutoscrollRenderer):
276         (WebCore::EventHandler::startAutoscrollTimer):
277         (WebCore::EventHandler::stopAutoscrollTimer):
278         (WebCore::EventHandler::selectCursor):
279         (WebCore::EventHandler::handleMousePressEvent):
280         (WebCore::EventHandler::keyEvent):
281         * page/EventHandler.h:
282         (EventHandler):
283         (WebCore::EventHandler::autoscrollInProgress):
284         * rendering/RenderBox.cpp:
285         * rendering/RenderBox.h:
286         (RenderBox):
287
288 2012-12-13  Kentaro Hara  <haraken@chromium.org>
289
290         ChildNodesLazySnapshot::nextNode() can crash
291         https://bugs.webkit.org/show_bug.cgi?id=104982
292
293         Reviewed by Hajime Morita.
294
295         ChildNodesLazySnapshot::nextNode() can crash for
296         fast/dom/insertedIntoDocument-no-crash.html.
297         The root cause is that ChildNodesLazySnapshot::m_currentNode
298         was not a RefPtr. This patch changes it to a RefPtr.
299
300         Test: fast/dom/insertedIntoDocument-no-crash.html
301
302         * dom/ContainerNode.h:
303         (WebCore::ChildNodesLazySnapshot::nextNode):
304         (WebCore::ChildNodesLazySnapshot::takeSnapshot):
305         (ChildNodesLazySnapshot):
306
307 2012-12-13  Philip Rogers  <pdr@google.com>
308
309         Clear m_timeContainer on SVGSMILElement removal.
310         https://bugs.webkit.org/show_bug.cgi?id=104972
311
312         Reviewed by Abhishek Arya.
313
314         This patch fixes a regression introduced by r137509 where we did not clear
315         m_timeContainer in SVGSMILElement::removedFrom.
316
317         Test: svg/custom/removed-from-animation-crash.html
318
319         * svg/animation/SVGSMILElement.cpp:
320         (WebCore::SVGSMILElement::removedFrom):
321
322 2012-12-13  Filip Pizlo  <fpizlo@apple.com>
323
324         Named lookups on HTML documents produce inconsistent results in JavaScriptCore bindings
325         https://bugs.webkit.org/show_bug.cgi?id=104623
326
327         Reviewed by Geoffrey Garen.
328
329         All DOM objects that have named getters or directly override getOwnPropertySlot are now marked as
330         HasImpureGetOwnPropertySlot.
331
332         Tests: fast/js/prototype-chain-caching-with-impure-get-own-property-slot-traps
333                fast/js/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps
334
335         * bindings/scripts/CodeGeneratorJS.pm:
336         (GenerateHeader):
337
338 2012-12-13  Xianzhu Wang  <wangxianzhu@chromium.org>
339
340         Out-of-view check of fixed position element in frame is incorrect when page is scaled
341         https://bugs.webkit.org/show_bug.cgi?id=104943
342
343         Reviewed by Simon Fraser.
344
345         Use frameScaleFactor instead of pageScaleFactor to scale the layer bounds.
346
347         Tests: compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-scroll.html
348                compositing/layer-creation/fixed-position-out-of-view-scaled-iframe.html
349
350         * rendering/RenderLayerCompositor.cpp:
351         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
352
353 2012-12-13  Bear Travis  <betravis@adobe.com>
354
355         Positioned replaced elements should resolve vertical margins against their containing
356         block's logical width
357         https://bugs.webkit.org/show_bug.cgi?id=103579
358
359         Reviewed by Emil A Eklund.
360
361         According to the CSS box model & writing modes specifications, percentage margin
362         & padding values, including top & bottom, should be resolved based on the
363         containing block's logical width (logical with respect to the containing block's
364         writing mode).
365         http://www.w3.org/TR/CSS2/box.html#margin-properties
366         http://dev.w3.org/csswg/css3-writing-modes/#dimension-mapping
367
368         Previously, a positioned replaced element resolved margin before/after relative to
369         its inline direction (containerLogicalHeight), and margin start/end relative to
370         its block direction (containerLogicalWidth). This patch measures the container's
371         logical width in its own inline direction (containerRelativeLogicalWidth) to
372         resolve all margin percentage values.
373
374         Test: fast/writing-mode/percentage-margins-absolute-replaced.html
375
376         * rendering/RenderBox.cpp:
377         (WebCore::RenderBox::computePositionedLogicalWidthReplaced): Calculate the logical
378         width of the container, and use it to calculate margins.
379         (WebCore::RenderBox::computePositionedLogicalHeightReplaced): Ditto.
380
381 2012-12-13  Yoshifumi Inoue  <yosin@chromium.org>
382
383         Handling autoscroll in EventHandler should be re-factor
384         https://bugs.webkit.org/show_bug.cgi?id=104764
385
386         Reviewed by Hajime Morita.
387
388         This patch introduces new class AutoscrollController for moving autoscroll
389         and panscroll from EventHandler class for ease of maintenance of
390         EventHandler and ease of adding autoscroll related features, e.g. autoscroll
391         during drag-and-drop, autoscoll by gesture.
392
393         No new tests. This patch doesn't change behavior.
394
395         * CMakeLists.txt: Changed to add page/AutoscrollController.cpp
396         * GNUmakefile.list.am:  Changed to add page/AutoscrollController.{cpp,h}
397         * Target.pri:  Changed to add page/AutoscrollController.cpp
398         * WebCore.gypi: Changed to add page/AutoscrollController.{cpp,h}
399         * WebCore.vcproj/WebCore.vcproj: Changed to add page/AutoscrollController.{cpp,h}
400         * WebCore.xcodeproj/project.pbxproj: Changed to add page/AutoscrollController.{cpp,h}
401         * page/AutoscrollController.cpp: Added.
402         (WebCore::getMainFrame): Helper function.
403         (WebCore::AutoscrollController::AutoscrollController): Moved from EventHandler.
404         (WebCore::AutoscrollController::autoscrollRenderer): Moved from EventHandler.
405         (WebCore::AutoscrollController::autoscrollInProgress): Moved from EventHandler.
406         (WebCore::AutoscrollController::startAutoscrollForSelection): Replacement of EventHandler::handleAutoscroll().
407         (WebCore::AutoscrollController::stopAutoscrollTimer): Moveed from EventHandler.
408         (WebCore::AutoscrollController::updateAutoscrollRenderer): ditto
409         (WebCore::AutoscrollController::didPanScrollStart): Added for updating pan scrolling status of main frame.
410         (WebCore::AutoscrollController::didPanScrollStop): ditto
411         (WebCore::AutoscrollController::handleMouseReleaseEvent): Extracted from EventHandler.
412         (WebCore::AutoscrollController::panScrollInProgress): Replacement of EventHandler::m_panScrollInProgress.
413         (WebCore::AutoscrollController::startPanScrolling): Moved from EventHandler::startPanScrolling()
414         (WebCore::AutoscrollController::autoscrollTimerFired): Moved from EventHandler::autoscrollTimerFired().
415         (WebCore::AutoscrollController::startAutoscrollTimer): Moved from EventHandler::startAutoscrollTimer().
416         (WebCore::AutoscrollController::updatePanScrollState): Moved from EventHandler::updatePanScrollState().
417         * page/AutoscrollController.h: Added.
418         (AutoscrollController):
419         * page/EventHandler.cpp:
420         (WebCore::EventHandler::EventHandler): Changed autoscroll and panscroll related member variable initializations to m_autoscrollController initialization.
421         (WebCore::EventHandler::handleMouseDraggedEvent): Changed to call AutoscrollController::startAutoscrollForSelection().
422         (WebCore::EventHandler::handleMouseReleaseEvent): Changed to remove m_autoscrollInProgress reference.
423         (WebCore::EventHandler::didPanScrollStart): Added for updating pan scrolling status of main frame.
424         (WebCore::EventHandler::didPanScrollStop): ditto
425         (WebCore::EventHandler::startPanScrolling): Changed to call AutoscrollController::startPanScrolling().
426         (WebCore::EventHandler::autoscrollRenderer): Changed to use AutoscrollController.
427         (WebCore::EventHandler::updateAutoscrollRenderer): ditto
428         (WebCore::EventHandler::autoscrollInProgress): ditto
429         (WebCore::EventHandler::panScrollInProgress): Added to replace m_panScrollInProgress.
430         (WebCore::EventHandler::stopAutoscrollTimer): Changed to use AutoscrollController.
431         (WebCore::EventHandler::selectCursor): Changed to use panScrollInProgress().
432         (WebCore::EventHandler::handleMousePressEvent): Chagned to call AutoscrollController::handleMousePressEvent().
433         (WebCore::EventHandler::keyEvent): Changed to use panScrollInProgress().
434         * page/EventHandler.h:
435         (WebCore::EventHandler::autoscrollController): Added for using main frame's panScrollInProgress().
436         (WebCore::EventHandler::mouseDownWasInSubframe): Added for AutoscrollController.
437         * rendering/RenderBox.cpp:
438         (WebCore::RenderBox::canAutoscroll): Moved from EventHandler.cpp.
439         (WebCore::RenderBox::findAutoscrollable): Moved from EventHandler.cpp.
440         * rendering/RenderBox.h:
441         (RenderBox): Added new functions canAutoscroll() and findAutoscrollable().
442
443 2012-12-13  Beth Dakin  <bdakin@apple.com>
444
445         https://bugs.webkit.org/show_bug.cgi?id=102599
446         ASSERT loading Acid3 test in run-safari --debug (r135050)
447
448         Reviewed by Simon Fraser.
449
450         New flag IncludeCompositedDescendants will always calculate the layer bounds for 
451         descendants, even when the are composited. 
452         * rendering/RenderLayer.cpp:
453         (WebCore::RenderLayer::calculateLayerBounds):
454         * rendering/RenderLayer.h:
455
456         calculateCompositedBounds() should not include this new flag, so instead of 
457         calling that, call calculateLayerBounds() directly with the 
458         IncludeCompositedDescendants flag. This will get us the information we need 
459         upfront and avoid the toggling later on. 
460         * rendering/RenderLayerCompositor.cpp:
461         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
462
463 2012-12-13  Tien-Ren Chen  <trchen@chromium.org>
464
465         Don't consider container nodes of other disambiguated nodes
466         https://bugs.webkit.org/show_bug.cgi?id=104619
467
468         Reviewed by Eric Seidel.
469
470         It is not uncommon to have a clickable <div> that contains other clickable objects.
471         This heuristic avoids excessive disambiguation in that case.
472
473         New unit test: WebFrameTest.DisambiguationPopupNoContainer
474
475         * page/TouchDisambiguation.cpp:
476         (WebCore::findGoodTouchTargets):
477
478 2012-12-13  Adrienne Walker  <enne@chromium.org>
479
480         Unreviewed, rolling out r137645, r137646, and r137667.
481         http://trac.webkit.org/changeset/137645
482         http://trac.webkit.org/changeset/137646
483         http://trac.webkit.org/changeset/137667
484         https://bugs.webkit.org/show_bug.cgi?id=104911
485
486         Breaks some overflow layout tests
487
488         * rendering/RenderLayer.cpp:
489         (WebCore::RenderLayer::RenderLayer):
490         (WebCore::RenderLayer::updateDescendantDependentFlags):
491         (WebCore::RenderLayer::addChild):
492         (WebCore::RenderLayer::removeChild):
493         (WebCore::RenderLayer::usesCompositedScrolling):
494         (WebCore::RenderLayer::scrollTo):
495         (WebCore::RenderLayer::dirtyZOrderLists):
496         (WebCore::RenderLayer::dirtyNormalFlowList):
497         (WebCore::RenderLayer::updateLayerListsIfNeeded):
498         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
499         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
500         (WebCore::RenderLayer::styleChanged):
501         * rendering/RenderLayer.h:
502         (RenderLayer):
503         * rendering/RenderLayerBacking.cpp:
504         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
505         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
506         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
507         * rendering/RenderLayerBacking.h:
508         (RenderLayerBacking):
509         * rendering/RenderLayerCompositor.cpp:
510         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
511         (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):
512         * rendering/RenderLayerCompositor.h:
513         (RenderLayerCompositor):
514         * testing/InternalSettings.cpp:
515         * testing/InternalSettings.h:
516         (InternalSettings):
517         * testing/InternalSettings.idl:
518
519 2012-12-13  Andreas Kling  <akling@apple.com>
520
521         Event dispatch: Avoid heap allocations in ensureEventAncestors() typical case.
522         <http://webkit.org/b/104938>
523
524         Reviewed by Anders Carlsson.
525
526         Give the EventTarget and EventContext vectors an inline capacity of 32 (no science here, just a
527         non-zero number.) As these vectors are created on the stack already, this is merely using a bit
528         more stack space to avoid malloc()ing all the gosh-darn time.
529
530         Looks like ~6% improvement on Dromaeo/jslib-event-prototype.
531
532         * dom/EventDispatcher.cpp:
533         (WebCore::EventRelatedTargetAdjuster::adjust):
534         (WebCore::EventRelatedTargetAdjuster::findRelatedTarget):
535         (WebCore::EventDispatcher::ensureEventAncestors):
536         * dom/EventDispatcher.h:
537         (EventRelatedTargetAdjuster):
538         (EventDispatcher):
539
540 2012-12-13  James Simonsen  <simonjam@chromium.org>
541
542         [Resource Timing] Don't report resources with data: urls
543         https://bugs.webkit.org/show_bug.cgi?id=104868
544
545         Reviewed by Tony Gentilcore.
546
547         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url.html
548
549         * loader/cache/CachedResourceLoader.cpp:
550         (WebCore::CachedResourceLoader::loadDone):
551
552 2012-12-13  Ian Vollick  <vollick@chromium.org>
553
554         Add a missing nullity check in RenderObject::containingBlock
555         https://bugs.webkit.org/show_bug.cgi?id=104961
556
557         Reviewed by Adrienne Walker.
558
559         Adds a missing nullity check in an assert.
560
561         No new tests, no change in functionality.
562
563         * rendering/RenderObject.cpp:
564         (WebCore::RenderObject::containingBlock):
565
566 2012-12-13  Tab Atkins  <tabatkins@google.com>
567
568         Switch the gradient drawing code to use bearing angles
569         https://bugs.webkit.org/show_bug.cgi?id=104616
570
571         Reviewed by Dean Jackson.
572
573         Switch the gradient math from polar-coordinate angles to bearing angles.
574         To make this possible without behavior changes, 
575         switch the m_deprecatedType boolean to an m_gradientType enum,
576         and fix all usages accordingly.
577
578         No new tests, as this is a refactoring and should have no behavior changes. Existing tests suffice.
579
580         * css/CSSGradientValue.cpp:
581         (WebCore::endPointsFromAngle):
582         This is the only mechanical change. The rest are just fixing the plumbing around the boolean->enum change.
583
584         * css/CSSGradientValue.cpp:
585         (WebCore::CSSGradientValue::sortStopsIfNeeded):
586         (WebCore::CSSGradientValue::addStops):
587         (WebCore::CSSLinearGradientValue::customCssText):
588         (WebCore::CSSLinearGradientValue::createGradient):
589         (WebCore::CSSRadialGradientValue::customCssText):
590         * css/CSSGradientValue.h:
591         (WebCore::CSSGradientValue::gradientType):
592         (WebCore::CSSGradientValue::CSSGradientValue):
593         (WebCore::CSSLinearGradientValue::create):
594         (WebCore::CSSLinearGradientValue::CSSLinearGradientValue):
595         (WebCore::CSSRadialGradientValue::create):
596         (WebCore::CSSRadialGradientValue::CSSRadialGradientValue):
597         * css/CSSParser.cpp:
598         (WebCore::CSSParser::parseDeprecatedGradient):
599         (WebCore::CSSParser::parseDeprecatedLinearGradient):
600         (WebCore::CSSParser::parseDeprecatedRadialGradient):
601
602 2012-12-13  Ian Vollick  <vollick@chromium.org>
603
604         [chromium] Automatically use composited scrolling
605         https://bugs.webkit.org/show_bug.cgi?id=94743
606
607         Reviewed by Adrienne Walker.
608
609         We currently use the composited scrolling facilities provided by
610         wkb.ug/91117 if the overflow scroll block element is styled with
611         -webkit-overflow-scrolling: touch. Ideally, we could automatically
612         opt into composited scrolling if it is safe to do so. This can affect
613         antialiasing, so it is important that automatically opting in is only
614         enabled via a setting.
615
616         The way I determine if it is safe is by checking that z-ordering will
617         not be affected if the overflow scrollable element were promoted to a
618         stacking context (details below), and that clipping our scrolling
619         descendants will not affect rendering.
620
621         To check the first condition (that z-ordering will not be affected).
622         I ensure that the candidate element and all its descendants appear as a 
623         continuous block in the candidate's stacking context. That is, if no 
624         other elements are 'between' any of the candidates descendants when we
625         sort in paint order, then we're safe. This is overly conservative,
626         however. We could, in future, only consider stacking problems between
627         elements that actually overlap.
628
629         To ensure that clipping will not cause a rendering change, I ensure
630         that the layer has no out of flow positioned descendant whose
631         containing block is not also a descendant of ours.
632
633         Test: compositing/overflow/automatically-opt-into-compositing-scrolling.html
634
635         (WebCore):
636         * rendering/RenderLayer.cpp:
637         (WebCore::RenderLayer::RenderLayer):
638         (WebCore::RenderLayer::acceleratedCompositingForOverflowScrollEnabled):
639         (WebCore):
640         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
641         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrderRecursive):
642         (WebCore::RenderLayer::positionOverflowControlsAfterPromotionToCompositedScrolling):
643         (WebCore::RenderLayer::canSafelyEstablishAStackingContext):
644           Returns true if the RenderLayer could become a stacking context without
645           affecting the stacking order.
646         (WebCore::RenderLayer::updateDescendantDependentFlags):
647           We now need to keep track of out of flow positioned descendants.
648         (WebCore::RenderLayer::addChild):
649         (WebCore::RenderLayer::removeChild):
650         (WebCore::RenderLayer::usesCompositedScrolling):
651           Has been updated to return true if it can safely establish a stacking
652           context, and the setting is turned on.
653         (WebCore::RenderLayer::needsCompositedScrolling):
654           This function returns true if we would like to use composited
655           scrolling.
656         (WebCore::RenderLayer::updateNeedsCompositedScrolling):
657         (WebCore::RenderLayer::scrollTo):
658         (WebCore::RenderLayer::dirtyZOrderLists):
659         (WebCore::RenderLayer::dirtyNormalFlowList):
660           Since these could affect opting into composited scrolling, we must
661           request that the RenderLayerCompositor reevaluate compositing.
662         (WebCore::RenderLayer::updateLayerListsIfNeeded):
663           We call updateCanSafelyEstablishStackingContext here, if necessary.
664         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
665         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
666           usesCompositedScrolling -> needsCompositedScrolling
667         (WebCore::RenderLayer::setAncestorChainHasOutOfFlowPositionedDescendant):
668         (WebCore::RenderLayer::dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus):
669         (WebCore::RenderLayer::updateOutOfFlowPositioned):
670           Dirties and sets the out of flow positioned descendant state.
671         (WebCore::RenderLayer::styleChanged):
672         * rendering/RenderLayer.h:
673         (RenderLayer):
674         (WebCore::RenderLayer::hasOutOfFlowPositionedDescendant):
675         * rendering/RenderLayerBacking.cpp:
676         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
677         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
678         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
679         (WebCore::RenderLayerBacking::hasUnpositionedOverflowControlsLayers):
680         (WebCore):
681         * rendering/RenderLayerBacking.h:
682         (RenderLayerBacking):
683         * rendering/RenderLayerCompositor.cpp:
684         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
685           We now ensure that newly created overflow scroll controls get
686           positioned.
687         (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):
688         * rendering/RenderLayerCompositor.h:
689         (WebCore::RenderLayerCompositor::setShouldReevaluateCompositingAfterLayout):
690         * testing/InternalSettings.cpp:
691         (WebCore::InternalSettings::setEnableCompositingForOverflowScroll):
692           Allows enabling the setting in layout tests.
693         (WebCore):
694         * testing/InternalSettings.h:
695         (InternalSettings):
696         * testing/InternalSettings.idl:
697
698 2012-12-13  Ryosuke Niwa  <rniwa@webkit.org>
699
700         REGRESSION(r137406): NodeTraversal changes causing large renderer crash
701         https://bugs.webkit.org/show_bug.cgi?id=104937
702
703         Reviewed by Antti Koivisto.
704
705         Add a null pointer check to exit early since ElementTraversal::next assumes a non-null pointer.
706
707         No new tests since I don't think this function is ever exposed to any ES5 bindings.
708
709         * editing/FrameSelection.cpp:
710         (WebCore::scanForForm):
711
712 2012-12-13  David Grogan  <dgrogan@chromium.org>
713
714         IndexedDB: Improve error messages
715         https://bugs.webkit.org/show_bug.cgi?id=104624
716
717         Reviewed by Tony Chang.
718
719         Add detail to error messages so that they are more helpful and can be
720         traced back to a specific line of code.
721
722         Updated test: transaction-error.html
723
724         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
725         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
726         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
727         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
728         (WebCore::IDBDatabaseBackendImpl::openConnection):
729         (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
730         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
731         (WebCore::IDBDatabaseBackendImpl::close):
732         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
733         (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
734         (WebCore::IDBFactoryBackendImpl::deleteDatabase):
735         (WebCore::IDBFactoryBackendImpl::open):
736         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
737         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
738         (WebCore::IDBObjectStoreBackendImpl::createIndex):
739         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
740         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
741         (WebCore::IDBTransactionBackendImpl::abort):
742         (WebCore::IDBTransactionBackendImpl::commit):
743
744 2012-12-13  Claudio Saavedra  <csaavedra@igalia.com>
745
746         [GTK] Safeguard against possible NULL-dereference
747         https://bugs.webkit.org/show_bug.cgi?id=104931
748
749         Reviewed by Chris Fleizach.
750
751         This was spotted by Coverity. See bug 104114.
752
753         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
754         (webkitAccessibleGetIndexInParent): If parent is NULL
755         bail out early.
756
757 2012-12-13  David Barton  <dbarton@mathscribe.com>
758
759         Heap-use-after-free in WebCore::RenderBlock::finishDelayUpdateScrollInfo
760         https://bugs.webkit.org/show_bug.cgi?id=103750
761
762         Reviewed by Tony Chang.
763
764         MathML sometimes creates and destroys renderers for descendants during layout (or even to calculate
765         preferred logical widths), e.g. for operator stretching. RenderBlock::finishDelayUpdateScrollInfo
766         must therefore leave gDelayedUpdateScrollInfoSet intact as it iterates over it, so
767         RenderBlock::willBeDestroyed can call gDelayedUpdateScrollInfoSet->remove(this) effectively if needed.
768         This also prevents duplicate entries from being added to gDelayedUpdateScrollInfoSet.
769
770         Test: mathml/mo-stretch-crash.html
771
772         * rendering/RenderBlock.cpp:
773         (WebCore::RenderBlock::startDelayUpdateScrollInfo):
774             - Allow gDelayedUpdateScrollInfoSet to be non-null when gDelayUpdateScrollInfo is 0 during
775               RenderBlock::finishDelayUpdateScrollInfo.
776         (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
777             - Remove blocks from gDelayedUpdateScrollInfoSet one at a time, waiting for each block until it is
778               about to be updated.
779
780 2012-12-13  Alexey Proskuryakov  <ap@apple.com>
781
782         <rdar://problem/12838354> Per-Tab WebProcess: DOM cookie access functions should respect private browsing
783         https://bugs.webkit.org/show_bug.cgi?id=104691
784
785         Reviewed by Sam Weinig.
786
787         * platform/network/NetworkingContext.h: Added a function that returns current
788         context type. Ideally, we would track contexts across processes in a generic manner,
789         but we only have two now, and don't need such complications.
790
791 2012-12-13  Alexey Proskuryakov  <ap@apple.com>
792
793         ResourceLoader::didReceiveAuthenticationChallenge uses a wrong client
794         https://bugs.webkit.org/show_bug.cgi?id=104935
795         <rdar://problem/12870361>
796
797         Reviewed by Anders Carlsson.
798
799         * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
800         The handle is null when NetworkProcess is used. In any case, it should be correct
801         to use the client carried within AuthenticationChallenge.
802
803 2012-12-13  Stephen White  <senorblanco@chromium.org>
804
805         CanvasRenderingContext2D::setFont() is slow.
806         https://bugs.webkit.org/show_bug.cgi?id=104923
807
808         Reviewed by James Robinson.
809
810         This spends most of its time in the CSS parser.  As a first step,
811         early-out if the new value is the same as unparsed string for the current font.
812         See also http://code.google.com/p/chromium/issues/detail?id=164016.
813
814         Covered by existing tests in canvas/ and fast/canvas, and ManualTests/canvas-font-speed.html.
815
816         * html/canvas/CanvasRenderingContext2D.cpp:
817         (WebCore::CanvasRenderingContext2D::setFont):
818
819 2012-12-13  Parth Patel  <parpatel@rim.com>, Max Feil <mfeil@rim.com>
820
821         Allow plugins to be disabled by shared library filename
822         https://bugs.webkit.org/show_bug.cgi?id=101274
823
824         Reviewed by Antonio Gomes.
825
826         This fix makes PluginDatabase changes general so that other ports
827         can use this mechanism if they wish.
828
829         Layout test not included with this patch because there
830         is currently no framework within LayoutTests to allow calls
831         from an external application via platform API code (such as the
832         WebView API).
833
834         * plugins/PluginDatabase.cpp:
835         (WebCore::PluginDatabase::fileExistsAndIsNotDisabled):
836         (WebCore):
837         (WebCore::PluginDatabase::getDeletedPlugins):
838         (WebCore::PluginDatabase::removeDisabledPluginFile):
839         (WebCore::PluginDatabase::addDisabledPluginFile):
840         (WebCore::PluginDatabase::getPluginPathsInDirectories):
841         * plugins/PluginDatabase.h:
842         (PluginDatabase):
843
844 2012-12-13  Yongjun Zhang  <yongjun_zhang@apple.com>
845
846         Document will never be released when an Image is created inside unload event listener
847         https://bugs.webkit.org/show_bug.cgi?id=104830
848
849         Reviewed by Darin Adler.
850
851         When setting src attribute to an Image object inside unload event listener, ImageLoader will
852         mark it as load failure (by setting m_hasPendingErrorEvent to true) and the following call
853         to updatedHasPendingEvent will ref the element but won't be deref-ed since the Document is
854         being dismissed.  This was introduced in r131670.  To match pre r131670 behavior, we shouldn't
855         trigger error event for image loading when the page is being dismissed.
856
857         No new tests, there is no visual change.  Manually tested to verify documents are released by
858         using heap in Mac OS X.
859
860         * loader/ImageLoader.cpp:
861         (WebCore::pageIsBeingDismissed): add a helper function to test whether the page is being dismissed.
862         (WebCore::ImageLoader::updateFromElement): don't trigger error event if the page is being dismissed.
863
864 2012-12-13  Claudio Saavedra  <csaavedra@igalia.com>
865
866         [GTK] Add missing breaks in switch-case statements
867         https://bugs.webkit.org/show_bug.cgi?id=104929
868
869         Reviewed by Martin Robinson.
870
871         * platform/gtk/ClipboardGtk.cpp:
872         (WebCore::ClipboardGtk::clearData): Add missing breaks.
873
874 2012-12-13  Nate Chapin  <japhet@chromium.org>
875
876         Route main resource loads through the memory cache.
877         https://bugs.webkit.org/show_bug.cgi?id=49246
878
879         Reviewed by Alexey Proskuryakov.
880
881         Note that this patch doesn't actually enable caching of main resources. That will be done in a later patch.
882         The MainResourceLoader actually has an underlying SubresourceLoader (with the cache layer between them).
883         In several places, the MainResourceLoader's SubresourceLoader is treated as special.
884
885         No new tests, as this is primarily a refactor. A couple of expected results changed slightly.
886
887         * loader/DocumentLoader.cpp:
888         (WebCore::DocumentLoader::setRequest):
889         (WebCore::DocumentLoader::subresource):
890         (WebCore::DocumentLoader::addSubresourceLoader): Because the SubresourceLoader underlying the main resource
891             needs special handling in certain cases, track it separately from the real SubresourceLoaders.
892         (WebCore::DocumentLoader::removeSubresourceLoader):
893         (WebCore::DocumentLoader::startLoadingMainResource):
894         * loader/MainResourceLoader.cpp:
895         (WebCore::MainResourceLoader::MainResourceLoader):
896         (WebCore::MainResourceLoader::receivedError):
897         (WebCore::MainResourceLoader::cancel):
898         (WebCore::MainResourceLoader::clearResource):
899         (WebCore):
900         (WebCore::MainResourceLoader::frameLoader):
901         (WebCore::MainResourceLoader::request):
902         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
903         (WebCore::MainResourceLoader::resourceData):
904         (WebCore::MainResourceLoader::redirectReceived):
905         (WebCore::MainResourceLoader::willSendRequest):
906         (WebCore::MainResourceLoader::continueAfterContentPolicy):
907         (WebCore::MainResourceLoader::responseReceived):
908         (WebCore::MainResourceLoader::dataReceived):
909         (WebCore::MainResourceLoader::didFinishLoading):
910         (WebCore::MainResourceLoader::notifyFinished):
911         (WebCore::MainResourceLoader::reportMemoryUsage):
912         (WebCore::MainResourceLoader::handleSubstituteDataLoadNow):
913         (WebCore::MainResourceLoader::load):
914         (WebCore::MainResourceLoader::setDefersLoading):
915         (WebCore::MainResourceLoader::defersLoading):
916         (WebCore::MainResourceLoader::setShouldBufferData):
917         (WebCore::MainResourceLoader::loader):
918         (WebCore::MainResourceLoader::identifier):
919         * loader/MainResourceLoader.h:
920         (MainResourceLoader):
921         (WebCore::MainResourceLoader::documentLoader):
922         * loader/ResourceLoader.cpp:
923         (WebCore::ResourceLoader::willSendRequest):
924         * loader/ResourceLoader.h:
925         (WebCore::ResourceLoader::defersLoading):
926         (WebCore::ResourceLoader::cancelled):
927         * loader/appcache/ApplicationCacheHost.cpp:
928         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
929         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
930         * loader/mac/DocumentLoaderMac.cpp:
931         (WebCore::DocumentLoader::schedule):
932         (WebCore::DocumentLoader::unschedule):
933
934 2012-12-13  Pratik Solanki  <psolanki@apple.com>
935
936         Duplicate code in GraphicsContext3D::validateAttributes() and GraphicsContext3D::validateDepthStencil()
937         https://bugs.webkit.org/show_bug.cgi?id=97275
938
939         Reviewed by Dean Jackson.
940
941         Remove duplicate code in validateAttributes(). validateAttributes() calls
942         validateDepthStencil() which has the exact same code.
943
944         No new tests because no change in functionality.
945
946         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
947         (WebCore::GraphicsContext3D::validateAttributes):
948
949 2012-12-13  Nate Chapin  <japhet@chromium.org>
950
951         CachedResources should hang on to stripped fragment identifiers
952         https://bugs.webkit.org/show_bug.cgi?id=104721
953
954         Reviewed by Maciej Stachowiak.
955
956         No new tests, this will be unused until bug
957         https://bugs.webkit.org/show_bug.cgi?id=49246 re-lands. Then, it will
958         allow http/tests/inspector/resource-parameters.html to continue passing.
959
960         * loader/cache/CachedResource.cpp:
961         (WebCore::CachedResource::CachedResource):
962         (WebCore::CachedResource::load):
963         * loader/cache/CachedResource.h:
964         (CachedResource):
965         * loader/cache/CachedResourceLoader.cpp:
966         (WebCore::CachedResourceLoader::requestResource): We override the request's url with the
967             local variable "url" here. The only difference between url and request.url() is that url
968             has had any fragment identifier removed. Do this work later (in the CachedResource constructor)
969             so that the CachedResource can save the fragment for later.
970
971 2012-12-13  Claudio Saavedra  <csaavedra@igalia.com>
972
973         [GTK] Remove deprecated API usage
974         https://bugs.webkit.org/show_bug.cgi?id=104894
975
976         Reviewed by Martin Robinson.
977
978         Remove deprecated GTK+ API usage.
979
980         * platform/gtk/RenderThemeGtk3.cpp:
981         (WebCore::spinButtonArrowSize): Do not use deprecated
982         gtk_style_context_get_font().
983
984 2012-12-13  Zeno Albisser  <zeno@webkit.org>
985
986         [Qt] Remove temporary workaround from GraphicsSurfaceGLX constructor.
987         https://bugs.webkit.org/show_bug.cgi?id=104904
988
989         QXcbNativeInterface::nativeResourceForContext() is now
990         available in Qt5. Therefore the temporary workaround
991         in GraphicsSurfaceGLX can be removed.
992
993         Reviewed by Kenneth Rohde Christiansen.
994
995         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
996         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
997
998 2012-12-13  Joanmarie Diggs  <jdiggs@igalia.com>
999
1000         [GTK] Expose ARIA roles for tab, tabpanel and tablist
1001         https://bugs.webkit.org/show_bug.cgi?id=84043
1002
1003         Reviewed by Martin Robinson.
1004
1005         Mapped the ARIA roles to their corresponding ATK roles.
1006
1007         No new tests; instead unskipped the associated test.
1008
1009         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1010         (atkRole): Mapped the ARIA roles to their corresponding ATK roles
1011
1012 2012-12-13  Vivek Galatage  <vivek.vg@samsung.com>
1013
1014         Web Inspector: "Add Attribute" context menu on closing tag should apply on the opening tag on Elements Panel
1015         https://bugs.webkit.org/show_bug.cgi?id=104902
1016
1017         Reviewed by Alexander Pavlov.
1018
1019         The context menu action on the closing tag scrolls to the opening tag for adding the attribute.
1020
1021         No new tests as this is a UI change.
1022
1023         * inspector/front-end/ElementsTreeOutline.js:
1024         (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
1025         (WebInspector.ElementsTreeElement.prototype._addNewAttribute):
1026
1027 2012-12-13  Sheriff Bot  <webkit.review.bot@gmail.com>
1028
1029         Unreviewed, rolling out r137512.
1030         http://trac.webkit.org/changeset/137512
1031         https://bugs.webkit.org/show_bug.cgi?id=104912
1032
1033         The entire GTK+ layout test step has been failing for hours
1034         (Requested by mrobinson on #webkit).
1035
1036         * accessibility/AccessibilityNodeObject.cpp:
1037         (WebCore::AccessibilityNodeObject::textUnderElement):
1038         * accessibility/AccessibilityRenderObject.cpp:
1039         (WebCore::AccessibilityRenderObject::textUnderElement):
1040
1041 2012-12-13  Tamas Czene  <tczene@inf.u-szeged.hu>
1042
1043         OpenCL version of FEColorMatrix.
1044         https://bugs.webkit.org/show_bug.cgi?id=103398
1045
1046         Reviewed by Zoltan Herczeg.
1047
1048         ~3x speed-up (depending on hardware configuration)
1049
1050         * Target.pri: Added a new file to the build system.
1051         * platform/graphics/filters/FEColorMatrix.cpp: calculateSaturateComponents and calculateHueRotateComponents methodes are moved to the header, since they are used by OpenCL as well
1052         (WebCore::effectType):
1053         * platform/graphics/filters/FEColorMatrix.h:
1054         (FEColorMatrix):
1055         (WebCore::FEColorMatrix::calculateSaturateComponents):
1056         (WebCore):
1057         (WebCore::FEColorMatrix::calculateHueRotateComponents):
1058         * platform/graphics/gpu/opencl/FilterContextOpenCL.h: Required fields for the ColorMatrix kernels were added
1059         (WebCore::FilterContextOpenCL::FilterContextOpenCL):
1060         (FilterContextOpenCL):
1061         * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp: the core implementation goes here
1062         (WebCore):
1063         (WebCore::FilterContextOpenCL::compileFEColorMatrix):
1064         (WebCore::FilterContextOpenCL::applyFEColorMatrix):
1065         (WebCore::FEColorMatrix::platformApplyOpenCL):
1066
1067 2012-12-13  Ilya Tikhonovsky  <loislo@chromium.org>
1068
1069         Web Inspector: Native Memory Instrumentation: do not validate pointers to objects in RenderArena agains tcmalloc data.
1070         https://bugs.webkit.org/show_bug.cgi?id=104903
1071
1072         Reviewed by Yury Semikhatsky.
1073
1074         This is a simplest approach to do that with zero performance overhead.
1075
1076         * inspector/InspectorResourceAgent.cpp:
1077         (WebCore::InspectorResourceAgent::reportMemoryUsage):
1078         * rendering/InlineBox.cpp:
1079         (WebCore::InlineBox::reportMemoryUsage):
1080         (WebCore):
1081         * rendering/InlineBox.h:
1082         (InlineBox):
1083         * rendering/InlineTextBox.cpp:
1084         (WebCore::InlineTextBox::reportMemoryUsage):
1085         (WebCore):
1086         * rendering/InlineTextBox.h:
1087         (InlineTextBox):
1088         * rendering/RenderLayer.cpp:
1089         (WebCore::RenderLayer::reportMemoryUsage):
1090         * rendering/RenderObject.cpp:
1091         (WebCore::RenderObject::reportMemoryUsage):
1092
1093 2012-12-13  Alberto Garcia  <agarcia@igalia.com>
1094
1095         [GTK] Don't leak GStaticRecMutex
1096         https://bugs.webkit.org/show_bug.cgi?id=104901
1097
1098         Reviewed by Martin Robinson.
1099
1100         The mutex in WebKitWebAudioSourceGStreamer is allocated using
1101         g_new(), but that memory is not freed when the object is
1102         destroyed.
1103
1104         This patch replaces that pointer with the structure itself, which
1105         is faster and doesn't need to be explicitly freed.
1106
1107         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1108         (_WebKitWebAudioSourcePrivate):
1109         (webkit_web_audio_src_init):
1110         (webKitWebAudioSrcFinalize):
1111
1112 2012-12-13  Eugene Klyuchnikov  <eustas@chromium.org>
1113
1114         Web Inspector: Network: Sorting cookies by size is broken.
1115         https://bugs.webkit.org/show_bug.cgi?id=104893
1116
1117         Reviewed by Alexander Pavlov.
1118
1119         Problem: cookie "size" is not a field now; its value is accessible
1120         through getter method.
1121
1122         Solution: make cookie fields uniformly accessible (add getters for name,
1123         type and value).
1124
1125         * inspector/front-end/CookieItemsView.js: Adopt changes.
1126         * inspector/front-end/CookieParser.js:
1127         (WebInspector.Cookie): Refine JsDoc.
1128         (WebInspector.Cookie.prototype.name): Added getter.
1129         (WebInspector.Cookie.prototype.value): Ditto.
1130         (WebInspector.Cookie.prototype.type): Ditto.
1131         (WebInspector.Cookies.buildCookiesFromString): Adopt changes.
1132         (WebInspector.Cookies.buildCookieProtocolObject): Ditto.
1133         * inspector/front-end/CookiesTable.js:
1134         (WebInspector.CookiesTable): Remove unused parameter.
1135         (WebInspector.CookiesTable.prototype._sortCookies):
1136         Use getters instead of field names.
1137         (WebInspector.CookiesTable.prototype._createGridNode): Adopt changes.
1138         * inspector/front-end/HAREntry.js: Ditto.
1139         * inspector/front-end/RequestCookiesView.js: Ditto.
1140
1141 2012-12-13  Kentaro Hara  <haraken@chromium.org>
1142
1143         Unreviewed, rolling out r137569.
1144         http://trac.webkit.org/changeset/137569
1145         https://bugs.webkit.org/show_bug.cgi?id=104876
1146
1147         A bunch of CSS tests hit ASSERTs
1148
1149         * css/CSSProperty.h:
1150         (WebCore::CSSProperty::CSSProperty):
1151
1152 2012-12-13  Byungwoo Lee  <bw80.lee@samsung.com>
1153
1154         [EFL] Remove redundant pipe write to prevent pipe buffer full.
1155         https://bugs.webkit.org/show_bug.cgi?id=101135
1156
1157         Reviewed by Gyuyoung Kim.
1158
1159         To prevent a source of a deadlock, remove the redundant pipe write
1160         in wakeUp() function.
1161
1162         EFL uses ecore_pipe_write() to wake up main run loop, and the function
1163         uses POSIX pipe write with O_NONBLOCK disabled.
1164         With O_NONBLOCK disabled, when written data is more than PIPE_BUF,
1165         pipe write will be blocked until it can be written.
1166
1167         Currently, every wakeUp() function calls ecore_pipe_write() to invoke
1168         wakeUpEvent() callback. And this can make pipe buffer full status
1169         which is the one reason of the lockup problem described in Bug 99494.
1170
1171         * platform/RunLoop.h:
1172         (RunLoop):
1173         * platform/efl/RunLoopEfl.cpp:
1174         (WebCore::RunLoop::RunLoop):
1175         (WebCore::RunLoop::wakeUpEvent):
1176         (WebCore::RunLoop::wakeUp):
1177
1178 2012-12-13  Antti Harju  <antti.harju@ixonos.com>
1179
1180         [Qt] Fix deleteAllCookies() invalid SQL statement
1181         https://bugs.webkit.org/show_bug.cgi?id=101580
1182
1183         Reviewed by Jocelyn Turcotte.
1184
1185         * platform/network/qt/CookieJarQt.cpp:
1186         (WebCore::SharedCookieJarQt::deleteAllCookies):
1187
1188 2012-12-13  Ryosuke Niwa  <rniwa@webkit.org>
1189
1190         Safari spends a lot of time in WebCore::findSimpleWordBoundary while selecting text on large scrabutility.com page
1191         https://bugs.webkit.org/show_bug.cgi?id=104884
1192
1193         Reviewed by Hajime Morita.
1194
1195         We don't need to do anything in AlternativeTextController if selection is already outside of the editable region.
1196
1197         No new tests are added since this is only a performance improvement, and doesn't change any asymptotic behavior.
1198
1199         * editing/AlternativeTextController.cpp:
1200         (WebCore::AlternativeTextController::respondToChangedSelection):
1201
1202 2012-12-12  Jon Lee  <jonlee@apple.com>
1203
1204         Crash in PlugInOriginHash with empty MIME type (104882)
1205         https://bugs.webkit.org/show_bug.cgi?id=104882
1206         <rdar://problem/12872298>
1207
1208         Reviewed by Filip Pizlo.
1209
1210         The crash occurs because the strings might be null. Add a check for it, but also try to infer a MIME type
1211         in case the markup does not include a type attribute, but we can find it from the extension in the URL.
1212
1213         * platform/KURL.cpp: Add a new function mimeTypeFromURL() which tries to return the implied MIME type
1214         based on the URL provided. If nothing was found, return a null string.
1215         (WebCore::mimeTypeFromURL): Factored out from FrameLoader::defaultObjectContentType().
1216         * platform/KURL.h:
1217
1218         * loader/FrameLoader.cpp:
1219         (WebCore::FrameLoader::defaultObjectContentType): Refactor to use mimeTypeFromURL().
1220         * plugins/PlugInOriginHash.cpp:
1221         (WebCore::addCaseFoldedCharacters): Add a check for an empty string.
1222         (WebCore::PlugInOriginHash::hash): If the service type is empty, try to infer the MIME type.
1223
1224 2012-12-13  Christophe Dumez  <christophe.dumez@intel.com>
1225
1226         Regression(r137486): Broke EFL build
1227         https://bugs.webkit.org/show_bug.cgi?id=104883
1228
1229         Unreviewed EFL build fix.
1230
1231         Fix EFL build break after r137486 due to missing WebCore::
1232         namespace.
1233
1234         No new tests, no behavior change for layout tests.
1235
1236         * platform/NotImplemented.h:
1237
1238 2012-12-07  Levi Weintraub  <leviw@chromium.org>
1239
1240         Add support for tracking hit test rectangles to enable fast event rejection in the compositor
1241         https://bugs.webkit.org/show_bug.cgi?id=103914
1242
1243         Reviewed by Simon Fraser.
1244
1245         Adding support for tracking hit test target regions for the purpose of performing initial hit testing
1246         in the compositor to avoid blocking scrolling on the main thread while waiting to hit test events that
1247         aren't occuring in regions with handlers. This is initially being done to avoid having to go to the main
1248         thread when scrolling by flicking on touch devices when the flick occurs outside a tracked touch event
1249         region. This patch includes the implementation to turn this on in Chromium.
1250
1251         To accomplish this goal, Document will now keep a counted hash set of nodes with touch event handlers
1252         instead of only an unsigned integer of the total count. ScrollingCoordinator then updates the compositor
1253         when new touch event handlers are registered or removed, or after layout much like how
1254         nonFastScrollableRegions are currently tracked.
1255
1256         This implementation will not properly update the hit test rects when the renderers are inside a sub-
1257         tree that scrolls.
1258
1259         Test: platform/chromium/fast/events/touch/compositor-touch-hit-rects.html
1260
1261         * dom/Document.cpp:
1262         (WebCore::Document::Document): Added a HashCountedSet of touch target nodes. Note: DOMWindow targets
1263         are stored as the Document they point to.
1264         (WebCore::Document::didAddTouchEventHandler): Changed to keep track of the handler instead of a count, and
1265         to update the ScrollingCoordinator with the change.
1266         (WebCore::Document::didRemoveTouchEventHandler): Ditto.
1267         * dom/Document.h:
1268         (WebCore::Document::hasTouchEventHandlers): It's no longer O(1) to get the count of touch handlers, so
1269         expose whether there are any or not.
1270         (WebCore::Document::touchEventTargets):
1271         * dom/Node.cpp:
1272         (WebCore::Node::didMoveToNewDocument):
1273         (WebCore::tryAddEventListener):
1274         (WebCore::tryRemoveEventListener):
1275         * history/CachedFrame.cpp:
1276         (WebCore::CachedFrameBase::restore):
1277         * html/HTMLInputElement.cpp:
1278         (WebCore::HTMLInputElement::~HTMLInputElement):
1279         (WebCore::HTMLInputElement::updateType):
1280         * page/DOMWindow.cpp:
1281         (WebCore::DOMWindow::addEventListener): Add the Document to the touch target set instead of DOMWindow.
1282         (WebCore::DOMWindow::removeEventListener):
1283         * page/EventHandler.cpp:
1284         (WebCore::EventHandler::handleTouchEvent):
1285         * page/Frame.cpp:
1286         (WebCore::Frame::setDocument):
1287         * page/scrolling/ScrollingCoordinator.cpp:
1288         (WebCore::ScrollingCoordinator::computeAbsoluteTouchEventTargetRects): Walk the renderers for event handler
1289         nodes and generate the absolute hit testing rects.
1290         * page/scrolling/ScrollingCoordinator.h:
1291         (WebCore::ScrollingCoordinator::setTouchEventTargetRectsChanged): Hook to pass along the hit test rects to
1292         the scrolling tree/compositor.
1293         (ScrollingCoordinator):
1294         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
1295         (WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
1296         (WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRectsChanged):
1297         (WebCore::ScrollingCoordinatorChromium::setNonFastScrollableRegion):
1298         (WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRects):
1299         * page/scrolling/chromium/ScrollingCoordinatorChromium.h:
1300         (ScrollingCoordinatorChromium):
1301         * testing/Internals.cpp:
1302         (WebCore::Internals::touchEventHandlerCount): Changed to do the work to calculate the actual count since
1303         it's no longer stored as an int in Document.
1304         (WebCore::Internals::touchEventTargetClientRects):
1305         * testing/Internals.h:
1306         (Internals):
1307         * testing/Internals.idl:
1308
1309 2012-12-12  Luke Macpherson   <macpherson@chromium.org>
1310
1311         Add ASSERTions to ensure that CSSPropertys that are variables only ever refer to CSSValues that are variables.
1312         https://bugs.webkit.org/show_bug.cgi?id=104876
1313
1314         Reviewed by Steve Block.
1315
1316         Add assertions to CSSProperty constructors to make that if it is initialized with CSSPropertyVariable that
1317         the value type associated with it is also a variable. This is already asserted at read time, but ASSERTing
1318         here will produce a more useful backtrace.
1319
1320         No new tests as functionality unchanged.
1321
1322         * css/CSSProperty.h:
1323         (WebCore::CSSProperty::CSSProperty):
1324
1325 2012-12-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1326
1327         NetworkInfoController needs to support destructor
1328         https://bugs.webkit.org/show_bug.cgi?id=104642
1329
1330         Reviewed by Kentaro Hara.
1331
1332         Though NetworkInfoController can be referenced by each port in order to update network status change,
1333         there is no virtual interface to destroy it. Beside each port client also needs to be destroyed when
1334         controller is destroyed.
1335
1336         * Modules/networkinfo/NetworkInfoClient.h:
1337         (NetworkInfoClient):
1338         * Modules/networkinfo/NetworkInfoConnection.h:
1339         (WebCore::NetworkInfoConnection::networkInfoControllerDestroyed):
1340         * Modules/networkinfo/NetworkInfoController.cpp:
1341         (WebCore::NetworkInfoController::~NetworkInfoController):
1342
1343 2012-12-12  Kent Tamura  <tkent@chromium.org>
1344
1345         Validity of a radio button is not updated correctly when it is detached from an invalid radio group
1346         https://bugs.webkit.org/show_bug.cgi?id=104873
1347
1348         Reviewed by Kentaro Hara.
1349
1350         When a radio button is detached from an invalid radio group,
1351         A) we should update button's validity, and
1352         B) it should be valid.
1353
1354         A is handled by the following code in RadioButtonGroup::remove.
1355             if (!wasValid) {
1356                 // A radio button not in a group is always valid. We need to make it
1357                 // valid only if the group was invalid.
1358                 button->setNeedsValidityCheck();
1359
1360         B was incomplete.
1361             bool RadioInputType::valueMissing(const String&) const
1362             {
1363                 return element()->isInRequiredRadioButtonGroup() && !element()->checkedRadioButtonForGroup();
1364         isInRequiredRadioButtonGroup checked required state of a group with the
1365         name attribute value even if the radio button was already detached from
1366         the group. isInRequiredRadioButtonGroup should check membership of the
1367         radio button precisely.
1368
1369         Tests: Update fast/forms/radio/radio-live-validation-style.html
1370
1371         * dom/CheckedRadioButtons.cpp:
1372         (RadioButtonGroup): Declare contains.
1373         (WebCore::RadioButtonGroup::contains): Added.
1374         (WebCore::CheckedRadioButtons::isInRequiredGroup): Renamed from
1375         isRequiredGroup. This function takes HTMLInputElement* argument.
1376         * dom/CheckedRadioButtons.h:
1377         (CheckedRadioButtons): Rename isRequiredGroup to isInRequiredGroup.
1378         * html/HTMLInputElement.cpp:
1379         (WebCore::HTMLInputElement::isInRequiredRadioButtonGroup):
1380         Make this non-const becaues RadioButtonGroup::m_members needs non-const
1381         pointers. Use CheckedRadioButtons::isInRequiredGroup.
1382         * html/HTMLInputElement.h:
1383         (HTMLInputElement): Make isInRequiredRadioButtonGroup non-const.
1384
1385 2012-12-12  Shinya Kawanaka  <shinyak@chromium.org>
1386
1387         ContainerNodeAlgorithm::notifyInsertedIntoDocument is not used
1388         https://bugs.webkit.org/show_bug.cgi?id=104874
1389
1390         Reviewed by Hajime Morita.
1391
1392         ContainerNodeAlgorithm::notifyInsertedIntoDocument() is not used by anyone. We can remove it safely.
1393
1394         No new tests, no change in behavior.
1395
1396         * dom/ContainerNodeAlgorithms.h:
1397
1398 2012-12-12  Kunihiko Sakamoto  <ksakamoto@chromium.org>
1399
1400         Milliseconds field of date/time input UI should respect step attribute
1401         https://bugs.webkit.org/show_bug.cgi?id=104628
1402
1403         Reviewed by Kent Tamura.
1404
1405         This patch makes step-up/-down UI of the milliseconds fields respect step attribute
1406         in a special case when the step is divisible by 1000 milliseconds.
1407
1408         Test: fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html
1409
1410         * html/shadow/DateTimeEditElement.cpp:
1411         (WebCore::DateTimeEditBuilder::visitField):
1412         If step of the element (in milliseconds) is divisible by 1000, use it as the step of the milliseconds field. Otherwise, the millisecond field has step 1.
1413         * html/shadow/DateTimeFieldElements.cpp:
1414         (WebCore::DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement): Add step and stepBase arguments.
1415         (WebCore::DateTimeMillisecondFieldElement::create): Ditto.
1416         * html/shadow/DateTimeFieldElements.h:
1417         (DateTimeMillisecondFieldElement): Ditto.
1418         * html/shadow/DateTimeNumericFieldElement.cpp:
1419         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement): Ditto.
1420         (WebCore::DateTimeNumericFieldElement::stepDown): Changed to compute next allowed value using roundDown().
1421         (WebCore::DateTimeNumericFieldElement::stepUp): Changed to compute next allowed value using roundUp().
1422         (WebCore::DateTimeNumericFieldElement::roundDown): Added.
1423         (WebCore::DateTimeNumericFieldElement::roundUp): Added.
1424         * html/shadow/DateTimeNumericFieldElement.h:
1425         (DateTimeNumericFieldElement): Add m_step and m_stepBase fields.
1426
1427 2012-12-12  Julien Chaffraix  <jchaffraix@webkit.org>
1428
1429         [CSS Grid Layout] Include paddings and borders into the grid element's logical height / width
1430         https://bugs.webkit.org/show_bug.cgi?id=104818
1431
1432         Reviewed by Tony Chang.
1433
1434         This change makes RenderGrid add the borders and paddings in the right direction during layout
1435         so that the grid element's size accounts them like any other renderer.
1436
1437         Test: fast/css-grid-layout/grid-element-padding-margin.html
1438
1439         * rendering/RenderGrid.cpp:
1440         (WebCore::RenderGrid::computePreferredLogicalWidths):
1441         (WebCore::RenderGrid::layoutGridItems):
1442
1443 2012-12-12  Roger Fong  <roger_fong@apple.com>
1444
1445         Include Apple Windows in GraphicsLayer::supportsBackgroundColorContent().
1446         https://bugs.webkit.org/show_bug.cgi?id=104852.
1447
1448         Reviewed by Simon Fraser.
1449
1450         * platform/graphics/GraphicsLayer.h:
1451         (WebCore::GraphicsLayer::supportsBackgroundColorContent):
1452
1453 2012-12-12  KyungTae Kim  <ktf.kim@samsung.com>
1454
1455         Unused parameters on TextureMapperImageBuffer.cpp
1456         https://bugs.webkit.org/show_bug.cgi?id=104857
1457
1458         Reviewed by Kentaro Hara.
1459
1460         The updateContents has unused parameter 'textureMapper',
1461         remove the parameter name to fix 'unused parameter' build warning. 
1462
1463         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
1464         (WebCore::BitmapTextureImageBuffer::updateContents):
1465
1466 2012-12-12  Shinya Kawanaka  <shinyak@chromium.org>
1467
1468         [Shadow] HTMLContentElement::getDistributedNodes() doesn't work correctly if not in document tree.
1469         https://bugs.webkit.org/show_bug.cgi?id=104345
1470
1471         Reviewed by Hajime Morita.
1472
1473         Since document->updateLayout() does affect nodes in Document, distribution will not occur in
1474         InsertionPoints out of Document. We have to find the element in document tree scope, and start distribution from it.
1475
1476         Test: fast/dom/shadow/get-distributed-nodes-orphan.html
1477
1478         * html/shadow/InsertionPoint.cpp:
1479         (WebCore::InsertionPoint::getDistributedNodes):
1480
1481 2012-12-12  Patrick Gansterer  <paroga@webkit.org>
1482
1483         [WIN] Implement WebCore::fileSystemRepresentation() for !USE(CF)
1484         https://bugs.webkit.org/show_bug.cgi?id=104456
1485
1486         Reviewed by Brent Fulgham.
1487
1488         Convert the UTF-16 path to the system default Windows ANSI code page (usually Windows Latin1).
1489
1490         * platform/win/FileSystemWin.cpp:
1491         (WebCore::fileSystemRepresentation):
1492
1493 2012-12-12  No'am Rosenthal  <noam@webkit.org>
1494
1495         [Texmap] Remove lowp/highp indicators as they're not needed with ANGLE.
1496         https://bugs.webkit.org/show_bug.cgi?id=104707
1497
1498         Reviewed by Kenneth Rohde Christiansen.
1499
1500         lowp/highp indicator were needed for GLES2, but ANGLE does not require them.
1501
1502         Covered by existing tests.
1503
1504         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
1505         (WebCore::getShaderSpec):
1506
1507 2012-12-12  Andy Estes  <aestes@apple.com>
1508
1509         Don't dispatch fake mousemove events when we don't know where the cursor is
1510         https://bugs.webkit.org/show_bug.cgi?id=104861
1511
1512         Reviewed by Sam Weinig.
1513
1514         When EventHandler is instantiated or cleared, it sets the current mouse
1515         position to (0, 0), even though this is probably not where the mouse
1516         cursor really is (and we won't know until the mouse moves into the WebView).
1517         If a fake mousemove event fires and the page has an element at (0, 0)
1518         that responds to mousemove, we might end up changing the cursor or
1519         displaying a tooltip at the current mouse position, even if it is
1520         outside the WebView.
1521
1522         Fake mousemove events are dispatched in order to update a cursor that
1523         is already over the WebView. Don't dispatch the event if we don't know
1524         this to be true.
1525
1526         * page/EventHandler.cpp:
1527         (WebCore::EventHandler::EventHandler): Instantiate m_mousePositionIsUnknown to true.
1528         (WebCore::EventHandler::clear): Reset m_mousePositionIsUnknown to true.
1529         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): Return early if the mouse position is unknown.
1530         (WebCore::EventHandler::setLastKnownMousePosition): Set the mouse position from the PlatformMouseEvent and set m_mousePositionIsUnknown to false.
1531         (WebCore::EventHandler::handleMousePressEvent): Call setLastKnownMousePosition() instead of setting the position directly.
1532         (WebCore::EventHandler::handleMouseDoubleClickEvent): Ditto.
1533         (WebCore::EventHandler::handleMouseMoveEvent): Ditto.
1534         (WebCore::EventHandler::handleMouseReleaseEvent): Ditto.
1535         (WebCore::EventHandler::updateSelectionForMouseDrag): Rename currentMouse(Global)Position to lastKnownMouse(Global)Position.
1536         (WebCore::EventHandler::handleAutoscroll): Ditto.
1537         (WebCore::EventHandler::updatePanScrollState): Ditto.
1538         (WebCore::EventHandler::lastKnownMousePosition): Ditto.
1539         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoonInQuad): Ditto.
1540         (WebCore::EventHandler::fakeMouseMoveEventTimerFired): Ditto.
1541         (WebCore::EventHandler::hoverTimerFired): Ditto.
1542         * page/FrameView.cpp:
1543         (WebCore::FrameView::lastKnownMousePosition): Ditto.
1544         * platform/ScrollableArea.h:
1545         (WebCore::ScrollableArea::lastKnownMousePosition): Ditto.
1546         * platform/mac/ScrollAnimatorMac.mm:
1547         (-[WebScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]): Ditto.
1548         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]): Ditto.
1549         * rendering/RenderLayer.cpp:
1550         (WebCore::RenderLayer::panScrollFromPoint): Ditto.
1551         (WebCore::RenderLayer::autoscroll): Ditto.
1552         (WebCore::RenderLayer::lastKnownMousePosition): Ditto.
1553         * rendering/RenderListBox.cpp:
1554         (WebCore::RenderListBox::panScroll): Ditto.
1555         (WebCore::RenderListBox::autoscroll): Ditto.
1556         (WebCore::RenderListBox::lastKnownMousePosition): Ditto.
1557
1558 2012-12-12  Martin Robinson  <mrobinson@igalia.com>
1559
1560         Try to fix the GTK+ debug bulid
1561
1562         Logging.h is no longer included in headers, so we need to include it manually in
1563         files that require logging macros.
1564
1565         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Include Logging.h.
1566
1567 2012-12-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1568
1569         Unreviewed, rolling out r137524.
1570         http://trac.webkit.org/changeset/137524
1571         https://bugs.webkit.org/show_bug.cgi?id=104859
1572
1573         Causes m_deletionHasBegun assertion failures in
1574         MutationObserver tests (Requested by aklein on #webkit).
1575
1576         * dom/Document.cpp:
1577         (WebCore::Document::Document):
1578         (WebCore::Document::~Document):
1579         (WebCore::Document::suggestedMIMEType):
1580         * dom/Document.h:
1581         (WebCore::Node::isDocumentNode):
1582         (WebCore):
1583         (WebCore::Node::treeScope):
1584         (WebCore::Node::Node):
1585         * dom/Element.cpp:
1586         (WebCore::Element::createRareData):
1587         * dom/ElementRareData.h:
1588         (ElementRareData):
1589         (WebCore::ElementRareData::ElementRareData):
1590         * dom/Node.cpp:
1591         (WebCore::Node::~Node):
1592         (WebCore::Node::setDocument):
1593         (WebCore):
1594         (WebCore::Node::setTreeScope):
1595         (WebCore::Node::createRareData):
1596         (WebCore::Node::attach):
1597         (WebCore::Node::reportMemoryUsage):
1598         * dom/Node.h:
1599         (WebCore):
1600         (WebCore::NodeRareDataBase::treeScope):
1601         (WebCore::NodeRareDataBase::setTreeScope):
1602         (NodeRareDataBase):
1603         (WebCore::NodeRareDataBase::NodeRareDataBase):
1604         (Node):
1605         (WebCore::Node::inDocument):
1606         (WebCore::Node::documentInternal):
1607         * dom/NodeRareData.cpp:
1608         (SameSizeAsNodeRareData):
1609         (WebCore::NodeRareData::reportMemoryUsage):
1610         * dom/NodeRareData.h:
1611         (WebCore::NodeRareData::NodeRareData):
1612         * dom/ShadowRoot.cpp:
1613         (WebCore::ShadowRoot::ShadowRoot):
1614         * dom/TreeScope.cpp:
1615         (SameSizeAsTreeScope):
1616         (WebCore::TreeScope::TreeScope):
1617         (WebCore::TreeScope::setParentTreeScope):
1618         * dom/TreeScope.h:
1619         (WebCore):
1620         (TreeScope):
1621         * dom/TreeScopeAdopter.cpp:
1622         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1623         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
1624
1625 2012-12-12  Seokju Kwon  <seokju.kwon@gmail.com>
1626
1627         Fix build warning when ENABLE_INSPECTOR is disabled
1628         https://bugs.webkit.org/show_bug.cgi?id=104757
1629
1630         Reviewed by Kentaro Hara.
1631
1632         Use UNUSED_PARAM macro to fix build warning -Wunused-parameter.
1633
1634         No new tests, no behavior change.
1635
1636         * inspector/InspectorCanvasInstrumentation.h:
1637         (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
1638         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
1639         * inspector/InspectorConsoleInstrumentation.h:
1640         (WebCore::InspectorInstrumentation::addMessageToConsole):
1641         (WebCore::InspectorInstrumentation::consoleCount):
1642         (WebCore::InspectorInstrumentation::startConsoleTiming):
1643         (WebCore::InspectorInstrumentation::stopConsoleTiming):
1644         (WebCore::InspectorInstrumentation::consoleTimeStamp):
1645         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
1646         (WebCore::InspectorInstrumentation::addProfile):
1647         (WebCore::InspectorInstrumentation::profilerEnabled):
1648         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName):
1649         * inspector/InspectorCounters.h:
1650         (WebCore::InspectorCounters::incrementCounter):
1651         (WebCore::InspectorCounters::decrementCounter):
1652         * inspector/InspectorDatabaseInstrumentation.h:
1653         (WebCore::InspectorInstrumentation::didOpenDatabase):
1654         * inspector/InspectorInstrumentation.h:
1655         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
1656         (WebCore::InspectorInstrumentation::isDebuggerPaused):
1657         (WebCore::InspectorInstrumentation::willInsertDOMNode):
1658         (WebCore::InspectorInstrumentation::didInsertDOMNode):
1659         (WebCore::InspectorInstrumentation::willRemoveDOMNode):
1660         (WebCore::InspectorInstrumentation::willModifyDOMAttr):
1661         (WebCore::InspectorInstrumentation::didModifyDOMAttr):
1662         (WebCore::InspectorInstrumentation::didRemoveDOMAttr):
1663         (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
1664         (WebCore::InspectorInstrumentation::frameWindowDiscarded):
1665         (WebCore::InspectorInstrumentation::mediaQueryResultChanged):
1666         (WebCore::InspectorInstrumentation::didPushShadowRoot):
1667         (WebCore::InspectorInstrumentation::willPopShadowRoot):
1668         (WebCore::InspectorInstrumentation::didCreateNamedFlow):
1669         (WebCore::InspectorInstrumentation::willRemoveNamedFlow):
1670         (WebCore::InspectorInstrumentation::didUpdateRegionLayout):
1671         (WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
1672         (WebCore::InspectorInstrumentation::handleTouchEvent):
1673         (WebCore::InspectorInstrumentation::handleMousePress):
1674         (WebCore::InspectorInstrumentation::forcePseudoState):
1675         (WebCore::InspectorInstrumentation::characterDataModified):
1676         (WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
1677         (WebCore::InspectorInstrumentation::didScheduleResourceRequest):
1678         (WebCore::InspectorInstrumentation::didInstallTimer):
1679         (WebCore::InspectorInstrumentation::didRemoveTimer):
1680         (WebCore::InspectorInstrumentation::willCallFunction):
1681         (WebCore::InspectorInstrumentation::didCallFunction):
1682         (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent):
1683         (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent):
1684         (WebCore::InspectorInstrumentation::willDispatchEvent):
1685         (WebCore::InspectorInstrumentation::didDispatchEvent):
1686         (WebCore::InspectorInstrumentation::willHandleEvent):
1687         (WebCore::InspectorInstrumentation::didHandleEvent):
1688         (WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
1689         (WebCore::InspectorInstrumentation::didDispatchEventOnWindow):
1690         (WebCore::InspectorInstrumentation::willEvaluateScript):
1691         (WebCore::InspectorInstrumentation::didEvaluateScript):
1692         (WebCore::InspectorInstrumentation::didCreateIsolatedContext):
1693         (WebCore::InspectorInstrumentation::willFireTimer):
1694         (WebCore::InspectorInstrumentation::didFireTimer):
1695         (WebCore::InspectorInstrumentation::didBeginFrame):
1696         (WebCore::InspectorInstrumentation::didCancelFrame):
1697         (WebCore::InspectorInstrumentation::didInvalidateLayout):
1698         (WebCore::InspectorInstrumentation::willLayout):
1699         (WebCore::InspectorInstrumentation::didLayout):
1700         (WebCore::InspectorInstrumentation::didScroll):
1701         (WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent):
1702         (WebCore::InspectorInstrumentation::didDispatchXHRLoadEvent):
1703         (WebCore::InspectorInstrumentation::willPaint):
1704         (WebCore::InspectorInstrumentation::didPaint):
1705         (WebCore::InspectorInstrumentation::willScrollLayer):
1706         (WebCore::InspectorInstrumentation::didScrollLayer):
1707         (WebCore::InspectorInstrumentation::willComposite):
1708         (WebCore::InspectorInstrumentation::didComposite):
1709         (WebCore::InspectorInstrumentation::willRecalculateStyle):
1710         (WebCore::InspectorInstrumentation::didRecalculateStyle):
1711         (WebCore::InspectorInstrumentation::didScheduleStyleRecalculation):
1712         (WebCore::InspectorInstrumentation::willMatchRule):
1713         (WebCore::InspectorInstrumentation::didMatchRule):
1714         (WebCore::InspectorInstrumentation::willProcessRule):
1715         (WebCore::InspectorInstrumentation::didProcessRule):
1716         (WebCore::InspectorInstrumentation::applyUserAgentOverride):
1717         (WebCore::InspectorInstrumentation::applyScreenWidthOverride):
1718         (WebCore::InspectorInstrumentation::applyScreenHeightOverride):
1719         (WebCore::InspectorInstrumentation::shouldApplyScreenWidthOverride):
1720         (WebCore::InspectorInstrumentation::applyEmulatedMedia):
1721         (WebCore::InspectorInstrumentation::shouldApplyScreenHeightOverride):
1722         (WebCore::InspectorInstrumentation::willSendRequest):
1723         (WebCore::InspectorInstrumentation::continueAfterPingLoader):
1724         (WebCore::InspectorInstrumentation::markResourceAsCached):
1725         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
1726         (WebCore::InspectorInstrumentation::willReceiveResourceData):
1727         (WebCore::InspectorInstrumentation::didReceiveResourceData):
1728         (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
1729         (WebCore::InspectorInstrumentation::didReceiveResourceResponse):
1730         (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
1731         (WebCore::InspectorInstrumentation::continueWithPolicyDownload):
1732         (WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
1733         (WebCore::InspectorInstrumentation::didReceiveData):
1734         (WebCore::InspectorInstrumentation::didFinishLoading):
1735         (WebCore::InspectorInstrumentation::didFailLoading):
1736         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient):
1737         (WebCore::InspectorInstrumentation::willLoadXHR):
1738         (WebCore::InspectorInstrumentation::didFailXHRLoading):
1739         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
1740         (WebCore::InspectorInstrumentation::didReceiveXHRResponse):
1741         (WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
1742         (WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
1743         (WebCore::InspectorInstrumentation::scriptImported):
1744         (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
1745         (WebCore::InspectorInstrumentation::didReceiveScriptResponse):
1746         (WebCore::InspectorInstrumentation::domContentLoadedEventFired):
1747         (WebCore::InspectorInstrumentation::loadEventFired):
1748         (WebCore::InspectorInstrumentation::frameDetachedFromParent):
1749         (WebCore::InspectorInstrumentation::didCommitLoad):
1750         (WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
1751         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
1752         (WebCore::InspectorInstrumentation::willWriteHTML):
1753         (WebCore::InspectorInstrumentation::didWriteHTML):
1754         (WebCore::InspectorInstrumentation::didUseDOMStorage):
1755         (WebCore::InspectorInstrumentation::didDispatchDOMStorageEvent):
1756         (WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart):
1757         (WebCore::InspectorInstrumentation::didStartWorkerContext):
1758         (WebCore::InspectorInstrumentation::workerContextTerminated):
1759         (WebCore::InspectorInstrumentation::didCreateWebSocket):
1760         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
1761         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
1762         (WebCore::InspectorInstrumentation::didCloseWebSocket):
1763         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
1764         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
1765         (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
1766         (WebCore::InspectorInstrumentation::networkStateChanged):
1767         (WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
1768         (WebCore::InspectorInstrumentation::didRequestAnimationFrame):
1769         (WebCore::InspectorInstrumentation::didCancelAnimationFrame):
1770         (WebCore::InspectorInstrumentation::willFireAnimationFrame):
1771         (WebCore::InspectorInstrumentation::didFireAnimationFrame):
1772         (WebCore::InspectorInstrumentation::overrideGeolocationPosition):
1773         (WebCore::InspectorInstrumentation::overrideDeviceOrientation):
1774         * loader/appcache/ApplicationCacheGroup.cpp:
1775         (WebCore::ApplicationCacheGroup::didFinishLoading):
1776         (WebCore::ApplicationCacheGroup::didFail):
1777
1778 2012-12-12  Dean Jackson  <dino@apple.com>
1779
1780         Reinstate CIFilter code for Lion
1781         https://bugs.webkit.org/show_bug.cgi?id=104847
1782
1783         Reviewed by Simon Fraser.
1784
1785         This basically reverts r137500 for Lion, because some
1786         CAFilter types are not available there.
1787
1788         Covered by existing tests, with the warning that Lion
1789         baselines will need updating.
1790
1791         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1792         (PlatformCALayer::setFilters): Put an ugly #if in to
1793         detect OS X 10.7, and rename caFilter variable to
1794         filter.
1795
1796 2012-12-12  Seokju Kwon  <seokju.kwon@gmail.com>
1797
1798         [EFL] Refactor duplicate code into EflInspectorUtilities
1799         https://bugs.webkit.org/show_bug.cgi?id=104329
1800
1801         Reviewed by Kenneth Rohde Christiansen.
1802
1803         Move duplicate work into EflInspectorUtilities.
1804
1805         No new tests, refactoring.
1806
1807         * PlatformEfl.cmake:
1808         * platform/efl/EflInspectorUtilities.cpp: Added.
1809         (WebCore):
1810         (WebCore::inspectorResourcePath):
1811         * platform/efl/EflInspectorUtilities.h: Added.
1812         (WebCore):
1813
1814 2012-12-12  Mark Lam  <mark.lam@apple.com>
1815
1816         Fixing a chromium build breakage due to r137520.
1817         https://bugs.webkit.org/show_bug.cgi?id=104741.
1818
1819         Not reviewed.
1820
1821         Added #ifdef !PLATFORM(CHROMIUM) for one function chromium doesn't use.
1822
1823         No new tests.
1824
1825         * Modules/webdatabase/DatabaseManager.cpp:
1826         (WebCore::DatabaseManager::initialize):
1827         * Modules/webdatabase/DatabaseTracker.h:
1828         (DatabaseTracker):
1829
1830 2012-12-11  Emil A Eklund  <eae@chromium.org>
1831
1832         REGRESSION (Subpixel layout): Gray vertical lines appear when moving insertion point to right on Mac
1833         https://bugs.webkit.org/show_bug.cgi?id=102402
1834
1835         Reviewed by Simon Fraser.
1836
1837         Round paintOffset in CaretBase::paintCaret to ensure that caret is painted at an integer pixel boundary.
1838
1839         Test: fast/sub-pixel/input-caret-on-subpixel-bound.html
1840
1841         * editing/FrameSelection.cpp:
1842         (WebCore::CaretBase::paintCaret): Round paintOffset to ensure it is on a pixel boundary.
1843
1844 2012-12-12  Elliott Sprehn  <esprehn@gmail.com>
1845
1846         REGRESSION(137336): Generated run-ins are not placed correctly
1847         https://bugs.webkit.org/show_bug.cgi?id=104840
1848
1849         Reviewed by Abhishek Arya.
1850
1851         Now that :before and :after are not anonymous we no longer need special
1852         handling for run-ins. Currently placeRunInIfNeeded will only place
1853         a generated content run-in if a special flag is passed, but I removed
1854         the call with the flag as it wasn't needed in r137336. This patch just
1855         removes all special handling for generated content run-ins.
1856
1857         Test: fast/css-generated-content/generated-runin.html
1858
1859         * rendering/RenderBlock.cpp:
1860         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
1861         (WebCore::RenderBlock::placeRunInIfNeeded):
1862         (WebCore::RenderBlock::createReplacementRunIn):
1863             Lots of simplfication since there's no more anonymous run-ins.
1864         * rendering/RenderBlock.h:
1865         (RenderBlock):
1866         * rendering/RenderObject.h:
1867
1868 2012-12-12  Simon Fraser  <simon.fraser@apple.com>
1869
1870         Don't unconditionally repaint compositing layers when their size changes
1871         https://bugs.webkit.org/show_bug.cgi?id=104461
1872
1873         Reviewed by James Robinson.
1874
1875         In r137215 I attempted to avoid excessive repainting when compositing layers
1876         change size. This caused stretched layers when layer size changed as a result
1877         of bounds constraining in updateCompositedBounds(), so was conditionalized
1878         based on whether constraining happend, in r137248.
1879         
1880         However, the TileCache layer was affected by constraining, erroneously:
1881         shouldClipCompositedBounds() returned true of the tile cache layer. This
1882         is pointless, because we only constrain to the document bounds (or enclosing
1883         overflow), and the tile cache is already the size of the document bounds.
1884
1885         So, disable size constraining for the tile cache layer, and fix
1886         a confusing comment in updateCompositedBounds() that refers to the
1887         view's bounds, rather than the document's bounds.
1888
1889         * rendering/RenderLayerBacking.cpp:
1890         (WebCore::RenderLayerBacking::shouldClipCompositedBounds):
1891         (WebCore::RenderLayerBacking::updateCompositedBounds):
1892
1893 2012-12-12  Elliott Sprehn  <esprehn@gmail.com>
1894
1895         [Refactoring] Replace Node's Document pointer with a TreeScope pointer
1896         https://bugs.webkit.org/show_bug.cgi?id=59816
1897
1898         Reviewed by Ryosuke Niwa.
1899
1900         Instead of giving every node in a shadow a rare data, which can be quite
1901         large, we replace the Document pointer in Node with a TreeScope pointer
1902         and we give TreeScope a pointer to it's document scope.
1903
1904         This introduces no branches in document() because in the common
1905         case document() becomes equivalent to m_treeScope->m_documentScope where
1906         the documentScope is actually m_treeScope so this shouldn't introduce a
1907         perf regression.
1908
1909         Note also that TreeScope can never be null after r136328, and the document
1910         pointer is only null for DocumentType nodes so we can use a special
1911         no-document TreeScope for this case that always returns null from
1912         documentScope().
1913
1914         No new tests, no change in behavior.
1915
1916         * dom/Document.cpp:
1917         (WebCore::Document::Document):
1918         (WebCore::Document::~Document):
1919         (WebCore::Document::suggestedMIMEType):
1920         * dom/Document.h:
1921         (WebCore::Node::isDocumentNode):
1922         (WebCore::Node::Node):
1923         * dom/Element.cpp:
1924         (WebCore::Element::createRareData):
1925         * dom/ElementRareData.h:
1926         (ElementRareData):
1927         (WebCore::ElementRareData::ElementRareData):
1928         * dom/Node.cpp:
1929         (WebCore::Node::~Node):
1930         (WebCore::Node::createRareData):
1931         (WebCore::Node::attach):
1932         (WebCore::Node::reportMemoryUsage):
1933         * dom/Node.h:
1934         (WebCore):
1935         (WebCore::NodeRareDataBase::NodeRareDataBase):
1936         (NodeRareDataBase):
1937         (WebCore::Node::treeScope):
1938         (WebCore::Node::inDocument):
1939         (WebCore::Node::documentInternal):
1940         (WebCore::Node::setTreeScope):
1941         (Node):
1942         * dom/NodeRareData.cpp:
1943         (WebCore::NodeRareData::reportMemoryUsage):
1944         * dom/NodeRareData.h:
1945         (WebCore::NodeRareData::NodeRareData):
1946         * dom/ShadowRoot.cpp:
1947         (WebCore::ShadowRoot::ShadowRoot):
1948         * dom/TreeScope.cpp:
1949         (SameSizeAsTreeScope):
1950         (WebCore::TreeScope::TreeScope):
1951         (WebCore::TreeScope::setParentTreeScope):
1952         * dom/TreeScope.h:
1953         (WebCore):
1954         (TreeScope):
1955         (WebCore::TreeScope::documentScope):
1956         (WebCore::TreeScope::noDocumentInstance):
1957             Returns a special tree scope that has no document for use with
1958             DocumentType nodes.
1959         (WebCore::TreeScope::setDocumentScope):
1960         * dom/TreeScopeAdopter.cpp:
1961         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1962         (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
1963         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
1964
1965 2012-12-12  Mark Lam  <mark.lam@apple.com>
1966
1967         Encapsulate externally used webdatabase APIs in DatabaseManager.
1968         https://bugs.webkit.org/show_bug.cgi?id=104741.
1969
1970         Reviewed by Sam Weinig.
1971
1972         Use DatabaseManager instead of accessing DatabaseTracker, AbstractDatabase,
1973         and DatabaseContext directly. This is to prepare for upcoming webkit2
1974         refactoring.
1975
1976         No new tests.
1977
1978         * CMakeLists.txt:
1979         * Modules/webdatabase/DatabaseManager.cpp: Added.
1980         (WebCore::DatabaseManager::manager):
1981         (WebCore::DatabaseManager::DatabaseManager):
1982         (WebCore::DatabaseManager::initialize):
1983         (WebCore::DatabaseManager::setClient):
1984         (WebCore::DatabaseManager::isAvailable):
1985         (WebCore::DatabaseManager::setIsAvailable):
1986         (WebCore::DatabaseManager::hasOpenDatabases):
1987         (WebCore::DatabaseManager::stopDatabases):
1988         (WebCore::DatabaseManager::fullPathForDatabase):
1989         (WebCore::DatabaseManager::databaseDirectoryPath):
1990         (WebCore::DatabaseManager::setDatabaseDirectoryPath):
1991         (WebCore::DatabaseManager::hasEntryForOrigin):
1992         (WebCore::DatabaseManager::origins):
1993         (WebCore::DatabaseManager::databaseNamesForOrigin):
1994         (WebCore::DatabaseManager::detailsForNameAndOrigin):
1995         (WebCore::DatabaseManager::usageForOrigin):
1996         (WebCore::DatabaseManager::quotaForOrigin):
1997         (WebCore::DatabaseManager::setQuota):
1998         (WebCore::DatabaseManager::deleteAllDatabases):
1999         (WebCore::DatabaseManager::deleteOrigin):
2000         (WebCore::DatabaseManager::deleteDatabase):
2001         (WebCore::DatabaseManager::closeDatabasesImmediately):
2002         (WebCore::DatabaseManager::interruptAllDatabasesForContext):
2003         * Modules/webdatabase/DatabaseManager.h: Added.
2004         (DatabaseManager):
2005         (WebCore::DatabaseManager::~DatabaseManager):
2006         * Modules/webdatabase/DatabaseManagerClient.h: Copied from Source/WebCore/Modules/webdatabase/DatabaseTrackerClient.h.
2007         (WebCore::DatabaseManagerClient::~DatabaseManagerClient):
2008         * Modules/webdatabase/DatabaseTracker.cpp:
2009         (WebCore::DatabaseTracker::setClient):
2010         * Modules/webdatabase/DatabaseTracker.h:
2011         (DatabaseTracker):
2012         * Modules/webdatabase/DatabaseTrackerClient.h: Removed.
2013         * Target.pri:
2014         * WebCore.exp.in:
2015         * WebCore.gyp/WebCore.gyp:
2016         * WebCore.gypi:
2017         * WebCore.order:
2018         * WebCore.vcproj/WebCore.vcproj:
2019         * WebCore.xcodeproj/project.pbxproj:
2020         * bindings/generic/RuntimeEnabledFeatures.cpp:
2021         (WebCore::RuntimeEnabledFeatures::openDatabaseEnabled):
2022         (WebCore::RuntimeEnabledFeatures::openDatabaseSyncEnabled):
2023         * history/PageCache.cpp:
2024         (WebCore::logCanCacheFrameDecision):
2025         (WebCore::PageCache::canCachePageContainingThisFrame):
2026         * loader/FrameLoader.cpp:
2027         (WebCore::FrameLoader::stopLoading):
2028         * page/DOMWindow.cpp:
2029         * workers/WorkerThread.cpp:
2030         (WebCore::WorkerThreadShutdownStartTask::performTask):
2031         (WebCore::WorkerThread::stop):
2032
2033 2012-12-12  Tony Chang  <tony@chromium.org>
2034
2035         [chromium] don't write additional idl files to a gyp temp file
2036         https://bugs.webkit.org/show_bug.cgi?id=104831
2037
2038         Reviewed by Kentaro Hara.
2039
2040         The <|( command doesn't work for files like <(PRODUCT_DIR) or <(SHARED_INTERMEDIATE_DIR).
2041         For additional_idl_files, pass it as a parameter instead of a file listing the filenames.
2042         There are currently only 3 files in this variable. This shouldn't overflow the command
2043         line since the limit on Windows is 8k and with this change, we're still only around 4.5k.
2044         Also, the longest part of the command line is the list of defines. If needed, we could put
2045         that in a file instead.
2046
2047         No new tests, this is a refactoring of the build files.
2048
2049         * WebCore.gyp/WebCore.gyp: Don't use <|( for additional_idl_files.
2050         * bindings/scripts/generate-bindings.pl: Change --additionalIdlFilesList to
2051         --additionalIdlFiles, which is a shell argument containing the filenames.
2052
2053 2012-12-12  Chris Rogers  <crogers@google.com>
2054
2055         Implement OfflineAudioContext constructor
2056         https://bugs.webkit.org/show_bug.cgi?id=104188
2057
2058         Reviewed by Kentaro Hara.
2059
2060         The Web Audio layout tests have relied on an undocumented way (in the specification) to render
2061         audio faster than realtime using an OfflineAudioContext.  We want to expose a proper OfflineAudioContext
2062         object and constructor instead of piggybacking off of the normal AudioContext.
2063              
2064         * CMakeLists.txt:
2065         * DerivedSources.make:
2066         * DerivedSources.pri:
2067         * GNUmakefile.list.am:
2068         * Modules/webaudio/AudioContext.cpp:
2069         (WebCore::AudioContext::isSampleRateRangeGood):
2070         * Modules/webaudio/AudioContext.h:
2071         (AudioContext):
2072         * Modules/webaudio/DOMWindowWebAudio.idl:
2073         * Modules/webaudio/OfflineAudioContext.cpp: Added.
2074         (WebCore):
2075         (WebCore::OfflineAudioContext::create):
2076         (WebCore::OfflineAudioContext::OfflineAudioContext):
2077         (WebCore::OfflineAudioContext::~OfflineAudioContext):
2078         * Modules/webaudio/OfflineAudioContext.h: Added.
2079         (WebCore):
2080         (OfflineAudioContext):
2081         * Modules/webaudio/OfflineAudioContext.idl: Added.
2082         * WebCore.gypi:
2083         * WebCore.xcodeproj/project.pbxproj:
2084         * bindings/generic/RuntimeEnabledFeatures.h:
2085         (WebCore::RuntimeEnabledFeatures::webkitOfflineAudioContextEnabled):
2086         * bindings/js/JSAudioContextCustom.cpp:
2087         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
2088         * bindings/v8/custom/V8AudioContextCustom.cpp:
2089         (WebCore::V8AudioContext::constructorCallbackCustom):
2090
2091 2012-12-12  John Griggs  <jgriggs@rim.com>
2092
2093         2012-12-12  John Griggs  <jgriggs@rim.com>
2094
2095         [BlackBerry] Update Media Controls for BlackBerry Platform
2096         https://bugs.webkit.org/show_bug.cgi?id=104443
2097         https://przilla.ott.qnx.com/bugzilla/show_bug.cgi?id=204748
2098
2099         Reviewed by Rob Buis.
2100
2101         Update Media Controls for BlackBerry platform to allow audio, embedded video and fullscreen video controls to be positioned and styled differently.
2102
2103         BlackBerry-specific update to Media Controls - No new tests required.
2104
2105         * PlatformBlackBerry.cmake:
2106         * css/mediaControlsBlackBerry.css:
2107         (audio):
2108         (audio::-webkit-media-controls-embedded-panel, video::-webkit-media-controls-embedded-panel):
2109         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2110         (video::-webkit-media-controls-button-group-container, audio::-webkit-media-controls-button-group-container):
2111         (video::-webkit-media-controls-fullscreen-time-display-container, audio::-webkit-media-controls-fullscreen-time-display-container):
2112         (video::-webkit-media-controls-time-display-container, audio::-webkit-media-controls-time-display-container):
2113         (video::-webkit-media-controls-fullscreen-play-button, audio::-webkit-media-controls-fullscreen-play-button):
2114         (video::-webkit-media-controls-play-button, audio::-webkit-media-controls-play-button):
2115         (audio::-webkit-media-controls-fullscreen-timeline-container, video::-webkit-media-controls-fullscreen-timeline-container):
2116         (video::-webkit-media-controls-timeline-container, audio::-webkit-media-controls-timeline-container):
2117         (audio::-webkit-media-controls-fullscreen-current-time-display, video::-webkit-media-controls-fullscreen-current-time-display):
2118         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
2119         (video::-webkit-media-controls-fullscreen-time-remaining-display, audio::-webkit-media-controls-fullscreen-time-remaining-display):
2120         (video::-webkit-media-controls-time-remaining-display, audio::-webkit-media-controls-time-remaining-display):
2121         (audio::-webkit-media-controls-fullscreen-timeline, video::-webkit-media-controls-fullscreen-timeline):
2122         (video::-webkit-media-controls-fullscreen-fullscreen-button, audio::-webkit-media-controls-fullscreen-fullscreen-button):
2123         (video::-webkit-media-controls-fullscreen-button):
2124         (audio::-webkit-media-controls-fullscreen-button):
2125         (audio::-webkit-media-controls-audio-mute-button):
2126         (video::-webkit-media-controls-audio-mute-button):
2127         (audio::-webkit-media-controls-volume-slider-container):
2128         (video::-webkit-media-controls-volume-slider-container):
2129         (audio::-webkit-media-controls-volume-slider):
2130         (video::-webkit-media-controls-volume-slider):
2131         (video::-webkit-media-controls-fullscreen-button-divider, audio::-webkit-media-controls-fullscreen-button-divider):
2132         (video::-webkit-media-controls-fullscreen-button-container, video::-webkit-media-controls-play-button-container, audio::-webkit-media-controls-fullscreen-button-container, audio::-webkit-media-controls-play-button-container):
2133         * css/mediaControlsBlackBerryFullscreen.css: Added.
2134         (body:-webkit-full-page-media):
2135         (video:-webkit-full-screen::-webkit-media-controls-embedded-panel):
2136         (video:-webkit-full-screen::-webkit-media-controls-panel):
2137         (video:-webkit-full-screen::-webkit-media-controls-button-group-container):
2138         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-time-display-container):
2139         (video:-webkit-full-screen::-webkit-media-controls-time-display-container):
2140         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-play-button):
2141         (video:-webkit-full-screen::-webkit-media-controls-play-button):
2142         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-timeline-container):
2143         (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
2144         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-current-time-display):
2145         (video:-webkit-full-screen::-webkit-media-controls-current-time-display):
2146         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-time-remaining-display):
2147         (video:-webkit-full-screen::-webkit-media-controls-time-remaining-display):
2148         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-timeline):
2149         (video:-webkit-full-screen::-webkit-media-controls-timeline):
2150         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-fullscreen-button):
2151         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button):
2152         (video:-webkit-full-screen::-webkit-media-controls-audio-mute-button):
2153         (video:-webkit-full-screen::-webkit-media-controls-volume-slider-container):
2154         (video:-webkit-full-screen::-webkit-media-controls-volume-slider):
2155         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-divider):
2156         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-container, video:-webkit-full-screen::-webkit-media-controls-play-button-container):
2157         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-container):
2158         (video:-webkit-full-screen::-webkit-media-controls-play-button-container):
2159         (video:-webkit-full-screen::-webkit-media-controls-placeholder):
2160         * html/shadow/MediaControlsBlackBerry.cpp: Added.
2161         (WebCore):
2162         (WebCore::MediaControlButtonGroupContainerElement::MediaControlButtonGroupContainerElement):
2163         (WebCore::MediaControlButtonGroupContainerElement::create):
2164         (WebCore::MediaControlButtonGroupContainerElement::shadowPseudoId):
2165         (WebCore::MediaControlTimeDisplayContainerElement::MediaControlTimeDisplayContainerElement):
2166         (WebCore::MediaControlTimeDisplayContainerElement::create):
2167         (WebCore::MediaControlTimeDisplayContainerElement::shadowPseudoId):
2168         (WebCore::MediaControlEmbeddedPanelElement::MediaControlEmbeddedPanelElement):
2169         (WebCore::MediaControlEmbeddedPanelElement::create):
2170         (WebCore::MediaControlEmbeddedPanelElement::shadowPseudoId):
2171         (WebCore::MediaControlEmbeddedPanelElement::startDrag):
2172         (WebCore::MediaControlEmbeddedPanelElement::continueDrag):
2173         (WebCore::MediaControlEmbeddedPanelElement::endDrag):
2174         (WebCore::MediaControlEmbeddedPanelElement::startTimer):
2175         (WebCore::MediaControlEmbeddedPanelElement::stopTimer):
2176         (WebCore::MediaControlEmbeddedPanelElement::transitionTimerFired):
2177         (WebCore::MediaControlEmbeddedPanelElement::setPosition):
2178         (WebCore::MediaControlEmbeddedPanelElement::resetPosition):
2179         (WebCore::MediaControlEmbeddedPanelElement::makeOpaque):
2180         (WebCore::MediaControlEmbeddedPanelElement::makeTransparent):
2181         (WebCore::MediaControlEmbeddedPanelElement::defaultEventHandler):
2182         (WebCore::MediaControlEmbeddedPanelElement::setCanBeDragged):
2183         (WebCore::MediaControlEmbeddedPanelElement::setIsDisplayed):
2184         (WebCore::MediaControlFullscreenTimeDisplayContainerElement::MediaControlFullscreenTimeDisplayContainerElement):
2185         (WebCore::MediaControlFullscreenTimeDisplayContainerElement::create):
2186         (WebCore::MediaControlFullscreenTimeDisplayContainerElement::shadowPseudoId):
2187         (WebCore::MediaControlFullscreenButtonContainerElement::MediaControlFullscreenButtonContainerElement):
2188         (WebCore::MediaControlFullscreenButtonContainerElement::create):
2189         (WebCore::MediaControlFullscreenButtonContainerElement::shadowPseudoId):
2190         (WebCore::MediaControlFullscreenButtonDividerElement::MediaControlFullscreenButtonDividerElement):
2191         (WebCore::MediaControlFullscreenButtonDividerElement::create):
2192         (WebCore::MediaControlFullscreenButtonDividerElement::shadowPseudoId):
2193         (WebCore::MediaControlPlayButtonContainerElement::MediaControlPlayButtonContainerElement):
2194         (WebCore::MediaControlPlayButtonContainerElement::create):
2195         (WebCore::MediaControlPlayButtonContainerElement::shadowPseudoId):
2196         (WebCore::MediaControlPlaceholderElement::MediaControlPlaceholderElement):
2197         (WebCore::MediaControlPlaceholderElement::create):
2198         (WebCore::MediaControlPlaceholderElement::shadowPseudoId):
2199         (WebCore::MediaControlFullscreenPlayButtonElement::MediaControlFullscreenPlayButtonElement):
2200         (WebCore::MediaControlFullscreenPlayButtonElement::create):
2201         (WebCore::MediaControlFullscreenPlayButtonElement::defaultEventHandler):
2202         (WebCore::MediaControlFullscreenPlayButtonElement::updateDisplayType):
2203         (WebCore::MediaControlFullscreenPlayButtonElement::shadowPseudoId):
2204         (WebCore::MediaControlFullscreenFullscreenButtonElement::MediaControlFullscreenFullscreenButtonElement):
2205         (WebCore::MediaControlFullscreenFullscreenButtonElement::create):
2206         (WebCore::MediaControlFullscreenFullscreenButtonElement::defaultEventHandler):
2207         (WebCore::MediaControlFullscreenFullscreenButtonElement::shadowPseudoId):
2208         (WebCore::MediaControlFullscreenFullscreenButtonElement::setIsFullscreen):
2209         (WebCore::MediaControlFullscreenTimelineContainerElement::MediaControlFullscreenTimelineContainerElement):
2210         (WebCore::MediaControlFullscreenTimelineContainerElement::create):
2211         (WebCore::MediaControlFullscreenTimelineContainerElement::shadowPseudoId):
2212         (WebCore::MediaControlFullscreenTimelineElement::MediaControlFullscreenTimelineElement):
2213         (WebCore::MediaControlFullscreenTimelineElement::create):
2214         (WebCore::MediaControlFullscreenTimelineElement::defaultEventHandler):
2215         (WebCore::MediaControlFullscreenTimelineElement::willRespondToMouseClickEvents):
2216         (WebCore::MediaControlFullscreenTimelineElement::setPosition):
2217         (WebCore::MediaControlFullscreenTimelineElement::setDuration):
2218         (WebCore::MediaControlFullscreenTimelineElement::shadowPseudoId):
2219         (WebCore::MediaControlFullscreenTimeRemainingDisplayElement::create):
2220         (WebCore::MediaControlFullscreenTimeRemainingDisplayElement::MediaControlFullscreenTimeRemainingDisplayElement):
2221         (WebCore::MediaControlFullscreenTimeRemainingDisplayElement::shadowPseudoId):
2222         (WebCore::MediaControlFullscreenCurrentTimeDisplayElement::create):
2223         (WebCore::MediaControlFullscreenCurrentTimeDisplayElement::MediaControlFullscreenCurrentTimeDisplayElement):
2224         (WebCore::MediaControlFullscreenCurrentTimeDisplayElement::shadowPseudoId):
2225         (WebCore::MediaControlAudioMuteButtonElement::MediaControlAudioMuteButtonElement):
2226         (WebCore::MediaControlAudioMuteButtonElement::create):
2227         (WebCore::MediaControlAudioMuteButtonElement::defaultEventHandler):
2228         (WebCore::MediaControlAudioMuteButtonElement::shadowPseudoId):
2229         (WebCore::MediaControlsBlackBerry::MediaControlsBlackBerry):
2230         (WebCore::MediaControls::create):
2231         (WebCore::MediaControlsBlackBerry::createControls):
2232         (WebCore::MediaControlsBlackBerry::setMediaController):
2233         (WebCore::MediaControlsBlackBerry::show):
2234         (WebCore::MediaControlsBlackBerry::hide):
2235         (WebCore::MediaControlsBlackBerry::makeOpaque):
2236         (WebCore::MediaControlsBlackBerry::makeTransparent):
2237         (WebCore::MediaControlsBlackBerry::reset):
2238         (WebCore::MediaControlsBlackBerry::bufferingProgressed):
2239         (WebCore::MediaControlsBlackBerry::playbackStarted):
2240         (WebCore::MediaControlsBlackBerry::playbackProgressed):
2241         (WebCore::MediaControlsBlackBerry::playbackStopped):
2242         (WebCore::MediaControlsBlackBerry::updateCurrentTimeDisplay):
2243         (WebCore::MediaControlsBlackBerry::reportedError):
2244         (WebCore::MediaControlsBlackBerry::changedMute):
2245         (WebCore::MediaControlsBlackBerry::enteredFullscreen):
2246         (WebCore::MediaControlsBlackBerry::exitedFullscreen):
2247         (WebCore::MediaControlsBlackBerry::showVolumeSlider):
2248         (WebCore::MediaControlsBlackBerry::toggleVolumeSlider):
2249         (WebCore::MediaControlsBlackBerry::shouldHideControls):
2250         * html/shadow/MediaControlsBlackBerry.h: Added.
2251         (WebCore):
2252         (MediaControlButtonGroupContainerElement):
2253         (MediaControlTimeDisplayContainerElement):
2254         (MediaControlEmbeddedPanelElement):
2255         (MediaControlFullscreenTimeDisplayContainerElement):
2256         (MediaControlFullscreenButtonContainerElement):
2257         (MediaControlFullscreenButtonDividerElement):
2258         (MediaControlPlayButtonContainerElement):
2259         (MediaControlPlaceholderElement):
2260         (MediaControlFullscreenPlayButtonElement):
2261         (MediaControlFullscreenFullscreenButtonElement):
2262         (MediaControlFullscreenTimelineContainerElement):
2263         (MediaControlFullscreenTimelineElement):
2264         (MediaControlFullscreenTimeRemainingDisplayElement):
2265         (MediaControlFullscreenCurrentTimeDisplayElement):
2266         (MediaControlAudioMuteButtonElement):
2267         (MediaControlsBlackBerry):
2268         * platform/blackberry/RenderThemeBlackBerry.cpp:
2269         (WebCore):
2270         (WebCore::RenderThemeBlackBerry::extraFullScreenStyleSheet):
2271         (WebCore::RenderThemeBlackBerry::adjustSliderThumbSize):
2272         (WebCore::RenderThemeBlackBerry::paintSliderTrackRect):
2273         (WebCore::RenderThemeBlackBerry::adjustMediaControlStyle):
2274         (WebCore::RenderThemeBlackBerry::adjustSliderTrackStyle):
2275         (WebCore::RenderThemeBlackBerry::paintMediaRewindButton):
2276         (WebCore::RenderThemeBlackBerry::paintMediaMuteButton):
2277         (WebCore::RenderThemeBlackBerry::paintMediaFullscreenButton):
2278         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
2279         (WebCore::RenderThemeBlackBerry::paintMediaSliderThumb):
2280         (WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderTrack):
2281         (WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderThumb):
2282         * platform/blackberry/RenderThemeBlackBerry.h:
2283         (WebCore::RenderThemeBlackBerry::usesVerticalVolumeSlider):
2284         (RenderThemeBlackBerry):
2285
2286 2012-12-12  Dominic Mazzoni  <dmazzoni@google.com>
2287
2288         AX: textUnderElement should consider alt text, but skip links and controls
2289         https://bugs.webkit.org/show_bug.cgi?id=101650
2290
2291         Reviewed by Chris Fleizach.
2292
2293         Getting inner text from an element now ignores focusable descendants and
2294         containers, but uses alternative text.
2295
2296         The computation of textUnderElement is now recursive. This caused a crash
2297         if it was called by accessibilityIsIgnored during object destruction,
2298         so I simplified accessibilityIsIgnored to not actually call textUnderElement,
2299         without affecting test results, which should actually be a decent speedup.
2300
2301         Test: accessibility/button-title-uses-inner-img-alt.html
2302         Test: accessibility/focusable-div.html
2303
2304         * accessibility/AccessibilityNodeObject.cpp:
2305         (WebCore):
2306         (WebCore::shouldUseAccessiblityObjectInnerText):
2307         (WebCore::AccessibilityNodeObject::textUnderElement):
2308         * accessibility/AccessibilityRenderObject.cpp:
2309         (WebCore::AccessibilityRenderObject::textUnderElement):
2310
2311 2012-12-12  Eberhard Graether  <egraether@google.com>
2312
2313         Web Inspector: follow up to r136974: handle visibility shortcut in keydown event of ElementsTreeOutline.element
2314         https://bugs.webkit.org/show_bug.cgi?id=104694
2315
2316         Reviewed by Pavel Feldman.
2317
2318         Typing H in the StylesSidebarPane caused toggling of the selected elements visibility. This change only handles
2319         the H keydown when the ElementsPanel is focused.
2320
2321         No new tests.
2322
2323         * inspector/front-end/ElementsTreeOutline.js:
2324         (WebInspector.ElementsTreeOutline):
2325         (WebInspector.ElementsTreeOutline.prototype._onkeydown):
2326         (WebInspector.ElementsTreeOutline.prototype.handleShortcut):
2327         * inspector/front-end/KeyboardShortcut.js:
2328         (WebInspector.KeyboardShortcut.hasNoModifiers):
2329
2330 2012-12-12  Philip Rogers  <pdr@google.com>
2331
2332         Fix target element handling in SVGSMILElement.
2333         https://bugs.webkit.org/show_bug.cgi?id=104495
2334
2335         Reviewed by Abhishek Arya.
2336
2337         This patch fixes two bugs that led to stale target elements in SVGSMILElement.
2338
2339         r122449 changed the <use> code to call removeAllElementReferencesForTarget to rebuild
2340         dependent <use> trees. This contained a bug where element references would be incorrectly
2341         removed. removeAllElementReferencesForTarget calls svgAttributeChanged(href) on all
2342         references, which can then re-add the references back. The bug is that
2343         removeAllElementReferencesForTarget removes a newly-added reference as the last step.
2344
2345         r136906 changed targetElement() to no longer be lazily resolved so any changes to an
2346         animation's href attribute needed to be tracked. r136906 refactored the code but did not
2347         fix a bug where animation elements not in the document would not react to
2348         svgAttributeChanged(href).
2349
2350         The combination of these two bugs allowed stale targetElement references to exist. A
2351         target element could be removed from the document without dependent animation elements
2352         receiving a notification (bug 1) and not reacting to notifications they received (bug 2).
2353
2354         This patch updates SVGUseElement::buildInstanceTree to only rebuild (not remove) the
2355         elements referencing the target by adding rebuildAllElementReferencesForTarget. This patch
2356         also updates SVGSMILElement to correctly react to svgAttributeChanged() notifications
2357         for href changes even when not in the document.
2358
2359         Test: svg/animations/target-condition-crash.html
2360
2361         * svg/SVGDocumentExtensions.cpp:
2362         (WebCore::SVGDocumentExtensions::rebuildAllElementReferencesForTarget):
2363         (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget):
2364
2365             Refactored so that we can notify element references to update without removing
2366             references.
2367
2368         * svg/SVGDocumentExtensions.h:
2369         (SVGDocumentExtensions):
2370         * svg/SVGElement.cpp:
2371         (WebCore::SVGElement::~SVGElement):
2372         (WebCore::SVGElement::removedFrom):
2373
2374             Similar to SVGUseElement::buildShadowAndInstanceTree, this callsite was updated to
2375             only rebuild references instead of removing them.
2376
2377         (WebCore::SVGElement::attributeChanged):
2378         * svg/SVGUseElement.cpp:
2379         (WebCore::SVGUseElement::buildShadowAndInstanceTree):
2380
2381             The comment indicates we just want to rebuild (not remove). This callsite has been
2382             updated to use the new rebuildAllElementReferencesForTarget function.
2383
2384         (WebCore::SVGUseElement::buildInstanceTree):
2385         * svg/animation/SVGSMILElement.cpp:
2386         (WebCore::SVGSMILElement::buildPendingResource):
2387         (WebCore::SVGSMILElement::removedFrom):
2388
2389             Previously, if an SVGSMILElement was not in the document, only clearResourceReferences
2390             would be called when the target changed. This has been refactored to reset the
2391             targetElement if the element needs to build resources but is not in the document.
2392
2393             I looked at moving this into clearResourceReferences (since the target element might
2394             be considered a reference) but we run into issues calling pure virtual functions in
2395             the destructor. The current implementation seemed the cleanest.
2396
2397             SVGSMILElement::removedFrom was cleaned up to match the rest of the code. The comment
2398             in removedFrom appears to be stale since disconnectConditions does not kill the element.
2399
2400         (WebCore::SVGSMILElement::svgAttributeChanged):
2401
2402             Removed the bad !inDocument() checks that broke href change notifications.
2403
2404         (WebCore::SVGSMILElement::setTargetElement):
2405
2406 2012-12-12  Alpha Lam  <hclam@chromium.org>
2407
2408         [chromium] Minimize memcpy for encoded image data in ImageFrameGenerator
2409         https://bugs.webkit.org/show_bug.cgi?id=103797
2410
2411         Reviewed by Stephen White.
2412
2413         Added a new class ThreadSafeDataTransport to help transporting data in
2414         SharedBuffer from one thread to another. This class is designed to minimize
2415         thread contention and memory copy.
2416
2417         It is implemented using a data queue. New data segments are copied into
2418         this queue. The queue is then consolidated with existing data when user
2419         requests access to the final SharedBuffer.
2420
2421         Memory is copied into and out of the queue but this approach avoid
2422         copying the entire SharedBuffer.
2423
2424         ImageFrameGenerator is now using this class for data transport between
2425         threads.
2426
2427         Unit tests in ThreadSafeDataTransportTest. Also existing ImageFrameGeneratorTest passes.
2428
2429         * WebCore.gypi:
2430         * platform/graphics/chromium/ImageFrameGenerator.cpp:
2431         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
2432         (WebCore::ImageFrameGenerator::setData):
2433         (WebCore::ImageFrameGenerator::tryToResumeDecodeAndScale):
2434         Added logic to skip decoding if there's no new data.
2435         (WebCore::ImageFrameGenerator::decode):
2436         * platform/graphics/chromium/ImageFrameGenerator.h:
2437         (ImageFrameGenerator):
2438         * platform/graphics/chromium/ThreadSafeDataTransport.cpp: Added.
2439         (WebCore):
2440         (WebCore::ThreadSafeDataTransport::ThreadSafeDataTransport):
2441         (WebCore::ThreadSafeDataTransport::~ThreadSafeDataTransport):
2442         (WebCore::ThreadSafeDataTransport::setData):
2443         (WebCore::ThreadSafeDataTransport::data):
2444         (WebCore::ThreadSafeDataTransport::hasNewData):
2445         * platform/graphics/chromium/ThreadSafeDataTransport.h: Added.
2446         (WebCore):
2447         (ThreadSafeDataTransport):
2448
2449 2012-12-12  Roger Fong  <roger_fong@apple.com>
2450
2451         Enable VIDEO_TRACK on Windows.
2452         https://bugs.webkit.org/show_bug.cgi?id=104706.
2453
2454         Reviewed by Timothy Horton.
2455
2456         Enable VIDEO_TRACK on Windows and update project property files.
2457
2458         * DerivedSources.cpp:
2459         * WebCore.vcproj/WebCore.vcproj:
2460         * WebCore.vcproj/WebCoreCommon.vsprops:
2461         * WebCore.vcproj/copyForwardingHeaders.cmd:
2462         * bindings/generic/RuntimeEnabledFeatures.cpp:
2463         (WebCore):
2464         * html/HTMLElementsAllInOne.cpp:
2465         * rendering/RenderingAllInOne.cpp:
2466
2467 2012-12-12  No'am Rosenthal  <noam.rosenthal@nokia.com>
2468
2469         REGRESSION: r137481 caused a build failure with GTK
2470         https://bugs.webkit.org/show_bug.cgi?id=104826
2471
2472         Unreviewed build fix.
2473
2474         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2475         (WebCore::GraphicsLayerTextureMapper::prepareBackingStore):
2476             Brought back #if PLATFORM(QT) to surround the dynamic_cast call.
2477
2478 2012-12-12  Dean Jackson  <dino@apple.com>
2479
2480         Use CAFilter rather than CIFilter
2481         https://bugs.webkit.org/show_bug.cgi?id=104759
2482
2483         Reviewed by Tim Horton.
2484
2485         In order to get better performance in the simple CSS filter
2486         cases, use CAFilter rather than CIFilter. This involved
2487         defining some platform-specific values inside
2488         PlatformCALayerMac to expose CAFilter.
2489
2490         The great side-effect is that this brings our hardware
2491         output much closer to our software filters. For example,
2492         on a random location in the hue-rotate test.
2493
2494         Software: rgb(255, 148, 16)
2495         Hardware before: rgb(255, 204, 50)
2496         Hardware after: rgb(255, 165, 33)
2497
2498         Still some improvement needed, but better.
2499
2500         Covered by existing tests.
2501
2502         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2503         (CAColorMatrix): New structure to hold 5x4 matrix representing a color operation.
2504         (PlatformCALayer::setFilters): Use CAFilter objects rather than CIFilter.
2505
2506 2012-12-12  No'am Rosenthal  <noam@webkit.org>
2507
2508         [Texmap] Consolidate redundant code for ARB_RECT texture
2509         https://bugs.webkit.org/show_bug.cgi?id=104705
2510
2511         Reviewed by Kenneth Rohde Christiansen.
2512
2513         Instead of having a whole different function for RECT textures,
2514         keep the existing functions and pass a flag that tells
2515         TextureMapperGL to use the non-normalized coordinates and the
2516         RECT shaders.
2517
2518         No new tests, refactor only. Tested to not break WebGL on
2519         Qt-Mac.
2520
2521         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
2522         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
2523         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
2524         * platform/graphics/texmap/TextureMapperGL.cpp:
2525         (WebCore::TextureMapperGL::drawQuad):
2526             Compensate for rect textures in drawQuad.
2527
2528         (WebCore::TextureMapperGL::drawBorder):
2529         (WebCore::TextureMapperGL::drawTexture):
2530         (WebCore::TextureMapperGL::drawSolidColor):
2531         (WebCore::TextureMapperGL::drawTextureWithAntialiasing):
2532         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
2533             Pass flags to TextureMapperGL::drawQuad instead of a bool.
2534
2535         * platform/graphics/texmap/TextureMapperGL.h:
2536         (TextureMapperGL):
2537         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
2538         (WebCore::getShaderSpec):
2539         * platform/graphics/texmap/TextureMapperShaderManager.h:
2540         (TextureMapperShaderProgram):
2541             Compensate for the texture-size in the vertex
2542             shader instead of in the fragment shader.
2543
2544 2012-12-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2545
2546         Unreviewed, rolling out r137491.
2547         http://trac.webkit.org/changeset/137491
2548         https://bugs.webkit.org/show_bug.cgi?id=104828
2549
2550         broke the builtd (Requested by rfong on #webkit).
2551
2552         * DerivedSources.cpp:
2553         * WebCore.vcproj/WebCore.vcproj:
2554         * WebCore.vcproj/WebCoreCommon.vsprops:
2555         * WebCore.vcproj/copyForwardingHeaders.cmd:
2556         * bindings/generic/RuntimeEnabledFeatures.cpp:
2557         (WebCore):
2558         * html/HTMLElementsAllInOne.cpp:
2559         * platform/NotImplemented.cpp:
2560         (WebCore):
2561         (WebCore::notImplementedLoggingChannel):
2562         * rendering/RenderingAllInOne.cpp:
2563
2564 2012-12-12  John J. Barton  <johnjbarton@chromium.org>
2565
2566         Web Inspector: remove protocol-externs.js temp file after compile-front-end.py
2567         https://bugs.webkit.org/show_bug.cgi?id=98799
2568
2569         Reviewed by Vsevolod Vlasov.
2570
2571         Add os.system rm for protocol-externs.js to the end of the compile script
2572
2573         * inspector/compile-front-end.py:
2574
2575 2012-12-12  Robert Hogan  <robert@webkit.org>
2576
2577         White space between inline blocks should be affected by word-spacing property
2578         https://bugs.webkit.org/show_bug.cgi?id=69072
2579
2580         Reviewed by Levi Weintraub.
2581
2582         Allow word-spacing to get added to the spaces between inline blocks in placeBoxesInInlineDirection by setting
2583         needsWordSpacing to true each time an inline block is encountered. This ensures that the next space encountered
2584         in a text run will be treated as a space between two words and will get word-spacing added to it if it is present
2585         in the style.
2586
2587         Tests: fast/css/word-spacing-between-blocks.html
2588                fast/css/word-spacing-between-inlines.html
2589
2590         * rendering/InlineFlowBox.cpp:
2591         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
2592
2593 2012-12-12  Xianzhu Wang  <wangxianzhu@chromium.org>
2594
2595         Pre-painting should not paint out-of-view fixed position elements
2596         https://bugs.webkit.org/show_bug.cgi?id=104724
2597
2598         Reviewed by James Robinson.
2599
2600         Test: ManualTests/compositing/fixed-position-out-of-view-scroll-prepaint.html
2601
2602         * rendering/RenderLayer.cpp:
2603         (WebCore::RenderLayer::paintLayer): Don't paint out-of-view fixed position elements.
2604
2605 2012-12-11  Roger Fong  <roger_fong@apple.com>
2606
2607         Enable VIDEO_TRACK on Windows.
2608         https://bugs.webkit.org/show_bug.cgi?id=104706.
2609
2610         Reviewed by Timothy Horton.
2611
2612         Enable VIDEO_TRACK on Windows and update project property files.
2613
2614         * DerivedSources.cpp:
2615         * WebCore.vcproj/WebCore.vcproj:
2616         * WebCore.vcproj/WebCoreCommon.vsprops:
2617         * WebCore.vcproj/copyForwardingHeaders.cmd:
2618         * bindings/generic/RuntimeEnabledFeatures.cpp:
2619         (WebCore):
2620         * html/HTMLElementsAllInOne.cpp:
2621         * rendering/RenderingAllInOne.cpp:
2622
2623 2012-12-12  James Simonsen  <simonjam@chromium.org>
2624
2625         [Resource Timing] Failed resources shouldn't be recorded in the buffer
2626         https://bugs.webkit.org/show_bug.cgi?id=104762
2627
2628         Reviewed by Tony Gentilcore.
2629
2630         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_failures.html
2631
2632         * loader/cache/CachedResourceLoader.cpp:
2633         (WebCore::CachedResourceLoader::loadDone):
2634
2635 2012-12-12  Martin Robinson  <mrobinson@igalia.com>
2636
2637         [GTK] Add authentication support to DRT and fix exposed issues in the libsoup backend
2638         https://bugs.webkit.org/show_bug.cgi?id=104285
2639
2640         Reviewed by Gustavo Noronha Silva.
2641
2642         Fix issues in the libsoup networking backend that were causing test
2643         failures.
2644
2645         No new tests. This patch unskips authentication tests.
2646
2647         * platform/network/soup/ResourceHandleSoup.cpp:
2648         (WebCore::isAuthenticationFailureStatusCode): Added this helper to catch authentication status codes
2649         and use it everywhere.
2650         (WebCore::applyAuthenticationToRequest): Use an early return instead of an if-statement
2651         and instead of always using manually specified credentials, apply those found in the session
2652         storage as well. Instead of applying the credentials to firstRequest always, accept the request
2653         as a parameter, so this method can be properly used with redirects.
2654         (WebCore::restartedCallback): Instead of creating the KURL directly from soup_uri_to_string
2655         use soupURIToKURL, which preserves the password from the SoupURI. soup_uri_to_string doesn't
2656         include the password. When calling applyAuthenticationToRequest update the new request. Before
2657         applyAuthenticationToRequest always updated the firstRequest. Do not call willSendRequest for
2658         instances when this method is called for authentication handling. willSendRequest should only
2659         be called for server-side redirects.
2660         (WebCore::createSoupRequestAndMessageForHandle): Use soup_requester_request_uri instead of
2661         soup_requester_request. Request::soupURI properly creates a SoupURI with non-null empty strings
2662         when either the username and password are empty.  A null username or password does not trigger
2663         the URI-embedded credential override in SoupAuthenticationManager within libsoup. This is important
2664         because sometimes either the username or password might empty for a request, but the other
2665         part of the credential should still override the per-session credential storage.
2666         (WebCore::ResourceHandle::start): We don't need to clear the username and password from the
2667         internal data structure any longer. These need to be cleared in the CFNetwork backend because
2668         it prevents the same failed per-request credentials from being used over and over again. In our
2669         case we don't use these members during didReceiveAuthenticationChallenge, so this isn't an issue.
2670         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Don't look at the per-request
2671         m_user/m_pass pair here any longer. We use these when initially creating a request, so we don't
2672         want to re-use them if they fail.
2673         * platform/network/soup/ResourceRequest.h:
2674         (ResourceRequest): Rename urlStringForSoup to soupURI.
2675         * platform/network/soup/ResourceRequestSoup.cpp:
2676         (WebCore::ResourceRequest::soupURI): Instead of returning a string for the soup-bound URL
2677         return a SoupURI that properly embeds empty usernames and passwords.
2678
2679 2012-12-12  Alexey Proskuryakov  <ap@apple.com>
2680
2681         Make LOG() work in WebProcess and NetworkProcess
2682         https://bugs.webkit.org/show_bug.cgi?id=104718
2683
2684         Reviewed by Tim Horton.
2685
2686         Split initialization function into a new InitializeLogging.h file, because it's
2687         needed in WebKit, but cannot be included along with WebKit version of this file.
2688         We'd have a confilct between LOG_CHANNEL_PREFIX definitions if we tried.
2689
2690         * WebCore.xcodeproj/project.pbxproj: Make Logging.h a project header, and
2691         InitializeLogging.h a private one.
2692
2693         * GNUmakefile.list.am:
2694         * Target.pri:
2695         * platform/InitializeLogging.h: Added.
2696         * platform/Logging.h:
2697
2698         * platform/blackberry/LoggingBlackBerry.cpp:
2699         * platform/efl/LoggingEfl.cpp:
2700         * platform/gtk/LoggingGtk.cpp:
2701         * platform/mac/LoggingMac.mm:
2702         * platform/qt/LoggingQt.cpp:
2703         * platform/win/LoggingWin.cpp:
2704         * platform/wx/LoggingWx.cpp:
2705         Include InitializeLogging.h where this function is implemented.
2706
2707         * platform/NotImplemented.h:
2708         * platform/NotImplemented.cpp: Added.
2709         Changed to not include WebCore's Logging.h in the header, because NotImplemented.h
2710         is used in WebKits, which have incompatibe logging headers.
2711
2712 2012-12-12  Chris Fleizach  <cfleizach@apple.com>
2713
2714         AX: aria-busy should be exposed everywhere, not just on live regions
2715         https://bugs.webkit.org/show_bug.cgi?id=104814
2716
2717         Reviewed by Anders Carlsson.
2718
2719         The aria-busy attribute should be exposed on all elements. 
2720         This isn't entirely clear in the ARIA spec, but that will be fixed with
2721         ARIA1.1 (ISSUE-538).
2722
2723         Existing tests that dump attributes cover this new behavior.
2724
2725         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
2726         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2727
2728 2012-12-12  Gavin Peters  <gavinp@chromium.org>
2729
2730         [chromium] Add destructor to WebPrerender
2731         https://bugs.webkit.org/show_bug.cgi?id=104820
2732
2733         Reviewed by James Robinson.
2734
2735         When making WebPrerender default constructible and assignable, the destructor should have been moved out of WEBKIT_IMPLEMENTATION.
2736
2737         Existing WebKit unit tests should test this, as do chromium browser tests.
2738
2739         * platform/chromium/support/WebPrerender.cpp:
2740         (WebKit::WebPrerender::toPrerender):
2741         (WebKit::WebPrerender::reset):
2742
2743 2012-12-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2744
2745         [Qt] Animation fails on large layers
2746         https://bugs.webkit.org/show_bug.cgi?id=104538
2747
2748         Reviewed by Noam Rosenthal.
2749
2750         The backing tiles had no upper limit defined for the non-GL backend, which could cause them
2751         to allocate pixmaps widier or higher than what the underlying graphics systems can handle.
2752
2753         On top of that GraphicsLayerTextureMapper::prepareBackingStore() would allocate an intermediate
2754         pixmap the size of the dirty rect, which would at least on the first paint be the size of the
2755         entire layer, again causing allocation of pixmaps with dimensions outside of platform bounds.
2756
2757         This patch introduces a limit to the size of image buffer tiles, and adds an alternative path
2758         for painting where the GraphicsLayer paints directly to the tile instead of over an intermediate
2759         pixmap. This alternative path can also be useful later to minimize the amount of pixel copying
2760         happening in full repaints.
2761
2762         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2763         (WebCore::GraphicsLayerTextureMapper::prepareBackingStore):
2764         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2765         (GraphicsLayerTextureMapper):
2766         * platform/graphics/texmap/TextureMapper.cpp:
2767         (WebCore::BitmapTexture::updateContents):
2768         * platform/graphics/texmap/TextureMapper.h:
2769         (BitmapTexture):
2770         (TextureMapper):
2771         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
2772         (WebCore::TextureMapperTile::updateContents):
2773         (WebCore::TextureMapperTiledBackingStore::updateContents):
2774         * platform/graphics/texmap/TextureMapperBackingStore.h:
2775         (TextureMapperTile):
2776         (TextureMapperTiledBackingStore):
2777         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2778         (WebCore::BitmapTextureImageBuffer::updateContents):
2779         (WebCore::TextureMapperImageBuffer::maxTextureSize):
2780         * platform/graphics/texmap/TextureMapperImageBuffer.h:
2781         (BitmapTextureImageBuffer):
2782
2783 2012-12-12  Aaron Colwell  <acolwell@chromium.org>
2784
2785         Remove MediaSource 'ended' to 'open' transition when seeking.
2786         https://bugs.webkit.org/show_bug.cgi?id=104583
2787
2788         Reviewed by Eric Carlson.
2789
2790         Remove the 'ended' to 'open' transition on a seek.
2791
2792         No new tests. The following tests were updated to reflect the new behavior.
2793           http/tests/media/media-source/video-media-source-seek.html
2794           http/tests/media/media-source/video-media-source-state-changes.html
2795
2796         * html/HTMLMediaElement.cpp:
2797         (WebCore::HTMLMediaElement::seek):
2798
2799 2012-12-12  Julien Chaffraix  <jchaffraix@webkit.org>
2800
2801         [CSS Grid Layout] Implement CSS parsing and handling for min-content and max-content
2802         https://bugs.webkit.org/show_bug.cgi?id=104747
2803
2804         Reviewed by Alexis Menard.
2805
2806         This change adds -webkit-min-content and -webkit-max-content to our <track-breadth> parsing.
2807         The rendering is not plugged in and will probably depend on bug 103311.
2808
2809         Tests: fast/css-grid-layout/grid-columns-rows-get-set-multiple.html:
2810                fast/css-grid-layout/grid-columns-rows-get-set.html:
2811
2812         * css/CSSParser.cpp:
2813         (WebCore::CSSParser::parseGridBreadth):
2814         * css/StyleResolver.cpp:
2815         (WebCore::createGridTrackBreadth):
2816         Straight-forward extension of the new code. We were already serializing back properly
2817         so no need to touch CSSComputedStyleDeclaration.
2818
2819 2012-12-12  Ryosuke Niwa  <rniwa@webkit.org>
2820
2821         Copying text with ruby inserts new lines around rt elements
2822         https://bugs.webkit.org/show_bug.cgi?id=104765
2823
2824         Reviewed by Dan Bernstein.
2825
2826         Don't emit new lines before and after rt.
2827
2828         Test: editing/pasteboard/copy-paste-ruby-text.html
2829
2830         * editing/TextIterator.cpp:
2831         (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
2832
2833 2012-12-12  Krzysztof Czech  <k.czech@samsung.com>
2834
2835         [EFL] Possibility to turn off accessibility feature for WebKit-EFL.
2836         https://bugs.webkit.org/show_bug.cgi?id=103036
2837
2838         Reviewed by Laszlo Gombos.
2839
2840         Guard dependencies for accessibility (ATK), so that they can be turned off.
2841
2842         No new tests as there is no new functionality.
2843
2844         * PlatformEfl.cmake:
2845         * accessibility/AccessibilityObject.cpp:
2846         (WebCore::AccessibilityObject::AccessibilityObject):
2847         * accessibility/AccessibilityObject.h:
2848         (AccessibilityObject):
2849
2850 2012-12-12  Justin Novosad  <junov@google.com>
2851
2852         Use render box background over border draw strategy in cases with background-image
2853         https://bugs.webkit.org/show_bug.cgi?id=103409
2854
2855         Reviewed by Simon Fraser.
2856
2857         The BackgroundOverBorderBleedAvoidance mode was not being used in
2858         cases where the background is an opaque image. It was also not
2859         being used in cases with multiple layers. The multiple layer
2860         case is now safe with respect to color bleeding if the top layer
2861         is opaque, thank to the recent addition of layer occlusion culling
2862         in r135629.
2863
2864         No new tests. Testing already covered by the following tests:
2865         fast/backgrounds/background-opaque-images-over-color.html
2866         fast/backgrounds/gradient-background-leakage-2.html
2867
2868         * rendering/RenderBox.cpp:
2869         (WebCore::RenderBox::determineBackgroundBleedAvoidance):
2870         (WebCore::RenderBox::backgroundHasOpaqueTopLayer):
2871         * rendering/RenderBox.h:
2872         (RenderBox):
2873
2874 2012-12-12  Ilya Tikhonovsky  <loislo@chromium.org>
2875
2876         Web Inspector: instrument static parts of RenderBlock and RenderBox
2877         https://bugs.webkit.org/show_bug.cgi?id=104660
2878
2879         Reviewed by Yury Semikhatsky.
2880
2881         Plain vanilla instrumentation.
2882
2883         * dom/WebCoreMemoryInstrumentation.cpp:
2884         (WebCore):
2885         (WebCore::WebCoreMemoryInstrumentation::reportMemoryUsage):
2886         * dom/WebCoreMemoryInstrumentation.h:
2887         (WebCoreMemoryTypes):
2888         (WebCoreMemoryInstrumentation):
2889         (WebCore):
2890         * inspector/InspectorMemoryAgent.cpp:
2891         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2892         * rendering/RenderBlock.cpp:
2893         (WebCore::RenderBlock::reportStaticMembersMemoryUsage):
2894         (WebCore):
2895         * rendering/RenderBlock.h:
2896         (RenderBlock):
2897         * rendering/RenderBox.cpp:
2898         (WebCore::RenderBox::reportStaticMembersMemoryUsage):
2899         (WebCore):
2900         * rendering/RenderBox.h:
2901         (RenderBox):
2902
2903 2012-12-12  Ilya Tikhonovsky  <loislo@chromium.org>
2904
2905         Web Inspector: Native Memory Instrumentation: remove fake root MemoryObjectInfo.
2906         https://bugs.webkit.org/show_bug.cgi?id=104796
2907
2908         Reviewed by Yury Semikhatsky.
2909
2910         It was not a good idea to introduce a fake root MemoryObjectInfo.
2911         It makes a problem when we visit an object without its own MemoryObjectType.
2912
2913         Example: RenderBox has a global pointer to a hash map.
2914         HashMap doesn't have its own object type because it is a generic container.
2915         It will inherit object type from the fake root memory object info.
2916         The same could happen for another container in another class with other MemoryObjectType.
2917
2918         This fact forces me to create custom process method for root objects
2919         because they need to have their own MemoryObjectInfo with customisable memory object type.
2920
2921         Drive by fix: InstrumentedPointer* was replaced with Wrapper* because actually it is using
2922         for instrumented and not instrumented object classes.
2923
2924         * inspector/MemoryInstrumentationImpl.cpp:
2925         (WebCore::MemoryInstrumentationImpl::processDeferredObjects):
2926         (WebCore::MemoryInstrumentationImpl::deferObject):
2927         (WebCore::MemoryInstrumentationImpl::reportMemoryUsage):
2928         * inspector/MemoryInstrumentationImpl.h:
2929         (MemoryInstrumentationImpl):
2930
2931 2012-12-12  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2932
2933         [EFL [WebGL] [Wk2] Resizing the canvas breaks WebGL.
2934         https://bugs.webkit.org/show_bug.cgi?id=104535.
2935
2936         Reviewed by Kenneth Rohde Christiansen.
2937
2938         GraphicsContext3DEfl does not re-create the surface on canvas resize, this
2939         conflicted with the logic in coordinated graphics Layer.
2940         CoordinatedGraphicsLayer checks for GraphicsSurfaceToken to decide if the surface
2941         in UI-Process should be recreated or not. With this
2942         patch we also check for size of the platform Layer.
2943
2944         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2945         (WebCore::GraphicsContext3D::createGraphicsSurfaces):
2946         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2947         (GraphicsContext3DPrivate::didResizeCanvas):
2948         (GraphicsContext3DPrivate::platformLayerSize):
2949         * platform/graphics/efl/GraphicsContext3DPrivate.h:
2950         (GraphicsContext3DPrivate):
2951
2952 2012-12-12  Antoine Quint  <graouts@apple.com>
2953
2954         Web Inspector: Crash in InspectorDOMAgent::pushNodePathToFrontend when inspecting document with CSS generated content
2955         https://bugs.webkit.org/show_bug.cgi?id=104780
2956
2957         Reviewed by Pavel Feldman.
2958
2959         The pushNodePathForRenderLayerToFrontend() method added to InspectorDOMAgent naively assumed
2960         that all RenderLayers have a Node associated to them. However, in the case of CSS generated
2961         content, that will not be the case and we would call into pushNodePathToFrontend() with a 0
2962         parameter that would hit the first ASSERT in this method. We're now checking that we indeed
2963         have an associated node for the provided RenderLayer and return 0 in case we don't, without
2964         calling into pushNodePathToFrontend().
2965
2966         Test: inspector-protocol/layer-tree-generated-content.html
2967
2968         * inspector/InspectorDOMAgent.cpp:
2969         (WebCore::InspectorDOMAgent::pushNodePathForRenderLayerToFrontend):
2970
2971 2012-12-12  Alexander Pavlov  <apavlov@chromium.org>
2972
2973         Web Inspector: [Crash] Clear cached stylesheet rules in InspectorStyleSheet::deleteRule()
2974         https://bugs.webkit.org/show_bug.cgi?id=104806
2975
2976         Reviewed by Vsevolod Vlasov.
2977
2978         Cached rules (m_flatRules) should get cleared whenever a rule is deleted.
2979
2980         Test: inspector/styles/undo-add-rule-crash.html
2981
2982         * inspector/InspectorStyleSheet.cpp:
2983         (WebCore::InspectorStyleSheet::deleteRule):
2984
2985 2012-12-12  Stephen White  <senorblanco@chromium.org>
2986
2987         Unreviewed, rolling out r136975.
2988         http://trac.webkit.org/changeset/136975
2989         https://bugs.webkit.org/show_bug.cgi?id=90405
2990
2991         Correctness issues.
2992
2993         * dom/Element.cpp:
2994         * dom/Element.h:
2995         (Element):
2996         * dom/ElementRareData.h:
2997         (ElementRareData):
2998         (WebCore::ElementRareData::ElementRareData):
2999         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
3000         (WebCore::BitmapTextureImageBuffer::applyFilters):
3001         * rendering/FilterEffectRenderer.cpp:
3002         (WebCore::createCustomFilterEffect):
3003         (WebCore::FilterEffectRenderer::buildReferenceFilter):
3004         (WebCore::FilterEffectRenderer::build):
3005         * rendering/FilterEffectRenderer.h:
3006         (FilterEffectRenderer):
3007         * rendering/RenderLayer.cpp:
3008         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):
3009         * rendering/RenderObject.cpp:
3010         (WebCore::RenderObject::willBeDestroyed):
3011         * rendering/svg/RenderSVGResourceContainer.cpp:
3012         (WebCore::RenderSVGResourceContainer::registerResource):
3013         * rendering/svg/SVGResources.cpp:
3014         (WebCore::SVGResources::buildCachedResources):
3015         * rendering/svg/SVGResourcesCache.cpp:
3016         (WebCore::SVGResourcesCache::addResourcesFromRenderObject):
3017         (WebCore::SVGResourcesCache::clientStyleChanged):
3018         (WebCore::SVGResourcesCache::resourceDestroyed):
3019         * svg/SVGDocumentExtensions.cpp:
3020         (WebCore::SVGDocumentExtensions::addPendingResource):
3021         (WebCore::SVGDocumentExtensions::isElementPendingResources):
3022         (WebCore::SVGDocumentExtensions::isElementPendingResource):
3023         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
3024         (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
3025         * svg/SVGDocumentExtensions.h:
3026         (WebCore):
3027         (SVGDocumentExtensions):
3028         * svg/SVGElement.cpp:
3029         (WebCore::SVGElement::hasPendingResources):
3030         (WebCore):
3031         (WebCore::SVGElement::setHasPendingResources):
3032         (WebCore::SVGElement::clearHasPendingResourcesIfPossible):
3033         * svg/SVGElement.h:
3034         (SVGElement):
3035         (WebCore::SVGElement::buildPendingResource):
3036         * svg/SVGElementRareData.h:
3037         (WebCore::SVGElementRareData::SVGElementRareData):
3038         (WebCore::SVGElementRareData::hasPendingResources):
3039         (WebCore::SVGElementRareData::setHasPendingResources):
3040         (SVGElementRareData):
3041         * svg/SVGStyledElement.cpp:
3042         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
3043
3044 2012-12-12  Stephen White  <senorblanco@chromium.org>
3045
3046         Unreviewed, rolling out r137022.
3047         http://trac.webkit.org/changeset/137022
3048
3049         Precursor to rollout of 136975.
3050
3051         * rendering/svg/SVGResources.cpp:
3052         (WebCore::SVGResources::buildCachedResources):
3053
3054 2012-12-12  Stephen White  <senorblanco@chromium.org>
3055
3056         Unreviewed, rolling out r137027.
3057         http://trac.webkit.org/changeset/137027
3058
3059         Precursor to rollout of 136975.
3060
3061         * dom/ElementRareData.h:
3062         (ElementRareData):
3063
3064 2012-12-12  Alexei Filippov  <alph@chromium.org>
3065
3066         Web Inspector: add memory used by memory allocator itself to NMI
3067         https://bugs.webkit.org/show_bug.cgi?id=93372
3068
3069         Make native memory instrumentation report memory retained
3070         for the memory allocator internal purposes.
3071
3072         Reviewed by Yury Semikhatsky.
3073
3074         * inspector/front-end/NativeMemorySnapshotView.js:
3075         (WebInspector.MemoryBlockViewProperties._initialize):
3076         * platform/chromium/MemoryUsageSupportChromium.cpp:
3077         (WebCore::MemoryUsageSupport::memoryUsageByComponents):
3078
3079 2012-12-12  Sheriff Bot  <webkit.review.bot@gmail.com>
3080
3081         Unreviewed, rolling out r137438.
3082         http://trac.webkit.org/changeset/137438
3083         https://bugs.webkit.org/show_bug.cgi?id=104798
3084
3085         assertion reached when removing tile (Requested by tmpsantos
3086         on #webkit).
3087
3088         * page/Frame.cpp:
3089         (WebCore::Frame::setTiledBackingStoreEnabled):
3090         * platform/graphics/TiledBackingStore.cpp:
3091         (WebCore::TiledBackingStore::TiledBackingStore):
3092         (WebCore::TiledBackingStore::setTileCreationDelay):
3093         (WebCore::TiledBackingStore::coverWithTilesIfNeeded):
3094         (WebCore::TiledBackingStore::updateTileBuffers):
3095         (WebCore::TiledBackingStore::createTiles):
3096         (WebCore::TiledBackingStore::isTileBufferUpdatesSuspended):
3097         (WebCore::TiledBackingStore::startTileBufferUpdateTimer):
3098         (WebCore::TiledBackingStore::tileBufferUpdateTimerFired):
3099         (WebCore::TiledBackingStore::startBackingStoreUpdateTimer):
3100         (WebCore::TiledBackingStore::backingStoreUpdateTimerFired):
3101         * platform/graphics/TiledBackingStore.h:
3102         (TiledBackingStore):
3103         (WebCore::TiledBackingStore::tileCreationDelay):
3104         * platform/graphics/TiledBackingStoreClient.h:
3105         (WebCore::TiledBackingStoreClient::tiledBackingStoreUpdatesAllowed):
3106
3107 2012-12-12  Csaba Osztrogonác  <ossy@webkit.org>
3108
3109         [Qt] Unreviewed typo fix after r137446.
3110
3111         * WebCore.pri:
3112
3113 2012-12-12  Zan Dobersek  <zandobersek@gmail.com>
3114
3115         [GTK] Remove the last of unnecessary configuration options in configure.ac
3116         https://bugs.webkit.org/show_bug.cgi?id=104793
3117
3118         Reviewed by Martin Robinson.
3119
3120         Remove the feature define overriding that's based on the automake variables which are
3121         not set anymore due to the corresponding configuration options being removed.
3122
3123         No new tests - no new functionality.
3124
3125         * GNUmakefile.am:
3126
3127 2012-12-12  Simon Hausmann  <simon.hausmann@digia.com>
3128
3129         [Qt] Fix build on Mac
3130
3131         Reviewed by Csaba Osztrogonác.
3132
3133         On Mac OS X we have sqlite as a system library available.
3134
3135         * WebCore.pri:
3136
3137 2012-12-12  Simon Hausmann  <simon.hausmann@digia.com>
3138
3139         [Qt] Fix linkage against SQLite
3140         https://bugs.webkit.org/show_bug.cgi?id=104781
3141
3142         Reviewed by Csaba Osztrogonác.
3143
3144         Detect SQLite either through pkg-config, from the SQLITE3SRCDIR
3145         environment variable or from qtbase via a qt5.git build. Bail out early
3146         with an error message if neither option applies.
3147
3148         This removes the usage of $$QT.core.sources and the dependency on Qt's
3149         system-sqlite configure setting. We should always favour a system
3150         library over a copy in Qt.
3151
3152         * Target.pri:
3153         * WebCore.pri:
3154
3155 2012-12-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3156
3157         [TexMap] Uninitialized m_context pointer in TextureMapper
3158         https://bugs.webkit.org/show_bug.cgi?id=104785
3159
3160         Reviewed by Kenneth Rohde Christiansen.
3161
3162         * platform/graphics/texmap/TextureMapper.cpp:
3163         (WebCore::TextureMapper::TextureMapper):
3164         * platform/graphics/texmap/TextureMapperGL.cpp:
3165         (WebCore::TextureMapperGL::TextureMapperGL):
3166
3167 2012-12-12  Tommy Widenflycht  <tommyw@google.com>
3168
3169         MediaStream API: Change the data channel descriptor pattern to a handler pattern
3170         https://bugs.webkit.org/show_bug.cgi?id=104543
3171
3172         Reviewed by Kent Tamura.
3173
3174         In short the code is refactured to use the Handler/Client pattern (see RTCPeerConnectionHandler)
3175         instead of the Descriptor pattern.
3176         This will fix lifetime/memory/code structure issues in the chromium port.
3177
3178         Existing tests cover this patch.
3179
3180         * CMakeLists.txt:
3181         * GNUmakefile.list.am:
3182         * Modules/mediastream/RTCDataChannel.cpp:
3183         (WebCore::RTCDataChannel::create):
3184         (WebCore::RTCDataChannel::RTCDataChannel):
3185         (WebCore::RTCDataChannel::~RTCDataChannel):
3186         (WebCore::RTCDataChannel::label):
3187         (WebCore::RTCDataChannel::reliable):
3188         (WebCore::RTCDataChannel::readyState):
3189         (WebCore::RTCDataChannel::bufferedAmount):
3190         (WebCore::RTCDataChannel::send):
3191         (WebCore::RTCDataChannel::close):
3192         (WebCore::RTCDataChannel::didChangeReadyState):
3193         (WebCore::RTCDataChannel::didReceiveStringData):
3194         (WebCore::RTCDataChannel::didReceiveRawData):
3195         (WebCore::RTCDataChannel::didDetectError):
3196         (WebCore::RTCDataChannel::stop):
3197         * Modules/mediastream/RTCDataChannel.h:
3198         (WebCore):
3199         (RTCDataChannel):
3200         * Modules/mediastream/RTCPeerConnection.cpp:
3201         (WebCore::RTCPeerConnection::didAddRemoteDataChannel):
3202         * Modules/mediastream/RTCPeerConnection.h:
3203         (RTCPeerConnection):
3204         * WebCore.gypi:
3205         * platform/chromium/support/WebRTCDataChannel.cpp: Removed.
3206         * platform/mediastream/RTCDataChannelDescriptor.h: Removed.
3207         * platform/mediastream/RTCDataChannelHandler.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelDescriptor.cpp.
3208         (WebCore):
3209         (RTCDataChannelHandler):
3210         (WebCore::RTCDataChannelHandler::~RTCDataChannelHandler):
3211         * platform/mediastream/RTCDataChannelHandlerClient.h: Renamed from Source/WebCore/platform/mediastream/RTCDataChannelDescriptor.cpp.
3212         (WebCore):
3213         (RTCDataChannelHandlerClient):
3214         (WebCore::RTCDataChannelHandlerClient::~RTCDataChannelHandlerClient):
3215         * platform/mediastream/RTCPeerConnectionHandler.cpp:
3216         (WebCore):
3217         (WebCore::RTCPeerConnectionHandler::create):
3218         * platform/mediastream/RTCPeerConnectionHandler.h:
3219         (WebCore):
3220         (RTCPeerConnectionHandler):
3221         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
3222         (WebCore):
3223         (RTCPeerConnectionHandlerClient):
3224         * platform/mediastream/chromium/RTCDataChannelHandlerChromium.cpp: Added.
3225         (WebCore):
3226         (WebCore::RTCDataChannelHandlerChromium::create):
3227         (WebCore::RTCDataChannelHandlerChromium::RTCDataChannelHandlerChromium):
3228         (WebCore::RTCDataChannelHandlerChromium::~RTCDataChannelHandlerChromium):
3229         (WebCore::RTCDataChannelHandlerChromium::setClient):
3230         (WebCore::RTCDataChannelHandlerChromium::label):
3231         (WebCore::RTCDataChannelHandlerChromium::isReliable):
3232         (WebCore::RTCDataChannelHandlerChromium::bufferedAmount):
3233         (WebCore::RTCDataChannelHandlerChromium::sendStringData):
3234         (WebCore::RTCDataChannelHandlerChromium::sendRawData):
3235         (WebCore::RTCDataChannelHandlerChromium::close):
3236         (WebCore::RTCDataChannelHandlerChromium::didChangeReadyState):
3237         (WebCore::RTCDataChannelHandlerChromium::didReceiveStringData):
3238         (WebCore::RTCDataChannelHandlerChromium::didReceiveRawData):
3239         (WebCore::RTCDataChannelHandlerChromium::didDetectError):
3240         * platform/mediastream/chromium/RTCDataChannelHandlerChromium.h: Added.
3241         (WebCore):
3242         (RTCDataChannelHandlerChromium):
3243         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
3244         (WebCore::RTCPeerConnectionHandlerChromium::createDataChannel):
3245         (WebCore::RTCPeerConnectionHandlerChromium::didAddRemoteDataChannel):
3246         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
3247         (WebCore):
3248         (RTCPeerConnectionHandlerChromium):
3249
3250 2012-12-12  Huang Dongsung  <luxtella@company100.net>
3251
3252         Coordinated Graphics: Refactor TiledBackingStore code in CoordinatedGraphicsLayer.
3253         https://bugs.webkit.org/show_bug.cgi?id=103959
3254
3255         Reviewed by Kenneth Rohde Christiansen.
3256
3257         TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop() is used when class
3258         methods cannot be called asynchronously by client. Updates of tiles are
3259         committed as soon as all the events in event queue have been processed.
3260         After this patch Frame sets m_commitTileUpdatesOnIdleEventLoop to true.
3261
3262         In addition, remove TiledBackingStoreClient::tiledBackingStoreUpdatesAllowed()
3263         which was introduced for Coordinated Graphics.
3264
3265         Refactoring covered by existing tests.
3266
3267         * page/Frame.cpp:
3268         (WebCore::Frame::setTiledBackingStoreEnabled):
3269         * platform/graphics/TiledBackingStore.cpp:
3270         (WebCore::TiledBackingStore::TiledBackingStore):
3271         (WebCore::TiledBackingStore::setTrajectoryVector):
3272           Separate setting a trajectory vector from coverWithTilesIfNeeded().
3273         (WebCore::TiledBackingStore::coverWithTilesIfNeeded):
3274         (WebCore::TiledBackingStore::updateTileBuffers):
3275         (WebCore::TiledBackingStore::createTiles):
3276         (WebCore::TiledBackingStore::isTileBufferUpdatesSuspended):
3277         (WebCore::TiledBackingStore::startTileBufferUpdateTimer):
3278         (WebCore::TiledBackingStore::tileBufferUpdateTimerFired):
3279         (WebCore::TiledBackingStore::startBackingStoreUpdateTimer):
3280         (WebCore::TiledBackingStore::backingStoreUpdateTimerFired):
3281         * platform/graphics/TiledBackingStore.h:
3282         (TiledBackingStore):
3283         (WebCore::TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop):
3284         * platform/graphics/TiledBackingStoreClient.h:
3285         (WebCore::TiledBackingStoreClient::tiledBackingStoreHasPendingTileCreation):
3286             If TiledBackingStore does not create all tiles, TiledBackingStore
3287             notifies a client of needing to create tiles more, when
3288             m_commitTileUpdatesOnIdleEventLoop is false.
3289
3290 2012-12-11  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
3291
3292         [Qt] Fix the inspector not showing up on Windows
3293         https://bugs.webkit.org/show_bug.cgi?id=104677
3294
3295         Reviewed by Simon Hausmann.
3296
3297         * Target.pri:
3298
3299 2012-11-29  Yury Semikhatsky  <yurys@chromium.org>
3300
3301         Web Inspector: Heap snapshot crashes on any page in MacOS Canary
3302         https://bugs.webkit.org/show_bug.cgi?id=103076
3303
3304         Reviewed by Adam Barth.
3305
3306         Provide global object name resolver to the heap profiler. The callback allows
3307         to safely retrieve document URL to be used as a label for corresponding global
3308         object in the heap snapshot.
3309
3310         Test: inspector-protocol/take-heap-snapshot.html
3311
3312         * bindings/v8/ScriptProfiler.cpp:
3313         (WebCore):
3314         (WebCore::ScriptProfiler::takeHeapSnapshot):
3315
3316 2012-12-12  Sheriff Bot  <webkit.review.bot@gmail.com>
3317
3318         Unreviewed, rolling out r137428.
3319         http://trac.webkit.org/changeset/137428
3320         https://bugs.webkit.org/show_bug.cgi?id=104776
3321
3322         It broke the build everywhere (Requested by Ossy on #webkit).
3323
3324         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
3325         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
3326         * platform/graphics/texmap/TextureMapperGL.cpp:
3327         (WebCore::TextureMapperGL::drawQuad):
3328         (WebCore::TextureMapperGL::drawBorder):
3329         (WebCore::TextureMapperGL::drawTexture):
3330         (WebCore):
3331         (WebCore::TextureMapperGL::drawTextureRectangleARB):
3332         (WebCore::TextureMapperGL::drawSolidColor):
3333         (WebCore::TextureMapperGL::drawTextureWithAntialiasing):
3334         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
3335         * platform/graphics/texmap/TextureMapperGL.h:
3336         (TextureMapperGL):
3337         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
3338         (WebCore::getShaderSpec):
3339         * platform/graphics/texmap/TextureMapperShaderManager.h:
3340         (TextureMapperShaderProgram):
3341
3342 2012-12-12  Martin Robinson  <mrobinson@igalia.com>
3343
3344         Web inspector prints a warning about "Debug" not being localized
3345         https://bugs.webkit.org/show_bug.cgi?id=104679
3346
3347         Reviewed by Vsevolod Vlasov.
3348
3349         Add a missing localization entry for the "Debug" string which is used in the web
3350         inspector front-end. This prevents warnings about a missing localized version
3351         of the word "Debug" and allows it to be properly localized.
3352
3353         * English.lproj/localizedStrings.js: Add "Debug"
3354
3355 2012-12-12  Shinya Kawanaka  <shinyak@chromium.org>
3356
3357         [Shadow DOM] Implement HTMLShadowElement::olderShadowRoot
3358         https://bugs.webkit.org/show_bug.cgi?id=104218
3359
3360         Reviewed by Hajime Morita.
3361
3362         Implements HTMLShadowElement::olderShadowRoot, which returns the ShadowRoot the HTMLShadowElement is assigned to.
3363         When such ShadowRoot does not exist, 0 is returned.
3364
3365         Test: fast/dom/shadow/olderShadowRoot-in-shadowelement.html
3366
3367         * dom/ElementShadow.cpp:
3368         (WebCore::ElementShadow::ensureDistributionFromDocument): Ensures distribution of this ElementShadow and
3369         all of the parent TreeScope distribution. This function will be shared for Bug 104345.
3370         (WebCore):
3371         * dom/ElementShadow.h:
3372         (ElementShadow):
3373         * html/shadow/HTMLShadowElement.cpp:
3374         (WebCore::HTMLShadowElement::olderShadowRoot):
3375         (WebCore):
3376         * html/shadow/HTMLShadowElement.h:
3377         * html/shadow/HTMLShadowElement.idl:
3378
3379 2012-12-12  No'am Rosenthal  <noam@webkit.org>
3380
3381         [Texmap] Consolidate redundant code for ARB_RECT texture
3382         https://bugs.webkit.org/show_bug.cgi?id=104705
3383
3384         Reviewed by Kenneth Rohde Christiansen.
3385
3386         Instead of having a whole different function for RECT textures,
3387         keep the existing functions and pass a flag that tells
3388         TextureMapperGL to use the non-normalized coordinates and the
3389         RECT shaders.
3390
3391         No new tests, refactor only. Tested to not break WebGL on
3392         Qt-Mac.
3393
3394         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
3395         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
3396         * platform/graphics/texmap/TextureMapperGL.cpp:
3397         (WebCore::TextureMapperGL::drawQuad):
3398             Compensate for rect textures in drawQuad.
3399
3400         (WebCore::TextureMapperGL::drawBorder):
3401         (WebCore::TextureMapperGL::drawTexture):
3402         (WebCore::TextureMapperGL::drawSolidColor):
3403         (WebCore::TextureMapperGL::drawTextureWithAntialiasing):
3404         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
3405             Pass flags to TextureMapperGL::drawQuad instead of a bool.
3406
3407         * platform/graphics/texmap/TextureMapperGL.h:
3408         (TextureMapperGL):
3409         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
3410         (WebCore::getShaderSpec):
3411         * platform/graphics/texmap/TextureMapperShaderManager.h:
3412         (TextureMapperShaderProgram):
3413             Compensate for the texture-size in the vertex
3414             shader instead of in the fragment shader.
3415
3416 2012-12-11  Hayato Ito  <hayato@chromium.org>
3417
3418         REGRESSION(r137408): breaks chromium's browser tests which use WebKitShadowRoot (Requested by hayato on #webkit).
3419         https://bugs.webkit.org/show_bug.cgi?id=104770
3420
3421         Unreviewed, build fix.
3422
3423         * dom/ShadowRoot.idl:
3424         * page/DOMWindow.idl:
3425