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