Fix rewinding of SVG animations
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-06-25  Philip Rogers  <pdr@google.com>
2
3         Fix rewinding of SVG animations
4         https://bugs.webkit.org/show_bug.cgi?id=89846
5
6         Reviewed by Nikolas Zimmermann.
7
8         r116451 introduced an optimization to only clear non-freeze animations when
9         calling setCurrentTime (via reset()). This causes fill=freeze animations to
10         not clear which breaks rewinding of an animation.
11
12         In the presence of multiple animations, we reset the first animation to the
13         base value and accumulate all results into that; this masked the problem because
14         2 animations were required to hit the bug (our tests primarily cover just 1).
15
16         Test: svg/animations/animate-reset-freeze.html
17
18         * svg/animation/SVGSMILElement.cpp:
19         (WebCore::SVGSMILElement::reset):
20
21 2012-06-25  Kent Tamura  <tkent@chromium.org>
22
23         Change the serialization format of form control state to make the code simple
24         https://bugs.webkit.org/show_bug.cgi?id=89847
25
26         Reviewed by Hajime Morita.
27
28         We used multiple strings to represent state of single form control. It
29         made the code complex. We change the serialization format so that one
30         CSV string represents state.
31
32         Examples in the old format:
33             "0"
34             "1", "value"
35             "3", "value1", "value2,value2", "value3"
36
37         Examples in the new format:
38             ""
39             ",value"
40             ",value1,value2\,value2,value3"
41
42         Test: fast/forms/state-restore-various-values.html
43
44         * html/FormController.cpp:
45         (WebCore::FormControlState::serialize):
46         Generate comma-separated string.
47         ',' in a value is serialized as "\,".
48         We changed the signature because we don't need the out-argument.
49         (WebCore::FormControlState::deserialize):
50         Parses the input comma-separated string.
51         We changed the signature because we don't need multiple input strings.
52         (formStateSignature):
53         Bump up the version because of the representation change.
54         (WebCore::FormController::formElementsState):
55         The new serialized format occupies just one string for one control.
56         - Expected size is now 3n+1.
57         - Use FormControlState::serialize().
58         (WebCore::FormController::setStateForNewFormElements):
59         The new serialized format occupies just one string for one control.
60         So we can check the vector size before the iteration.
61         * html/FormController.h:
62         (FormControlState): Change the function signatures.
63
64         * html/shadow/CalendarPickerElement.cpp:
65         (WebCore::addJavaScriptString): Use StringBuilder::appendEscaped().
66
67 2012-06-22  Yury Semikhatsky  <yurys@chromium.org>
68
69         Web Inspector: add external resources size to the native memory diagram
70         https://bugs.webkit.org/show_bug.cgi?id=89754
71
72         Reviewed by Vsevolod Vlasov.
73
74         Size of external strings and arrays is now reported through the inspector
75         protocol and displayed on the native memory chart.
76
77         * GNUmakefile.list.am:
78         * Target.pri:
79         * WebCore.gypi:
80         * WebCore.vcproj/WebCore.vcproj:
81         * WebCore.xcodeproj/project.pbxproj:
82         * bindings/js/ScriptProfiler.h:
83         (WebCore):
84         (WebCore::ScriptProfiler::visitJSDOMWrappers):
85         (WebCore::ScriptProfiler::visitExternalJSStrings):
86         (WebCore::ScriptProfiler::visitExternalJSArrays):
87         * bindings/v8/ScriptProfiler.cpp:
88         (WebCore::ScriptProfiler::visitJSDOMWrappers):
89         (WebCore::ScriptProfiler::visitExternalJSStrings):
90         (WebCore::ScriptProfiler::visitExternalJSArrays):
91         (WebCore):
92         * bindings/v8/ScriptProfiler.h:
93         (WebCore):
94         (ScriptProfiler):
95         * bindings/v8/V8Binding.cpp:
96         (WebCore::WebCoreStringResource::visitStrings):
97         (WebCore::V8BindingPerIsolateData::visitJSExternalStrings):
98         * bindings/v8/V8Binding.h:
99         (WebCore):
100         (V8BindingPerIsolateData):
101         * inspector/BindingVisitors.h: Renamed from Source/WebCore/inspector/DOMWrapperVisitor.h.
102         (WTF):
103         (WebCore):
104         (NodeWrapperVisitor):
105         (WebCore::NodeWrapperVisitor::~NodeWrapperVisitor):
106         (ExternalStringVisitor):
107         (WebCore::ExternalStringVisitor::~ExternalStringVisitor):
108         (ExternalArrayVisitor):
109         (WebCore::ExternalArrayVisitor::~ExternalArrayVisitor):
110         * inspector/InspectorMemoryAgent.cpp:
111         (MemoryBlockName):
112         (WebCore):
113         (WebCore::jsExternalResourcesInfo):
114         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
115         * inspector/front-end/NativeMemorySnapshotView.js:
116         (WebInspector.MemoryBlockViewProperties._initialize):
117
118 2012-06-24  Fumitoshi Ukai  <ukai@chromium.org>
119
120         Unreviewed compile error fix of Chromium Win Release.
121         Touch header files for ENABLE(CSS_VARIABLES) so that
122         it forces to rebuild files by changing ENABLE(CSS_VARIABLES)
123         in Sources/WebKit/chromium/features.gypi at r121129
124
125         * css/CSSParserMode.h:
126         * css/CSSValue.h:
127         (WebCore):
128         * css/CSSVariableValue.h:
129         * page/Settings.h:
130         * rendering/style/RenderStyle.h:
131         * rendering/style/StyleRareInheritedData.h:
132         * rendering/style/StyleVariableData.h:
133
134 2012-06-24  Simon Hausmann  <simon.hausmann@nokia.com>
135
136         [Texmap] Minor cleanup for TextureMapper::accelerationMode()
137         https://bugs.webkit.org/show_bug.cgi?id=89825
138
139         Reviewed by Kenneth Rohde Christiansen.
140
141         Replace the virtual method with a simple member variable.
142
143         * platform/graphics/texmap/TextureMapper.h:
144         (WebCore::TextureMapper::accelerationMode):
145         (WebCore::TextureMapper::TextureMapper):
146         (TextureMapper):
147         * platform/graphics/texmap/TextureMapperGL.cpp:
148         (WebCore::TextureMapperGL::TextureMapperGL):
149         * platform/graphics/texmap/TextureMapperGL.h:
150         * platform/graphics/texmap/TextureMapperImageBuffer.h:
151         (WebCore::TextureMapperImageBuffer::TextureMapperImageBuffer):
152
153 2012-06-24  Mike Lawther  <mikelawther@chromium.org>
154
155         CSS3 calc: transitions starting and ending with a calc expression move to end state
156         https://bugs.webkit.org/show_bug.cgi?id=89738
157
158         Reviewed by Tony Chang.
159
160         The equality operator for CalculationValue was not working as expected. The 
161         equality operator for OwnPtr is private, as OwnPtrs should always be different.
162         The OwnPtrs ended up getting cast to bool before being compared, and the 
163         comparison was always returning true.
164
165         The comparison between OwnPtrs has been removed. It doesn't add value to compare
166         the raw pointers either, since OwnPtrs should always be unique. We cannot
167         ASSERT the uniqueness though, as it is legitimate to compare a CalculationValue
168         to itself.
169
170         Test: css3/calc/transition-start-end-with-calc.html
171
172         * platform/CalculationValue.h:
173         (WebCore::CalculationValue::operator==):
174
175 2012-06-24  MORITA Hajime  <morrita@google.com>
176
177         NodeRenderingContext::AttachingPhase is redundant.
178         https://bugs.webkit.org/show_bug.cgi?id=79220
179
180         Reviewed by Dimitri Glazkov.
181
182         This change removes NodeRenderingContext::AttachingPhase and
183         NodeRenderingContext::m_phase respectively. The state originally
184         represented as m_phase is naturally encoded into other member variables.
185
186         NodeRenderingContext::m_visualParentShadow is also replaced, with
187         a local variable parentScope.
188
189         Basically, what NodeRenderingContext wants to know is the parent of
190         the composed shadow tree and an optional insertion point where the
191         node is distributed. Once these becomes clear, m_phase is no longer required.
192         It was rather a historical artifact.
193
194         No new tests. No behavioral change.
195
196         * dom/NodeRenderingContext.cpp: Replaced m_phase with implicit states.
197         (WebCore::NodeRenderingContext::NodeRenderingContext):
198         (WebCore::NodeRenderingContext::nextRenderer):
199         (WebCore::NodeRenderingContext::previousRenderer):
200         (WebCore::NodeRenderingContext::parentRenderer):
201         (WebCore::NodeRenderingContext::shouldCreateRenderer):
202         (WebCore::NodeRenderingContext::isOnEncapsulationBoundary):
203         (WebCore::NodeRenderingContext::isOnUpperEncapsulationBoundary):
204         * dom/NodeRenderingContext.h:
205         (NodeRenderingContext):
206         (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle): Removed an assert which checks m_phase.
207         (WebCore::NodeRenderingContext::resetStyleInheritance): Removed an assert which checks m_phase.
208         * html/shadow/InsertionPoint.h:
209         (WebCore::isInsertionPoint): Fix null case check.
210         (WebCore::isLowerEncapsulationBoundary): Renamed from isShadowBoundary()
211
212 2012-06-24  Antti Koivisto  <antti@apple.com>
213
214         REGRESSION(r121124): LayoutTests/fast/block/inline-children-root-linebox-crash.html asserts
215         https://bugs.webkit.org/show_bug.cgi?id=89844
216         
217         Reviewed by Dan Bernstein.
218
219         We need to check for the flipped writing mode and take the slow path if it is used.
220
221         * rendering/RenderGeometryMap.cpp:
222         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
223
224 2012-06-24  Luke Macpherson  <macpherson@chromium.org>
225
226         Add runtime flag to enable/disable CSS variables (in addition to existing compile-time flag).
227         https://bugs.webkit.org/show_bug.cgi?id=89542
228
229         Reviewed by Dimitri Glazkov.
230
231         Added fast/css/variables/build-supports-variables.html to test runtime flag in test environment.
232         Updated all other css variables tests to enable the runtime flag from JS.
233
234         * css/CSSParser.cpp:
235         (WebCore::CSSParserContext::CSSParserContext):
236         (WebCore::operator==):
237         (WebCore::CSSParser::cssVariablesEnabled):
238         (WebCore):
239         (WebCore::CSSParser::detectDashToken):
240         (WebCore::CSSParser::lex):
241         * css/CSSParser.h:
242         (CSSParser):
243         * css/CSSParserMode.h:
244         (CSSParserContext):
245         * page/Settings.h:
246         (Settings):
247         (WebCore::Settings::setCSSVariablesEnabled):
248         (WebCore::Settings::cssVariablesEnabled):
249
250 2012-06-22  Kent Tamura  <tkent@chromium.org>
251
252         Selected option is not restored correctly
253         https://bugs.webkit.org/show_bug.cgi?id=89623
254
255         Reviewed by Hajime Morita.
256
257         Details of the bug:
258         We saved a state of a <select> element as a string of which length was
259         the size of <select>'s children. e.g. If a <select> had five children
260         and the second and the fifth items were selected, the state string was:
261                 ".X..X"
262
263         This didn't work well if the structure of the children was updated after
264         parsing. For example,
265         1. A page has the following <select> initially:
266           <select multiple>
267             <option>Banana
268             <option>Lemon
269             <option>Orange
270             <option>Strawberry
271           <select>
272
273         2. For some reasons, <option>Apple</option> is prepended to the children.
274         3. Some items are selected.
275         4. The page is unloaded. Selection state is saved.
276         5. A user go back to the page again. A browser parses the page again.
277         6. Try to restore the <select> state with the saved data at 4.
278           But "Apple" is missing. The <select> has wrong selections.
279
280         Solution:
281         We save the state as a set of selected values. If "Banana" and
282         "Strawberry" are selected in the above <select>, we save two strings;
283         "Banana" and "Strawberry", not ".X..X".
284
285         Test: fast/forms/select/select-state-restore.html
286
287         * html/HTMLSelectElement.cpp:
288         (WebCore::HTMLSelectElement::saveFormControlState):
289         Store selected value strings to a FormControlState object.
290         (WebCore::HTMLSelectElement::searchOptionsForValue):
291         A helper function to find an <option> with the specified value.
292         (WebCore::HTMLSelectElement::restoreFormControlState):
293         Clear all of selections, then select options with saved values.
294         In order to avoid O(M x N) loop, we start searching at position we found
295         the previous value.
296         * html/HTMLSelectElement.h: Declare searchOptionsForValue.
297         * html/FormController.cpp:
298         (formStateSignature): Bump up the version because this is a incompatible
299         change.
300
301 2012-06-24  David Barr  <davidbarr@chromium.org>
302
303         Add snap to css3-images image-resolution
304         https://bugs.webkit.org/show_bug.cgi?id=89745
305
306         Reviewed by Tony Chang.
307
308         Due to floating point imprecision, it is difficult to be precise in dpcm.
309         So use PrimitiveValue::roundForImpreciseConversion rather than just floor.
310
311         No new tests; extended fast/css/image-resolution/image-resolution.html
312
313         * css/CSSParser.cpp: Accept snap identifier in image-resolution property.
314         (WebCore::CSSParser::parseImageResolution): Map CSSValueSnap to identifier value from cssValuePool.
315         * css/CSSValueKeywords.in: Add snap.
316         * css/StyleBuilder.cpp: Extend ApplyPropertyImageResolution to apply RenderStyle::imageResolutionSnap.
317         (WebCore::ApplyPropertyImageResolution::applyInheritValue): Apply RenderStyle::imageResolutionSnap.
318         (WebCore::ApplyPropertyImageResolution::applyInitialValue): Apply RenderStyle::imageResolutionSnap.
319         (WebCore::ApplyPropertyImageResolution::applyValue): Map CSSValueSnap to ImageResolutionSnapPixels.
320         * rendering/RenderImage.cpp: Extend conditions for recalculation of intrinsic size.
321         (WebCore::RenderImage::styleDidChange): Update intrinsic size if RenderStyle::imageResolutionSnap() has changed.
322         (WebCore::RenderImage::imageDimensionsChanged): Floor scale factor to int, round up if less than 0.01 away from ceiling.
323         * rendering/style/RenderStyle.cpp: Include StyleRareInheritedData::m_imageResolutionSnap in style diff.
324         (WebCore::RenderStyle::diff): Map change in StyleRareInheritedData::m_imageResolutionSnap to StyleDifferenceLayout.
325         * rendering/style/RenderStyle.h: Add RenderStyle::imageResolutionSnap, RenderStyle::setImageResolutionSnap, RenderStyle::initialImageResolutionSnap.
326         * rendering/style/RenderStyleConstants.h: Add enum ImageResolutionSnap.
327         * rendering/style/StyleRareInheritedData.cpp: Add StyleRareInheritedData::m_imageResolutionSnap.
328         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageResolutionSnap to default and copy constructor.
329         (WebCore::StyleRareInheritedData::operator==): Include m_imageResolutionSnap in comparison.
330         * rendering/style/StyleRareInheritedData.h: Add StyleRareInheritedData::m_imageResolutionSnap.
331         (StyleRareInheritedData): Add 1-bit field StyleRareInheritedData::m_imageResolutionSnap.
332
333 2012-06-24  Sheriff Bot  <webkit.review.bot@gmail.com>
334
335         Unreviewed, rolling out r121106.
336         http://trac.webkit.org/changeset/121106
337         https://bugs.webkit.org/show_bug.cgi?id=89841
338
339         Caused 85% performance regressions on Dromaeo/jslib-modify-
340         jquery.html (Requested by rniwa on #webkit).
341
342         * dom/Document.cpp:
343         (WebCore::Document::clearNodeListCaches):
344         * dom/Document.h:
345         (Document):
346         * dom/DynamicNodeList.cpp:
347         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
348         * dom/DynamicNodeList.h:
349         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
350         * dom/Node.cpp:
351         (WebCore::Node::clearRareData):
352         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
353         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged):
354         (WebCore::Node::getElementsByTagName):
355         (WebCore::Node::getElementsByTagNameNS):
356         (WebCore::Node::getElementsByName):
357         (WebCore::Node::getElementsByClassName):
358         (WebCore::Node::radioNodeList):
359         (WebCore::NodeListsNodeData::invalidateCaches):
360         (WebCore):
361         (WebCore::NodeRareData::createNodeLists):
362         * dom/NodeRareData.h:
363         (NodeListsNodeData):
364         (WebCore::NodeListsNodeData::adoptTreeScope):
365         (WebCore::NodeRareData::ensureNodeLists):
366         (NodeRareData):
367         * dom/TreeScope.cpp:
368         (WebCore::TreeScope::TreeScope):
369         * dom/TreeScope.h:
370         (WebCore::TreeScope::addNodeListCache):
371         (WebCore::TreeScope::removeNodeListCache):
372         (WebCore::TreeScope::hasNodeListCaches):
373         (TreeScope):
374         * dom/TreeScopeAdopter.cpp:
375         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
376         * html/LabelableElement.cpp:
377         (WebCore::LabelableElement::labels):
378         * html/LabelsNodeList.cpp:
379         (WebCore::LabelsNodeList::LabelsNodeList):
380         (WebCore::LabelsNodeList::~LabelsNodeList):
381         * html/RadioNodeList.cpp:
382         (WebCore::RadioNodeList::RadioNodeList):
383         (WebCore::RadioNodeList::~RadioNodeList):
384
385 2012-06-24  Adam Barth  <abarth@webkit.org>
386
387         Change the type of the second argument of FrameSelection::revealSelection to use RevealExtentOption
388         https://bugs.webkit.org/show_bug.cgi?id=89833
389
390         Reviewed by Ryosuke Niwa.
391
392         As requested by Ryosuke Niwa.  Rare boolean parameters are hard to read.
393
394         * WebCore.exp.in:
395         * editing/Editor.cpp:
396         (WebCore::Editor::revealSelectionAfterEditingOperation):
397         * editing/Editor.h:
398         (Editor):
399         * editing/FrameSelection.cpp:
400         (WebCore::FrameSelection::setSelection):
401         (WebCore::FrameSelection::revealSelection):
402         * editing/FrameSelection.h:
403
404 2012-06-24  Antti Koivisto  <antti@apple.com>
405
406         Optimize RenderGeometryMap mappings gathering
407         https://bugs.webkit.org/show_bug.cgi?id=89828
408
409         Reviewed by Simon Fraser.
410
411         RenderGeometryMap currently gathers mappings by climbing the rendering tree. This is slow and can produce 
412         large number of mapping steps. In the common case we already have the child layer coordinates available in
413         the layer tree and we can just use that.
414         
415         The combination of faster mappings gathering and fewer number of applying steps reduces time spent under 
416         RenderLayerCompositor::computeCompositingRequirements to less than half when scrolling the mobile version
417         of twitter.com.
418         
419         * rendering/RenderGeometryMap.cpp:
420         (WebCore):
421         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
422         
423             Use pre-computed mapping from the layer tree when possible.
424
425         (WebCore::RenderGeometryMap::popMappingsToAncestor):
426         * rendering/RenderGeometryMap.h:
427         
428             Add some inline capacity.
429
430         (WebCore):
431         (RenderGeometryMap):
432         * rendering/RenderLayer.h:
433         (WebCore::RenderLayer::canUseConvertToLayerCoords):
434         (RenderLayer):
435         * rendering/RenderLayerCompositor.cpp:
436         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
437         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
438
439 2012-06-24  Simon Fraser  <simon.fraser@apple.com>
440
441         Rename isPositioned to isOutOfFlowPositioned for clarity
442         https://bugs.webkit.org/show_bug.cgi?id=89836
443
444         Reviewed by Antti Koivisto.
445         
446         RenderObject and RenderStyle had an isPositioned() method that was
447         confusing, because it excluded relative positioning. Rename to 
448         isOutOfFlowPositioned(), which makes it clearer that it only applies
449         to absolute and fixed positioning.
450
451         Simple rename; no behavior change.
452
453         * css/CSSComputedStyleDeclaration.cpp:
454         (WebCore::getPositionOffsetValue):
455         * css/StyleResolver.cpp:
456         (WebCore::StyleResolver::collectMatchingRulesForList):
457         * dom/Text.cpp:
458         (WebCore::Text::rendererIsNeeded):
459         * editing/DeleteButtonController.cpp:
460         (WebCore::isDeletableElement):
461         * editing/TextIterator.cpp:
462         (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
463         * rendering/AutoTableLayout.cpp:
464         (WebCore::shouldScaleColumns):
465         * rendering/InlineFlowBox.cpp:
466         (WebCore::InlineFlowBox::addToLine):
467         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
468         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
469         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
470         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
471         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
472         (WebCore::InlineFlowBox::flipLinesInBlockDirection):
473         (WebCore::InlineFlowBox::computeOverflow):
474         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
475         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
476         * rendering/InlineIterator.h:
477         (WebCore::isIteratorTarget):
478         * rendering/LayoutState.cpp:
479         (WebCore::LayoutState::LayoutState):
480         * rendering/RenderBlock.cpp:
481         (WebCore::RenderBlock::MarginInfo::MarginInfo):
482         (WebCore::RenderBlock::styleWillChange):
483         (WebCore::RenderBlock::styleDidChange):
484         (WebCore::RenderBlock::addChildToContinuation):
485         (WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
486         (WebCore::RenderBlock::containingColumnsBlock):
487         (WebCore::RenderBlock::columnsBlockForSpanningElement):
488         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
489         (WebCore::getInlineRun):
490         (WebCore::RenderBlock::isSelfCollapsingBlock):
491         (WebCore::RenderBlock::layoutBlock):
492         (WebCore::RenderBlock::addOverflowFromBlockChildren):
493         (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
494         (WebCore::RenderBlock::handlePositionedChild):
495         (WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
496         (WebCore::RenderBlock::collapseMargins):
497         (WebCore::RenderBlock::clearFloatsIfNeeded):
498         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
499         (WebCore::RenderBlock::isSelectionRoot):
500         (WebCore::RenderBlock::blockSelectionGaps):
501         (WebCore::RenderBlock::clearFloats):
502         (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
503         (WebCore::RenderBlock::markSiblingsWithFloatsForLayout):
504         (WebCore::isChildHitTestCandidate):
505         (WebCore::InlineMinMaxIterator::next):
506         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
507         (WebCore::RenderBlock::firstLineBoxBaseline):
508         (WebCore::RenderBlock::lastLineBoxBaseline):
509         (WebCore::RenderBlock::updateFirstLetter):
510         (WebCore::shouldCheckLines):
511         (WebCore::getHeightForLineCount):
512         (WebCore::RenderBlock::adjustForBorderFit):
513         (WebCore::inNormalFlow):
514         (WebCore::RenderBlock::adjustLinePositionForPagination):
515         (WebCore::RenderBlock::adjustBlockChildForPagination):
516         (WebCore::RenderBlock::renderName):
517         * rendering/RenderBlock.h:
518         (WebCore::RenderBlock::shouldSkipCreatingRunsForObject):
519         * rendering/RenderBlockLineLayout.cpp:
520         (WebCore::RenderBlock::setMarginsForRubyRun):
521         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
522         (WebCore::RenderBlock::computeBlockDirectionPositionsForLine):
523         (WebCore::RenderBlock::layoutInlineChildren):
524         (WebCore::requiresLineBox):
525         (WebCore::RenderBlock::LineBreaker::skipTrailingWhitespace):
526         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
527         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
528         * rendering/RenderBox.cpp:
529         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
530         (WebCore::RenderBox::styleWillChange):
531         (WebCore::RenderBox::styleDidChange):
532         (WebCore::RenderBox::updateBoxModelInfoFromStyle):
533         (WebCore::RenderBox::offsetFromContainer):
534         (WebCore::RenderBox::positionLineBox):
535         (WebCore::RenderBox::computeRectForRepaint):
536         (WebCore::RenderBox::computeLogicalWidthInRegion):
537         (WebCore::RenderBox::renderBoxRegionInfo):
538         (WebCore::RenderBox::computeLogicalHeight):
539         (WebCore::RenderBox::computePercentageLogicalHeight):
540         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
541         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
542         (WebCore::RenderBox::availableLogicalHeightUsing):
543         (WebCore::percentageLogicalHeightIsResolvable):
544         * rendering/RenderBox.h:
545         (WebCore::RenderBox::stretchesToViewport):
546         (WebCore::RenderBox::isDeprecatedFlexItem):
547         * rendering/RenderBoxModelObject.cpp:
548         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
549         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
550         * rendering/RenderBoxModelObject.h:
551         (WebCore::RenderBoxModelObject::requiresLayer):
552         * rendering/RenderDeprecatedFlexibleBox.cpp:
553         (WebCore::childDoesNotAffectWidthOrFlexing):
554         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
555         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
556         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
557         (WebCore::RenderDeprecatedFlexibleBox::renderName):
558         * rendering/RenderFieldset.cpp:
559         (WebCore::RenderFieldset::findLegend):
560         * rendering/RenderFlexibleBox.cpp:
561         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
562         (WebCore::RenderFlexibleBox::autoMarginOffsetInMainAxis):
563         (WebCore::RenderFlexibleBox::availableAlignmentSpaceForChild):
564         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
565         (WebCore::RenderFlexibleBox::computeNextFlexLine):
566         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
567         (WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
568         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
569         (WebCore::RenderFlexibleBox::layoutColumnReverse):
570         (WebCore::RenderFlexibleBox::adjustAlignmentForChild):
571         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
572         * rendering/RenderGrid.cpp:
573         (WebCore::RenderGrid::renderName):
574         * rendering/RenderImage.cpp:
575         (WebCore::RenderImage::computeIntrinsicRatioInformation):
576         * rendering/RenderInline.cpp:
577         (WebCore::RenderInline::addChildIgnoringContinuation):
578         (WebCore::RenderInline::addChildToContinuation):
579         (WebCore::RenderInline::generateCulledLineBoxRects):
580         (WebCore):
581         (WebCore::RenderInline::culledInlineFirstLineBox):
582         (WebCore::RenderInline::culledInlineLastLineBox):
583         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
584         (WebCore::RenderInline::computeRectForRepaint):
585         (WebCore::RenderInline::dirtyLineBoxes):
586         * rendering/RenderLayer.cpp:
587         (WebCore::checkContainingBlockChainForPagination):
588         (WebCore::RenderLayer::updateLayerPosition):
589         (WebCore::isPositionedContainer):
590         (WebCore::RenderLayer::calculateClipRects):
591         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
592         * rendering/RenderLayerCompositor.cpp:
593         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
594         * rendering/RenderLineBoxList.cpp:
595         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
596         * rendering/RenderListItem.cpp:
597         (WebCore::getParentOfFirstLineBox):
598         * rendering/RenderMultiColumnBlock.cpp:
599         (WebCore::RenderMultiColumnBlock::renderName):
600         * rendering/RenderObject.cpp:
601         (WebCore::RenderObject::markContainingBlocksForLayout):
602         (WebCore::RenderObject::setPreferredLogicalWidthsDirty):
603         (WebCore::RenderObject::invalidateContainerPreferredLogicalWidths):
604         (WebCore::RenderObject::styleWillChange):
605         (WebCore::RenderObject::offsetParent):
606         * rendering/RenderObject.h:
607         (WebCore::RenderObject::isOutOfFlowPositioned):
608         (WebCore::RenderObject::isInFlowPositioned):
609         (WebCore::RenderObject::hasClip):
610         (WebCore::RenderObject::isFloatingOrOutOfFlowPositioned):
611         * rendering/RenderObjectChildList.cpp:
612         (WebCore::RenderObjectChildList::removeChildNode):
613         * rendering/RenderReplaced.cpp:
614         (WebCore::hasAutoHeightOrContainingBlockWithAutoHeight):
615         * rendering/RenderRubyRun.cpp:
616         (WebCore::RenderRubyRun::rubyText):
617         * rendering/RenderTable.cpp:
618         (WebCore::RenderTable::addChild):
619         (WebCore::RenderTable::computeLogicalWidth):
620         (WebCore::RenderTable::layout):
621         * rendering/style/RenderStyle.h:
622
623 2012-06-24  Oli Lan  <olilan@chromium.org>
624
625         After Editor::setComposition is called, input should scroll to the end of the composition.
626         https://bugs.webkit.org/show_bug.cgi?id=88999
627
628         Reviewed by Ryosuke Niwa.
629
630         This fixes an issue where after a call to setComposition, the start of the composition is revealed
631         (scrolled to) instead of the end (where the caret/editing point should be).
632
633         The change is to allow revealSelectionAfterEditingOperation to take a revealExtent parameter,
634         and to pass that parameter as true when calling from setIgnoreCompositionSelectionChange, which is
635         called at the end of setComposition.
636
637         Test: fast/forms/input-set-composition-scroll.html
638
639         * editing/Editor.cpp:
640         (WebCore::Editor::revealSelectionAfterEditingOperation):
641         (WebCore::Editor::setIgnoreCompositionSelectionChange):
642         * editing/Editor.h:
643         (Editor):
644
645 2012-06-24  Joshua Bell  <jsbell@chromium.org>
646
647         Web Inspector: Simplify InspectorIndexedDBAgent to use IDB metadata API
648         https://bugs.webkit.org/show_bug.cgi?id=89495
649
650         Reviewed by Vsevolod Vlasov.
651
652         No new tests - no functional changes.
653
654         * inspector/InspectorIndexedDBAgent.cpp:
655         (WebCore):
656
657 2012-06-24  Pavel Feldman  <pfeldman@chromium.org>
658
659         Web Inspector: speed up Timeline and Elements panel rendering
660         https://bugs.webkit.org/show_bug.cgi?id=89771
661
662         Reviewed by Yury Semikhatsky.
663
664         I used timeline panel to find unnecessary style operations.
665
666         * inspector/front-end/ElementsTreeOutline.js:
667         (WebInspector.ElementsTreeElement.prototype.updateTitle):
668         * inspector/front-end/TimelinePanel.js:
669         (WebInspector.TimelinePanel.prototype._updateEventDividers):
670         (WebInspector.TimelinePanel.prototype._updateFrames):
671         (WebInspector.TimelinePanel.prototype.sidebarResized):
672         (WebInspector.TimelinePanel.prototype.onResize):
673         (WebInspector.TimelinePanel.prototype._onScroll):
674         (WebInspector.TimelinePanel.prototype._refresh):
675         (WebInspector.TimelinePanel.prototype._refreshRecords):
676         (WebInspector.TimelinePanel.prototype._adjustScrollPosition):
677
678 2012-06-23  Ryosuke Niwa  <rniwa@webkit.org>
679
680         Inserting nodes is slow due to Node::notifyNodeListsAttributeChanged (20%+)
681         https://bugs.webkit.org/show_bug.cgi?id=73853
682
683         Reviewed by Anders Carlsson and Ojan Vafai.
684
685         Invalidate all node lists at document level to avoid having to walk up the DOM tree in the invalidation.
686         In particular, this makes appending node O(1) with respect to the depth of the tree in common cases when
687         we have node lists somewhere in the tree scope.
688
689         We now invalidate more node lists than we used to but it shouldn't matter much in practice because
690         most websites don't add or remove nodes or modify relevant attributes while iterating through node lists.
691         The change would also register each node list to document thereby consuming one extra pointer, however,
692         this should not have a significant memory impact given we used to do it unintentionally until I fixed it in
693         r110797 three months ago.
694
695         Also, RadioNodeList and LabelsNodeList had always been invalidated at document level so this refactoring
696         also allows us to move calls to registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList in
697         those node lists to DynamicSubtreeNodeList, and even delete NodeListsNodeData::invalidateCaches().
698
699         In addition, removed m_numNodeListCaches from TreeScope since it was only used to avoid walking up
700         the ancestors in invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged
701         but we don't walk up the ancestors any more. Also note that m_listsInvalidatedAtDocument tells us exactly
702         how many node lists are present for each document.
703
704         * dom/Document.cpp:
705         (WebCore::Document::clearNodeListCaches): Optionally takes a qualified attribute name so that we don't
706         have to invalidate tag node lists when only attributes are modified.
707         * dom/Document.h:
708         (Document):
709         * dom/DynamicNodeList.cpp:
710         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): Calls unregisterDynamicSubtreeNodeList.
711         * dom/DynamicNodeList.h:
712         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Calls registerDynamicSubtreeNodeList.
713         * dom/Node.cpp:
714         (WebCore::Node::clearRareData):
715         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): No longer walks up the tree to invalidate
716         node list caches. All invalidations are done in Document::clearNodeListCaches.
717         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto.
718         (WebCore::Node::getElementsByTagName):
719         (WebCore::Node::getElementsByTagNameNS):
720         (WebCore::Node::getElementsByName):
721         (WebCore::Node::getElementsByClassName):
722         (WebCore::Node::radioNodeList):
723         (WebCore):
724         (WebCore::NodeRareData::createNodeLists):
725         * dom/NodeRareData.h:
726         (NodeListsNodeData):
727         (WebCore::NodeListsNodeData::adoptTreeScope): Invalidate node list caches while registering and
728         unregistering node lists from old and new documents respectively now that invalidateCaches() has been
729         (WebCore::NodeRareData::ensureNodeLists):
730         (NodeRareData):
731         * dom/TreeScope.cpp:
732         (WebCore::TreeScope::TreeScope):
733         * dom/TreeScope.h:
734         (TreeScope):
735         * dom/TreeScopeAdopter.cpp:
736         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
737         * html/LabelableElement.cpp:
738         (WebCore::LabelableElement::labels):
739         * html/LabelsNodeList.cpp:
740         (WebCore::LabelsNodeList::LabelsNodeList):
741         (WebCore::LabelsNodeList::~LabelsNodeList):
742         * html/RadioNodeList.cpp:
743         (WebCore::RadioNodeList::RadioNodeList):
744         (WebCore::RadioNodeList::~RadioNodeList):
745
746 2012-06-23  Ryosuke Niwa  <rniwa@webkit.org>
747
748         Clang and cl.exe build fix after r121103. Don't inherit from WTF::PairHash<unsigned char, StringType>.
749
750         * dom/NodeRareData.h:
751
752 2012-06-23  Ryosuke Niwa  <rniwa@webkit.org>
753
754         REGRESSION(r120979): getElementsByTagName is 12% slower
755         https://bugs.webkit.org/show_bug.cgi?id=89783
756
757         Reviewed by Darin Adler.
758
759         The problem is that hashing std::pair<unsigned short, AtomicString> is very slow compared to just hashing AtomicString,
760         which internally holds a hash already. Fixed the regression by replacing the default hash function by the one that
761         computes AtomicString's hash + list type. This is okay because we only have 7 node list types at the moment.
762
763         * dom/NodeRareData.h:
764         (NodeListsNodeData):
765         (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::hash):
766         (NodeListCacheMapEntryHash):
767         (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::equal):
768         (WebCore::NodeListsNodeData::namedNodeListKey):
769
770 2012-06-23  Dan Bernstein  <mitz@apple.com>
771
772         RenderText’s minimum preferred width is incorrect automatic hyphenation is used
773         https://bugs.webkit.org/show_bug.cgi?id=89814
774
775         Reviewed by Sam Weinig.
776
777         Test: fast/text/hyphen-min-preferred-width.html
778
779         * rendering/RenderText.cpp:
780         (WebCore::maxWordFragmentWidth): Added this helper function. It returns the width of the
781         widest hyphenated fragment of the word (except for the suffix after the last hyphen) and
782         the offset of the last hyphenation opportunity.
783         (WebCore::RenderText::computePreferredLogicalWidths): Changed this function to consider the
784         widths of hyphenated word fragments rather than entire words when computing the minimum
785         width. Because hyphenating and measuring all fragments is expensive, hyphenation is only
786         attempted if the unhyphenated word is wider than the current minimum width.
787
788 2012-06-23  Sheriff Bot  <webkit.review.bot@gmail.com>
789
790         Unreviewed, rolling out r121058.
791         http://trac.webkit.org/changeset/121058
792         https://bugs.webkit.org/show_bug.cgi?id=89809
793
794         Patch causes plugins tests to crash in GTK debug builds
795         (Requested by zdobersek on #webkit).
796
797         * bindings/js/GCController.cpp:
798         (WebCore::collect):
799         (WebCore::GCController::garbageCollectSoon):
800         (WebCore::GCController::garbageCollectNow):
801         (WebCore::GCController::discardAllCompiledCode):
802         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
803         (WebCore::JSSQLStatementErrorCallback::handleEvent):
804         * bindings/js/JSCustomVoidCallback.cpp:
805         (WebCore::JSCustomVoidCallback::handleEvent):
806         * bindings/js/JSCustomXPathNSResolver.cpp:
807         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
808         * bindings/js/JSErrorHandler.cpp:
809         (WebCore::JSErrorHandler::handleEvent):
810         * bindings/js/JSEventCustom.cpp:
811         (WebCore::toJS):
812         * bindings/js/JSEventListener.cpp:
813         (WebCore::JSEventListener::handleEvent):
814         * bindings/js/JSInjectedScriptHostCustom.cpp:
815         (WebCore::InjectedScriptHost::nodeAsScriptValue):
816         (WebCore::JSInjectedScriptHost::inspectedObject):
817         * bindings/js/JSInjectedScriptManager.cpp:
818         (WebCore::InjectedScriptManager::createInjectedScript):
819         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
820         * bindings/js/JSLazyEventListener.cpp:
821         (WebCore::JSLazyEventListener::initializeJSFunction):
822         * bindings/js/JSMainThreadExecState.h:
823         (WebCore::JSMainThreadExecState::evaluate):
824         * bindings/js/JSMutationCallbackCustom.cpp:
825         (WebCore::JSMutationCallback::handleEvent):
826         * bindings/js/JSNodeFilterCondition.cpp:
827         (WebCore::JSNodeFilterCondition::acceptNode):
828         * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp:
829         (WebCore::JSRequestAnimationFrameCallback::handleEvent):
830         * bindings/js/JavaScriptCallFrame.cpp:
831         (WebCore::JavaScriptCallFrame::evaluate):
832         * bindings/js/PageScriptDebugServer.cpp:
833         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
834         * bindings/js/ScheduledAction.cpp:
835         (WebCore::ScheduledAction::executeFunctionInContext):
836         * bindings/js/ScriptCachedFrameData.cpp:
837         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
838         (WebCore::ScriptCachedFrameData::restore):
839         (WebCore::ScriptCachedFrameData::clear):
840         * bindings/js/ScriptController.cpp:
841         (WebCore::ScriptController::evaluateInWorld):
842         (WebCore::ScriptController::clearWindowShell):
843         (WebCore::ScriptController::initScript):
844         (WebCore::ScriptController::updateDocument):
845         (WebCore::ScriptController::cacheableBindingRootObject):
846         (WebCore::ScriptController::bindingRootObject):
847         (WebCore::ScriptController::windowScriptNPObject):
848         (WebCore::ScriptController::jsObjectForPluginElement):
849         (WebCore::ScriptController::clearScriptObjects):
850         * bindings/js/ScriptControllerMac.mm:
851         (WebCore::ScriptController::windowScriptObject):
852         * bindings/js/ScriptDebugServer.cpp:
853         (WebCore::ScriptDebugServer::dispatchDidPause):
854         * bindings/js/ScriptEventListener.cpp:
855         (WebCore::eventListenerHandlerBody):
856         (WebCore::eventListenerHandlerLocation):
857         * bindings/js/ScriptFunctionCall.cpp:
858         (WebCore::ScriptCallArgumentHandler::appendArgument):
859         (WebCore::ScriptFunctionCall::call):
860         (WebCore::ScriptFunctionCall::construct):
861         (WebCore::ScriptCallback::call):
862         * bindings/js/ScriptObject.cpp:
863         (WebCore::ScriptGlobalObject::set):
864         (WebCore::ScriptGlobalObject::get):
865         (WebCore::ScriptGlobalObject::remove):
866         * bindings/js/ScriptValue.cpp:
867         (WebCore::ScriptValue::getString):
868         (WebCore::ScriptValue::toInspectorValue):
869         * bindings/js/WorkerScriptController.cpp:
870         (WebCore::WorkerScriptController::~WorkerScriptController):
871         (WebCore::WorkerScriptController::initScript):
872         (WebCore::WorkerScriptController::evaluate):
873         (WebCore::WorkerScriptController::disableEval):
874         * bindings/objc/WebScriptObject.mm:
875         (_didExecute):
876         (-[WebScriptObject _setImp:originRootObject:rootObject:]):
877         (-[WebScriptObject _setOriginRootObject:andRootObject:]):
878         (-[WebScriptObject dealloc]):
879         (-[WebScriptObject finalize]):
880         (-[WebScriptObject callWebScriptMethod:withArguments:]):
881         (-[WebScriptObject evaluateWebScript:]):
882         (-[WebScriptObject setValue:forKey:]):
883         (-[WebScriptObject valueForKey:]):
884         (-[WebScriptObject removeWebScriptKey:]):
885         (-[WebScriptObject hasWebScriptKey:]):
886         (-[WebScriptObject stringRepresentation]):
887         (-[WebScriptObject webScriptValueAtIndex:]):
888         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
889         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
890         * bindings/scripts/CodeGeneratorJS.pm:
891         (GenerateCallbackImplementation):
892         * bindings/scripts/test/JS/JSTestCallback.cpp:
893         (WebCore::JSTestCallback::callbackWithNoParam):
894         (WebCore::JSTestCallback::callbackWithClass1Param):
895         (WebCore::JSTestCallback::callbackWithClass2Param):
896         (WebCore::JSTestCallback::callbackWithStringList):
897         (WebCore::JSTestCallback::callbackWithBoolean):
898         (WebCore::JSTestCallback::callbackRequiresThisToPass):
899         * bridge/NP_jsobject.cpp:
900         (_NPN_InvokeDefault):
901         (_NPN_Invoke):
902         (_NPN_Evaluate):
903         (_NPN_GetProperty):
904         (_NPN_SetProperty):
905         (_NPN_RemoveProperty):
906         (_NPN_HasProperty):
907         (_NPN_HasMethod):
908         (_NPN_Enumerate):
909         (_NPN_Construct):
910         * bridge/c/c_class.cpp:
911         (JSC::Bindings::CClass::~CClass):
912         (JSC::Bindings::CClass::methodsNamed):
913         (JSC::Bindings::CClass::fieldNamed):
914         * bridge/c/c_instance.cpp:
915         (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
916         (JSC::Bindings::CInstance::invokeMethod):
917         (JSC::Bindings::CInstance::invokeDefaultMethod):
918         (JSC::Bindings::CInstance::invokeConstruct):
919         (JSC::Bindings::CInstance::getPropertyNames):
920         * bridge/c/c_runtime.cpp:
921         (JSC::Bindings::CField::valueFromInstance):
922         (JSC::Bindings::CField::setValueToInstance):
923         * bridge/c/c_utility.cpp:
924         (JSC::Bindings::convertValueToNPVariant):
925         (JSC::Bindings::convertNPVariantToValue):
926         * bridge/jni/jni_jsobject.mm:
927         (JavaJSObject::call):
928         (JavaJSObject::eval):
929         (JavaJSObject::getMember):
930         (JavaJSObject::setMember):
931         (JavaJSObject::removeMember):
932         (JavaJSObject::getSlot):
933         (JavaJSObject::setSlot):
934         (JavaJSObject::toString):
935         (JavaJSObject::convertValueToJObject):
936         (JavaJSObject::convertJObjectToValue):
937         * bridge/jni/jni_objc.mm:
938         (JSC::Bindings::dispatchJNICall):
939         * bridge/jni/jsc/JNIUtilityPrivate.cpp:
940         (JSC::Bindings::convertValueToJValue):
941         * bridge/jni/jsc/JavaClassJSC.cpp:
942         (JavaClass::JavaClass):
943         (JavaClass::~JavaClass):
944         * bridge/jni/jsc/JavaInstanceJSC.cpp:
945         (JavaInstance::stringValue):
946         * bridge/jni/jsc/JavaMethodJSC.cpp:
947         (appendClassName):
948         (JavaMethod::signature):
949         * bridge/jni/jsc/JavaStringJSC.h:
950         (JSC::Bindings::JavaString::JavaString):
951         (JSC::Bindings::JavaString::~JavaString):
952         (JSC::Bindings::JavaString::utf8):
953         (JSC::Bindings::JavaString::init):
954         * bridge/jsc/BridgeJSC.cpp:
955         (JSC::Bindings::Instance::createRuntimeObject):
956         (JSC::Bindings::Instance::newRuntimeObject):
957         * bridge/objc/objc_instance.mm:
958         (ObjcInstance::moveGlobalExceptionToExecState):
959         (ObjcInstance::invokeObjcMethod):
960         (ObjcInstance::invokeDefaultMethod):
961         (ObjcInstance::setValueOfUndefinedField):
962         (ObjcInstance::getValueOfUndefinedField):
963         * bridge/objc/objc_runtime.mm:
964         (JSC::Bindings::ObjcField::valueFromInstance):
965         (JSC::Bindings::ObjcField::setValueToInstance):
966         * bridge/objc/objc_utility.mm:
967         (JSC::Bindings::convertValueToObjcValue):
968         (JSC::Bindings::convertNSStringToString):
969         (JSC::Bindings::convertObjcValueToValue):
970         * bridge/qt/qt_instance.cpp:
971         (JSC::Bindings::QtInstance::~QtInstance):
972         (JSC::Bindings::QtInstance::getQtInstance):
973         (JSC::Bindings::QtInstance::newRuntimeObject):
974         * bridge/qt/qt_pixmapruntime.cpp:
975         (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject):
976         * bridge/qt/qt_runtime.cpp:
977         (JSC::Bindings::convertValueToQVariant):
978         (JSC::Bindings::convertQVariantToValue):
979         (JSC::Bindings::QtRuntimeMetaMethod::call):
980         (JSC::Bindings::QtRuntimeConnectionMethod::call):
981         * bridge/qt/qt_runtime_qt4.cpp:
982         (JSC::Bindings::convertValueToQVariant):
983         (JSC::Bindings::convertQVariantToValue):
984         (JSC::Bindings::QtRuntimeMetaMethod::call):
985         (JSC::Bindings::QtRuntimeConnectionMethod::call):
986         * html/HTMLCanvasElement.cpp:
987         (WebCore::HTMLCanvasElement::createImageBuffer):
988         * html/HTMLImageLoader.cpp:
989         (WebCore::HTMLImageLoader::notifyFinished):
990         * plugins/PluginView.cpp:
991         (WebCore::PluginView::start):
992         (WebCore::PluginView::stop):
993         (WebCore::PluginView::performRequest):
994         (WebCore::PluginView::npObject):
995         (WebCore::PluginView::privateBrowsingStateChanged):
996         * plugins/blackberry/PluginViewBlackBerry.cpp:
997         (WebCore::PluginView::dispatchNPEvent):
998         (WebCore::PluginView::setNPWindowIfNeeded):
999         (WebCore::PluginView::platformStart):
1000         (WebCore::PluginView::getWindowInfo):
1001         * plugins/efl/PluginViewEfl.cpp:
1002         (WebCore::PluginView::dispatchNPEvent):
1003         * plugins/gtk/PluginViewGtk.cpp:
1004         (WebCore::PluginView::dispatchNPEvent):
1005         (WebCore::PluginView::handleKeyboardEvent):
1006         (WebCore::PluginView::handleMouseEvent):
1007         (WebCore::PluginView::setNPWindowIfNeeded):
1008         (WebCore::PluginView::platformStart):
1009         * plugins/mac/PluginViewMac.mm:
1010         (WebCore::PluginView::setNPWindowIfNeeded):
1011         (WebCore::PluginView::dispatchNPEvent):
1012         * plugins/qt/PluginViewQt.cpp:
1013         (WebCore::PluginView::dispatchNPEvent):
1014         (WebCore::PluginView::setNPWindowIfNeeded):
1015         (WebCore::PluginView::platformStart):
1016         * plugins/win/PluginViewWin.cpp:
1017         (WebCore::PluginView::dispatchNPEvent):
1018         (WebCore::PluginView::handleKeyboardEvent):
1019         (WebCore::PluginView::handleMouseEvent):
1020         (WebCore::PluginView::setNPWindowRect):
1021         * testing/js/WebCoreTestSupport.cpp:
1022         (WebCoreTestSupport::injectInternalsObject):
1023         (WebCoreTestSupport::resetInternalsObject):
1024         * xml/XMLHttpRequest.cpp:
1025         (WebCore::XMLHttpRequest::dropProtection):
1026
1027 2012-06-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1028
1029         Store hit-test rect in HitTestPoint as Rect.
1030         https://bugs.webkit.org/show_bug.cgi?id=89454
1031
1032         Reviewed by Darin Adler.
1033
1034         Calculate the rectangle early and store that instead of padding
1035         to avoid recalculating the rectangle for every single element
1036         hit tested.
1037
1038         No change in functionality. No new tests.
1039
1040         * page/EventHandler.cpp:
1041         (WebCore::EventHandler::bestClickableNodeForTouchPoint):
1042         (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
1043         * rendering/HitTestResult.cpp:
1044         (WebCore::HitTestPoint::HitTestPoint):
1045         (WebCore::HitTestPoint::operator=):
1046         (WebCore::HitTestPoint::setPoint):
1047         (WebCore::hitTestPointIntersects):
1048         (WebCore::HitTestPoint::intersects):
1049         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
1050         * rendering/HitTestResult.h:
1051         (HitTestPoint):
1052         (WebCore::HitTestPoint::boundingBox):
1053         (WebCore::HitTestPoint::topPadding):
1054         (WebCore::HitTestPoint::rightPadding):
1055         (WebCore::HitTestPoint::bottomPadding):
1056         (WebCore::HitTestPoint::leftPadding):
1057         (HitTestResult):
1058         * rendering/RenderBlock.cpp:
1059         (WebCore::RenderBlock::hitTestColumns):
1060         * rendering/RenderTableSection.cpp:
1061         (WebCore::RenderTableSection::nodeAtPoint):
1062
1063 2012-06-22  Benjamin Poulain  <bpoulain@apple.com>
1064
1065         Text with text-overflow:ellipsis and text-align:right is left aligned
1066         https://bugs.webkit.org/show_bug.cgi?id=88705
1067
1068         Reviewed by Dan Bernstein.
1069
1070         When building the line of a text with overflow, we do not know if we can place
1071         an ellipsis and where it should be. Because of that, text is laid out as if it does
1072         not have text-overflow: ellipsis.
1073
1074         This causes problems with text-alignement right in LTR and left in RTL. The shortened text
1075         did not follow the allignment.
1076
1077         This patch changes the position of lines with ellipsis after layout to follow the allignment.
1078         In RenderBlock::checkLinesForTextOverflow(), the call to RootInlineBox::placeEllipsis() now
1079         also gives the width of the truncated text. We use this width to re-compute the alignement and
1080         shift the box if necessary.
1081
1082         In RenderBlock::deleteEllipsisLineBoxes() we revert the text to the position computed with the
1083         total width. This way all layout computation is done as usual.
1084
1085         Tests: fast/css/text-overflow-ellipsis-text-align-left.html
1086                fast/css/text-overflow-ellipsis-text-align-right.html
1087
1088         * rendering/InlineBox.cpp:
1089         (WebCore::InlineBox::canAccommodateEllipsis): Make the method const for readability, truncating is
1090         done later in placeEllipsisBox().
1091         (WebCore::InlineBox::placeEllipsisBox): Add an output argument, truncatedWidth, giving the width
1092         of the text + ellipsis after truncation (if any truncation can be done).
1093         * rendering/InlineBox.h:
1094         (InlineBox):
1095         * rendering/InlineFlowBox.cpp:
1096         (WebCore::InlineBox::adjustLogicalPosition): adjustPosition() logical coordinates.
1097         (WebCore::InlineFlowBox::canAccommodateEllipsis):
1098         (WebCore::InlineFlowBox::placeEllipsisBox):
1099         * rendering/InlineFlowBox.h:
1100         (InlineFlowBox):
1101         * rendering/InlineTextBox.cpp:
1102         (WebCore::InlineTextBox::placeEllipsisBox):
1103         * rendering/InlineTextBox.h:
1104         (InlineTextBox):
1105         * rendering/RenderBlockLineLayout.cpp:
1106         (WebCore::RenderBlock::deleteEllipsisLineBoxes): In addition to removing the truncation, we
1107         need to revert the shift introduced by checkLinesForTextOverflow(). This restore the lines
1108         to its original, untruncated position in order to layout the block correctly in RenderBlock::layoutInlineChildren().
1109         (WebCore::RenderBlock::checkLinesForTextOverflow): After we truncate the text, we now recompute the shift we need
1110         for alignment, and move the line accordingly.
1111         * rendering/RenderDeprecatedFlexibleBox.cpp:
1112         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
1113         * rendering/RootInlineBox.cpp:
1114         (WebCore::RootInlineBox::placeEllipsis): Return the width of the truncated text + the width of the ellipsis.
1115         (WebCore::RootInlineBox::placeEllipsisBox):
1116         (WebCore::RootInlineBox::adjustPosition):
1117         * rendering/RootInlineBox.h:
1118         (RootInlineBox):
1119
1120 2012-06-22  Eugene Klyuchnikov  <eustas.big@gmail.com>
1121
1122         Web Inspector: Fix negative time interval on zoom-in
1123         https://bugs.webkit.org/show_bug.cgi?id=89798
1124
1125         Reviewed by Pavel Feldman.
1126
1127         Steps to reproduce:
1128         1) Record timeline
1129         2) Select small range with left tick close to zero
1130         3) Move pointer to the right end of the ruler
1131         4) Zoom-in with mouse-wheel
1132
1133         Result: right tick goes below the zero.
1134
1135         * inspector/front-end/TimelineOverviewPane.js:
1136         (WebInspector.TimelineOverviewWindow.prototype._zoom):
1137
1138 2012-06-22  Alexandru Chiculita  <achicu@adobe.com>
1139
1140         [CSS Shaders] Re-enable the CSS Shaders compile time flag on Safari Mac
1141         https://bugs.webkit.org/show_bug.cgi?id=89781
1142
1143         Reviewed by Dean Jackson.
1144
1145         Added ENABLE_CSS_SHADERS flag as enabled by default on Safari for Mac.
1146
1147         No new tests, just re-enabled existing tests.
1148
1149         * css/CSSValueKeywords.in: Added empty line to force a rebuild of the file on the EWS.
1150         * Configurations/FeatureDefines.xcconfig:
1151
1152 2012-06-22  David Grogan  <dgrogan@chromium.org>
1153
1154         IndexedDB: Avoid infinite loop if we try to encode -1 for leveldb
1155         https://bugs.webkit.org/show_bug.cgi?id=89625
1156
1157         It gets worse, memory is allocated inside the loop so the process is
1158         eventually killed by the OS.
1159
1160         Reviewed by Tony Chang.
1161
1162         Added tests to Source/WebKit/chromium/tests/IDBLevelDBCodingTest.cpp
1163
1164         * Modules/indexeddb/IDBLevelDBCoding.cpp:
1165         (WebCore::IDBLevelDBCoding::encodeInt):
1166         (WebCore::IDBLevelDBCoding::encodeVarInt):
1167
1168 2012-06-22  Hayato Ito  <hayato@chromium.org>
1169
1170         [Shadow] ShadowRoot.activeElement should use the result of re-targeting algorithm.
1171         https://bugs.webkit.org/show_bug.cgi?id=89763
1172
1173         Reviewed by Dimitri Glazkov.
1174
1175         Use the result of the re-targeting algorithm in calculating
1176         shadow root's activeElement so that ShadowRoot.activeElement returns
1177         a focused distributed node correctly as the algorithm says.
1178
1179         The spec is:
1180         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#active-element
1181
1182         Tests: fast/dom/shadow/shadow-root-activeElement.html
1183
1184         * dom/EventDispatcher.cpp:
1185         (WebCore):
1186         (WebCore::EventRelatedTargetAdjuster::adjust):
1187         (WebCore::EventDispatcher::ensureEventAncestors):
1188         * dom/TreeScope.cpp:
1189         (WebCore::TreeScope::focusedNode):
1190         * html/shadow/InsertionPoint.h:
1191         (WebCore::InsertionPoint::contains):
1192
1193 2012-06-22  James Robinson  <jamesr@chromium.org>
1194
1195         [chromium] LayerRendererChromium is not getting visibility messages in single threaded compositing mode.
1196         https://bugs.webkit.org/show_bug.cgi?id=89045
1197
1198         Reviewed by Adrienne Walker.
1199
1200         Based on patch by Michal Mocny <mmocny@google.com>.
1201
1202         Invariants:
1203
1204         1.) We never commit (paint, animate, any of it) when not visible on the main thread -except- for
1205         compositeAndReadback, regardless of threaded vs non-threaded mode
1206         2.) CCLayerTreeHost::m_contentsTextureManager's memory budget is only set by updateLayers() when we are going to
1207         make a frame and is always set to a non-zero value
1208         3.) Zero-sized allocations from the GPU process are always serviced immediately on the impl thread.  Non-zero
1209         allocations are met in the next frame, whenever we would produce that frame according to our usual frame
1210         scheduling logic.
1211         4.) The impl thread always knows the set of currently-allocated managed texture IDs and can delete them all
1212         whenever it likes without needing the main thread to be responsive.
1213
1214         Details:
1215
1216         There are two main changes - tweaking how the contents texture manager's budget is handled and tweaking frame
1217         scheduling for the !visible case.
1218
1219         The scheduling change is a bit more subtle but it unifies the single and multi threaded paths and is really
1220         important.  Except for compositeAndReadback (which I'll talk about below), we simply won't produce frames when
1221         not visible.  This already happens in the single threaded path thanks to render_widget so the only change is to
1222         the threaded path.  The difficulty here is we might post a beginFrame task from the impl thread and then get a
1223         setVisible(false) call on the main thread before the beginFrame task runs.  Since I'm making the setVisible()
1224         call a blocking call from main thread -> impl thread, when the beginFrame task eventually does run on the main
1225         thread we can know that the impl thread's notion of visibility is in sync with the main threads.  Thus I'm
1226         planning to simply abort the frame before doing any processing on the main thread.  The scheduler will know if
1227         it gets a beginFrameAborted and COMMIT_STATE_IDLE.
1228
1229         compositeAndReadback is special - this call currently does come in when we aren't visible (in single and
1230         threaded mode) and we need to service it.  In particular, we need to send a beginFrame over and have it
1231         not be ignored on the main thread.  For this I'm thinking of having the proxy keep track of whether it's
1232         servicing a compositeAndReadback() and use that bit on the main thread to know to process the beginFrame
1233         normally.  On the impl side, we need a few changes.  First, we have to allocate a default framebuffer
1234         (ensureFramebufferCHROMIUM) even if we've dropped it previously and remember to discard it after the
1235         readPixels().  Second, we have to provide a non-zero contents texture allocation on the beginFrame message, and
1236         again remember to delete the textures after the readPixels().  Third, we have to know that the beginFrame is a
1237         forced frame so when we get the beginFrameComplete we go ahead with the rest of the frame.  For this, I think
1238         I'll have to add ACTION_BEGIN_FORCED_FRAME and a corresponding COMMIT_STATE_FORCED_FRAME_IN_PROGRESS so the
1239         scheduler can keep track of the magicness of this frame, and then add some logic after the readpixels call to
1240         drop resources after the readback.  It's probably a good time to stop swapping on readbacks too....
1241
1242         The contents texture manager's budget is only relevant when we want to make a frame, so it's now passed in on
1243         the updateLayers().  Since we only make frames when we are visible and we never have a zero allocation when
1244         visible (thanks to the frame scheduling changes above), this value is always non-zero.  The other thing the
1245         texture manager needs to know about is if we've killed all of the underlying textures from the impl thread -
1246         this bit is passed in by the proxy before the updateLayers() call.  This means if we're running while visible
1247         and the manager wants to decrease our budget to something other than zero, we'll get a new (non-zero) allocation
1248         on the impl thread, schedule a frame, then when it's time to make the frame pass the new lower limit in to
1249         updateLayers(), then have the contents texture manager evict down to our new limit and make a frame with the new
1250         budget.  When the commit completes we'll get notified on the impl thread of which textures the contents texture
1251         manager decided to evict and issue the deleteTexture() calls on them.
1252
1253         The texture budget we pass in will be based on the most recent non-zero memory allocation we received from the
1254         GPU memory manager, or some default value I'll pull out my ass if we haven't heard anything yet.  On compositor
1255         initialization, we can't afford to wait for a round-trip through the GPU process to get a budget for the first
1256         frame.  I don't think handling a decrease to a non-zero budget on a visible tab needs to be terribly urgent - we
1257         can get to it when we get to making the next frame.  If we wanted to satisfy reduced texture budgets directly
1258         from the impl thread, we could keep a priority-list ordered set of textures once we have priorities and delete
1259         based on that.  Let's worry about that later.
1260
1261         * platform/graphics/chromium/LayerRendererChromium.cpp:
1262         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChangedOnImpl):
1263         (WebCore::LayerRendererChromium::LayerRendererChromium):
1264         (WebCore::LayerRendererChromium::initialize):
1265         (WebCore::LayerRendererChromium::setVisible):
1266         (WebCore::LayerRendererChromium::setGpuMemoryAllocation):
1267         (WebCore):
1268         (WebCore::LayerRendererChromium::swapBuffers):
1269         (WebCore::LayerRendererChromium::getFramebufferPixels):
1270         * platform/graphics/chromium/LayerRendererChromium.h:
1271         (WebCore):
1272         (LayerRendererChromium):
1273         * platform/graphics/chromium/TextureManager.cpp:
1274         (WebCore::TextureManager::evictAndRemoveAllDeletedTextures):
1275         (WebCore):
1276         * platform/graphics/chromium/TextureManager.h:
1277         (TextureAllocator):
1278         (TextureManager):
1279         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
1280         (WebCore::TrackingTextureAllocator::createTexture):
1281         (WebCore::TrackingTextureAllocator::deleteTexture):
1282         (WebCore):
1283         (WebCore::TrackingTextureAllocator::deleteAllTextures):
1284         * platform/graphics/chromium/TrackingTextureAllocator.h:
1285         (TrackingTextureAllocator):
1286         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1287         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1288         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
1289         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
1290         (WebCore::CCLayerTreeHost::setVisible):
1291         (WebCore::CCLayerTreeHost::evictAllContentTextures):
1292         (WebCore::CCLayerTreeHost::updateLayers):
1293         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1294         (CCLayerTreeHost):
1295         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1296         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
1297         (WebCore::CCLayerTreeHostImpl::commitComplete):
1298         (WebCore::CCLayerTreeHostImpl::canDraw):
1299         (WebCore::CCLayerTreeHostImpl::context):
1300         (WebCore::CCLayerTreeHostImpl::releaseContentsTextures):
1301         (WebCore):
1302         (WebCore::CCLayerTreeHostImpl::setMemoryAllocationLimitBytes):
1303         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1304         (CCLayerTreeHostImplClient):
1305         (WebCore::CCLayerTreeHostImpl::contentsTexturesWerePurgedSinceLastCommit):
1306         (WebCore::CCLayerTreeHostImpl::memoryAllocationLimitBytes):
1307         (CCLayerTreeHostImpl):
1308         * platform/graphics/chromium/cc/CCProxy.h:
1309         (CCProxy):
1310         * platform/graphics/chromium/cc/CCRenderer.h:
1311         (CCRendererClient):
1312         * platform/graphics/chromium/cc/CCScheduler.cpp:
1313         (WebCore::CCScheduler::beginFrameComplete):
1314         (WebCore::CCScheduler::beginFrameAborted):
1315         (WebCore):
1316         (WebCore::CCScheduler::didSwapBuffersComplete):
1317         (WebCore::CCScheduler::didLoseContext):
1318         (WebCore::CCScheduler::didRecreateContext):
1319         (WebCore::CCScheduler::vsyncTick):
1320         * platform/graphics/chromium/cc/CCScheduler.h:
1321         (CCScheduler):
1322         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
1323         (WebCore::CCSchedulerStateMachine::beginFrameAborted):
1324         (WebCore):
1325         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
1326         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1327         (WebCore::CCSingleThreadProxy::setVisible):
1328         (WebCore):
1329         (WebCore::CCSingleThreadProxy::stop):
1330         (WebCore::CCSingleThreadProxy::commitAndComposite):
1331         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1332         (CCSingleThreadProxy):
1333         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1334         (WebCore::CCThreadProxy::CCThreadProxy):
1335         (WebCore::CCThreadProxy::compositeAndReadback):
1336         (WebCore::CCThreadProxy::setVisible):
1337         (WebCore):
1338         (WebCore::CCThreadProxy::setVisibleOnImplThread):
1339         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
1340         (WebCore::CCThreadProxy::beginFrame):
1341         (WebCore::CCThreadProxy::beginFrameAbortedOnImplThread):
1342         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
1343         (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread):
1344         * platform/graphics/chromium/cc/CCThreadProxy.h:
1345         (CCThreadProxy):
1346         (BeginFrameAndCommitState):
1347         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1348         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
1349         (WebCore::CCVideoLayerImpl::willDraw):
1350         (WebCore::CCVideoLayerImpl::willDrawInternal):
1351         (WebCore::CCVideoLayerImpl::FramePlane::allocateData):
1352         (WebCore::CCVideoLayerImpl::FramePlane::freeData):
1353         (WebCore::CCVideoLayerImpl::allocatePlaneData):
1354         (WebCore::CCVideoLayerImpl::freePlaneData):
1355         (WebCore::CCVideoLayerImpl::freeUnusedPlaneData):
1356         (WebCore::CCVideoLayerImpl::didLoseContext):
1357         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
1358         (FramePlane):
1359
1360 2012-06-22  Julien Chaffraix  <jchaffraix@webkit.org>
1361
1362         REGRESSION(r116446): Crash in RenderBoxModelObject::adjustedPositionRelativeToOffsetParent
1363         https://bugs.webkit.org/show_bug.cgi?id=89785
1364
1365         Reviewed by Abhishek Arya.
1366
1367         Test: fullscreen/full-screen-crash-offsetLeft.html
1368
1369         * rendering/RenderBoxModelObject.cpp:
1370         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
1371         Added a NULL-check for parent() as it can be NULL in fullscreen mode. Also updated a stale
1372         comment while touching the code.
1373
1374 2012-06-22  Kenneth Russell  <kbr@google.com>
1375
1376         Unreviewed, rolling out r121064.
1377         http://trac.webkit.org/changeset/121064
1378         https://bugs.webkit.org/show_bug.cgi?id=88268
1379
1380         Broke Chromium Mac build.
1381
1382         * WebCore.gypi:
1383         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1384         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1385         (WebCore::CCLayerTreeHost::updateAnimations):
1386         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
1387         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1388         (WebCore):
1389         (WebCore::CCLayerTreeHost::frameNumber):
1390         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1391         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
1392         (WebCore::CCLayerTreeHostImpl::drawLayers):
1393         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1394         (WebCore::CCLayerTreeHostImpl::frameNumber):
1395         (CCLayerTreeHostImpl):
1396         * platform/graphics/chromium/cc/CCProxy.h:
1397         (WebCore):
1398         (CCProxy):
1399         * platform/graphics/chromium/cc/CCRenderingStats.h: Removed.
1400         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1401         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1402         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1403         * platform/graphics/chromium/cc/CCThreadProxy.h:
1404         (CCThreadProxy):
1405
1406 2012-06-22  Ryuan Choi  <ryuan.choi@samsung.com>
1407
1408         [EFL][WK2] Support keyboard event
1409         https://bugs.webkit.org/show_bug.cgi?id=89268
1410
1411         Reviewed by Chang Shu.
1412
1413         Extract keyDownCommandsMap and keyPressCommandsMap to share WebKit1/Efl and WebKit2/Efl.
1414
1415         * platform/efl/EflKeyboardUtilities.cpp:
1416         (WebCore):
1417         (WebCore::keyDownCommandsMap):
1418         (WebCore::keyPressCommandsMap):
1419         (KeyDownEntry):
1420         (KeyPressEntry):
1421         (WebCore::createKeyDownCommandMap):
1422         (WebCore::createKeyPressCommandMap):
1423         (WebCore::getKeyDownCommandName):
1424         (WebCore::getKeyPressCommandName):
1425         * platform/efl/EflKeyboardUtilities.h:
1426         (WebCore):
1427
1428 2012-06-22  Alec Flett  <alecflett@chromium.org>
1429
1430         IndexedDB: refactor index-writing to be more self-contained
1431         https://bugs.webkit.org/show_bug.cgi?id=89607
1432
1433         Reviewed by Tony Chang.
1434
1435         Refactor index-writing into the IndexWriter class. Does not change
1436         existing behavior but begins migrating index-writing logic into a
1437         self-contained class that can eventually be used in the
1438         frontend (renderer) side of IndexedDB.
1439
1440         No new tests, behavior is unchanged.
1441
1442         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1443         (WebCore):
1444         (WebCore::IDBObjectStoreBackendImpl::putInternal):
1445         (WebCore::IDBObjectStoreBackendImpl::populateIndex):
1446
1447 2012-06-22  Dave Tu  <dtu@chromium.org>
1448
1449         [chromium] Expose rendering statistics to WebWidget.
1450         https://bugs.webkit.org/show_bug.cgi?id=88268
1451
1452         Reviewed by James Robinson.
1453
1454         The WebKit side of a basic framework for exposing rendering statistics
1455         to Chromium's --enable-benchmarking extension.
1456
1457         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1458         (WebCore::CCLayerTreeHost::implFrameNumber):
1459         * platform/graphics/chromium/cc/CCProxy.h:
1460         (CCProxy):
1461         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1462         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1463         (WebCore::CCThreadProxy::implFrameNumber):
1464         (WebCore):
1465         (WebCore::CCThreadProxy::implFrameNumberOnImplThread):
1466         * platform/graphics/chromium/cc/CCThreadProxy.h:
1467         (CCThreadProxy):
1468
1469 2012-06-22  Shawn Singh  <shawnsingh@chromium.org>
1470
1471         [chromium] Do not accumulate occlusion from 3d layers on the main thread
1472         https://bugs.webkit.org/show_bug.cgi?id=89704
1473
1474         Reviewed by James Robinson.
1475
1476         Layer iterators on the main thread may not iterate over 3d layers
1477         in correct front-to-back or back-to-front order, because layer
1478         sorting is not performed on the main thread. As a result,
1479         occlusion tracking can accidentally think something is occluded if
1480         a 3d layer is processed out of order. This patch choses to solve
1481         this by avoiding accumulating occlusion for 3d layers. It may be
1482         appropriate later to consider adding layer sorting on the main
1483         thread, but for now that seemed like an unnecessary heavy-handed
1484         approach.
1485
1486         In addition to a new unit test that covers this, other unit tests
1487         were changed to work on the impl thread, so that the 3d layers
1488         still accumulate occlusion as required.
1489
1490         Unit test added to CCOcclusionTrackerTest:
1491           CCOcclusionTrackerTestUnsorted3dLayers
1492
1493         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1494         (WebCore::layerIsInUnsorted3dRenderingContext):
1495         (WebCore):
1496         (WebCore::::markOccludedBehindLayer):
1497
1498 2012-06-22  Joshua Bell  <jsbell@chromium.org>
1499
1500         IndexedDB: Snapshot metadata in front end to avoid IPC round-trips
1501         https://bugs.webkit.org/show_bug.cgi?id=88467
1502
1503         Reviewed by Tony Chang.
1504
1505         Define a new type (IDBDatabaseMetadata) that captures the "schema" of an
1506         IDB database (name, version, properties of stores, properties of indexes).
1507         Add a method for the front end to request this from the back end once up
1508         front to avoid later calls (which may be slow IPC calls in ports). Implement
1509         IDB spec logic that the metadata should be frozen for a particular IDBDatabase
1510         connection, and only change within a version change transaction, and the spec's
1511         funky requirement for aborted version change transactions.
1512
1513         Test: storage/indexeddb/metadata.html
1514
1515         * Modules/indexeddb/IDBDatabase.cpp:
1516         (WebCore::IDBDatabase::IDBDatabase): Fetch metadata from back end when connection is created.
1517         (WebCore::IDBDatabase::transactionCreated):
1518         (WebCore::IDBDatabase::transactionFinished): Update metadata at the end of a transaction in 
1519         case it was rolled back.
1520         (WebCore::IDBDatabase::objectStoreNames): Move implementation to front-end.
1521         (WebCore):
1522         (WebCore::IDBDatabase::createObjectStore): Update local copy of metadata.
1523         (WebCore::IDBDatabase::deleteObjectStore): Update local copy of metadata.
1524         * Modules/indexeddb/IDBDatabase.h:
1525         (WebCore::IDBDatabase::name): Move implementation to front-end.
1526         (WebCore::IDBDatabase::version): Move implementation to front-end.
1527         (IDBDatabase):
1528         (WebCore::IDBDatabase::metadata):
1529         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1530         (WebCore::IDBDatabaseBackendImpl::metadata): Construct a metadata snapshot.
1531         (WebCore):
1532         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1533         (IDBDatabaseBackendImpl):
1534         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
1535         (WebCore):
1536         (IDBDatabaseBackendInterface):
1537         * Modules/indexeddb/IDBIndex.cpp: Store a copy of the metadata, which will never
1538         change during the lifetime of the index.
1539         (WebCore::IDBIndex::IDBIndex):
1540         * Modules/indexeddb/IDBIndex.h:
1541         (WebCore::IDBIndex::create):
1542         (WebCore::IDBIndex::name): Move implementation to front-end.
1543         (WebCore::IDBIndex::objectStore): Return RefPtr (unrelated tidying).
1544         (WebCore::IDBIndex::keyPath): Move implementation to front-end.
1545         (WebCore::IDBIndex::unique): Move implementation to front-end.
1546         (WebCore::IDBIndex::multiEntry): Move implementation to front-end.
1547         (IDBIndex):
1548         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
1549         (WebCore::IDBIndexBackendImpl::metadata): Construct a metadata snapshot.
1550         (WebCore):
1551         * Modules/indexeddb/IDBIndexBackendImpl.h:
1552         (IDBIndexBackendImpl):
1553         * Modules/indexeddb/IDBMetadata.h: Added new structs.
1554         (WebCore):
1555         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
1556         (IDBDatabaseMetadata):
1557         (WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata):
1558         (IDBObjectStoreMetadata):
1559         (WebCore::IDBIndexMetadata::IDBIndexMetadata):
1560         (IDBIndexMetadata):
1561         * Modules/indexeddb/IDBObjectStore.cpp:
1562         (WebCore::IDBObjectStore::IDBObjectStore): Store a "live" copy of the metadata, and
1563         and copy in case of an aborted version change transaction.
1564         (WebCore::IDBObjectStore::indexNames): Move implementation to front-end.
1565         (WebCore::IDBObjectStore::createIndex): Update metadata to include new index.
1566         (WebCore::IDBObjectStore::index): Pass along metadata to instance constructor.
1567         (WebCore::IDBObjectStore::deleteIndex): Delete index from metadata.
1568         * Modules/indexeddb/IDBObjectStore.h:
1569         (WebCore::IDBObjectStore::create):
1570         (WebCore::IDBObjectStore::name): Move implementation to front-end.
1571         (WebCore::IDBObjectStore::keyPath): Move implementation to front-end.
1572         (WebCore::IDBObjectStore::transaction): Return RefPtr (unrelated tidying).
1573         (WebCore::IDBObjectStore::autoIncrement): Move implementation to front-end.
1574         (WebCore::IDBObjectStore::metadata): Allow copying the metadata, in case of abort.
1575         (WebCore::IDBObjectStore::resetMetadata): Allow setting the metadata, in case of abort.
1576         (IDBObjectStore):
1577         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1578         (WebCore::IDBObjectStoreBackendImpl::metadata): Construct a metadata snapshot.
1579         (WebCore):
1580         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
1581         (WebCore):
1582         (IDBObjectStoreBackendImpl):
1583         * Modules/indexeddb/IDBTransaction.cpp:
1584         (WebCore::IDBTransaction::objectStore): Pass along metadata to instance constructor.
1585         (WebCore::IDBTransaction::objectStoreCreated): Track stores changed during transaction.
1586         (WebCore::IDBTransaction::objectStoreDeleted):Track stores changed during transaction.
1587         (WebCore::IDBTransaction::onAbort): Revert stores metadata potentially changed during transaction.
1588         * Modules/indexeddb/IDBTransaction.h:
1589         (IDBTransaction):
1590         * WebCore.gypi:
1591
1592 2012-06-20  Mark Hahnenberg  <mhahnenberg@apple.com>
1593
1594         JSLock should be per-JSGlobalData
1595         https://bugs.webkit.org/show_bug.cgi?id=89123
1596
1597         Reviewed by Gavin Barraclough.
1598
1599         No new tests. Current regression tests are sufficient.
1600
1601         Changed all sites that used JSLock to instead use the new JSLockHolder
1602         and pass in the correct JS context that the code is about to interact with that 
1603         needs protection. Also added a couple JSLocks to places that didn't already 
1604         have it that needed it.
1605
1606         * bindings/js/GCController.cpp:
1607         (WebCore::collect):
1608         (WebCore::GCController::garbageCollectSoon):
1609         (WebCore::GCController::garbageCollectNow):
1610         (WebCore::GCController::discardAllCompiledCode):
1611         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1612         (WebCore::JSSQLStatementErrorCallback::handleEvent):
1613         * bindings/js/JSCustomVoidCallback.cpp:
1614         (WebCore::JSCustomVoidCallback::handleEvent):
1615         * bindings/js/JSCustomXPathNSResolver.cpp:
1616         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1617         * bindings/js/JSErrorHandler.cpp:
1618         (WebCore::JSErrorHandler::handleEvent):
1619         * bindings/js/JSEventCustom.cpp:
1620         (WebCore::toJS):
1621         * bindings/js/JSEventListener.cpp:
1622         (WebCore::JSEventListener::handleEvent):
1623         * bindings/js/JSInjectedScriptHostCustom.cpp:
1624         (WebCore::InjectedScriptHost::nodeAsScriptValue):
1625         (WebCore::JSInjectedScriptHost::inspectedObject):
1626         * bindings/js/JSInjectedScriptManager.cpp:
1627         (WebCore::InjectedScriptManager::createInjectedScript):
1628         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
1629         * bindings/js/JSLazyEventListener.cpp:
1630         (WebCore::JSLazyEventListener::initializeJSFunction):
1631         * bindings/js/JSMainThreadExecState.h:
1632         (WebCore::JSMainThreadExecState::evaluate):
1633         * bindings/js/JSMutationCallbackCustom.cpp:
1634         (WebCore::JSMutationCallback::handleEvent):
1635         * bindings/js/JSNodeFilterCondition.cpp:
1636         (WebCore::JSNodeFilterCondition::acceptNode):
1637         * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp:
1638         (WebCore::JSRequestAnimationFrameCallback::handleEvent):
1639         * bindings/js/JavaScriptCallFrame.cpp:
1640         (WebCore::JavaScriptCallFrame::evaluate):
1641         * bindings/js/PageScriptDebugServer.cpp:
1642         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
1643         * bindings/js/ScheduledAction.cpp:
1644         (WebCore::ScheduledAction::executeFunctionInContext):
1645         * bindings/js/ScriptCachedFrameData.cpp:
1646         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
1647         (WebCore::ScriptCachedFrameData::restore):
1648         (WebCore::ScriptCachedFrameData::clear):
1649         * bindings/js/ScriptController.cpp:
1650         (WebCore::ScriptController::evaluateInWorld):
1651         (WebCore::ScriptController::clearWindowShell):
1652         (WebCore::ScriptController::initScript):
1653         (WebCore::ScriptController::updateDocument):
1654         (WebCore::ScriptController::cacheableBindingRootObject):
1655         (WebCore::ScriptController::bindingRootObject):
1656         (WebCore::ScriptController::windowScriptNPObject):
1657         (WebCore::ScriptController::jsObjectForPluginElement):
1658         (WebCore::ScriptController::clearScriptObjects):
1659         * bindings/js/ScriptControllerMac.mm:
1660         (WebCore::ScriptController::windowScriptObject):
1661         * bindings/js/ScriptDebugServer.cpp:
1662         (WebCore::ScriptDebugServer::dispatchDidPause):
1663         * bindings/js/ScriptEventListener.cpp:
1664         (WebCore::eventListenerHandlerBody):
1665         (WebCore::eventListenerHandlerLocation):
1666         * bindings/js/ScriptFunctionCall.cpp:
1667         (WebCore::ScriptCallArgumentHandler::appendArgument):
1668         (WebCore::ScriptFunctionCall::call):
1669         (WebCore::ScriptFunctionCall::construct):
1670         (WebCore::ScriptCallback::call):
1671         * bindings/js/ScriptObject.cpp:
1672         (WebCore::ScriptGlobalObject::set):
1673         (WebCore::ScriptGlobalObject::get):
1674         (WebCore::ScriptGlobalObject::remove):
1675         * bindings/js/ScriptValue.cpp:
1676         (WebCore::ScriptValue::getString):
1677         (WebCore::ScriptValue::toInspectorValue):
1678         * bindings/js/WorkerScriptController.cpp:
1679         (WebCore::WorkerScriptController::~WorkerScriptController):
1680         (WebCore::WorkerScriptController::initScript):
1681         (WebCore::WorkerScriptController::evaluate):
1682         (WebCore::WorkerScriptController::disableEval):
1683         * bindings/objc/WebScriptObject.mm:
1684         (_didExecute):
1685         (-[WebScriptObject _setImp:originRootObject:rootObject:]):
1686         (-[WebScriptObject _setOriginRootObject:andRootObject:]):
1687         (-[WebScriptObject dealloc]):
1688         (-[WebScriptObject finalize]):
1689         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1690         (-[WebScriptObject evaluateWebScript:]):
1691         (-[WebScriptObject setValue:forKey:]):
1692         (-[WebScriptObject valueForKey:]):
1693         (-[WebScriptObject removeWebScriptKey:]):
1694         (-[WebScriptObject hasWebScriptKey:]):
1695         (-[WebScriptObject stringRepresentation]):
1696         (-[WebScriptObject webScriptValueAtIndex:]):
1697         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
1698         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1699         * bindings/scripts/CodeGeneratorJS.pm:
1700         (GenerateCallbackImplementation):
1701         * bindings/scripts/test/JS/JSTestCallback.cpp:
1702         (WebCore::JSTestCallback::callbackWithNoParam):
1703         (WebCore::JSTestCallback::callbackWithClass1Param):
1704         (WebCore::JSTestCallback::callbackWithClass2Param):
1705         (WebCore::JSTestCallback::callbackWithStringList):
1706         (WebCore::JSTestCallback::callbackWithBoolean):
1707         (WebCore::JSTestCallback::callbackRequiresThisToPass):
1708         * bridge/NP_jsobject.cpp:
1709         (_NPN_InvokeDefault):
1710         (_NPN_Invoke):
1711         (_NPN_Evaluate):
1712         (_NPN_GetProperty):
1713         (_NPN_SetProperty):
1714         (_NPN_RemoveProperty):
1715         (_NPN_HasProperty):
1716         (_NPN_HasMethod):
1717         (_NPN_Enumerate):
1718         (_NPN_Construct):
1719         * bridge/c/c_class.cpp:
1720         (JSC::Bindings::CClass::~CClass):
1721         (JSC::Bindings::CClass::methodsNamed):
1722         (JSC::Bindings::CClass::fieldNamed):
1723         * bridge/c/c_instance.cpp:
1724         (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
1725         (JSC::Bindings::CInstance::invokeMethod):
1726         (JSC::Bindings::CInstance::invokeDefaultMethod):
1727         (JSC::Bindings::CInstance::invokeConstruct):
1728         (JSC::Bindings::CInstance::getPropertyNames):
1729         * bridge/c/c_runtime.cpp:
1730         (JSC::Bindings::CField::valueFromInstance):
1731         (JSC::Bindings::CField::setValueToInstance):
1732         * bridge/c/c_utility.cpp:
1733         (JSC::Bindings::convertValueToNPVariant):
1734         (JSC::Bindings::convertNPVariantToValue):
1735         * bridge/jni/jni_jsobject.mm:
1736         (JavaJSObject::call):
1737         (JavaJSObject::eval):
1738         (JavaJSObject::getMember):
1739         (JavaJSObject::setMember):
1740         (JavaJSObject::removeMember):
1741         (JavaJSObject::getSlot):
1742         (JavaJSObject::setSlot):
1743         (JavaJSObject::toString):
1744         (JavaJSObject::convertValueToJObject):
1745         (JavaJSObject::convertJObjectToValue):
1746         * bridge/jni/jni_objc.mm:
1747         (JSC::Bindings::dispatchJNICall):
1748         * bridge/jni/jsc/JNIUtilityPrivate.cpp:
1749         (JSC::Bindings::convertValueToJValue):
1750         * bridge/jni/jsc/JavaClassJSC.cpp:
1751         (JavaClass::JavaClass):
1752         (JavaClass::~JavaClass):
1753         * bridge/jni/jsc/JavaInstanceJSC.cpp:
1754         (JavaInstance::stringValue):
1755         * bridge/jni/jsc/JavaMethodJSC.cpp:
1756         (appendClassName):
1757         (JavaMethod::signature):
1758         * bridge/jni/jsc/JavaStringJSC.h:
1759         (JSC::Bindings::JavaString::JavaString):
1760         (JSC::Bindings::JavaString::~JavaString):
1761         (JSC::Bindings::JavaString::utf8):
1762         (JSC::Bindings::JavaString::init):
1763         * bridge/jsc/BridgeJSC.cpp:
1764         (JSC::Bindings::Instance::createRuntimeObject):
1765         (JSC::Bindings::Instance::newRuntimeObject):
1766         * bridge/objc/objc_instance.mm:
1767         (ObjcInstance::moveGlobalExceptionToExecState):
1768         (ObjcInstance::invokeObjcMethod):
1769         (ObjcInstance::invokeDefaultMethod):
1770         (ObjcInstance::setValueOfUndefinedField):
1771         (ObjcInstance::getValueOfUndefinedField):
1772         * bridge/objc/objc_runtime.mm:
1773         (JSC::Bindings::ObjcField::valueFromInstance):
1774         (JSC::Bindings::ObjcField::setValueToInstance):
1775         * bridge/objc/objc_utility.mm:
1776         (JSC::Bindings::convertValueToObjcValue):
1777         (JSC::Bindings::convertNSStringToString):
1778         (JSC::Bindings::convertObjcValueToValue):
1779         * bridge/qt/qt_instance.cpp:
1780         (JSC::Bindings::QtInstance::~QtInstance):
1781         (JSC::Bindings::QtInstance::getQtInstance):
1782         (JSC::Bindings::QtInstance::newRuntimeObject):
1783         * bridge/qt/qt_pixmapruntime.cpp:
1784         (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject):
1785         * bridge/qt/qt_runtime.cpp:
1786         (JSC::Bindings::convertValueToQVariant):
1787         (JSC::Bindings::convertQVariantToValue):
1788         (JSC::Bindings::QtRuntimeMetaMethod::call):
1789         (JSC::Bindings::QtRuntimeConnectionMethod::call):
1790         * bridge/qt/qt_runtime_qt4.cpp:
1791         (JSC::Bindings::convertValueToQVariant):
1792         (JSC::Bindings::convertQVariantToValue):
1793         (JSC::Bindings::QtRuntimeMetaMethod::call):
1794         (JSC::Bindings::QtRuntimeConnectionMethod::call):
1795         * html/HTMLCanvasElement.cpp:
1796         (WebCore::HTMLCanvasElement::createImageBuffer):
1797         * html/HTMLImageLoader.cpp:
1798         (WebCore::HTMLImageLoader::notifyFinished):
1799         * plugins/PluginView.cpp:
1800         (WebCore::PluginView::start):
1801         (WebCore::PluginView::stop):
1802         (WebCore::PluginView::performRequest):
1803         (WebCore::PluginView::npObject):
1804         (WebCore::PluginView::privateBrowsingStateChanged):
1805         * plugins/blackberry/PluginViewBlackBerry.cpp:
1806         (WebCore::PluginView::dispatchNPEvent):
1807         (WebCore::PluginView::setNPWindowIfNeeded):
1808         (WebCore::PluginView::platformStart):
1809         (WebCore::PluginView::getWindowInfo):
1810         * plugins/efl/PluginViewEfl.cpp:
1811         (WebCore::PluginView::dispatchNPEvent):
1812         * plugins/gtk/PluginViewGtk.cpp:
1813         (WebCore::PluginView::dispatchNPEvent):
1814         (WebCore::PluginView::handleKeyboardEvent):
1815         (WebCore::PluginView::handleMouseEvent):
1816         (WebCore::PluginView::setNPWindowIfNeeded):
1817         (WebCore::PluginView::platformStart):
1818         * plugins/mac/PluginViewMac.mm:
1819         (WebCore::PluginView::setNPWindowIfNeeded):
1820         (WebCore::PluginView::dispatchNPEvent):
1821         * plugins/qt/PluginViewQt.cpp:
1822         (WebCore::PluginView::dispatchNPEvent):
1823         (WebCore::PluginView::setNPWindowIfNeeded):
1824         (WebCore::PluginView::platformStart):
1825         * plugins/win/PluginViewWin.cpp:
1826         (WebCore::PluginView::dispatchNPEvent):
1827         (WebCore::PluginView::handleKeyboardEvent):
1828         (WebCore::PluginView::handleMouseEvent):
1829         (WebCore::PluginView::setNPWindowRect):
1830         * testing/js/WebCoreTestSupport.cpp:
1831         (WebCoreTestSupport::injectInternalsObject):
1832         (WebCoreTestSupport::resetInternalsObject):
1833         * xml/XMLHttpRequest.cpp:
1834         (WebCore::XMLHttpRequest::dropProtection):
1835
1836 2012-06-22  Jeff Timanus  <twiz@chromium.org>
1837
1838         [Chromium] Change implementing a fast-path for copying GPU-accelerated Canvas2D instances to WebGL textures.
1839         https://bugs.webkit.org/show_bug.cgi?id=86275
1840
1841         This change adds the necessary plumbing to the various rendering contexts to copy the backing store texture of
1842         a Canvas2D instance to be copied to a WebGL texture.  The GL_CHROMIUM_copy_texture extension is necessary
1843         because the backing-store for a GPU-accelerated skia Canvas2D is normally in BGRA format, which is not supported
1844         by glCopyTexImage.
1845
1846         Reviewed by Kenneth Russell.
1847
1848         Test: fast/canvas/webgl/*
1849
1850         * html/canvas/WebGLRenderingContext.cpp:
1851         (WebCore):
1852         (WebCore::WebGLRenderingContext::texImage2D):
1853         * platform/chromium/support/Extensions3DChromium.cpp:
1854         (WebCore::Extensions3DChromium::copyTextureCHROMIUM):
1855         (WebCore):
1856         * platform/graphics/Extensions3D.h:
1857         (Extensions3D):
1858         * platform/graphics/ImageBuffer.cpp:
1859         (WebCore):
1860         (WebCore::ImageBuffer::copyToPlatformTexture):
1861         * platform/graphics/ImageBuffer.h:
1862         (WebCore):
1863         (ImageBuffer):
1864         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
1865         (WebCore::Canvas2DLayerBridge::backBufferTexture):
1866         (WebCore):
1867         * platform/graphics/chromium/Canvas2DLayerBridge.h:
1868         (Canvas2DLayerBridge):
1869         * platform/graphics/chromium/Extensions3DChromium.h:
1870         (Extensions3DChromium):
1871         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1872         (WebCore::Extensions3DOpenGL::copyTextureCHROMIUM):
1873         (WebCore):
1874         * platform/graphics/opengl/Extensions3DOpenGL.h:
1875         (Extensions3DOpenGL):
1876         * platform/graphics/qt/Extensions3DQt.cpp:
1877         (WebCore::Extensions3DQt::copyTextureCHROMIUM):
1878         (WebCore):
1879         * platform/graphics/qt/Extensions3DQt.h:
1880         (Extensions3DQt):
1881         * platform/graphics/skia/ImageBufferSkia.cpp:
1882         (WebCore::ImageBuffer::copyToPlatformTexture):
1883         (WebCore):
1884
1885 2012-06-22  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
1886
1887         Add url to supportsType
1888         https://bugs.webkit.org/show_bug.cgi?id=89514
1889
1890         Reviewed by Eric Carlson.
1891
1892         No new tests since there's no change on code behavior.
1893
1894         When a blob is created as the address for a Media Stream, the MediaEngine
1895         will ask it's players if they support that media. However, a player built
1896         for MediaStream needs to know to URL to decide if it's supported or not.
1897
1898         * dom/DOMImplementation.cpp:
1899         (WebCore::DOMImplementation::createDocument):
1900         * html/HTMLMediaElement.cpp:
1901         (WebCore::HTMLMediaElement::canPlayType):
1902         (WebCore::HTMLMediaElement::selectNextSourceChild):
1903         * html/HTMLMediaElement.h:
1904         * platform/graphics/MediaPlayer.cpp:
1905         (MediaPlayerFactory):
1906         (WebCore::MediaPlayerFactory::MediaPlayerFactory):
1907         (WebCore):
1908         (WebCore::textPlain):
1909         (WebCore::bestMediaEngineForTypeAndCodecs):
1910         (WebCore::MediaPlayer::load):
1911         (WebCore::MediaPlayer::loadWithNextMediaEngine):
1912         (WebCore::MediaPlayer::paint):
1913         (WebCore::MediaPlayer::supportsType):
1914         * platform/graphics/MediaPlayer.h:
1915         (WebCore):
1916         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1917         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType):
1918         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1919         (MediaPlayerPrivateAVFoundationCF):
1920         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1921         (MediaPlayerPrivateAVFoundationObjC):
1922         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1923         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
1924         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1925         (WebCore::MediaPlayerPrivate::supportsType):
1926         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
1927         (MediaPlayerPrivate):
1928         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1929         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1930         (MediaPlayerPrivateGStreamer):
1931         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1932         (MediaPlayerPrivateQTKit):
1933         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1934         (WebCore::MediaPlayerPrivateQTKit::supportsType):
1935         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
1936         (WebCore::MediaPlayerPrivateQt::supportsType):
1937         * platform/graphics/qt/MediaPlayerPrivateQt.h:
1938         (MediaPlayerPrivateQt):
1939         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1940         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsType):
1941         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
1942         (MediaPlayerPrivateQuickTimeVisualContext):
1943         * platform/graphics/wince/MediaPlayerPrivateWinCE.h:
1944         (MediaPlayerPrivate):
1945
1946 2012-06-22  Joshua Netterfield  <jnetterfield@rim.com>
1947
1948         [BlackBerry] Sanitize GLSL code using ANGLE.
1949
1950         BlackBerry port does not sanitize GLSL code with ANGLE
1951         https://bugs.webkit.org/show_bug.cgi?id=89583
1952
1953         Reviewed by Rob Buis.
1954
1955         No new tests are required.
1956
1957         * CMakeLists.txt: Added ANGLE requirment for CMake builds with WEBGL
1958         * platform/graphics/ANGLEWebKitBridge.h: Added include for ANGLE/ShaderLang.h in BlackBerry platform.
1959         * platform/graphics/GraphicsContext3D.h: Added include for ANGLEWebKitBridge.h in BlackBerry platform.
1960
1961 2012-06-22  Dan Bernstein  <mitz@apple.com>
1962
1963         RenderText’s minimum preferred width is incorrect when soft hyphens are used
1964         https://bugs.webkit.org/show_bug.cgi?id=89775
1965
1966         Reviewed by Simon Fraser.
1967
1968         Test: fast/text/soft-hyphen-min-preferred-width.html
1969
1970         * rendering/RenderText.cpp:
1971         (WebCore::hyphenWidth): Added this helper function.
1972         (WebCore::RenderText::computePreferredLogicalWidths): In places where this function tests
1973         for the soft hyphen character, added a check that the 'hyphens' style property is not set
1974         to 'none', because in that case soft hyphens are not break opportunities. Also added an
1975         explicit check to suppress break opportunities from isBreakable() if the occur after a
1976         soft hyphen and 'hyphens' is set to 'none'. Finally, when measuring text up to a potential
1977         line break, added the width of the hyphen string when needed.
1978
1979 2012-06-22  Dean Jackson  <dino@apple.com>
1980
1981         BitmapImage duplicates code to calculate size
1982         https://bugs.webkit.org/show_bug.cgi?id=89728
1983         <rdar://problem/11724321>
1984
1985         Reviewed by Darin Adler.
1986
1987         Add a new updateSize method to BitmapImage that
1988         avoids duplication in the size and
1989         sizeRespectingOrientation methods.
1990
1991         No new tests needed.
1992
1993         * platform/graphics/BitmapImage.cpp:
1994         (WebCore::BitmapImage::updateSize): new method that will set
1995         m_size and m_sizeRespectingOrientation if necessary.
1996         (WebCore):
1997         (WebCore::BitmapImage::size):
1998         (WebCore::BitmapImage::sizeRespectingOrientation): these each
1999         now call updateSize rather than duplicate the update code.
2000         * platform/graphics/BitmapImage.h:
2001         (BitmapImage):
2002
2003 2012-06-22  Erik Arvidsson  <arv@chromium.org>
2004
2005         [V8] Clean up visitDOMWrapper code
2006         https://bugs.webkit.org/show_bug.cgi?id=89774
2007
2008         Reviewed by Tony Chang.
2009
2010         This moves the check if domWrapperVisitorFunction is null into a function of the WrapperTypeInfo struct.
2011         This is so that users of WrapperTypeInfo does not need to know about the inner details of the struct.
2012         It also makes things more consistent since the other fields in the struct have these kind of functions.
2013
2014         This is a follow up change to http://trac.webkit.org/changeset/120854.
2015
2016         No new tests. Covered by existing tests.
2017
2018         * bindings/v8/V8GCController.cpp:
2019         (WebCore::GrouperVisitor::visitDOMWrapper): Call WrapperTypeInfo::visitDOMWrapper instead.
2020         * bindings/v8/WrapperTypeInfo.h:
2021         (WrapperTypeInfo):
2022         (WebCore::WrapperTypeInfo::visitDOMWrapper): If domWrapperVisitorFunction is non null call it.
2023
2024 2012-06-22  Jan Keromnes  <janx@linux.com>
2025
2026         Web Inspector: ExtensionPanel.onSearch listener doesn't work
2027         https://bugs.webkit.org/show_bug.cgi?id=89517
2028
2029         Reviewed by Yury Semikhatsky.
2030
2031         Added a test to see if listener fires on search:
2032         LayoutTests/inspector/extensions/extensions-panel.html
2033
2034         * inspector/front-end/ExtensionPanel.js:
2035         (WebInspector.ExtensionPanel.prototype.searchCanceled):
2036         (WebInspector.ExtensionPanel.prototype.performSearch):
2037         (WebInspector.ExtensionPanel.prototype.jumpToNextSearchResult):
2038         (WebInspector.ExtensionPanel.prototype.jumpToPreviousSearchResult):
2039
2040 2012-06-22  Brian Salomon  <bsalomon@google.com>
2041
2042         Increase the GrContext texture cache count cap to 2K
2043         https://bugs.webkit.org/show_bug.cgi?id=89761
2044
2045         Reviewed by Stephen White.
2046
2047         Tests: The change is for performance. The code is exercised by all the canvas 2d layout tests.
2048
2049         * platform/chromium/support/GraphicsContext3DPrivate.cpp:
2050
2051 2012-06-22  Silvia Pfeiffer  <silviapf@chromium.org>
2052
2053         [Chromium] Adjust the displayed elements of the new Chrome media controls.
2054         https://bugs.webkit.org/show_bug.cgi?id=89416
2055
2056         Reviewed by Eric Carlson.
2057
2058         No new tests - existing media tests cover these cases.
2059
2060         Remove the volume slider for videos without audio or media resource.
2061         Display the transport bar for videos without a media resource.
2062         Don't show the fullscreen button for
2063
2064         * html/shadow/MediaControlRootElementChromium.cpp:
2065         (WebCore::MediaControlRootElementChromium::reset):
2066         Don't display volume slider if media controller has no audio.
2067         Don't display fullscreen button if media controller supportsFullscreen().
2068         (WebCore::MediaControlRootElementChromium::reportedError):
2069         Don't hide the timeline for failed videos, e.g. where the resource doesn't load.
2070
2071 2012-06-22  Alexander Pavlov  <apavlov@chromium.org>
2072
2073         Web Inspector: [Elements] Right-clicking on whitespace should show the same context menu as right-clicking on the tag text
2074         https://bugs.webkit.org/show_bug.cgi?id=89766
2075
2076         Reviewed by Vsevolod Vlasov.
2077
2078         Explicitly check for the TreeElement.representedObject's nodeType()
2079         rather than for the event target's enclosing element class.
2080         Drive-by: do not consider the "collapsed node has children" ellipsis as a text node.
2081
2082         * inspector/front-end/ElementsTreeOutline.js:
2083         (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
2084
2085 2012-06-22  Florin Malita  <fmalita@chromium.org>
2086
2087         REGRESSION (Safari 5.1.5 - ToT): Crash in RenderSVGRoot::computeReplacedLogicalWidth
2088         https://bugs.webkit.org/show_bug.cgi?id=85797
2089
2090         Reviewed by Darin Adler.
2091
2092         Test: svg/custom/svg-width-intrinsic-crash.html
2093
2094         RenderSVGRoot::computeReplacedLogicalWidth assumes that if
2095         SVGSVGElement::widthAttributeEstablishesViewport returns false, the
2096         SVG must be embedded via <object>. This is not always the case, though:
2097         widthAttributeEstablishesViewport can also return false for inline
2098         SVG if it doesn't have a replaced logical width.
2099
2100         Updated computeReplacedLogical{Width,Height} to handle the
2101         !widthAttributeEstablishesViewport && !isEmbeddedThroughFrameContainingSVGDocument
2102         case gracefully.
2103
2104         * rendering/svg/RenderSVGRoot.cpp:
2105         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
2106         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
2107
2108 2012-06-22  Hayato Ito  <hayato@chromium.org>
2109
2110         Modify event re-targeting algorithm so that we can tell which distributed node is clicked.
2111         https://bugs.webkit.org/show_bug.cgi?id=89073
2112
2113         Reviewed by Dimitri Glazkov.
2114
2115         Re-landing r120945 since bug 89172 was resolved.
2116
2117         Adopt a new event re-targeting algorithm in the latest Shadow DOM spec.
2118         The corresponding bug in the shadow DOM spec is:
2119         https://www.w3.org/Bugs/Public/show_bug.cgi?id=17090
2120
2121         This change is introduced to handle the following use case:
2122         1. There is an insertion point, with zero or more nodes distributed into it.
2123         2. User clicks on one of the items.
2124         3. The event handler in shadow DOM subtree wants to know which item was clicked on.
2125
2126         The new re-targeting algorithm sets an event's target to a
2127         distributed node where an event was originally fired, instead of
2128         an insertion point to where the node is distributed.
2129
2130         The similar re-targeting algorithm also applies to an event's
2131         relatedTarget.
2132
2133         Test: fast/dom/shadow/shadow-dom-event-dispatching.html
2134
2135         * dom/EventDispatcher.cpp:
2136         (WebCore::EventRelatedTargetAdjuster::adjust):
2137         (WebCore::EventDispatcher::ensureEventAncestors):
2138
2139 2012-06-22  Andrey Kosyakov  <caseq@chromium.org>
2140
2141         Unreviewed follow-up to r121030, fix display of "Duration" in timeline event details popup.
2142
2143         * inspector/front-end/TimelinePresentationModel.js:
2144         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
2145
2146 2012-06-22  Kenneth Russell  <kbr@google.com>
2147
2148         Unreviewed, rolling out r121025.
2149         http://trac.webkit.org/changeset/121025
2150         https://bugs.webkit.org/show_bug.cgi?id=89580
2151
2152         Caused crash in
2153         EventHandler.shouldTurnVerticalTicksIntoHorizontal webkit unit
2154         test on 10.7
2155
2156         * page/EventHandler.cpp:
2157         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2158         (WebCore::EventHandler::handleWheelEvent):
2159         * page/EventHandler.h:
2160         (EventHandler):
2161         * page/chromium/EventHandlerChromium.cpp:
2162         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2163         * page/gtk/EventHandlerGtk.cpp:
2164         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2165
2166 2012-06-21  Andrey Kosyakov  <caseq@chromium.org>
2167
2168         Web Inspector: only increase length for timeline bars below minimal width
2169         https://bugs.webkit.org/show_bug.cgi?id=89727
2170
2171         Reviewed by Pavel Feldman.
2172
2173         * inspector/front-end/TimelinePanel.js:
2174         (WebInspector.TimelineCalculator.prototype.computeBarGraphWindowPosition):
2175         (WebInspector.TimelineCalculator.prototype.setDisplayWindow):
2176         (WebInspector.TimelineRecordGraphRow.prototype.update):
2177
2178 2012-06-22  David Kilzer  <ddkilzer@apple.com>
2179
2180         BUILD FIX: FormController.cpp fails to build on 32-bit architectures
2181
2182         This fixes the following build failure introduced in r121004 for
2183         Bug 89628:
2184
2185             FormController.cpp:62:36: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
2186                 state.m_values.reserveCapacity(valueSize);
2187                 ~~~~~                          ^~~~~~~~~
2188
2189         * html/FormController.cpp:
2190         (WebCore::FormControlState::deserialize): Change type of
2191         valueSize from uint64_t to size_t.
2192
2193 2012-06-22  Abhishek Arya  <inferno@chromium.org>
2194
2195         Crash in DragController::concludeEditDrag.
2196         https://bugs.webkit.org/show_bug.cgi?id=89762
2197
2198         Reviewed by Ryosuke Niwa.
2199
2200         RefPtr the innerFrame since it can get destroyed due to mutation
2201         event fired in DragController::dispatchTextInputEventFor().
2202
2203         Test: editing/pasteboard/drop-text-events-sideeffect-crash.html
2204
2205         * page/DragController.cpp:
2206         (WebCore::DragController::concludeEditDrag):
2207
2208 2012-06-22  Andrey Kosyakov  <caseq@chromium.org>
2209
2210         Web Inspector: timeline event details popup misses CPU time
2211         https://bugs.webkit.org/show_bug.cgi?id=89765
2212
2213         Reviewed by Pavel Feldman.
2214
2215         * inspector/front-end/TimelinePresentationModel.js:
2216         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
2217
2218 2012-06-22  Peter Beverloo  <peter@chromium.org>
2219
2220         [Chromium] Disable c++0x compatibility warnings in JavaScriptCore.gyp when building for Android
2221         https://bugs.webkit.org/show_bug.cgi?id=88853
2222
2223         Reviewed by Steve Block.
2224
2225         The Android exclusions were necessary to fix a gyp generation error, as
2226         the gcc_version variable wasn't being defined for Android. Remove these
2227         exceptions when Chromium is able to define the gcc_version variable.
2228
2229         * WebCore.gyp/WebCore.gyp:
2230
2231 2012-06-22  Takashi Sakamoto  <tasak@google.com>
2232
2233         [Shadow] parentTreeScope() of nested shadow DOM subtree returns document().
2234         https://bugs.webkit.org/show_bug.cgi?id=89172
2235
2236         Reviewed by Hajime Morita.
2237
2238         Added setParentTreeScope to set parent treescope of shadow root to be
2239         host's treescope in ElementShadow::addShadowRoot.
2240
2241         Test: fast/dom/shadow/parent-tree-scope-in-shadow.html
2242
2243         * dom/ElementShadow.cpp:
2244         (WebCore::ElementShadow::addShadowRoot):
2245         Added setParentTreeScope.
2246         * testing/Internals.cpp:
2247         (WebCore::Internals::parentTreeScope):
2248         Newly added. This method returns a parent tree scope's root node of
2249         a given node, because a tree scope's root node is either document node
2250         or shadow root node and both nodes derive from TreeScope. So root nodes
2251         are treated as TreeScope.
2252         * testing/Internals.h:
2253         (Internals):
2254         * testing/Internals.idl:
2255         Added parentTreeScope.
2256
2257 2012-06-22  Tony Chang  <tony@chromium.org>
2258
2259         -webkit-flex-flow shouldn't be an enumerable property of the computed style
2260         https://bugs.webkit.org/show_bug.cgi?id=89698
2261
2262         Reviewed by Ojan Vafai.
2263
2264         flex-flow is a shorthand for flex-direction and flex-wrap:
2265         http://dev.w3.org/csswg/css3-flexbox/#flex-flow-property
2266         Shorthand properties should not be enumerable in the computed style, although you can still
2267         get the value from the computed style.
2268
2269         Tests: css3/flexbox/css-properties.html: New test case added.
2270
2271         * css/CSSComputedStyleDeclaration.cpp:
2272         (WebCore):
2273
2274 2012-06-22  Robert Kroeger  <rjkroege@chromium.org>
2275
2276         Suppress horizontal conversion of PlatformWheelEvents when hasPreciseScrollingDeltas is true
2277         https://bugs.webkit.org/show_bug.cgi?id=89580
2278
2279         WebKit GTK and Chromium Linux force vertical wheel events to
2280         scroll horizontally when over horizontal scroll bars.  This is
2281         undesirable for touchpad scrolling with
2282         hasPreciseScrollingDeltas() == true. Modified shouldTurnVerticalTicksIntoHorizontal
2283         to not perform this conversion for PlatformWheelEvents with preciseScrollingDeltas.
2284
2285         Reviewed by Adam Barth.
2286
2287         Unit tests in EventHandlerTest.cpp
2288
2289         * page/EventHandler.cpp:
2290         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): 
2291         (WebCore::EventHandler::handleWheelEvent):
2292         * page/EventHandler.h:
2293         (EventHandler):
2294         * page/chromium/EventHandlerChromium.cpp:
2295         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2296         * page/gtk/EventHandlerGtk.cpp:
2297         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2298
2299 2012-06-22  Ilya Tikhonovsky  <loislo@chromium.org>
2300
2301         Web Inspector: partially instrument DOM Tree native memory.
2302         https://bugs.webkit.org/show_bug.cgi?id=89568
2303
2304         This patch adds MemoryInstrumentation class that counts all visited
2305         objects and calls reportMemoryUsage for the instrumented classes.
2306
2307         Reviewed by Yury Semikhatsky.
2308
2309         * GNUmakefile.list.am:
2310         * Target.pri:
2311         * WebCore.gypi:
2312         * WebCore.vcproj/WebCore.vcproj:
2313         * WebCore.xcodeproj/project.pbxproj:
2314         * bindings/js/ScriptWrappable.h:
2315         (WebCore::ScriptWrappable::reportMemoryUsage):
2316         (ScriptWrappable):
2317         * bindings/v8/ScriptWrappable.h:
2318         (WebCore::ScriptWrappable::reportMemoryUsage):
2319         (ScriptWrappable):
2320         * css/StylePropertySet.h:
2321         (WebCore::StylePropertySet::reportMemoryUsage):
2322         (StylePropertySet):
2323         * dom/ContainerNode.h:
2324         (WebCore::ContainerNode::reportMemoryUsage):
2325         (ContainerNode):
2326         * dom/Element.h:
2327         (WebCore::Element::reportMemoryUsage):
2328         (Element):
2329         * dom/ElementAttributeData.h:
2330         (WebCore::ElementAttributeData::reportMemoryUsage):
2331         (ElementAttributeData):
2332         * dom/MemoryInstrumentation.h: Added.
2333         (WebCore):
2334         (MemoryInstrumentation):
2335         (WebCore::MemoryInstrumentation::~MemoryInstrumentation):
2336         (WebCore::MemoryInstrumentation::reportObject):
2337         (WebCore::MemoryInstrumentation::reportPointer):
2338         (MemoryObjectInfo):
2339         (WebCore::MemoryObjectInfo::MemoryObjectInfo):
2340         (WebCore::MemoryObjectInfo::reportInstrumentedPointer):
2341         (WebCore::MemoryObjectInfo::reportPointer):
2342         (WebCore::MemoryObjectInfo::reportInstrumentedObject):
2343         (WebCore::MemoryObjectInfo::reportObject):
2344         (WebCore::MemoryObjectInfo::reportObjectInfo):
2345         (WebCore::MemoryObjectInfo::objectType):
2346         (WebCore::MemoryObjectInfo::objectSize):
2347         (WebCore::MemoryInstrumentation::reportInstrumentedPointer):
2348         (WebCore::MemoryInstrumentation::reportInstrumentedObject):
2349         * dom/Node.cpp:
2350         (WebCore::Node::reportMemoryUsage):
2351         (WebCore):
2352         * dom/Node.h:
2353         (Node):
2354         * dom/QualifiedName.h:
2355         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
2356         (WebCore::QualifiedName::reportMemoryUsage):
2357         * inspector/InspectorMemoryAgent.cpp:
2358         (MemoryBlockName):
2359         (WebCore):
2360         (WebCore::addMemoryBlockFor):
2361         (WebCore::domTreeInfo):
2362         (WebCore::memoryCacheInfo):
2363         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2364         * platform/TreeShared.h:
2365         (WebCore::TreeShared::reportMemoryUsage):
2366         (TreeShared):
2367
2368 2012-06-22  Peter Rybin  <peter.rybin@gmail.com>
2369
2370         Web Inspector: Support 'Restart frame' in inspector frontend
2371         https://bugs.webkit.org/show_bug.cgi?id=89678
2372
2373         Reviewed by Pavel Feldman.
2374
2375         Action is added to call frame placard's context menu. Context menu is now built
2376         on a call frame level rather than on callback sidebar level.
2377
2378         * English.lproj/localizedStrings.js:
2379         * inspector/front-end/CallStackSidebarPane.js:
2380         (WebInspector.CallStackSidebarPane):
2381         (WebInspector.CallStackSidebarPane.prototype.update):
2382         (WebInspector.CallStackSidebarPane.Placard):
2383         (WebInspector.CallStackSidebarPane.Placard.prototype._update):
2384         (WebInspector.CallStackSidebarPane.Placard.prototype._placardContextMenu):
2385         (_restartFrame):
2386         * inspector/front-end/DebuggerModel.js:
2387         (WebInspector.DebuggerModel.prototype.rawLocationToUILocation):
2388         (WebInspector.DebuggerModel.prototype.callStackModified):
2389         (WebInspector.DebuggerModel.CallFrame.prototype.restart):
2390         * inspector/front-end/Script.js:
2391         (WebInspector.Script.prototype.editSource):
2392
2393 2012-06-22  Jocelyn Turcotte  <turcotte.j@gmail.com>
2394
2395         [Qt] Fix the remote inspector loading problems on Mac
2396         https://bugs.webkit.org/show_bug.cgi?id=89747
2397
2398         Reviewed by Simon Hausmann.
2399
2400         Make sure that the state of a SocketStreamHandle is set properly
2401         when created from an existing QTcpSocket.
2402
2403         This fixes the inspectorserver Qt api auto test on Mac.
2404
2405         * platform/network/qt/SocketStreamHandleQt.cpp:
2406         (WebCore::SocketStreamHandle::SocketStreamHandle):
2407
2408 2012-06-22  Yoshifumi Inoue  <yosin@chromium.org>
2409
2410         REGRESSION(r117738):[Forms] validationMessage IDL attribute should not have range overflow message if value isn't range overflow
2411         https://bugs.webkit.org/show_bug.cgi?id=89736
2412
2413         Reviewed by Kent Tamura.
2414
2415         Tests: fast/forms/date/input-date-validation-message.html
2416                fast/forms/number/input-number-validation-message.html
2417                fast/forms/range/input-range-validation-message.html
2418
2419         This patch changes comparison operator for range overflow message in
2420         InputType::validationMessage().
2421
2422         * html/InputType.cpp:
2423         (WebCore::InputType::validationMessage):
2424
2425 2012-06-22  Taiju Tsuiki  <tzik@chromium.org>
2426
2427         Web Inspector: Add frontend-side Entry object to FileSystemModel
2428         https://bugs.webkit.org/show_bug.cgi?id=89739
2429
2430         Reviewed by Vsevolod Vlasov.
2431
2432         * inspector/front-end/FileSystemModel.js:
2433         (WebInspector.FileSystemModel.prototype._fileSystemRootReceived):
2434         (WebInspector.FileSystemModel.prototype.requestDirectoryContent):
2435         (WebInspector.FileSystemModel.prototype._directoryContentReceived):
2436         (WebInspector.FileSystemModel.FileSystem):
2437         (WebInspector.FileSystemModel.Entry):
2438         (WebInspector.FileSystemModel.Entry.prototype.get fileSystemModel):
2439         (WebInspector.FileSystemModel.Entry.prototype.get fileSystem):
2440         (WebInspector.FileSystemModel.Entry.prototype.get url):
2441         (WebInspector.FileSystemModel.Entry.prototype.get name):
2442         (WebInspector.FileSystemModel.Entry.prototype.get isDirectory):
2443         (WebInspector.FileSystemModel.Directory):
2444         (WebInspector.FileSystemModel.Directory.prototype.requestDirectoryContent):
2445         (WebInspector.FileSystemModel.File):
2446         (WebInspector.FileSystemModel.File.prototype.get mimeType):
2447         (WebInspector.FileSystemModel.File.prototype.get resourceType):
2448
2449 2012-06-22  Amy Ousterhout  <aousterh@chromium.org>
2450
2451         Renamed DeviceOrientation to DeviceOrientationData
2452         https://bugs.webkit.org/show_bug.cgi?id=88663
2453
2454         Reviewed by Steve Block.
2455
2456         No new tests because this is simply a name change.
2457
2458         Renamed DeviceOrientation to DeviceOrientationData in order to be consistent with DeviceMotionData.
2459         Updated all files that use DeviceOrientation.
2460   
2461         * CMakeLists.txt:
2462         * GNUmakefile.list.am:
2463         * Target.pri:
2464         * WebCore.exp.in:
2465         * WebCore.gypi:
2466         * WebCore.vcproj/WebCore.vcproj:
2467         * WebCore.xcodeproj/project.pbxproj:
2468         * bindings/js/JSDeviceOrientationEventCustom.cpp:
2469         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
2470         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
2471         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
2472         * dom/DOMAllInOne.cpp:
2473         * dom/DeviceOrientationClient.h:
2474         (WebCore):
2475         (DeviceOrientationClient):
2476         * dom/DeviceOrientationController.cpp:
2477         (WebCore::DeviceOrientationController::timerFired):
2478         (WebCore::DeviceOrientationController::didChangeDeviceOrientation):
2479         * dom/DeviceOrientationController.h:
2480         (WebCore):
2481         (DeviceOrientationController):
2482         * dom/DeviceOrientationData.cpp: Renamed from Source/WebCore/dom/DeviceOrientation.cpp.
2483         (WebCore):
2484         (WebCore::DeviceOrientationData::create):
2485         (WebCore::DeviceOrientationData::DeviceOrientationData):
2486         (WebCore::DeviceOrientationData::alpha):
2487         (WebCore::DeviceOrientationData::beta):
2488         (WebCore::DeviceOrientationData::gamma):
2489         (WebCore::DeviceOrientationData::absolute):
2490         (WebCore::DeviceOrientationData::canProvideAlpha):
2491         (WebCore::DeviceOrientationData::canProvideBeta):
2492         (WebCore::DeviceOrientationData::canProvideGamma):
2493         (WebCore::DeviceOrientationData::canProvideAbsolute):
2494         * dom/DeviceOrientationData.h: Renamed from Source/WebCore/dom/DeviceOrientation.h.
2495         (WebCore):
2496         (DeviceOrientationData):
2497         * dom/DeviceOrientationEvent.cpp:
2498         (WebCore::DeviceOrientationEvent::DeviceOrientationEvent):
2499         (WebCore::DeviceOrientationEvent::initDeviceOrientationEvent):
2500         * dom/DeviceOrientationEvent.h:
2501         (WebCore):
2502         (WebCore::DeviceOrientationEvent::create):
2503         (DeviceOrientationEvent):
2504         (WebCore::DeviceOrientationEvent::orientation):
2505         * loader/EmptyClients.h:
2506         (WebCore::EmptyDeviceOrientationClient::lastOrientation):
2507         * platform/mock/DeviceOrientationClientMock.cpp:
2508         (WebCore::DeviceOrientationClientMock::setOrientation):
2509         * platform/mock/DeviceOrientationClientMock.h:
2510         (WebCore::DeviceOrientationClientMock::lastOrientation):
2511         (DeviceOrientationClientMock):
2512         * platform/qt/DeviceOrientationClientQt.cpp:
2513         (DeviceOrientationClientQt):
2514         * platform/qt/DeviceOrientationClientQt.h:
2515         (DeviceOrientationClientQt):
2516         * platform/qt/DeviceOrientationProviderQt.h:
2517         (DeviceOrientationProviderQt):
2518  
2519 2012-06-21  Vsevolod Vlasov  <vsevik@chromium.org>
2520
2521         Web Inspector: Support separate script compilation and execution.
2522         https://bugs.webkit.org/show_bug.cgi?id=89646
2523
2524         Reviewed by Pavel Feldman.
2525
2526         Separate script compilation and run commands added to protocol and DebuggerAgent.
2527         Separate script compilation and run implemented in v8 ScriptDebugServer, stubs added for js implementation.
2528
2529         Test: inspector/debugger/debugger-compile-and-run.html
2530
2531         * bindings/js/ScriptDebugServer.cpp:
2532         (WebCore::ScriptDebugServer::compileScript):
2533         (WebCore):
2534         (WebCore::ScriptDebugServer::clearCompiledScripts):
2535         (WebCore::ScriptDebugServer::runScript):
2536         * bindings/js/ScriptDebugServer.h:
2537         (WebCore::ScriptDebugServer::supportsSeparateScriptCompilationAndExecution):
2538         (ScriptDebugServer):
2539         * bindings/v8/PageScriptDebugServer.cpp:
2540         (WebCore::PageScriptDebugServer::compileScript):
2541         (WebCore):
2542         (WebCore::PageScriptDebugServer::clearCompiledScripts):
2543         (WebCore::PageScriptDebugServer::runScript):
2544         * bindings/v8/PageScriptDebugServer.h:
2545         (PageScriptDebugServer):
2546         * bindings/v8/ScriptDebugServer.cpp:
2547         (WebCore::ScriptDebugServer::compileScript):
2548         (WebCore):
2549         (WebCore::ScriptDebugServer::clearCompiledScripts):
2550         (WebCore::ScriptDebugServer::runScript):
2551         * bindings/v8/ScriptDebugServer.h:
2552         (WebCore):
2553         (WebCore::ScriptDebugServer::supportsSeparateScriptCompilationAndExecution):
2554         (ScriptDebugServer):
2555         * inspector/Inspector.json:
2556         * inspector/InspectorDebuggerAgent.cpp:
2557         (WebCore::InspectorDebuggerAgent::disable):
2558         (WebCore::InspectorDebuggerAgent::supportsSeparateScriptCompilationAndExecution):
2559         (WebCore):
2560         (WebCore::InspectorDebuggerAgent::compileScript):
2561         (WebCore::InspectorDebuggerAgent::runScript):
2562         * inspector/InspectorDebuggerAgent.h:
2563         (InspectorDebuggerAgent):
2564         (WebCore::InspectorDebuggerAgent::injectedScriptManager):
2565         * inspector/PageDebuggerAgent.cpp:
2566         (WebCore::PageDebuggerAgent::injectedScriptForEval):
2567         (WebCore):
2568         * inspector/PageDebuggerAgent.h:
2569         (PageDebuggerAgent):
2570         * inspector/WorkerDebuggerAgent.cpp:
2571         (WebCore::WorkerDebuggerAgent::injectedScriptForEval):
2572         (WebCore):
2573         * inspector/WorkerDebuggerAgent.h:
2574         (WorkerDebuggerAgent):
2575         * inspector/front-end/Settings.js:
2576         * inspector/front-end/inspector.js:
2577         (WebInspector.doLoadedDone):
2578
2579 2012-06-22  Joseph Pecoraro  <pecoraro@apple.com>
2580
2581         Web Inspector: InspectorState::updateCookie should not do JSON serialization if unsupported
2582         https://bugs.webkit.org/show_bug.cgi?id=89743
2583
2584         Since all InspectorClient's are InspectorStateClient's provide a
2585         virtual accessor that determines whether or not InspectorClient updates
2586         are supported or not.
2587
2588         Reviewed by Yury Semikhatsky.
2589
2590         * inspector/InspectorState.cpp:
2591         (WebCore::InspectorState::updateCookie):
2592         Don't serialize and message the client if the client doesn't do anything with it.
2593
2594         * inspector/InspectorStateClient.h:
2595         * inspector/WorkerInspectorController.cpp:
2596         (WebCore::InspectorStateClient::supportsInspectorStateUpdates):
2597         Let the client say whether or not supports updates or not.
2598
2599 2012-06-21  Sheriff Bot  <webkit.review.bot@gmail.com>
2600
2601         Unreviewed, rolling out r120982.
2602         http://trac.webkit.org/changeset/120982
2603         https://bugs.webkit.org/show_bug.cgi?id=89740
2604
2605         [chromium] ASSERTION FAILED:
2606         m_allocatedTextureIds.contains(textureId) (Requested by ukai
2607         on #webkit).
2608
2609         * platform/graphics/chromium/LayerRendererChromium.cpp:
2610         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChangedOnImpl):
2611         (WebCore::LayerRendererChromium::LayerRendererChromium):
2612         (WebCore::LayerRendererChromium::initialize):
2613         (WebCore::LayerRendererChromium::setVisible):
2614         (WebCore::LayerRendererChromium::swapBuffers):
2615         (WebCore::LayerRendererChromium::getFramebufferPixels):
2616         * platform/graphics/chromium/LayerRendererChromium.h:
2617         (WebCore):
2618         (LayerRendererChromium):
2619         * platform/graphics/chromium/TextureManager.cpp:
2620         * platform/graphics/chromium/TextureManager.h:
2621         (TextureAllocator):
2622         (TextureManager):
2623         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
2624         (WebCore::TrackingTextureAllocator::createTexture):
2625         (WebCore::TrackingTextureAllocator::deleteTexture):
2626         * platform/graphics/chromium/TrackingTextureAllocator.h:
2627         (TrackingTextureAllocator):
2628         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2629         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2630         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
2631         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
2632         (WebCore::CCLayerTreeHost::setNeedsForcedCommit):
2633         (WebCore):
2634         (WebCore::CCLayerTreeHost::setVisible):
2635         (WebCore::CCLayerTreeHost::setContentsMemoryAllocationLimitBytes):
2636         (WebCore::CCLayerTreeHost::updateLayers):
2637         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2638         (CCLayerTreeHost):
2639         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2640         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2641         (WebCore::CCLayerTreeHostImpl::commitComplete):
2642         (WebCore::CCLayerTreeHostImpl::canDraw):
2643         (WebCore::CCLayerTreeHostImpl::context):
2644         (WebCore::CCLayerTreeHostImpl::setContentsMemoryAllocationLimitBytes):
2645         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2646         (CCLayerTreeHostImplClient):
2647         (WebCore::CCLayerTreeHostImpl::sourceFrameCanBeDrawn):
2648         (WebCore::CCLayerTreeHostImpl::setSourceFrameCanBeDrawn):
2649         (CCLayerTreeHostImpl):
2650         * platform/graphics/chromium/cc/CCProxy.h:
2651         (CCProxy):
2652         * platform/graphics/chromium/cc/CCRenderer.h:
2653         (CCRendererClient):
2654         * platform/graphics/chromium/cc/CCScheduler.cpp:
2655         (WebCore::CCScheduler::beginFrameComplete):
2656         (WebCore::CCScheduler::didSwapBuffersComplete):
2657         (WebCore::CCScheduler::didLoseContext):
2658         (WebCore::CCScheduler::didRecreateContext):
2659         (WebCore::CCScheduler::vsyncTick):
2660         * platform/graphics/chromium/cc/CCScheduler.h:
2661         (CCScheduler):
2662         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
2663         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
2664         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2665         (WebCore::CCSingleThreadProxy::setNeedsForcedCommit):
2666         (WebCore):
2667         (WebCore::CCSingleThreadProxy::stop):
2668         (WebCore::CCSingleThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
2669         (WebCore::CCSingleThreadProxy::commitAndComposite):
2670         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
2671         (CCSingleThreadProxy):
2672         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2673         (WebCore::CCThreadProxy::CCThreadProxy):
2674         (WebCore::CCThreadProxy::compositeAndReadback):
2675         (WebCore::CCThreadProxy::setNeedsForcedCommit):
2676         (WebCore):
2677         (WebCore::CCThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
2678         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
2679         (WebCore::CCThreadProxy::beginFrame):
2680         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
2681         (WebCore::CCThreadProxy::setContentsMemoryAllocationLimitBytes):
2682         (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread):
2683         * platform/graphics/chromium/cc/CCThreadProxy.h:
2684         (CCThreadProxy):
2685         (BeginFrameAndCommitState):
2686         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2687         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
2688         (WebCore::CCVideoLayerImpl::willDraw):
2689         (WebCore::CCVideoLayerImpl::willDrawInternal):
2690         (WebCore::CCVideoLayerImpl::FramePlane::allocateData):
2691         (WebCore::CCVideoLayerImpl::FramePlane::freeData):
2692         (WebCore::CCVideoLayerImpl::allocatePlaneData):
2693         (WebCore::CCVideoLayerImpl::freePlaneData):
2694         (WebCore::CCVideoLayerImpl::freeUnusedPlaneData):
2695         (WebCore::CCVideoLayerImpl::didLoseContext):
2696         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
2697         (FramePlane):
2698
2699 2012-06-21  Kent Tamura  <tkent@chromium.org>
2700
2701         Make FormControlState capable to store multiple values
2702         https://bugs.webkit.org/show_bug.cgi?id=89628
2703
2704         Reviewed by Hajime Morita.
2705
2706         Make FormControlState capable to store multiple values in order to
2707         clean FileInputType.cpp up and prepare to fix Bug 89623.
2708
2709         No new tests. This doesn't change web-exposed behavior, and
2710         fast/forms/file/recover-file-input-in-unposted-form.html covers
2711         major part of this change.
2712
2713         * html/FormController.cpp:
2714         (WebCore::FormControlState::serializeTo): Support for two or more values.
2715         (WebCore::FormControlState::deserialize): ditto.
2716         (WebCore::formStateSignature):
2717         Bump up the version because the state format for <input type=file> is changed.
2718         * html/FormController.h:
2719          - String m_value -> Vector<String> m_values
2720          - Add some functions.
2721          - Remove hasValue() and value().
2722         (WebCore::FormControlState::FormControlState): m_value -> m_values.
2723         (WebCore::FormControlState::valueSize): Added.
2724         (WebCore::FormControlState::operator[]): Added.
2725         (FormControlState): Add append() declaration, etc.
2726         (WebCore::FormControlState::operator=): m_value -> m_values
2727         (WebCore::FormControlState::append): Added.
2728
2729         * html/HTMLFormControlElementWithState.cpp:
2730         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
2731         Use valueSize() instead of hasValue().
2732         * html/HTMLFormControlElementWithState.h:
2733         (HTMLFormControlElementWithState): Update the comment.
2734
2735         * html/FileInputType.cpp:
2736         (WebCore::FileInputType::saveFormControlState):
2737         Use multiple value capability of FormControlState
2738         (WebCore::FileInputType::restoreFormControlState): ditto.
2739
2740         * html/BaseCheckableInputType.cpp:
2741         (WebCore::BaseCheckableInputType::restoreFormControlState): Use [0] instead of value().
2742         * html/HTMLSelectElement.cpp:
2743         (WebCore::HTMLSelectElement::restoreFormControlState): ditto.
2744         * html/HTMLTextAreaElement.cpp:
2745         (WebCore::HTMLTextAreaElement::restoreFormControlState): ditto.
2746         * html/HiddenInputType.cpp:
2747         (WebCore::HiddenInputType::restoreFormControlState): ditto.
2748         * html/InputType.cpp:
2749         (WebCore::InputType::restoreFormControlState): ditto.
2750
2751 2012-06-21  Ryosuke Niwa  <rniwa@webkit.org>
2752
2753         LabelsNodeList isn't updated properly after its owner node is adopted into a new document
2754         https://bugs.webkit.org/show_bug.cgi?id=89730
2755
2756         Reviewed by Darin Adler.
2757
2758         When a node is adopted, node lists that are invalidated at document level need to be unregistered
2759         from old document and registered to new document so that DOM mutations in new document will invalidate
2760         caches in the node lists. Done that in NodeListsNodeData::adoptTreeScope, which was extracted from
2761         TreeScopeAdopter::moveTreeToNewScope.
2762
2763         Also renamed DynamicNodeList::node() and m_node to rootNode() and m_ownerNode to better express
2764         their semantics and added ownerNode() to make m_ownerNode private to DynamicNodeList.
2765
2766         Test: fast/forms/label/labels-owner-node-adopted.html
2767
2768         * bindings/js/JSNodeListCustom.cpp:
2769         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
2770         * dom/ChildNodeList.cpp:
2771         (WebCore::ChildNodeList::~ChildNodeList):
2772         (WebCore::ChildNodeList::length):
2773         (WebCore::ChildNodeList::item):
2774         (WebCore::ChildNodeList::nodeMatches):
2775         * dom/ClassNodeList.cpp:
2776         (WebCore::ClassNodeList::ClassNodeList):
2777         (WebCore::ClassNodeList::~ClassNodeList):
2778         * dom/DynamicNodeList.cpp:
2779         (WebCore::DynamicSubtreeNodeList::length):
2780         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
2781         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
2782         (WebCore::DynamicSubtreeNodeList::item):
2783         (WebCore::DynamicNodeList::itemWithName):
2784         * dom/DynamicNodeList.h:
2785         (WebCore::DynamicNodeList::DynamicNodeList):
2786         (WebCore::DynamicNodeList::ownerNode):
2787         (WebCore::DynamicNodeList::rootedAtDocument):
2788         (WebCore::DynamicNodeList::shouldInvalidateOnAttributeChange):
2789         (WebCore::DynamicNodeList::rootNode):
2790         (WebCore::DynamicNodeList::document):
2791         (DynamicNodeList):
2792         * dom/NameNodeList.cpp:
2793         (WebCore::NameNodeList::~NameNodeList):
2794         * dom/NodeRareData.h:
2795         (WebCore::NodeListsNodeData::adoptTreeScope):
2796         (NodeListsNodeData):
2797         * dom/TagNodeList.cpp:
2798         (WebCore::TagNodeList::~TagNodeList):
2799         * dom/TreeScopeAdopter.cpp:
2800         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2801         * html/LabelsNodeList.cpp:
2802         (WebCore::LabelsNodeList::~LabelsNodeList):
2803         (WebCore::LabelsNodeList::nodeMatches):
2804         * html/RadioNodeList.cpp:
2805         (WebCore::RadioNodeList::~RadioNodeList):
2806         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
2807
2808 2012-06-21  Alexei Filippov  <alexeif@chromium.org>
2809
2810         Web Inspector: Properly display native memory sizes bigger than 2GB
2811         https://bugs.webkit.org/show_bug.cgi?id=89661
2812
2813         Reviewed by Pavel Feldman.
2814
2815         * inspector/Inspector.json:
2816         * inspector/InspectorMemoryAgent.cpp:
2817         (WebCore::jsHeapInfo):
2818         (WebCore::inspectorData):
2819         (WebCore::renderTreeInfo):
2820         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2821
2822 2012-06-21  Abhishek Arya  <inferno@chromium.org>
2823
2824         Crash in RenderBlock::layoutPositionedObjects.
2825         https://bugs.webkit.org/show_bug.cgi?id=89599
2826
2827         Reviewed by Julien Chaffraix.
2828
2829         Test: fast/table/table-split-positioned-object-crash.html
2830
2831         * rendering/RenderBlock.cpp:
2832         (WebCore::RenderBlock::splitBlocks): no longer need to explicitly call
2833         removePositionedObjects, since it is part of moveChildrenTo.
2834         * rendering/RenderBlock.h:
2835         (WebCore::RenderBlock::hasPositionedObjects): helper to tell if we have
2836         positioned objects in our list.
2837         * rendering/RenderBox.cpp:
2838         (WebCore::RenderBox::splitAnonymousBoxesAroundChild): Like r102263, this
2839         condition was wrong and while moving children across completely different 
2840         trees, we need fullRemoveInsert as true.
2841         * rendering/RenderBoxModelObject.cpp:
2842         (WebCore::RenderBoxModelObject::moveChildTo): see code comment.
2843         (WebCore::RenderBoxModelObject::moveChildrenTo): see code comment. 
2844
2845 2012-06-21  Kwang Yul Seo  <skyul@company100.net>
2846
2847         Make HTMLDocumentParser::create(DocumentFragment*,Element*, FragmentScriptingPermission) private.
2848         https://bugs.webkit.org/show_bug.cgi?id=89724
2849
2850         Reviewed by Darin Adler.
2851
2852         It is used only by HTMLDocumentParser::parseDocumentFragment. No behavioral changes.
2853
2854         * html/parser/HTMLDocumentParser.h:
2855         (WebCore::HTMLDocumentParser::create):
2856         (HTMLDocumentParser):
2857
2858 2012-06-21  Kalev Lember  <kalevlember@gmail.com>
2859
2860         [GTK] Use the empty plugin support on non-X11 and non-Windows platforms
2861         https://bugs.webkit.org/show_bug.cgi?id=89501
2862
2863         Reviewed by Martin Robinson.
2864
2865         The GTK+ port doesn't currently support NPAPI plugins on platforms other
2866         than X11 or Windows. Using PluginPackageNone and PluginViewNone makes it
2867         easier to build it on other platforms and also allows us to drop some
2868         ifdefs from PluginPackageGtk and PluginViewGtk.
2869
2870         * GNUmakefile.list.am:
2871
2872 2012-06-21  Shinya Kawanaka  <shinyak@chromium.org>
2873
2874         [Shadow][Editing] Assertion in VisibleSelection::adjuseSelectionToAvoidCrossingBoundaries() is triggered.
2875         https://bugs.webkit.org/show_bug.cgi?id=89081
2876
2877         Reviewed by Ryosuke Niwa.
2878
2879         firstEditablePositionAfterPositionInRoot and lastEditablePositionBeforePositionInRoot did not
2880         consider a case that an argument hiehestRoot can be in Shadow DOM. So when adjusting selection to
2881         avoid crossing editing boundaries, VisiblePosition can break shadow boundaries, and it causes
2882         an assertion trigger.
2883
2884         By this patch, firstEditablePositionAfterPositionInRoot and lastEditablePositionBeforePositionInRoot will
2885         adjust position to the tree scope of highestRoot instead of its parent tree scope.
2886
2887         Test: editing/shadow/adjusting-editing-boundary-with-table-in-shadow.html
2888
2889         * editing/htmlediting.cpp:
2890         (WebCore::firstEditablePositionAfterPositionInRoot):
2891         (WebCore::lastEditablePositionBeforePositionInRoot):
2892
2893 2012-06-21  Andrey Kosyakov  <caseq@chromium.org>
2894
2895         Web Inspector: exception in TimelinePresentationModel when recording timeline
2896         https://bugs.webkit.org/show_bug.cgi?id=89716
2897
2898         Reviewed by Pavel Feldman.
2899
2900         * inspector/front-end/TimelinePanel.js:
2901         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline.processRecord):
2902         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
2903         * inspector/front-end/TimelinePresentationModel.js:
2904         (WebInspector.TimelinePresentationModel.prototype.filteredRecords):
2905         (WebInspector.TimelinePresentationModel.prototype.isVisible):
2906
2907 2012-06-21  Oli Lan  <olilan@chromium.org>
2908
2909         Add methods to select between offsets in an editable field.
2910         https://bugs.webkit.org/show_bug.cgi?id=89098
2911
2912         Reviewed by Ryosuke Niwa.
2913
2914         Reviewed by Ryosuke Niwa.
2915
2916         Adds a new method setSelectionOffsets to Editor. This selects between
2917         the two integer offsets provided in the node currently being edited,
2918         assuming the offsets are given relative to the rootEditableElement.
2919         If no node or field is currently being edited, the method returns false.
2920         
2921         Test: a new test has been added to the chromium port's WebViewTest that
2922         calls this via WebViewImpl::setSelectionEditableOffsets.
2923         
2924         * editing/Editor.cpp:
2925         (WebCore::Editor::setSelectionOffsets):
2926         (WebCore):
2927         * editing/Editor.h:
2928         (Editor):
2929
2930 2012-06-21  Julien Chaffraix  <jchaffraix@webkit.org>
2931
2932         Add support for the grid and inline-grid display types.
2933         https://bugs.webkit.org/show_bug.cgi?id=60732
2934
2935         Reviewed by Tony Chang.
2936
2937         Tests: fast/css-grid-layout/containing-block-grids-expected.html
2938                fast/css-grid-layout/containing-block-grids.html
2939                fast/css-grid-layout/floating-empty-grids-expected.html
2940                fast/css-grid-layout/floating-empty-grids.html
2941
2942         Based on an earlier patch by David Hyatt <hyatt@apple.com>.
2943
2944         Added the first renderer for grid elements.
2945
2946         * CMakeLists.txt:
2947         * GNUmakefile.list.am:
2948         * Target.pri:
2949         * WebCore.gypi:
2950         * WebCore.vcproj/WebCore.vcproj:
2951         * WebCore.xcodeproj/project.pbxproj:
2952         Added RenderGrid files to the build systems.
2953
2954         * rendering/RenderGrid.cpp: Added.
2955         (WebCore::RenderGrid::RenderGrid):
2956         (WebCore::RenderGrid::~RenderGrid):
2957         (WebCore::RenderGrid::layoutBlock):
2958         (WebCore::RenderGrid::renderName):
2959         * rendering/RenderGrid.h: Added.
2960         (RenderGrid):
2961         Skeleton renderer for now.
2962
2963         * rendering/RenderObject.cpp:
2964         (WebCore::RenderObject::createObject):
2965         Return our new RenderGrid for our 2 new |display| values.
2966
2967         * rendering/style/RenderStyle.h:
2968         Added INLINE_GRID to the inline and replaced types.
2969
2970 2012-06-21  Ryosuke Niwa  <rniwa@webkit.org>
2971
2972         Clang build fix.
2973
2974         * dom/NodeRareData.h:
2975
2976 2012-06-19  James Robinson  <jamesr@chromium.org>
2977
2978         [chromium] LayerRendererChromium is not getting visibility messages in single threaded compositing mode.
2979         https://bugs.webkit.org/show_bug.cgi?id=89045
2980
2981         Reviewed by Adrienne Walker.
2982
2983         Based on patch by Michal Mocny <mmocny@google.com>.
2984
2985         Invariants:
2986
2987         1.) We never commit (paint, animate, any of it) when not visible on the main thread -except- for
2988         compositeAndReadback, regardless of threaded vs non-threaded mode
2989         2.) CCLayerTreeHost::m_contentsTextureManager's memory budget is only set by updateLayers() when we are going to
2990         make a frame and is always set to a non-zero value
2991         3.) Zero-sized allocations from the GPU process are always serviced immediately on the impl thread.  Non-zero
2992         allocations are met in the next frame, whenever we would produce that frame according to our usual frame
2993         scheduling logic.
2994         4.) The impl thread always knows the set of currently-allocated managed texture IDs and can delete them all
2995         whenever it likes without needing the main thread to be responsive.
2996
2997         Details:
2998
2999         There are two main changes - tweaking how the contents texture manager's budget is handled and tweaking frame
3000         scheduling for the !visible case.
3001
3002         The scheduling change is a bit more subtle but it unifies the single and multi threaded paths and is really
3003         important.  Except for compositeAndReadback (which I'll talk about below), we simply won't produce frames when
3004         not visible.  This already happens in the single threaded path thanks to render_widget so the only change is to
3005         the threaded path.  The difficulty here is we might post a beginFrame task from the impl thread and then get a
3006         setVisible(false) call on the main thread before the beginFrame task runs.  Since I'm making the setVisible()
3007         call a blocking call from main thread -> impl thread, when the beginFrame task eventually does run on the main
3008         thread we can know that the impl thread's notion of visibility is in sync with the main threads.  Thus I'm
3009         planning to simply abort the frame before doing any processing on the main thread.  The scheduler will know if
3010         it gets a beginFrameAborted and COMMIT_STATE_IDLE.
3011
3012         compositeAndReadback is special - this call currently does come in when we aren't visible (in single and
3013         threaded mode) and we need to service it.  In particular, we need to send a beginFrame over and have it
3014         not be ignored on the main thread.  For this I'm thinking of having the proxy keep track of whether it's
3015         servicing a compositeAndReadback() and use that bit on the main thread to know to process the beginFrame
3016         normally.  On the impl side, we need a few changes.  First, we have to allocate a default framebuffer
3017         (ensureFramebufferCHROMIUM) even if we've dropped it previously and remember to discard it after the
3018         readPixels().  Second, we have to provide a non-zero contents texture allocation on the beginFrame message, and
3019         again remember to delete the textures after the readPixels().  Third, we have to know that the beginFrame is a
3020         forced frame so when we get the beginFrameComplete we go ahead with the rest of the frame.  For this, I think
3021         I'll have to add ACTION_BEGIN_FORCED_FRAME and a corresponding COMMIT_STATE_FORCED_FRAME_IN_PROGRESS so the
3022         scheduler can keep track of the magicness of this frame, and then add some logic after the readpixels call to
3023         drop resources after the readback.  It's probably a good time to stop swapping on readbacks too....
3024
3025         The contents texture manager's budget is only relevant when we want to make a frame, so it's now passed in on
3026         the updateLayers().  Since we only make frames when we are visible and we never have a zero allocation when
3027         visible (thanks to the frame scheduling changes above), this value is always non-zero.  The other thing the
3028         texture manager needs to know about is if we've killed all of the underlying textures from the impl thread -
3029         this bit is passed in by the proxy before the updateLayers() call.  This means if we're running while visible
3030         and the manager wants to decrease our budget to something other than zero, we'll get a new (non-zero) allocation
3031         on the impl thread, schedule a frame, then when it's time to make the frame pass the new lower limit in to
3032         updateLayers(), then have the contents texture manager evict down to our new limit and make a frame with the new
3033         budget.  When the commit completes we'll get notified on the impl thread of which textures the contents texture
3034         manager decided to evict and issue the deleteTexture() calls on them.
3035
3036         The texture budget we pass in will be based on the most recent non-zero memory allocation we received from the
3037         GPU memory manager, or some default value I'll pull out my ass if we haven't heard anything yet.  On compositor
3038         initialization, we can't afford to wait for a round-trip through the GPU process to get a budget for the first
3039         frame.  I don't think handling a decrease to a non-zero budget on a visible tab needs to be terribly urgent - we
3040         can get to it when we get to making the next frame.  If we wanted to satisfy reduced texture budgets directly
3041         from the impl thread, we could keep a priority-list ordered set of textures once we have priorities and delete
3042         based on that.  Let's worry about that later.
3043
3044         * platform/graphics/chromium/LayerRendererChromium.cpp:
3045         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChangedOnImpl):
3046         (WebCore::LayerRendererChromium::LayerRendererChromium):
3047         (WebCore::LayerRendererChromium::initialize):
3048         (WebCore::LayerRendererChromium::setVisible):
3049         (WebCore::LayerRendererChromium::setGpuMemoryAllocation):
3050         (WebCore):
3051         (WebCore::LayerRendererChromium::swapBuffers):
3052         (WebCore::LayerRendererChromium::getFramebufferPixels):
3053         * platform/graphics/chromium/LayerRendererChromium.h:
3054         (WebCore):
3055         (LayerRendererChromium):
3056         * platform/graphics/chromium/TextureManager.cpp:
3057         (WebCore::TextureManager::evictAndRemoveAllDeletedTextures):
3058         (WebCore):
3059         * platform/graphics/chromium/TextureManager.h:
3060         (TextureAllocator):
3061         (TextureManager):
3062         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
3063         (WebCore::TrackingTextureAllocator::createTexture):
3064         (WebCore::TrackingTextureAllocator::deleteTexture):
3065         (WebCore):
3066         (WebCore::TrackingTextureAllocator::deleteAllTextures):
3067         * platform/graphics/chromium/TrackingTextureAllocator.h:
3068         (TrackingTextureAllocator):
3069         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3070         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
3071         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
3072         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
3073         (WebCore::CCLayerTreeHost::setVisible):
3074         (WebCore::CCLayerTreeHost::evictAllContentTextures):
3075         (WebCore::CCLayerTreeHost::updateLayers):
3076         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3077         (CCLayerTreeHost):
3078         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3079         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3080         (WebCore::CCLayerTreeHostImpl::commitComplete):
3081         (WebCore::CCLayerTreeHostImpl::canDraw):
3082         (WebCore::CCLayerTreeHostImpl::context):
3083         (WebCore::CCLayerTreeHostImpl::releaseContentsTextures):
3084         (WebCore):
3085         (WebCore::CCLayerTreeHostImpl::setMemoryAllocationLimitBytes):
3086         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3087         (CCLayerTreeHostImplClient):
3088         (WebCore::CCLayerTreeHostImpl::contentsTexturesWerePurgedSinceLastCommit):
3089         (WebCore::CCLayerTreeHostImpl::memoryAllocationLimitBytes):
3090         (CCLayerTreeHostImpl):
3091         * platform/graphics/chromium/cc/CCProxy.h:
3092         (CCProxy):
3093         * platform/graphics/chromium/cc/CCRenderer.h:
3094         (CCRendererClient):
3095         * platform/graphics/chromium/cc/CCScheduler.cpp:
3096         (WebCore::CCScheduler::beginFrameComplete):
3097         (WebCore::CCScheduler::beginFrameAborted):
3098         (WebCore):
3099         (WebCore::CCScheduler::didSwapBuffersComplete):
3100         (WebCore::CCScheduler::didLoseContext):
3101         (WebCore::CCScheduler::didRecreateContext):
3102         (WebCore::CCScheduler::vsyncTick):
3103         * platform/graphics/chromium/cc/CCScheduler.h:
3104         (CCScheduler):
3105         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
3106         (WebCore::CCSchedulerStateMachine::beginFrameAborted):
3107         (WebCore):
3108         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
3109         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3110         (WebCore::CCSingleThreadProxy::setVisible):
3111         (WebCore):
3112         (WebCore::CCSingleThreadProxy::stop):
3113         (WebCore::CCSingleThreadProxy::commitAndComposite):
3114         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
3115         (CCSingleThreadProxy):
3116         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3117         (WebCore::CCThreadProxy::CCThreadProxy):
3118         (WebCore::CCThreadProxy::compositeAndReadback):
3119         (WebCore::CCThreadProxy::setVisible):
3120         (WebCore):
3121         (WebCore::CCThreadProxy::setVisibleOnImplThread):
3122         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
3123         (WebCore::CCThreadProxy::beginFrame):
3124         (WebCore::CCThreadProxy::beginFrameAbortedOnImplThread):
3125         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
3126         (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread):
3127         * platform/graphics/chromium/cc/CCThreadProxy.h:
3128         (CCThreadProxy):
3129         (BeginFrameAndCommitState):
3130         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3131         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
3132         (WebCore::CCVideoLayerImpl::willDraw):
3133         (WebCore::CCVideoLayerImpl::willDrawInternal):
3134         (WebCore::CCVideoLayerImpl::FramePlane::allocateData):
3135         (WebCore::CCVideoLayerImpl::FramePlane::freeData):
3136         (WebCore::CCVideoLayerImpl::allocatePlaneData):
3137         (WebCore::CCVideoLayerImpl::freePlaneData):
3138         (WebCore::CCVideoLayerImpl::freeUnusedPlaneData):
3139         (WebCore::CCVideoLayerImpl::didLoseContext):
3140         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
3141         (FramePlane):
3142
3143 2012-06-20  Ryosuke Niwa  <rniwa@webkit.org>
3144
3145         Shrink NodeListsNodeData
3146         https://bugs.webkit.org/show_bug.cgi?id=89036
3147
3148         Reviewed by Andreas Kling.
3149
3150         Replaced 6 hash maps of AtomicString, String, and RefPtr<QualifiedName::QualifiedNameImpl> and a raw pointer
3151         by 3 hash maps of std::pair<unsigned short, AtomicString>, std::pair<unsigned short, String>, and QualifiedName,
3152         to halve the NodeListsNodeData's size (Reduced from 7 pointers to 3 pointers). Made those hash maps private and
3153         added addCacheWith* and removeCacheWith* member functions to reduce the code duplication.
3154
3155         Also got rid of removeCached*NodeList member functions from Node and Document now that DynamicSubtreeNodeList can
3156         simply call nodeLists()->removeCacheWith* on m_node.
3157
3158         * dom/ChildNodeList.cpp:
3159         (WebCore::ChildNodeList::ChildNodeList):
3160         * dom/ClassNodeList.cpp:
3161         (WebCore::ClassNodeList::~ClassNodeList):
3162         * dom/Document.cpp:
3163         (WebCore::Document::getItems): Use addCacheWithName.
3164         * dom/Document.h: Got rid of removeCachedMicroDataItemList.
3165         (Document):
3166         * dom/DynamicNodeList.cpp:
3167         (WebCore): Moved the constructor to the header file.
3168         * dom/DynamicNodeList.h: Added NodeListType and InvalidationType to be used in NodeListsNodeData.
3169         (WebCore::DynamicNodeList::DynamicNodeList): Takes the invalidation type.
3170         (WebCore::DynamicNodeList::document): Added.
3171         (WebCore::DynamicNodeList::shouldInvalidateOnAttributeChange): Added.
3172         (WebCore::DynamicNodeList::Caches::Caches): Added shouldInvalidateOnAttributeChange to retain the invalidation type.
3173         (Caches):
3174         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
3175         * dom/MicroDataItemList.cpp:
3176         (WebCore::MicroDataItemList::~MicroDataItemList):
3177         * dom/NameNodeList.cpp:
3178         (WebCore::NameNodeList::NameNodeList):
3179         (WebCore::NameNodeList::~NameNodeList):
3180         (WebCore::NameNodeList::nodeMatches):
3181         * dom/NameNodeList.h:
3182         (WebCore):
3183         (NameNodeList):
3184         (WebCore::NameNodeList::create):
3185         * dom/Node.cpp:
3186         (WebCore::Node::nodeLists): Added so that node lists can directly call removeCacheWith*.
3187         (WebCore::Node::getElementsByTagName):
3188         (WebCore::Node::getElementsByTagNameNS):
3189         (WebCore::Node::getElementsByName):
3190         (WebCore::Node::getElementsByClassName):
3191         (WebCore::Node::radioNodeList):
3192         (WebCore::NodeListsNodeData::invalidateCaches): Merged invalidateCachesThatDependOnAttributes. The function takes
3193         the attribute name to avoid invalidating tag node lists when only attributes are modified. Also, now we have exactly
3194         three hash maps to invalidate: m_atomicNameCaches, m_nameCaches, and m_tagNodeListCacheNS.
3195         (WebCore): NodeListsNodeData::isEmpty is moved to NodeRareData.h.
3196         * dom/Node.h:
3197         (WebCore):
3198         (Node):
3199         * dom/NodeRareData.h:
3200         (NodeListsNodeData):
3201         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
3202         (WebCore::NodeListsNodeData::addCacheWithName):
3203         (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
3204         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
3205         (WebCore::NodeListsNodeData::removeCacheWithName):
3206         (WebCore::NodeListsNodeData::removeCacheWithQualifiedName):
3207         (WebCore::NodeListsNodeData::isEmpty): Moved from Node.cpp now that this function is much shorter.
3208         (WebCore::NodeListsNodeData::NodeListsNodeData):
3209         (WebCore::NodeListsNodeData::namedNodeListKey): Helper member functions to obtain the key for AtomicString and
3210         String hash maps.
3211         * dom/TagNodeList.cpp:
3212         (WebCore::TagNodeList::TagNodeList):
3213         (WebCore::TagNodeList::~TagNodeList):
3214         (WebCore::HTMLTagNodeList::HTMLTagNodeList): Hard code namespaceURI = starAtom since other values are never used.
3215         (WebCore::HTMLTagNodeList::nodeMatches): Given that, assert m_namespace == starAtom.
3216         * dom/TagNodeList.h:
3217         (WebCore::TagNodeList::create): Add a new version of create that doesn't take namespace (assume starAtom) so that
3218         addCacheWithAtomicName works with this class.
3219         (WebCore::HTMLTagNodeList::create): Removed namespaceURI from the argument list since it's always starAtom.
3220         (HTMLTagNodeList):
3221         * html/LabelableElement.cpp:
3222         (WebCore::LabelableElement::labels):
3223         * html/LabelsNodeList.cpp:
3224         (WebCore::LabelsNodeList::LabelsNodeList): Removed redundant m_forNode (identical to m_node in DynamicNodeList).
3225         (WebCore::LabelsNodeList::~LabelsNodeList):
3226         (WebCore::LabelsNodeList::nodeMatches):
3227         * html/LabelsNodeList.h:
3228         (WebCore::LabelsNodeList::create):
3229         (LabelsNodeList):
3230         * html/RadioNodeList.cpp:
3231         (WebCore::RadioNodeList::RadioNodeList): Removed redundant m_baseElement (identical to m_node in DynamicNodeList).
3232         Also changed the first argument's type from Element* to Node* so that it works better with new template member
3233         functions of NodeListsNodeData.
3234         (WebCore::RadioNodeList::~RadioNodeList):
3235         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
3236         * html/RadioNodeList.h:
3237         (WebCore::RadioNodeList::create):
3238         (RadioNodeList):
3239
3240 2012-06-21  Sheriff Bot  <webkit.review.bot@gmail.com>
3241
3242         Unreviewed, rolling out r120945.
3243         http://trac.webkit.org/changeset/120945
3244         https://bugs.webkit.org/show_bug.cgi?id=89703
3245
3246         editing/shadow/breaking-editing-boundaries.html started to
3247         crash (Requested by hayato on #webkit).
3248
3249         * dom/EventDispatcher.cpp:
3250         (WebCore::EventRelatedTargetAdjuster::adjust):
3251         (WebCore::EventDispatcher::ensureEventAncestors):
3252
3253 2012-06-21  Philippe Normand  <pnormand@igalia.com>
3254
3255         [GStreamer] Use setGstElementClassMetadata.
3256
3257         Rubber/stamped by Martin Robinson.
3258
3259         This function was introduced in r120790 but I forgot to actually
3260         use it in that patch.
3261
3262         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3263         (webkit_video_sink_class_init):
3264         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3265
3266 2012-06-21  Erik Arvidsson  <arv@chromium.org>
3267
3268         [V8] Use v8::V8::AddImplicitReferences instead of SetHiddenValue
3269         https://bugs.webkit.org/show_bug.cgi?id=80880
3270
3271         Reviewed by Adam Barth.
3272
3273         We used to add a hidden property in the getter to the returned wrapper.
3274         With this patch we instead handle the liveness of the wrapper in the GC phase by
3275         calling v8::V8::AddHiddenReference.
3276
3277         To reduce the amount of custom code we need, the V8 code generator now supports
3278         GenerateIsReachable (as well as CustomIsReachable) which, even though different
3279         from the JSC attribute, is used in the same cases and takes the same values (even though
3280         at the moment not all JSC values are supported by V8). Interfaces that have *IsReachable
3281         also have a dependent life time (just like if V8DependentLifetime was present).
3282
3283         No new tests. Covered by existing tests.
3284
3285         * Target.pri:
3286         * UseV8.cmake:
3287         * WebCore.gypi:
3288         * bindings/scripts/CodeGeneratorJS.pm:
3289         (GetGenerateIsReachable): Abstracted GenerateIsReachable and JSGenerateIsReachable.
3290         (GetCustomIsReachable): Ditto.
3291         (GenerateHeader):
3292         (GenerateImplementation):
3293         * bindings/scripts/CodeGeneratorV8.pm:
3294         (NeedsToVisitDOMWrapper):
3295         (GetGenerateIsReachable):
3296         (GetCustomIsReachable):
3297         (GenerateVisitDOMWrapper):
3298         (GenerateHeader):
3299         (GenerateNamedConstructorCallback):
3300         (GenerateImplementation):
3301         * bindings/scripts/IDLAttributes.txt:
3302         * bindings/scripts/test/V8/V8Float64Array.cpp:
3303         (WebCore):
3304         * bindings/scripts/test/V8/V8Float64Array.h:
3305         (V8Float64Array):
3306         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3307         (WebCore):
3308         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
3309         (V8TestActiveDOMObject):
3310         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3311         (WebCore):
3312         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
3313         (V8TestCustomNamedGetter):
3314         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3315         (WebCore):
3316         * bindings/scripts/test/V8/V8TestEventConstructor.h:
3317         (V8TestEventConstructor):
3318         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3319         (WebCore):
3320         * bindings/scripts/test/V8/V8TestEventTarget.h:
3321         (V8TestEventTarget):
3322         * bindings/scripts/test/V8/V8TestException.cpp:
3323         (WebCore):
3324         * bindings/scripts/test/V8/V8TestException.h:
3325         (V8TestException):
3326         * bindings/scripts/test/V8/V8TestInterface.cpp:
3327         (WebCore):
3328         * bindings/scripts/test/V8/V8TestInterface.h:
3329         (V8TestInterface):
3330         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3331         (WebCore):
3332         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
3333         (V8TestMediaQueryListListener):
3334         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3335         (WebCore):
3336         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
3337         (V8TestNamedConstructor):
3338         * bindings/scripts/test/V8/V8TestNode.cpp:
3339         (WebCore):
3340         * bindings/scripts/test/V8/V8TestNode.h:
3341         (V8TestNode):
3342         * bindings/scripts/test/V8/V8TestObj.cpp:
3343         (WebCore):
3344         * bindings/scripts/test/V8/V8TestObj.h:
3345         (V8TestObj):
3346         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3347         (WebCore):
3348         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
3349         (V8TestSerializedScriptValueInterface):
3350         * bindings/v8/NPV8Object.cpp:
3351         (WebCore::npObjectTypeInfo):
3352         * bindings/v8/V8GCController.cpp:
3353         (WebCore::GrouperVisitor::visitDOMWrapper):
3354         * bindings/v8/WrapperTypeInfo.h:
3355         (WebCore):
3356         (WrapperTypeInfo):
3357         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Removed.
3358         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
3359         * bindings/v8/custom/V8DOMTokenListCustom.cpp: Removed.
3360         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
3361         (WebCore):
3362         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
3363         * bindings/v8/custom/V8StyleSheetCustom.cpp:
3364         (WebCore::toV8):
3365         * bindings/v8/custom/V8TextTrackListCustom.cpp: Removed.
3366         * css/CSSStyleSheet.idl:
3367         * css/StyleSheet.idl:
3368         * dom/DOMStringMap.idl:
3369         * dom/NamedNodeMap.idl:
3370         * html/DOMTokenList.idl:
3371         * html/track/TextTrackList.idl:
3372
3373 2012-06-21  Alec Flett  <alecflett@chromium.org>
3374
3375         IndexedDB: Implement spec behavior for multiEntry indexes with invalid/duplicate subkeys
3376         https://bugs.webkit.org/show_bug.cgi?id=86123
3377
3378         Reviewed by Darin Fisher.
3379
3380         Distinguish between an actual invalid IDBKey, and an array of
3381         possibly-invalid subkeys by making IDBKey::isValid() check subkeys
3382         if the type is an array.
3383
3384         Introduce a new way to transform an IDBKey into a
3385         multiEntry-specific IDBKey, (IDBKey::createMultiEntryArray)
3386         throwing out duplicates and invalid keys. Use it when storing
3387         index entries for multiEntry indexes.
3388
3389         No new tests: existing tests have been altered to include new behavior.
3390
3391         * Modules/indexeddb/IDBCursor.cpp:
3392         (WebCore::IDBCursor::continueFunction):
3393         * Modules/indexeddb/IDBFactory.cpp:
3394         (WebCore::IDBFactory::cmp):
3395         * Modules/indexeddb/IDBIndex.cpp:
3396         (WebCore::IDBIndex::get):
3397         (WebCore::IDBIndex::getKey):
3398         * Modules/indexeddb/IDBKey.cpp:
3399         (WebCore::IDBKey::isValid):
3400         (WebCore):
3401         * Modules/indexeddb/IDBKey.h:
3402         (WebCore::IDBKey::createMultiEntryArray):