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