[BlackBerry] fix confusing destruction sequence in LayerCompositingThread
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-27  Joe Mason  <jmason@rim.com>
2
3         [BlackBerry] fix confusing destruction sequence in LayerCompositingThread
4         https://bugs.webkit.org/show_bug.cgi?id=81706
5
6         Reviewed by Rob Buis.
7
8         LayerCompositingThread has a destructor that does a synchronous
9         dispatch to the compositing thread and then does the actual cleanup
10         from a helper function. This is confusing.It should be the
11         opposite: the helper function dispatches to the compositing thread,
12         which calls delete.
13
14         No new tests since the existing animation tests will exercise this
15         code.
16
17         * platform/graphics/blackberry/LayerCompositingThread.cpp:
18         (WebCore::LayerCompositingThread::destroyOnCompositingThread):
19         (WebCore):
20         (WebCore::LayerCompositingThread::~LayerCompositingThread):
21         * platform/graphics/blackberry/LayerCompositingThread.h:
22         (LayerCompositingThread):
23         (WTF):
24         (WTF::::deref):
25
26 2012-03-27  Alexey Proskuryakov  <ap@apple.com>
27
28         [Mac] Stop using NSMapTable in FormDataStreamMac.mm
29         https://bugs.webkit.org/show_bug.cgi?id=82358
30
31         Reviewed by Darin Adler.
32
33         * platform/network/mac/FormDataStreamMac.mm: Use WTF::HashMap, as we always do. All accesses
34         are protected with a mutex anyway.
35
36 2012-03-27  Joe Thomas  <joethomas@motorola.com>
37
38         Implement vw/vh/vmin (viewport sizes) from CSS3 Values and Units
39         https://bugs.webkit.org/show_bug.cgi?id=27160
40
41         Reviewed by Antti Koivisto.
42
43         vw/vh/vmin are implemented as primitive length units. Added the parsing logic for these new units.
44         New Length types such as ViewportRelativeWidth, ViewportRelativeHeight and ViewportRelativeMin are added for these length units
45         and included the support for fetching the value of these relative units based on the current viewport size.
46
47         The specification related to this implementation is http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths.
48
49         Tests: css3/viewport-relative-lengths/css3-viewport-relative-lengths-getStyle.html
50                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh-absolute.html
51                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh.html
52                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin-absolute.html
53                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin.html
54                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw-absolute.html
55                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw.html
56
57         * accessibility/gtk/WebKitAccessibleInterfaceText.cpp: Modified to support viewport relative Length types.
58         (getAttributeSetForAccessibilityObject):
59         * css/CSSComputedStyleDeclaration.cpp: Ditto.
60         (WebCore::getPositionOffsetValue):
61         (WebCore::getBorderRadiusCornerValues):
62         (WebCore::getBorderRadiusCornerValue):
63         (WebCore::getBorderRadiusShorthandValue):
64         (WebCore::lineHeightFromStyle):
65         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
66         * css/CSSGrammar.y: Added vw/vh/vmin support.
67         * css/CSSParser.cpp: Parsing of relative units and creation of CSSPrimitiveValue.
68         (WebCore::CSSParser::validUnit): Added vw/vh/vmin to the valid units.
69         (WebCore::CSSParser::createPrimitiveNumericValue): Added vw/vh/vmin as valid primitive units.
70         (WebCore::unitFromString):
71         (WebCore::CSSParser::parseValidPrimitive): Creation of CSSPrimitiveValue for vw/vh/vmin.
72         (WebCore::CSSParser::detectNumberToken): Parsing the vw/vh/vmin tokens.
73         * css/CSSPrimitiveValue.cpp:
74         (WebCore::isValidCSSUnitTypeForDoubleConversion): Added support for vw/vh/vmin.
75         (WebCore::unitCategory): Ditto.
76         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
77         (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): Added support for vw/vh/vmin.
78         (WebCore::CSSPrimitiveValue::customCssText): Ditto.
79         (WebCore::CSSPrimitiveValue::viewportRelativeLength): Function to create the Length structure for the viewport-relative unit types.
80         (WebCore):
81         * css/CSSPrimitiveValue.h:
82         (WebCore::CSSPrimitiveValue::isViewportRelativeLength): Checks whether the primitive value is ViewportRelative Lengths.
83         (CSSPrimitiveValue):
84         * css/CSSPrimitiveValue.idl: Added support for vw/vh/vmin.
85         * css/CSSPrimitiveValueMappings.h:
86         (WebCore::CSSPrimitiveValue::convertToLength): Ditto.
87         * css/CSSStyleApplyProperty.cpp: Applying relative viewport length units to the specific CSS property.
88         (WebCore::ApplyPropertyLength::applyValue):
89         (WebCore::ApplyPropertyBorderRadius::applyValue):
90         (WebCore::ApplyPropertyFontSize::applyValue):
91         (WebCore::ApplyPropertyLineHeight::applyValue):
92         (WebCore::ApplyPropertyVerticalAlign::applyValue):
93         * css/CSSStyleSelector.cpp: Added support for viewport relative units.
94         * css/LengthFunctions.cpp: Calcuation of length value based on the current viewport size.
95         (WebCore::miminumValueForLength):
96         (WebCore::valueForLength):
97         (WebCore::floatValueForLength):
98         * css/LengthFunctions.h: Added new RenderView argument.
99         (WebCore):
100         * dom/Document.cpp:
101         (WebCore::Document::pageSizeAndMarginsInPixels): Modified to support viewport relative Length types.
102         (WebCore::Document::viewportSize): New function to fetch the current viewport size.
103         (WebCore):
104         * dom/Document.h: Ditto.
105         (Document):
106         * html/HTMLAreaElement.cpp: Modified to support viewport relative Length types.
107         (WebCore::HTMLAreaElement::getRegion):
108         * platform/Length.h:
109         (WebCore::Length::isViewportRelative): To check the Length is of type ViewportRelative.
110         (WebCore::Length::viewportRelativeLength): To get the relative value.
111         * rendering/RenderBR.cpp: Modified to support viewport relative Length types.
112         (WebCore::RenderBR::lineHeight):
113         * rendering/RenderBlock.cpp: Ditto.
114         (WebCore::RenderBlock::textIndentOffset):
115         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
116         (WebCore::RenderBlock::lineHeight):
117         * rendering/RenderBox.cpp: Ditto.
118         (WebCore::RenderBox::reflectionOffset):
119         (WebCore::RenderBox::paintBoxDecorations):
120         (WebCore::RenderBox::clipRect):
121         (WebCore::RenderBox::computeLogicalWidthInRegion):
122         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
123         (WebCore::RenderBox::computeInlineDirectionMargins):
124         (WebCore::RenderBox::computeContentLogicalHeightUsing):
125         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
126         (WebCore::RenderBox::computeBlockDirectionMargins):
127         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
128         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
129         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
130         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
131         * rendering/RenderBoxModelObject.cpp: Ditto.
132         (WebCore::RenderBoxModelObject::relativePositionOffsetX):
133         (WebCore::RenderBoxModelObject::relativePositionOffsetY):
134         (WebCore::RenderBoxModelObject::paddingTop):
135         (WebCore::RenderBoxModelObject::paddingBottom):
136         (WebCore::RenderBoxModelObject::paddingLeft):
137         (WebCore::RenderBoxModelObject::paddingRight):
138         (WebCore::RenderBoxModelObject::paddingBefore):
139         (WebCore::RenderBoxModelObject::paddingAfter):
140         (WebCore::RenderBoxModelObject::paddingStart):
141         (WebCore::RenderBoxModelObject::paddingEnd):
142         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
143         (WebCore::RenderBoxModelObject::calculateFillTileSize):
144         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
145         (WebCore::computeBorderImageSide):
146         (WebCore::RenderBoxModelObject::paintNinePieceImage):
147         (WebCore::RenderBoxModelObject::paintBorder):
148         (WebCore::RenderBoxModelObject::paintBoxShadow):
149         * rendering/RenderFlexibleBox.cpp: Ditto.
150         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
151         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
152         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
153         * rendering/RenderInline.cpp: Ditto.
154         (WebCore::computeMargin):
155         (WebCore::RenderInline::lineHeight):
156         * rendering/RenderMenuList.cpp: Ditto.
157         (WebCore::RenderMenuList::updateOptionsWidth):
158         * rendering/RenderObject.cpp: Ditto.
159         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
160         * rendering/RenderReplaced.cpp: Ditto.
161         (WebCore::RenderReplaced::paint):
162         * rendering/RenderScrollbarPart.cpp: Ditto.
163         (WebCore::calcScrollbarThicknessUsing):
164         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
165         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
166         * rendering/RenderTable.cpp: Ditto.
167         (WebCore::RenderTable::computeLogicalWidth):
168         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
169         * rendering/RenderTableCell.cpp: Ditto.
170         (WebCore::RenderTableCell::logicalHeightForRowSizing):
171         * rendering/RenderTableSection.cpp: Ditto.
172         (WebCore::RenderTableSection::calcRowLogicalHeight):
173         * rendering/RenderText.h: Ditto.
174         (WebCore::RenderText::marginLeft):
175         (WebCore::RenderText::marginRight):
176         * rendering/RenderThemeMac.mm: Ditto.
177         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
178         * rendering/RenderView.h:
179         (WebCore::RenderView::viewportSize):
180         * rendering/RenderWidget.cpp: Ditto.
181         (WebCore::RenderWidget::paint):
182         * rendering/RootInlineBox.cpp: Ditto.
183         (WebCore::RootInlineBox::verticalPositionForBox):
184         * rendering/style/RenderStyle.cpp: Ditto.
185         (WebCore::calcRadiiFor):
186         (WebCore::RenderStyle::getRoundedBorderFor):
187         * rendering/style/RenderStyle.h: Ditto.
188         * rendering/svg/RenderSVGRoot.cpp: Ditto.
189         (WebCore::resolveLengthAttributeForSVG):
190         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
191         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
192
193 2012-03-27  Gao Chun  <chun.gao@intel.com>
194
195         Remove deprecated LowPass2FilterNode and HighPass2FilterNode
196         https://bugs.webkit.org/show_bug.cgi?id=82296
197
198         Reviewed by Chris Rogers.
199
200         * CMakeLists.txt:
201         * DerivedSources.make:
202         * DerivedSources.pri:
203         * GNUmakefile.list.am:
204         * Modules/webaudio/AudioContext.cpp:
205         * Modules/webaudio/AudioContext.h:
206         (WebCore):
207         (AudioContext):
208         * Modules/webaudio/AudioContext.idl:
209         * Modules/webaudio/AudioNode.h:
210         * Modules/webaudio/BiquadFilterNode.cpp:
211         (WebCore::BiquadFilterNode::BiquadFilterNode):
212         * Modules/webaudio/BiquadProcessor.cpp:
213         * Modules/webaudio/BiquadProcessor.h:
214         * Modules/webaudio/HighPass2FilterNode.cpp: Removed.
215         * Modules/webaudio/HighPass2FilterNode.h: Removed.
216         * Modules/webaudio/HighPass2FilterNode.idl: Removed.
217         * Modules/webaudio/LowPass2FilterNode.cpp: Removed.
218         * Modules/webaudio/LowPass2FilterNode.h: Removed.
219         * Modules/webaudio/LowPass2FilterNode.idl: Removed.
220         * WebCore.gypi:
221         * WebCore.xcodeproj/project.pbxproj:
222
223 2012-03-27  Sami Kyostila  <skyostil@chromium.org>
224
225         [chromium] Add TextureCopier for copying texture contents
226         https://bugs.webkit.org/show_bug.cgi?id=80870
227
228         Reviewed by Stephen White.
229
230         This patch introduces a TextureCopier class whose job is to copy the
231         contents from one GL texture to another using the most efficient means
232         for the current GPU. This version uses render-to-texture to do the copy,
233         but a path based on EXT_framebuffer_blit can be added later.
234
235         The class is intended to replace the use of image path operations such
236         as glCopyTex{Sub}Image2D for duplicating texture contents. The reason is
237         that such functions may not be very well optimized in some -- mainly
238         mobile -- GPU drivers.
239
240         With this patch the new copier is used just for Canvas2D layer
241         presentation, but another potential use is for WebGL layer presentation.
242
243         Test: webkit_unit_tests: TextureCopierTest
244
245         * WebCore.gypi:
246         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
247         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
248         (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
249         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
250         * platform/graphics/chromium/Canvas2DLayerChromium.h:
251         (Canvas2DLayerChromium):
252         * platform/graphics/chromium/LayerRendererChromium.cpp:
253         (WebCore::LayerRendererChromium::initializeSharedObjects):
254         * platform/graphics/chromium/LayerRendererChromium.h:
255         (WebCore):
256         (WebCore::LayerRendererChromium::textureCopier):
257         (LayerRendererChromium):
258         * platform/graphics/chromium/ShaderChromium.cpp:
259         (WebCore::VertexShaderPosTexIdentity::getShaderString):
260         (WebCore):
261         (WebCore::FragmentShaderRGBATexCopy::getShaderString):
262         * platform/graphics/chromium/ShaderChromium.h:
263         (VertexShaderPosTexIdentity):
264         (WebCore::VertexShaderPosTexIdentity::init):
265         (WebCore):
266         (FragmentShaderRGBATexCopy):
267         * platform/graphics/chromium/TextureCopier.cpp: Added.
268         (WebCore):
269         (WebCore::AcceleratedTextureCopier::AcceleratedTextureCopier):
270         (WebCore::AcceleratedTextureCopier::~AcceleratedTextureCopier):
271         (WebCore::AcceleratedTextureCopier::copyTexture):
272         * platform/graphics/chromium/TextureCopier.h: Added.
273         (WebCore):
274         (TextureCopier):
275         (WebCore::TextureCopier::~TextureCopier):
276         (AcceleratedTextureCopier):
277         (WebCore::AcceleratedTextureCopier::create):
278         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
279         (WebCore::CCSingleThreadProxy::doCommit):
280         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
281         (WebCore::CCTextureUpdater::CCTextureUpdater):
282         * platform/graphics/chromium/cc/CCTextureUpdater.h:
283         (WebCore):
284         (CCTextureUpdater):
285         (WebCore::CCTextureUpdater::copier):
286         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
287         (WebCore::CCThreadProxy::beginFrameCompleteOnImplThread):
288
289 2012-03-27  Levi Weintraub  <leviw@chromium.org>
290
291         Correct SVG paint functions that are still using IntPoints
292         https://bugs.webkit.org/show_bug.cgi?id=82343
293
294         Reviewed by Eric Seidel.
295
296         Two small corrections to SVG paint functions that should use LayoutPoint instead
297         of IntPoint.
298
299         No new tests. No change in behavior.
300
301         * rendering/svg/RenderSVGShape.cpp:
302         (WebCore::RenderSVGShape::paint):
303         * rendering/svg/RenderSVGText.cpp:
304         (WebCore::RenderSVGText::paint):
305
306 2012-03-27  Zalan Bujtas  <zbujtas@gmail.com>
307
308         Frame flattening: childframe in FrameView::layout() needs protector.
309         https://bugs.webkit.org/show_bug.cgi?id=82345
310
311         Reviewed by Kenneth Rohde Christiansen.
312
313         RefPtr<FrameView> protector(this) is supposed to protect the current frameview in
314         FrameView::layout() from being destroyed by recalcStyle().
315         However, when frame flattening is on and a child frame is re-starting layout from
316         the topmost parent, the protection is missing and parent's recalcStyle()
317         can destroy the child frame.
318         Moving the protector before the layout re-starting is initiated makes the child frame
319         safe.
320
321         No new tests. Unable to create a test case, where this scenario is reproducible.
322
323         * page/FrameView.cpp:
324         (WebCore::FrameView::layout):
325
326 2012-03-27  Antti Koivisto  <antti@apple.com>
327
328         Construct CSSCharsetRule on CSSOM API access only 
329         https://bugs.webkit.org/show_bug.cgi?id=82332
330
331         Reviewed by Andreas Kling.
332
333         Charset is just a string. There is usually no need to construct CSSCharsetRule at all.
334         
335         - Make CSS parser to return encoding string instead of CSSCharsetRule object. This
336           string is used for constructing CSSCharsetRule if it is needed (and nothing else,
337           @charset has no effect after string decoding).
338         - Remove internal interface for adding and removing rules. It has no clients.
339         
340         * css/CSSGrammar.y:
341         * css/CSSParser.cpp:
342         (WebCore):
343         * css/CSSParser.h:
344         * css/CSSStyleSelector.cpp:
345         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
346         * css/CSSStyleSheet.cpp:
347         (WebCore::CSSStyleSheet::~CSSStyleSheet):
348         (WebCore::CSSStyleSheet::parserAppendRule):
349         (WebCore::CSSStyleSheet::ensureCharsetRule):
350         (WebCore):
351         (WebCore::CSSStyleSheet::length):
352         (WebCore::CSSStyleSheet::item):
353         (WebCore::CSSStyleSheet::clearCharsetRule):
354         (WebCore::CSSStyleSheet::clearRules):
355         (WebCore::CSSStyleSheet::parserSetEncodingFromCharsetRule):
356         (WebCore::CSSStyleSheet::rules):
357         (WebCore::CSSStyleSheet::insertRule):
358         (WebCore::CSSStyleSheet::addRule):
359         (WebCore::CSSStyleSheet::deleteRule):
360         * css/CSSStyleSheet.h:
361         (WebCore):
362         (CSSStyleSheet):
363         (WebCore::CSSStyleSheet::ruleVector):
364         (WebCore::CSSStyleSheet::hasCharsetRule):
365         * inspector/InspectorStyleSheet.cpp:
366         (WebCore::InspectorStyleSheet::reparseStyleSheet):
367
368 2012-03-27  Stephen White  <senorblanco@chromium.org>
369
370         [chromium] Fix filter context creation to be more conservative.
371         https://bugs.webkit.org/show_bug.cgi?id=82349
372
373         Reviewed by James Robinson.
374
375         Covered by webkit_unit_tests, and css3/filters layout tests.
376
377         * platform/graphics/chromium/LayerChromium.cpp:
378         (WebCore::LayerChromium::setFilters):
379         Only request a filter context if the filter lists is non-empty.
380         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
381         (WebCore::CCLayerTreeHost::setNeedsFilterContext):
382         Add a bool param, so tests can cancel a request for filter contexts.
383
384 2012-03-27  Stephen Chenney  <schenney@chromium.org>
385
386         <svg:use> elements in the parser can create elements not marked as created by the parser
387         https://bugs.webkit.org/show_bug.cgi?id=81985
388
389         Reviewed by Adam Barth.
390
391         The SVGUseElement was creating its shadow tree immediately upon
392         demand. This resulted in nodes being created that were not marked as
393         "createdByParser", even during parsing. As it happens, there is
394         already code in there to track "createdByParser" in the SVGUseElement,
395         it was just being ignored all the time. This may even have been
396         inefficient. Now we delay creating the shadow dom tree until children
397         are finished, which is the standard time to handle the createdByParser
398         flag.
399
400         I also verified that other SVG classes that derived from core DOM
401         classes that use the createdByParser flag do correctly pass this flag
402         on.
403
404         No new tests as this is covered by existing tests and does not have new behavior.
405
406         * svg/SVGUseElement.cpp:
407         (WebCore::SVGUseElement::insertedIntoDocument):
408         (WebCore::SVGUseElement::svgAttributeChanged):
409         (WebCore::SVGUseElement::willRecalcStyle):
410         (WebCore::SVGUseElement::finishParsingChildren):
411         * xml/XMLErrors.cpp:
412         (WebCore::XMLErrors::insertErrorMessageBlock):
413
414 2012-03-27  Ming Xie  <mxie@rim.com>
415
416         [BlackBerry] Disable DisallowCType.h usage
417         https://bugs.webkit.org/show_bug.cgi?id=82211
418
419         Reviewed by Rob Buis.
420
421         Build fix: QNX port does use ctype.h, so we should not
422         include <wtf/DisallowCType.h> in WebCore/config.h
423
424         No new tests - Build Fix
425
426         * config.h:
427
428 2012-03-27  Hao Zheng  <zhenghao@chromium.org>
429
430         Change default position attribute of media control panel to relative for Android.
431         https://bugs.webkit.org/show_bug.cgi?id=82303
432
433         Reviewed by Eric Carlson.
434
435         Follow up https://bugs.webkit.org/show_bug.cgi?id=79746 .
436
437         * css/mediaControlsChromiumAndroid.css:
438         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
439
440 2012-03-27  Alexei Filippov  <alexeif@chromium.org>
441
442         Web Inspector: Speed up snapshot parsing.
443         https://bugs.webkit.org/show_bug.cgi?id=82325
444
445         Replacing the iterators with raw nodes/edges access speeds up
446         some phases phasses up to 10 times, taking down the whole init
447         time to less than 6 sec.
448
449         Reviewed by Yury Semikhatsky.
450
451         * inspector/front-end/HeapSnapshot.js:
452         (WebInspector.HeapSnapshot.prototype._buildNodeIndex):
453         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
454         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
455
456 2012-03-27  Antti Koivisto  <antti@apple.com>
457
458         Assertion failure in acid2.
459
460         Rubber-stamped by Andreas Kling.
461
462         Remove assert added in http://trac.webkit.org/changeset/112258. It seems insertedInto/removedFromDocument
463         don't always pair.
464
465         * svg/SVGDocumentExtensions.cpp:
466         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
467
468 2012-03-27  Yury Semikhatsky  <yurys@chromium.org>
469
470         Web Inspector: simplify heap profiler front-end
471         https://bugs.webkit.org/show_bug.cgi?id=82338
472
473         Simplify constructors of WebInspector.HeapSnapshotArraySlice and
474         WebInspector.HeapSnapshotEdgesProvider.
475
476         Reviewed by Pavel Feldman.
477
478         * inspector/front-end/HeapSnapshot.js:
479         (WebInspector.HeapSnapshotArraySlice):
480         (WebInspector.HeapSnapshotArraySlice.prototype.item):
481         (WebInspector.HeapSnapshotArraySlice.prototype.slice):
482         (WebInspector.HeapSnapshotNode.prototype.get rawEdges):
483         (WebInspector.HeapSnapshot.prototype._retainersForNode):
484         (WebInspector.HeapSnapshot.prototype._dominatedNodesOfNode):
485         (WebInspector.HeapSnapshot.prototype.createEdgesProvider):
486         (WebInspector.HeapSnapshotEdgesProvider):
487
488 2012-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
489
490         Web Inspector: Tabbed pane should set focus on its contents on tab click.
491         https://bugs.webkit.org/show_bug.cgi?id=82323
492
493         Reviewed by Pavel Feldman.
494
495         Otherwise selected tab does not have focus.
496         Also added tabIndex on tabElements to prevent pasting on closing middle click.
497
498         * inspector/front-end/TabbedPane.js:
499         (WebInspector.TabbedPane):
500         (WebInspector.TabbedPane.prototype.focus):
501         (WebInspector.TabbedPane.prototype.selectTab):
502         (WebInspector.TabbedPaneTab.prototype._createTabElement):
503         (WebInspector.TabbedPaneTab.prototype._tabClicked):
504
505 2012-03-27  Pavel Podivilov  <podivilov@chromium.org>
506
507         Web Inspector: dispatch breakpoint-added and breakpoint-removed events on UISourceCode.
508         https://bugs.webkit.org/show_bug.cgi?id=82318
509
510         Reviewed by Vsevolod Vlasov.
511
512         Breakpoint-added and breakpoint-removed events are always related to specific UISourceCode.
513         See bug 82224 for more details.
514
515         * inspector/front-end/BreakpointManager.js:
516         (WebInspector.BreakpointManager.prototype._addBreakpointToUI):
517         (WebInspector.BreakpointManager.prototype._removeBreakpointFromUI):
518         * inspector/front-end/DebuggerPresentationModel.js:
519         (WebInspector.DebuggerPresentationModel):
520         (WebInspector.UISourceCodeImpl.prototype.breakpointAdded):
521         (WebInspector.UISourceCodeImpl.prototype.breakpointRemoved):
522         * inspector/front-end/ScriptsPanel.js:
523         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
524         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
525         (WebInspector.ScriptsPanel.prototype._addBreakpointListeners):
526         (WebInspector.ScriptsPanel.prototype._removeBreakpointListeners):
527         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
528         * inspector/front-end/UISourceCode.js:
529
530 2012-03-27  Jason Liu  <jason.liu@torchmobile.com.cn>
531
532         [BlackBerry]Cleanup WTF string in platform/network/blackberry
533         https://bugs.webkit.org/show_bug.cgi?id=82005
534
535         Reviewed by Rob Buis.
536
537         No new tests. Just replace WTF::String with String.
538
539         * platform/network/blackberry/NetworkJob.cpp:
540         (WebCore::NetworkJob::handleNotifyDataReceived):
541
542 2012-03-27  Alexander Pavlov  <apavlov@chromium.org>
543
544         Web Inspector: Enable "number" parameters in the web inspector protocol methods
545         https://bugs.webkit.org/show_bug.cgi?id=82334
546
547         The generated protocol dispatcher does not understand protocol method parameters of type "number"
548         (mapped to "double" in the native code.)
549
550         Reviewed by Vsevolod Vlasov.
551
552         * inspector/CodeGeneratorInspector.py:
553         (RawTypes.Number.get_getter_name):
554         (RawTypes.Number.get_c_initializer):
555         (RawTypes.Number.get_js_bind_type):
556         (RawTypes.Number.get_validate_method_params.ValidateMethodParams):
557         (RawTypes.Number.get_validate_method_params):
558
559 2012-03-27  Alexei Filippov  <alexeif@chromium.org>
560
561         Web Inspector: Fix missing objects in the dominators view.
562         https://bugs.webkit.org/show_bug.cgi?id=82194
563
564         Due to the nature of dominators tree it is not possible to hide internal
565         objects there because they may happen to contain user objects that can't
566         be hidden.
567         Besides that it fixes a small bug in HeapSnapshotArraySlice.slice
568         function.
569
570         Reviewed by Yury Semikhatsky.
571
572         * inspector/front-end/DetailedHeapshotGridNodes.js:
573         (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
574         * inspector/front-end/HeapSnapshot.js:
575         (WebInspector.HeapSnapshotArraySlice.prototype.slice):
576
577 2012-03-27  Antti Koivisto  <antti@apple.com>
578
579         Remove Document::mappedElementSheet() 
580         https://bugs.webkit.org/show_bug.cgi?id=82242
581
582         Reviewed by Andreas Kling and Nikolas Zimmermann.
583
584         The only thing this is used for anymore is SVGFontFaceElement. That can be handled without
585         the confusing extra stylesheet.
586
587         * css/CSSStyleSelector.cpp:
588         (WebCore::CSSStyleSelector::CSSStyleSelector):
589         * css/CSSStyleSelector.h:
590         (CSSStyleSelector):
591         
592             - Add font face rules from registered SVGFontFaceElements.
593             - Simplify the constructor signature. Stylesheets are part of the document.
594             
595         * dom/Document.cpp:
596         (WebCore::Document::~Document):
597         (WebCore::Document::createStyleSelector):
598         (WebCore):
599         (WebCore::Document::updateBaseURL):
600         * dom/Document.h:
601         (WebCore):
602         (WebCore::Document::documentUserSheets):
603         (Document):
604
605             - Remove mappedElementSheet        
606             - Adapt to the CSSStyleSelector constructor signature changes.
607
608         * svg/SVGDocumentExtensions.cpp:
609         (WebCore::SVGDocumentExtensions::svgFontFaceElements):
610         (WebCore):
611         (WebCore::SVGDocumentExtensions::registerSVGFontFaceElement):
612         (WebCore::SVGDocumentExtensions::unregisterSVGFontFaceElement):
613         * svg/SVGDocumentExtensions.h:
614         (WebCore):
615         (SVGDocumentExtensions):
616         
617             - Add map for SVGFontFaceElements
618
619         * svg/SVGFontFaceElement.cpp:
620         (WebCore::SVGFontFaceElement::insertedIntoDocument):
621         (WebCore::SVGFontFaceElement::removedFromDocument):
622         (WebCore):
623         * svg/SVGFontFaceElement.h:
624         (SVGFontFaceElement):
625         (WebCore::SVGFontFaceElement::fontFaceRule):
626         
627             - Switch to updating svgFontFaceElements map.
628             - Use elementSheet as the parent sheet (nothing is ever added to the elementSheet, it is used for
629               resolving relative URLs only).
630
631 2012-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
632
633         Web Inspector: startEditing should remove tabIndex attribute from the element if it was not set before.
634         https://bugs.webkit.org/show_bug.cgi?id=82322
635
636         Reviewed by Pavel Feldman.
637
638         This patch removes tabIndex attribute from the element after editing if it was not present before.
639         Otherwise tabIndex becomes set unexpectedly after exiting edit mode.
640
641         * inspector/front-end/UIUtils.js:
642         (WebInspector.startEditing.cleanUpAfterEditing):
643
644 2012-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
645
646         Web Inspector: Tree outline should not start search on key press if it is being edited.
647         https://bugs.webkit.org/show_bug.cgi?id=82327
648
649         Reviewed by Pavel Feldman.
650
651         This is needed for snippet renaming support.
652
653         * inspector/front-end/treeoutline.js:
654         (TreeOutline):
655         (TreeOutline.prototype._treeKeyPress):
656
657 2012-03-27  Levi Weintraub  <leviw@chromium.org>
658
659         Revert RenderApplet::intrinsicSize to integers
660         https://bugs.webkit.org/show_bug.cgi?id=82206
661
662         Reviewed by Eric Seidel.
663
664         Intrinsic sizes originate either outside of WebCore, or from their initial values,
665         which are always integers. Reverting RenderApplet::intrinsicSize to integers, the
666         last spot improperly using LayoutUnits
667
668         No new tests. No change in behavior.
669
670         * rendering/RenderApplet.cpp:
671         (WebCore::RenderApplet::intrinsicSize):
672         * rendering/RenderApplet.h:
673         (RenderApplet):
674
675
676 2012-03-27  Alexis Menard  <alexis.menard@openbossa.org>
677
678         Increase code sharing between CSSComputedStyleDeclaration and CSSPropertyLonghand.
679         https://bugs.webkit.org/show_bug.cgi?id=82261
680
681         Reviewed by Ryosuke Niwa.
682
683         Use longhands declaration from CSSPropertyLonghand in CSSComputedStyleDeclaration to avoid
684         code duplication.
685
686         No new tests : refactoring only, we shouldn't have any behavior difference.
687
688         * css/CSSComputedStyleDeclaration.cpp:
689         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
690         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForShorthandProperties):
691         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
692         * css/CSSComputedStyleDeclaration.h:
693         (WebCore):
694         (CSSComputedStyleDeclaration):
695         * css/CSSPropertyLonghand.cpp:
696         (WebCore::outlineLonghand):
697         Re-order to match the spec default order and also remove outline-offset as it is not part
698         of the shorthand (http://www.w3.org/TR/css3-ui/#outline). Luckily this was cover by a layout test.
699
700 2012-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
701
702         Web Inspector: Editable TextViewer should show cursor when it is focused.
703         https://bugs.webkit.org/show_bug.cgi?id=82320
704
705         Reviewed by Pavel Feldman.
706
707         TextViewer now focuses editable inner container unless read-only flag is set.
708
709         * inspector/front-end/TextViewer.js:
710         (WebInspector.TextViewer.prototype.focus):
711         (WebInspector.TextEditorMainPanel):
712         (WebInspector.TextEditorMainPanel.prototype._handleElementFocus):
713         (WebInspector.TextEditorMainPanel.prototype.focus):
714
715 2012-03-26  Levi Weintraub  <leviw@chromium.org>
716
717         Unreviewed. Removing change markers from ChangeLog.
718
719 2012-03-26  Levi Weintraub  <leviw@chromium.org>
720
721         Convert RenderSelectionInfo::rect to LayoutUnits
722         https://bugs.webkit.org/show_bug.cgi?id=82213
723
724         Reviewed by Eric Seidel.
725
726         RenderSelectionInfoBase stores a cached repaint rect in local coordinates. Coordinates local to
727         renderers should be stored in LayoutUnits.
728
729         No new tests. No change in behavior.
730
731         * rendering/RenderSelectionInfo.h:
732         (WebCore::RenderSelectionInfo::rect):
733         (RenderSelectionInfo):
734
735 2012-03-26  Levi Weintraub  <leviw@chromium.org>
736
737         Convert RenderSelectionInfo::rect to LayoutUnits
738         https://bugs.webkit.org/show_bug.cgi?id=82213
739
740         Reviewed by Eric Seidel.
741
742         RenderSelectionInfoBase stores a cached repaint rect in local coordinates. Coordinates
743         local to renderers should be stored in LayoutUnits as described in
744         http://trac.webkit.org/wiki/LayoutUnit
745
746         No new tests. No change in behavior.
747
748         * rendering/RenderSelectionInfo.h:
749         (WebCore::RenderSelectionInfo::rect):
750         (RenderSelectionInfo):
751
752 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
753
754         Enable animVal support for SVGAnimatedRect
755         https://bugs.webkit.org/show_bug.cgi?id=82317
756
757         Reviewed by Zoltan Herczeg.
758
759         Enable animVal support for SVGAnimatedRect. Very simple now that everything is prepared.
760         All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedRectAnimator.
761
762         Extended existing tests to cover this.
763
764         * svg/SVGAnimatedRect.cpp:
765         (WebCore::SVGAnimatedRectAnimator::startAnimValAnimation):
766         (WebCore::SVGAnimatedRectAnimator::stopAnimValAnimation):
767         (WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal):
768         (WebCore::SVGAnimatedRectAnimator::animValWillChange):
769         (WebCore::SVGAnimatedRectAnimator::animValDidChange):
770         * svg/SVGAnimatedRect.h:
771         (SVGAnimatedRectAnimator):
772         * svg/SVGAnimatedType.cpp:
773         (WebCore::SVGAnimatedType::supportsAnimVal):
774
775 2012-03-27  Sheriff Bot  <webkit.review.bot@gmail.com>
776
777         Unreviewed, rolling out r112201.
778         http://trac.webkit.org/changeset/112201
779         https://bugs.webkit.org/show_bug.cgi?id=82302
780
781         Breaks chromium's WebPageSerializerTest.HTMLNodes test
782         (Requested by pfeldman on #webkit).
783
784         * loader/cache/CachedCSSStyleSheet.cpp:
785         (WebCore::CachedCSSStyleSheet::error):
786         (WebCore):
787         * loader/cache/CachedCSSStyleSheet.h:
788         (CachedCSSStyleSheet):
789         * loader/cache/CachedFont.cpp:
790         (WebCore):
791         (WebCore::CachedFont::error):
792         * loader/cache/CachedFont.h:
793         (CachedFont):
794         * loader/cache/CachedImage.cpp:
795         (WebCore::CachedImage::error):
796         * loader/cache/CachedResource.h:
797         (CachedResource):
798         * loader/cache/CachedScript.cpp:
799         (WebCore::CachedScript::error):
800         (WebCore):
801         * loader/cache/CachedScript.h:
802         (CachedScript):
803         * loader/cache/CachedXSLStyleSheet.cpp:
804         (WebCore::CachedXSLStyleSheet::error):
805         (WebCore):
806         * loader/cache/CachedXSLStyleSheet.h:
807         (CachedXSLStyleSheet):
808
809 2012-03-27  Levi Weintraub  <leviw@chromium.org>
810
811         LayoutRepainter: Remove unused constructor parameter and update to LayoutUnits
812         https://bugs.webkit.org/show_bug.cgi?id=82185
813
814         Reviewed by Eric Seidel.
815
816         Removing an optional parameter for old bounds in LayoutRepainter's constructor that
817         is no longer used. The old bounds are instead always gleaned from the renderer's
818         clippedOverflowRectForRepaint.
819
820         The renderer's bounds and outline rect also are stored in LayoutUnits to properly
821         detect sub-pixel changes during layout. Eventually, we'll pixel snap these values
822         when telling the embedder to invalidate. Adding a comment to that effect.
823
824         No new tests. No change in behavior.
825
826         * rendering/LayoutRepainter.cpp:
827         (WebCore::LayoutRepainter::LayoutRepainter):
828         * rendering/LayoutRepainter.h:
829         (LayoutRepainter):
830
831 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
832
833         Enable animVal support for SVGAnimatedString
834         https://bugs.webkit.org/show_bug.cgi?id=82316
835
836         Reviewed by Zoltan Herczeg.
837
838         Enable animVal support for SVGAnimatedString. Very simple now that everything is prepared.
839         All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedStringAnimator.
840
841         Test: svg/animations/svgstring-animation-1.html
842
843         * svg/SVGAnimatedString.cpp:
844         (WebCore::SVGAnimatedStringAnimator::startAnimValAnimation):
845         (WebCore::SVGAnimatedStringAnimator::stopAnimValAnimation):
846         (WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
847         (WebCore::SVGAnimatedStringAnimator::animValWillChange):
848         (WebCore::SVGAnimatedStringAnimator::animValDidChange):
849         * svg/SVGAnimatedString.h:
850         (SVGAnimatedStringAnimator):
851         * svg/SVGAnimatedType.cpp:
852         (WebCore::SVGAnimatedType::supportsAnimVal):
853
854 2012-03-27  Levi Weintraub  <leviw@chromium.org>
855
856         Update usage of LayoutUnits in RenderListMarker
857         https://bugs.webkit.org/show_bug.cgi?id=81921
858
859         Reviewed by Eric Seidel.
860
861         Implementing proper pixel snapping in list marker painting, and correcting usage of integers
862         for local coordinates/margins that should be sub-pixel.
863
864         No new tests. No change in behavior.
865
866         * rendering/RenderListMarker.cpp:
867         (WebCore::RenderListMarker::localSelectionRect): Changed to LayoutUnits since this represents
868         a rect in local coordinates.
869         (WebCore::RenderListMarker::paint): Doing proper pixel snapping, and using integers for
870         results from text measurement.
871         (WebCore::RenderListMarker::computePreferredLogicalWidths): Using integers for results
872         from text measurement.
873         (WebCore::RenderListMarker::updateMargins): Fixing to be LayoutUnits.
874         * rendering/RenderListMarker.h:
875         (RenderListMarker):
876
877 2012-03-27  Levi Weintraub  <leviw@chromium.org>
878
879         Revert linesBoundingBox to integers
880         https://bugs.webkit.org/show_bug.cgi?id=82182
881
882         Reviewed by Eric Seidel.
883
884         LayoutRects are intended to be pixel snapped to determine the ultimate screen
885         coordinates, but the Inline Box tree is laid out using floats, and pixel snapping
886         the resulting box from linesBoundingBox would produce a potentially incorrect
887         rectangle. Keeping this using enclosingIntRect retains the previous accuracy and
888         prevents misuse.
889
890         No new tests. No change in behavior.
891
892         * rendering/RenderInline.cpp:
893         (WebCore::RenderInline::linesBoundingBox):
894         * rendering/RenderInline.h:
895         (RenderInline):
896         * rendering/RenderLayer.cpp:
897         (WebCore::RenderLayer::updateLayerPosition):
898         * rendering/RenderText.cpp:
899         (WebCore::RenderText::linesBoundingBox):
900         * rendering/svg/RenderSVGInlineText.cpp:
901         (WebCore::RenderSVGInlineText::linesBoundingBox):
902         * rendering/svg/RenderSVGInlineText.h:
903         (RenderSVGInlineText):
904
905 2012-03-26  Pavel Podivilov  <podivilov@chromium.org>
906
907         Web Inspector: store UIBreakpoints on UISourceCode.
908         https://bugs.webkit.org/show_bug.cgi?id=82214
909
910         This change will allow us to make breakpoint-added and breakpoint-removed events a part of UISourceCode interface.
911         See bug 82224 for more details.
912
913         Reviewed by Vsevolod Vlasov.
914
915         * inspector/front-end/BreakpointManager.js:
916         (WebInspector.BreakpointManager.prototype.uiSourceCodeRemoved):
917         (WebInspector.BreakpointManager.prototype.setBreakpoint):
918         (WebInspector.BreakpointManager.prototype.removeBreakpoint):
919         (WebInspector.BreakpointManager.prototype._addBreakpointToUI):
920         (WebInspector.BreakpointManager.prototype._removeBreakpointFromUI):
921         (WebInspector.BreakpointManager.prototype.debuggerReset):
922         * inspector/front-end/CompilerScriptMapping.js:
923         (WebInspector.CompilerScriptMapping.prototype.addScript):
924         * inspector/front-end/DebuggerPresentationModel.js:
925         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
926         (WebInspector.DebuggerPresentationModel.prototype.breakpointsForUISourceCode):
927         (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint):
928         (WebInspector.UISourceCodeImpl):
929         (WebInspector.UISourceCodeImpl.prototype.breakpoints):
930         (WebInspector.UISourceCodeImpl.prototype.breakpointAdded):
931         (WebInspector.UISourceCodeImpl.prototype.breakpointRemoved):
932         * inspector/front-end/RawSourceCode.js:
933         (WebInspector.RawSourceCode.prototype._createUISourceCode):
934         * inspector/front-end/SnippetsModel.js:
935         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
936         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
937         * inspector/front-end/UISourceCode.js:
938         (WebInspector.UISourceCode.prototype.get domain):
939         (WebInspector.UISourceCode.prototype.get folderName):
940         (WebInspector.UISourceCode.prototype.get fileName):
941         (WebInspector.UISourceCode.prototype.get displayName):
942         (WebInspector.UISourceCode.prototype._parseURL):
943         (WebInspector.UISourceCode.prototype._didRequestContent):
944         (WebInspector.UISourceCode.prototype.breakpoints):
945         * inspector/front-end/inspector.html:
946
947 2012-03-27  Nat Duca  <nduca@chromium.org>
948
949         [chromium] Fix crash with fling with tracing enabled
950         https://bugs.webkit.org/show_bug.cgi?id=82306
951
952         The TRACE_EVENT_START instrumentation was deferencing a PassOwnPtr
953         after it had been passed into another OwnPtr. This caused frequent
954         crashes when tracing was enabled.
955
956         Reviewed by Adam Barth.
957
958         * platform/ActivePlatformGestureAnimation.cpp:
959         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
960         * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp:
961         (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
962
963 2012-03-27  Carlos Garcia Campos  <cgarcia@igalia.com>
964
965         [SOUP] Implement missing methods in CookieJarSoup
966         https://bugs.webkit.org/show_bug.cgi?id=82082
967
968         Reviewed by Martin Robinson.
969
970         * platform/network/soup/CookieJarSoup.cpp:
971         (WebCore::defaultCookieJar): Return a global GRefPtr to store the
972         default cookie jar.
973         (WebCore::soupCookieJar): Return the current cookie jar or create
974         a new one.
975         (WebCore::setSoupCookieJar): Set the current cookie jar.
976         (WebCore::setCookies): Fix coding style.
977         (WebCore::cookiesForDocument): Helper function to get the list of
978         cookies as a string.
979         (WebCore::cookies): Use cookiesForDocument().
980         (WebCore::cookieRequestHeaderFieldValue): Ditto.
981         (WebCore::getRawCookies): Get the list of cookies for the given
982         document and url.
983         (WebCore::deleteCookie): Delete the given cookie.
984         (WebCore::getHostnamesWithCookies): Use GOwnPtr.
985         (WebCore::deleteCookiesForHostname): Use GOwnPtr and
986         soup_cookie_domain_matches() instead of comparing the domain
987         directly with the given hostname.
988         (WebCore::deleteAllCookies): Use GOwnPtr.
989         * platform/network/soup/CookieJarSoup.h:
990         * platform/network/soup/GOwnPtrSoup.cpp:
991         (WTF::SoupCookie): Add GOwnPtr template for SoupCookie.
992         * platform/network/soup/GOwnPtrSoup.h:
993         * platform/network/soup/ResourceHandleSoup.cpp:
994         (WebCore::ensureSessionIsInitialized): Use soupCookieJar() instead
995         of defaultCookieJar().
996
997 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
998
999         Enable animVal support for SVGAnimatedBoolean
1000         https://bugs.webkit.org/show_bug.cgi?id=82311
1001
1002         Reviewed by Antti Koivisto.
1003
1004         Enable animVal support for SVGAnimatedBoolean. Very simple now that everything is prepared.
1005         All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedBooleanAnimator.
1006
1007         Extended existing tests to cover this.
1008
1009         * svg/SVGAnimatedBoolean.cpp:
1010         (WebCore::SVGAnimatedBooleanAnimator::startAnimValAnimation):
1011         (WebCore::SVGAnimatedBooleanAnimator::stopAnimValAnimation):
1012         (WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal):
1013         (WebCore::SVGAnimatedBooleanAnimator::animValWillChange):
1014         (WebCore::SVGAnimatedBooleanAnimator::animValDidChange):
1015         * svg/SVGAnimatedBoolean.h:
1016         (SVGAnimatedBooleanAnimator):
1017         * svg/SVGAnimatedType.cpp:
1018         (WebCore::SVGAnimatedType::setValueAsString):
1019         (WebCore::SVGAnimatedType::supportsAnimVal):
1020
1021 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
1022
1023         <img style='width: 100%' src='foo.svg'> gets pixellated when stretched
1024         https://bugs.webkit.org/show_bug.cgi?id=81631
1025
1026         Reviewed by Antti Koivisto.
1027
1028         Final cleanup of RenderReplaced after the intrinsic size negotiation patch series from some weeks/months ago.
1029         Stop tracking whether a RenderReplaced has an intrinsic size or not with an extra-bool, instead assume each
1030         RenderReplaced derived class has an intrinsic size. If not, the class should override
1031         computeIntrinsicRatioInformation() for any custom logic - currently only done by RenderImage.
1032
1033         Remove all logic depending on m_hasIntrinsicSize from computeReplacedLogicalWidth/Height, which was used
1034         to support different sizing models depending on if the replaced element is a RenderImage or a RenderPart.
1035         Unify all of this in computeIntrinsicRatioInformation right in RenderReplaced. This allows to remove
1036         a hack from RenderImage::computeReplacedLogicalWidth(), which forced the synchroniziation of the intrinsicSize()
1037         before calling the base classes RenderReplaced::computeReplacedLogicalWidth().
1038         Now RenderImage just overrides the layout() method, calls RenderReplaced::layout() and then sets the container
1039         size of the image resources to [contentWidth(), contentHeight()] - reflecting the actual result of the layout.
1040         Furthermore this now allows us to unify CachedImage::imageSizeForRenderer() again for both SVG and non-SVG images.
1041
1042         Propagating the right container size to the image resource fixes the actual bug, that the SVGImage got pixellated.
1043         Adding new tests covering percentage width or height set on an <img> embedding an external SVG, no more pixelation.
1044
1045         Tests: svg/as-image/img-relative-height-expected.html
1046                svg/as-image/img-relative-height.html
1047                svg/as-image/img-relative-width-expected.html
1048                svg/as-image/img-relative-width.html
1049
1050         * loader/cache/CachedImage.cpp:
1051         (WebCore::CachedImage::imageSizeForRenderer):
1052         * rendering/RenderEmbeddedObject.cpp:
1053         (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
1054         * rendering/RenderImage.cpp:
1055         (WebCore::RenderImage::layout):
1056         (WebCore::RenderImage::computeIntrinsicRatioInformation):
1057         * rendering/RenderImage.h:
1058         (RenderImage):
1059         * rendering/RenderReplaced.cpp:
1060         (WebCore::RenderReplaced::RenderReplaced):
1061         (WebCore::rendererHasAspectRatio):
1062         (WebCore):
1063         (WebCore::RenderReplaced::computeIntrinsicRatioInformationForRenderBox):
1064         (WebCore::RenderReplaced::computeIntrinsicRatioInformation):
1065         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1066         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
1067         * rendering/RenderReplaced.h:
1068         (WebCore::RenderReplaced::intrinsicSize):
1069         (RenderReplaced):
1070         (WebCore::RenderReplaced::setIntrinsicSize):
1071         * svg/graphics/SVGImage.cpp:
1072         (WebCore::SVGImage::setContainerSize):
1073         * svg/graphics/SVGImage.h:
1074         (WebCore::SVGImage::usesContainerSize):
1075
1076 2012-03-27  Ilya Tikhonovsky  <loislo@chromium.org>
1077
1078         Web Inspector: HeapSnapshot: speed-up distanceToWindow calculation.
1079         https://bugs.webkit.org/show_bug.cgi?id=82305
1080
1081         Reviewed by Yury Semikhatsky.
1082
1083         * inspector/front-end/HeapSnapshot.js:
1084         (WebInspector.HeapSnapshot.prototype._bfs):
1085
1086 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
1087
1088         SVGAnimatedType should support SVGAnimatedIntegerOptionalInteger animation
1089         https://bugs.webkit.org/show_bug.cgi?id=67563
1090
1091         Reviewed by Dirk Schulze.
1092
1093         Add SVGAnimatedIntegerOptionalInteger type handling animation of pair<int, int> objects
1094         as used for the SVG properties 'filterRes' and 'order'. They're currently animated as
1095         SVGAnimatedNumberOptionalNumber - but that won't work for animVal support. Fix that
1096         and enable animVal support for SVGAnimatedInteger(OptionalInteger).
1097
1098         Use 'int' as datatype for SVGAnimatedInteger instead of 'long' for consistency, and
1099         move SVGAnimatedEnumeration from 'int' to 'unsigned short', to make them distinguishable.
1100
1101         Test: svg/animations/svginteger-animation-2.html
1102
1103         * CMakeLists.txt:
1104         * GNUmakefile.list.am:
1105         * Target.pri:
1106         * WebCore.gypi:
1107         * WebCore.vcproj/WebCore.vcproj:
1108         * WebCore.xcodeproj/project.pbxproj:
1109         * svg/SVGAllInOne.cpp:
1110         * svg/SVGAnimatedEnumeration.h:
1111         (WebCore):
1112         * svg/SVGAnimatedInteger.cpp:
1113         (WebCore::SVGAnimatedIntegerAnimator::startAnimValAnimation):
1114         (WebCore):
1115         (WebCore::SVGAnimatedIntegerAnimator::stopAnimValAnimation):
1116         (WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal):
1117         (WebCore::SVGAnimatedIntegerAnimator::animValWillChange):
1118         (WebCore::SVGAnimatedIntegerAnimator::animValDidChange):
1119         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedInteger):
1120         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
1121         * svg/SVGAnimatedInteger.h:
1122         (WebCore):
1123         (SVGAnimatedIntegerAnimator):
1124         * svg/SVGAnimatedIntegerOptionalInteger.cpp: Added.
1125         (WebCore):
1126         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::SVGAnimatedIntegerOptionalIntegerAnimator):
1127         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString):
1128         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::startAnimValAnimation):
1129         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::stopAnimValAnimation):
1130         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal):
1131         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValWillChange):
1132         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValDidChange):
1133         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateFromAndToValues):
1134         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateFromAndByValues):
1135         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
1136         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateDistance):
1137         * svg/SVGAnimatedIntegerOptionalInteger.h: Copied from Source/WebCore/svg/SVGAnimatedInteger.h.
1138         (WebCore):
1139         (SVGAnimatedIntegerOptionalIntegerAnimator):
1140         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::~SVGAnimatedIntegerOptionalIntegerAnimator):
1141         * svg/SVGAnimatedNumberOptionalNumber.cpp:
1142         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
1143         * svg/SVGAnimatedType.cpp:
1144         (WebCore::SVGAnimatedType::~SVGAnimatedType):
1145         (WebCore::SVGAnimatedType::createIntegerOptionalInteger):
1146         (WebCore):
1147         (WebCore::SVGAnimatedType::integerOptionalInteger):
1148         (WebCore::SVGAnimatedType::valueAsString):
1149         (WebCore::SVGAnimatedType::setValueAsString):
1150         (WebCore::SVGAnimatedType::supportsAnimVal):
1151         * svg/SVGAnimatedType.h:
1152         (SVGAnimatedType):
1153         * svg/SVGAnimatorFactory.h:
1154         (WebCore::SVGAnimatorFactory::create):
1155         * svg/SVGFilterElement.cpp:
1156         (WebCore::SVGFilterElement::setFilterRes):
1157         * svg/SVGFilterElement.h:
1158         (SVGFilterElement):
1159         * svg/SVGPathElement.cpp:
1160         (WebCore::SVGPathElement::getPathSegAtLength):
1161         * svg/SVGPathElement.h:
1162         (SVGPathElement):
1163         * svg/SVGPathParserFactory.cpp:
1164         (WebCore::SVGPathParserFactory::getSVGPathSegAtLengthFromSVGPathByteStream):
1165         * svg/SVGPathParserFactory.h:
1166         (SVGPathParserFactory):
1167         * svg/SVGPathTraversalStateBuilder.cpp:
1168         (WebCore::SVGPathTraversalStateBuilder::pathSegmentIndex):
1169         * svg/SVGPathTraversalStateBuilder.h:
1170         (SVGPathTraversalStateBuilder):
1171         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
1172         (WebCore::SVGAnimatedEnumerationPropertyTearOff::setBaseVal):
1173         (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
1174         (WebCore::SVGAnimatedEnumerationPropertyTearOff::currentAnimatedValue):
1175         (WebCore::SVGAnimatedEnumerationPropertyTearOff::SVGAnimatedEnumerationPropertyTearOff):
1176         * svg/properties/SVGPropertyInfo.h:
1177         * svg/properties/SVGPropertyTraits.h:
1178
1179 2012-03-25  Nikolas Zimmermann  <nzimmermann@rim.com>
1180
1181         Enable animVal support for SVGAngle
1182         https://bugs.webkit.org/show_bug.cgi?id=82144
1183
1184         Reviewed by Rob Buis.
1185
1186         Enable animVal support for SVGAnimatedAngle. Very simple now that everything is prepared.
1187         All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedAngleAnimator.
1188
1189         Extended existing tests to cover this.
1190
1191         * svg/SVGAnimatedAngle.cpp:
1192         (WebCore::sharedSVGAngle):
1193         (WebCore::SVGAnimatedAngleAnimator::constructFromString):
1194         (WebCore::SVGAnimatedAngleAnimator::startAnimValAnimation):
1195         (WebCore::SVGAnimatedAngleAnimator::stopAnimValAnimation):
1196         (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal):
1197         (WebCore::SVGAnimatedAngleAnimator::animValWillChange):
1198         (WebCore::SVGAnimatedAngleAnimator::animValDidChange):
1199         (WebCore::SVGAnimatedAngleAnimator::calculateDistance):
1200         * svg/SVGAnimatedAngle.h:
1201         (SVGAnimatedAngleAnimator):
1202         * svg/SVGAnimatedType.cpp:
1203         (WebCore::SVGAnimatedType::supportsAnimVal):
1204
1205 2012-03-27  Yury Semikhatsky  <yurys@chromium.org>
1206
1207         Web Inspector: remove remains of path finder in heap profiler front-end
1208         https://bugs.webkit.org/show_bug.cgi?id=82304
1209
1210         Removed remainders of heap path finder as this code is not used anymore.
1211
1212         Reviewed by Pavel Feldman.
1213
1214         * inspector/front-end/HeapSnapshot.js:
1215         * inspector/front-end/HeapSnapshotProxy.js:
1216
1217 2012-03-27  Dan Bernstein  <mitz@apple.com>
1218
1219         Reverted r112214, since it was not the right fix for the build.
1220
1221         * css/StylePropertySet.cpp:
1222         (WebCore::StylePropertySet::asText):
1223
1224 2012-03-27  Kentaro Hara  <haraken@chromium.org>
1225
1226         [V8][Performance] Optimize createTextNode(), createElement(), cloneNode(), etc
1227         https://bugs.webkit.org/show_bug.cgi?id=82201
1228
1229         Reviewed by Adam Barth.
1230
1231         This patch improves performance of createTextNode() by 13%, createElement() by 14%,
1232         and cloneNode() by 16%. Similar performance improvement will be observed in
1233         DOM methods that create a new object every time.
1234
1235         Performance test: https://bugs.webkit.org/attachment.cgi?id=133799
1236
1237         The performance test results are as follows. Since the performance of V8's GC is
1238         really unstable, the average of measured times makes no sense in Chromium.
1239         Instead, let us focus on the median. I believe that this performance
1240         improvement has impact on Dromaeo, but we cannot observe the improvement
1241         due to the unsteadiness of V8's GC, as shown below.
1242
1243         Chromium/V8/Linux (without the patch):
1244         createTextNode : median=277ms (mean=460.88ms, min=270ms, max=3381ms)
1245         createElement : median=379ms (mean=637.52ms, min=372ms, max=3022ms)
1246         cloneNode : median=369ms (mean=581.72ms, min=363ms, max=3050ms)
1247         Dromaeo/dom-modify/createElement: 439.17runs/s +-31.60% (<--- pretty noisy)
1248         Dromaeo/dom-modify/createTextNode: 287.71runs/s +-28.39% (<--- pretty noisy)
1249         Dromaeo/dom-modify/cloneNode: 174.62runs/s +-25.68% (<--- pretty noisy)
1250
1251         Chromium/V8/Linux (with the patch):
1252         createTextNode : median=240ms (mean=411.12ms, min=237ms, max=2965ms)
1253         createElement : median=325ms (mean=585.30ms, min=317ms, max=2984ms)
1254         cloneNode : median=310ms (mean=522.48ms, min=302ms, max=2988ms)
1255         Dromaeo/dom-modify/createElement: 507.15runs/s +-36.00% (<--- pretty noisy)
1256         Dromaeo/dom-modify/createTextNode: 251.01runs/s +-6.57%
1257         Dromaeo/dom-modify/cloneNode: 177.85runs/s +-28.74% (<--- pretty noisy)
1258
1259         Chromium/V8/Mac (without the patch):
1260         createTextNode : median=317ms (mean=439.08ms, min=303ms, max=3126ms)
1261         createElement : median=403ms (mean=695.70ms, min=398ms, max=5615ms)
1262         cloneNode : median=384ms (mean=577.96ms, min=372ms, max=5313ms)
1263         Dromaeo/dom-modify/createElement: 493.89runs/s +-28.32% (<--- pretty noisy)
1264         Dromaeo/dom-modify/createTextNode: 279.66runs/s +-1.91%
1265         Dromaeo/dom-modify/cloneNode: 173.06runs/s +-24.41% (<--- pretty noisy)
1266
1267         Chromium/V8/Mac (with the patch):
1268         createTextNode : median=277ms (mean=460.88ms, min=270ms, max=3381ms)
1269         createElement : median=379ms (mean=637.52ms, min=372ms, max=3022ms)
1270         cloneNode : median=369ms (mean=581.72ms, min=363ms, max=3050ms)
1271         Dromaeo/dom-modify/createElement: 510.47runs/s +-28.13% (<--- pretty noisy)
1272         Dromaeo/dom-modify/createTextNode: 215.80runs/s +-20.99% (<--- pretty noisy)
1273         Dromaeo/dom-modify/cloneNode: 174.41runs/s +-24.85% (<--- pretty noisy)
1274
1275         Safari/JavaScriptCore/Mac:
1276         createTextNode : median=142ms (mean=141.04ms, min=110ms, max=168ms)
1277         createElement : median=234ms (mean=245.74ms, min=219ms, max=305ms)
1278         cloneNode : median=210ms (mean=213.36ms, min=204ms, max=284ms)
1279         Dromaeo/dom-modify/createElement: 822.49runs/s +-1.69%
1280         Dromaeo/dom-modify/createTextNode: 735.57runs/s +-0.91%
1281         Dromaeo/dom-modify/cloneNode: 135.20runs/s +-4.13%
1282
1283         This patch makes the following two optimizations:
1284
1285         [1] If the currently running context is equal to the context that we are about to enter,
1286         we do not call context->Enter().
1287         [2] We do not create a Local handle of the context until we really need to enter the context.
1288
1289         * bindings/scripts/CodeGeneratorV8.pm:
1290         (GenerateToV8Converters):
1291         * bindings/v8/V8Proxy.cpp:
1292         (WebCore::V8Proxy::persistentContext):
1293         (WebCore):
1294         * bindings/v8/V8Proxy.h:
1295         (V8Proxy):
1296
1297         * WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: Updated run-bindings-tests results.
1298
1299 2012-03-27  Bill Budge  <bbudge@chromium.org>
1300
1301         cross-origin XMLHttpRequest doesn't work with redirect
1302         https://bugs.webkit.org/show_bug.cgi?id=57600
1303
1304         Reviewed by Adam Barth.
1305
1306         Changes DocumentThreadableLoader to follow the CORS redirect steps when
1307         asynchronously loading a cross origin request with access control. Synchronous
1308         loads should not be affected. Also adds methods to ResourceRequestBase to
1309         clear special request headers that aren't allowed when using access control.
1310         Follows the CORS spec as described in the Latest Editor Draft at:
1311         http://www.w3.org/TR/cors/
1312
1313         Test: http/tests/xmlhttprequest/access-control-and-redirects-async.html
1314
1315         * loader/DocumentThreadableLoader.cpp:
1316         * loader/DocumentThreadableLoader.h:
1317         * platform/network/ResourceRequestBase.cpp:
1318         * platform/network/ResourceRequestBase.h:
1319
1320 2012-03-27  Adam Barth  <abarth@webkit.org>
1321
1322         ImageLoader::m_firedLoadEvent is a confusing name
1323         https://bugs.webkit.org/show_bug.cgi?id=82283
1324
1325         Reviewed by Kentaro Hara.
1326
1327         This patch renames m_firedLoadEvent (and friends) to
1328         m_hasPendingLoadEvent (and negates the value).  That name more
1329         accurately reflects the semantics of this piece of state.  For example,
1330         we now initialize m_hasPendingLoadEvent to false, which makes sense as
1331         there is no pending load event, whereas before we initialized
1332         m_firedLoadEvent to true, which made less sense since we hadn't yet
1333         actually fired the load event.
1334
1335         * bindings/v8/V8GCController.cpp:
1336         (WebCore::calculateGroupId):
1337         * html/HTMLImageElement.cpp:
1338         (WebCore::HTMLImageElement::attach):
1339         * html/HTMLImageElement.h:
1340         (HTMLImageElement):
1341         (WebCore::HTMLImageElement::hasPendingLoadEvent):
1342         (WebCore::HTMLImageElement::hasPendingActivity):
1343         * html/ImageInputType.cpp:
1344         (WebCore::ImageInputType::attach):
1345         * loader/ImageLoader.cpp:
1346         (WebCore::ImageLoader::ImageLoader):
1347         (WebCore::ImageLoader::~ImageLoader):
1348         (WebCore::ImageLoader::setImage):
1349         (WebCore::ImageLoader::updateFromElement):
1350         (WebCore::ImageLoader::notifyFinished):
1351         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
1352         (WebCore::ImageLoader::dispatchPendingLoadEvent):
1353         (WebCore::ImageLoader::dispatchPendingErrorEvent):
1354         * loader/ImageLoader.h:
1355         (WebCore::ImageLoader::hasPendingBeforeLoadEvent):
1356         (WebCore::ImageLoader::hasPendingLoadEvent):
1357         (ImageLoader):
1358         * svg/SVGImageElement.cpp:
1359         (WebCore::SVGImageElement::haveLoadedRequiredResources):
1360
1361 2012-03-27  Dan Bernstein  <mitz@apple.com>
1362
1363         Tried to fix 32-bit builds.
1364
1365         * css/StylePropertySet.cpp:
1366         (WebCore::StylePropertySet::asText):
1367
1368 2012-03-26  Sheriff Bot  <webkit.review.bot@gmail.com>
1369
1370         Unreviewed, rolling out r112199.
1371         http://trac.webkit.org/changeset/112199
1372         https://bugs.webkit.org/show_bug.cgi?id=82295
1373
1374         Breaks Chromium Win compilation (Requested by pfeldman on
1375         #webkit).
1376
1377         * bindings/scripts/CodeGeneratorV8.pm:
1378         (GenerateConstructorCallback):
1379         (GenerateNamedConstructorCallback):
1380         (GenerateToV8Converters):
1381         (GetDomMapFunction):
1382         * bindings/scripts/test/V8/V8Float64Array.cpp:
1383         (WebCore::V8Float64Array::wrapSlow):
1384         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1385         (WebCore::V8TestActiveDOMObject::wrapSlow):
1386         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1387         (WebCore::V8TestCustomNamedGetter::wrapSlow):
1388         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1389         (WebCore::V8TestEventConstructor::wrapSlow):
1390         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1391         (WebCore::V8TestEventTarget::wrapSlow):
1392         * bindings/scripts/test/V8/V8TestInterface.cpp:
1393         (WebCore::V8TestInterface::wrapSlow):
1394         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1395         (WebCore::V8TestMediaQueryListListener::wrapSlow):
1396         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1397         (WebCore::V8TestNamedConstructor::wrapSlow):
1398         * bindings/scripts/test/V8/V8TestObj.cpp:
1399         (WebCore::V8TestObj::wrapSlow):
1400         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1401         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
1402         * bindings/v8/V8DOMWrapper.cpp:
1403         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
1404         (WebCore):
1405         * bindings/v8/V8DOMWrapper.h:
1406         (WebCore):
1407         (V8DOMWrapper):
1408         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
1409         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
1410
1411 2012-03-26  David Kilzer  <ddkilzer@apple.com>
1412
1413         Build system prep work for upstreaming iOS changes
1414         <http://webkit.org/b/82267>
1415
1416         Reviewed by Mark Rowe.
1417
1418         * DerivedSources.make: Move 'bison' into a variable and use
1419         xcrun to find it on Mac OS X.
1420         * bindings/scripts/preprocessor.pm:
1421         (applyPreprocessor): Add local @args variable.  On iOS, the
1422         compiler needs additional "-isysroot $(SDKROOT)" arguments when
1423         invoked, so it's easier to add them to an array, especially if
1424         $SDKROOT contains a space in the path.  Remove now-redundant
1425         $gccLocation variable.
1426
1427 2012-03-26  Nate Chapin  <japhet@chromium.org>
1428
1429         Remove duplicate error() impls in CachedResource subclasses
1430         https://bugs.webkit.org/show_bug.cgi?id=81161
1431
1432         Reviewed by Alexey Proskuryakov.
1433
1434         No new tests, refactor only.
1435
1436         * loader/cache/CachedCSSStyleSheet.cpp:
1437         * loader/cache/CachedCSSStyleSheet.h:
1438         * loader/cache/CachedFont.cpp:
1439         * loader/cache/CachedFont.h:
1440         * loader/cache/CachedImage.cpp:
1441         * loader/cache/CachedResource.h: Make checkNotify()
1442              virtual, so the right checkNotify() gets called in error().
1443         * loader/cache/CachedScript.cpp:
1444         * loader/cache/CachedScript.h:
1445         * loader/cache/CachedXSLStyleSheet.cpp:
1446         * loader/cache/CachedXSLStyleSheet.h:
1447
1448 2012-03-26  Ken Buchanan  <kenrb@chromium.org>
1449
1450         Assert failure from capitalized RenderTextFragment
1451         https://bugs.webkit.org/show_bug.cgi?id=82096
1452
1453         Reviewed by Ryosuke Niwa.
1454
1455         The cause of this bug was the call to RenderTextFragment::setTextInternal
1456         resulting from a style change from RenderObject::addChild. The idea here
1457         is to better separate the code path for transforming existing text from
1458         the code path for replacing the underlying text of a node. For
1459         RenderTextFragment this has to be clear because only in the latter case
1460         does the first-letter get reset.
1461
1462         * rendering/RenderObject.cpp:
1463         (WebCore::RenderObject::addChild): Added call to transformText
1464         * rendering/RenderText.cpp:
1465         (WebCore::RenderText::styleDidChange): Added call to transformText
1466         (WebCore::RenderText::transformText): Added
1467         * rendering/RenderText.h:
1468         (WebCore::RenderText::setText): Changed to virtual so RenderTextFragment can override
1469         (WebCore::RenderText::transformText): Added
1470         * rendering/RenderTextFragment.cpp:
1471         (WebCore::RenderTextFragment::styleDidChange): Removed references to
1472         m_allowFragmentReset which was the previous approach to separating the
1473         code paths
1474         (WebCore::RenderTextFragment::setTextInternal): Deleted
1475         (WebCore::RenderTextFragment::setText): Added with most of logic that was
1476         previously in setTextInternal
1477         (WebCore::RenderTextFragment::transformText): Added
1478         * rendering/RenderTextFragment.h:
1479         (WebCore::RenderTextFragment::setText): Added
1480         (WebCore::RenderTextFragment::transformText): Added
1481         (WebCore::RenderTextFragment::setTextInternal): Deleted
1482
1483 2012-03-26  Adam Klein  <adamk@chromium.org>
1484
1485         Always set V8 wrappers via V8DOMWrapper::setJSWrapperFor* instead of WeakReferenceMap::set()
1486         https://bugs.webkit.org/show_bug.cgi?id=82256
1487
1488         Reviewed by Adam Barth.
1489
1490         This moves leakRef() calls out of generated code, centralizing them in
1491         V8DOMWrapper implementation. Ideally, WeakReferenceMap::set would take
1492         PassRefPtrs, but that's tricky given that some WeakReferenceMap's KeyType is 'void'
1493         (which clearly can't be wrapped in a PassRefPtr).
1494
1495         Updated binding tests to reflect changes in CodeGeneratorV8.pm, no change in behavior.
1496
1497         * bindings/scripts/CodeGeneratorV8.pm:
1498         (GenerateConstructorCallback): Use GetDomMapFunction instead of custom logic.
1499         (GenerateNamedConstructorCallback): ditto.
1500         (GenerateToV8Converters): Call V8DOMWrapper::setJSWrapper* method
1501         instead of directly accessing the wrapper maps and calling set.
1502         (GetDomMapFunction): Refactored to call new GetDomWrapperMapName function.
1503         (GetDomWrapperMapName): Helper pulled out of GetDomMapFunction.
1504         * bindings/scripts/test/V8/V8Float64Array.cpp:
1505         (WebCore::V8Float64Array::wrapSlow):
1506         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1507         (WebCore::V8TestActiveDOMObject::wrapSlow):
1508         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1509         (WebCore::V8TestCustomNamedGetter::wrapSlow):
1510         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1511         (WebCore::V8TestEventConstructor::wrapSlow):
1512         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1513         (WebCore::V8TestEventTarget::wrapSlow):
1514         * bindings/scripts/test/V8/V8TestInterface.cpp:
1515         (WebCore::V8TestInterface::wrapSlow):
1516         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1517         (WebCore::V8TestMediaQueryListListener::wrapSlow):
1518         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1519         (WebCore::V8TestNamedConstructor::wrapSlow):
1520         * bindings/scripts/test/V8/V8TestObj.cpp:
1521         (WebCore::V8TestObj::wrapSlow):
1522         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1523         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
1524         * bindings/v8/V8DOMWrapper.cpp: Moved setJSWrapperForDOMNode method to header to inline it.
1525         * bindings/v8/V8DOMWrapper.h:
1526         (WebCore): Forward decls.
1527         (V8DOMWrapper):
1528         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Made inline.
1529         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): ditto.
1530         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Refactored into two methods;
1531         this one handles non-active Nodes.
1532         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode): Pulled out of previouse
1533         DOMNode method, now handles only active Nodes.
1534         (WebCore::V8DOMWrapper::setJSWrapperForDOMSVGElementInstance): New helper method for SVGElementInstances.
1535
1536 2012-03-26  Pratik Solanki  <psolanki@apple.com>
1537
1538         Fix typo in method name - WebCore::miminumValueForLength should be WebCore::minimumValueForLength
1539         https://bugs.webkit.org/show_bug.cgi?id=82254
1540
1541         Reviewed by Benjamin Poulain.
1542
1543         No new tests because no functional changes.
1544
1545         * css/CSSComputedStyleDeclaration.cpp:
1546         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1547         * css/LengthFunctions.cpp:
1548         (WebCore::minimumValueForLength):
1549         (WebCore::valueForLength):
1550         * css/LengthFunctions.h:
1551         (WebCore):
1552         * html/HTMLAreaElement.cpp:
1553         (WebCore::HTMLAreaElement::getRegion):
1554         * platform/win/PopupMenuWin.cpp:
1555         (WebCore::PopupMenuWin::paint):
1556         * rendering/AutoTableLayout.cpp:
1557         (WebCore::AutoTableLayout::layout):
1558         * rendering/RenderBlock.cpp:
1559         (WebCore::RenderBlock::textIndentOffset):
1560         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1561         * rendering/RenderBox.cpp:
1562         (WebCore::RenderBox::computeLogicalWidthInRegion):
1563         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1564         (WebCore::RenderBox::computeInlineDirectionMargins):
1565         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1566         (WebCore::RenderBox::computeBlockDirectionMargins):
1567         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1568         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1569         * rendering/RenderBoxModelObject.cpp:
1570         (WebCore::RenderBoxModelObject::paddingTop):
1571         (WebCore::RenderBoxModelObject::paddingBottom):
1572         (WebCore::RenderBoxModelObject::paddingLeft):
1573         (WebCore::RenderBoxModelObject::paddingRight):
1574         (WebCore::RenderBoxModelObject::paddingBefore):
1575         (WebCore::RenderBoxModelObject::paddingAfter):
1576         (WebCore::RenderBoxModelObject::paddingStart):
1577         (WebCore::RenderBoxModelObject::paddingEnd):
1578         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1579         * rendering/RenderFlexibleBox.cpp:
1580         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
1581         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
1582         * rendering/RenderInline.cpp:
1583         (WebCore::computeMargin):
1584         * rendering/RenderMenuList.cpp:
1585         (WebCore::RenderMenuList::updateOptionsWidth):
1586         * rendering/RenderReplaced.cpp:
1587         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1588         * rendering/RenderScrollbarPart.cpp:
1589         (WebCore::calcScrollbarThicknessUsing):
1590         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
1591         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
1592         * rendering/RenderTable.cpp:
1593         (WebCore::RenderTable::computeLogicalWidth):
1594         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
1595         * rendering/RenderTableSection.cpp:
1596         (WebCore::RenderTableSection::calcRowLogicalHeight):
1597         * rendering/RenderText.h:
1598         (WebCore::RenderText::marginLeft):
1599         (WebCore::RenderText::marginRight):
1600         * rendering/style/RenderStyle.h:
1601
1602 2012-03-26  Shinya Kawanaka  <shinyak@chromium.org>
1603
1604         Triggers assertion if dragging from outside of <meter> in a shadow tree to inside of it.
1605         https://bugs.webkit.org/show_bug.cgi?id=82177
1606
1607         Reviewed by Dimitri Glazkov.
1608
1609         VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries has moved the start position or
1610         the end position to the invalid position, i.e. position after (before) the non-existing node.
1611
1612         This patch fixes the problem, and adds assertion that the selection does not cross shadow boundaries.
1613
1614         Test: fast/dom/shadow/drag-to-meter-in-shadow-crash.html
1615
1616         * editing/VisibleSelection.cpp:
1617         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
1618
1619 2012-03-26  Scott Byer  <scottbyer@chromium.org>
1620
1621         Enable layout testing of the scroll animator.
1622         https://bugs.webkit.org/show_bug.cgi?id=81858
1623         Add a call to the InternalSettings that layout tests can use to
1624         turn on scroll animation. Enable animation updates for the
1625         Chromium platform DRT when scroll animation has been turned on in
1626         a test. This should be a no-op for all current layout tests.
1627
1628         Reviewed by James Robinson.
1629
1630         No new tests. Layout test results should be unchanged.
1631
1632         * testing/InternalSettings.cpp:
1633         (WebCore::InternalSettings::setEnableScrollAnimator):
1634         (WebCore):
1635         (WebCore::InternalSettings::scrollAnimatorEnabled):
1636         * testing/InternalSettings.h:
1637         (InternalSettings):
1638         * testing/InternalSettings.idl:
1639
1640 2012-03-26  Charles Wei  <charles.wei@torchmobile.com.cn>
1641
1642         Fix minor spell error in DocumentLoader.h
1643         https://bugs.webkit.org/show_bug.cgi?id=82141
1644
1645         Reviewed by Nate Chapin.
1646
1647         Just fix spell error, no new tests.
1648
1649         * loader/DocumentLoader.h:
1650         (WebCore::DocumentLoader::setClientRedirectSourceForHistory):
1651
1652 2012-03-26  Brian Salomon  <bsalomon@google.com>
1653
1654         [Skia] Remove use of deprecated Skia constant and struct field names
1655         https://bugs.webkit.org/show_bug.cgi?id=81034
1656
1657         Reviewed by James Robinson.
1658
1659         No behavior change, so no tests. The modified code is executed by many existing tests.
1660
1661         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
1662         (WebCore::createAcceleratedCanvas):
1663         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
1664         (WebCore::CCRenderSurfaceFilters::apply):
1665         * platform/graphics/skia/ImageBufferSkia.cpp:
1666         (WebCore::createAcceleratedCanvas):
1667
1668 2012-03-26  Nat Duca  <nduca@chromium.org>
1669
1670         [chromium] Add isInputThrottled/didBecomeReadyForAdditionalInput to WebWidget
1671         https://bugs.webkit.org/show_bug.cgi?id=82265
1672
1673         In threaded compositing mode, the WebWidget is self-scheduled,
1674         receiving damage and processing it without forwarding that damage
1675         up to the embedding WebWidgetClient. In Chromium's case, the
1676         client uses the presence of damage to perform input flow
1677         control. This patch exposes the need for input flow control to the
1678         embedder, while keeping the actual logic about what exactly
1679         warrants input flow control inside the implementation.
1680
1681         Reviewed by James Robinson.
1682
1683         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1684         (WebCore::CCLayerTreeHost::commitComplete):
1685         (WebCore::CCLayerTreeHost::commitRequested):
1686         (WebCore):
1687         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1688         (CCLayerTreeHostClient):
1689         (CCLayerTreeHost):
1690         * platform/graphics/chromium/cc/CCProxy.h:
1691         (CCProxy):
1692         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1693         (WebCore::CCSingleThreadProxy::commitRequested):
1694         (WebCore):
1695         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1696         (CCSingleThreadProxy):
1697         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1698         (WebCore::CCThreadProxy::commitRequested):
1699         (WebCore):
1700         * platform/graphics/chromium/cc/CCThreadProxy.h:
1701         (CCThreadProxy):
1702
1703 2012-03-26  Adam Barth  <abarth@webkit.org>
1704
1705         When <img crossorigin> fails the CORS check, we should fire the error event
1706         https://bugs.webkit.org/show_bug.cgi?id=81998
1707
1708         Reviewed by Nate Chapin.
1709
1710         The spec says we're supposed to fire the error event when the CORS
1711         check fails, but we haven't been.  This patch is larger than it might
1712         otherwise be because we're firing the event asynchronously, but that
1713         seems like the right thing to do.
1714
1715         Tests: http/tests/security/img-with-failed-cors-check-fails-to-load.html
1716
1717         * dom/Document.cpp:
1718         (WebCore::Document::implicitClose):
1719         * loader/ImageLoader.cpp:
1720         (WebCore::errorEventSender):
1721         (WebCore):
1722         (WebCore::ImageLoader::ImageLoader):
1723         (WebCore::ImageLoader::~ImageLoader):
1724         (WebCore::ImageLoader::setImage):
1725         (WebCore::ImageLoader::updateFromElement):
1726         (WebCore::ImageLoader::notifyFinished):
1727         (WebCore::ImageLoader::dispatchPendingEvent):
1728         (WebCore::ImageLoader::dispatchPendingErrorEvent):
1729         (WebCore::ImageLoader::dispatchPendingErrorEvents):
1730         * loader/ImageLoader.h:
1731         (ImageLoader):
1732
1733 2012-03-26  Stephen White  <senorblanco@chromium.org>
1734
1735         Make filters and the threaded compositor play well together.
1736         https://bugs.webkit.org/show_bug.cgi?id=78139
1737         
1738         Use a dedicated GraphicsContext3D instance for all filters calls in
1739         the threaded case.  Clone all FilterOperations for thread safety
1740         in the threaded case.
1741
1742         Reviewed by James Robinson.
1743         
1744         Covered by tests in LayoutTests/css3/filters.
1745
1746         * platform/graphics/chromium/LayerChromium.cpp:
1747         (WebCore::LayerChromium::setFilters):
1748         Set a global flag if we've seen content with filters, so we know
1749         we need to create the filter context.
1750         (WebCore::LayerChromium::pushPropertiesTo):
1751         Clone all filter operations if we're in the threaded case.
1752         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1753         (WebCore):
1754         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1755         (WebCore::CCLayerTreeHost::needsFilterContext):
1756         (WebCore::CCLayerTreeHost::setNeedsFilterContext):
1757         (CCLayerTreeHost):
1758         Add flag and accessors for needsFilterContext.
1759         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1760         (WebCore::CCRenderSurface::applyFilters):
1761         Pick up the appropriate context from SharedGraphicsContext3D,
1762         depending if we're in the threaded case or not.
1763         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1764         (WebCore::CCThreadProxy::recreateContext):
1765         For the threaded compositor re-create the filter context
1766         alongside the main compositor context on lost context, if requested.
1767         (WebCore::CCThreadProxy::beginFrame):
1768         Create the filter context in beginFrame, if it was resquested and is
1769         NULL.  This handles the first-use case.
1770         * platform/graphics/filters/CustomFilterOperation.h:
1771         (WebCore::CustomFilterOperation::clone):
1772         Assert if trying to clone the custom filter operation (it has
1773         non-threadsafe members).
1774         * platform/graphics/filters/FilterOperation.h:
1775         (WebCore::DefaultFilterOperation::clone):
1776         (WebCore::PassthroughFilterOperation::clone):
1777         (WebCore::ReferenceFilterOperation::clone):
1778         (WebCore::BasicColorMatrixFilterOperation::clone):
1779         (WebCore::BasicComponentTransferFilterOperation::clone):
1780         (WebCore::GammaFilterOperation::clone):
1781         (WebCore::BlurFilterOperation::clone):
1782         (WebCore::DropShadowFilterOperation::clone):
1783         Add clone methods for all FilterOperations.
1784         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
1785         (WebCore::SharedGraphicsContext3DImpl::getOrCreateContext):
1786         (WebCore::SharedGraphicsContext3DImpl::getContext):
1787         (WebCore::SharedGraphicsContext3DImpl::createContext):
1788         (WebCore::SharedGraphicsContext3D::get):
1789         (WebCore::getOrCreateContextForImplThread):
1790         (WebCore::SharedGraphicsContext3D::getForImplThread):
1791         (WebCore::SharedGraphicsContext3D::haveForImplThread):
1792         (WebCore::SharedGraphicsContext3D::createForImplThread):
1793         Split out context creation, lost context recovery, and retrieval
1794         into separate functions, so the impl thread can use only the parts
1795         it wants on the threads it wants (create and have on main, get on impl).
1796         Add asserts to ensure that's how they're called.
1797         * platform/graphics/gpu/SharedGraphicsContext3D.h:
1798         (SharedGraphicsContext3D):
1799         Reuse the SharedGraphicsContext infrastructure to create a new
1800         context singleton for filter use in the threaded compositor.
1801
1802 2012-03-26  Adam Barth  <abarth@webkit.org>
1803
1804         FrameLoader::shouldAllowNavigation uses Frame for context rather than Document
1805         https://bugs.webkit.org/show_bug.cgi?id=81020
1806
1807         Reviewed by Eric Seidel.
1808
1809         The vast majority of security checks in the browser should use a
1810         ScriptExecutionContext (aka a Document) to designate "who" is
1811         attempting to perform a given action.  Unfortunately,
1812         shouldAllowNavigation was using a Frame to designate "who" is
1813         attempting the navigation.
1814
1815         In cases when the executing script is "inactive" (i.e., belongs to a
1816         document that is not currently displayed in a Frame), using the Frame
1817         can cause us to grant the script the privileges of the document that's
1818         currently displayed in the Frame rather than the one that contains the
1819         script.
1820
1821         This patch moves shouldAllowNavigation from FrameLoader to Document
1822         (and renames it to canNavigate), effectively change the context object
1823         from a Frame to a Document.
1824
1825         Test: http/tests/security/frameNavigation/inactive-function-in-popup-navigate-child.html
1826
1827         * bindings/generic/BindingSecurity.h:
1828         (BindingSecurity):
1829         (WebCore):
1830         * bindings/v8/V8Utilities.cpp:
1831         (WebCore):
1832         * bindings/v8/V8Utilities.h:
1833         (WebCore):
1834             - Deletes unused code.
1835         * dom/Document.cpp:
1836         (WebCore::canAccessAncestor):
1837         (WebCore):
1838         (WebCore::Document::canNavigate):
1839             - canNavigate is copied from FrameLoader::shouldAllowNavigation.
1840               I've added a null-check bailout if the document is inactive.
1841         * dom/Document.h:
1842         (Document):
1843         * loader/FormState.cpp:
1844         (WebCore::FormState::FormState):
1845         (WebCore::FormState::create):
1846         * loader/FormState.h:
1847         (WebCore):
1848         (FormState):
1849         (WebCore::FormState::sourceDocument):
1850         * loader/FormSubmission.cpp:
1851         (WebCore::FormSubmission::create):
1852             - Changes the context object from Frame to Document.
1853         * loader/FrameLoader.cpp:
1854         (WebCore::FrameLoader::submitForm):
1855         (WebCore::FrameLoader::loadFrameRequest):
1856         (WebCore):
1857         (WebCore::FrameLoader::findFrameForNavigation):
1858             - FrameLoader::findFrameForNavigation still incorrectly uses Frame
1859               as the context object, but that's a bug for another patch.
1860         (WebCore::createWindow):
1861         * loader/FrameLoader.h:
1862         (FrameLoader):
1863         * loader/NavigationScheduler.cpp:
1864         (WebCore::ScheduledFormSubmission::fire):
1865         * page/DOMWindow.cpp:
1866         (WebCore::DOMWindow::close):
1867         (WebCore::DOMWindow::setLocation):
1868         (WebCore::DOMWindow::open):
1869         * page/History.cpp:
1870         (WebCore::History::go):
1871
1872 2012-03-26  Vangelis Kokkevis  <vangelis@chromium.org>
1873
1874         [chromium] Simplify and fix CCLayerSorter
1875         https://bugs.webkit.org/show_bug.cgi?id=82114
1876
1877         A significant cleanup, simplification and improvement of the CCLayerSorter code.
1878         Simplified the LayerShape structure to use WebCore's FloatQuad for all overlap tests.
1879         By treating every layer as two triangles, the old overlap code did a lot of redundant work
1880         including testing two of the vertices of the layer and its diagonal twice. The new overlap
1881         tests check:
1882         1. The four corners of each of the two layers against the other layer.
1883         2. The four edges of each layer against the edges of the other layer.
1884         Unlike the old code, the new code has no early-outs in the overlap tests as those where causing
1885         us to miss legitimate overlaps.
1886         A new technique for breaking dependency cycles introduced by intersecting layers is implemented.
1887         Instead of arbitrarily breaking cycles by choosing the node in the graph with the smallest number of
1888         incoming edges (i.e. layers that need to be drawn before it) we chose the one with the smallest sum
1889         of graph edge weights (defined as the max depth difference between two layers). Layers that intersect
1890         have their respective graph edge weight set to zero, making them more likely to be picked for breaking
1891         the cycles (it's not a perfect solution but it seems to perform much better than the previous one).
1892
1893         In addition to being overly complex and doing reduntant work, the old code was missing a
1894         perspective divide when computing the coordinates of the layer's corners in the projected plane
1895         which was the source of a lot of mis-sorted results.
1896
1897         In all, these improvements, fix a lot of outstanding issues with layer sorting, on pages such as:
1898         http://www.keithclark.co.uk/labs/3dcss/demo/
1899         http://2012.beercamp.com
1900         https://developer.mozilla.org/fr/demos/detail/the-box/launch
1901
1902         Tests: CCLayerSorter unit tests.
1903
1904         Reviewed by Kenneth Russell.
1905
1906         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
1907         (WebCore):
1908         (WebCore::perpProduct):
1909         (WebCore::edgeEdgeTest):
1910         (WebCore::CCLayerSorter::checkOverlap):
1911         (WebCore::CCLayerSorter::LayerShape::LayerShape):
1912         (WebCore::CCLayerSorter::LayerShape::layerZFromProjectedPoint):
1913         (WebCore::CCLayerSorter::createGraphNodes):
1914         (WebCore::CCLayerSorter::createGraphEdges):
1915         (WebCore::CCLayerSorter::sort):
1916         * platform/graphics/chromium/cc/CCLayerSorter.h:
1917         (WebCore::CCLayerSorter::CCLayerSorter):
1918         (CCLayerSorter):
1919         (LayerShape):
1920         (WebCore::CCLayerSorter::GraphNode::GraphNode):
1921         (GraphNode):
1922         (WebCore::CCLayerSorter::GraphEdge::GraphEdge):
1923         (GraphEdge):
1924
1925 2012-03-26  Fady Samuel  <fsamuel@chromium.org>
1926
1927         [Chromium] Using WebViewPlugins with --force-compositing-mode causes an ASSERT to fail
1928         https://bugs.webkit.org/show_bug.cgi?id=81954
1929
1930         Reviewed by James Robinson.
1931
1932         A static variable s_inPaintContents is set when painting, and it ensures
1933         that we don't delete GraphicsLayers or create GraphicsLayers while painting.
1934
1935         However, because this variable is static, it does not permit the existence
1936         of multiple WebViews in different stages (one laying out and one painting).
1937
1938         This manifests itself if one attempts to use the --force-compositing-mode
1939         in Chromium and attempts to navigate to a page with a missing or old plugin
1940         or a browser plugin (which uses a WebViewPlugin as a placeholder until it's
1941         done loading).
1942
1943         The solution to simplify debugging is to make this flag per-Page.
1944         We can access Page from RenderLayerBacking which is a GraphicsLayerClient.
1945         We add a new method GraphicsLayerClient::verifyNotPainting with a default
1946         (do nothing) implementation and override it in RenderLayerBacking to
1947         test the flag set in Page.
1948
1949         * page/Page.cpp:
1950         (WebCore::Page::Page):
1951         * page/Page.h:
1952         (Page):
1953         (WebCore::Page::setIsPainting):
1954         (WebCore::Page::isPainting):
1955         * platform/graphics/GraphicsLayer.cpp:
1956         (WebCore::GraphicsLayer::GraphicsLayer):
1957         (WebCore::GraphicsLayer::~GraphicsLayer):
1958         (WebCore::GraphicsLayer::paintGraphicsLayerContents):
1959         * platform/graphics/GraphicsLayerClient.h:
1960         (GraphicsLayerClient):
1961         (WebCore::GraphicsLayerClient::verifyNotPainting):
1962         * rendering/RenderLayerBacking.cpp:
1963         (WebCore::RenderLayerBacking::paintContents):
1964         (WebCore):
1965         (WebCore::RenderLayerBacking::verifyNotPainting):
1966         * rendering/RenderLayerBacking.h:
1967         (RenderLayerBacking):
1968
1969 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
1970
1971         cssText should use shorthand notations
1972         https://bugs.webkit.org/show_bug.cgi?id=81737
1973
1974         Reviewed by Enrica Casucci.
1975
1976         Use shorthand properties to serialize style properties for cssText.
1977
1978         The overall algorithm is to look for any property that has a shorthand, and then check if
1979         the shorthand value could be obtained (the condition is quite complicated for border properties).
1980         If it could, then append that value to the string builder, and set the corresponding entries in
1981         shorthandPropertyAppeared and shorthandPropertyUsed. If not, only turn on the bit in
1982         shorthandPropertyAppeared on to avoid calling getPropertyValue again for longhand properties
1983         that use the same shorthand property when we cannot use the shorthand.
1984
1985         Test: fast/css/cssText-shorthand.html
1986
1987         * css/StylePropertySet.cpp:
1988         (WebCore::StylePropertySet::asText):
1989
1990 2012-03-26  Bolin Hsu  <bhsu@google.com>
1991
1992         [Chromium] Add Android keycodes
1993         https://bugs.webkit.org/show_bug.cgi?id=81950
1994
1995         Add the missing Android keycodes listed in the bug.
1996
1997         Reviewed by Adam Barth.
1998
1999         * platform/chromium/KeyCodeConversionAndroid.cpp:
2000         (WebCore::windowsKeyCodeForKeyEvent):
2001         * platform/chromium/KeyboardCodes.h:
2002
2003 2012-03-26  Levi Weintraub  <leviw@chromium.org>
2004
2005         Switch ColumnInfo::addForcedBreak to LayoutUnits
2006         https://bugs.webkit.org/show_bug.cgi?id=82210
2007
2008         Reviewed by Eric Seidel.
2009
2010         Forced breaks are added by local offsets, which should be in LayoutUnits.
2011
2012         No new tests. No change in behavior.
2013
2014         * rendering/ColumnInfo.h:
2015         (WebCore::ColumnInfo::addForcedBreak):
2016
2017 2012-03-26  Levi Weintraub  <leviw@chromium.org>
2018
2019         Update LayoutUnit usage in ContainerNode, Element, and ElementRareData
2020         https://bugs.webkit.org/show_bug.cgi?id=82219
2021
2022         Reviewed by Eric Seidel.
2023
2024         No new tests. No change in behavior.
2025
2026         * dom/ContainerNode.cpp:
2027         (WebCore::ContainerNode::getLowerRightCorner): linesBoundingBox returns the enclosing IntRect
2028         of the contained lines. Inline's aren't bounded in LayoutUnits nor pixel snapped.
2029         * dom/Element.cpp:
2030         (WebCore::Element::boundsInRootViewSpace): Coordinates in root view space are akin to absolute
2031         coordinates, which are always expressed in integers.
2032         * dom/Element.h:
2033         (Element):
2034         * dom/ElementRareData.h:
2035         (WebCore::defaultMinimumSizeForResizing): Using numeric_limits<LayoutUnit>::max instead of
2036         INT_MAX to avoid overflowing when LayoutUnits are sub-pixel.
2037
2038 2012-03-26  Adam Klein  <adamk@chromium.org>
2039
2040         Update binding test output for V8 after r112163.
2041
2042         * bindings/scripts/test/V8/V8TestInterface.cpp:
2043         (WebCore::V8TestInterface::constructorCallback):
2044         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2045         (WebCore::V8TestNamedConstructorConstructorCallback):
2046         * bindings/scripts/test/V8/V8TestObj.cpp:
2047         (WebCore::V8TestObj::constructorCallback):
2048         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2049         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
2050
2051 2012-03-26  Levi Weintraub  <leviw@chromium.org>
2052
2053         Update localSelectionRect to return a LayoutRect
2054         https://bugs.webkit.org/show_bug.cgi?id=82183
2055
2056         Reviewed by Eric Seidel.
2057
2058         localSelectionRect returns a rectangle in the coordinate space of its renderer,
2059         and therefor should remain LayoutUnits until being promoted to absolute
2060         coordinates or painted. Also fixing an incorrect conversion of startPos and
2061         endPos in selectionRectForRepaint.
2062
2063         No new tests. No change in behavior.
2064
2065         * rendering/InlineTextBox.cpp:
2066         (WebCore::InlineTextBox::localSelectionRect): Continuing to use enclosingIntRect
2067         for the value being returned from the font engine since these floating point
2068         values should not be pixel snapped.
2069         * rendering/InlineTextBox.h:
2070         (InlineTextBox):
2071         * rendering/RenderReplaced.cpp:
2072         (WebCore::RenderReplaced::localSelectionRect):
2073         * rendering/RenderReplaced.h:
2074         (RenderReplaced):
2075         * rendering/RenderText.cpp:
2076         (WebCore::localQuadForTextBox):
2077         (WebCore::RenderText::absoluteRectsForRange):
2078         (WebCore::RenderText::absoluteQuadsForRange):
2079         (WebCore::RenderText::selectionRectForRepaint): Fixing an incorrect conversion of
2080         start/endPos to LayoutUnits. These values represent a range of selected characters,
2081         not layout values!
2082         * rendering/svg/RenderSVGInlineText.cpp:
2083         (WebCore::RenderSVGInlineText::localCaretRect):
2084         * rendering/svg/SVGInlineTextBox.cpp:
2085         (WebCore::SVGInlineTextBox::localSelectionRect):
2086         * rendering/svg/SVGInlineTextBox.h:
2087         (SVGInlineTextBox):
2088
2089 2012-03-26  Justin Novosad  <junov@chromium.org>
2090
2091         [Chromium] Crash in Canvas2DLayerChromium::pushPropertiesTo
2092         https://bugs.webkit.org/show_bug.cgi?id=82243
2093
2094         Reviewed by James Robinson.
2095
2096         Adding null pointer check to prevent crash and texture object
2097         validity check to prevent potential graphics glitch
2098
2099         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2100         (WebCore::Canvas2DLayerChromium::pushPropertiesTo):
2101
2102 2012-03-26  Adam Klein  <adamk@chromium.org>
2103
2104         Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls
2105         https://bugs.webkit.org/show_bug.cgi?id=82238
2106
2107         Reviewed by Adam Barth.
2108
2109         The setJSWrapper* methods previously featured a comment that asked
2110         callers to ref the objects before passing them in. This change makes
2111         that contract explicit (and allows the removal of the comment).
2112
2113         In addition, for ConstructorCallbacks, this change slightly reduces
2114         refcount churn by passing on the initial ref via RefPtr::release().
2115
2116         No new tests, no change in behavior.
2117
2118         * bindings/scripts/CodeGeneratorV8.pm:
2119         (GenerateConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref() call.
2120         (GenerateNamedConstructorCallback): ditto.
2121         * bindings/v8/V8DOMWindowShell.cpp:
2122         (WebCore::V8DOMWindowShell::installDOMWindow): Cast to a PassRefPtr and remove explicit ref call.
2123         * bindings/v8/V8DOMWrapper.cpp:
2124         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Pass leaked refs into the DOMNodeMaps.
2125         * bindings/v8/V8DOMWrapper.h:
2126         (V8DOMWrapper): Make the setJSWrapperFor* methods take PassRefPtr<T>.
2127         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Pass leaked ref into the DOMObjectMap.
2128         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): Pass leaked ref into the ActiveDOMObjectMap.
2129         * bindings/v8/V8Proxy.h:
2130         (WebCore::toV8): Remove explicit ref.
2131         * bindings/v8/WorkerContextExecutionProxy.cpp:
2132         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): Cast to a PassRefPTr and remove explicit ref call.
2133         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2134         (WebCore::v8HTMLImageElementConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref.
2135         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
2136         (WebCore::V8WebKitMutationObserver::constructorCallback): ditto.
2137         * bindings/v8/custom/V8WebSocketCustom.cpp:
2138         (WebCore::V8WebSocket::constructorCallback): ditto.
2139         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
2140         (WebCore::V8XMLHttpRequest::constructorCallback): ditto.
2141
2142 2012-03-26  Alexey Proskuryakov  <ap@apple.com>
2143
2144         Remove obsolete FormDataStreamMac code
2145         https://bugs.webkit.org/show_bug.cgi?id=82244
2146
2147         Reviewed by Brady Eidson.
2148
2149         * platform/network/ResourceHandle.h:
2150         Removed ResourceHandle::didSendBodyDataDelegateExists().
2151
2152         * platform/network/mac/FormDataStreamMac.h:
2153         * platform/network/mac/FormDataStreamMac.mm:
2154         Removed code that was needed to call ResourceLoaderClient::didSendData() before Foundation
2155         added support for it.
2156
2157         * platform/network/mac/ResourceHandleMac.mm:
2158         (WebCore::ResourceHandle::start):
2159         (WebCore::ResourceHandle::cancel):
2160         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
2161         (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
2162         (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
2163         We no longer need to associate streams with ResourceHandles!
2164
2165 2012-03-26  Adam Klein  <adamk@chromium.org>
2166
2167         V8RecursionScope should not hold a raw pointer to ScriptExecutionContext
2168         https://bugs.webkit.org/show_bug.cgi?id=82222
2169
2170         Reviewed by Eric Seidel.
2171
2172         Instead of holding onto ScriptExecutionContext, cache the boolean value we
2173         care about (context->isDocument()). This avoids problems if the
2174         context goes away as a result of the script we just ran.
2175
2176         Test: fast/frames/subframe-load-js-url-crash.html
2177
2178         * bindings/v8/V8RecursionScope.cpp:
2179         (WebCore::V8RecursionScope::didLeaveScriptContext): Check the cached
2180         bool instead of calling into the context.
2181         * bindings/v8/V8RecursionScope.h:
2182         (WebCore::V8RecursionScope::V8RecursionScope): Call isDocument from
2183         the constructor and cache the result.
2184         (WebCore::V8RecursionScope::~V8RecursionScope): No longer need to pass
2185         anything to didLeaveScriptContext since it's now a member.
2186         (V8RecursionScope): Make didLeaveScriptContext a member function and
2187         remove its argument. Add member bool to hold the value of isDocument.
2188
2189 2012-03-26  Dana Jansens  <danakj@chromium.org>
2190
2191         [chromium] assertion being hit in CCLayerTreeHost::updateCompositorResources
2192         https://bugs.webkit.org/show_bug.cgi?id=82239
2193
2194         Reviewed by Adrienne Walker.
2195
2196         The assert is incorrect and should check the animation state on
2197         the surface, not the owning layer.
2198
2199         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2200         (WebCore::CCLayerTreeHost::updateCompositorResources):
2201
2202 2012-03-26  Levi Weintraub  <leviw@chromium.org>
2203
2204         Correct LayoutUnit usage in RenderFieldSet and RenderMenuItem
2205         https://bugs.webkit.org/show_bug.cgi?id=82179
2206
2207         Reviewed by Julien Chaffraix.
2208
2209         Correcting small misuses of ints vs LayoutUnits in RenderFieldSet and RenderMenuItem. Also
2210         adding zeroLayoutUnit where necessary to fix the sub-pixel build. See below for details.
2211
2212         No new tests. No change in behavior.
2213
2214         * rendering/RenderFieldset.cpp:
2215         (WebCore::RenderFieldset::paintBoxDecorations): Clip rects need to be pixel snapped to mirror
2216         the actual coordinates we paint.
2217         (WebCore::RenderFieldset::paintMask): Using zeroLayoutUnit for ternary operation to fix the
2218         sub-pixel build.
2219         * rendering/RenderMenuList.cpp:
2220         (WebCore::RenderMenuList::showPopup): Correctly using an IntRect for absoluteBoundingBoxRect.
2221         (WebCore::RenderMenuList::clientPaddingLeft): Correcting mismatched return type with header.
2222         (WebCore::RenderMenuList::clientPaddingRight): Ditto.
2223
2224 2012-03-26  Dan Bernstein  <mitz@apple.com>
2225
2226         Tried to fix an unused parameter warning after r112154.
2227
2228         * rendering/RenderFlexibleBox.cpp:
2229         (WebCore::RenderFlexibleBox::layoutBlock): Changed to not pass relayoutChildren to
2230         layoutFlexItems.
2231         (WebCore::RenderFlexibleBox::layoutFlexItems): Removed the unused relayoutChildren parameter.
2232         * rendering/RenderFlexibleBox.h:
2233
2234 2012-03-26  Rob Arnold  <robarnold@fb.com>
2235
2236         SyntheticStyleCalc on an element should not force recalculation on its children
2237         https://bugs.webkit.org/show_bug.cgi?id=79389
2238
2239         Reviewed by Simon Fraser.
2240
2241         No new tests. Existing tests cover correctness, not sure how to test for performance.
2242
2243         * dom/Element.cpp:
2244         (WebCore::Element::recalcStyle):
2245
2246 2012-03-26  Tony Chang  <tony@chromium.org>
2247
2248         apply cross axis constraints before aligning children in flexbox
2249         https://bugs.webkit.org/show_bug.cgi?id=82240
2250
2251         Reviewed by Ojan Vafai.
2252
2253         We weren't applying max-height constraints before aligning children.
2254         This would cause center, end, stretch alignment to be wrong if we hit
2255         a max-height on a flexbox.
2256
2257         This patch also moves the repositioning logic to happen after
2258         computeLogicalHeight, which will be useful for flex-line-pack.
2259
2260         New test case in css3/flexbox/flex-align.html
2261
2262         * rendering/RenderFlexibleBox.cpp:
2263         (WebCore::RenderFlexibleBox::layoutBlock):
2264         (WebCore::RenderFlexibleBox::layoutFlexItems):
2265         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2266         * rendering/RenderFlexibleBox.h:
2267
2268 2012-03-26  Anders Carlsson  <andersca@apple.com>
2269
2270         Find in page overlay and bouncy are not always positioned correctly
2271         https://bugs.webkit.org/show_bug.cgi?id=82247
2272         <rdar://problem/10866139>
2273
2274         Reviewed by Sam Weinig.
2275
2276         In WebCore, a lot of code depends on scroll position updates to happen synchronously, so
2277         update the frame view scroll position before asking the scrolling thread to scroll.
2278
2279         * page/scrolling/ScrollingCoordinator.cpp:
2280         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
2281
2282 2012-03-26  Nate Chapin  <japhet@chromium.org>
2283
2284         Simplify setting loading state in DocumentLoader
2285         https://bugs.webkit.org/show_bug.cgi?id=82099
2286
2287         Reviewed by Adam Barth.
2288
2289         The logic for deciding what to return for DocumentLoader::isLoading()
2290         is crazy. It's indirectly based on the ResourceLoaders that have
2291         registered themselves with the DocumentLoader, but we can make that
2292         relationship more direct.
2293
2294         * loader/DocumentLoader.cpp:
2295         (WebCore::DocumentLoader::checkLoadComplete): Renamed from updateLoading, since it's not actually
2296             updating anything anymore. It now calls DOMWindow::finishedLoading() if loading is in fact done.
2297         (WebCore::DocumentLoader::startLoadingMainResource): The only reason this had a return value was to call
2298             updateLoading() if loading failed. Just call checkLoadComplete() directly (this allows it to
2299             be private, whereas updateLoading() was public).
2300         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
2301         * loader/DocumentLoader.h:
2302         (WebCore::DocumentLoader::isLoading): Rather than holding a separate bool, return based on the presence
2303             of non-multipart ResourceLoaders directly.
2304         * loader/FrameLoader.cpp:
2305         (WebCore::FrameLoader::isLoading): Depend on DocumentLoader::isLoading() for the activeDocumentLoader(),
2306             rather than indirectly the other way around.
2307         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Remove several assertions that should now be
2308             absolutely identical to the remaining !pdl->isLoading().
2309         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
2310
2311 2012-03-26  James Robinson  <jamesr@chromium.org>
2312
2313         Scrollable plugins not registered properly in ScrollingCoordinator
2314         https://bugs.webkit.org/show_bug.cgi?id=82163
2315
2316         Reviewed by Anders Carlsson.
2317
2318         Plugins may be scrollable, so we have to add them in the non-fast scrollable region. Tested manually.
2319
2320         * page/scrolling/ScrollingCoordinator.cpp:
2321         (WebCore::computeNonFastScrollableRegion):
2322         (WebCore::ScrollingCoordinator::nonFastScrollableRegion):
2323         (WebCore):
2324         * page/scrolling/ScrollingCoordinator.h:
2325         (ScrollingCoordinator):
2326         * plugins/PluginViewBase.h:
2327         (WebCore::PluginViewBase::scrollable):
2328         (PluginViewBase):
2329
2330 2012-03-26  Joone Hur  <joone.hur@collabora.co.uk>
2331
2332         [GTK] Build fix for Accelerated Compositing with Clutter
2333         https://bugs.webkit.org/show_bug.cgi?id=81785
2334
2335         Reviewed by Martin Robinson.
2336
2337         AcceleratedCompositingContext was introduced to isolate different accelerated 
2338         compositing implementations(r104194), but the Clutter implementation doesn't 
2339         build with it. This includes an initial implementation of GraphicsContext3D 
2340         and fixes the build error.
2341
2342         * GNUmakefile.list.am:
2343         * platform/graphics/clutter/DrawingBufferClutter.cpp: Added.
2344         (WebCore):
2345         (WebCore::DrawingBuffer::DrawingBuffer):
2346         (WebCore::DrawingBuffer::~DrawingBuffer):
2347         (WebCore::DrawingBuffer::platformColorBuffer):
2348         (WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
2349         * platform/graphics/clutter/GraphicsContext3DClutter.cpp: Added.
2350         (WebCore):
2351         (WebCore::GraphicsContext3D::create):
2352         (WebCore::GraphicsContext3D::GraphicsContext3D):
2353         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2354         (WebCore::GraphicsContext3D::getImageData):
2355         (WebCore::GraphicsContext3D::paintToCanvas):
2356         (WebCore::GraphicsContext3D::setContextLostCallback):
2357         (WebCore::GraphicsContext3D::setErrorMessageCallback):
2358         (WebCore::GraphicsContext3D::makeContextCurrent):
2359         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
2360         (WebCore::GraphicsContext3D::isGLES2Compliant):
2361         (WebCore::GraphicsContext3D::platformLayer):
2362         * platform/graphics/clutter/GraphicsContext3DPrivate.cpp: Added.
2363         (WebCore):
2364         (WebCore::GraphicsContext3DPrivate::create):
2365         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2366         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
2367         (WebCore::GraphicsContext3DPrivate::makeContextCurrent):
2368         (WebCore::GraphicsContext3DPrivate::platformContext):
2369         (WebCore::GraphicsContext3DPrivate::paintToGraphicsLayerActor):
2370         * platform/graphics/clutter/GraphicsContext3DPrivate.h: Added.
2371         (WebCore):
2372         (GraphicsContext3DPrivate):
2373         (WebCore::GraphicsContext3DPrivate::platformLayer):
2374
2375 2012-03-26  Peter Rybin  <prybin@chromium.org>
2376
2377         Web Inspector: Expose InspectorTypeBuilder.h to other components
2378         https://bugs.webkit.org/show_bug.cgi?id=82226
2379
2380         Reviewed by Vsevolod Vlasov.
2381
2382         This is a provisional commit that simplifies passing ealy warning system
2383         for the main patch https://bugs.webkit.org/show_bug.cgi?id=81558
2384
2385         * WebCore.xcodeproj/project.pbxproj: config file is changed in Xcode UI.
2386
2387 2012-03-26  Antaryami Pandia  <antaryami.pandia@motorola.com>
2388
2389         An <area> element remains focusable even though its associated <img> is not rendered.
2390         https://bugs.webkit.org/show_bug.cgi?id=71788
2391
2392         Reviewed by Andy Estes.
2393
2394         HTMLAreaElement::isFocusable() needs to consider the display and
2395         visibility state.
2396
2397         Test: fast/events/tab-test-not-visible-imagemap.html
2398
2399         * html/HTMLAreaElement.cpp:
2400         (WebCore::HTMLAreaElement::imageElement):
2401         (WebCore::HTMLAreaElement::isFocusable):
2402         * html/HTMLAreaElement.h: Make imageElement() const.
2403         (HTMLAreaElement):
2404
2405 2012-03-26  Anton Muhin  <antonm@chromium.org>
2406
2407         Fix a typo in IDL
2408         https://bugs.webkit.org/show_bug.cgi?id=82215
2409
2410         Reviewed by Adam Barth.
2411
2412         No new tests, just a typo fix.
2413
2414         * notifications/WorkerContextNotifications.idl:
2415
2416 2012-03-26  W. James MacLean  <wjmaclean@chromium.org>
2417
2418         [chromium] Change handleGestureFling() to use CCInputHandlerClient::Wheel.
2419         https://bugs.webkit.org/show_bug.cgi?id=82133
2420
2421         Reviewed by James Robinson.
2422
2423         Covered by existing unit tests.
2424
2425         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2426         (WebCore::CCLayerTreeHostImpl::scrollBegin):
2427
2428 2012-03-26  Mike Lawther  <mikelawther@chromium.org>
2429
2430         CSS3 calc: mixed percent/absolute for box-reflect
2431         https://bugs.webkit.org/show_bug.cgi?id=82161
2432
2433         Reviewed by Ojan Vafai.
2434
2435         Tests: css3/calc/box-reflect-expected.html
2436                css3/calc/box-reflect.html
2437
2438         * css/CSSStyleSelector.cpp:
2439         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2440
2441 2012-03-26  Mike Lawther  <mikelawther@chromium.org>
2442
2443         CSS3 calc: mixed percent/absolute support for vertical-align
2444         https://bugs.webkit.org/show_bug.cgi?id=82152
2445
2446         Reviewed by Ojan Vafai.
2447
2448         Tests: css3/calc/vertical-align-expected.html
2449                css3/calc/vertical-align.html
2450
2451         * css/CSSStyleApplyProperty.cpp:
2452         (WebCore::ApplyPropertyVerticalAlign::applyValue):
2453
2454 2012-03-26  Filip Spacek  <fspacek@rim.com>
2455
2456         [BlackBerry] Accelerated compositing updates
2457         https://bugs.webkit.org/show_bug.cgi?id=82058
2458
2459         Reviewed by Rob Buis.
2460
2461         * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
2462         (WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread):
2463         (WebCore::CanvasLayerWebKitThread::~CanvasLayerWebKitThread):
2464         (WebCore::CanvasLayerWebKitThread::setDevice):
2465         (WebCore::CanvasLayerWebKitThread::updateTextureContentsIfNeeded):
2466         * platform/graphics/blackberry/CanvasLayerWebKitThread.h:
2467         (WebCore::CanvasLayerWebKitThread::create):
2468         (CanvasLayerWebKitThread):
2469         * platform/graphics/blackberry/InstrumentedPlatformCanvas.h:
2470         (WebCore::InstrumentedPlatformCanvas::InstrumentedPlatformCanvas):
2471         (WebCore::InstrumentedPlatformCanvas::save):
2472         (WebCore::InstrumentedPlatformCanvas::saveLayer):
2473         (WebCore::InstrumentedPlatformCanvas::restore):
2474         (WebCore::InstrumentedPlatformCanvas::translate):
2475         (WebCore::InstrumentedPlatformCanvas::scale):
2476         (WebCore::InstrumentedPlatformCanvas::rotate):
2477         (WebCore::InstrumentedPlatformCanvas::skew):
2478         (WebCore::InstrumentedPlatformCanvas::concat):
2479         (WebCore::InstrumentedPlatformCanvas::setMatrix):
2480         (WebCore::InstrumentedPlatformCanvas::clipRect):
2481         (WebCore::InstrumentedPlatformCanvas::clipPath):
2482         (WebCore::InstrumentedPlatformCanvas::clipRegion):
2483         (WebCore::InstrumentedPlatformCanvas::clear):
2484         (WebCore::InstrumentedPlatformCanvas::drawPaint):
2485         (WebCore::InstrumentedPlatformCanvas::drawPoints):
2486         (WebCore::InstrumentedPlatformCanvas::drawRect):
2487         (WebCore::InstrumentedPlatformCanvas::drawPath):
2488         (WebCore::InstrumentedPlatformCanvas::drawBitmap):
2489         (WebCore::InstrumentedPlatformCanvas::drawBitmapRect):
2490         (WebCore::InstrumentedPlatformCanvas::drawBitmapMatrix):
2491         (WebCore::InstrumentedPlatformCanvas::drawSprite):
2492         (WebCore::InstrumentedPlatformCanvas::drawText):
2493         (WebCore::InstrumentedPlatformCanvas::drawPosText):
2494         (WebCore::InstrumentedPlatformCanvas::drawPosTextH):
2495         (WebCore::InstrumentedPlatformCanvas::drawTextOnPath):
2496         (WebCore::InstrumentedPlatformCanvas::drawPicture):
2497         (WebCore::InstrumentedPlatformCanvas::drawVertices):
2498         (WebCore::InstrumentedPlatformCanvas::drawData):
2499         * platform/graphics/blackberry/LayerData.h:
2500         (WebCore::LayerData::LayerData):
2501         (WebCore::LayerData::needsTexture):
2502         (LayerData):
2503         * platform/graphics/blackberry/LayerTiler.cpp:
2504         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
2505         * platform/graphics/blackberry/LayerWebKitThread.cpp:
2506         (WebCore::LayerWebKitThread::paintContents):
2507         (WebCore::LayerWebKitThread::setDrawable):
2508         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2509         (WebCore::loadBufferingImageData):
2510         * platform/graphics/blackberry/skia/ImageBufferDataSkia.h: Renamed from Source/WebCore/platform/graphics/blackberry/skia/ImageBufferData.h.
2511         (WebCore):
2512         (ImageBufferData):
2513
2514 2012-03-26  Stephen Chenney  <schenney@chromium.org>
2515
2516         Failure to invalidate text position attributes when DOM changes
2517         https://bugs.webkit.org/show_bug.cgi?id=81464
2518
2519         Reviewed by Nikolas Zimmermann.
2520
2521         The text positioning elements data structure in RenderSVGText must be
2522         updated when either the children of the corresponding element are
2523         modified, or the length of the text inside the elements changes.
2524         Previously, the call to clear the text positioning elements (to force
2525         recomputation) was guarded by a flag. If code tried to invalidate when
2526         the flag was not set, then something set the flag, the elements would
2527         be invalid at use time.
2528
2529         This patch modifies the method that invalidates the positining
2530         attributes so that the action always happens. It also renames the
2531         method to more accurately reflect its function.
2532
2533         Test: svg/custom/delete-modified-text-in-defs-crash.svg
2534
2535         * rendering/svg/RenderSVGInlineText.cpp:
2536         (WebCore::RenderSVGInlineText::setTextInternal): Rename textDOMChanged to invalidateTextPositioningElements
2537         * rendering/svg/RenderSVGText.cpp:
2538         (WebCore::RenderSVGText::invalidateTextPositioningElements): Rename
2539         textDOMChanged to invalidateTextPositioningElements and remove the check against the needsPosition... flag.
2540         * rendering/svg/RenderSVGText.h:
2541         (RenderSVGText): Rename textDOMChanged to invalidateTextPositioningElements
2542         * svg/SVGAElement.cpp:
2543         (WebCore::SVGAElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements
2544         * svg/SVGTextContentElement.cpp:
2545         (WebCore::SVGTextContentElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements
2546
2547 2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
2548
2549         REGRESSION (r110065-r110080): fast/forms/placeholder-set-attribute.html is failing intermittently because WebKit fails to repaint after setting the placeholder attribute
2550         https://bugs.webkit.org/show_bug.cgi?id=81802
2551
2552         Reviewed by Dan Bernstein.
2553
2554         Covered by fast/forms/placeholder-set-attribute.html which should be less flaky.
2555
2556         Unfortunately no new test case as this bug requires a very specific set of conditions that I couldn't reproduce deterministically.
2557
2558         This is a regression from r110072: RenderTextControlSingleLine would rely on the placeholder's RenderLayer to properly repaint during
2559         the first layout as the placeholder has overflow: hidden set. r110072 removed the layer in this case and thus we miss a repaint.
2560
2561         * rendering/RenderTextControlSingleLine.cpp:
2562         (WebCore::RenderTextControlSingleLine::layout):
2563         For our first layout, we need to make sure our placeholder is painted. layoutBlockChild has a very similar logic to force repaint
2564         on a first layout. We don't hit this logic as the placeholder is explicitly skipped in RenderTextControl::layoutSpecialExcludedChild.
2565
2566 2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
2567
2568         REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
2569         https://bugs.webkit.org/show_bug.cgi?id=80531
2570
2571         Reviewed by Ojan Vafai.
2572
2573         Tested by fast/forms/textfield-overflow.html (re-enabled after this change).
2574
2575         The existing code would happily query layout information before calling layout (FTW!).
2576         The solution is to properly layout our object, then modify some dimensions as needed while
2577         marking ourself as needing layout and then layouting again.
2578
2579         * rendering/RenderTextControlSingleLine.cpp:
2580         (WebCore::RenderTextControlSingleLine::layout):
2581         Implemented a proper 2 pass layout algorithm. Removed the |relayoutChildren| logic as:
2582         - layoutBlock handles automatically logical height changes.
2583         - we were not modifying the logical width between layouts so we don't need to force a
2584         child relayout in this case.
2585
2586 2012-03-26  Robin Cao  <robin.cao@torchmobile.com.cn>
2587
2588         [BlackBerry] Upstream LayerCompositingThread.{h, cpp}
2589         https://bugs.webkit.org/show_bug.cgi?id=79873
2590
2591         Reviewed by Rob Buis.
2592
2593         Initial upstream, no new tests.
2594
2595         * platform/graphics/blackberry/LayerCompositingThread.cpp: Added.
2596         (WebCore):
2597         (WebCore::LayerCompositingThread::create):
2598         (WebCore::LayerCompositingThread::LayerCompositingThread):
2599         (WebCore::LayerCompositingThread::~LayerCompositingThread):
2600         (WebCore::LayerCompositingThread::destroyOnCompositingThread):
2601         (WebCore::LayerCompositingThread::setLayerRenderer):
2602         (WebCore::LayerCompositingThread::deleteTextures):
2603         (WebCore::LayerCompositingThread::setDrawTransform):
2604         (WebCore::getTransformedRect):
2605         (WebCore::LayerCompositingThread::getTransformedHolePunchRect):
2606         (WebCore::LayerCompositingThread::drawTextures):
2607         (WebCore::LayerCompositingThread::drawSurface):
2608         (WebCore::LayerCompositingThread::drawMissingTextures):
2609         (WebCore::LayerCompositingThread::releaseTextureResources):
2610         (WebCore::LayerCompositingThread::setPluginView):
2611         (WebCore::LayerCompositingThread::setMediaPlayer):
2612         (WebCore::LayerCompositingThread::clearAnimations):
2613         (WebCore::LayerCompositingThread::removeSublayer):
2614         (WebCore::LayerCompositingThread::indexOfSublayer):
2615         (WebCore::LayerCompositingThread::rootLayer):
2616         (WebCore::LayerCompositingThread::removeFromSuperlayer):
2617         (WebCore::LayerCompositingThread::setSublayers):
2618         (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
2619         (WebCore::LayerCompositingThread::setVisible):
2620         (WebCore::LayerCompositingThread::setNeedsCommit):
2621         (WebCore::LayerCompositingThread::scheduleCommit):
2622         (WebCore::LayerCompositingThread::updateAnimations):
2623         (WebCore::LayerCompositingThread::hasVisibleHolePunchRect):
2624         (WebCore::LayerCompositingThread::createLayerRendererSurface):
2625         * platform/graphics/blackberry/LayerCompositingThread.h: Added.
2626         (Graphics):
2627         (WebCore):
2628         (LayerCompositingThread):
2629         (WebCore::LayerCompositingThread::bindContentsTexture):
2630         (WebCore::LayerCompositingThread::getSublayers):
2631         (WebCore::LayerCompositingThread::setSuperlayer):
2632         (WebCore::LayerCompositingThread::superlayer):
2633         (WebCore::LayerCompositingThread::drawTransform):
2634         (WebCore::LayerCompositingThread::setDrawOpacity):
2635         (WebCore::LayerCompositingThread::drawOpacity):
2636         (WebCore::LayerCompositingThread::layerRendererSurface):
2637         (WebCore::LayerCompositingThread::clearLayerRendererSurface):
2638         (WebCore::LayerCompositingThread::setMaskLayer):
2639         (WebCore::LayerCompositingThread::maskLayer):
2640         (WebCore::LayerCompositingThread::setReplicaLayer):
2641         (WebCore::LayerCompositingThread::replicaLayer):
2642         (WebCore::LayerCompositingThread::getDrawRect):
2643         (WebCore::LayerCompositingThread::getTransformedBounds):
2644         (WebCore::LayerCompositingThread::hasMissingTextures):
2645         (WebCore::LayerCompositingThread::isDirty):
2646         (WebCore::LayerCompositingThread::isVisible):
2647         (WebCore::LayerCompositingThread::setOpacity):
2648         (WebCore::LayerCompositingThread::setTransform):
2649         (WebCore::LayerCompositingThread::hasRunningAnimations):
2650         (WebCore::LayerCompositingThread::numSublayers):
2651
2652 2012-03-26  Kent Tamura  <tkent@chromium.org>
2653
2654         Add a notification function for detaching to TextFieldDecorator
2655         https://bugs.webkit.org/show_bug.cgi?id=82142
2656
2657         Reviewed by Dimitri Glazkov.
2658
2659         Add willDetach() functio to TextFieldDecorator. This will be
2660         needed if a decorator opens a popup UI on handleClick(), and the
2661         popup UI should be closed when the attaching text field is
2662         detached.
2663
2664         No new tests because of no behavior changes in any platforms.
2665
2666         * html/shadow/TextFieldDecorationElement.cpp:
2667         (WebCore::TextFieldDecorationElement::hostInput):
2668         Added. A utilify function to get an HTMLInputElement*.
2669         (WebCore::TextFieldDecorationElement::updateImage): Use hostInput().
2670         (WebCore::TextFieldDecorationElement::customStyleForRenderer): ditto.
2671         (WebCore::TextFieldDecorationElement::detach): Added. Calls TextFieldDecorator::willDetach().
2672         (WebCore::TextFieldDecorationElement::defaultEventHandler): Use hostInput().
2673         * html/shadow/TextFieldDecorationElement.h:
2674         (TextFieldDecorator):
2675         (TextFieldDecorationElement):
2676
2677 2012-03-26  Dan Bernstein  <mitz@apple.com>
2678
2679         Tried to fix the 32-bit build after r112021.
2680
2681         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
2682         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
2683
2684 2012-03-26  Leo Yang  <leo.yang@torchmobile.com.cn>
2685
2686         [BlackBerry] Skeleton code of AsyncFileSystemBlackBerry.cpp
2687         https://bugs.webkit.org/show_bug.cgi?id=82157
2688
2689         Reviewed by Rob Buis.
2690
2691         AsyncFileSystemBlackBerry is responsible for asynchronous operating
2692         on file system for the blackberry porting. It's just skeleton code
2693         containing no implementation yet.
2694
2695         No new tests because of skeleton code.
2696
2697         * PlatformBlackBerry.cmake: Add AsyncFileSystemBlackBerry.cpp if ENABLE_FILE_SYSTEM is on.
2698         * platform/AsyncFileSystem.cpp:
2699         (WebCore):
2700         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Added.
2701         (WebCore):
2702         (WebCore::AsyncFileSystem::isAvailable):
2703         (WebCore::AsyncFileSystem::isValidType):
2704         (WebCore::AsyncFileSystem::create):
2705         (WebCore::AsyncFileSystem::openFileSystem):
2706         (WebCore::AsyncFileSystem::crackFileSystemURL):
2707         (WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
2708         (WebCore::AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry):
2709         (WebCore::AsyncFileSystemBlackBerry::toURL):
2710         (WebCore::AsyncFileSystemBlackBerry::move):
2711         (WebCore::AsyncFileSystemBlackBerry::copy):
2712         (WebCore::AsyncFileSystemBlackBerry::remove):
2713         (WebCore::AsyncFileSystemBlackBerry::removeRecursively):
2714         (WebCore::AsyncFileSystemBlackBerry::readMetadata):
2715         (WebCore::AsyncFileSystemBlackBerry::createFile):
2716         (WebCore::AsyncFileSystemBlackBerry::createDirectory):
2717         (WebCore::AsyncFileSystemBlackBerry::fileExists):
2718         (WebCore::AsyncFileSystemBlackBerry::directoryExists):
2719         (WebCore::AsyncFileSystemBlackBerry::readDirectory):
2720         (WebCore::AsyncFileSystemBlackBerry::createWriter):
2721         (WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
2722         * platform/blackberry/AsyncFileSystemBlackBerry.h: Added.
2723         (WebCore):
2724         (AsyncFileSystemBlackBerry):
2725
2726 2012-03-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2727
2728         [BlackBerry] CredentialBackingStore implement encryptString() and decryptString()
2729         https://bugs.webkit.org/show_bug.cgi?id=82204
2730
2731         Reviewed by Rob Buis.
2732
2733         Implemented encryptedString() and decryptedString() in class CredentialBackingStore
2734         by calling BlackBerry::Platform::Encryptor::encryptString() and
2735         BlackBerry::Platform::Encryptor::encryptString() respectively.
2736
2737         No new tests.
2738
2739         * platform/network/blackberry/CredentialBackingStore.cpp:
2740         (WebCore::CredentialBackingStore::encryptedString):
2741         (WebCore::CredentialBackingStore::decryptedString):
2742
2743 2012-03-26  Pavel Feldman  <pfeldman@chromium.org>
2744
2745         Web Inspector: 'use strict' exceptions stop in inspector code
2746         https://bugs.webkit.org/show_bug.cgi?id=82199
2747
2748         Reviewed by Yury Semikhatsky.
2749
2750         Accessing callee from within InjectedScript made inspector stop on handled exceptions.
2751         I replaced it with Object.prototype.toString.call(obj) === "[object Arguments]".
2752
2753         * inspector/InjectedScriptSource.js:
2754
2755 2012-03-26  Mihai Balan  <mibalan@adobe.com>
2756
2757         [CSS Regions] In region styling (@-webkit-region) the position for CSS rules is incorrectly computed
2758         https://bugs.webkit.org/show_bug.cgi?id=81901
2759
2760         Reviewed by Antti Koivisto.
2761
2762         Right now CSS rules position does not take into account rules that are inside a @-webkit-region
2763         declaration, leading to buggy behavior where rules that appear later in the document are superseded
2764         by rules that appear earlier in the document (opposite as how things should be). The fix updates
2765         the "global" rules counter once the rules in a @-webkit-region declaration have been added.
2766
2767         Tests: fast/regions/region-style-rule-position-expected.html
2768                fast/regions/region-style-rule-position.html
2769
2770         * css/CSSStyleSelector.cpp:
2771         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2772
2773 2012-03-26  Pierre Rossi  <pierre.rossi@nokia.com>
2774
2775         [Qt] Disable focus ring in the mobile theme.
2776         https://bugs.webkit.org/show_bug.cgi?id=81934
2777
2778         For mobile devices intended to be used only through
2779         touch, the focus rings makes little sense and feels
2780         awkward.
2781
2782         Reviewed by Kenneth Rohde Christiansen.
2783
2784         No new tests. This is merely a cosmetic touch.
2785
2786         * platform/qt/RenderThemeQtMobile.h:
2787         (RenderThemeQtMobile):
2788         (WebCore::RenderThemeQtMobile::platformFocusRingColor):
2789
2790 2012-03-26  Charles Wei  <charles.wei@torchmobile.com.cn>
2791
2792         [BlackBerry] Clean up networking code and remove WML support.
2793         https://bugs.webkit.org/show_bug.cgi?id=82170
2794
2795         Reviewed by Rob Buis.
2796
2797         This just removes the WML support of BlackBerry porting, which is already 
2798         removed from WebCore. No new tests needed.
2799
2800         * platform/blackberry/MIMETypeRegistryBlackBerry.cpp:
2801         (WebCore):
2802         * platform/network/blackberry/DeferredData.cpp:
2803         (WebCore::DeferredData::DeferredData):
2804         (WebCore::DeferredData::processDeferredData):
2805         * platform/network/blackberry/DeferredData.h:
2806         (DeferredData):
2807         (WebCore::DeferredData::hasDeferredData):
2808         * platform/network/blackberry/NetworkJob.cpp:
2809         * platform/network/blackberry/NetworkJob.h:
2810         (NetworkJob):
2811         * platform/network/blackberry/ResourceResponse.h:
2812         (WebCore::ResourceResponse::ResourceResponse):
2813         (ResourceResponse):
2814         * platform/network/blackberry/ResourceResponseBlackBerry.cpp:
2815         (WebCore::ResourceResponse::doPlatformCopyData):
2816         (WebCore::ResourceResponse::doPlatformAdopt):
2817
2818 2012-03-26  Philip Rogers  <pdr@google.com>
2819
2820         Add invalid bounding box concept to SVG containers
2821         https://bugs.webkit.org/show_bug.cgi?id=81104
2822
2823         Reviewed by Nikolas Zimmermann.
2824
2825         An empty <g> element needs to use an invalid bounding box because
2826         an empty bounding box isn't the default state. This change
2827         introduces the concept of an invalid object bounding box for
2828         both RenderSVGContainer and RenderSVGRoot. Code that
2829         does not explicitly check that the bounding box is valid
2830         should be unaffected by this change. We use this new invalid
2831         flag in computeContainerBoundingBoxes so that we do not
2832         include invalid bounding boxes.
2833
2834         This change also contains a small fix in
2835         RenderSVGContainer::toRenderSVGContainer which depended on
2836         RenderSVGViewportContainer not inheriting from RenderSVGContainer,
2837         which it now does.
2838
2839         Test: svg/custom/getBBox-empty-container.html
2840
2841         * rendering/svg/RenderSVGContainer.cpp:
2842         (WebCore::RenderSVGContainer::RenderSVGContainer):
2843         (WebCore::RenderSVGContainer::updateCachedBoundaries):
2844         * rendering/svg/RenderSVGContainer.h:
2845         (WebCore::RenderSVGContainer::isObjectBoundingBoxValid):
2846         (RenderSVGContainer):
2847         (WebCore::toRenderSVGContainer):
2848         * rendering/svg/RenderSVGRoot.cpp:
2849         (WebCore::RenderSVGRoot::RenderSVGRoot):
2850         (WebCore::RenderSVGRoot::updateCachedBoundaries):
2851         * rendering/svg/RenderSVGRoot.h:
2852         (RenderSVGRoot):
2853         * rendering/svg/SVGRenderSupport.cpp:
2854         (WebCore):
2855         (WebCore::updateObjectBoundingBox):
2856         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
2857         * rendering/svg/SVGRenderSupport.h:
2858         (SVGRenderSupport):
2859
2860 2012-03-26  Alexei Filippov  <alexeif@chromium.org>
2861
2862         Web Inspector: Speed up the retainers build phase.
2863         https://bugs.webkit.org/show_bug.cgi?id=81763
2864
2865         Replacing the edge iterator in retainers building phase
2866         makes it run 10 times faster (400 ms vs. 4 sec).
2867
2868         Reviewed by Yury Semikhatsky.
2869
2870         * inspector/front-end/HeapSnapshot.js:
2871         (WebInspector.HeapSnapshot.prototype._buildRetainers):
2872
2873 2012-03-22  Alexander Pavlov  <apavlov@chromium.org>
2874
2875         Web Inspector: Migrate InspectorCSSAgent to strict protocol types
2876         https://bugs.webkit.org/show_bug.cgi?id=81923
2877
2878         Reviewed by Pavel Feldman.
2879
2880         No new tests, as this is a refactoring.
2881
2882         * inspector/CodeGeneratorInspector.py:
2883         * inspector/InspectorCSSAgent.cpp:
2884         (SelectorProfile):
2885         (WebCore::SelectorProfile::toInspectorObject):
2886         (WebCore::InspectorCSSAgent::clearFrontend):
2887         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
2888         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
2889         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
2890         (WebCore::InspectorCSSAgent::getAllStyleSheets):
2891         (WebCore::InspectorCSSAgent::getStyleSheet):
2892         (WebCore::InspectorCSSAgent::setPropertyText):
2893         (WebCore::InspectorCSSAgent::toggleProperty):
2894         (WebCore::InspectorCSSAgent::setRuleSelector):
2895         (WebCore::InspectorCSSAgent::addRule):
2896         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
2897         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
2898         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
2899         (WebCore::InspectorCSSAgent::collectStyleSheets):
2900         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
2901         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
2902         * inspector/InspectorCSSAgent.h:
2903         (InspectorCSSAgent):
2904         * inspector/InspectorStyleSheet.cpp:
2905         (WebCore::buildSourceRangeObject):
2906         (WebCore::buildMediaObject):
2907         (WebCore::fillMediaListChain):
2908         (WebCore::InspectorStyle::buildObjectForStyle):
2909         (WebCore::InspectorStyle::buildArrayForComputedStyle):
2910         (WebCore::InspectorStyle::styleWithProperties):
2911         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2912         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
2913         (WebCore::InspectorStyleSheet::buildObjectForRule):
2914         (WebCore::InspectorStyleSheet::buildObjectForStyle):
2915         * inspector/InspectorStyleSheet.h:
2916         (WebCore::InspectorCSSId::asProtocolValue):
2917         (InspectorStyle):
2918         (InspectorStyleSheet):
2919
2920 2012-03-26  Alexander Pavlov  <apavlov@chromium.org>
2921
2922         Web Inspector: [REGRESSION] Workarounds for security checks when retrieving stylesheet rule lists are broken
2923         https://bugs.webkit.org/show_bug.cgi?id=82191
2924
2925         Reviewed by Vsevolod Vlasov.
2926
2927         Test: http/tests/inspector/modify-cross-domain-rule.html
2928
2929         * inspector/InspectorStyleSheet.cpp:
2930         (WebCore::asCSSRuleList):
2931         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2932
2933 2012-03-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2934
2935         Unreviewed. Fix make distcheck.
2936
2937         * GNUmakefile.list.am: Add missing files.
2938
2939 2012-03-26  Jason Liu  <jason.liu@torchmobile.com.cn>
2940
2941         [BlackBerry] Cookies mismatch when login to gmail.
2942         https://bugs.webkit.org/show_bug.cgi?id=82165
2943
2944         Redirection's response can add or update cookies. The cookies of ResourceRequest is dirty
2945         in this case. We shouldn't copy the dirty cookie header from ResourceRequest to PlatformRequest
2946         for redirection loading.
2947
2948         This issue didn't happen before because we used m_cookieData not the cookie header.
2949         Now we use the cookie header to avoid storing double cookie's data, and m_cookieData is removed.
2950
2951         Reviewed by George Staikos.
2952
2953         No new tests. It is a refactoring issue.
2954
2955         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
2956         (WebCore::ResourceRequest::initializePlatformRequest):
2957
2958 2012-03-26  Alexis Menard  <alexis.menard@openbossa.org>
2959
2960         Increase code sharing between StylePropertySet and CSSPropertyLonghand.
2961         https://bugs.webkit.org/show_bug.cgi?id=81960
2962
2963         Reviewed by Antti Koivisto.
2964
2965         Use longhands declaration from CSSPropertyLonghand in StylePropertySet in order
2966         to avoid code duplication.
2967
2968         No new tests : refactoring only, we shouldn't have any behavior difference.
2969
2970         * css/CSSPropertyLonghand.cpp:
2971         (WebCore::backgroundLonghand):
2972         Re-order the array to match the spec default order.
2973         (WebCore::webkitMaskLonghand):
2974         Re-order to match the original order.
2975         (WebCore::webkitTransformOriginLonghand):
2976         A LayoutTest shows that a property was missing.
2977         * css/StylePropertySet.cpp:
2978         (WebCore::StylePropertySet::getPropertyValue):
2979         (WebCore::StylePropertySet::borderSpacingValue):
2980         (WebCore::StylePropertySet::get4Values):
2981         (WebCore::StylePropertySet::getLayeredShorthandValue):
2982         (WebCore::StylePropertySet::getShorthandValue):
2983         (WebCore::StylePropertySet::getCommonValue):
2984         (WebCore::StylePropertySet::asText):
2985         * css/StylePropertySet.h:
2986         (WebCore):
2987         (StylePropertySet):
2988
2989 2012-03-26  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2990
2991         [Qt] Assert in GestureTapHighlighter.
2992         https://bugs.webkit.org/show_bug.cgi?id=82187
2993
2994         Reviewed by Kenneth Rohde Christiansen.
2995
2996         Adjust the boundaries of the center-rect before performing the intersection test,
2997         since adjusting the boundary may cause a new intersection.
2998
2999         * page/GestureTapHighlighter.cpp:
3000
3001 2012-03-26  Antti Koivisto  <antti@apple.com>
3002
3003         Split MediaList into internal and CSSOM types
3004         https://bugs.webkit.org/show_bug.cgi?id=82149
3005
3006         Reviewed by Andread Kling.
3007
3008         MediaList is a CSSOM type and should not be used internally.
3009         
3010         - Use new type MediaQuerySet internally to represent a collection of media queries.
3011         - Create MediaList wrapper on-demand for CSSOM purposes only.
3012         
3013         This moves us forward in separating CSSOM from the internal stylesheet implementation.
3014         
3015         MediaQuerySet really belongs to a file of its own but that is not part of this patch.
3016         
3017         * css/CSSGrammar.y:
3018         * css/CSSImportRule.cpp:
3019         (WebCore::CSSImportRule::create):
3020         (WebCore):
3021         (WebCore::CSSImportRule::CSSImportRule):
3022         (WebCore::CSSImportRule::~CSSImportRule):
3023         (WebCore::CSSImportRule::media):
3024         (WebCore::CSSImportRule::cssText):
3025         * css/CSSImportRule.h:
3026         (WebCore):
3027         (CSSImportRule):
3028         (WebCore::CSSImportRule::mediaQueries):
3029         * css/CSSMediaRule.cpp:
3030         (WebCore::CSSMediaRule::CSSMediaRule):
3031         (WebCore::CSSMediaRule::~CSSMediaRule):
3032         (WebCore::CSSMediaRule::cssText):
3033         * css/CSSMediaRule.h:
3034         (WebCore::CSSMediaRule::create):
3035         (WebCore::CSSMediaRule::media):
3036         (WebCore::CSSMediaRule::mediaQueries):
3037         (CSSMediaRule):
3038         * css/CSSParser.cpp:
3039         (WebCore::CSSParser::parseMediaQuery):
3040         (WebCore::CSSParser::createMediaQuerySet):
3041         (WebCore::CSSParser::createImportRule):
3042         (WebCore::CSSParser::createMediaRule):
3043         (WebCore::CSSParser::updateLastMediaLine):
3044         * css/CSSParser.h:
3045         (WebCore):
3046         (CSSParser):
3047         * css/CSSStyleSelector.cpp:
3048         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3049         * css/CSSStyleSheet.cpp:
3050         (WebCore):
3051         (WebCore::CSSStyleSheet::media):
3052         (WebCore::CSSStyleSheet::setMediaQueries):
3053         * css/CSSStyleSheet.h:
3054         (WebCore):
3055         (CSSStyleSheet):
3056         (WebCore::CSSStyleSheet::mediaQueries):
3057         * css/MediaList.cpp:
3058         (WebCore):
3059         (WebCore::MediaQuerySet::MediaQuerySet):
3060         (WebCore::MediaQuerySet::~MediaQuerySet):
3061         (WebCore::parseMediaDescriptor):
3062         (WebCore::MediaQuerySet::parse):
3063         (WebCore::MediaQuerySet::add):
3064         (WebCore::MediaQuerySet::remove):
3065         (WebCore::MediaQuerySet::addMediaQuery):
3066         (WebCore::MediaQuerySet::mediaText):
3067         (WebCore::MediaQuerySet::ensureMediaList):
3068         
3069             - Use OwnPtr<> for MediaQuery ownership.
3070             - Move the appropriate functions to MediaQuerySet.
3071             - Clean up a bit to make this more readable and better aligned to WebKit style.
3072         
3073         (WebCore::MediaList::MediaList):
3074         (WebCore::MediaList::~MediaList):
3075         (WebCore::MediaList::setMediaText):
3076         (WebCore::MediaList::item):
3077         (WebCore::MediaList::deleteMedium):
3078         (WebCore::MediaList::appendMedium):
3079         * css/MediaList.h:
3080         (WebCore):
3081         (WebCore::MediaQuerySet::create):
3082         (WebCore::MediaQuerySet::createAllowingDescriptionSyntax):
3083         (MediaQuerySet):
3084         (WebCore::MediaQuerySet::queryVector):
3085         (WebCore::MediaQuerySet::lastLine):
3086         (WebCore::MediaQuerySet::setLastLine):
3087         (MediaList):
3088         (WebCore::MediaList::ref):
3089         (WebCore::MediaList::deref):
3090         (WebCore::MediaList::length):
3091         (WebCore::MediaList::mediaText):
3092         (WebCore::MediaList::queries):
3093         * css/MediaQueryEvaluator.cpp:
3094         (WebCore::MediaQueryEvaluator::eval):
3095         * css/MediaQueryEvaluator.h:
3096         (WebCore):
3097         (MediaQueryEvaluator):
3098         * css/MediaQueryList.cpp:
3099         (WebCore::MediaQueryList::create):
3100         (WebCore::MediaQueryList::MediaQueryList):
3101         * css/MediaQueryList.h:
3102         (WebCore):
3103         (MediaQueryList):
3104         * css/MediaQueryMatcher.cpp:
3105         (WebCore::MediaQueryMatcher::evaluate):
3106         (WebCore::MediaQueryMatcher::matchMedia):
3107         * css/MediaQueryMatcher.h:
3108         (WebCore):
3109         (MediaQueryMatcher):
3110         * css/StyleMedia.cpp:
3111         (WebCore::StyleMedia::matchMedium):
3112         * css/StyleSheet.cpp:
3113         (WebCore::StyleSheet::~StyleSheet):
3114         
3115             Move the media query ownership to CSSStyleSheet where it belongs.
3116         
3117         (WebCore):
3118         * css/StyleSheet.h:
3119         (WebCore::StyleSheet::media):
3120         (StyleSheet):
3121         * dom/DOMImplementation.cpp:
3122         (WebCore::DOMImplementation::createCSSStyleSheet):
3123         * dom/ProcessingInstruction.cpp:
3124         (WebCore::ProcessingInstruction::setCSSStyleSheet):
3125         * dom/StyleElement.cpp:
3126         (WebCore::StyleElement::createSheet):
3127         * html/HTMLLinkElement.cpp:
3128         (WebCore::HTMLLinkElement::process):
3129         (WebCore::HTMLLinkElement::setCSSStyleSheet):
3130         * html/HTMLMediaElement.cpp:
3131         (WebCore::HTMLMediaElement::selectNextSourceChild):
3132         * html/parser/HTMLPreloadScanner.cpp:
3133         (WebCore::HTMLNames::PreloadTask::linkMediaAttributeIsScreen):
3134         * inspector/InspectorStyleSheet.cpp:
3135         (WebCore::buildMediaObject):
3136
3137 2012-03-26  Zeno Albisser  <zeno@webkit.org>
3138
3139         [Qt]WK2] TextureMapperShaderManager should query the program map before creating new shader program instances.
3140         https://bugs.webkit.org/show_bug.cgi?id=82178
3141
3142         If TextureMapperShaderManager already has a reference to an instance of the
3143         requested shader program type, this instance should be reused instead of
3144         creating a new one.
3145
3146         Reviewed by Noam Rosenthal.
3147
3148         * platform/graphics/texmap/TextureMapperShaderManager.h:
3149         (WebCore::TextureMapperShaderManager::getShaderProgram):
3150
3151 2012-03-26  Yury Semikhatsky  <yurys@chromium.org>
3152
3153         [Chromium] Web Inspector: dedicated worker inspector is empty
3154         https://bugs.webkit.org/show_bug.cgi?id=82181
3155
3156         "beforeunload" event for worker inspector front-end is ingnored if the
3157         window url is "about:blank" as it is just unload of the default content
3158         before the front-end page load.
3159
3160         Reviewed by Pavel Feldman.
3161
3162         * inspector/front-end/WorkerManager.js:
3163         (WebInspector.WorkerManager.prototype._workerInspectorClosing):
3164
3165 2012-03-22  Yury Semikhatsky  <yurys@chromium.org>
3166
3167         Web Inspector: split nodes and containment edges into two different arrays
3168         https://bugs.webkit.org/show_bug.cgi?id=81930
3169
3170         Extract heap profile nodes and edges into two separate arrays. This
3171         way we will have a continuous array of the heap graph nodes and can
3172         aviod additional mapping between node index and its position in the
3173         heap snapshot.
3174
3175         Reviewed by Pavel Feldman.
3176
3177         * inspector/front-end/HeapSnapshot.js:
3178         (WebInspector.HeapSnapshot.prototype._init):
3179         (WebInspector.HeapSnapshot.prototype._buildContinuousNodeArray):
3180         (WebInspector.HeapSnapshot.prototype._createOnlyNodesArray):
3181         (WebInspector.HeapSnapshot.prototype._restoreNodeTypes):
3182         (WebInspector.HeapSnapshot.prototype._createRetainmentEdgesArray):
3183         (WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray):
3184         * inspector/front-end/HeapSnapshotProxy.js:
3185         (WebInspector.HeapSnapshotWorker):
3186
3187 2012-03-22  Pavel Podivilov  <podivilov@chromium.org>
3188
3189         Web Inspector: move resource loading logic from SourceMapParser to CompilerScriptMapping.
3190         https://bugs.webkit.org/show_bug.cgi?id=81897
3191
3192         Reviewed by Vsevolod Vlasov.
3193
3194         SourceMapParser should only deal with payload parsing.
3195
3196         * inspector/front-end/CompilerScriptMapping.js:
3197         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
3198         (WebInspector.CompilerScriptMapping.prototype.addScript):
3199         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
3200         (WebInspector.SourceMapPayload):
3201         (WebInspector.SourceMapParser):
3202         (WebInspector.SourceMapParser.prototype.sourceContent):
3203         (WebInspector.SourceMapParser.prototype.findEntry):
3204         (WebInspector.SourceMapParser.prototype.findEntryReversed):
3205         * inspector/front-end/ContentProviders.js:
3206         (WebInspector.CompilerSourceMappingContentProvider):
3207         (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent):
3208
3209 2012-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
3210
3211         Web Inspector: replace indexOf('a text') === 0 with RegExp because it is much faster.
3212         https://bugs.webkit.org/show_bug.cgi?id=82175
3213
3214         We were using aString.indexOf("Window") but it is not effective from performance point of view.
3215         I'm replaced it with RegExp.
3216
3217         Reviewed by Yury Semikhatsky.
3218
3219         * inspector/front-end/HeapSnapshot.js:
3220         (WebInspector.HeapSnapshotNode.prototype.get isWindow):
3221         (WebInspector.HeapSnapshotNode.prototype.get isDetachedDOMTree):
3222
3223 2012-03-26  Pavel Feldman  <pfeldman@chromium.org>
3224
3225         Web Inspector: breakpoints should be disabled while live editing JavaScript.
3226         https://bugs.webkit.org/show_bug.cgi?id=81947
3227
3228         Reviewed by Yury Semikhatsky.
3229
3230         This change disables (removes from the backend) the breakpoints while editing script.
3231         Undoing or committing the change restores the breakpoints. Main logic is implemented within
3232         JavaScriptSourceFrame, but it required minor tweaking of the text editor: more correct
3233         undo/redo wrapper and better detection of the noop opterations.
3234
3235         * inspector/front-end/JavaScriptSourceFrame.js:
3236         (WebInspector.JavaScriptSourceFrame):
3237         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
3238         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
3239         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
3240         (WebInspector.JavaScriptSourceFrame.prototype.addBreakpoint):
3241         (WebInspector.JavaScriptSourceFrame.prototype.removeBreakpoint):
3242         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
3243         * inspector/front-end/TextEditorModel.js:
3244         (WebInspector.TextEditorModel.endsWithBracketRegex.):
3245         * inspector/front-end/TextViewer.js:
3246         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.before):
3247         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.after):
3248         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
3249         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
3250
3251 2012-03-25  Nat Duca  <nduca@chromium.org>
3252
3253         [chromium] Route willBeginFrame from compositor to WebWidget
3254         https://bugs.webkit.org/show_bug.cgi?id=82171
3255
3256         Reviewed by Darin Fisher.
3257
3258         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3259         (CCLayerTreeHostClient):
3260         (WebCore::CCLayerTreeHost::willBeginFrame):
3261         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3262         (WebCore::CCThreadProxy::beginFrame):
3263
3264 2012-03-25  Hayato Ito  <hayato@chromium.org>
3265
3266         [Shadow DOM] Add Reified DOM Tree traversal internal APIs.
3267         https://bugs.webkit.org/show_bug.cgi?id=79197
3268
3269         Reviewed by Dimitri Glazkov.
3270
3271         Add internal APIs which can be used to traverse Reified DOM tree, which is
3272         a result of node distribution algorithm explained in Shadow DOM spec.
3273         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
3274
3275         Every public functions defined in ReifiedTreeTraversal are static
3276         functions and are named in a similar way to ones defined in WebCore::Node class.
3277         The only difference is that ReifiedTreeTraversal APIs consider shadow
3278         hosts and also traverse nodes is Shadow DOM subtrees, crossing shadow's upper and lower boundary
3279         transparently.
3280
3281         There is no actual client which uses these APIs. Follow-up patches for FocusNavigation
3282         and EventDispatcher will use the APIs so that they can traverse node in reified tree order.
3283
3284         Test: fast/dom/shadow/reified-tree-traversal.html
3285
3286         * CMakeLists.txt:
3287         * GNUmakefile.list.am:
3288         * Target.pri:
3289         * WebCore.exp.in:
3290         * WebCore.gypi:
3291         * WebCore.vcproj/WebCore.vcproj:
3292         * WebCore.xcodeproj/project.pbxproj:
3293         * dom/ReifiedTreeTraversal.cpp: Added.
3294         (WebCore):
3295         (WebCore::isShadowHost):
3296         (WebCore::shadowTreeFor):
3297         (WebCore::shadowTreeOfParent):
3298         (WebCore::ReifiedTreeTraversal::firstChild):
3299         (WebCore::ReifiedTreeTraversal::lastChild):
3300         (WebCore::ReifiedTreeTraversal::lastChildWithoutCrossingUpperBoundary):
3301         (WebCore::ReifiedTreeTraversal::traverseChild):
3302         (WebCore::ReifiedTreeTraversal::traverseLightChildren):
3303         (WebCore::ReifiedTreeTraversal::traverseNode):
3304         (WebCore::ReifiedTreeTraversal::nextSibling):
3305         (WebCore::ReifiedTreeTraversal::previousSibling):
3306         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToInsertionPoint):
3307         (WebCore::ReifiedTreeTraversal::traverseSiblingInCurrentTree):
3308         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToYoungerShadowRoot):
3309         (WebCore::ReifiedTreeTraversal::escapeFallbackContentElement):
3310         (WebCore::ReifiedTreeTraversal::traverseNodeEscapingFallbackContents):
3311         (WebCore::ReifiedTreeTraversal::parentNode):
3312         (WebCore::ReifiedTreeTraversal::parentNodeWithoutCrossingUpperBoundary):
3313         (WebCore::ReifiedTreeTraversal::parentNodeOrBackToInsertionPoint):
3314         (WebCore::ReifiedTreeTraversal::parentNodeInCurrentTree):
3315         (WebCore::ReifiedTreeTraversal::parentNodeBackToYoungerShadowRootOrHost):
3316         (WebCore::ReifiedTreeTraversal::adjustedParentNode):
3317         (WebCore::ReifiedTreeTraversal::traverseNextNode):
3318         (WebCore::ReifiedTreeTraversal::traverseNextNodeWithoutCrossingUpperBoundary):
3319         (WebCore::ReifiedTreeTraversal::traversePreviousNode):
3320         (WebCore::ReifiedTreeTraversal::traversePreviousNodeWithoutCrossingUpperBoundary):
3321         * dom/ReifiedTreeTraversal.h: Added.
3322         (WebCore):
3323         (ReifiedTreeTraversal):
3324         * dom/ShadowTree.cpp:
3325         (WebCore::ShadowTree::insertionPointFor):
3326         (WebCore::ShadowTree::selectionFor):
3327         (WebCore):
3328         * dom/ShadowTree.h:
3329         (WebCore):
3330         (ShadowTree):
3331         * html/shadow/HTMLContentSelector.cpp:
3332         (WebCore::HTMLContentSelector::findFor):
3333         * html/shadow/HTMLContentSelector.h:
3334         (HTMLContentSelectionSet):
3335         (WebCore::HTMLContentSelectionSet::find):
3336         (HTMLContentSelector):
3337         * html/shadow/InsertionPoint.h:
3338         (WebCore::isInsertionPoint):
3339         (WebCore::toInsertionPoint):
3340         (WebCore):
3341         * testing/Internals.cpp:
3342         (WebCore::Internals::nextSiblingInReifiedTree):
3343         (WebCore):
3344         (WebCore::Internals::firstChildInReifiedTree):
3345         (WebCore::Internals::lastChildInReifiedTree):
3346         (WebCore::Internals::traverseNextNodeInReifiedTree):
3347         (WebCore::Internals::traversePreviousNodeInReifiedTree):
3348         * testing/Internals.h:
3349         (Internals):
3350         * testing/Internals.idl:
3351
3352 2012-03-25  Nikita Vasilyev  <me@elv1s.ru>
3353
3354         Web Inspector: Indenting fully selected line should not indent the line next to it
3355         https://bugs.webkit.org/show_bug.cgi?id=81758
3356
3357         In the editor, you can select a whole line by moving caret at 0 column
3358         position and pressing Shift + Arrow Down/Up. After that, pressing Tab
3359         indents 2 lines: fully selected one and the line next to it. The patch
3360         changes this behaviour to indent only fully selected line since that is
3361         what pretty-match all the other code editors do.
3362
3363         Reviewed by Pavel Feldman.
3364
3365         Test: inspector/editor/indentation.html
3366
3367         * inspector/front-end/TextViewer.js:
3368         (WebInspector.TextEditorMainPanel.prototype._indentLines):
3369             Do not insert indent at the begging of the last line if a selection
3370             ends on its 0 column.
3371         (WebInspector.TextEditorMainPanel.prototype._unindentLines):
3372             Do not remove indent at the begging of the last line if a selection
3373             ends on its 0 column.
3374
3375 2012-03-25  Abhishek Arya  <inferno@chromium.org>
3376
3377         Crash in ContainerNode::resumePostAttachCallbacks.
3378         https://bugs.webkit.org/show_bug.cgi?id=82159
3379
3380         Reviewed by Hajime Morita.
3381
3382         Test: plugins/object-onfocus-mutation-crash.html
3383
3384         * dom/ContainerNode.cpp:
3385         (WebCore::ContainerNode::resumePostAttachCallbacks): dispatching post attach
3386         callbacks when our attach depth is 1 can fire mutation events such as onfocus
3387         which can blow away |this|. Need to protect it with a RefPtr.
3388         * html/HTMLPlugInImageElement.cpp:
3389         (WebCore::HTMLPlugInImageElement::attach): add calls to suspend attach callbacks
3390         until the function completes.
3391
3392 2012-03-25  Dana Jansens  <danakj@chromium.org>
3393
3394         [chromium] Layers with animating transforms should prepaint even if they are not visible yet
3395         https://bugs.webkit.org/show_bug.cgi?id=82117
3396
3397         Reviewed by Adrienne Walker.
3398
3399         For animating transforms, instead of early-outing when the layer's
3400         visible rect is empty, let it prepaint regardless.
3401
3402         For now, we just only paint the outermost tiles, and only for small
3403         layers, with at most 9 tiles.
3404
3405         This changes the behaviour of ContentLayerChromium's
3406         idlePaintContentsIfDirty() so I've guarded the behaviour of the two
3407         prepainting functions that it calls to ensure the old behaviour holds
3408         without animations, and the new behaviour works with them.
3409
3410         Unit test: TiledLayerChromiumTest.idlePaintZeroSizedLayer
3411                    TiledLayerChromiumTest.idlePaintZeroSizedAnimatingLayer
3412                    TiledLayerChromiumTest.idlePaintNonVisibleLayers
3413                    TiledLayerChromiumTest.idlePaintNonVisibleAnimatingLayers
3414
3415         * platform/graphics/chromium/ContentLayerChromium.cpp:
3416         (WebCore::ContentLayerChromium::idlePaintContentsIfDirty):
3417         * platform/graphics/chromium/TiledLayerChromium.cpp:
3418         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
3419         (WebCore::TiledLayerChromium::needsIdlePaint):
3420         (WebCore::TiledLayerChromium::idlePaintRect):
3421         * platform/graphics/chromium/TiledLayerChromium.h:
3422         (WebCore::TiledLayerChromium::numPaintedTiles):
3423         (TiledLayerChromium):
3424
3425 2012-03-25  Antti Koivisto  <antti@apple.com>
3426
3427         Don't use CSSRuleList for child rule ownership
3428         https://bugs.webkit.org/show_bug.cgi?id=82127
3429
3430         Reviewed by Andreas Kling.
3431
3432         CSSMediaRule, WebKitCSSKeyframesRule and WebKitRegionRule use CSSRuleList for storing children. 
3433         They should use a simple rule vector instead. CSSRuleList is a CSSOM type that should be 
3434         instantiated on-demand for API purposes only.
3435         
3436         - Use Vector<RefPtr<CSSRule>> for storing the rule children of CSSMediaRule, WebKitCSSKeyframesRule 
3437           and WebKitRegionRule.
3438         - Add direct accessors, use internally instead of CSSRuleList.
3439         - Make CSSRuleList an abstract base. Add concrete subclasses for dealing with the underlying storage.
3440         - Instantiate CSSRuleLists on-demand.
3441         - Make CSSStyleSheet.cssRules always return the same object instance. This matches Firefox and the rest
3442           of our CSSOM implementation. Tested by fast/dom/gc-9.html.
3443           
3444         The patch decouples internals from the external API. It simplifies the child rule ownership and reduces 
3445         indirection.