28a9ea149b1c219f5ca96a6201f513f95298b7c9
[WebKit.git] / Source / WebCore / ChangeLog
1 2012-12-11  Andrey Adaikin  <aandrey@chromium.org>
2
3         Web Inspector: [WebGL] prevent GC from collecting WebGLObject instances currently bound to the context state
4         https://bugs.webkit.org/show_bug.cgi?id=104119
5
6         Reviewed by Pavel Feldman.
7
8         This is to prevent GC from collecting resources bound to a context (WebGL or 2D).
9         Otherwise, for example in WebGL, subsequent calls to gl.getParameter() may return a recently created
10         instance that is no longer bound to a Resource object (thus, no history to replay it later).
11
12         * inspector/InjectedScriptCanvasModuleSource.js:
13         (.):
14
15 2012-12-11  Zan Dobersek  <zandobersek@gmail.com>
16
17         Unreviewed build fix after r137243.
18
19         * bindings/gobject/GNUmakefile.am:
20
21 2012-12-10  No'am Rosenthal  <noam@webkit.org>
22
23         REGRESSION (r137006): CSS clip on solid color composited div broken
24         https://bugs.webkit.org/show_bug.cgi?id=104604
25
26         Reviewed by Simon Fraser.
27
28         Disable direct compositing of background color for clipping layers.
29
30         Test: compositing/geometry/clip-inside.html
31
32         * rendering/RenderLayerBacking.cpp:
33         (WebCore::supportsDirectBoxDecorationsComposition):
34             Never allow direct background composition if there is a clip.
35
36 2012-12-10  Simon Fraser  <simon.fraser@apple.com>
37
38         REGRESSION (r137215): WebKit stretches and shrinks a part of screen on scroll
39         https://bugs.webkit.org/show_bug.cgi?id=104626
40
41         Reviewed by Beth Dakin.
42
43         r137215 removed a compositing layer repaint on size changes. However, there
44         are cases where the compositing code constrains layer size by clipping
45         with the viewport and a clipping ancestor. When that happens, we must
46         invalidate the layer on a size change to avoid showing stretched or
47         shrunken content.
48
49         Test: compositing/repaint/clipped-layer-size-change.html
50
51         * rendering/RenderLayerBacking.cpp:
52         (WebCore::RenderLayerBacking::RenderLayerBacking):
53         (WebCore::RenderLayerBacking::updateCompositedBounds):
54         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
55         * rendering/RenderLayerBacking.h:
56         (RenderLayerBacking):
57
58 2012-12-10  Dean Jackson  <dino@apple.com>
59
60         Remove old WebKit Animation API code
61         https://bugs.webkit.org/show_bug.cgi?id=104611
62
63         Reviewed by Simon Fraser.
64
65         Remove the existing, unused animation API code. We'll look into
66         implementing the W3C Animation API if/when it is stable.
67
68         * CMakeLists.txt: Remove WebKitAnimation and WebKitAnimationList classes.
69         * DerivedSources.cpp:
70         * DerivedSources.make:
71         * DerivedSources.pri:
72         * GNUmakefile.list.am:
73         * Target.pri:
74         * UseJSC.cmake:
75         * UseV8.cmake:
76         * WebCore.gypi:
77         * WebCore.vcproj/WebCore.vcproj:
78         * WebCore.xcodeproj/project.pbxproj:
79         * bindings/js/JSBindingsAllInOne.cpp: Remove includes.
80         * bindings/js/JSWebKitAnimationCustom.cpp: Removed.
81         * bindings/js/JSWebKitAnimationListCustom.cpp: Removed.
82         * dom/Element.cpp: Remove API.
83         * dom/Element.h: Ditto.
84         * dom/Element.idl: Ditto.
85         * page/DOMWindow.idl: Ditto.
86         * page/WebKitAnimation.cpp: Removed.
87         * page/WebKitAnimation.h: Removed.
88         * page/WebKitAnimation.idl: Removed.
89         * page/WebKitAnimationList.cpp: Removed.
90         * page/WebKitAnimationList.h: Removed.
91         * page/WebKitAnimationList.idl: Removed.
92         * page/animation/AnimationController.cpp: Remove API.
93         * page/animation/AnimationController.h: Ditto.
94         * page/animation/AnimationControllerPrivate.h: Ditto.
95         * page/animation/CompositeAnimation.cpp: Ditto.
96         * page/animation/CompositeAnimation.h: Ditto.
97
98 2012-12-10  Jessie Berlin  <jberlin@apple.com>
99
100         Fix the Mac build after r137233
101
102         * html/shadow/HTMLShadowElement.h:
103         Remove a declaration of a member variable that was moved to the InsertionPoint superclass.
104
105 2012-12-10  KyungTae Kim  <ktf.kim@samsung.com>
106
107         Build fix after r137221
108         https://bugs.webkit.org/show_bug.cgi?id=104617
109
110         Unreviewed build fix
111
112         * html/HTMLPropertiesCollection.cpp:
113         (WebCore::nextNodeWithProperty):
114
115 2012-12-10  Hajime Morrita  <morrita@google.com>
116
117         [Shadow DOM][Refactoring] HTMLContentElement,HTMLShadowElement::m_registeredWithShadowRoot should be moved to InsertionPoint
118         https://bugs.webkit.org/show_bug.cgi?id=104516
119
120         Reviewed by Dimitri Glazkov.
121
122         This change pulls duplicated code in removedFrom() and
123         insertedInto() of both both HTMLShadowElement and
124         HTMLContentElement to their super class InsertionPoint.
125
126         This is a part of effor that encapsulate node distribution algorithm to
127         ContentDistributor and its family.
128
129         No new tests, no behavior change.
130
131         * dom/ShadowRoot.cpp:
132         (WebCore::ShadowRoot::registerInsertionPoint): Added.
133         (WebCore::ShadowRoot::unregisterInsertionPoint): Added.
134         * dom/ShadowRoot.h:
135         (ShadowRoot):
136         * html/shadow/ContentDistributor.cpp:
137         (WebCore::ShadowRootContentDistributionData::regiterInsertionPoint): Generalized two methods for <content> and <shadow>.
138         (WebCore):
139         (WebCore::ShadowRootContentDistributionData::unregisterInsertionPoint): Ditto.
140         * html/shadow/ContentDistributor.h:
141         (ShadowRootContentDistributionData):
142         * html/shadow/HTMLContentElement.cpp:
143         (WebCore::HTMLContentElement::HTMLContentElement):
144         * html/shadow/HTMLContentElement.h:
145         * html/shadow/HTMLShadowElement.cpp:
146         (WebCore::HTMLShadowElement::HTMLShadowElement):
147         * html/shadow/HTMLShadowElement.h:
148         * html/shadow/InsertionPoint.cpp:
149         (WebCore::InsertionPoint::InsertionPoint):
150         (WebCore::InsertionPoint::insertedInto): Pulled up from subclasses
151         (WebCore::InsertionPoint::removedFrom): Pulled up from subclasses
152         * html/shadow/InsertionPoint.h:
153         (InsertionPoint):
154
155 2012-12-10  Jon Lee  <jonlee@apple.com>
156
157         Keep track of plug-in snapshots clicked by user
158         https://bugs.webkit.org/show_bug.cgi?id=103206
159         <rdar://problem/12746483>
160
161         Reviewed by Anders Carlsson.
162
163         * html/HTMLPlugInImageElement.cpp:
164         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initially the hash is
165         unknown. Set to 0. Move the check for whether to snapshot the plugin into the
166         new function subframeLoaderWillLoadPlugIn.
167         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Rename
168         setPendingClickEvent to userDidClickSnapshot. In addition to holding onto the
169         click event used to activate the plug-in, the function now also tells the plug-in
170         client to add the origin hash as an auto-start origin.
171         (WebCore::HTMLPlugInImageElement::subframeLoaderWillLoadPlugIn): Calculate the
172         hash based on the provided URL, which is the URL the plug-in will load. Extend
173         the check that used to be in the constructor to see if the plug-in should not
174         automatically load, including checking the plug-in size and whether the hash
175         is an auto-start origin.
176         * html/HTMLPlugInImageElement.h: Rename setPendingClickEvent to userDidClickSnapshot
177         and add a variable for the origin hash.
178
179         * loader/SubframeLoader.cpp:
180         (WebCore::SubframeLoader::requestPlugin): When the loader is about to load the
181         plug-in, pass the URL to the element, so that it can calculate the hash.
182
183         * page/Page.cpp:
184         (WebCore::Page::Page): Take the plugInClient from the page clients.
185         (WebCore::Page::~Page): If the client exists, tell it that the page is being
186         destroyed.
187         (WebCore::Page::PageClients::PageClients): Initialize this optional client to
188         null.
189         * page/Page.h: Add PlugInClient to page clients.
190         (PageClients): Add PlugInClient variable.
191         (WebCore::Page::plugInClient):
192         * page/PlugInClient.h: Added.
193
194         * rendering/RenderSnapshottedPlugIn.cpp:
195         (WebCore::RenderSnapshottedPlugIn::handleEvent): Call the renamed function
196         userDidClickSnapshot().
197         (WebCore::RenderSnapshottedPlugIn::layout): Move the check of the plug-in size
198         to subframeLoaderWillLoadPlugIn.
199
200         Add PlugInClient.h.
201         * GNUmakefile.list.am:
202         * Target.pri:
203         * WebCore.vcproj/WebCore.vcproj:
204         * WebCore.xcodeproj/project.pbxproj:
205
206 2012-12-10  Antti Koivisto  <antti@apple.com>
207
208         Not reviewed.
209         
210         Build fix.
211
212         * html/HTMLPropertiesCollection.cpp:
213         (WebCore::nextNodeWithProperty):
214         * page/TouchDisambiguation.cpp:
215         (WebCore::boundingBoxForEventNodes):
216
217 2012-12-10  Beth Dakin  <bdakin@apple.com>
218
219         https://bugs.webkit.org/show_bug.cgi?id=104602
220         DidHitRelevantRepaintedObjectsAreaThreshold LayoutMilestone fires too 
221         early on some pages with iframes
222
223         Reviewed by Simon Fraser.
224
225         This change makes it so that any RenderObjects inside iframes are not 
226         considered relevant.
227         * page/Page.cpp:
228         (WebCore::Page::addRelevantRepaintedObject):
229
230 2012-12-10  David Grogan  <dgrogan@chromium.org>
231
232         IndexedDB: Propagate more leveldb errors to script
233         https://bugs.webkit.org/show_bug.cgi?id=104422
234
235         Reviewed by Tony Chang.
236
237         These are the last places that ignore leveldb errors that can get the
238         usual ok/found treatment.
239
240         Nothing called getBool, so it is deleted.
241
242         * Modules/indexeddb/IDBBackingStore.cpp:
243         (WebCore):
244         (WebCore::getInt):
245         (WebCore::isSchemaKnown):
246         (WebCore::setUpMetadata):
247         (WebCore::getMaxObjectStoreId):
248         (WebCore::IDBBackingStore::open):
249         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
250         (WebCore::getNewDatabaseId):
251         (WebCore::IDBBackingStore::createIDBDatabaseMetaData):
252         (WebCore::setMaxObjectStoreId):
253         (WebCore::getNewVersionNumber):
254         (WebCore::IDBBackingStore::putRecord):
255         (WebCore::setMaxIndexId):
256         * Modules/indexeddb/IDBBackingStore.h:
257         (IDBBackingStore):
258         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
259         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
260         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
261
262 2012-12-09  Antti Koivisto  <antti@apple.com>
263
264         Factor node traversal into standalone functions
265         https://bugs.webkit.org/show_bug.cgi?id=104507
266
267         Reviewed by Eric Seidel.
268
269         Node traversal functions are currently Node and ContainerNode members. Their implementations
270         are confusingly scattered over multiple header and source files. These functions have no particular
271         reason to be members as they don't require non-public access. They should be made freestanding
272         function instead and gathered together.
273         
274         This patch adds NodeTraversal namespace, defined in NodeTraversal.h. It contains freestanding
275         functions for traversing Nodes. Most popular functions are inlined (as before) and
276         there are ContainerNode specific specializations (as before).
277         
278         In client code
279         
280             node = node->traverseNextNode();
281             node = node->traverseNextSibling();
282         
283         becomes
284         
285             node = NodeTraversal::next(node);
286             node = NodeTraversal::nextSkippingChildren(node);
287             
288         etc.
289
290         * WebCore.exp.in:
291         * WebCore.xcodeproj/project.pbxproj:
292         * accessibility/AccessibilityNodeObject.cpp:
293         (WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
294         * accessibility/AccessibilityObject.cpp:
295         (WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
296         * accessibility/AccessibilityRenderObject.cpp:
297         (WebCore::AccessibilityRenderObject::addImageMapChildren):
298         * bindings/js/JSDocumentCustom.cpp:
299         (WebCore::toJS):
300         * css/SelectorChecker.cpp:
301         (WebCore::SelectorChecker::allVisitedStateChanged):
302         (WebCore::SelectorChecker::visitedStateChanged):
303         * css/StyleInvalidationAnalysis.cpp:
304         (WebCore::StyleInvalidationAnalysis::invalidateStyle):
305         * dom/ContainerNode.cpp:
306         (WebCore::dispatchChildInsertionEvents):
307         (WebCore::dispatchChildRemovalEvents):
308         * dom/ContainerNode.h:
309         (ContainerNode):
310         (WebCore):
311         * dom/ContainerNodeAlgorithms.h:
312         (WebCore::ChildFrameDisconnector::collectDescendant):
313         * dom/Document.cpp:
314         (WebCore::Document::buildAccessKeyMap):
315         (WebCore::Document::removeAllEventListeners):
316         (WebCore::Document::updateBaseURL):
317         (WebCore::Document::processBaseElement):
318         (WebCore::Document::nodeAbsIndex):
319         (WebCore::Document::nodeWithAbsIndex):
320         (WebCore::Document::getFocusableNodes):
321         * dom/DocumentMarkerController.cpp:
322         (WebCore::DocumentMarkerController::markersInRange):
323         (WebCore::DocumentMarkerController::setMarkersActive):
324         (WebCore::DocumentMarkerController::hasMarkers):
325         (WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
326         * dom/DocumentOrderedMap.cpp:
327         (WebCore::DocumentOrderedMap::get):
328         * dom/ElementShadow.cpp:
329         (WebCore::ElementShadow::collectSelectFeatureSetFrom):
330         * dom/Node.cpp:
331         (WebCore::Node::normalize):
332         (WebCore::Node::lazyAttach):
333         (WebCore):
334         (WebCore::Node::detach):
335         (WebCore::traverseTreeAndMark):
336         * dom/Node.h:
337         (Node):
338         * dom/NodeIterator.cpp:
339         (WebCore::NodeIterator::NodePointer::moveToNext):
340         (WebCore::NodeIterator::NodePointer::moveToPrevious):
341         (WebCore::NodeIterator::updateForNodeRemoval):
342         * dom/NodeTraversal.h: Added.
343         (WebCore):
344         (NodeTraversal):
345         (WebCore::NodeTraversal::traverseNextNodeTemplate):
346         (WebCore::NodeTraversal::next):
347         (WebCore::NodeTraversal::traverseNextSiblingTemplate):
348         (WebCore::NodeTraversal::nextSibling):
349         * dom/Range.cpp:
350         (WebCore::Range::toString):
351         (WebCore::Range::checkDeleteExtract):
352         (WebCore::Range::firstNode):
353         (WebCore::Range::pastLastNode):
354         (WebCore::Range::textRects):
355         (WebCore::Range::textQuads):
356         (WebCore::Range::getBorderAndTextQuads):
357         * dom/TreeScope.cpp:
358         (WebCore::TreeScope::labelElementForId):
359         (WebCore::TreeScope::findAnchor):
360         * dom/TreeScopeAdopter.cpp:
361         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
362         (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
363         * dom/TreeWalker.cpp:
364         (WebCore::TreeWalker::nextNode):
365         * editing/ApplyStyleCommand.cpp:
366         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
367         (WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle):
368         (WebCore::containsNonEditableRegion):
369         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
370         (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle):
371         (WebCore::ApplyStyleCommand::removeInlineStyle):
372         * editing/BreakBlockquoteCommand.cpp:
373         (WebCore::BreakBlockquoteCommand::doApply):
374         * editing/CompositeEditCommand.cpp:
375         (WebCore::CompositeEditCommand::deleteInsignificantText):
376         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
377         * editing/DeleteSelectionCommand.cpp:
378         (WebCore::firstEditablePositionInNode):
379         (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
380         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
381         * editing/EditCommand.cpp:
382         (WebCore::SimpleEditCommand::addNodeAndDescendants):
383         * editing/EditingStyle.cpp:
384         (WebCore::EditingStyle::triStateOfStyle):
385         (WebCore::EditingStyle::textDirectionForSelection):
386         * editing/Editor.cpp:
387         (WebCore::Editor::simplifyMarkup):
388         * editing/FrameSelection.cpp:
389         (WebCore::scanForForm):
390         (WebCore::FrameSelection::setSelectionFromNone):
391         * editing/InsertParagraphSeparatorCommand.cpp:
392         (WebCore::InsertParagraphSeparatorCommand::doApply):
393         * editing/ReplaceSelectionCommand.cpp:
394         (WebCore::ReplacementFragment::removeUnrenderedNodes):
395         (WebCore::ReplacementFragment::removeInterchangeNodes):
396         (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren):
397         (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNode):
398         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
399         (WebCore::removeHeadContents):
400         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
401         * editing/ReplaceSelectionCommand.h:
402         (WebCore::ReplaceSelectionCommand::InsertedNodes::pastLastLeaf):
403         * editing/SimplifyMarkupCommand.cpp:
404         (WebCore::SimplifyMarkupCommand::doApply):
405         * editing/TextIterator.cpp:
406         (WebCore::TextIterator::advance):
407         (WebCore::shouldEmitNewlineAfterNode):
408         * editing/htmlediting.cpp:
409         (WebCore::hasARenderedDescendant):
410         * editing/mac/EditorMac.mm:
411         (WebCore::Editor::fontForSelection):
412         * editing/markup.cpp:
413         (WebCore::completeURLs):
414         (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):
415         (WebCore::findNodesSurroundingContext):
416         (WebCore::trimFragment):
417         * editing/visible_units.cpp:
418         (WebCore::startOfParagraph):
419         (WebCore::endOfParagraph):
420         * html/HTMLCollection.cpp:
421         (WebCore::nextNode):
422         * html/HTMLElement.cpp:
423         (WebCore::setHasDirAutoFlagRecursively):
424         (WebCore::HTMLElement::directionality):
425         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
426         (WebCore::HTMLElement::getItemRefElements):
427         * html/HTMLFieldSetElement.cpp:
428         (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
429         (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
430         * html/HTMLFormElement.cpp:
431         (WebCore::HTMLFormElement::formElementIndex):
432         * html/HTMLLabelElement.cpp:
433         (WebCore::HTMLLabelElement::control):
434         * html/HTMLLegendElement.cpp:
435         (WebCore::HTMLLegendElement::associatedControl):
436         * html/HTMLMapElement.cpp:
437         (WebCore::HTMLMapElement::mapMouseEvent):
438         * html/HTMLNameCollection.cpp:
439         (WebCore::HTMLNameCollection::virtualItemAfter):
440         * html/HTMLOptionElement.cpp:
441         (WebCore::HTMLOptionElement::collectOptionInnerText):
442         * html/HTMLPropertiesCollection.cpp:
443         (WebCore::nextNodeWithProperty):
444         * html/HTMLSelectElement.cpp:
445         (WebCore::HTMLSelectElement::recalcListItems):
446         * html/HTMLTextFormControlElement.cpp:
447         (WebCore::HTMLTextFormControlElement::selection):
448         (WebCore::HTMLTextFormControlElement::innerTextValue):
449         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
450         * html/RadioInputType.cpp:
451         (WebCore::RadioInputType::handleKeydownEvent):
452         * html/shadow/ContentDistributor.cpp:
453         (WebCore::ShadowRootContentDistributionData::ensureInsertionPointList):
454         * inspector/InspectorDOMAgent.cpp:
455         (WebCore::InspectorDOMAgent::performSearch):
456         * inspector/InspectorMemoryAgent.cpp:
457         * page/FocusController.cpp:
458         (WebCore::FocusController::findFocusCandidateInContainer):
459         * page/Frame.cpp:
460         (WebCore::Frame::searchForLabelsAboveCell):
461         (WebCore::Frame::searchForLabelsBeforeElement):
462         * rendering/RenderNamedFlowThread.cpp:
463         (WebCore::RenderNamedFlowThread::getRanges):
464         * svg/SVGSVGElement.cpp:
465         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
466         (WebCore::SVGSVGElement::getElementById):
467         * svg/SVGUseElement.cpp:
468         (WebCore::removeDisallowedElementsFromSubtree):
469         * svg/animation/SMILTimeContainer.cpp:
470         (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
471         * xml/XPathNodeSet.cpp:
472         (WebCore::XPath::NodeSet::traversalSort):
473         * xml/XPathStep.cpp:
474         (WebCore::XPath::Step::nodesInAxis):
475         * xml/XPathUtil.cpp:
476         (WebCore::XPath::stringValue):
477
478 2012-12-10  Min Qin  <qinmin@chromium.org>
479
480         Sending multi-touch events to the same Iframe
481         https://bugs.webkit.org/show_bug.cgi?id=97973
482
483         Reviewed by Dimitri Glazkov.
484
485         Multi-Touch in different iframe can give both documents access to each other.
486         This could cause cross-origin access. To solve this, all the touch events should
487         be sent to the iframe where the first touchstart happens.
488
489         Test: fast/events/touch/multi-touch-inside-iframes.html
490               fast/events/touch/multi-touch-inside-nested-iframes.html
491
492         * page/EventHandler.cpp:
493         (WebCore::EventHandler::handleTouchEvent):
494         * page/EventHandler.h:
495
496 2012-12-10  KyungTae Kim  <ktf.kim@samsung.com>
497
498         [soup] Fix build warning in ResourceHandleSoup.cpp
499         https://bugs.webkit.org/show_bug.cgi?id=104605
500
501         Reviewed by Martin Robinson.
502
503         The nextMultipartResponsePartCallback has unused parameter 'source',
504         comment out it to fix 'unused parameter' build warning.
505
506         * platform/network/soup/ResourceHandleSoup.cpp:
507         (WebCore::nextMultipartResponsePartCallback):
508
509 2012-12-10  Simon Fraser  <simon.fraser@apple.com>
510
511         Fix frame border painting in tiled drawing mode
512         https://bugs.webkit.org/show_bug.cgi?id=104453
513         <rdar://problem/11678611>
514
515         Reviewed by Dan Bernstein.
516
517         Frame borders were not correctly invalidated when in tiled drawing mode, because
518         RenderFrameSet::layout() invalidated directly on the view, which skips the tile
519         cache.
520         
521         Fix by invalidating like all other renderers, via the repaint container.
522         
523         Also, the layer transform should be updated before the invalidation, and
524         we make use of RenderObject::updateLayerTransform() which has the same behavior
525         as the old code.
526
527         Attempts to make a layout test failed. Resizing composited framesets repainted
528         via layer resizing, and an attempt to make a ref test in tiled drawing mode
529         failed (the test passed without the patch).
530
531         * rendering/RenderFrameSet.cpp:
532         (WebCore::RenderFrameSet::layout):
533
534 2012-12-10  Simon Fraser  <simon.fraser@apple.com>
535
536         When converting a layer into a tiled layer, ensure that we update the visible rect
537         https://bugs.webkit.org/show_bug.cgi?id=104467
538
539         Reviewed by Darin Adler.
540
541         When a GraphicsLayerCA toggles to use a TileCache, we have to ensure that the
542         layer's visible rect (which is used to ensure tile coverage) is updated in
543         the same commit. Otherwise we can get blank layers until something else causes
544         the visible rect to be updated.
545
546         Test: compositing/tiling/tiled-layer-resize.html
547
548         * platform/graphics/ca/GraphicsLayerCA.cpp:
549         (WebCore::GraphicsLayerCA::dumpAdditionalProperties): With the debug flag, dump the TiledBacking
550         address for ease of debugging.
551         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Set the VisibleRectChanged bit in
552         m_uncommittedChanges if we've just switched to a tiled layer.
553
554 2012-12-10  Simon Fraser  <simon.fraser@apple.com>
555
556         Don't unconditionally repaint compositing layers when their size changes
557         https://bugs.webkit.org/show_bug.cgi?id=104461
558
559         Reviewed by Sam Weinig.
560
561         RenderLayerBacking always repainted the entire compositing layer when its size
562         changed. This was done to fix repaint issues when outline widths changes, but
563         that issue is now solved by repainting in GraphicsLayer::setOffsetFromRenderer(),
564         add in r134628. I believe this is no longer necessary.
565         
566         Always repainting when the size changes is terrible for the tile cache when
567         loading large documents, as all tiles repaint every time the document gets
568         longer.
569
570         Test: compositing/repaint/resize-repaint.html
571
572         * rendering/RenderLayerBacking.cpp:
573         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
574
575 2012-12-10  Ojan Vafai  <ojan@chromium.org>
576
577         Unreviewed, rolling out r134150.
578         http://trac.webkit.org/changeset/134150
579         https://bugs.webkit.org/show_bug.cgi?id=99940
580
581         Caused JS-based tooltips to remain during scroll on Facebook
582         and Gmail. Rollout until I have time to experiment with less
583         aggresive approaches.
584
585         * page/EventHandler.cpp:
586         (WebCore):
587         (WebCore::MaximumDurationTracker::MaximumDurationTracker):
588         (WebCore::MaximumDurationTracker::~MaximumDurationTracker):
589         (MaximumDurationTracker):
590         (WebCore::EventHandler::EventHandler):
591         (WebCore::EventHandler::clear):
592         (WebCore::EventHandler::mouseMoved):
593         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
594         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
595         * page/EventHandler.h:
596         (EventHandler):
597         * platform/Timer.h:
598
599 2012-12-10  Yi Shen  <max.hong.shen@gmail.com>
600
601         Keyboard caret movement in textarea with RTL Override Character can make tab unresponsive
602         https://bugs.webkit.org/show_bug.cgi?id=103067
603
604         Reviewed by Ryosuke Niwa.
605
606         For textarea with RTL override character, the line break could be the previous leaf InlineTextBox of
607         the InlineTextBox for the RTL override text. When overshots the left/right, make sure the 
608         leftVisuallyDistinctCandidate and rightVisuallyDistinctCandidate return the visually distinct 
609         left/right position by ignoring the line break.
610
611         Test: editing/selection/move-by-character-crash-test-textarea.html
612
613         * editing/VisiblePosition.cpp:
614         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
615         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
616
617 2012-12-10  Kondapally Kalyan  <kalyan.kondapally@intel.com>
618
619         [EFL][WebGL] Minor Refactoring in GraphicsContext3DEfl.
620         https://bugs.webkit.org/show_bug.cgi?id=104553.
621
622         Reviewed by Kenneth Rohde Christiansen.
623
624         We use different FBO for canvas and offscreen surface of our platform layer.
625         Thus we need to manage any bound buffers while copying contents to the surface. Currently, Surface
626         always uses double buffering but in future we should be able to configure it to use either
627         double or single buffer. For these use cases, it would be handy to bind buffers directly to
628         FBO used by the surface. This patch does the needed changes in GraphicsContext3DEfl and
629         PlatformSurface. Also, removes some unused code.
630
631         Covered by existing tests.
632
633         Relevant changes in GraphicsContext3DEfl to obtain FBO id from PlatformSurface.
634         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
635         (WebCore::GraphicsContext3D::GraphicsContext3D):
636         (WebCore::GraphicsContext3D::~GraphicsContext3D):
637
638         Renamed createGraphicsSurface to didResizeCanvas.
639         (WebCore::GraphicsContext3D::createGraphicsSurfaces):
640         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
641         (GraphicsContext3DPrivate::didResizeCanvas):
642         (GraphicsContext3DPrivate::copyToGraphicsSurface):
643         * platform/graphics/efl/GraphicsContext3DPrivate.h:
644         (GraphicsContext3DPrivate):
645
646         Header cleanup.
647         * platform/graphics/opengl/GLDefs.h:
648         * platform/graphics/opengl/GLPlatformContext.cpp:
649         (WebCore::GLPlatformContext::createContext):
650         * platform/graphics/opengl/GLPlatformContext.h:
651
652         Added initialize method to expose FBO id of the surface.
653         Removed unused code.
654         * platform/graphics/opengl/GLPlatformSurface.cpp:
655         (WebCore::GLPlatformSurface::initialize):
656         (WebCore):
657         (WebCore::GLPlatformSurface::updateContents):
658         * platform/graphics/opengl/GLPlatformSurface.h:
659         (GLPlatformSurface):
660         * platform/graphics/surfaces/glx/GLXSurface.h:
661
662 2012-12-07  Simon Fraser  <simon.fraser@apple.com>
663
664         Tidy up the tiled scrolling indicator, fix with zooming
665         https://bugs.webkit.org/show_bug.cgi?id=104386
666
667         Reviewed by Tim Horton.
668
669         Fix the tiled scrolling indicator to not get tiny when zooming,
670         to not poke out of the bottom of the window, and to not look
671         so crappy.
672
673         * platform/graphics/ca/mac/TileCache.mm:
674         (WebCore::TileCache::updateTileCoverageMap):
675         (WebCore::TileCache::drawTileMapContents):
676
677 2012-12-10  Sheriff Bot  <webkit.review.bot@gmail.com>
678
679         Unreviewed, rolling out r136817.
680         http://trac.webkit.org/changeset/136817
681         https://bugs.webkit.org/show_bug.cgi?id=104596
682
683         This patch was an unnecessarily complex solution to handling
684         conversion of union types. (Requested by mpruett on #webkit).
685
686         * bindings/js/JSDictionary.cpp:
687         (WebCore::JSDictionary::convertValue):
688         * bindings/js/JSDictionary.h:
689         (WebCore::JSDictionary::tryGetPropertyAndResult):
690
691 2012-12-10  Tab Atkins  <tabatkins@google.com>
692
693         Deprecate prefixed linear-gradient and radial-gradient functions
694         https://bugs.webkit.org/show_bug.cgi?id=104591
695
696         Reviewed by Dean Jackson.
697
698         Rename the old gradient parsing functions in anticipation of functions that parse the new syntax.
699
700         No new tests added - this is a rename and has no functionality change.
701
702         * css/CSSParser.cpp:
703         (WebCore::CSSParser::parseDeprecatedLinearGradient):
704         (WebCore::CSSParser::parseDeprecatedRadialGradient):
705         (WebCore::CSSParser::parseGeneratedImage):
706         * css/CSSParser.h:
707
708 2012-12-10  Mark Pilgrim  <pilgrim@chromium.org>
709
710         [Chromium][Win] Remove theme-related functions from PlatformSupport
711         https://bugs.webkit.org/show_bug.cgi?id=102699
712
713         Reviewed by Adam Barth.
714
715         Call theme engine directly instead of going through
716         PlatformSupport. Part of a refactoring series. See tracking bug 82948.
717
718         * platform/chromium/PlatformSupport.h:
719         (PlatformSupport):
720         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
721         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
722         (WebCore::ScrollbarThemeChromiumWin::paintButton):
723         * rendering/RenderThemeChromiumWin.cpp:
724         (WebCore):
725         (WebCore::RenderThemeChromiumWin::paintButton):
726         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
727         (WebCore::RenderThemeChromiumWin::paintSliderThumb):
728         (WebCore::RenderThemeChromiumWin::paintMenuList):
729         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
730         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
731         (WebCore::RenderThemeChromiumWin::paintProgressBar):
732
733 2012-12-10  Dean Jackson  <dino@apple.com>
734
735         Support for CSS widows and orphans
736         https://bugs.webkit.org/show_bug.cgi?id=9410
737
738         Reviewed by Darin Adler.
739
740         The CSS 'widow' and 'orphan' properties were supported by the parser and
741         style system, but were not actually doing anything in layout. Now they do!
742
743         In order to not break existing content, I unfortunately had to go against
744         the specification and change our default value from 2 to auto. A value of
745         auto means that widows and orphans will not cause any page/column breaks.
746
747         Supporting orphans was a small change. During line layout, if we realise
748         we need to move to a new page in a situation that would create an orphan,
749         move the entire block to the new page. There was already code to do this.
750
751         Support for widows was trickier. When we finish laying out a block, count
752         the number of hanging lines. If we've created a widow, and there are enough
753         available lines on the previous page, then steal some and remember the line
754         to break at. Trigger a relayout. Then notice the line that was marked for
755         breaking and avoid the widow. This means some blocks go through layout
756         twice, but as long as the widow value is small it shouldn't be a huge penalty.
757
758         Tests: fast/multicol/widows-and-orphans.html (new test)
759                printing/page-break-orphans.html
760                printing/page-break-orphans-and-widows.html
761                printing/page-break-widows.html
762
763         * css/CSSComputedStyleDeclaration.cpp:
764         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Return CSSValueAuto for widows and orphans if necessary.
765         * css/CSSParser.cpp:
766         (WebCore::CSSParser::parseValue): Support "auto" in widow and orphan property parsing.
767         * css/StyleBuilder.cpp:
768         (WebCore::StyleBuilder::StyleBuilder): Change property handler to something that supports auto.
769         * page/animation/CSSPropertyAnimation.cpp:
770         (WebCore::CSSPropertyAnimation::ensurePropertyMap): Add widows and orphans to the animation map.
771         * rendering/RenderBlock.cpp:
772         (WebCore::RenderBlock::layoutBlockChild): Detect if we've caused a widow-fixing break, and request relayout evaluation.
773         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded): Test for a widow-fixing line.
774         (WebCore::RenderBlock::setBreakAtLineToAvoidWidow): New function to remember where we should break on next layout.
775         (WebCore::RenderBlock::adjustLinePositionForPagination): Move the entire block to a new page if this would create an orphan.
776         * rendering/RenderBlock.h:
777         (WebCore::RenderBlock::shouldBreakAtLineToAvoidWidow): New function to indicate if we are remembering a widow.
778         (WebCore::RenderBlock::clearShouldBreakAtLineToAvoidWidow): Reset the line breaks.
779         (WebCore::RenderBlock::lineBreakToAvoidWidow):
780         (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData): Add a flag for indicating if we are remembering a line, and the actual line itself.
781         * rendering/RenderBlockLineLayout.cpp:
782         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): The code to detect and fix widows. Explained above.
783         * rendering/style/RenderStyle.h: New methods for indicating if widows and orphans are non-default values.
784         * rendering/style/StyleRareInheritedData.cpp: Ditto.
785         * rendering/style/StyleRareInheritedData.h: Ditto.
786
787 2012-12-10  Zan Dobersek  <zandobersek@gmail.com>
788
789         REGRESSION (r118735): svg/dom/complex-svgView-specification.html, svg/dom/SVGViewSpec.html, svg/dom/viewspec-parser.html failing on GTK Linux 64-bit Release
790         https://bugs.webkit.org/show_bug.cgi?id=87734
791
792         Reviewed by Martin Robinson.
793
794         Don't modify ResourceRequest's URL to have the value of the (encoded)
795         URI of the SoupMessage. The only exception is in the case of cancelled
796         SoupMessage - the URL of the ResourceRequest should then be null.
797
798         No new tests - existing tests should show no regressions.
799
800         * platform/network/soup/ResourceRequestSoup.cpp:
801         (WebCore::ResourceRequest::updateFromSoupMessage):
802
803 2012-12-10  Gustavo Noronha Silva  <gns@gnome.org>
804
805         Unreviewed distcheck fix.
806
807         * GNUmakefile.list.am:
808
809 2012-12-10  Eric Seidel  <eric@webkit.org>
810
811         Caused crashes in v8.  Rolling out until abarth can fix.  See cr-issue 165136 for more info
812         https://bugs.webkit.org/show_bug.cgi?id=104575
813
814         Unreviewed, just rolling out r136559.
815
816         * bindings/v8/V8GCController.cpp:
817         * bindings/v8/V8NodeFilterCondition.cpp:
818         (WebCore::V8NodeFilterCondition::V8NodeFilterCondition):
819         (WebCore::V8NodeFilterCondition::acceptNode):
820         * bindings/v8/V8NodeFilterCondition.h:
821         (WebCore::V8NodeFilterCondition::create):
822         (V8NodeFilterCondition):
823         * dom/NodeFilter.h:
824
825 2012-12-10  Eric Carlson  <eric.carlson@apple.com>
826
827         Unreviewed build fix after r137167.
828
829         * WebCore.xcodeproj/project.pbxproj: Add InbandTextTrackPrivate.h to framework private 
830             headers.
831
832 2012-12-10  Martin Robinson  <mrobinson@igalia.com>
833
834         Fix the GTK+ build after a collision of two patches.
835
836         Unreviewed build fix.
837
838         * bindings/gobject/GNUmakefile.am: The GObject DOM bindings library needs to
839         include the harfbuzz cflags when compiling.
840
841 2012-12-10  Parth Patel  <parpatel@rim.com>
842
843         Make hiddenPageDomTimerInterval a setting
844         https://bugs.webkit.org/show_bug.cgi?id=104555
845
846         Reviewed by Yong Li.
847
848         Make hiddenPageDomTimerInterval a setting so client can customize it.
849
850         No new tests are needed.
851
852         * page/Page.cpp:
853         (WebCore):
854         (WebCore::Page::setVisibilityState):
855         * page/Settings.cpp:
856         (WebCore):
857         (WebCore::Settings::setHiddenPageDOMTimerAlignmentInterval):
858         (WebCore::Settings::hiddenPageDOMTimerAlignmentInterval):
859         * page/Settings.h:
860         (Settings):
861
862 2012-12-10  peavo@outlook.com  <peavo@outlook.com>
863
864         [WinCairo] Compile fix in ImageCairoWin.cpp
865         https://bugs.webkit.org/show_bug.cgi?id=104554
866
867         Reviewed by Brent Fulgham.
868
869         * platform/graphics/win/ImageCairoWin.cpp:
870         (WebCore::BitmapImage::getHBITMAPOfSize): Added parameter.
871         (WebCore::BitmapImage::drawFrameMatchingSourceSize): Added parameter.
872
873 2012-12-10  Mike West  <mkwst@chromium.org>
874
875         Log to console when script is blocked by sandbox attributes.
876         https://bugs.webkit.org/show_bug.cgi?id=104365
877
878         Reviewed by Ojan Vafai.
879
880         Adds a console message to cover script execution blocked within the
881         context of a sandboxed frame which lacks the 'allow-scripts' permission.
882
883         * bindings/ScriptControllerBase.cpp:
884         (WebCore::ScriptController::canExecuteScripts):
885             Log a warning when sandboxing flags block script execution.
886
887 2012-12-10  Chris Fleizach  <cfleizach@apple.com>
888
889         AX: Crash in NSAccessibilityUnignoredDescendant
890         https://bugs.webkit.org/show_bug.cgi?id=104468
891
892         Reviewed by Anders Carlsson.
893
894         This crash occurred because AccessibilityScrollView stopped retaining it's ScrollView pointer.
895
896         Unfortunately, there was still a case that didn't correctly clear that variable. 
897
898         That case was when a Frame had a new FrameView associated with it. The old FrameView didn't inform the 
899         accessibility object cache that it should be removed. As a result, when the FrameView deallocated and 
900         did try to remove, it used the wrong AXObjectCache because it was no longer correctly hooked into the 
901         document tree.
902
903         No new tests. Existing tests will stop crashing.
904  
905         * page/Frame.cpp:
906         (WebCore::Frame::setView): change the name of the method that tells the FrameView to detach
907         * page/FrameView.cpp:
908         (WebCore::FrameView::~FrameView):
909         (WebCore::FrameView::removeFromAXObjectCache): add a method that can be called in multiple places
910         (WebCore::FrameView::isFrameView):
911         (WebCore::FrameView::prepareForDetach): detaches scrollbars and accessibility
912         * page/FrameView.h:
913         (FrameView):
914
915 2012-12-10  Mark Pilgrim  <pilgrim@chromium.org>
916
917         [Chromium] Move getPluginsList out of PlatformSupport
918         https://bugs.webkit.org/show_bug.cgi?id=96507
919
920         Reviewed by Darin Fisher.
921
922         Part of a refactoring series. See tracking bug 82948.
923
924         * WebCore.gypi:
925         * platform/chromium/PlatformSupport.h:
926         (PlatformSupport):
927         * plugins/chromium/PluginDataChromium.cpp:
928         (WebCore::PluginCache::plugins):
929         * plugins/chromium/PluginListBuilder.cpp: Added.
930         (WebKit):
931         (WebKit::PluginListBuilder::addPlugin):
932         (WebKit::PluginListBuilder::addMediaTypeToLastPlugin):
933         (WebKit::PluginListBuilder::addFileExtensionToLastMediaType):
934         * plugins/chromium/PluginListBuilder.h: Added.
935         (WebKit):
936         (PluginListBuilder):
937         (WebKit::PluginListBuilder::PluginListBuilder):
938
939 2012-12-10  Carlos Garcia Campos  <cgarcia@igalia.com>
940
941         [GTK] Build GObject DOM bindings as a separate library
942         https://bugs.webkit.org/show_bug.cgi?id=104527
943
944         Reviewed by Xan Lopez.
945
946         * bindings/gobject/GNUmakefile.am: Add libWebCoreDOM library.
947         * bindings/gobject/WebKitDOMBinding.h: Define private macros.
948         * bindings/gobject/WebKitDOMCustom.h: Don't include webkit/webkitdefines.h.
949         * bindings/gobject/WebKitDOMEventTarget.h: Ditto.
950         * bindings/gobject/WebKitDOMObject.h: Ditto.
951         * bindings/scripts/CodeGeneratorGObject.pm:
952         (Generate): Don't include webkitglobalsprivate.h.
953         (WriteData): Don't include webkit/webkitdefines.h.
954         * bindings/scripts/gobject-generate-headers.pl: Define WEBKIT_API
955         macro in webkitdomdefines.h.
956         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
957         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
958         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
959         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
960         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
961         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
962         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
963         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
964         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
965         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
966         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
967         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
968         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
969         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
970         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
971         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
972         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
973         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
974         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
975         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
976         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
977         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
978         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
979         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
980         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
981         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
982         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
983         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
984
985 2012-12-10  Adam Klein  <adamk@chromium.org>
986
987         In InbandTextTrackPrivate, return emptyAtoms instead of emptyString() by default.
988
989         Unreviewed build fix.
990
991         * platform/graphics/InbandTextTrackPrivate.h:
992         (WebCore::InbandTextTrackPrivate::label):
993         (WebCore::InbandTextTrackPrivate::language):
994
995 2012-12-10  Ilya Tikhonovsky  <loislo@chromium.org>
996
997         Web Inspector: Native Memory Instrumentation: instrument RenderBox descendants.
998         https://bugs.webkit.org/show_bug.cgi?id=104026
999
1000         Reviewed by Eric Seidel.
1001
1002         Plain vanilla instrumentation for RenderBox descendants.
1003
1004         * rendering/RenderFrameSet.cpp:
1005         (WebCore::RenderFrameSet::reportMemoryUsage):
1006         (WebCore):
1007         (WebCore::RenderFrameSet::GridAxis::reportMemoryUsage):
1008         * rendering/RenderFrameSet.h:
1009         (RenderFrameSet):
1010         (GridAxis):
1011         * rendering/RenderListMarker.cpp:
1012         (WebCore::RenderListMarker::reportMemoryUsage):
1013         (WebCore):
1014         * rendering/RenderListMarker.h:
1015         (RenderListMarker):
1016         * rendering/RenderReplaced.cpp:
1017         (WebCore::RenderReplaced::reportMemoryUsage):
1018         (WebCore):
1019         * rendering/RenderReplaced.h:
1020         (RenderReplaced):
1021         * rendering/RenderTableCol.cpp:
1022         (WebCore::RenderTableCol::reportMemoryUsage):
1023         (WebCore):
1024         * rendering/RenderTableCol.h:
1025         (RenderTableCol):
1026         * rendering/RenderTableRow.cpp:
1027         (WebCore::RenderTableRow::reportMemoryUsage):
1028         (WebCore):
1029         * rendering/RenderTableRow.h:
1030         (RenderTableRow):
1031         * rendering/RenderTableSection.cpp:
1032         (WebCore::RenderTableSection::reportMemoryUsage):
1033         (WebCore):
1034         (WebCore::RenderTableSection::RowStruct::reportMemoryUsage):
1035         (WebCore::RenderTableSection::CellStruct::reportMemoryUsage):
1036         * rendering/RenderTableSection.h:
1037         (CellStruct):
1038         (RowStruct):
1039
1040 2012-12-10  Alejandro Piñeiro  <apinheiro@igalia.com>
1041
1042         AX: wrong Enabled states on a ListBox
1043         https://bugs.webkit.org/show_bug.cgi?id=104483
1044
1045         Reviewed by Chris Fleizach.
1046
1047         Test: accessibility/listbox-enabled-states.html
1048
1049         * accessibility/AccessibilityListBoxOption.cpp:
1050         (WebCore::AccessibilityListBoxOption::isEnabled): taking into
1051         account the DISABLED attribute and the aria-disabled attribute to
1052         decide if the item is enabled or not.
1053
1054 2012-12-10  Adam Klein  <adamk@chromium.org>
1055
1056         cr-win build fix after r137161.
1057
1058         Unreviewed.
1059
1060         * platform/graphics/MediaPlayer.h: Replace forward-decl of
1061         InbandTextTrackPrivate with #include as the definition is required.
1062
1063 2012-12-10  Alexis Menard  <alexis@webkit.org>
1064
1065         [CSS3 Backgrounds and Borders] Remove CSS3_BACKGROUND feature flag.
1066         https://bugs.webkit.org/show_bug.cgi?id=104539
1067
1068         Reviewed by Antonio Gomes.
1069
1070         As discussed on webkit-dev it is not needed to keep this feature flag 
1071         as support for <position> type is a small feature that is already 
1072         implemented by three other UAs. It was useful while landing this 
1073         feature as partial bits were landed one after one.
1074
1075         No new tests : the feature is covered by various tests and it is already enabled in many ports.
1076
1077         * Configurations/FeatureDefines.xcconfig:
1078         * GNUmakefile.am:
1079         * GNUmakefile.features.am:
1080         * css/CSSParser.cpp:
1081         (WebCore::CSSParser::parseFillPosition):
1082         (WebCore::CSSParser::parseFillProperty):
1083         * css/CSSParser.h:
1084         * css/CSSToStyleMap.cpp:
1085         (WebCore::CSSToStyleMap::mapFillXPosition):
1086         (WebCore::CSSToStyleMap::mapFillYPosition):
1087         * rendering/style/FillLayer.cpp:
1088         (SameSizeAsFillLayer):
1089         (WebCore::FillLayer::FillLayer):
1090         (WebCore::FillLayer::operator=):
1091         (WebCore::FillLayer::operator==):
1092         (WebCore::FillLayer::fillUnsetProperties):
1093         * rendering/style/FillLayer.h:
1094         (WebCore::FillLayer::backgroundXOrigin):
1095         (WebCore::FillLayer::backgroundYOrigin):
1096         (WebCore::FillLayer::isBackgroundOriginSet):
1097         (WebCore::FillLayer::clearXPosition):
1098         (WebCore::FillLayer::clearYPosition):
1099         (FillLayer):
1100
1101 2012-12-10  Eric Carlson  <eric.carlson@apple.com>
1102
1103         Add support for in-band text tracks to Mac port
1104         https://bugs.webkit.org/show_bug.cgi?id=103663
1105
1106         Reviewed by Sam Weinig.
1107
1108         Test: media/track/track-in-band.html
1109
1110         * GNUmakefile.list.am: Move InbandTextTrackPrivate.h to platform/graphics. Add InbandTextTrackPrivateClient.h.
1111         * Target.pri: Ditto.
1112         * WebCore.gypi: Ditto.
1113
1114         * WebCore.xcodeproj/project.pbxproj: Add new files.
1115
1116         * html/HTMLMediaElement.cpp:
1117         (WebCore::HTMLMediaElement::setReadyState): No need to call processInbandTextTracks, in-band tracks
1118             are now registered by the media engine as they are discovered.
1119         (WebCore::HTMLMediaElement::mediaPlayerDidAddTrack): New, called by the media player when a new
1120             in-band track is found.
1121         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveTrack): New, called by the media player when an
1122             in-band track goes away.
1123         * html/HTMLMediaElement.h:
1124
1125         * html/track/InbandTextTrack.cpp:
1126         (WebCore::InbandTextTrack::InbandTextTrack): Use m_private instead of tracksPrivate because
1127             it is zeroed during assignment.
1128
1129         * platform/graphics/MediaPlayer.cpp:
1130         (WebCore::MediaPlayer::addTextTrack): New MediaPlayerClient method to allow MediaPlayerPrivate subclasses
1131             to add a new in-band track.
1132         (WebCore::MediaPlayer::removeTextTrack): New MediaPlayerClient method to allow MediaPlayerPrivate subclasses
1133             to remove a new in-band track.
1134         * platform/graphics/MediaPlayer.h:
1135         * platform/graphics/MediaPlayerPrivate.h:
1136
1137         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Added.
1138         (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF):
1139         (WebCore::InbandTextTrackPrivateAVF::~InbandTextTrackPrivateAVF):
1140         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Convert an attribute string into WebVTT 
1141             cue setting and content strings.
1142         (WebCore::InbandTextTrackPrivateAVF::processCue): Process a new cue.
1143         (WebCore::InbandTextTrackPrivateAVF::disconnect): Clear member variables.
1144         (WebCore::InbandTextTrackPrivateAVF::resetCueValues): Reset cue values to defaults.
1145         (WebCore::InbandTextTrackPrivateAVF::setMode): Set track mode and call player's trackModeChanged.
1146         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Added.
1147
1148         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: Initialize 
1149             m_inbandTrackConfigurationPending.
1150         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
1151         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Flush the currently accumulating
1152             cue so it doesn't get the wrong duration.
1153         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Handle InbandTracksNeedConfiguration.
1154         (WebCore::MediaPlayerPrivateAVFoundation::flushCurrentCue): New, pass the current cue up to the client.
1155         (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Configure in-band tracks.
1156         (WebCore::MediaPlayerPrivateAVFoundation::trackModeChanged): Schedule a call to configureInbandTracks.
1157         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1158
1159         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h: Added.
1160         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm: Added.
1161         (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC):
1162         (WebCore::InbandTextTrackPrivateAVFObjC::disconnect):
1163         (WebCore::InbandTextTrackPrivateAVFObjC::kind): Return track kind.
1164         (WebCore::InbandTextTrackPrivateAVFObjC::label): Return track label.
1165         (WebCore::InbandTextTrackPrivateAVFObjC::language): Return track language.
1166         (WebCore::InbandTextTrackPrivateAVFObjC::isDefault): 
1167         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1168         (MediaPlayerPrivateAVFoundationObjC):
1169         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItem):
1170         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1171         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize m_currentTrack.
1172         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Clear m_legibleOutput.
1173         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Create and initialize m_legibleOutput.
1174         (WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks): Called when the player item's
1175             "tracks" changes, add and remove in-band text tracks as necessary.
1176         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): Pass an attributed string to the current 
1177             track to be processed.
1178         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Tell AVFoundation to select an in-band track.
1179         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTrack): Return the current track.
1180         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]): Legible
1181             output delegate.
1182
1183 2012-12-10  Pavel Feldman  <pfeldman@chromium.org>
1184
1185         Web Inspector: fix front-end compilation warnings
1186         https://bugs.webkit.org/show_bug.cgi?id=104557
1187
1188         Reviewed by Alexander Pavlov.
1189
1190         Corresponding annotations added.
1191
1192         * inspector/Inspector.json:
1193         * inspector/InspectorDOMAgent.cpp:
1194         (WebCore::InspectorDOMAgent::highlightNode):
1195         * inspector/InspectorDOMAgent.h:
1196         (InspectorDOMAgent):
1197         * inspector/front-end/CSSStyleModel.js:
1198         (WebInspector.CSSStyleDeclaration.prototype.):
1199         (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
1200         * inspector/front-end/ConsoleMessage.js:
1201         (WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreview):
1202         * inspector/front-end/DOMAgent.js:
1203         (WebInspector.DOMAgent.prototype.highlightDOMNode):
1204         * inspector/front-end/DOMPresentationUtils.js:
1205         (WebInspector.DOMPresentationUtils.linkifyNodeReference):
1206         * inspector/front-end/ObjectPropertiesSection.js:
1207         (WebInspector.ObjectPropertyTreeElement.prototype.update):
1208         * inspector/front-end/Toolbar.js:
1209
1210 2012-12-10  Zeno Albisser  <zeno@webkit.org>
1211
1212         [Qt] MediaPlayerQTKit broken after switching QPainter to raster engine.
1213         https://bugs.webkit.org/show_bug.cgi?id=104550
1214
1215         With Qt5 QPainter changed to using the raster engine.
1216         Therefore we no longer have an NSGraphicsContext that we can
1217         use for drawing video frames.
1218         With this patch we are rendering the video frame into an image buffer
1219         and then paint it manually using QPainter.
1220
1221         Reviewed by Simon Hausmann.
1222
1223         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1224         (WebCore):
1225         (WebCore::swapBgrToRgb):
1226             Swap the color format from BGR to RGB,
1227             since BGR is not supported by QImage.
1228         (WebCore::MediaPlayerPrivateQTKit::paint):
1229
1230 2012-12-10  peavo@outlook.com  <peavo@outlook.com>
1231
1232         [WinCairo] Link fix in InspectorController.cpp
1233         https://bugs.webkit.org/show_bug.cgi?id=104556
1234
1235         Reviewed by Pavel Feldman.
1236
1237         * inspector/InspectorController.cpp:
1238         (WebCore::InspectorController::InspectorController): Added missing #if check.
1239
1240 2012-12-10  Pavel Feldman  <pfeldman@chromium.org>
1241
1242         Web Inspector: remove the Overrides / Settings context menu from gear icon
1243         https://bugs.webkit.org/show_bug.cgi?id=104546
1244
1245         Reviewed by Alexander Pavlov.
1246
1247         It sounds like too many people don't like the way it works. Bringing things back: overrides will be a tab in settings for now.
1248         Moving present behavior to under experiment.
1249
1250         * inspector/front-end/OverridesView.js:
1251         (WebInspector.OverridesView):
1252         * inspector/front-end/Settings.js:
1253         (WebInspector.ExperimentsSettings):
1254         * inspector/front-end/SettingsScreen.js:
1255         (WebInspector.OverridesSettingsTab):
1256         (WebInspector.SettingsController):
1257         (WebInspector.SettingsController.prototype.get statusBarItem):
1258         (WebInspector.SettingsController.prototype._mouseDown.showSettings):
1259         (WebInspector.SettingsController.prototype._mouseDown):
1260         (WebInspector.SettingsController.prototype._mouseUp):
1261         * inspector/front-end/helpScreen.css:
1262         (#settings-screen .tabbed-pane-header):
1263         (#settings-screen .tabbed-pane-header-tabs):
1264         (#settings-screen .tabbed-pane-header-tab):
1265
1266 2012-12-10  Kent Tamura  <tkent@chromium.org>
1267
1268         Visual order of empty value placeholder in INPUT_MULTIPLE_FIELDS_UI is wrong in RTL
1269         https://bugs.webkit.org/show_bug.cgi?id=104438
1270
1271         Reviewed by Hajime Morita.
1272
1273         No new tests. This updates datetimelocal-appearance-l10n.html for he-il
1274         and ar-eg locales.
1275
1276         * html/shadow/DateTimeNumericFieldElement.cpp:
1277         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement):
1278         We should not append Right-to-left-mark to each of placeholder
1279         strings. It makes numeric field separators such as ':' and '/' RTL, and
1280         makes a wrong visual order. We use unicode-bidi:bidi-override and
1281         direction:ltr instead. It means we force LTR only to this element
1282         * html/shadow/DateTimeNumericFieldElement.h:
1283         Makes m_placeholder const again.
1284         * html/shadow/DateTimeEditElement.cpp:
1285         (WebCore::DateTimeEditBuilder::visitLiteral):
1286         Explicitly set right-to-left-mark before S, WS, ON types according to
1287         Unicod Bidirectional Algorithm Table 4 [1]. This is needed because we
1288         don't have context like "This literal follows European/Arabic numbers"
1289         in a case of showing placeholders.
1290         [1] http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types
1291
1292 2012-12-09  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1293
1294         [Soup] utilize multipart/x-mixed-replace support recently added to libsoup
1295         https://bugs.webkit.org/show_bug.cgi?id=94515
1296
1297         Reviewed by Martin Robinson.
1298
1299         The multipart/x-mixed-replace content type is often used for providing
1300         "push" server support, with each part in the multipart response
1301         replacing the previous one in the rendering. Soup recently acquired
1302         support for multipart/x-mixed replace, which this change utilizes.
1303
1304         Covered by existing multipart/x-mixed-replace tests.
1305
1306         * platform/network/ResourceHandleInternal.h:
1307         (ResourceHandleInternal): add new member to this class, the multipart input stream
1308         * platform/network/soup/ResourceHandleSoup.cpp:
1309         (WebCore::cleanupSoupRequestOperation): also clear the multipart input stream on
1310         cleanup
1311         (WebCore::nextPartCallback): callback that handles reporting the new response delivered
1312         with the new part, if any; uses the factored out updateFromSoupMessageHeaders method
1313         (WebCore::sendRequestCallback): handle multipart/x-mixed-replace responses by
1314         requesting the next part
1315         (WebCore::readCallback): when reading has finished, request the next part when
1316         handling a multipart/x-mixed-replace response
1317         * platform/network/soup/ResourceResponse.h:
1318         (ResourceResponse): add declaration for new method
1319         * platform/network/soup/ResourceResponseSoup.cpp:
1320         (WebCore::ResourceResponse::updateFromSoupMessage): call new updateFromSoupMessageHeaders
1321         method, instead of dealing with the message headers directly
1322         (WebCore::ResourceResponse::updateFromSoupMessageHeaders): new method, factored out from
1323         updateFromSoupMessage, so this same code can be reused for updating responses for
1324         multipart/x-mixed-replace responses parts
1325
1326 2012-12-10  Zoltan Nyul  <zoltan.nyul@intel.com>
1327
1328         Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner
1329         https://bugs.webkit.org/show_bug.cgi?id=103886
1330
1331         Reviewed by Kenneth Rohde Christiansen.
1332
1333         Export symbol for WebCore::Page::setViewMode on Mac.
1334
1335         No new tests, no behavior change for layout tests.
1336
1337         * WebCore.exp.in:
1338
1339 2012-12-10  Martin Robinson  <mrobinson@igalia.com>
1340
1341         [GTK] Bring Harfbuzz-ng support to Gtk
1342         https://bugs.webkit.org/show_bug.cgi?id=92098
1343
1344         Reviewed by Gustavo Noronha Silva.
1345
1346         Enable HarfBuzz support by default. With the Freetype backend we no longer
1347         fall back to Pango for rendering complex text.
1348
1349         No new tests. This is covered by existing tests.
1350
1351         * GNUmakefile.am: Add HarfBuzz include directories and define.
1352         * GNUmakefile.list.am: Add HarfBuzz files to source list and remove
1353         Pango ones.
1354         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1355         (WebCore::FontPlatformData::operator==): To properly render fallback
1356         fonts via HarfBuzz , it's important that we actually ask Fontconfig
1357         whether or not two patterns are the same. This ensures that when patterns
1358         are just copies of one another they only take up one slot in the font cache
1359         and appear to be the same font to HarfBuzzShaper.
1360
1361 2012-12-10  Alexander Pavlov  <apavlov@chromium.org>
1362
1363         Web Inspector: [Overrides] Unable to change values in Device Metrics override setting
1364         https://bugs.webkit.org/show_bug.cgi?id=104542
1365
1366         Reviewed by Vsevolod Vlasov.
1367
1368         Remove inadvertent object property assignment.
1369
1370         * inspector/front-end/OverridesView.js:
1371
1372 2012-12-10  Michael Brüning  <michael.bruning@digia.com>
1373
1374         [Qt] Builds for Mac are tied to the OS system instead of the SDK version.
1375         https://bugs.webkit.org/show_bug.cgi?id=104529
1376
1377         Reviewed by Simon Hausmann.
1378
1379         Using work by Eike Ziller <eike.ziller@digia.com>.
1380
1381         The build system now first tries to assign the correct system libraries
1382         for the SDK being used for Mac builds. If this does not yield any
1383         result, it falls back to using the Mac OS version to determine the
1384         correct library.
1385
1386         No new tests (not applicable).
1387
1388         * WebCore.pri:
1389
1390 2012-12-10  Ilya Tikhonovsky  <loislo@chromium.org>
1391
1392         Unreviewed: touch RenderingAllInOne.cpp to fix Apple Windows builder.
1393
1394         * rendering/RenderingAllInOne.cpp:
1395
1396 2012-12-10  Eugene Klyuchnikov  <eustas@chromium.org>
1397
1398         Web Inspector: Network: newly added items are not filtered.
1399         https://bugs.webkit.org/show_bug.cgi?id=104021
1400
1401         Reviewed by Vsevolod Vlasov.
1402
1403         Extracted method to higlight/hide record according to filter.
1404         Used this method to process newly created records.
1405
1406         * inspector/front-end/NetworkPanel.js:
1407         (WebInspector.NetworkLogView.prototype._applyFilter): Extracted.
1408         (WebInspector.NetworkLogView.prototype.performFilter): Refactored.
1409
1410 2012-12-09  Ilya Tikhonovsky  <loislo@chromium.org>
1411
1412         Web Inspector: Unreviewed: move reportMemoryUsage to public section.
1413
1414         * rendering/RenderBlock.h:
1415         (RenderBlock):
1416         * rendering/RenderBox.h:
1417         (RenderBox):
1418
1419 2012-12-08  Pavel Feldman  <pfeldman@chromium.org>
1420
1421         Web Inspector: adds an option to remove toolbar icons.
1422         https://bugs.webkit.org/show_bug.cgi?id=95654
1423
1424         Reviewed by Vsevolod Vlasov.
1425
1426         - removes compact mode in favor or dock-to-bottom
1427         - introduces setting for hiding toolbar icons
1428
1429         * inspector/front-end/DockController.js:
1430         (WebInspector.DockController.prototype._toggleDockState):
1431         * inspector/front-end/Settings.js:
1432         (WebInspector.ExperimentsSettings):
1433         * inspector/front-end/Toolbar.js:
1434         (WebInspector.Toolbar.prototype.setDockedToBottom):
1435         (WebInspector.Toolbar.prototype._toolbarDragStart):
1436         (WebInspector.Toolbar.prototype._toolbarDrag):
1437         * inspector/front-end/helpScreen.css:
1438         (body.dock-to-bottom .help-content):
1439         * inspector/front-end/inspector.css:
1440         (body.dock-to-bottom #toolbar):
1441         (body.no-toolbar-icons #toolbar):
1442         (body.dock-to-bottom.port-qt #toolbar):
1443         (body.dock-to-bottom.inactive #toolbar):
1444         (body.no-toolbar-icons .toolbar-item.toggleable):
1445         (body.dock-to-bottom .toolbar-item.toggleable):
1446         (body.dock-to-bottom .toolbar-icon):
1447         (body.no-toolbar-icons .toolbar-icon):
1448         (body.no-toolbar-icons #main):
1449         (body.dock-to-bottom .toolbar-icon.custom-toolbar-icon):
1450         (body.dock-to-bottom .toolbar-item:active .toolbar-icon):
1451         (body.dock-to-bottom .toolbar-label):
1452         (body.dock-to-bottom #search-toolbar-label):
1453         (body.no-toolbar-icons .toolbar-label):
1454         (body.no-toolbar-icons #toolbar-dropdown):
1455         (#toolbar-dropdown .scrollable-content):
1456         (#toolbar-dropdown .toolbar-item.toggleable:hover):
1457         (body.no-toolbar-icons #toolbar-dropdown .toolbar-label):
1458         (body.no-toolbar-icons #toolbar-dropdown .toolbar-item):
1459         (body.dock-to-bottom .toolbar-item.resources .toolbar-icon):
1460         (body.dock-to-bottom .toolbar-item.network .toolbar-icon):
1461         (body.dock-to-bottom .toolbar-item.scripts .toolbar-icon):
1462         (body.dock-to-bottom .toolbar-item.timeline .toolbar-icon):
1463         (body.dock-to-bottom .toolbar-item.profiles .toolbar-icon):
1464         (body.dock-to-bottom .toolbar-item.audits .toolbar-icon):
1465         (body.dock-to-bottom .toolbar-item.console .toolbar-icon):
1466         (body.dock-to-bottom.port-qt .toolbar-item.close-left, body.dock-to-bottom.port-qt .toolbar-item.close-right):
1467         (body.dock-to-bottom #main):
1468
1469 2012-12-10  Kent Tamura  <tkent@chromium.org>
1470
1471         Refactoring: Remove HTMLFormControlElement::autofocus
1472         https://bugs.webkit.org/show_bug.cgi?id=104524
1473
1474         Reviewed by Kentaro Hara.
1475
1476         autofocus function is used only by HTMLFormControlElement itself, no
1477         sub-classes override it, and it is not exposed via an IDL attribute,
1478
1479         No new tests. This doesn't make any behavior changes.
1480
1481         * html/HTMLFormControlElement.cpp:
1482         (WebCore::shouldAutofocus): Use fastHasAttribute instead of autofocus().
1483         * html/HTMLFormControlElement.h: Remove autofocus().
1484
1485 2012-12-10  Jonathan Liu  <net147@gmail.com>
1486
1487         Fix GC3Dintptr and GC3Dsizeiptr typedefs for Win64
1488         https://bugs.webkit.org/show_bug.cgi?id=104426
1489
1490         Reviewed by Simon Hausmann.
1491
1492         The GC3Dintptr and GC3Dsizeiptr typedefs are incorrect for Win64 as
1493         LLP64 is used there. This would result in compile error due to
1494         narrowing conversion of 64-bit pointer to signed long int which is
1495         32-bit.
1496
1497         * platform/graphics/GraphicsTypes3D.h:
1498
1499 2012-12-10  Kent Tamura  <tkent@chromium.org>
1500
1501         Refactoring: Introduce HTMLFormControlElement::isDisabledOrReadOnly
1502         https://bugs.webkit.org/show_bug.cgi?id=104508
1503
1504         Reviewed by Kentaro Hara.
1505
1506         We have a lot of code like element->disabled || element->readOnly().
1507         isDisabledOrReadOnly makes them simpler.
1508
1509         No new tests. This make no behaivor change.
1510
1511         * html/HTMLFormControlElement.h:
1512         (WebCore::HTMLFormControlElement::isDisabledOrReadOnly):
1513         Added. Note that the implmentation of disabled() is not just "return m_disabled;".
1514
1515         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
1516         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):
1517         Use isDisabledOrReadOnly.
1518         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1519         (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldSpinButtonRespondToMouseEvents): Ditto.
1520         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isPickerIndicatorOwnerDisabledOrReadOnly): Ditto.
1521         * html/ColorInputType.cpp:
1522         (WebCore::ColorInputType::handleDOMActivateEvent): Ditto.
1523         (WebCore::ColorInputType::didChooseColor): Ditto.
1524         * html/HTMLFormControlElement.cpp:
1525         (WebCore::HTMLFormControlElement::recalcWillValidate): Ditto.
1526         * html/HTMLTextAreaElement.h:
1527         (WebCore::HTMLTextAreaElement::valueMissing): Ditto.
1528         * html/RangeInputType.cpp:
1529         (WebCore::RangeInputType::handleMouseDownEvent): Ditto.
1530         (WebCore::RangeInputType::handleTouchEvent): Ditto.
1531         (WebCore::RangeInputType::handleKeydownEvent): Ditto.
1532         * html/SearchInputType.cpp:
1533         (WebCore::SearchInputType::handleKeydownEvent): Ditto.
1534         * html/TextFieldInputType.cpp:
1535         (WebCore::TextFieldInputType::handleKeydownEventForSpinButton): Ditto.
1536         (WebCore::TextFieldInputType::shouldSpinButtonRespondToMouseEvents): Ditto.
1537         * html/shadow/TextControlInnerElements.cpp:
1538         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Ditto.
1539         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents): Ditto.
1540         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): Ditto.
1541         * html/shadow/TextFieldDecorationElement.cpp:
1542         (WebCore::TextFieldDecorationElement::defaultEventHandler): Ditto.
1543         (WebCore::TextFieldDecorationElement::willRespondToMouseMoveEvents): Ditto.
1544         (WebCore::TextFieldDecorationElement::willRespondToMouseClickEvents): Ditto.
1545
1546 2012-12-10  Pavel Feldman  <pfeldman@chromium.org>
1547
1548         Web Inspector: console broken? - console.dirxml behaves like console.log
1549         https://bugs.webkit.org/show_bug.cgi?id=104245
1550
1551         Reviewed by Vsevolod Vlasov.
1552
1553         Do not generate preview for dirxml.
1554
1555         * inspector/front-end/ConsoleMessage.js:
1556         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
1557
1558 2012-12-10  Kent Tamura  <tkent@chromium.org>
1559
1560         Refactoring: Remove HTMLFormControlElement::setDisabled
1561         https://bugs.webkit.org/show_bug.cgi?id=104510
1562
1563         Reviewed by Kentaro Hara.
1564
1565         Remove it because the number of call sites is only one, and the
1566         setDisabled implementation is equivalent to setBooleanAttribute.
1567
1568         No new tests. This should not make behavior changes.
1569
1570         * html/HTMLFormControlElement.cpp: Remove setDisabled.
1571         * html/HTMLFormControlElement.h: Ditto.
1572         * html/FileInputType.cpp:
1573         (WebCore::FileInputType::disabledAttributeChanged):
1574         Replace setDisabled with setBooleanAttribute.
1575
1576 2012-12-10  Hajime Morrita  <morrita@google.com>
1577
1578         [Shadow DOM][Refacdtoring] nextTo() and previousTo() can be part of ContentDistribution
1579         https://bugs.webkit.org/show_bug.cgi?id=104514
1580
1581         Reviewed by Kentaro Hara.
1582
1583         InsertionPoint::nextTo() and InsertionPoint::previousTo() are an
1584         query to distributed nodes, which is what ContentDistribution
1585         represents. We can move them to better home.
1586
1587         No new tests. No behavior change.
1588
1589         * html/shadow/ContentDistributor.cpp:
1590         (WebCore::ContentDistribution::nextTo): Moved from InsertionPoint
1591         (WebCore):
1592         (WebCore::ContentDistribution::previousTo): Moved from InsertionPoint
1593         * html/shadow/ContentDistributor.h:
1594         (ContentDistribution):
1595         * html/shadow/InsertionPoint.cpp:
1596         * html/shadow/InsertionPoint.h:
1597         (WebCore::InsertionPoint::nextTo): Delegated to ContentDistribution
1598         (WebCore::InsertionPoint::previousTo): Delegated to ContentDistribution
1599
1600 2012-12-10  Joanmarie Diggs  <jdiggs@igalia.com>
1601
1602         [GTK] accessibility/language-attribute.html is failing
1603         https://bugs.webkit.org/show_bug.cgi?id=98369
1604
1605         Reviewed by Chris Fleizach.
1606
1607         The test is failing for two reasons: Not exposing the language
1608         for accessible objects and AccessibilityUIElement::language() not
1609         being implemented.
1610
1611         No new tests; instead, unskipped the previously-failing test.
1612
1613         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1614         (getAttributeSetForAccessibilityObject): Expose the language via AtkText attribute
1615
1616 2012-12-09  Takashi Sakamoto  <tasak@google.com>
1617
1618         [Shadow DOM]: reset-style-inheritance doesn't work for insertion point
1619         https://bugs.webkit.org/show_bug.cgi?id=103711
1620
1621         Reviewed by Hajime Morita.
1622
1623         reset-style-inheritance can be specified by using insertion points'
1624         attribute, e.g. <content reset-style-inheritance>.
1625         c.f. shadow dom spec:
1626         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles
1627
1628         No new tests. Updated an existing test,
1629         fast/dom/shadow/insertion-point-resetStyleInheritance.html to cover
1630         this feature.
1631
1632         * html/HTMLAttributeNames.in:
1633         Added HTMLNames::reset_style_inheritanceAttr.
1634         * html/shadow/InsertionPoint.cpp:
1635         (WebCore::InsertionPoint::InsertionPoint):
1636         (WebCore::InsertionPoint::parseAttribute):
1637         Since both shadow and content elements have to support
1638         reset-style-inheritance, added InsertionPoint::parseAttribute.
1639         (WebCore::InsertionPoint::resetStyleInheritance):
1640         (WebCore::InsertionPoint::setResetStyleInheritance):
1641         Modified to update reset-style-inheritance attribute value.
1642         * html/shadow/InsertionPoint.h:
1643         (InsertionPoint):
1644         Removed m_shouldResetStyleInheritance. Instead, use
1645         reset-style-inheritance attribute value.
1646
1647 2012-12-09  Ilya Tikhonovsky  <loislo@chromium.org>
1648
1649         Native Memory Instrumentation: instrument a part of RenderObject class tree.
1650         https://bugs.webkit.org/show_bug.cgi?id=103564
1651
1652         Reviewed by Eric Seidel.
1653
1654         Many RenderObject descendants have OwnPtrs and RefPtrs members.
1655         Looks like we have to instrument all the RenderObject classes and visit
1656         all the render objects instead of counting entire render arena memory.
1657
1658         * WebCore.exp.in:
1659         * dom/Node.cpp:
1660         (WebCore::Node::reportMemoryUsage):
1661         * dom/WebCoreMemoryInstrumentation.cpp:
1662         (WebCore):
1663         * inspector/InspectorMemoryAgent.cpp:
1664         (WebCore::reportRenderTreeInfo):
1665         (WebCore):
1666         * platform/PlatformMemoryInstrumentation.cpp:
1667         (WebCore):
1668         * platform/PlatformMemoryInstrumentation.h:
1669         (PlatformMemoryTypes):
1670         * platform/graphics/GraphicsLayer.cpp:
1671         (WebCore::GraphicsLayer::reportMemoryUsage):
1672         (WebCore):
1673         * platform/graphics/GraphicsLayer.h:
1674         (GraphicsLayer):
1675         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1676         (WebCore::GraphicsLayerChromium::reportMemoryUsage):
1677         (WebCore):
1678         * platform/graphics/chromium/GraphicsLayerChromium.h:
1679         (GraphicsLayerChromium):
1680         * rendering/RenderBlock.cpp:
1681         (WebCore::RenderBlock::reportMemoryUsage):
1682         (WebCore):
1683         * rendering/RenderBlock.h:
1684         (RenderBlock):
1685         * rendering/RenderBox.cpp:
1686         (WebCore::RenderBox::reportMemoryUsage):
1687         (WebCore):
1688         * rendering/RenderBox.h:
1689         (RenderBox):
1690         * rendering/RenderInline.cpp:
1691         (WebCore::RenderInline::reportMemoryUsage):
1692         (WebCore):
1693         * rendering/RenderInline.h:
1694         (RenderInline):
1695         * rendering/RenderLayer.cpp:
1696         (WebCore::RenderLayer::reportMemoryUsage):
1697         (WebCore):
1698         * rendering/RenderLayer.h:
1699         (RenderLayer):
1700         * rendering/RenderLayerBacking.cpp:
1701         (WebCore::RenderLayerBacking::reportMemoryUsage):
1702         (WebCore):
1703         * rendering/RenderLayerBacking.h:
1704         (RenderLayerBacking):
1705         * rendering/RenderLayerCompositor.cpp:
1706         (WebCore::RenderLayerCompositor::reportMemoryUsage):
1707         (WebCore):
1708         * rendering/RenderLayerCompositor.h:
1709         (RenderLayerCompositor):
1710         * rendering/RenderLayerModelObject.cpp:
1711         (WebCore::RenderLayerModelObject::reportMemoryUsage):
1712         (WebCore):
1713         * rendering/RenderLayerModelObject.h:
1714         (RenderLayerModelObject):
1715         * rendering/RenderObject.cpp:
1716         (WebCore::RenderObject::reportMemoryUsage):
1717         (WebCore):
1718         * rendering/RenderObject.h:
1719         (RenderObject):
1720         * rendering/RenderText.cpp:
1721         (WebCore::RenderText::reportMemoryUsage):
1722         (WebCore):
1723         * rendering/RenderText.h:
1724         (RenderText):
1725         * rendering/RenderView.cpp:
1726         (WebCore::RenderView::reportMemoryUsage):
1727         (WebCore):
1728         * rendering/RenderView.h:
1729         (RenderView):
1730
1731 2012-12-09  Ryosuke Niwa  <rniwa@webkit.org>
1732
1733         REGRESSION (r137003): failures in MicroData tests on EFL, GTK
1734         https://bugs.webkit.org/show_bug.cgi?id=104469
1735
1736         Reviewed by Darin Adler.
1737
1738         Fix the regression by calling propertyNodeList on HTMLPropertiesCollection
1739         in the named getter for HTMLCollection. It's a miracle that the old code prior to r137003
1740         worked at all since the return type of namedItem was different.
1741
1742         Existing tests cover this.
1743
1744         * bindings/js/JSHTMLCollectionCustom.cpp:
1745         (WebCore::JSHTMLCollection::nameGetter):
1746         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
1747         (WebCore::V8HTMLCollection::namedPropertyGetter):
1748
1749 2012-12-09  Joanmarie Diggs  <jdiggs@igalia.com>
1750
1751         [GTK] accessibility/placeholder.html is failing
1752         https://bugs.webkit.org/show_bug.cgi?id=98373
1753
1754         Reviewed by Martin Robinson.
1755
1756         The test was failing because the placeholder text was not supported and
1757         AccessibilityUIElement::stringAttributeValue() was not implemented.
1758
1759         No new tests; instead the failing test was unskipped.
1760
1761         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1762         (webkitAccessibleGetAttributes): Add the placeholder text as an AtkAttribute
1763         of the AtkObject, as is done in Gtk+ 3.
1764
1765 2012-12-09  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1766
1767         [EFL] [WebGL] Path is not resized correctly.
1768         https://bugs.webkit.org/show_bug.cgi?id=104458.
1769
1770         Reviewed by Kenneth Rohde Christiansen.
1771
1772         In GraphicsContext3D::paintToCanvas, we flip the contents and draw on the surface.
1773         The operations done to flip the image (translation and scale) are done before rectangle with correct size
1774         is added to current path. This resulted in updating pixels at wrong positions.
1775
1776         Covered by existing tests.
1777
1778         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1779         (WebCore::GraphicsContext3D::paintToCanvas):
1780
1781 2012-12-09  Joone Hur  <joone.hur@intel.com>
1782
1783         [GTK][AC] build fix after r130525 and r133332
1784         https://bugs.webkit.org/show_bug.cgi?id=104491
1785
1786         Reviewed by Martin Robinson.
1787
1788         Build fix for Accelerated Compositing Clutter backend after r130525 and r133332.
1789
1790         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
1791         * platform/gtk/RedirectedXCompositeWindow.cpp:
1792         * platform/gtk/RedirectedXCompositeWindow.h:
1793
1794 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1795
1796         [GTK] Use GObject casts instead of C++ cast for GObjects in DOM bindings
1797         https://bugs.webkit.org/show_bug.cgi?id=104492
1798
1799         Reviewed by Martin Robinson.
1800
1801         * bindings/scripts/CodeGeneratorGObject.pm:
1802         (GenerateCFile):
1803         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
1804         (WebKit::kit):
1805         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
1806         (WebKit::kit):
1807         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1808         (WebKit::kit):
1809         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
1810         (WebKit::kit):
1811         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
1812         (WebKit::kit):
1813         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1814         (WebKit::kit):
1815         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
1816         (WebKit::kit):
1817         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1818         (WebKit::kit):
1819         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
1820         (WebKit::kit):
1821         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
1822         (WebKit::kit):
1823         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
1824         (WebKit::kit):
1825         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1826         (WebKit::kit):
1827         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
1828         (WebKit::kit):
1829         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1830         (WebKit::kit):
1831
1832 2012-12-09  Pavel Feldman  <pfeldman@chromium.org>
1833
1834         Web Inspector: do not treat object as equal to itself when logging to console
1835         https://bugs.webkit.org/show_bug.cgi?id=104487
1836
1837         Reviewed by Alexander Pavlov.
1838
1839         Otherwise, mutating object in a loop results in the repeat count update instead of generation of the new preview.
1840
1841         Test: inspector/console/console-object-preview.html
1842
1843         * inspector/ConsoleMessage.cpp:
1844         (WebCore::ConsoleMessage::isEqual):
1845
1846 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1847
1848         Remove unused code in GObject DOM bindings generator
1849         https://bugs.webkit.org/show_bug.cgi?id=104490
1850
1851         Reviewed by Martin Robinson.
1852
1853         * bindings/scripts/CodeGeneratorGObject.pm:
1854         (GenerateProperties): Remove code to install event listeners and
1855         signals.
1856
1857 2012-12-09  Zan Dobersek  <zandobersek@gmail.com>
1858
1859         Unreviewed update for the GObject bindings after r137074 and r137078.
1860
1861         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1862         (webkit_dom_test_event_target_dispatch_event):
1863         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1864         (webkit_dom_test_interface_supplemental_method2):
1865         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1866         (webkit_dom_test_obj_method_that_requires_all_args_and_throws):
1867         (webkit_dom_test_obj_method_with_exception):
1868         (webkit_dom_test_obj_with_script_state_void_exception):
1869         (webkit_dom_test_obj_with_script_state_obj_exception):
1870         (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception):
1871         (webkit_dom_test_obj_strict_function):
1872         (webkit_dom_test_obj_get_attr_with_getter_exception):
1873         (webkit_dom_test_obj_set_attr_with_setter_exception):
1874         (webkit_dom_test_obj_get_string_attr_with_getter_exception):
1875         (webkit_dom_test_obj_set_string_attr_with_setter_exception):
1876         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
1877         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
1878         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises):
1879
1880 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1881
1882         Fix the GError check in GObject DOM bindings.
1883
1884         Reviewed by Xan Lopez.
1885
1886         Previous commit introduced a check to make sure the passed GError
1887         is valid in all DOM methods receiving an error.
1888
1889         * bindings/scripts/CodeGeneratorGObject.pm:
1890         (GetGReturnMacro): Check that the passed GError either is NULL or
1891         the pointer has been initialized to NULL.
1892
1893 2012-12-09  Leo Yang  <leoyang@rim.com>
1894
1895         [BlackBerry] Adapt to name change of createNetworkBufferByCopyingData()
1896         https://bugs.webkit.org/show_bug.cgi?id=104449
1897
1898         Reviewed by Rob Buis.
1899
1900         Name change no new tests.
1901
1902         * platform/network/blackberry/rss/RSSFilterStream.cpp:
1903         (WebCore::RSSFilterStream::handleRSSContent):
1904
1905 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1906
1907         [GTK] Clean up g_return macros usage in GObject DOM bindings
1908         https://bugs.webkit.org/show_bug.cgi?id=101079
1909
1910         Reviewed by Xan Lopez.
1911
1912         Several improvements:
1913
1914           - Move g_return macros at the beginning of the methods.
1915           - Use them only to check parameters of public API.
1916           - Use GObject macros to check GObjects.
1917           - Check also GError parameters.
1918           - Use early returns in kit and core methods, since they should
1919             work even if g_return macros are disabled handling NULL
1920             gracefully.
1921
1922         * bindings/scripts/CodeGeneratorGObject.pm:
1923         (GetGReturnMacro):
1924         (GenerateFunction):
1925         (GenerateCFile):
1926         (Generate):
1927         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
1928         (WebKit::kit):
1929         (WebKit::core):
1930         (WebKit::wrapFloat64Array):
1931         (webkit_dom_float64array_foo):
1932         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
1933         (WebKit::kit):
1934         (WebKit::core):
1935         (WebKit::wrapTestActiveDOMObject):
1936         (webkit_dom_test_active_dom_object_exciting_function):
1937         (webkit_dom_test_active_dom_object_post_message):
1938         (webkit_dom_test_active_dom_object_get_exciting_attr):
1939         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1940         (WebKit::kit):
1941         (WebKit::core):
1942         (WebKit::wrapTestCallback):
1943         (webkit_dom_test_callback_callback_with_no_param):
1944         (webkit_dom_test_callback_callback_with_class1param):
1945         (webkit_dom_test_callback_callback_with_class2param):
1946         (webkit_dom_test_callback_callback_with_non_bool_return_type):
1947         (webkit_dom_test_callback_callback_with_string_list):
1948         (webkit_dom_test_callback_callback_with_boolean):
1949         (webkit_dom_test_callback_callback_requires_this_to_pass):
1950         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
1951         (WebKit::kit):
1952         (WebKit::core):
1953         (WebKit::wrapTestCustomNamedGetter):
1954         (webkit_dom_test_custom_named_getter_another_function):
1955         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
1956         (WebKit::kit):
1957         (WebKit::core):
1958         (WebKit::wrapTestEventConstructor):
1959         (webkit_dom_test_event_constructor_get_attr1):
1960         (webkit_dom_test_event_constructor_get_attr2):
1961         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1962         (WebKit::kit):
1963         (WebKit::core):
1964         (WebKit::wrapTestEventTarget):
1965         (webkit_dom_test_event_target_item):
1966         (webkit_dom_test_event_target_dispatch_event):
1967         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
1968         (WebKit::kit):
1969         (WebKit::core):
1970         (WebKit::wrapTestException):
1971         (webkit_dom_test_exception_get_name):
1972         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1973         (WebKit::kit):
1974         (WebKit::core):
1975         (WebKit::wrapTestInterface):
1976         (webkit_dom_test_interface_supplemental_method1):
1977         (webkit_dom_test_interface_supplemental_method2):
1978         (webkit_dom_test_interface_supplemental_method4):
1979         (webkit_dom_test_interface_get_supplemental_str1):
1980         (webkit_dom_test_interface_get_supplemental_str2):
1981         (webkit_dom_test_interface_set_supplemental_str2):
1982         (webkit_dom_test_interface_get_supplemental_node):
1983         (webkit_dom_test_interface_set_supplemental_node):
1984         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
1985         (WebKit::kit):
1986         (WebKit::core):
1987         (WebKit::wrapTestMediaQueryListListener):
1988         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
1989         (WebKit::kit):
1990         (WebKit::core):
1991         (WebKit::wrapTestNamedConstructor):
1992         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
1993         (WebKit::kit):
1994         (WebKit::core):
1995         (WebKit::wrapTestNode):
1996         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1997         (WebKit::kit):
1998         (WebKit::core):
1999         (WebKit::wrapTestObj):
2000         (webkit_dom_test_obj_void_method):
2001         (webkit_dom_test_obj_void_method_with_args):
2002         (webkit_dom_test_obj_long_method):
2003         (webkit_dom_test_obj_long_method_with_args):
2004         (webkit_dom_test_obj_obj_method):
2005         (webkit_dom_test_obj_obj_method_with_args):
2006         (webkit_dom_test_obj_method_that_requires_all_args_and_throws):
2007         (webkit_dom_test_obj_serialized_value):
2008         (webkit_dom_test_obj_idb_key):
2009         (webkit_dom_test_obj_options_object):
2010         (webkit_dom_test_obj_method_with_exception):
2011         (webkit_dom_test_obj_with_script_state_void):
2012         (webkit_dom_test_obj_with_script_state_obj):
2013         (webkit_dom_test_obj_with_script_state_void_exception):
2014         (webkit_dom_test_obj_with_script_state_obj_exception):
2015         (webkit_dom_test_obj_with_script_execution_context):
2016         (webkit_dom_test_obj_with_script_execution_context_and_script_state):
2017         (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception):
2018         (webkit_dom_test_obj_with_script_execution_context_and_script_state_with_spaces):
2019         (webkit_dom_test_obj_method_with_optional_arg):
2020         (webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg):
2021         (webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args):
2022         (webkit_dom_test_obj_method_with_optional_string):
2023         (webkit_dom_test_obj_method_with_optional_string_is_undefined):
2024         (webkit_dom_test_obj_method_with_optional_string_is_null_string):
2025         (webkit_dom_test_obj_conditional_method1):
2026         (webkit_dom_test_obj_conditional_method2):
2027         (webkit_dom_test_obj_conditional_method3):
2028         (webkit_dom_test_obj_class_method):
2029         (webkit_dom_test_obj_class_method_with_optional):
2030         (webkit_dom_test_obj_overloaded_method1):
2031         (webkit_dom_test_obj_convert1):
2032         (webkit_dom_test_obj_convert2):
2033         (webkit_dom_test_obj_convert4):
2034         (webkit_dom_test_obj_convert5):
2035         (webkit_dom_test_obj_mutable_point_function):
2036         (webkit_dom_test_obj_immutable_point_function):
2037         (webkit_dom_test_obj_orange):
2038         (webkit_dom_test_obj_strict_function):
2039         (webkit_dom_test_obj_variadic_string_method):
2040         (webkit_dom_test_obj_variadic_double_method):
2041         (webkit_dom_test_obj_variadic_node_method):
2042         (webkit_dom_test_obj_get_read_only_long_attr):
2043         (webkit_dom_test_obj_get_read_only_string_attr):
2044         (webkit_dom_test_obj_get_read_only_test_obj_attr):
2045         (webkit_dom_test_obj_get_short_attr):
2046         (webkit_dom_test_obj_set_short_attr):
2047         (webkit_dom_test_obj_get_unsigned_short_attr):
2048         (webkit_dom_test_obj_set_unsigned_short_attr):
2049         (webkit_dom_test_obj_get_long_attr):
2050         (webkit_dom_test_obj_set_long_attr):
2051         (webkit_dom_test_obj_get_long_long_attr):
2052         (webkit_dom_test_obj_set_long_long_attr):
2053         (webkit_dom_test_obj_get_unsigned_long_long_attr):
2054         (webkit_dom_test_obj_set_unsigned_long_long_attr):
2055         (webkit_dom_test_obj_get_string_attr):
2056         (webkit_dom_test_obj_set_string_attr):
2057         (webkit_dom_test_obj_get_test_obj_attr):
2058         (webkit_dom_test_obj_set_test_obj_attr):
2059         (webkit_dom_test_obj_get_xml_obj_attr):
2060         (webkit_dom_test_obj_set_xml_obj_attr):
2061         (webkit_dom_test_obj_get_create):
2062         (webkit_dom_test_obj_set_create):
2063         (webkit_dom_test_obj_get_reflected_string_attr):
2064         (webkit_dom_test_obj_set_reflected_string_attr):
2065         (webkit_dom_test_obj_get_reflected_integral_attr):
2066         (webkit_dom_test_obj_set_reflected_integral_attr):
2067         (webkit_dom_test_obj_get_reflected_unsigned_integral_attr):
2068         (webkit_dom_test_obj_set_reflected_unsigned_integral_attr):
2069         (webkit_dom_test_obj_get_reflected_boolean_attr):
2070         (webkit_dom_test_obj_set_reflected_boolean_attr):
2071         (webkit_dom_test_obj_get_reflected_url_attr):
2072         (webkit_dom_test_obj_set_reflected_url_attr):
2073         (webkit_dom_test_obj_get_reflected_custom_integral_attr):
2074         (webkit_dom_test_obj_set_reflected_custom_integral_attr):
2075         (webkit_dom_test_obj_get_reflected_custom_boolean_attr):
2076         (webkit_dom_test_obj_set_reflected_custom_boolean_attr):
2077         (webkit_dom_test_obj_get_reflected_custom_url_attr):
2078         (webkit_dom_test_obj_set_reflected_custom_url_attr):
2079         (webkit_dom_test_obj_get_attr_with_getter_exception):
2080         (webkit_dom_test_obj_set_attr_with_getter_exception):
2081         (webkit_dom_test_obj_get_attr_with_setter_exception):
2082         (webkit_dom_test_obj_set_attr_with_setter_exception):
2083         (webkit_dom_test_obj_get_string_attr_with_getter_exception):
2084         (webkit_dom_test_obj_set_string_attr_with_getter_exception):
2085         (webkit_dom_test_obj_get_string_attr_with_setter_exception):
2086         (webkit_dom_test_obj_set_string_attr_with_setter_exception):
2087         (webkit_dom_test_obj_get_with_script_state_attribute):
2088         (webkit_dom_test_obj_set_with_script_state_attribute):
2089         (webkit_dom_test_obj_get_with_script_execution_context_attribute):
2090         (webkit_dom_test_obj_set_with_script_execution_context_attribute):
2091         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
2092         (webkit_dom_test_obj_set_with_script_state_attribute_raises):
2093         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
2094         (webkit_dom_test_obj_set_with_script_execution_context_attribute_raises):
2095         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute):
2096         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute):
2097         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises):
2098         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute_raises):
2099         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_with_spaces_attribute):
2100         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_with_spaces_attribute):
2101         (webkit_dom_test_obj_get_conditional_attr1):
2102         (webkit_dom_test_obj_set_conditional_attr1):
2103         (webkit_dom_test_obj_get_conditional_attr2):
2104         (webkit_dom_test_obj_set_conditional_attr2):
2105         (webkit_dom_test_obj_get_conditional_attr3):
2106         (webkit_dom_test_obj_set_conditional_attr3):
2107         (webkit_dom_test_obj_get_any_attribute):
2108         (webkit_dom_test_obj_set_any_attribute):
2109         (webkit_dom_test_obj_get_content_document):
2110         (webkit_dom_test_obj_get_mutable_point):
2111         (webkit_dom_test_obj_set_mutable_point):
2112         (webkit_dom_test_obj_get_immutable_point):
2113         (webkit_dom_test_obj_set_immutable_point):
2114         (webkit_dom_test_obj_get_strawberry):
2115         (webkit_dom_test_obj_set_strawberry):
2116         (webkit_dom_test_obj_get_strict_float):
2117         (webkit_dom_test_obj_set_strict_float):
2118         (webkit_dom_test_obj_get_description):
2119         (webkit_dom_test_obj_get_id):
2120         (webkit_dom_test_obj_set_id):
2121         (webkit_dom_test_obj_get_hash):
2122         (webkit_dom_test_obj_get_replaceable_attribute):
2123         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
2124         (WebKit::kit):
2125         (WebKit::core):
2126         (WebKit::wrapTestSerializedScriptValueInterface):
2127         (webkit_dom_test_serialized_script_value_interface_accept_transfer_list):
2128         (webkit_dom_test_serialized_script_value_interface_multi_transfer_list):
2129         (webkit_dom_test_serialized_script_value_interface_get_value):
2130         (webkit_dom_test_serialized_script_value_interface_set_value):
2131         (webkit_dom_test_serialized_script_value_interface_get_readonly_value):
2132         (webkit_dom_test_serialized_script_value_interface_get_cached_value):
2133         (webkit_dom_test_serialized_script_value_interface_set_cached_value):
2134         (webkit_dom_test_serialized_script_value_interface_get_ports):
2135         (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
2136
2137 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2138
2139         [GTK] Use a private struct and placement new syntax in GObject DOM bindings
2140         https://bugs.webkit.org/show_bug.cgi?id=101074
2141
2142         Reviewed by Xan Lopez.
2143
2144         It allows to use RefPtr for the wrapped object and it simplifies
2145         the code. Only the classes deriving from WebKitDOMObject keep a
2146         reference of the wrapped object in a private struct. The wrapped
2147         object is added to the cache in GObjectClass::constructor() and
2148         removed in GObjectClass::finalize().
2149
2150         * bindings/gobject/WebKitDOMBinding.cpp:
2151         (WebKit::createWrapper):
2152         (WebKit::kit):
2153         (WebKit::wrapEventTarget):
2154         * bindings/scripts/CodeGeneratorGObject.pm:
2155         (GetParentImplClassName):
2156         (GenerateProperties):
2157         (GenerateCFile):
2158         (Generate):
2159         (WriteData):
2160         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
2161         (WebKit::kit):
2162         (WebKit::core):
2163         (WebKit::wrapFloat64Array):
2164         (webkit_dom_float64array_class_init):
2165         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
2166         (_WebKitDOMTestActiveDOMObjectPrivate):
2167         (WebKit::kit):
2168         (WebKit::core):
2169         (WebKit::wrapTestActiveDOMObject):
2170         (webkit_dom_test_active_dom_object_finalize):
2171         (webkit_dom_test_active_dom_object_constructor):
2172         (webkit_dom_test_active_dom_object_class_init):
2173         (webkit_dom_test_active_dom_object_init):
2174         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2175         (_WebKitDOMTestCallbackPrivate):
2176         (WebKit::kit):
2177         (WebKit::core):
2178         (WebKit::wrapTestCallback):
2179         (webkit_dom_test_callback_finalize):
2180         (webkit_dom_test_callback_constructor):
2181         (webkit_dom_test_callback_class_init):
2182         (webkit_dom_test_callback_init):
2183         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
2184         (_WebKitDOMTestCustomNamedGetterPrivate):
2185         (WebKit::kit):
2186         (WebKit::core):
2187         (WebKit::wrapTestCustomNamedGetter):
2188         (webkit_dom_test_custom_named_getter_finalize):
2189         (webkit_dom_test_custom_named_getter_constructor):
2190         (webkit_dom_test_custom_named_getter_class_init):
2191         (webkit_dom_test_custom_named_getter_init):
2192         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
2193         (_WebKitDOMTestEventConstructorPrivate):
2194         (WebKit::kit):
2195         (WebKit::core):
2196         (WebKit::wrapTestEventConstructor):
2197         (webkit_dom_test_event_constructor_finalize):
2198         (webkit_dom_test_event_constructor_constructor):
2199         (webkit_dom_test_event_constructor_class_init):
2200         (webkit_dom_test_event_constructor_init):
2201         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
2202         (_WebKitDOMTestEventTargetPrivate):
2203         (WebKit::kit):
2204         (WebKit::core):
2205         (WebKit::wrapTestEventTarget):
2206         (webkit_dom_test_event_target_finalize):
2207         (webkit_dom_test_event_target_constructor):
2208         (webkit_dom_test_event_target_class_init):
2209         (webkit_dom_test_event_target_init):
2210         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
2211         (_WebKitDOMTestExceptionPrivate):
2212         (WebKit::kit):
2213         (WebKit::core):
2214         (WebKit::wrapTestException):
2215         (webkit_dom_test_exception_finalize):
2216         (webkit_dom_test_exception_constructor):
2217         (webkit_dom_test_exception_class_init):
2218         (webkit_dom_test_exception_init):
2219         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
2220         (_WebKitDOMTestInterfacePrivate):
2221         (WebKit::kit):
2222         (WebKit::core):
2223         (WebKit::wrapTestInterface):
2224         (webkit_dom_test_interface_finalize):
2225         (webkit_dom_test_interface_constructor):
2226         (webkit_dom_test_interface_class_init):
2227         (webkit_dom_test_interface_init):
2228         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
2229         (_WebKitDOMTestMediaQueryListListenerPrivate):
2230         (WebKit::kit):
2231         (WebKit::core):
2232         (WebKit::wrapTestMediaQueryListListener):
2233         (webkit_dom_test_media_query_list_listener_finalize):
2234         (webkit_dom_test_media_query_list_listener_constructor):
2235         (webkit_dom_test_media_query_list_listener_class_init):
2236         (webkit_dom_test_media_query_list_listener_init):
2237         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
2238         (_WebKitDOMTestNamedConstructorPrivate):
2239         (WebKit::kit):
2240         (WebKit::core):
2241         (WebKit::wrapTestNamedConstructor):
2242         (webkit_dom_test_named_constructor_finalize):
2243         (webkit_dom_test_named_constructor_constructor):
2244         (webkit_dom_test_named_constructor_class_init):
2245         (webkit_dom_test_named_constructor_init):
2246         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
2247         (WebKit::kit):
2248         (WebKit::core):
2249         (WebKit::wrapTestNode):
2250         (webkit_dom_test_node_class_init):
2251         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2252         (_WebKitDOMTestObjPrivate):
2253         (WebKit::kit):
2254         (WebKit::core):
2255         (WebKit::wrapTestObj):
2256         (webkit_dom_test_obj_finalize):
2257         (webkit_dom_test_obj_constructor):
2258         (webkit_dom_test_obj_class_init):
2259         (webkit_dom_test_obj_init):
2260         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
2261         (_WebKitDOMTestOverloadedConstructorsPrivate):
2262         (WebKit::kit):
2263         (WebKit::core):
2264         (WebKit::wrapTestOverloadedConstructors):
2265         (webkit_dom_test_overloaded_constructors_finalize):
2266         (webkit_dom_test_overloaded_constructors_constructor):
2267         (webkit_dom_test_overloaded_constructors_class_init):
2268         (webkit_dom_test_overloaded_constructors_init):
2269         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
2270         (_WebKitDOMTestSerializedScriptValueInterfacePrivate):
2271         (WebKit::kit):
2272         (WebKit::core):
2273         (WebKit::wrapTestSerializedScriptValueInterface):
2274         (webkit_dom_test_serialized_script_value_interface_finalize):
2275         (webkit_dom_test_serialized_script_value_interface_constructor):
2276         (webkit_dom_test_serialized_script_value_interface_class_init):
2277         (webkit_dom_test_serialized_script_value_interface_init):
2278
2279 2012-12-09  Jon Lee  <jonlee@apple.com>
2280
2281         [WK2] Move button image to injected bundle
2282         https://bugs.webkit.org/show_bug.cgi?id=104107
2283         <rdar://problem/12813842>
2284
2285         Reviewed by Simon Fraser.
2286
2287         Update RenderSnapshottedPlugIn to retrieve the start button image from the ChromeClient. Expand the
2288         kinds of images available for use as the button. Try to find the best sized button to use for the plug-in,
2289         otherwise use no image at all.
2290
2291         * rendering/RenderSnapshottedPlugIn.h: Add an enum representing the size to use. Remove the label rect
2292         variable since it is unneeded.
2293         * rendering/RenderSnapshottedPlugIn.cpp:
2294         (WebCore::RenderSnapshottedPlugIn::startLabelImage): Maintain a cache of the images for reuse. Index into the
2295         array using the enum. If the image has been loaded, or an attempt was made, then return the result. Otherwise
2296         ask the chrome client for the image.
2297         (WebCore::RenderSnapshottedPlugIn::paintLabel): Determine the proper label to use, and paint if the image is
2298         available.
2299         (WebCore::RenderSnapshottedPlugIn::tryToFitStartLabel): Compare the label size with the provided content
2300         box. Return a LayoutRect representing the label's placement. If it doesn't fit, return an empty rect.
2301         (WebCore::RenderSnapshottedPlugIn::layout): The rect is not needed because it is all determined at paint time.
2302
2303         * page/ChromeClient.h:
2304         (WebCore::ChromeClient::plugInStartLabelImage): Added.
2305
2306         * WebCore.exp.in: Expose GraphicsContext::drawNativeImage() for WKImageCG.cpp.
2307         * WebCore.xcodeproj/project.pbxproj: Remove start button assets.
2308         * Resources/startButton.png: Removed.
2309         * Resources/startButton@2x.png: Removed.
2310
2311 2012-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
2312
2313         Unreviewed, rolling out r137053.
2314         http://trac.webkit.org/changeset/137053
2315         https://bugs.webkit.org/show_bug.cgi?id=104471
2316
2317         Broke PerformanceTests/Parser/html-parser.html (Requested by
2318         mkwst_ on #webkit).
2319
2320         * bindings/ScriptControllerBase.cpp:
2321         (WebCore::ScriptController::canExecuteScripts):
2322
2323 2012-12-09  Kangil Han  <kangil.han@samsung.com>
2324
2325         Fix unused parameter compile warnings
2326         https://bugs.webkit.org/show_bug.cgi?id=104463
2327
2328         Reviewed by Kentaro Hara.
2329
2330         Remove compile warning messages by omitting parameter name.
2331
2332         * platform/graphics/surfaces/GraphicsSurface.cpp:
2333         (WebCore::GraphicsSurface::GraphicsSurface):
2334
2335 2012-12-08  Rakesh KN  <rakeshchaitan@gmail.com>
2336
2337         Build break if SVG is disabled
2338         https://bugs.webkit.org/show_bug.cgi?id=104452
2339
2340         Reviewed by Darin Adler.
2341
2342         Build breaking after r136975 if SVG is disabled.
2343         No new tests required.
2344
2345         * rendering/FilterEffectRenderer.cpp:
2346         (WebCore::FilterEffectRenderer::buildReferenceFilter):
2347         As document is not an argument anymore, removing UNUSED_PARAM against it.
2348         * rendering/FilterEffectRenderer.h:
2349         Added forward declaration for RenderObject.
2350
2351 2012-12-08  Mike West  <mkwst@chromium.org>
2352
2353         Log to console when script is blocked by sandbox attributes.
2354         https://bugs.webkit.org/show_bug.cgi?id=104365
2355
2356         Reviewed by Ojan Vafai.
2357
2358         Adds a console message to cover script execution blocked within the
2359         context of a sandboxed frame which lacks the 'allow-scripts' permission.
2360
2361         * bindings/ScriptControllerBase.cpp:
2362         (WebCore::ScriptController::canExecuteScripts):
2363             Log a warning when sandboxing flags block script execution.
2364
2365 2012-12-08  No'am Rosenthal  <noam@webkit.org>
2366
2367         Use background color for GraphicsLayers when applicable
2368         https://bugs.webkit.org/show_bug.cgi?id=103786
2369
2370         Updated RenderLayerBacking to call GraphicsLayer::setContentsToBackgroundColor when the following conditions take place:
2371         1. The layer doesn't paint its own content, other than background/decoration.
2372         2. There are no borders or other box decorations (border radius, borders, outline, shadow etc.)
2373         3. The image has only a background color, and no background image.
2374         4. background-composite is set to source-over, and background-clip is anything apart from text.
2375         5. The port supports setContentsToBackgroundColor.
2376
2377         This allows any implementation of GraphicsLayer that supports setContentsToBackgroundColor to avoid allocating a backing store
2378         for that layer, but instead draw that solid color directly.
2379         In addition to setting the background color, the layer's contentsRect needs to be adjusted, since the default contents rect of
2380         a layer is not always equivalent to the rect where the background is supposed to be painted, which is derived from the box's
2381         background-clip property.
2382
2383         Reviewed by Simon Fraser.
2384
2385         Tests: compositing/background-color/background-color-alpha.html
2386                compositing/background-color/background-color-change-to-text.html
2387                compositing/background-color/background-color-composite.html
2388                compositing/background-color/background-color-container.html
2389                compositing/background-color/background-color-content-clip.html
2390                compositing/background-color/background-color-padding-change.html
2391                compositing/background-color/background-color-padding-clip.html
2392                compositing/background-color/background-color-simple.html
2393                compositing/background-color/background-color-text-change.html
2394                compositing/background-color/background-color-text-clip.html
2395
2396         * platform/graphics/GraphicsLayer.h:
2397         (WebCore::GraphicsLayer::supportsBackgroundColorContent):
2398             Allows different implementation of GraphicsLayer to identify whether they implement setContentsToBackgroundColor.
2399             Currently only the MAC implementation and TextureMapper falls under that category.
2400
2401         * rendering/RenderBox.h:
2402         (WebCore::RenderBox::paddingBoxRect):
2403             Added paddingBoxRect to compliment borderBoxRect and contentsBoxRect. paddingBoxRect corresponds to 
2404             background-clip: padding.
2405
2406         * rendering/RenderLayerBacking.cpp:
2407         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2408             Update the background color if needed, for every configuration change.
2409             This should accomodate the old behavior for full-screen, while enabling background color changes for other layers.
2410
2411         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2412             Move the contentsRect logic to updateContentsRect.
2413
2414         (WebCore::RenderLayerBacking::updateContentsRect):
2415             Use the background box when directly compositing backgrounds.
2416
2417         (WebCore::RenderLayerBacking::updateBackgroundColor):
2418             Set the background color if applicable, otherwise set to trasnparent and clear.
2419             This was not needed in the past because background colors were only used for the special case of full-screen.
2420
2421         (WebCore::supportsDirectBoxDecorationsComposition):
2422             Helper function to determine whether a particular background can be directly composited. Right now only 
2423             background color can be composited, and only if the GraphicsLayer implementation supports background colors.
2424             Also we don't yet support background-clip: text and any background-composite other than source-over.
2425
2426         (WebCore::RenderLayerBacking::paintsBoxDecorations):
2427             Apply the new supportsDirectBoxDecorationsComposition logic.
2428
2429         (WebCore::RenderLayerBacking::contentsBox):
2430             Remove unnecessary local variable.
2431
2432         (WebCore::backgroundRectForBox):
2433         (WebCore::RenderLayerBacking::backgroundBox):
2434             Figure out the correct rect for the GraphicsLayer's contentsRect, based on the renderer's backgroundClip.
2435             The rectangle has to be adjusted based on the composited layer offset, and snapped to an IntRect as 
2436             GraphicsLayer::contentsRect expects snapped pixels.
2437
2438
2439 2012-12-08  Patrick Gansterer  <paroga@webkit.org>
2440
2441         Build fix for WinCE after r137011.
2442
2443         * platform/graphics/GraphicsContext.h:
2444         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2445         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2446         (WebCore::GraphicsContext::drawBitmap):
2447         * platform/graphics/wince/ImageBufferWinCE.cpp:
2448         (WebCore::BufferedImage::draw):
2449         (WebCore::ImageBuffer::draw):
2450         * platform/graphics/wince/ImageWinCE.cpp:
2451         (WebCore::BitmapImage::getHBITMAPOfSize):
2452         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2453         (WebCore::BitmapImage::draw):
2454         * platform/graphics/wince/SharedBitmap.cpp:
2455         (WebCore::SharedBitmap::draw):
2456         * platform/graphics/wince/SharedBitmap.h:
2457
2458 2012-12-08  Gavin Peters  <gavinp@chromium.org>
2459
2460         Add status events on <link rel=prerender> elements.
2461         https://bugs.webkit.org/show_bug.cgi?id=96474
2462
2463         Reviewed by Adam Barth.
2464
2465         The new PrerenderStatusEvent is sent to link elements when
2466         prerenders are started by the embedder, and also sent when they
2467         are stopped. Pages using this feature can now serialize launching
2468         prerenders, and track timing performance.
2469
2470         Tested in a new WebKitUnitTest for the chromium port.
2471
2472         * GNUmakefile.list.am:
2473         * Target.pri:
2474         * WebCore.gypi:
2475         * WebCore.vcproj/WebCore.vcproj:
2476         * WebCore.xcodeproj/project.pbxproj:
2477         * dom/EventNames.h:
2478         (WebCore):
2479         * html/HTMLLinkElement.cpp:
2480         (WebCore):
2481         (WebCore::HTMLLinkElement::didStartLinkPrerender):
2482         (WebCore::HTMLLinkElement::didStopLinkPrerender):
2483         (WebCore::HTMLLinkElement::didSendLoadForLinkPrerender):
2484         (WebCore::HTMLLinkElement::didSendDOMContentLoadedForLinkPrerender):
2485         * html/HTMLLinkElement.h:
2486         (HTMLLinkElement):
2487         * loader/LinkLoader.cpp:
2488         (WebCore::LinkLoader::didStartPrerender):
2489         (WebCore):
2490         (WebCore::LinkLoader::didStopPrerender):
2491         (WebCore::LinkLoader::didSendLoadForPrerender):
2492         (WebCore::LinkLoader::didSendDOMContentLoadedForPrerender):
2493         (WebCore::LinkLoader::loadLink):
2494         * loader/LinkLoader.h:
2495         (LinkLoader):
2496         * loader/LinkLoaderClient.h:
2497         (LinkLoaderClient):
2498         * loader/Prerenderer.cpp:
2499         (WebCore::Prerenderer::render):
2500         * loader/Prerenderer.h:
2501         (WebCore):
2502         (Prerenderer):
2503         * platform/PrerenderClient.h: Copied from Source/WebCore/loader/LinkLoaderClient.h.
2504         (WebCore):
2505         (PrerenderClient):
2506         (WebCore::PrerenderClient::~PrerenderClient):
2507         * platform/PrerenderHandle.h:
2508         (WebCore):
2509         (PrerenderHandle):
2510         * platform/chromium/Prerender.cpp:
2511         (WebCore::Prerender::Prerender):
2512         (WebCore::Prerender::removeClient):
2513         (WebCore):
2514         (WebCore::Prerender::add):
2515         (WebCore::Prerender::cancel):
2516         (WebCore::Prerender::abandon):
2517         (WebCore::Prerender::didStartPrerender):
2518         (WebCore::Prerender::didStopPrerender):
2519         (WebCore::Prerender::didSendLoadForPrerender):
2520         (WebCore::Prerender::didSendDOMContentLoadedForPrerender):
2521         * platform/chromium/Prerender.h:
2522         (WebKit):
2523         (WebCore):
2524         (Prerender):
2525         * platform/chromium/PrerenderHandle.cpp:
2526         (WebCore::PrerenderHandle::create):
2527         (WebCore::PrerenderHandle::PrerenderHandle):
2528         (WebCore::PrerenderHandle::~PrerenderHandle):
2529         (WebCore::PrerenderHandle::removeClient):
2530         (WebCore):
2531         * platform/chromium/support/WebPrerender.cpp:
2532         (WebKit::WebPrerender::toPrerender):
2533         (WebKit):
2534         (WebKit::WebPrerender::assign):
2535         (WebKit::WebPrerender::isNull):
2536         (WebKit::WebPrerender::didStartPrerender):
2537         (WebKit::WebPrerender::didStopPrerender):
2538         (WebKit::WebPrerender::didSendLoadForPrerender):
2539         (WebKit::WebPrerender::didSendDOMContentLoadedForPrerender):
2540
2541 2012-12-08  Gustavo Noronha Silva  <gns@gnome.org>
2542
2543         Reviewed by Martin Robinson.
2544
2545         Update the Chromium/Chrome version we advertise in our User-Agent
2546         string to version 25, to better match our current reality.
2547
2548         * platform/gtk/UserAgentGtk.cpp:
2549         (WebCore::standardUserAgent):
2550
2551 2012-12-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2552
2553         Unreviewed, rolling out r137006.
2554         http://trac.webkit.org/changeset/137006
2555         https://bugs.webkit.org/show_bug.cgi?id=104446
2556
2557         Broke plugin painting on Mac (youtube, etc.) (Requested by
2558         thorton_ on #webkit).
2559
2560         * platform/graphics/GraphicsLayer.h:
2561         (GraphicsLayer):
2562         * rendering/RenderBox.h:
2563         * rendering/RenderLayerBacking.cpp:
2564         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2565         (WebCore::clipBox):
2566         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2567         (WebCore::RenderLayerBacking::updateDrawsContent):
2568         (WebCore::RenderLayerBacking::updateBackgroundColor):
2569         (WebCore::RenderLayerBacking::paintsBoxDecorations):
2570         (WebCore::RenderLayerBacking::contentChanged):
2571         (WebCore::RenderLayerBacking::updateImageContents):
2572         (WebCore::RenderLayerBacking::contentsBox):
2573         * rendering/RenderLayerBacking.h:
2574         (RenderLayerBacking):
2575
2576 2012-12-08  Wei James  <james.wei@intel.com>
2577
2578         Remove incorrect ASSERT for m_error in CachedResource
2579         https://bugs.webkit.org/show_bug.cgi?id=104333
2580
2581         Reviewed by Nate Chapin.
2582
2583         This assertion was brought in https://bugs.webkit.org/show_bug.cgi?id=100901 
2584         When the request is canceled, m_error.isNull() should be true.
2585
2586         run webkit_unit_tests Debug build.
2587
2588         * loader/cache/CachedResource.cpp:
2589         (WebCore::CachedResource::stopLoading):
2590
2591 2012-12-08  Ryosuke Niwa  <rniwa@webkit.org>
2592
2593         Qt Linux Minimal build fix after r136975.
2594
2595         * dom/ElementRareData.h:
2596         (ElementRareData):
2597
2598 2012-12-08  Ryosuke Niwa  <rniwa@webkit.org>
2599
2600         Qt Linux Minimal build fix attempt after r136959.
2601
2602         * inspector/InspectorInstrumentation.h:
2603         (WebCore::InspectorInstrumentation::layerTreeDidChange):
2604         (WebCore::InspectorInstrumentation::renderLayerDestroyed):
2605
2606 2012-12-08  Xan Lopez  <xlopez@igalia.com>
2607
2608         Build fix after r137003. Wrap Microdata only sections with ENABLE(MICRODATA).
2609
2610         * dom/NodeRareData.h:
2611         (NodeRareData):
2612
2613 2012-12-08  Ryosuke Niwa  <rniwa@webkit.org>
2614
2615         Build fix after r137003. Wrap NodeMutationObserverData with ENABLE(MUTATION_OBSERVERS).
2616
2617         * dom/NodeRareData.h:
2618         (NodeRareData):
2619
2620 2012-12-08  Patrick Gansterer  <paroga@webkit.org>
2621
2622         Build fix for ENABLE(SVG) && !ENABLE(FILTERS) after r136975.
2623
2624         * rendering/svg/SVGResources.cpp:
2625         (WebCore::SVGResources::buildCachedResources):
2626
2627 2012-12-08  Adam Klein  <adamk@chromium.org>
2628
2629         HTMLTemplateElement.innerHTML should be parsed into the template contents owner document
2630         https://bugs.webkit.org/show_bug.cgi?id=104407
2631
2632         Reviewed by Eric Seidel.
2633
2634         When parsing via innerHTML, ensure that all operations (including the
2635         initial fragment creation) occur in the proper document to avoid,
2636         e.g., images loading while being parsed into the template contents.
2637         This matches the parsing behavior during page load.
2638
2639         Test: fast/dom/HTMLTemplateElement/innerHTML-inert.html
2640
2641         * editing/markup.cpp:
2642         (WebCore::createFragmentForInnerOuterHTML):
2643
2644 2012-12-08  ChangSeok Oh  <shivamidow@gmail.com>
2645
2646         Assertion failed at WebCore::RedirectedXCompositeWindow::context()
2647         https://bugs.webkit.org/show_bug.cgi?id=104349
2648
2649         Reviewed by Martin Robinson.
2650
2651         We should return GLContext if m_needsContext is CreateGLContext. By the way
2652         CreateGLContext is a enum value and its default value is 0. So checking
2653         ASSERT(m_needsContext) causes a crash on debug build.
2654         ASSERT(m_needsContext == CreateGLContext) is better here.
2655
2656         No new tests since we can verify this with already existing AC tests.
2657
2658         * platform/gtk/RedirectedXCompositeWindow.cpp:
2659         (WebCore::RedirectedXCompositeWindow::context):
2660
2661 2012-12-07  Rik Cabanier  <cabanier@adobe.com>
2662
2663         Extend platform layer so it can pass blend modes to the compositing calls
2664         https://bugs.webkit.org/show_bug.cgi?id=104176
2665
2666         Reviewed by Dirk Schulze.
2667
2668         Adding blend mode enumeration to drawImage functions + stored blendmode in graphics context 
2669
2670         No new tests, no new functionality.
2671
2672         * html/HTMLCanvasElement.cpp:
2673         (WebCore::HTMLCanvasElement::paint):
2674         * platform/graphics/BitmapImage.h:
2675         * platform/graphics/CrossfadeGeneratedImage.cpp:
2676         (WebCore::CrossfadeGeneratedImage::draw):
2677         * platform/graphics/CrossfadeGeneratedImage.h:
2678         (CrossfadeGeneratedImage):
2679         * platform/graphics/GeneratedImage.h:
2680         (GeneratedImage):
2681         * platform/graphics/GeneratorGeneratedImage.cpp:
2682         (WebCore::GeneratorGeneratedImage::draw):
2683         * platform/graphics/GeneratorGeneratedImage.h:
2684         (GeneratorGeneratedImage):
2685         * platform/graphics/GraphicsContext.cpp:
2686         (WebCore::GraphicsContext::drawImage):
2687         (WebCore):
2688         (WebCore::GraphicsContext::drawImageBuffer):
2689         (WebCore::GraphicsContext::setCompositeOperation):
2690         * platform/graphics/GraphicsContext.h:
2691         (WebCore::GraphicsContextState::GraphicsContextState):
2692         (GraphicsContextState):
2693         (GraphicsContext):
2694         * platform/graphics/Image.cpp:
2695         (WebCore::Image::draw):
2696         (WebCore::Image::drawTiled):
2697         * platform/graphics/Image.h:
2698         (Image):
2699         * platform/graphics/ImageBuffer.h:
2700         (ImageBuffer):
2701         * platform/graphics/cairo/BitmapImageCairo.cpp:
2702         (WebCore::BitmapImage::draw):
2703         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2704         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2705         * platform/graphics/cairo/ImageBufferCairo.cpp:
2706         (WebCore::ImageBuffer::draw):
2707         * platform/graphics/cg/BitmapImageCG.cpp:
2708         (WebCore::BitmapImage::draw):
2709         * platform/graphics/cg/GraphicsContextCG.cpp:
2710         (WebCore::GraphicsContext::drawNativeImage):
2711         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2712         * platform/graphics/cg/ImageBufferCG.cpp:
2713         (WebCore::ImageBuffer::draw):
2714         * platform/graphics/cg/PDFDocumentImage.cpp:
2715         (WebCore::PDFDocumentImage::draw):
2716         * platform/graphics/cg/PDFDocumentImage.h:
2717         (PDFDocumentImage):
2718         * platform/graphics/qt/GraphicsContextQt.cpp:
2719         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2720         * platform/graphics/qt/ImageBufferQt.cpp:
2721         (WebCore::ImageBuffer::draw):
2722         * platform/graphics/qt/ImageQt.cpp:
2723         (WebCore::BitmapImage::draw):
2724         * platform/graphics/qt/StillImageQt.cpp:
2725         (WebCore::StillImage::draw):
2726         * platform/graphics/qt/StillImageQt.h:
2727         (StillImage):
2728         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
2729         (BitmapImageSingleFrameSkia):
2730         * platform/graphics/skia/GraphicsContextSkia.cpp:
2731         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2732         * platform/graphics/skia/ImageBufferSkia.cpp:
2733         (WebCore::ImageBuffer::draw):
2734         * platform/graphics/skia/ImageSkia.cpp:
2735         (WebCore::BitmapImage::draw):
2736         (WebCore::BitmapImageSingleFrameSkia::draw):
2737         * platform/graphics/win/ImageCGWin.cpp:
2738         (WebCore::BitmapImage::getHBITMAPOfSize):
2739         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2740         * svg/graphics/SVGImage.cpp:
2741         (WebCore::SVGImage::drawSVGToImageBuffer):
2742         (WebCore::SVGImage::draw):
2743         (WebCore::SVGImage::nativeImageForCurrentFrame):
2744         * svg/graphics/SVGImage.h:
2745         (SVGImage):
2746
2747 2012-12-07  Alpha Lam  <hclam@chromium.org>
2748
2749         [chromium] ImageDecodingStore should cache partially decoded images
2750         https://bugs.webkit.org/show_bug.cgi?id=103796
2751
2752         Reviewed by Stephen White.
2753
2754         Implement caching for incomplete images, meaning the image is partially
2755         decoded. The image is cached together with partially decoded ImageDecoder.
2756         This allows decoding to resume in a later time.
2757
2758         Caching logic for incomplete images is implemented in ImageDecodingStore.
2759
2760         Logic for resuming image decoding is implemented in ImageFrameGenerator.
2761
2762         ImageDecodingStore allows storing incomplete image with the decoder.
2763         The cache entry can be used in a later time to read and write (i.e. resume
2764         decoding.) To avoid the same entry being written and read at the same time,
2765         an incomplete entry can be used by one user only. Concurrent access to
2766         an incomplete entry should never happen and is checked by an assert.
2767         An entry can becomes complete when decoding is finished. In this case
2768         the associated decoder is deleted. Once an entry becomes complete concurrent
2769         read is allowed.
2770
2771         ImageFrameGenerator performs the logic to resume image decoding. It
2772         performs the following operations in sequence:
2773         - Try to lookup a complete image
2774         - Try to perform scaling on a complete image
2775         - Try to lookup an incomplete image and resume decoding & scaling
2776         - Everything fails, start decoding from scratch
2777         The entire sequence of operations in under a mutex, hence there will be
2778         no more than 1 user of an incomplete cache entry at the same time.
2779
2780         New unit tests in ImageDecodingStoreTest and ImageFrameGeneratorTest.
2781
2782         * platform/graphics/chromium/ImageDecodingStore.cpp:
2783         (WebCore::ImageDecodingStore::lockCache):
2784         Change of method definition to return an image and ImageDecoder.
2785         (WebCore::ImageDecodingStore::unlockCache):
2786         (WebCore::ImageDecodingStore::insertAndLockCache):
2787         (WebCore::ImageDecodingStore::overwriteAndLockCache):
2788         New method to allow an incomplete cache entry be overwritten.
2789         (WebCore):
2790         * platform/graphics/chromium/ImageDecodingStore.h:
2791         (ImageDecodingStore):
2792         (WebCore::ImageDecodingStore::CacheEntry::createAndUse):
2793         (WebCore::ImageDecodingStore::CacheEntry::CacheEntry):
2794         (WebCore::ImageDecodingStore::CacheEntry::cachedImage):
2795         (WebCore::ImageDecodingStore::CacheEntry::cachedDecoder):
2796         (WebCore::ImageDecodingStore::CacheEntry::releaseCachedDecoder):
2797         (WebCore::ImageDecodingStore::CacheEntry::overwriteCachedImage):
2798         New method to allow an incomplete image be overwitten.
2799         (CacheEntry):
2800         * platform/graphics/chromium/ImageFrameGenerator.cpp:
2801         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
2802         (WebCore::ImageFrameGenerator::decodeAndScale):
2803         (WebCore::ImageFrameGenerator::tryToLockCompleteCache):
2804         (WebCore::ImageFrameGenerator::tryToScale):
2805         (WebCore::ImageFrameGenerator::tryToResumeDecodeAndScale):
2806         New method to lookup an incomplete cache entry and resume decoding.
2807         (WebCore):
2808         (WebCore::ImageFrameGenerator::tryToDecodeAndScale):
2809         (WebCore::ImageFrameGenerator::decoder):
2810         New helper method to do decoding for a full sized image.
2811         (WebCore::ImageFrameGenerator::prepareData):
2812         New helper method to prepare data safely.
2813         * platform/graphics/chromium/ImageFrameGenerator.h:
2814         (ImageFrameGenerator):
2815         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
2816         (WebCore::LazyDecodingPixelRef::onLockPixels):
2817         * platform/graphics/chromium/ScaledImageFragment.h:
2818         (WebCore::ScaledImageFragment::setIsComplete):
2819
2820 2012-12-07  Alexis Menard  <alexis@webkit.org>
2821
2822         Enable CSS3 position offset for CSS Masking.
2823         https://bugs.webkit.org/show_bug.cgi?id=104252
2824
2825         Reviewed by Dirk Schulze.
2826
2827         To follow CSS3 background-position, mask-position should also support
2828         the new <position> type (http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html#mask-property).
2829         Now the code is shared between background and mask I renamed the
2830         functions used to be more generic. Note that the feature flag is not
2831         meant to stay and will be removed in a following commit.
2832
2833         No new tests : I modified LayoutTests/fast/masking/parsing-mask.html to
2834         cover the new feature.
2835
2836         * css/CSSComputedStyleDeclaration.cpp:
2837         (WebCore::createPositionListForLayer):
2838         * css/CSSParser.cpp:
2839         (WebCore::isFillPositionKeyword):
2840         (WebCore::CSSParser::parse4ValuesFillPosition):
2841         (WebCore::CSSParser::parse3ValuesFillPosition):
2842         (WebCore::CSSParser::isPotentialPositionValue):
2843         (WebCore::CSSParser::parseFillPosition):
2844         (WebCore::CSSParser::parse2ValuesFillPosition):
2845         (WebCore::CSSParser::parseFillProperty):
2846         (WebCore::CSSParser::parseTransformOriginShorthand):
2847         (WebCore::CSSParser::parseRadialGradient):
2848         (WebCore::CSSParser::parsePerspectiveOrigin):
2849         * css/CSSParser.h:
2850         * css/CSSToStyleMap.cpp:
2851         (WebCore::CSSToStyleMap::mapFillXPosition):
2852         (WebCore::CSSToStyleMap::mapFillYPosition):
2853
2854 2012-12-07  No'am Rosenthal  <noam@webkit.org>
2855
2856         Use background color for GraphicsLayers when applicable
2857         https://bugs.webkit.org/show_bug.cgi?id=103786
2858
2859         Updated RenderLayerBacking to call GraphicsLayer::setContentsToBackgroundColor when the following conditions take place:
2860         1. The layer doesn't paint its own content, other than background/decoration.
2861         2. There are no borders or other box decorations (border radius, borders, outline, shadow etc.)
2862         3. The image has only a background color, and no background image.
2863         4. background-composite is set to source-over, and background-clip is anything apart from text.
2864         5. The port supports setContentsToBackgroundColor.
2865
2866         This allows any implementation of GraphicsLayer that supports setContentsToBackgroundColor to avoid allocating a backing store
2867         for that layer, but instead draw that solid color directly.
2868         In addition to setting the background color, the layer's contentsRect needs to be adjusted, since the default contents rect of
2869         a layer is not always equivalent to the rect where the background is supposed to be painted, which is derived from the box's
2870         background-clip property.
2871
2872         Reviewed by Simon Fraser.
2873
2874         Tests: compositing/background-color/background-color-alpha.html
2875                compositing/background-color/background-color-change-to-text.html
2876                compositing/background-color/background-color-composite.html
2877                compositing/background-color/background-color-container.html
2878                compositing/background-color/background-color-content-clip.html
2879                compositing/background-color/background-color-padding-change.html
2880                compositing/background-color/background-color-padding-clip.html
2881                compositing/background-color/background-color-simple.html
2882                compositing/background-color/background-color-text-change.html
2883                compositing/background-color/background-color-text-clip.html
2884
2885         * platform/graphics/GraphicsLayer.h:
2886         (WebCore::GraphicsLayer::supportsBackgroundColorContent):
2887             Allows different implementation of GraphicsLayer to identify whether they implement setContentsToBackgroundColor.
2888             Currently only the MAC implementation and TextureMapper falls under that category.
2889
2890         * rendering/RenderBox.h:
2891         (WebCore::RenderBox::paddingBoxRect):
2892             Added paddingBoxRect to compliment borderBoxRect and contentsBoxRect. paddingBoxRect corresponds to 
2893             background-clip: padding.
2894
2895         * rendering/RenderLayerBacking.cpp:
2896         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2897             Update the background color if needed, for every configuration change.
2898             This should accomodate the old behavior for full-screen, while enabling background color changes for other layers.
2899
2900         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2901             Move the contentsRect logic to updateContentsRect.
2902
2903         (WebCore::RenderLayerBacking::updateContentsRect):
2904             Use the background box when directly compositing backgrounds.
2905
2906         (WebCore::RenderLayerBacking::updateBackgroundColor):
2907             Set the background color if applicable, otherwise set to trasnparent and clear.
2908             This was not needed in the past because background colors were only used for the special case of full-screen.
2909
2910         (WebCore::supportsDirectBoxDecorationsComposition):
2911             Helper function to determine whether a particular background can be directly composited. Right now only 
2912             background color can be composited, and only if the GraphicsLayer implementation supports background colors.
2913             Also we don't yet support background-clip: text and any background-composite other than source-over.
2914
2915         (WebCore::RenderLayerBacking::paintsBoxDecorations):
2916             Apply the new supportsDirectBoxDecorationsComposition logic.
2917
2918         (WebCore::RenderLayerBacking::contentsBox):
2919             Remove unnecessary local variable.
2920
2921         (WebCore::backgroundRectForBox):
2922         (WebCore::RenderLayerBacking::backgroundBox):
2923             Figure out the correct rect for the GraphicsLayer's contentsRect, based on the renderer's backgroundClip.
2924             The rectangle has to be adjusted based on the composited layer offset, and snapped to an IntRect as 
2925             GraphicsLayer::contentsRect expects snapped pixels.
2926
2927
2928 2012-12-06  Ryosuke Niwa  <rniwa@webkit.org>
2929
2930         Shrink the size of NodeRareData by moving pointers into separate objects
2931         https://bugs.webkit.org/show_bug.cgi?id=104312
2932
2933         Reviewed by Andreas Kling.
2934
2935         This patch does three things:
2936         1. Move ChildNodeList back into NodeListsNodeData.
2937         2. Move m_mutationObserverRegistry & m_transientMutationObserverRegistry into a separate object owned by NodeRareData.
2938         3. Move m_itemProp, m_itemRef, m_itemType & into a separate object owned by NodeRareData.
2939
2940         Moving m_childNodeList from NodeRareData to NodeListsNodeData also has a nice side-effect of making ChildNodeList
2941         behave more like other LiveNodeLists.
2942
2943         This patch also fixes Mac build when microdata is enabled.
2944
2945         There should be no user-visible behavior change.
2946
2947         * dom/ChildNodeList.cpp:
2948         (WebCore::ChildNodeList::~ChildNodeList):
2949         * dom/Node.cpp:
2950         (WebCore::Node::childNodes): Moved the code to create ChildNodeList into NodeListsNodeData to match other node lists.
2951         (WebCore::Node::invalidateNodeListCachesInAncestors):
2952         (WebCore): Removed removeCachedChildNodeList.
2953         * dom/Node.h:
2954         (Node):
2955         * dom/NodeRareData.cpp:
2956         (WebCore): Assert the size of NodeRareData at compilation time.
2957         (WebCore::NodeListsNodeData::reportMemoryUsage):
2958         (WebCore::NodeRareData::reportMemoryUsage):
2959         * dom/NodeRareData.h:
2960         (WebCore::NodeListsNodeData::clearChildNodeListCache): Moved from NodeRareData.
2961         (WebCore::NodeListsNodeData::ensureChildNodeList): Extracted from Node::childNodes.
2962         (WebCore::NodeListsNodeData::removeChildNodeList): Added.
2963         (WebCore::NodeListsNodeData::NodeListsNodeData): Initialize m_childNodeList.
2964         (WebCore::NodeRareData::NodeMutationObserverData): Extracted from NodeRareData.
2965         (WebCore::NodeRareData::NodeMutationObserverData::create):
2966         (WebCore::NodeRareData::NodeMicroDataTokenLists): Ditto.
2967         (WebCore::NodeRareData::NodeMicroDataTokenLists::create):
2968         (WebCore::NodeRareData::NodeRareData):
2969         (WebCore::NodeRareData::ensureNodeLists): Merged setNodeLists since it's not called elsewhere.
2970         (WebCore::NodeRareData::mutationObserverRegistry):
2971         (WebCore::NodeRareData::ensureMutationObserverRegistry): Added.
2972         (WebCore::NodeRareData::transientMutationObserverRegistry):
2973         (WebCore::NodeRareData::ensureTransientMutationObserverRegistry):
2974         (WebCore::NodeRareData::ensureMicroDataTokenLists):
2975         (NodeRareData):
2976         (WebCore::NodeRareData::itemProp):
2977         (WebCore::NodeRareData::setItemProp):
2978         (WebCore::NodeRareData::itemRef):
2979         (WebCore::NodeRareData::setItemRef):
2980         (WebCore::NodeRareData::itemType):
2981         (WebCore::NodeRareData::setItemType):
2982         * html/HTMLPropertiesCollection.cpp:
2983         (WebCore::HTMLPropertiesCollection::propertyNodeList): Renamed from namedItem since its return type, PropertyNodeList,
2984         is different from that, Node, of LiveNodeList::namedItem. It was shadowing the function name instead of overriding.
2985         * html/HTMLPropertiesCollection.h:
2986         (HTMLPropertiesCollection):
2987         * html/HTMLPropertiesCollection.idl:
2988
2989 2012-12-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2990
2991         Unreviewed, rolling out r136993.
2992         http://trac.webkit.org/changeset/136993
2993         https://bugs.webkit.org/show_bug.cgi?id=104415
2994
2995         This patch breaks the mac build (Requested by cabanier on
2996         #webkit).
2997
2998         * html/HTMLCanvasElement.cpp:
2999         (WebCore::HTMLCanvasElement::paint):
3000         * platform/graphics/BitmapImage.h:
3001         * platform/graphics/CrossfadeGeneratedImage.cpp:
3002         (WebCore::CrossfadeGeneratedImage::draw):
3003         * platform/graphics/CrossfadeGeneratedImage.h:
3004         (CrossfadeGeneratedImage):
3005         * platform/graphics/GeneratedImage.h:
3006         (GeneratedImage):
3007         * platform/graphics/GeneratorGeneratedImage.cpp:
3008         (WebCore::GeneratorGeneratedImage::draw):
3009         * platform/graphics/GeneratorGeneratedImage.h:
3010         (GeneratorGeneratedImage):
3011         * platform/graphics/GraphicsContext.cpp:
3012         (WebCore::GraphicsContext::drawImage):
3013         (WebCore::GraphicsContext::drawImageBuffer):
3014         (WebCore::GraphicsContext::setCompositeOperation):
3015         * platform/graphics/GraphicsContext.h:
3016         (WebCore::GraphicsContextState::GraphicsContextState):
3017         (GraphicsContextState):
3018         (GraphicsContext):
3019         * platform/graphics/Image.cpp:
3020         (WebCore::Image::draw):
3021         (WebCore::Image::drawTiled):
3022         * platform/graphics/Image.h:
3023         (Image):
3024         * platform/graphics/ImageBuffer.h:
3025         (ImageBuffer):
3026         * platform/graphics/cairo/BitmapImageCairo.cpp:
3027         (WebCore::BitmapImage::draw):
3028         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3029         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3030         * platform/graphics/cairo/ImageBufferCairo.cpp:
3031         (WebCore::ImageBuffer::draw):
3032         * platform/graphics/cg/BitmapImageCG.cpp:
3033         (WebCore::BitmapImage::draw):
3034         * platform/graphics/cg/GraphicsContextCG.cpp:
3035         (WebCore::GraphicsContext::drawNativeImage):
3036         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3037         * platform/graphics/cg/ImageBufferCG.cpp:
3038         (WebCore::ImageBuffer::draw):
3039         * platform/graphics/cg/PDFDocumentImage.cpp:
3040         (WebCore::PDFDocumentImage::draw):
3041         * platform/graphics/cg/PDFDocumentImage.h:
3042         (PDFDocumentImage):
3043         * platform/graphics/qt/GraphicsContextQt.cpp:
3044         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3045         * platform/graphics/qt/ImageBufferQt.cpp:
3046         (WebCore::ImageBuffer::draw):
3047         * platform/graphics/qt/ImageQt.cpp:
3048         (WebCore::BitmapImage::draw):
3049         * platform/graphics/qt/StillImageQt.cpp:
3050         (WebCore::StillImage::draw):
3051         * platform/graphics/qt/StillImageQt.h:
3052         (StillImage):
3053         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
3054         (BitmapImageSingleFrameSkia):
3055         * platform/graphics/skia/GraphicsContextSkia.cpp:
3056         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3057         * platform/graphics/skia/ImageBufferSkia.cpp:
3058         (WebCore::ImageBuffer::draw):
3059         * platform/graphics/skia/ImageSkia.cpp:
3060         (WebCore::BitmapImage::draw):
3061         (WebCore::BitmapImageSingleFrameSkia::draw):
3062         * platform/graphics/win/ImageCGWin.cpp:
3063         (WebCore::BitmapImage::getHBITMAPOfSize):
3064         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
3065         * svg/graphics/SVGImage.cpp:
3066         (WebCore::SVGImage::drawSVGToImageBuffer):
3067         (WebCore::SVGImage::draw):
3068         (WebCore::SVGImage::nativeImageForCurrentFrame):
3069         * svg/graphics/SVGImage.h:
3070         (SVGImage):
3071
3072 2012-12-07  Alexey Proskuryakov  <ap@apple.com>
3073
3074         There is no need to change cached resource storage policy through ResourceHandleClient
3075         https://bugs.webkit.org/show_bug.cgi?id=104413
3076
3077         Reviewed by Brady Eidson.
3078
3079         This code was only needed to prevent storing responses to disk in private browsing
3080         mode, but we now have a storage session to take care of that in a cleaner and more
3081         reliable way.
3082
3083         * loader/ResourceLoader.cpp:
3084         * loader/ResourceLoader.h: (WebCore::ResourceLoader::receivedCancellation):
3085         * platform/network/ResourceHandleClient.h:
3086         * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willCacheResponse):
3087         * platform/network/mac/ResourceHandleMac.mm:
3088         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
3089
3090 2012-12-07  Adam Klein  <adamk@chromium.org>
3091
3092         MutationRecord addedNodes/removedNodes should never be null
3093         https://bugs.webkit.org/show_bug.cgi?id=98921
3094
3095         Reviewed by Ryosuke Niwa.
3096
3097         Per an update to the DOM4 spec that matches Gecko's behavior,
3098         addedNodes/removedNodes should be empty NodeLists on 'attributes'
3099         and 'characterData' records, rather than null.
3100
3101         This is accomplished with lazy initialization of addedNodes/removedNodes
3102         attributes on 'attributes'/'characterData' records and the
3103         addition of a new StaticNodeList::createEmpty() factory method.
3104
3105         * dom/MutationRecord.cpp:
3106         * dom/MutationRecord.h:
3107         (MutationRecord):
3108         * dom/StaticNodeList.h:
3109         (WebCore::StaticNodeList::adopt):
3110         (StaticNodeList):
3111         (WebCore::StaticNodeList::createEmpty):
3112         (WebCore::StaticNodeList::StaticNodeList):
3113
3114 2012-12-07  Brent Fulgham  <bfulgham@webkit.org>
3115
3116         Unreviewed build correction after 136959.
3117
3118         The initialization list should follow the same compiler macro
3119         exclusions as the class members.
3120
3121         * inspector/InstrumentingAgents.h: Add USE(ACCELERATED_COMPOSITING)
3122           guards around m_inspectorLayerTreeAgent as this does not exist
3123           when the guard is false.
3124
3125 2012-12-07  Rik Cabanier  <cabanier@adobe.com>
3126
3127         Extend platform layer so it can pass blend modes to the compositing calls
3128         https://bugs.webkit.org/show_bug.cgi?id=104176
3129
3130         Reviewed by Dirk Schulze.
3131
3132         Adding blend mode enumeration to drawImage functions + stored blendmode in graphics context 
3133
3134         No new tests, no new functionality.
3135
3136         * html/HTMLCanvasElement.cpp:
3137         (WebCore::HTMLCanvasElement::paint):
3138         * platform/graphics/BitmapImage.h:
3139         * platform/graphics/CrossfadeGeneratedImage.cpp:
3140         (WebCore::CrossfadeGeneratedImage::draw):
3141         * platform/graphics/CrossfadeGeneratedImage.h:
3142         (CrossfadeGeneratedImage):
3143         * platform/graphics/GeneratedImage.h:
3144         (GeneratedImage):
3145         * platform/graphics/GeneratorGeneratedImage.cpp:
3146         (WebCore::GeneratorGeneratedImage::draw):
3147         * platform/graphics/GeneratorGeneratedImage.h:
3148         (GeneratorGeneratedImage):
3149         * platform/graphics/GraphicsContext.cpp:
3150         (WebCore::GraphicsContext::drawImage):
3151         (WebCore):
3152         (WebCore::GraphicsContext::drawImageBuffer):
3153         (WebCore::GraphicsContext::setCompositeOperation):
3154         * platform/graphics/GraphicsContext.h:
3155         (WebCore::GraphicsContextState::GraphicsContextState):
3156         (GraphicsContextState):
3157         (GraphicsContext):
3158         * platform/graphics/Image.cpp:
3159         (WebCore::Image::draw):
3160         (WebCore::Image::drawTiled):
3161         * platform/graphics/Image.h:
3162         (Image):
3163         * platform/graphics/ImageBuffer.h:
3164         (ImageBuffer):
3165         * platform/graphics/cairo/BitmapImageCairo.cpp:
3166         (WebCore::BitmapImage::draw):
3167         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3168         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3169         * platform/graphics/cairo/ImageBufferCairo.cpp:
3170         (WebCore::ImageBuffer::draw):
3171         * platform/graphics/cg/BitmapImageCG.cpp:
3172         (WebCore::BitmapImage::draw):
3173         * platform/graphics/cg/GraphicsContextCG.cpp:
3174         (WebCore::GraphicsContext::drawNativeImage):
3175         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3176         * platform/graphics/cg/ImageBufferCG.cpp:
3177         (WebCore::ImageBuffer::draw):
3178         * platform/graphics/cg/PDFDocumentImage.cpp:
3179         (WebCore::PDFDocumentImage::draw):
3180         * platform/graphics/cg/PDFDocumentImage.h:
3181         (PDFDocumentImage):
3182         * platform/graphics/qt/GraphicsContextQt.cpp:
3183         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3184         * platform/graphics/qt/ImageBufferQt.cpp:
3185         (WebCore::ImageBuffer::draw):
3186         * platform/graphics/qt/ImageQt.cpp:
3187         (WebCore::BitmapImage::draw):
3188         * platform/graphics/qt/StillImageQt.cpp:
3189         (WebCore::StillImage::draw):
3190         * platform/graphics/qt/StillImageQt.h:
3191         (StillImage):
3192         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
3193         (BitmapImageSingleFrameSkia):
3194         * platform/graphics/skia/GraphicsContextSkia.cpp:
3195         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3196         * platform/graphics/skia/ImageBufferSkia.cpp:
3197         (WebCore::ImageBuffer::draw):
3198         * platform/graphics/skia/ImageSkia.cpp:
3199         (WebCore::BitmapImage::draw):
3200         (WebCore::BitmapImageSingleFrameSkia::draw):
3201         * platform/graphics/win/ImageCGWin.cpp:
3202         (WebCore::BitmapImage::getHBITMAPOfSize):
3203         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
3204         * svg/graphics/SVGImage.cpp:
3205         (WebCore::SVGImage::drawSVGToImageBuffer):
3206         (WebCore::SVGImage::draw):
3207         (WebCore::SVGImage::nativeImageForCurrentFrame):
3208         * svg/graphics/SVGImage.h:
3209         (SVGImage):
3210
3211 2012-12-07  Alec Flett  <alecflett@chromium.org>
3212
3213         IndexedDB: propagate transaction_ids through open/upgradeneeded
3214         https://bugs.webkit.org/show_bug.cgi?id=103922
3215
3216         Reviewed by Tony Chang.
3217
3218         Make sure front-end is always generating the transaction id,
3219         so that it can be relied upon as an alternative to the
3220         to-be-deprecated IDBTransactionBackendInterface pointer.
3221
3222         No new tests, this is one stage in a larger refactor.
3223
3224         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3225         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
3226         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
3227         (IDBDatabaseBackendImpl::VersionChangeOperation):
3228         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create):
3229         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::transactionId):
3230         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall):
3231         (IDBDatabaseBackendImpl::PendingOpenCall):
3232         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::create):
3233         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::transactionId):
3234         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::PendingOpenWithVersionCall):
3235         (IDBDatabaseBackendImpl::PendingOpenWithVersionCall):
3236         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
3237         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
3238         (WebCore::IDBDatabaseBackendImpl::createTransaction):
3239         (WebCore::IDBDatabaseBackendImpl::openConnection):
3240         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
3241         (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
3242         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3243         (IDBDatabaseBackendImpl):
3244         * Modules/indexeddb/IDBFactory.cpp:
3245         (WebCore::IDBFactory::openInternal):
3246         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
3247         (WebCore::IDBFactoryBackendImpl::open):
3248
3249 2012-12-07  Dima Gorbik  <dgorbik@apple.com>
3250
3251         Implement general ::cue pseudo element for the <video>
3252         https://bugs.webkit.org/show_bug.cgi?id=104043
3253
3254         Reviewed by Eric Carlson.
3255
3256         Implemented the ::cue pseudo element to be able to style all WebVTT cues.
3257         Added the subcontainer with a '::cue' pseudoId in between the TextTrackContainerElement and WebVTT nodes to separate
3258         user agent default styles from user defined styles for the cue elements.
3259
3260         Test: media/track/track-css-all-cues.html
3261
3262         * css/CSSSelector.cpp: ::cue pseudo selector doesn't have a valid prefix but should be allowed in the user-agent stylesheet.
3263         (WebCore::CSSSelector::parsePseudoType):
3264         * html/shadow/MediaControlElements.cpp:
3265         (WebCore):
3266         (WebCore::MediaControlTextTrackContainerElement::createSubtrees): create a subcontainer and set its pseudoId to '::cue'.
3267         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): append WebVTT nodes to the newly created subcontainer.
3268         * html/shadow/MediaControlElements.h:
3269         (MediaControlTextTrackContainerElement):
3270         * html/shadow/MediaControls.cpp:
3271         (WebCore::MediaControls::createTextTrackDisplay): initiate creating subtrees for the MediaControlTextTrackContainerElement.
3272         * html/shadow/MediaControlsChromium.cpp:
3273         (WebCore::MediaControlsChromium::createTextTrackDisplay):
3274
3275 2012-12-06  Geoffrey Garen  <ggaren@apple.com>
3276
3277         Crash in JSC::Bindings::RootObject::globalObject() sync'ing notes in Evernote
3278         https://bugs.webkit.org/show_bug.cgi?id=104321
3279         <rdar://problem/12770497>
3280
3281         Reviewed by Sam Weinig.
3282
3283         Missed a null check.
3284
3285         * bindings/objc/WebScriptObject.mm:
3286         (-[WebScriptObject JSObject]): If our root object has been cleared, don't
3287         try to dereference it. This happens in Evernote during tear-down.
3288
3289         This matches the behavior of other methods in the same class.
3290
3291         (_isSafeScript returns false if the root object has been cleared.)
3292
3293         If we believe _isSafeScript is a good idea, it's probably the right test
3294         to use here (as opposed to just null-checking _rootObject) because this API
3295         gives the client unlimited access to the underlying JavaScript object.
3296
3297 2012-12-07  Stephen Chenney  <schenney@chromium.org>
3298
3299         XMLSerializer is too aggressive in adding prefixes
3300         https://bugs.webkit.org/show_bug.cgi?id=104387
3301
3302         Reviewed by Ryosuke Niwa.
3303
3304         We have been adding "xlink:" and "xmlns:" and "xml:" prefixes to any
3305         attribute that is in one of those namespaces but which did not already
3306         have the matching prefix. This appears to be in error, at least
3307         compared to other browsers.
3308
3309         The correct behavior appears to be to add the prefix only if there is
3310         no existing prefix. If there is an existing prefix, we now leave it alone.
3311
3312         No new tests. Existing test expanded.
3313
3314         * editing/MarkupAccumulator.cpp:
3315         (WebCore::MarkupAccumulator::appendAttribute): Only replace the prefix
3316         attribute name prefix if it is empty, and in one of the recognised
3317         namespaces.
3318
3319 2012-12-07  Jon Lee  <jonlee@apple.com>
3320
3321         Display the auto-start label image after a delay
3322         https://bugs.webkit.org/show_bug.cgi?id=104173
3323         <rdar://problem/12820071>
3324
3325         Reviewed by Dan Bernstein.
3326
3327         Treat the button now as a label. Once the user has hovered over the plug-in, wait a little while before showing the label.
3328
3329         * rendering/RenderSnapshottedPlugIn.h:
3330         (RenderSnapshottedPlugIn): Add a one-shot timer, and a variable representing whether the label should
3331         be drawn. Remove the variable that determines whether the label is active.
3332
3333         * rendering/RenderSnapshottedPlugIn.cpp:
3334         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): Set the time to a delay of 1 second.
3335         (WebCore::RenderSnapshottedPlugIn::paintReplaced): Paint the label only when we should.
3336         (WebCore::RenderSnapshottedPlugIn::paintLabel): The label should only paint in its hovered state.
3337         (WebCore::startLabelImage): Renamed.
3338         (WebCore::RenderSnapshottedPlugIn::repaintLabel): Renamed.
3339         (WebCore::RenderSnapshottedPlugIn::hoverDelayTimerFired): Now that the timer has fired, we should paint
3340         the label. Repaint.
3341         (WebCore::RenderSnapshottedPlugIn::handleEvent): Update event handling. Click event handler is the
3342         same, except we move the label check inside so that if the click is not the left label we don't
3343         fall through to the other irrevelant if clauses.
3344             For the mouse down handler, make sure to check for the left label. If the hover timer is still running,
3345         stop it, so that we don't draw a label while the user is in the middle of a mouse gesture.
3346             Redo mouse over and out. On mouse over we start the delay timer. On mouse out we stop the delay timer
3347         if it is still running, reset state, and paint the label out.
3348         (WebCore::RenderSnapshottedPlugIn::layout): Refactor.
3349
3350         * Resources/startButtonPressed.png: Removed.
3351         * Resources/startButtonPressed@2x.png: Removed.
3352         * WebCore.xcodeproj/project.pbxproj:
3353
3354 2012-12-07  Scott Violet  <sky@chromium.org>
3355
3356         [chromium] Remove linux theme related files and switch to default
3357         https://bugs.webkit.org/show_bug.cgi?id=103897
3358
3359         Reviewed by Dimitri Glazkov.
3360
3361         Linux related theme files are now named Default.
3362
3363         No new tests, code cleanup.
3364
3365         * WebCore.gyp/WebCore.gyp: Update files
3366         * WebCore.gypi: Update files
3367         * platform/chromium/PlatformThemeChromiumLinux.cpp: Removed.
3368         * platform/chromium/PlatformThemeChromiumLinux.h: Removed.
3369         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Removed.
3370         * platform/chromium/ScrollbarThemeChromiumLinux.h: Removed.
3371         * rendering/RenderThemeChromiumAndroid.cpp:
3372         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet): Linux->Default
3373         * rendering/RenderThemeChromiumAndroid.h: Change superclass
3374         * rendering/RenderThemeChromiumLinux.cpp: Removed.
3375         * rendering/RenderThemeChromiumLinux.h: Removed.
3376
3377 2012-12-07  Eric Carlson  <eric.carlson@apple.com>
3378
3379         Captions menu doesn't update to track changes
3380         https://bugs.webkit.org/show_bug.cgi?id=104393
3381
3382         Reviewed by Dean Jackson.
3383
3384         Flag the captions menu as needing an update when tracks are added or removed. Don't actually
3385         change the menu until it needs to be displayed.
3386
3387         No new tests, media/video-controls-captions-trackmenu.html was updated to test this.
3388
3389         * html/HTMLMediaElement.cpp:
3390         (WebCore::HTMLMediaElement::addTextTrack): Call closedCaptionTracksChanged().
3391         (WebCore::HTMLMediaElement::didRemoveTrack): Ditto.
3392         (WebCore::HTMLMediaElement::configureTextTracks): Ditto.
3393
3394         * html/shadow/MediaControlElements.cpp:
3395         (WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement):
3396             Intialize m_trackListHasChanged.
3397         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Call rebuildTrackListMenu if
3398             the track list has changed.
3399         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Renamed from resetTrackListMenu.
3400         * html/shadow/MediaControlElements.h:
3401         (WebCore::MediaControlClosedCaptionsTrackListElement::resetTrackListMenu): Just set m_trackListHasChanged.
3402
3403         * html/shadow/MediaControls.h:
3404         (WebCore::MediaControls::closedCaptionTracksChanged): New, do nothing for base class.
3405
3406         * html/shadow/MediaControlsApple.cpp:
3407         (WebCore::MediaControlsApple::toggleClosedCaptionTrackList): Update the track list before 
3408             showing it.
3409         (WebCore::MediaControlsApple::closedCaptionTracksChanged):
3410         * html/shadow/MediaControlsApple.h:
3411
3412 2012-12-07  Stephen White  <senorblanco@chromium.org>
3413
3414         CSS url() filters with forward references don't work
3415         https://bugs.webkit.org/show_bug.cgi?id=90405
3416
3417         Based on a patch by Keyar Hood.
3418
3419         Reviewed by Dirk Schulze.
3420
3421         In order for CSS to reference SVG filters that will occur later in
3422         the document, or will be added at a future time, we need a way to
3423         notify the target element (the one the filter style is applied to)
3424         when the correct SVG filter is added to the DOM.
3425         There is already code for SVG elements that handles this problem, in
3426         SVGResourcesCache. This patch allows any element to have a reference to
3427         an SVG element in SVGResourceCache.
3428
3429         Tests: css3/filters/effect-reference-after.html
3430                css3/filters/effect-reference-delete-crash.html
3431                css3/filters/effect-reference-delete.html
3432                css3/filters/effect-reference-rename.html
3433                css3/filters/effect-reference-reset-style-delete-crash.html
3434                svg/filters/filter-cycle.html
3435
3436         * dom/Element.cpp:
3437         (WebCore::Element::hasPendingResources): Added
3438         (WebCore::Element::setHasPendingResources): Added
3439         (WebCore::Element::clearHasPendingResources): Added
3440         * dom/Element.h:
3441         Accessors for ElementRareData's new bit flag.
3442         (WebCore::Element::buildPendingResource):
3443         Virtual function to override for referenced elements (moved from SVGElement).
3444         * dom/ElementRareData.h:
3445         (WebCore::ElementRareData::ElementRareData):
3446         Add a new bit flag to indicate whether the element depends on pending resources or not.
3447         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
3448         (WebCore::BitmapTextureImageBuffer::applyFilters):
3449         Changed to the new function signature for FilterEffectRenderer::build().
3450         * rendering/FilterEffectRenderer.cpp:
3451         (WebCore::FilterEffectRenderer::buildReferenceFilter):
3452         Changed signature to accept a RenderObject rather than a Document, so we know which node to notify when the SVG filter arrives.  If the referenced filter cannot be found, add its id as a pending reference.
3453         (WebCore::FilterEffectRenderer::build):
3454         Changed signature to accept a RenderObject rather than a Document, so we know which node to notify when the SVG filter arrives.
3455         * rendering/FilterEffectRenderer.h:
3456         Change to signatures of build() and buildReferenceFilter() to pass
3457         a RenderObject instead of a Document.
3458         * rendering/RenderLayer.cpp:
3459         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):
3460         Use the new semantics for FilterEffectRenderer::build().
3461         * rendering/RenderObject.cpp:
3462         (WebCore::RenderObject::willBeDestroyed):
3463         Notify the cache if a RenderObject is destroyed.
3464         * rendering/svg/RenderSVGResourceContainer.cpp:
3465         (WebCore::RenderSVGResourceContainer::registerResource):
3466         Call clearHasPendingResourceIfPossible on the SVGDocumentExtensions, not
3467         on the element, since we want to support generic Elements.
3468         * rendering/svg/SVGResources.cpp:
3469         (WebCore::SVGResources::buildCachedResources):
3470         Add support for building filters on non-SVG elements.
3471         * rendering/svg/SVGResourcesCache.cpp:
3472         (WebCore::SVGResourcesCache::addResourcesFromRenderObject):
3473         Do cycle detection only on SVG elements.
3474         (WebCore::SVGResourcesCache::clientStyleChanged):
3475         For non-SVG elements, set a synthetic style change when parent resources
3476         are invalidated.
3477         (WebCore::SVGResourcesCache::resourceDestroyed):
3478         Add support for non-SVG Elements.
3479         * svg/SVGDocumentExtensions.cpp:
3480         (WebCore::SVGDocumentExtensions::addPendingResource):
3481         (WebCore::SVGDocumentExtensions::isElementPendingResources):
3482         (WebCore::SVGDocumentExtensions::isElementPendingResource):
3483         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
3484         (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
3485         Changed to allow use of Element instead of SVGElement.
3486         (WebCore::SVGDocumentExtensions::clearHasPendingResourcesIfPossible):
3487         Moved from SVGElement, and made to work on any Element.  This way,
3488         we avoid adding this function to Element itself.
3489         * svg/SVGDocumentExtensions.h:
3490         SVGElement -> Element.
3491         * svg/SVGElement.cpp:
3492         * svg/SVGElement.h:
3493         All functions moved to Element, except for clearHasPendingResourcesIfPossible() moved to SVGDocumentExtensions.
3494         * svg/SVGElementRareData.h:
3495         (WebCore::SVGElementRareData::SVGElementRareData):
3496         m_hasPendingResources add accessors moved to ElementRareData.
3497         * svg/SVGStyledElement.cpp:
3498         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
3499         SVGElement -> Element, and call SVGDocumentExtensions for
3500         clearHasPendingResourcesIfPossible().
3501
3502 2012-12-07  Eberhard Graether  <egraether@google.com>
3503
3504         Web Inspector: Add shortcut to set visibility:hidden on elements in the ElementsPanel
3505         https://bugs.webkit.org/show_bug.cgi?id=104146
3506
3507         Reviewed by Pavel Feldman.
3508
3509         This change adds the shortcut H to set and unset visibility:hidden on the inline style
3510         of elements in the Elementspanel. This feature makes it easier to look for elements that
3511         cause bad rendering performance, because visibility:hidden does not paint the element,
3512         but preserves the layout.
3513
3514         No new tests.
3515
3516         * English.lproj/localizedStrings.js:
3517         * inspector/front-end/CSSStyleModel.js:
3518         (WebInspector.CSSStyleModel.prototype.toggleInlineVisibility):
3519         * inspector/front-end/ElementsPanelDescriptor.js:
3520         (WebInspector.ElementsPanelDescriptor.prototype.registerShortcuts):
3521         * inspector/front-end/ElementsTreeOutline.js:
3522         (WebInspector.ElementsTreeOutline.prototype.handleShortcut):
3523         * inspector/front-end/KeyboardShortcut.js:
3524
3525 2012-12-07  Andreas Kling  <akling@apple.com>
3526
3527         Improve our decoded data size estimation for style sheets.
3528         <http://webkit.org/b/104388>
3529
3530         Reviewed by Antti Koivisto.
3531
3532         Tweak how we estimate the total decoded size of a given style sheet. (We were guessing at about 30% of actual size.)
3533         This is just used as a hint to the WebCore cache.
3534
3535         * css/StylePropertySet.cpp:
3536         (WebCore::StylePropertySet::averageSizeInBytes):
3537         * css/StyleRule.cpp:
3538         (WebCore::StyleRule::averageSizeInBytes):
3539
3540 2012-12-07  Robert Hogan  <robert@webkit.org>
3541
3542         REGRESSION(r127163): Content is offset to the right at rea.ru
3543         https://bugs.webkit.org/show_bug.cgi?id=103116
3544
3545         Reviewed by David Hyatt.
3546
3547         The top margin edge of a self-collapsing block that clears a float intrudes up into it by the height of the margin,
3548         so to ensure any child floats of the self-collapsing block only go as far as the top content edge 
3549         add the margin back in to the block's current height before placing them.
3550
3551         Tests: fast/block/margin-collapse/self-collapsing-block-with-float-child-collapsed-margins.html
3552                fast/block/margin-collapse/self-collapsing-block-with-float-child.html
3553
3554         * rendering/RenderBlockLineLayout.cpp:
3555         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
3556
3557 2012-12-07  Alexis Menard  <alexis@webkit.org>
3558
3559         Improve r136754 by hardening checks of expected values for background-position.
3560         https://bugs.webkit.org/show_bug.cgi?id=104380
3561
3562         Reviewed by Antti Koivisto.
3563
3564         r136754 was landed to fix the problem of checking successively two calc
3565         values with validUnit. It was asserting as validUnit expect you to use
3566         the parsed value of the calc after the call. In this case we pre-check the
3567         background-position longhand to count how many values it has to then
3568         call the right parsing functions accordingly. While r136754 is not
3569         wrong it is better to harden isPotentialPositionValue with the real
3570         expected units and keywords. For this matter we can reuse the
3571         ReleaseParsedCalcValueCondition enum which was created with the same
3572         idea as this patch. If you are not interested of the calc parsed
3573         value when calling validUnit() you can now specify it, I believe it is
3574         good to have it explicit to avoid mistake in the future.
3575
3576         No new tests : this is covered by css3/*, fast/backgrounds/*.
3577
3578         * css/CSSParser.cpp:
3579         (WebCore::CSSParser::validCalculationUnit):
3580         (WebCore::CSSParser::validUnit):
3581         (WebCore::CSSParser::isPotentialPositionValue):
3582         * css/CSSParser.h:
3583         (WebCore::CSSParser::validUnit):
3584         (CSSParser):
3585
3586 2012-12-07  Brent Fulgham  <bfulgham@webkit.org>
3587
3588         Remove unnecessary casts in transformations.
3589         https://bugs.webkit.org/show_bug.cgi?id=104376
3590
3591         Reviewed by Simon Fraser.
3592
3593         Several casts from float-to-double are performed prior to
3594         storing the result in a double type. These casts are unnecessary
3595         overhead and reduce the clarity of the source code.
3596
3597         No new tests. Covered by existing CSS test cases.
3598
3599         * platform/graphics/transforms/RotateTransformOperation.cpp:
3600         * platform/graphics/transforms/TransformationMatrix.cpp:
3601
3602 2012-12-07  Antoine Quint  <graouts@apple.com>
3603
3604         Provide the backend for exposing the layer tree to the Web Inspector
3605         https://bugs.webkit.org/show_bug.cgi?id=103513
3606
3607         Reviewed by Pavel Feldman.
3608
3609         The purpose of this patch is to provide a new agent enabling the Web Inspector to interface
3610         with WebCore to access information about the render layer tree and, more specifically, expose
3611         useful information about layers backed by textures composited on the GPU such as metrics and
3612         backing store. Thus we now provide a LayerTreeAgent which will inform the front-end of 
3613         changes to the render layer tree via a new layerTreeDidChange event, providing an object
3614         containing the entire hierarchy of RenderLayers for the inspected document. This hierarchy 
3615         can be queried at any time using the .getLayerTree() method on the LayerTreeAgent. Finally, 
3616         the LayerTreeAgent also exposes a .nodeIdForLayerId() method allowing to get the id of the 
3617         node associated with the RenderLayer with the provided layer id.
3618         
3619         In terms of implementation, RenderLayerCompositor has been changed such that in its 
3620         updateCompositingLayers() method we call the layerTreeDidChange method on the 
3621         InspectorLayerTreeAgent instance via the InspectorInstrumentation.
3622
3623         Test: inspector-protocol/layer-tree.html
3624
3625         * CMakeLists.txt:
3626         * GNUmakefile.list.am:
3627         * Target.pri:
3628         * WebCore.gypi:
3629         * WebCore.vcproj/WebCore.vcproj:
3630         * WebCore.xcodeproj/project.pbxproj:
3631         * inspector/Inspector.json: Define new types IntRect (x, y, width, height) and Layer, which 
3632         holds the information for a RenderLayer (layerId, bounds, isComposited, memory, 
3633         compositedBounds) and its children (childLayers). We also define the methods of the 
3634         LayerTreeAgent object (enable, disable, getLayerTree, nodeIdForLayerId) and the 
3635         layerTreeDidChange event it  
3636         fires.
3637         * inspector/InspectorAllInOne.cpp:
3638         * inspector/InspectorController.cpp:
3639         (WebCore::InspectorController::InspectorController):
3640         * inspector/InspectorDOMAgent.cpp:
3641         (WebCore::InspectorDOMAgent::pushNodePathForRenderLayerToFrontend): New method facilitating 
3642         pushing the node associated with a given RenderLayer to the front-end.
3643         (WebCore):
3644         * inspector/InspectorDOMAgent.h:
3645         (InspectorDOMAgent):
3646         * inspector/InspectorInstrumentation.cpp:
3647         (WebCore):
3648         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3649         (WebCore::InspectorInstrumentation::layerTreeDidChangeImpl):
3650         (WebCore::InspectorInstrumentation::renderLayerDestroyedImpl):
3651         * inspector/InspectorInstrumentation.h:
3652         (WebCore):
3653         (InspectorInstrumentation):
3654         (WebCore::InspectorInstrumentation::layerTreeDidChange):
3655         (WebCore::InspectorInstrumentation::renderLayerDestroyed):
3656         * inspector/InspectorLayerTreeAgent.cpp: Added.
3657         (WebCore):
3658         (LayerTreeAgentState):
3659         (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
3660         (WebCore::InspectorLayerTreeAgent::~InspectorLayerTreeAgent):
3661         (WebCore::InspectorLayerTreeAgent::setFrontend):
3662         (WebCore::InspectorLayerTreeAgent::clearFrontend):
3663         (WebCore::InspectorLayerTreeAgent::restore):
3664         (WebCore::InspectorLayerTreeAgent::reset):
3665         (WebCore::InspectorLayerTreeAgent::enable):
3666         (WebCore::InspectorLayerTreeAgent::disable):
3667         (WebCore::InspectorLayerTreeAgent::layerTreeDidChange):
3668         (WebCore::InspectorLayerTreeAgent::renderLayerDestroyed):
3669         (WebCore::InspectorLayerTreeAgent::getLayerTree):
3670         (WebCore::InspectorLayerTreeAgent::buildObjectForRootLayer):
3671         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer): Build the entire hierarchy of 
3672         RenderLayers from the provided RenderLayer.
3673         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
3674         (WebCore::InspectorLayerTreeAgent::bind):
3675         (WebCore::InspectorLayerTreeAgent::unbind):
3676         (WebCore::InspectorLayerTreeAgent::nodeIdForLayerId):
3677         * inspector/InspectorLayerTreeAgent.h: Added.
3678         (WebCore):
3679         (InspectorLayerTreeAgent):
3680         (WebCore::InspectorLayerTreeAgent::create):
3681         * inspector/InstrumentingAgents.h:
3682         (WebCore):
3683         (WebCore::InstrumentingAgents::InstrumentingAgents):
3684         (InstrumentingAgents):
3685         (WebCore::InstrumentingAgents::inspectorLayerTreeAgent):
3686         (WebCore::InstrumentingAgents::setInspectorLayerTreeAgent):
3687         * rendering/RenderLayerCompositor.cpp:
3688         (WebCore::RenderLayerCompositor::updateCompositingLayers): Call the layerTreeDidChange method 
3689         on the LayerTreeAgent via the InspectorInstrumentation to inform the front-end that the 
3690         RenderLayer hierarchy has changed.
3691         (WebCore):
3692         (WebCore::RenderLayerCompositor::layerBecameNonComposited): Call the renderLayerDestroyed 
3693         method on the LayerTreeAgent via the InspectorInstrumentation to unbind the layer that is 
3694         being destroyed.
3695         * rendering/RenderLayerCompositor.h:
3696         (RenderLayerCompositor):
3697
3698 2012-12-07  Joshua Bell  <jsbell@chromium.org>
3699
3700         IndexedDB: Check SSV version when opening database
3701         https://bugs.webkit.org/show_bug.cgi?id=102243
3702
3703         Reviewed by Tony Chang.
3704
3705         Ensure that the data format (SerializedScriptValue) isn't "from the future" when opening
3706         a backing store. Treat an unknown version the same as an unknown schema version.
3707
3708         Chromium-side test at https://codereview.chromium.org/11470013/ (same as other schema version tests)
3709
3710         * Modules/indexeddb/IDBBackingStore.cpp:
3711         (WebCore):
3712         (WebCore::isSchemaKnown): Check data version as well.
3713         (WebCore::setUpMetadata): Ensure data version is recorded; bump schema version.
3714         * Modules/indexeddb/IDBLevelDBCoding.cpp: Encoding for "DataVersion" global metadata entry.
3715         (IDBLevelDBCoding):
3716         (WebCore::IDBLevelDBCoding::compare):
3717         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
3718         * Modules/indexeddb/IDBLevelDBCoding.h:
3719         (DataVersionKey):
3720         (IDBLevelDBCoding):
3721         * bindings/js/SerializedScriptValue.cpp:
3722         (SerializedScriptValue::wireFormatVersion): New method (JSC side).
3723         * bindings/js/SerializedScriptValue.h:
3724         * bindings/v8/SerializedScriptValue.cpp:
3725         (WebCore::SerializedScriptValue::wireFormatVersion): New method (V8 side).
3726         (WebCore):
3727         * bindings/v8/SerializedScriptValue.h:
3728         (SerializedScriptValue):
3729
3730 2012-12-07  Andreas Kling  <akling@apple.com>
3731
3732         Throw away StyleResolvers that haven't been used for a long time.
3733         <http://webkit.org/b/104314>
3734
3735         Reviewed by Antti Koivisto.
3736
3737         A lot of memory gets tied up in StyleResolver and the structures and caches that hang from it.
3738         Add a mechanism to throw it away after it's been unused for a while (1 minute.)
3739         This frees up large amounts of memory on inactive pages (background tabs) and static content.
3740
3741         We already have a number of scenarios where the document style is invalidated by throwing away
3742         the StyleResolver so the major code paths are prepared for having a null StyleResolver* on occasion.
3743
3744         ~20MB progression on Membuster3.
3745
3746         * css/StyleResolver.cpp:
3747         (WebCore::StyleResolver::styleForElement):
3748         (WebCore::StyleResolver::styleForKeyframe):
3749         (WebCore::StyleResolver::pseudoStyleForElement):
3750         (WebCore::StyleResolver::styleForPage):
3751
3752             Call document()->didAccessStyleResolver() from the relevant parts of StyleResolver's public API.
3753             This prevents Document from throwing the StyleResolver away for 1 minute after it's used.
3754
3755         * dom/Document.h:
3756         * dom/Document.cpp:
3757         (WebCore::Document::Document):
3758         (WebCore::Document::createStyleResolver):
3759         (WebCore::Document::didAccessStyleResolver):
3760         (WebCore::Document::styleResolverThrowawayTimerFired):
3761
3762             Add a mechanism to call clearStyleResolver() on a refreshing timer.
3763
3764         * dom/Element.cpp:
3765         (WebCore::Element::attributeChanged):
3766
3767             If an attribute change occurs while the document doesn't have a StyleResolver, dirty the element style
3768             since we can't be sure that the attribute change didn't affect any rules.
3769
3770 2012-12-07  Antonio Gomes  <a1.gomes@sisa.samsung.com>
3771
3772         REGRESSION(r136947): Made two tests fail on all platforms (Requested by tonikitoo-ll on #webkit).
3773         https://bugs.webkit.org/show_bug.cgi?id=104368
3774
3775         Unreviewed partial rollout.
3776
3777         r136947 was too aggressive in the sense of fixing RenderBox::canBeScrolledAndHasScrollableArea
3778         as part of itself. Revert the related changes in order to fix both
3779         fast/events/autoscroll-should-not-stop-on-keypress.html and
3780         fast/events/autoscroll-in-textfield.html
3781
3782         * rendering/RenderBox.cpp:
3783         (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
3784         * rendering/RenderBox.h:
3785
3786 2012-12-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3787
3788         [TexMap] Can not do multiple accelerated animations
3789         https://bugs.webkit.org/show_bug.cgi?id=104364
3790
3791         Reviewed by Kenneth Rohde Christiansen.
3792
3793         By removing all animations with the same name, it is not possible to animate more than one property accelerated. 
3794         Instead only remove any animations with both same name and property.
3795
3796         Covered by animations/opacity-transform-animation.html.
3797
3798         * platform/graphics/GraphicsLayerAnimation.cpp:
3799         (WebCore::GraphicsLayerAnimations::add):
3800         (WebCore::GraphicsLayerAnimations::remove):
3801         * platform/graphics/GraphicsLayerAnimation.h:
3802         (GraphicsLayerAnimations):
3803
3804 2012-12-07  Sujin Park  <sujjin.park@gmail.com>
3805
3806         [EFL] Fix build warning in StyleResolver.cpp using gcc 4.7.2
3807         https://bugs.webkit.org/show_bug.cgi?id=104262
3808
3809         Reviewed by Alexis Menard.
3810
3811         EFL port treats build warning as compile error and there are
3812         maybe-uninitialized when building with gcc 4.7.2.
3813         This patch adds default case to resolve a build break.
3814
3815         * css/StyleResolver.cpp:
3816         (WebCore::getFontAndGlyphOrientation):
3817
3818 2012-12-06  Alexander Pavlov  <apavlov@chromium.org>
3819
3820         Web Inspector: [Chromium] Ctrl + ']' "Goto right panel" keyboard shortcut doesn't work
3821         https://bugs.webkit.org/show_bug.cgi?id=104250
3822
3823         Reviewed by Pavel Feldman.
3824
3825         Ignore "keypress" event resulting from a WM_CHAR message emitted by Win7 upon Ctrl + ']' keypress.
3826
3827         * inspector/front-end/InspectorView.js:
3828         (WebInspector.InspectorView.prototype._keyPress): Ignore all events with charCode < 32.
3829
3830 2012-10-03  Pavel Feldman  <pfeldman@chromium.org>
3831
3832         Web Inspector: provide a way to reload page with given script preprocessor.
3833         https://bugs.webkit.org/show_bug.cgi?id=80992
3834
3835         Reviewed by Yury Semikhatsky.
3836
3837         This change introduces a way to inject 'preprocessor' script that would process
3838         each JavaScript file before it gets into the VM for compilation. That way inspector
3839         can expose capabilities such as assessing code coverage or tracing all the calls.
3840
3841         Preprocessor script is stored in the page agent where it waits for reload to happen.
3842         Upon reload, ScriptDebugServer is using it to patch the script sources.
3843
3844         
3845         Test: inspector/debugger/debugger-script-preprocessor.html
3846
3847         * bindings/js/ScriptDebugServer.h:
3848         (WebCore::ScriptDebugServer::setScriptPreprocessor):
3849         (ScriptDebugServer):
3850         * bindings/v8/DebuggerScript.js:
3851         * bindings/v8/ScriptDebugServer.cpp:
3852         (ScriptDebugServer::ScriptPreprocessor):
3853         (WebCore::ScriptDebugServer::ScriptPreprocessor::ScriptPreprocessor):
3854         (WebCore::ScriptDebugServer::ScriptPreprocessor::preprocessSourceCode):
3855         (WebCore::ScriptDebugServer::ScriptPreprocessor::~ScriptPreprocessor):
3856         (WebCore):
3857         (WebCore::ScriptDebugServer::~ScriptDebugServer):
3858         (WebCore::ScriptDebugServer::setScriptSource):
3859         (WebCore::ScriptDebugServer::setScriptPreprocessor):
3860         (WebCore::ScriptDebugServer::handleV8DebugEvent):
3861         * bindings/v8/ScriptDebugServer.h:
3862         (ScriptDebugServer):
3863         * bindings/v8/custom/V8InjectedScriptManager.cpp:
3864         (WebCore::InjectedScriptManager::createInjectedScript):
3865         * inspector/Inspector.json:
3866         * inspector/InspectorController.cpp:
3867         (WebCore::InspectorController::InspectorController):
3868         * inspector/InspectorDebuggerAgent.h:
3869         (InspectorDebuggerAgent):
3870         * inspector/InspectorPageAgent.cpp:
3871         (WebCore::InspectorPageAgent::reload):
3872         (WebCore::InspectorPageAgent::frameNavigated):
3873         * inspector/InspectorPageAgent.h:
3874         (WebCore::InspectorPageAgent::page):
3875         (WebCore::InspectorPageAgent::scriptPreprocessor):
3876         (InspectorPageAgent):
3877         * inspector/PageDebuggerAgent.cpp:
3878         (WebCore::PageDebuggerAgent::create):
3879         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
3880         (WebCore::PageDebuggerAgent::startListeningScriptDebugServer):
3881         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
3882         (WebCore::PageDebuggerAgent::injectedScriptForEval):
3883         (WebCore::PageDebuggerAgent::didClearMainFrameWindowObject):
3884         (WebCore):
3885         * inspector/PageDebuggerAgent.h:
3886         (WebCore):
3887         (PageDebuggerAgent):
3888
3889 2012-12-07  Alexander Pavlov  <apavlov@chromium.org>
3890
3891         Web Inspector: the "Sources" column is always empty in CSS selector profiles
3892         https://bugs.webkit.org/show_bug.cgi?id=104225
3893
3894         Reviewed by Pavel Feldman.
3895
3896         r112923 and preceding changesets modified the CSSOM wrapper creation for StyleRules in a way
3897         that would not specify the parent CSSStyleSheet for the CSSStyleRules created. Instead,
3898         styleResolver->ensureFullCSSOMWrapperForInspector(rule) is now used to make sure the CSSStyleRule
3899         has a valid parent CSSStyleSheet.
3900
3901         Test: inspector/profiler/selector-profiler-url.html
3902
3903         * css/StyleResolver.cpp:
3904         (WebCore::StyleResolver::collectMatchingRulesForList):
3905         (WebCore::StyleResolver::applyProperties):
3906         * inspector/InspectorInstrumentation.cpp:
3907         (WebCore):
3908         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
3909         (WebCore::InspectorInstrumentation::willProcessRuleImpl):
3910         * inspector/InspectorInstrumentation.h:
3911         (WebCore):
3912         (InspectorInstrumentation):
3913         (WebCore::InspectorInstrumentation::willMatchRule):
3914         (WebCore::InspectorInstrumentation::willProcessRule):
3915
3916 2012-12-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>
3917
3918         Rework bug 97927 to not depend on RenderLayer::allowsScrolling
3919         https://bugs.webkit.org/show_bug.cgi?id=103999
3920
3921         Reviewed by James Robinson.
3922
3923         Patch makes it possible for methods like
3924         RenderLayer::{updateScrollbarsAfterLayout,updateScrollbarsAfterStyleChange}
3925         to not depend on RenderLayer::allowsScrolling to determine if a layer should
3926         be added or removed from its FrameView's ScrollableArea set.
3927
3928         Following the same logic, the patch also fixes RenderBox::canBeScrolledAndHasScrollableArea
3929         method to take into account the box' scroll allowance in a given direction only
3930         when it overflows. This allows simplifying custom methods like InRegionScrollerPrivate::canScrollRenderBox
3931         (@WebKit/blackberry/Api/InRegionScroller.cpp).
3932
3933         The naming pattern for the newly added methods were chosen to keep the consistency
3934         with the existing ones, in the same class.
3935
3936         No new test: it is already covered by ScrollingCoordinatorChromiumTest.clippedBodyTest.
3937
3938         * rendering/RenderBox.cpp:
3939         (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
3940         * rendering/RenderBox.h:
3941         (RenderBox):
3942         (WebCore::RenderBox::hasScrollableOverflowX):
3943         (WebCore::RenderBox::hasScrollableOverflowY):
3944         * rendering/RenderLayer.cpp:
3945         (WebCore::RenderLayer::hasScrollableHorizontalOverflow):
3946         (WebCore):
3947         (WebCore::RenderLayer::hasScrollableVerticalOverflow):
3948         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
3949         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
3950         * rendering/RenderLayer.h:
3951         (RenderLayer):
3952
3953 2012-12-07  Max Feil  <mfeil@rim.com>
3954
3955         [BlackBerry] make "isVideo" information available to platform media player
3956         https://bugs.webkit.org/show_bug.cgi?id=104334
3957
3958         Reviewed by Rob Buis.
3959
3960         The platform player needs to know whether the element is <video>
3961         or <audio>, so it can make certain decisions before metadata
3962         is ready. This is part of a performance optimization refactor
3963         which does not change functionality so no new tests are required.
3964
3965         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
3966         (WebCore::MediaPlayerPrivate::load):
3967
3968 2012-12-07  Kondapally Kalyan  <kalyan.kondapally@intel.com>
3969
3970         [EFL] [AC] Implement ImageExtractor::extractImage in GraphicsContext3DEfl.
3971         https://bugs.webkit.org/show_bug.cgi?id=104271.
3972
3973         Reviewed by Kenneth Rohde Christiansen.
3974
3975         This patch implements ImageExtractor::extractImage in GraphicsContext3DEfl.
3976
3977         Covered by existing tests.
3978
3979         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
3980         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
3981         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3982
3983 2012-12-06  Carlos Garcia Campos  <cgarcia@igalia.com>
3984
3985         Use always the order iterator from data member in RenderFlexibleBox
3986         https://bugs.webkit.org/show_bug.cgi?id=104112
3987
3988         Reviewed by Tony Chang.
3989
3990         Some methods receive it as parameter and others use the data
3991         member.
3992
3993         * rendering/RenderFlexibleBox.cpp:
3994         (WebCore::RenderFlexibleBox::layoutBlock):
3995         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
3996         (WebCore::RenderFlexibleBox::layoutFlexItems):
3997         (WebCore::RenderFlexibleBox::computeNextFlexLine):
3998         (WebCore::RenderFlexibleBox::alignFlexLines):
3999         (WebCore::RenderFlexibleBox::alignChildren):
4000         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
4001         (WebCore::RenderFlexibleBox::flipForWrapReverse):
4002         * rendering/RenderFlexibleBox.h:
4003
4004 2012-12-07  Kent Tamura  <tkent@chromium.org>
4005
4006         Improve confusing code in BaseMultipleFieldsDateAndTimeInputType
4007         https://bugs.webkit.org/show_bug.cgi?id=104353
4008
4009         Reviewed by Kentaro Hara.
4010
4011         This doesn't change any behavior because call sites of
4012         isEditControlOwnerDisabled and isEditControlOwnerReadOnly treat them
4013         similarly.
4014
4015         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
4016         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerDisabled):
4017         Checks element()->disabled, not readOnly.
4018         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerReadOnly):
4019         Checks element()->readOnly, not disabled.
4020
4021 2012-12-07  Jon Lee  <jonlee@apple.com>
4022
4023         Build fix.
4024
4025         * plugins/PlugInOriginHash.cpp:
4026         (WebCore::PlugInOriginHash::hash):
4027
4028 2012-12-04  Jon Lee  <jonlee@apple.com>
4029
4030         Add PlugInOriginHash
4031         https://bugs.webkit.org/show_bug.cgi?id=103655
4032         <rdar://problem/12778949>
4033
4034         Reviewed by Alexey Proskuryakov.
4035
4036         Add the concept of plug-in origin hashes, which are based on a combination of the base domains of the
4037         page's main frame and the plug-in, and the plug-in MIME type.
4038
4039         * plugins/PlugInOriginHash.cpp: Added.
4040         (WebCore::addCaseFoldedCharacters): Add the case-folded string to the hash.
4041         (WebCore::PlugInOriginHash::hash): The hash is based on the concatenation of the page's host, the plug-in
4042         URL's host, and the MIME type. We use StringHasher to get all 32-bits of the hash, since using StringImpl's hash
4043         masks out 8 of the hash bits to make room for bit flags.
4044         * plugins/PlugInOriginHash.h: Added.
4045
4046         * CMakeLists.txt:
4047         * GNUmakefile.list.am:
4048         * Target.pri:
4049         * WebCore.gypi:
4050         * WebCore.vcproj/WebCore.vcproj:
4051         * WebCore.xcodeproj/project.pbxproj:
4052
4053 2012-12-06  Kent Tamura  <tkent@chromium.org>
4054
4055         Refactoring: Clean up placeholder attribute usage
4056         https://bugs.webkit.org/show_bug.cgi?id=104337
4057
4058         Reviewed by Kentaro Hara.
4059
4060         No new tests. This doesn't change any behavior.
4061
4062         * html/HTMLInputElement.cpp: Remove placeholder and setPlacehodler.
4063         * html/HTMLInputElement.h: Ditto.
4064         * html/HTMLTextFormControlElement.cpp:
4065         (WebCore::HTMLTextFormControlElement::strippedPlaceholder):
4066         We can use fastGetAttribute for placeholder.
4067         (WebCore::HTMLTextFormControlElement::isPlaceholderEmpty):
4068         Ditto.
4069
4070 2012-12-06  Kent Tamura  <tkent@chromium.org>
4071
4072         Refactoring: Rename HTMLFormControlElement::required to isRequired
4073         https://bugs.webkit.org/show_bug.cgi?id=104336
4074
4075         Reviewed by Kentaro Hara.
4076
4077         m_required should be m_isRequired, and required() should be
4078         isRequired. It's safe to rename them because HTML*Element::required IDL
4079         attributes are [Reflected].
4080         http://www.webkit.org/coding/coding-style.html#names-bool
4081
4082         * accessibility/AccessibilityNodeObject.cpp:
4083         (WebCore::AccessibilityNodeObject::isRequired):
4084         * css/StyleResolver.cpp:
4085         (WebCore::StyleResolver::canShareStyleWithControl):
4086         * dom/CheckedRadioButtons.cpp:
4087         (WebCore::RadioButtonGroup::add):
4088         (WebCore::RadioButtonGroup::requiredAttributeChanged):
4089         (WebCore::RadioButtonGroup::remove):
4090         * html/CheckboxInputType.cpp:
4091         (WebCore::CheckboxInputType::valueMissing):
4092         * html/FileInputType.cpp:
4093         (WebCore::FileInputType::valueMissing):
4094         * html/HTMLFormControlElement.cpp:
4095         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
4096         (WebCore::HTMLFormControlElement::parseAttribute):
4097         (WebCore::HTMLFormControlElement::isRequired):
4098         * html/HTMLFormControlElement.h:
4099         (HTMLFormControlElement):
4100         * html/HTMLInputElement.cpp:
4101         (WebCore::HTMLInputElement::isRequiredFormControl):
4102         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
4103         * html/HTMLSelectElement.cpp:
4104         (WebCore::HTMLSelectElement::valueMissing):
4105         (WebCore::HTMLSelectElement::isRequiredFormControl):
4106         * html/HTMLTextAreaElement.h:
4107         (WebCore::HTMLTextAreaElement::isRequiredFormControl):
4108         * html/TextFieldInputType.cpp:
4109         (WebCore::TextFieldInputType::valueMissing):
4110
4111 2012-12-06  Hajime Morrita  <morrita@google.com>