styleForElement() should use enums instead of bools so we can all understand what...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-30  Eric Seidel  <eric@webkit.org>
2         styleForElement() should use enums instead of bools so we can all understand what it's doing
3         https://bugs.webkit.org/show_bug.cgi?id=82807
4
5         Reviewed by Adam Barth.
6
7         No change in behavior, thus no tests.
8
9         Mostly this is just replacing true/false with the correct new enum value
10         or removing true/false from the callsites when they would have been default anyway.
11         I think this makes the code *way* more clear.
12
13         The old code was extra confusing because the defaults were "true, false". :)
14         The new defaults are AllowStyleSharing, MatchAllRules.
15         It's very uncommon for callers to want to override either of these behaviors.
16         I think most callers which specify DisallowStyleSharing likely don't actually need to
17         (our style-sharing code should be smart enough to only share when safe anyway).
18
19         * css/CSSStyleSelector.cpp:
20         (WebCore::CSSStyleSelector::CSSStyleSelector):
21          - Use enums and remove bogus comment (m_rootDefaultStyle is a RefPtr!)
22         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
23         * css/CSSStyleSelector.h:
24         (CSSStyleSelector):
25         * css/MediaQueryMatcher.cpp:
26         (WebCore::MediaQueryMatcher::prepareEvaluator):
27         * css/StyleMedia.cpp:
28         (WebCore::StyleMedia::matchMedium):
29         * dom/Element.cpp:
30         (WebCore::Element::styleForRenderer):
31         * rendering/RenderObject.cpp:
32         (WebCore::RenderObject::getUncachedPseudoStyle):
33          - Updated to use enums
34          - Also fixed this to use toElement and modern early-return styles.
35         * rendering/RenderRegion.cpp:
36         (WebCore::RenderRegion::computeStyleInRegion):
37         * svg/SVGElement.cpp:
38         (WebCore::SVGElement::customStyleForRenderer):
39
40 2012-03-30  Jason Liu  <jason.liu@torchmobile.com.cn>
41
42         [BlackBerry] Headers with no content shouldn't be dropped by platform's request.
43         https://bugs.webkit.org/show_bug.cgi?id=82691
44
45         Reviewed by Rob Buis.
46
47         Test : http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html
48
49         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
50         (WebCore::ResourceRequest::initializePlatformRequest):
51
52 2012-03-30  Eric Seidel  <eric@webkit.org>
53
54         Add tests for iframe seamless and support for parsing webkitseamless attribute
55         https://bugs.webkit.org/show_bug.cgi?id=82795
56
57         Reviewed by Adam Barth.
58
59         This just adds support for parsing/reflecting the "webkitseamess" attribute.
60         I'll add the actual CSS, navigation, security, and layout changes in
61         separate follow-up patches.
62
63         Tests: fast/frames/seamless/seamless-basic.html
64                fast/frames/seamless/seamless-css-cascade.html
65                fast/frames/seamless/seamless-nested.html
66                fast/frames/seamless/seamless-sandbox-flag.html
67
68         * html/HTMLAttributeNames.in:
69         * html/HTMLIFrameElement.idl:
70
71 2012-03-30  Emil A Eklund  <eae@chromium.org>
72
73         Change WebKit/WebKit2 platform code to use pixel snapped values
74         https://bugs.webkit.org/show_bug.cgi?id=82549
75
76         Reviewed by Eric Seidel.
77
78         Change WebKit and WebKit2 platform code to use rounded locations and
79         pixel snapped rects and sizes. This largely avoids having to expose the
80         fractional layout types to the platform code.
81
82         No new tests. No change in functionality.
83
84         * dom/Node.h:
85         (WebCore::Node::pixelSnappedRenderRect):
86         Add pixel snapped version of renderRect
87         
88         * rendering/RenderBox.h:
89         (WebCore::RenderBox::pixelSnappedFrameRect):
90         Add pixel snapped version of frameRect
91
92 2012-03-30  Simon Fraser  <simon.fraser@apple.com>
93
94         https://bugs.webkit.org/show_bug.cgi?id=82761
95         
96         Try to narrow down the cause of this assertion by adding
97         an assertion about m_frame.
98         
99         * editing/Editor.cpp:
100         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
101
102 2012-03-30  Emil A Eklund  <eae@chromium.org>
103
104         Fix return type for virtual borderBoundingBox method
105         https://bugs.webkit.org/show_bug.cgi?id=82561
106
107         Reviewed by Eric Seidel.
108
109         No new tests, no change in functionality.
110
111         * editing/DeleteButtonController.cpp:
112         (WebCore::isDeletableElement):
113         * rendering/RenderBox.h:
114         (WebCore::RenderBox::borderBoxRect):
115         Rename pixelSnappedBorderBoxRect to borderBoxRect and remove LayoutRect
116         version of same as we always want to use the pixel snapped version to
117         ensure proper rounding and alignment to device pixels.
118         (The way this rect is pixel snapped, using the m_frameRect location,
119         makes it hard for calling code to take the subpixel rect and correctly
120         snap it).
121
122         (WebCore::RenderBox::borderBoundingBox):
123         * rendering/RenderBoxModelObject.h:
124         Change pure virtual definition of borderBoundingBox to return an IntRect
125         to match implementation in RenderBox.
126         
127         (RenderBoxModelObject):
128         * rendering/RenderInline.h:
129         (WebCore::RenderInline::borderBoundingBox):
130         Change overloaded method to IntRect to match RenderBox implementation.
131
132 2012-03-30  Bear Travis  <betravis@adobe.com>
133
134         shape-inside and shape-outside are not in the list of computed style properties
135         https://bugs.webkit.org/show_bug.cgi?id=82667
136
137         Reviewed by Ryosuke Niwa.
138
139         Adding prefixed shape-inside and shape-outside to the list of computed style properties.
140         Added properties to existing tests for computed style results
141
142         * css/CSSComputedStyleDeclaration.cpp:
143         (WebCore): added -webkit-shape-inside and -webkit-shape-outside to computedProperties
144
145 2012-03-30  Adam Barth  <abarth@webkit.org>
146
147         https://bugs.webkit.org/show_bug.cgi?id=82582
148         Move CPP files related to ResourceHandle to WebCore/platform
149
150         Reviewed by James Robinson.
151
152         This patch moves a number of files that implement parts of the platform
153         portion of the Chromium WebKit API from the WebKit layer to
154         WebCore/platform. These files are in the dependency cone of
155         ResourceHandle and have no dependencies on anything outside
156         WebCore/platform.
157
158         * WebCore.gypi:
159         * platform/chromium/support/WebHTTPBody.cpp: Copied from Source/WebKit/chromium/src/WebHTTPBody.cpp.
160         * platform/chromium/support/WebHTTPLoadInfo.cpp: Copied from Source/WebKit/chromium/src/WebHTTPLoadInfo.cpp.
161         * platform/chromium/support/WebURL.cpp: Copied from Source/WebKit/chromium/src/WebURL.cpp.
162         * platform/chromium/support/WebURLError.cpp: Copied from Source/WebKit/chromium/src/WebURLError.cpp.
163         * platform/chromium/support/WebURLRequest.cpp: Copied from Source/WebKit/chromium/src/WebURLRequest.cpp.
164         * platform/chromium/support/WebURLRequestPrivate.h: Copied from Source/WebKit/chromium/src/WebURLRequestPrivate.h.
165         * platform/chromium/support/WebURLResponse.cpp: Copied from Source/WebKit/chromium/src/WebURLResponse.cpp.
166         * platform/chromium/support/WebURLResponsePrivate.h: Copied from Source/WebKit/chromium/src/WebURLResponsePrivate.h.
167
168 2012-03-30  Emil A Eklund  <eae@chromium.org>
169
170         Fix usage of LayoutUnits in table code.
171         https://bugs.webkit.org/show_bug.cgi?id=82765
172
173         Reviewed by Eric Seidel.
174
175         Clean up usage of ints and LayoutUnits in table code in preparation for
176         turning on subpixel layout.
177
178         No new tests, no change in functionality.
179
180         * rendering/AutoTableLayout.cpp:
181         (WebCore::AutoTableLayout::computePreferredLogicalWidths):
182         Cast maxWidth to int as all table layout is done on int bounds.
183         
184         * rendering/RenderTable.cpp:
185         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
186         Change borders to LayoutUnit as paddings can have subpixel precision.
187         
188         * rendering/RenderTable.h:
189         (WebCore::RenderTable::getColumnPos):
190         (WebCore::RenderTable::columnPositions):
191         Change getColumnPos and columnPositions to ints as the values are always
192         on pixel bounds.
193         
194         (WebCore::RenderTable::bordersPaddingAndSpacingInRowDirection):
195         * rendering/RenderTableCell.cpp:
196         (WebCore::RenderTableCell::styleOrColLogicalWidth):
197         Remove unnecessary cast.
198         
199         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
200         Use LayoutPoint instead of left/top.
201         
202         * rendering/RenderTableSection.cpp:
203         (WebCore::RenderTableSection::calcRowLogicalHeight):
204         (WebCore::RenderTableSection::layoutRows):
205         * rendering/RenderTableSection.h:
206         Change baseline and baselineDescent to int to avoid unnecessary type
207         conversion.
208
209 2012-03-30  Joe Thomas  <joethomas@motorola.com>
210
211         Spec renamed Viewport-relative lengths to Viewport-percentage lengths
212         https://bugs.webkit.org/show_bug.cgi?id=82773
213
214         Reviewed by Antti Koivisto.
215
216         As per the latest version of CSS Values and Units Module Level 3 specification released on 29 March 2012
217         (http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths) Viewport-relative lengths is renamed to Viewport-percentage lengths.
218
219         * css/CSSComputedStyleDeclaration.cpp:
220         (WebCore::getPositionOffsetValue):
221         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
222         * css/CSSPrimitiveValue.cpp:
223         (WebCore::unitCategory):
224         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
225         (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory):
226         (WebCore::CSSPrimitiveValue::viewportPercentageLength):
227         * css/CSSPrimitiveValue.h:
228         (WebCore::CSSPrimitiveValue::isViewportPercentageLength):
229         (CSSPrimitiveValue):
230         * css/CSSPrimitiveValueMappings.h:
231         (WebCore::CSSPrimitiveValue::convertToLength):
232         * css/CSSStyleApplyProperty.cpp:
233         (WebCore::ApplyPropertyLength::applyValue):
234         (WebCore::ApplyPropertyBorderRadius::applyValue):
235         (WebCore::ApplyPropertyFontSize::applyValue):
236         (WebCore::ApplyPropertyLineHeight::applyValue):
237         (WebCore::ApplyPropertyVerticalAlign::applyValue):
238         * css/CSSStyleSelector.cpp:
239         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
240         * css/LengthFunctions.cpp:
241         (WebCore::minimumValueForLength):
242         (WebCore::valueForLength):
243         (WebCore::floatValueForLength):
244         * platform/Length.h:
245         (WebCore::Length::isViewportPercentage):
246         (WebCore::Length::viewportPercentageLength):
247         * rendering/RenderBlock.cpp:
248         (WebCore::RenderBlock::textIndentOffset):
249         * rendering/RenderBox.cpp:
250         (WebCore::RenderBox::computeContentLogicalHeightUsing):
251         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
252         * rendering/RenderBoxModelObject.cpp:
253         (WebCore::RenderBoxModelObject::paddingTop):
254         (WebCore::RenderBoxModelObject::paddingBottom):
255         (WebCore::RenderBoxModelObject::paddingLeft):
256         (WebCore::RenderBoxModelObject::paddingRight):
257         (WebCore::RenderBoxModelObject::paddingBefore):
258         (WebCore::RenderBoxModelObject::paddingAfter):
259         (WebCore::RenderBoxModelObject::paddingStart):
260         (WebCore::RenderBoxModelObject::paddingEnd):
261         (WebCore::RenderBoxModelObject::calculateFillTileSize):
262         * rendering/RenderInline.cpp:
263         (WebCore::computeMargin):
264         * rendering/style/RenderStyle.h:
265
266 2012-03-30  Alexandru Chiculita  <achicu@adobe.com>
267
268         [CSS Filters] Drop Shadow is not repainting correctly when repaint area is smaller than the filtered element
269         https://bugs.webkit.org/show_bug.cgi?id=80323
270
271         Reviewed by Dean Jackson.
272         
273         The problem is that shadow and blur (and custom filters - although not treated in this patch) need the full source image of
274         the surface that needs to be filtered. Until now the filter was computed only using the area defined by the dirty repaint rectangle.
275         Those filters need full image source because they displace pixel positions, meaning that pixels in the current dirty rectangle
276         have a dependency on pixels from the RenderLayer outside the dirty rect. See the bug pictures for an example of how that could go wrong.
277         
278         The fix is to always keep a copy of the RenderLayer representation in memory. When repaint is needed we still invalidate
279         only the parts that changed, but the filter is computed using the full source image and not only the dirty rectangle.
280         
281         In order to make that work, we needed the full repaint rectangle of the current RenderLayer and not just the clipped version that
282         we get through the ::paint methods. Also, because filters sometime need to repaint more than just the dirty area (because of the 
283         outsets of the filters - ie blur, drop-shadow), it makes it easier to just capture all the repaints in the RenderLayer itself in a
284         similar way WebKit does now for composited layers. As a result the repaint container can also be a filtered layer (not just composited ones), so 
285         that we can catch all the filter repaints in one place in the RenderLayer. Also with this change I removed the need to add visual overflow to 
286         the RenderBox and also there's no need to patch the repaintUsingContainer. By the way, repaintUsingContainer did not always work because of the 
287         LayoutState optimizations, so repaints during layout would fail (I know that that could be fixed by disabling the LayoutState for filtered areas).
288         
289         Also part of this patch I extracted a function from RenderLayerCompositor::calculateCompositedBounds, so that we can also use it from RenderLayer.
290         I called it RenderLayer::calculateLayerBounds and there should be no change in functionality. It now also includes the outsets of the filter. I've
291         added a different bug to avoid adding the outsets when the filter is computed in hardware. That's because some platforms do not support that yet:
292         https://bugs.webkit.org/show_bug.cgi?id=81239 
293         
294         Also the visual overflow doesn't include the child RenderLayers, meaning that the outsets would have been applied to the border and not to the bounding box
295         of the RenderLayer. The end result was that some child RenderLayers could be clipped out of the filtered area.
296         
297         Tests: css3/filters/filter-repaint-blur.html
298                css3/filters/filter-repaint-child-layers.html
299                css3/filters/filter-repaint-composited-fallback-crash.html
300                css3/filters/filter-repaint-composited-fallback.html
301                css3/filters/filter-repaint-sepia.html
302                css3/filters/filter-repaint-shadow-clipped.html
303                css3/filters/filter-repaint-shadow-rotated.html
304                css3/filters/filter-repaint-shadow.html
305
306         * platform/graphics/filters/FilterOperations.cpp:
307         (WebCore::FilterOperations::getOutsets): Drop shadow should only enlarge the outsets and never make them smaller.
308         
309         * rendering/FilterEffectRenderer.cpp:
310         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
311         (WebCore::FilterEffectRenderer::build): Caching the operations.hasFilterThatMovesPixels() in the FilterEffectRenderer.
312         (WebCore::FilterEffectRenderer::updateBackingStore): It now returns true when the backing store was recreated, so that we can repaint it all.
313         (WebCore):
314         (WebCore::FilterEffectRendererHelper::prepareFilterEffect): Separated beginFilterEffect into two methods. One that computed the rects 
315         and one that prepares the draw context.
316         (WebCore::FilterEffectRendererHelper::beginFilterEffect):
317         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
318         
319         * rendering/FilterEffectRenderer.h:
320         (FilterEffectRendererHelper):
321         (FilterEffectRenderer):
322         (WebCore::FilterEffectRenderer::hasFilterThatMovesPixels):
323         
324         * rendering/RenderBox.cpp:
325         (WebCore::RenderBox::computeRectForRepaint): No need to include the outsets in the repaint rect here, we will do it later in RenderLayer.
326         (WebCore::RenderBox::addVisualEffectOverflow): Removed outsets from the overflow.
327         
328         * rendering/RenderInline.cpp:
329         (WebCore::RenderInline::computeRectForRepaint): Removed the outsets from this method. We now compute that in
330         RenderLayer::setFilterBackendNeedsRepaintingInRect.
331         
332         * rendering/RenderLayer.cpp:
333         (WebCore):
334         In this change I introduce a new dirty rectangle used by filters. It accumulates all the repaint requests inside the filtered layer,
335         so that we can invalidate the areas that are outside the clipping rectangle. Such cases include "overflow:scroll" and "overflow:hidden", when
336         we still want to blur or drop shadow based on content that is not actually displayed on screen (but the shadow for that content is visible). That rectangle
337         is called m_filterRepaintRect and resets back to zero when the next repaint is finished. All the filtered layers that apply blur and drop-shadow
338         will have an extra backing surface and only the invalidated areas are repainted in that surface. This is very similar to how composited layers work.
339         
340         (WebCore::RenderLayer::requiresFullLayerImageForFilters): Returns true in CPU mode and only if the layer needs the full source image of 
341         the layer to compute the filter. Otherwise GPU layers already have access to the full bakcing image.
342         (WebCore::RenderLayer::enclosingFilterLayer): Returns the enclosing layer that returns true on requiresFullLayerImageForFilters.
343         (WebCore::RenderLayer::enclosingFilterRepaintLayer): Returns the enclosing layer that can be used to repaint the current layer. Usually that 
344         is the RenderView layer or the parent RenderLayer that is composited.
345         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect): Intercepts all the repaint queries for the filtered layers and uses
346         enclosingFilterRepaintLayer to enforce the repaint using the parent container.
347         
348         (WebCore::RenderLayer::paintLayerContents): Consolidated the filters code in one single place. Also, it is now sending the bounding box and the 
349         dirty rect to the FilterEffectRendererHelper::prepareFilterEffect to make sure the backing store is repainted accordingly. In some cases it might 
350         rewrite the dirty rectangle used to paint the current layer, so that all the dirty areas in the backing store are covered.
351         (WebCore::RenderLayer::calculateLayerBounds): Extracted from RenderLayerCompositor::calculateCompositedBounds.
352         (WebCore::RenderLayer::updateOrRemoveFilterEffect): We should not create the filter builder when there's no filter specified.
353         
354         * rendering/RenderLayer.h:
355         (RenderLayer):
356         
357         * rendering/RenderLayerCompositor.cpp:
358         (WebCore::RenderLayerCompositor::calculateCompositedBounds): Now using the code from RenderLayer::calculateLayerBounds
359         
360         * rendering/RenderObject.cpp:
361         (WebCore::RenderObject::containerForRepaint): Using RenderLayer::enclosingFilterLayer to also find the parent filtered area.
362         (WebCore::RenderObject::repaintUsingContainer): Removed the need to add filter outsets in this method. We now compute that in
363         RenderLayer::setFilterBackendNeedsRepaintingInRect.
364
365 2012-03-30  Ryosuke Niwa  <rniwa@webkit.org>
366
367         Add a compile assert for the size of BidiContext
368         https://bugs.webkit.org/show_bug.cgi?id=82793
369
370         Reviewed by Eric Seidel.
371
372         Added the assertion. Also reduced the number of bits used for bidi levels from
373         8 to 6 as done in InlineBox since bidi levels require exactly 6 bits.
374
375         * rendering/InlineBox.h: Added a comment about why bidi level needs exactly 6 bits.
376         * platform/text/BidiContext.cpp:
377         (SameSizeAsBidiContext):
378         (WebCore):
379         * platform/text/BidiContext.h:
380         (BidiContext):
381
382 2012-03-30  Joshua Bell  <jsbell@chromium.org>
383
384         IndexedDB: Race condition causes version change transaction to commit after onblocked
385         https://bugs.webkit.org/show_bug.cgi?id=82678
386
387         For a version change event, the blocked and success events could both be queued
388         before either is dispatched. The transaction would erroneously be allowed to commit
389         after the blocked event was dispatched; it should not be, as the request was not
390         finished.
391
392         Reviewed by Tony Chang.
393
394         Test: storage/indexeddb/dont-commit-on-blocked.html
395
396         * Modules/indexeddb/IDBRequest.cpp:
397         (WebCore::IDBRequest::dispatchEvent):
398
399 2012-03-30  Ryosuke Niwa  <rniwa@webkit.org>
400
401         Add a compile assert for the size of FontDescription
402         https://bugs.webkit.org/show_bug.cgi?id=82786
403
404         Reviewed by Eric Seidel.
405
406         Added the assertion. Also converted a couple of boolean bitfields to unsinged.
407         I've verified that the conversions are safe (they're only used in FontDescription.h/cpp).
408
409         * platform/graphics/FontDescription.cpp:
410         (SameSizeAsFontDescription):
411         (WebCore):
412         * platform/graphics/FontDescription.h:
413         (FontDescription):
414
415 2012-03-30  Adam Barth  <abarth@webkit.org>
416
417         Move CPP files related to ResourceHandle to WebCore/platform
418         https://bugs.webkit.org/show_bug.cgi?id=82582
419
420         Reviewed by James Robinson.
421
422         Re-land a tiny piece of http://trac.webkit.org/changeset/112572 in the
423         hopes of not breaking the component build this time.
424
425         * WebCore.gyp/WebCore.gyp:
426         * WebCore.gypi:
427         * platform/chromium/support/WebData.cpp: Copied from Source/WebKit/chromium/src/WebData.cpp.
428
429 2012-03-30  Andreas Kling  <kling@webkit.org>
430
431         Kill CSSTimingFunctionValue.
432         <http://webkit.org/b/82787>
433
434         Reviewed by Antti Koivisto.
435
436         Remove CSSTimingFunctionValue and let the 3 subclasses inherit directly from CSSValue.
437         CSSTimingFunctionValue is a pointless middle-man class that adds nothing.
438
439         * css/CSSStyleSelector.cpp:
440         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
441         * css/CSSTimingFunctionValue.h:
442         (WebCore::CSSLinearTimingFunctionValue::CSSLinearTimingFunctionValue):
443         (WebCore::CSSCubicBezierTimingFunctionValue::CSSCubicBezierTimingFunctionValue):
444         (WebCore::CSSStepsTimingFunctionValue::CSSStepsTimingFunctionValue):
445         * css/CSSValue.h:
446         (WebCore::CSSValue::isCubicBezierTimingFunctionValue):
447         (WebCore::CSSValue::isLinearTimingFunctionValue):
448         (WebCore::CSSValue::isStepsTimingFunctionValue):
449
450 2012-03-30  Nat Duca  <nduca@chromium.org>
451
452         [chromium] Bump max texture updates per frame to 48
453         https://bugs.webkit.org/show_bug.cgi?id=82779
454
455         Reviewed by James Robinson.
456
457         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
458         (WTF):
459
460 2012-03-30  Nate Chapin  <japhet@chromium.org>
461
462         Merge FrameLoader::finishedLoading() into DocumentLoader::finishedLoading().
463         https://bugs.webkit.org/show_bug.cgi?id=82653
464
465         Reviewed by Adam Barth.
466
467         No new tests, no functionality change intended.
468
469         * loader/DocumentLoader.cpp:
470         (WebCore::DocumentLoader::finishedLoading):
471         * loader/FrameLoader.cpp:
472         * loader/FrameLoader.h:
473         * loader/MainResourceLoader.cpp:
474         (WebCore::MainResourceLoader::didFinishLoading):
475
476 2012-03-30  Antti Koivisto  <antti@apple.com>
477
478         Cache origin check result to RuleData
479         https://bugs.webkit.org/show_bug.cgi?id=82774
480
481         Reviewed by Andreas Kling.
482
483         You wan't be able to get back to the stylesheet from a css style rule soon. 
484         We need to do the origin check when we know the sheet it came from.
485
486         * css/CSSStyleSelector.cpp:
487         (RuleData):
488         (WebCore::RuleData::hasDocumentSecurityOrigin):
489         (RuleSet):
490         (WebCore::makeRuleSet):
491         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
492         * css/CSSStyleSelector.h:
493         (WebCore::CSSStyleSelector::RuleFeature::RuleFeature):
494         (RuleFeature):
495         (Features):
496
497 2012-03-30  Mike Reed  <reed@google.com>
498
499         Remove deadcode behind "SafeSkia" flag
500         https://bugs.webkit.org/show_bug.cgi?id=82771
501
502         Reviewed by Stephen White.
503
504         Just removing dead code (behind obsolete build flag), existing webkit tests apply
505
506         * platform/graphics/skia/GraphicsContextSkia.cpp:
507         (WebCore::GraphicsContext::addInnerRoundedRectClip):
508         (WebCore::GraphicsContext::clearRect):
509         (WebCore::GraphicsContext::clip):
510         (WebCore::GraphicsContext::canvasClip):
511         (WebCore::GraphicsContext::clipOut):
512         (WebCore::GraphicsContext::clipPath):
513         (WebCore::GraphicsContext::drawConvexPolygon):
514         (WebCore::GraphicsContext::clipConvexPolygon):
515         (WebCore::GraphicsContext::drawEllipse):
516         (WebCore::GraphicsContext::drawLine):
517         (WebCore::GraphicsContext::drawRect):
518         (WebCore::GraphicsContext::fillPath):
519         (WebCore::GraphicsContext::fillRect):
520         (WebCore::GraphicsContext::fillRoundedRect):
521         (WebCore::GraphicsContext::strokeArc):
522         (WebCore::GraphicsContext::strokePath):
523         (WebCore::GraphicsContext::strokeRect):
524         (WebCore::GraphicsContext::platformFillEllipse):
525         (WebCore::GraphicsContext::platformStrokeEllipse):
526
527 2012-03-30  Ryosuke Niwa  <rniwa@webkit.org>
528
529         Add a compile assert for the size of InlineFlowBox
530         https://bugs.webkit.org/show_bug.cgi?id=82767
531
532         Reviewed by Tony Chang.
533
534         Add a compile assert to ensure InlineFlowBox stays small.
535         Also make some of the member variables not used in RootInlineBox private.
536
537         Changing these booleans to unsigned is safe as I've audited all code that
538         uses these member variables (they're all in InlineFlowBox or RootInlineBox).
539
540         * rendering/InlineFlowBox.cpp:
541         (SameSizeAsInlineFlowBox):
542         (WebCore):
543         * rendering/InlineFlowBox.h:
544         (InlineFlowBox):
545
546 2012-03-30  Zalan Bujtas  <zbujtas@gmail.com>
547
548         Fix defective size_t overflow in GestureTapHighlighter.
549         https://bugs.webkit.org/show_bug.cgi?id=82605
550
551         Reviewed by Kenneth Rohde Christiansen.
552
553         In pathForRenderer, the for loop has 'i < rects().size() - 1' as test expression,
554         where rects().size() returns with size_t.
555         In case of empty rect, it leads to unsigned int overflow. Overflow value makes
556         the associated for loop run with invalid values.
557         Fix it by making loop variable int and stop using size_t type in the test expression.
558         Also, return early, if no focus ring found.
559
560         Manual test added. Tap gesture highlighter is getting triggered by UI process.
561
562         * page/GestureTapHighlighter.cpp:
563
564 2012-03-30  Mark Pilgrim  <pilgrim@chromium.org>
565
566         GEOLOCATION should be implemented as Page Supplement
567         https://bugs.webkit.org/show_bug.cgi?id=82228
568
569         Reviewed by Adam Barth.
570
571         Geolocation now uses the Supplement interface instead of
572         keeping an instance variable on Page. This allows us to
573         remove all geolocation-related functions, variables, and
574         ifdefs out of Page and into Modules/geolocation/.
575
576         * Modules/geolocation/Geolocation.cpp:
577         (WebCore::Geolocation::stop):
578         (WebCore::Geolocation::lastPosition):
579         (WebCore::Geolocation::requestPermission):
580         (WebCore::Geolocation::startUpdating):
581         (WebCore::Geolocation::stopUpdating):
582         * Modules/geolocation/Geolocation.h:
583         (WebCore):
584         * Modules/geolocation/GeolocationController.cpp:
585         (WebCore::GeolocationController::supplementName):
586         (WebCore):
587         (WebCore::provideGeolocationTo):
588         * Modules/geolocation/GeolocationController.h:
589         (GeolocationController):
590         (WebCore::GeolocationController::from):
591         * WebCore.exp.in:
592         * page/GeolocationClient.h:
593         (WebCore):
594         (GeolocationClient):
595         * page/Page.cpp:
596         (WebCore::Page::Page):
597         (WebCore::Page::PageClients::PageClients):
598         * page/Page.h:
599         (WebCore):
600         (PageClients):
601         (Page):
602
603 2012-03-30  Anders Carlsson  <andersca@apple.com>
604
605         This is fun.
606
607         * WebCore.xcodeproj/project.pbxproj:
608
609 2012-03-30  Anders Carlsson  <andersca@apple.com>
610
611         Yet another build fix attempt.
612
613         * WebCore.xcodeproj/project.pbxproj:
614
615 2012-03-30  Joe Mason  <jmason@rim.com>
616
617         [BlackBerry] Make sure strings do not leak in PluginViewBlackberry.
618         https://bugs.webkit.org/show_bug.cgi?id=82764
619
620         Update PluginViewBlackBerry to follow the changes in
621         BlackBerry::Platform::Window which now returns std::string instead of char* for
622         strings. Also copy the windowGroup and rootGroup strings in PluginViewPrivate
623         instead of just saving a pointer to the returned memory, which could become
624         invalid at any time.
625
626         Reviewed by Rob Buis.
627
628         * plugins/blackberry/PluginViewBlackBerry.cpp:
629         (WebCore::PluginView::setNPWindowIfNeeded):
630         (WebCore::PluginView::platformGetValue):
631         (WebCore::PluginView::platformDestroy):
632         * plugins/blackberry/PluginViewPrivateBlackBerry.h:
633         (PluginViewPrivate):
634
635 2012-03-30  Anders Carlsson  <andersca@apple.com>
636
637         Another build fix.
638
639         * WebCore.xcodeproj/project.pbxproj:
640
641 2012-03-30  Anders Carlsson  <andersca@apple.com>
642
643         Fix build.
644
645         * page/scrolling/mac/ScrollingTreeMac.mm:
646
647 2012-03-30  Anders Carlsson  <andersca@apple.com>
648
649         Show a scrolling indicator light when compositing borders are turned on
650         https://bugs.webkit.org/show_bug.cgi?id=82758
651         <rdar://problem/11143892>
652
653         Reviewed by Andreas Kling.
654
655         With this change, turning on compositing borders also turn on a tiny indicator in the top left corner.
656         This indicator uses color coding to show where wheel events are handled and where the scroll layer position is updated:
657
658           - Green means that both wheel events and scroll layer position updates are handled on the scrolling thread.
659           - Yellow means that wheel events need to be dispatched to the main thread (due to wheel event handlers), but that scroll layer position
660             updates still happen on the scrolling thread.
661           - Red means that scroll layer position updates happen on the main thread (due to background-attachment: fixed or fixed position objects).
662
663         * WebCore.exp.in:
664         * WebCore.xcodeproj/project.pbxproj:
665         * page/scrolling/ScrollingTree.cpp:
666         (WebCore::ScrollingTree::commitNewTreeState):
667         Call updateDebugRootLayer().
668
669         * page/scrolling/ScrollingTreeNode.h:
670         (WebCore::ScrollingTreeNode::shouldUpdateScrollLayerPositionOnMainThread):
671         Make this public.
672
673         (ScrollingTreeNode):
674         * page/scrolling/mac/ScrollingTreeMac.mm: Added.
675         (WebCore::ScrollingTree::setDebugRootLayer):
676         Set up a new debug info sublayer.
677
678         (WebCore::ScrollingTree::updateDebugRootLayer):
679         Update the debug root layer background color based on the scrolling tree state.
680
681 2012-03-30  Peter Rybin  <peter.rybin@gmail.com>
682
683         Web Inspector: CodeGeneratorInspector.py: add missing runtime assert method for InspectorObject
684         https://bugs.webkit.org/show_bug.cgi?id=82753
685
686         Reviewed by Vsevolod Vlasov.
687
688         Type validator generator is extended to support missing InspectorObject type and
689         made more accurate for "int" type.
690
691         Strict types are enabled for 2 more domains.
692
693         * inspector/CodeGeneratorInspector.py:
694         (RawTypes.BaseType.generate_validate_method):
695         (RawTypes.String.get_validate_method_params.ValidateMethodParams):
696         (RawTypes.Int):
697         (RawTypes.Int.generate_validate_method):
698         (RawTypes.Int.get_raw_validator_call_text):
699         (RawTypes.Number.get_validate_method_params.ValidateMethodParams):
700         (RawTypes.Bool.get_validate_method_params.ValidateMethodParams):
701         (RawTypes.Object.get_validate_method_params.ValidateMethodParams):
702         (RawTypes.Object.get_validate_method_params):
703         (TypeBindings.create_type_declaration_.ClassBinding.request_internal_runtime_cast):
704         (PlainObjectBinding.request_internal_runtime_cast):
705         (PlainObjectBinding.get_validator_call_text):
706         (ArrayBinding.request_internal_runtime_cast):
707
708 2012-03-30  Ian Vollick  <vollick@chromium.org>
709
710         [chromium] assertion being hit in CCLayerAnimationController
711         https://bugs.webkit.org/show_bug.cgi?id=82237
712
713         Reviewed by James Robinson.
714
715         Animations are no longer pushed to the impl thread if they have already completed.
716
717         Tested in CCLayerAnimationControllerTest.doNotSyncFinishedAnimation
718
719         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
720         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
721
722 2012-03-30  Ryosuke Niwa  <rniwa@webkit.org>
723
724         Build fix after r112699.
725
726         * css/StylePropertySet.cpp:
727         (WebCore::StylePropertySet::findPropertyWithId):
728
729 2012-03-30  Ryosuke Niwa  <rniwa@webkit.org>
730
731         Add a compile assert for the size of CSSProperty
732         https://bugs.webkit.org/show_bug.cgi?id=82756
733
734         Reviewed by Andreas Kling.
735
736         Add a compile assert to ensure CSSProperty instances stay small.
737
738         Also make member variables of CSSProperty private as they should have been,
739         and extract wrapValueInCommaSeparatedList from createFontFaceRule.
740
741         * css/CSSParser.cpp:
742         (WebCore::CSSParser::createFontFaceRule):
743         * css/CSSProperty.cpp:
744         (SameSizeAsCSSProperty):
745         (WebCore):
746         (WebCore::CSSProperty::wrapValueInCommaSeparatedList):
747         * css/CSSProperty.h:
748         (CSSProperty):
749
750 2012-03-30  Ryosuke Niwa  <rniwa@webkit.org>
751
752         Let there be a clean xcodeproj.
753
754         * WebCore.xcodeproj/project.pbxproj:
755
756 2012-03-30  Chris Fleizach  <cfleizach@apple.com>
757
758         AX: Crash at WebCore::renderObjectContainsPosition(WebCore::RenderObject*, WebCore::Position const&)
759         https://bugs.webkit.org/show_bug.cgi?id=82745
760
761         Reviewed by Simon Fraser.
762
763         Test: platform/mac/accessibility/range-for-position.html
764
765         * accessibility/AccessibilityRenderObject.cpp:
766         (WebCore::AccessibilityRenderObject::index):
767
768 2012-03-30  John Sullivan  <sullivan@apple.com>
769
770         Certain emoji characters should not be displayed in user-visible URL strings.
771         <https://bugs.webkit.org/show_bug.cgi?id=82739>
772         <rdar://problem/9205643>
773
774         Reviewed by Alexey Proskuryakov
775
776         * platform/mac/WebCoreNSURLExtras.mm:
777         (WebCore::isLookalikeCharacter):
778         Added five emoji characters to the list.
779
780 2012-03-30  David Barr  <davidbarr@chromium.org>
781
782         Split up top-level .gitignore and .gitattributes
783         https://bugs.webkit.org/show_bug.cgi?id=82687
784
785         Reviewed by Tor Arne Vestbø.
786
787         No new tests, source control administrivia.
788
789         * .gitattributes: Added.
790         * WebCore.gyp/.gitignore: Added.
791
792 2012-03-30  Patrick Gansterer  <paroga@webkit.org>
793
794         [WinCE] Correct <wtf/*.h> include paths.
795         https://bugs.webkit.org/show_bug.cgi?id=82713
796
797         Reviewed by Eric Seidel.
798
799         Modify the #include declarations for several WinCE-related files
800         so that the wtf types are included using the full path.
801
802         * platform/graphics/wince/ImageBufferWinCE.cpp:
803
804 2012-03-30  Vsevolod Vlasov  <vsevik@chromium.org>
805
806         Web Inspector: ScriptsNavigator scripts selection/focus polish.
807         https://bugs.webkit.org/show_bug.cgi?id=82732
808
809         Reviewed by Pavel Feldman.
810
811         Script could be selected by space in ScriptsNavigator now.
812         This patch also polishes focus behavior when using ScriptsNavigator.
813
814         * inspector/front-end/ScriptsNavigator.js:
815         (WebInspector.ScriptsNavigator.prototype._scriptSelected): Added focusSource param to give clients possibility to release focus.
816         (WebInspector.NavigatorScriptTreeElement.prototype.onspace): Added script selection on space pressed.
817         (WebInspector.NavigatorScriptTreeElement.prototype._onclick):
818         (WebInspector.NavigatorScriptTreeElement.prototype.onenter):
819         * inspector/front-end/ScriptsPanel.js: _hideNavigatorOverlay moved to the end of events processing to set focus correctly.
820         (WebInspector.ScriptsPanel.prototype._editorSelected):
821         (WebInspector.ScriptsPanel.prototype._fileSelected):
822         (WebInspector.ScriptsPanel.prototype._hideNavigatorOverlay):
823         * inspector/front-end/treeoutline.js:
824         (TreeOutline.prototype._treeKeyDown): onspace event added.
825
826 2012-03-30  Mike Reed  <reed@google.com>
827
828         remove unneeded copies of SkPaths, remove unneeded save/restore
829         https://bugs.webkit.org/show_bug.cgi?id=82641
830
831         Reviewed by Stephen White.
832
833         Performance change, existing webkit tests apply.
834
835         * platform/graphics/skia/GraphicsContextSkia.cpp:
836         (WebCore::GraphicsContext::clipOut):
837         (WebCore::GraphicsContext::clipPath):
838         (WebCore::GraphicsContext::fillPath):
839         (WebCore::GraphicsContext::fillRect):
840         (WebCore::GraphicsContext::strokePath):
841
842 2012-03-30  Pavel Feldman  <pfeldman@chromium.org>
843
844         Web Inspector: undo-ing edit that consists of a Tab does not work.
845         https://bugs.webkit.org/show_bug.cgi?id=82733
846
847         Reviewed by Vsevolod Vlasov.
848
849         We should never modify the range returned by the edit operation manually.
850         And we should clone ranges that get into the model so that subsequent edits
851         don't mutate them.
852
853         Drive-by: restore selection after undo via selecting all the text that undo
854         operation produced.
855
856         Test: inspector/editor/text-editor-undo-redo.html
857
858         * inspector/front-end/TextEditorModel.js:
859         (WebInspector.TextEditorModel.endsWithBracketRegex.):
860         * inspector/front-end/TextViewer.js:
861
862 2012-03-30  Malcolm MacLeod  <malcolm.macleod@tshwanedje.com>
863
864         [wx] Implement Gradient and ImageBuffer support.
865         https://bugs.webkit.org/show_bug.cgi?id=82710
866
867         Reviewed by Kevin Ollivier.
868
869         * platform/graphics/BitmapImage.h:
870         (BitmapImage):
871         (WebCore::BitmapImage::create):
872         * platform/graphics/Gradient.h:
873         * platform/graphics/wx/GradientWx.cpp:
874         (WebCore::Gradient::platformDestroy):
875         (WebCore::Gradient::platformGradient):
876         (WebCore::Gradient::fill):
877         * platform/graphics/wx/ImageBufferDataWx.h:
878         (ImageBufferData):
879         * platform/graphics/wx/ImageBufferWx.cpp:
880         (WebCore):
881         (WebCore::ImageBufferData::ImageBufferData):
882         (WebCore::ImageBufferData::~ImageBufferData):
883         (WebCore::ImageBuffer::ImageBuffer):
884         (WebCore::ImageBuffer::~ImageBuffer):
885         (WebCore::ImageBuffer::context):
886         (WebCore::ImageBuffer::toDataURL):
887         (WebCore::ImageBuffer::copyImage):
888         (WebCore::ImageBuffer::clip):
889         (WebCore::ImageBuffer::draw):
890         (WebCore::ImageBuffer::drawPattern):
891         * platform/graphics/wx/ImageWx.cpp:
892         (WebCore::BitmapImage::BitmapImage):
893         (WebCore):
894         (WebCore::BitmapImage::draw):
895         * platform/wx/LocalDC.h:
896         (WebCore):
897
898 2012-03-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
899
900         [Qt] Find zoomable area using area-based hit-testing
901         https://bugs.webkit.org/show_bug.cgi?id=82609
902
903         Reviewed by Kenneth Rohde Christiansen.
904
905         Implement API for calculating the best zoomable area for a
906         tap-to-zoom gesture.
907         It picks the area with the largest intersection with the touch. In most
908         cases this will be all areas fully containing the area, and returns the
909         smallest inner-most of these.
910
911         * page/EventHandler.cpp:
912         (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
913         * page/EventHandler.h:
914         * page/TouchAdjustment.cpp:
915         (WebCore::TouchAdjustment::nodeIsZoomTarget):
916         (WebCore::TouchAdjustment::appendZoomableSubtargets):
917         (WebCore::TouchAdjustment::compileZoomableSubtargets):
918         (WebCore::TouchAdjustment::areaOfIntersection):
919         (WebCore::TouchAdjustment::findAreaWithLargestIntersection):
920         (WebCore::findBestZoomableArea):
921         * page/TouchAdjustment.h:
922         * platform/graphics/IntSize.h:
923         (WebCore::IntSize::area):
924
925 2012-03-30  Pavel Feldman  <pfeldman@chromium.org>
926
927         Web Inspector: do not issue attributes modified event if actual values were not changed.
928         https://bugs.webkit.org/show_bug.cgi?id=82726
929
930         Reviewed by Yury Semikhatsky.
931
932         When style attribute is invalidated, we re-fetch the attributes values. There is no
933         point in further dispatching attrs modified event if model stays the same.
934
935         Test: inspector/elements/edit-style-attribute.html
936
937         * inspector/front-end/DOMAgent.js:
938         (WebInspector.DOMNode.prototype._setAttributesPayload):
939         (WebInspector.DOMAgent.prototype._loadNodeAttributes):
940
941 2012-03-30  Philip Rogers  <pdr@google.com>
942
943         Add new renderer for circles and ellipses
944         https://bugs.webkit.org/show_bug.cgi?id=80423
945
946         Reviewed by Eric Seidel.
947
948         This patch introduces a special renderer for SVGCircleElements
949         and SVGEllipseElements to avoid having to use the slower path
950         rendering code. This patch includes optimized circle code for
951         the CG platform, and hooks (GC::fillEllipse, GC::strokeEllipse)
952         are available for other platforms as well.
953
954         Tests: svg/hittest/svg-ellipse-non-scale-stroke.xhtml
955                svg/hittest/svg-ellipse.xhtml
956
957         Added a test to exercise hit testing on an ellipse, and on
958         an ellipse's stroke, to make sure the formulae in this patch
959         are correct.
960
961         * CMakeLists.txt:
962         * GNUmakefile.list.am:
963         * Target.pri:
964         * WebCore.gypi:
965         * WebCore.vcproj/WebCore.vcproj:
966         * WebCore.xcodeproj/project.pbxproj:
967         * platform/graphics/GraphicsContext.cpp:
968         (WebCore::GraphicsContext::fillEllipse):
969         (WebCore):
970         (WebCore::GraphicsContext::strokeEllipse):
971         (WebCore::GraphicsContext::fillEllipseAsPath):
972         (WebCore::GraphicsContext::strokeEllipseAsPath):
973         (WebCore::GraphicsContext::platformFillEllipse):
974         (WebCore::GraphicsContext::platformStrokeEllipse):
975         * platform/graphics/GraphicsContext.h:
976         (GraphicsContext):
977         * platform/graphics/cg/GraphicsContextCG.cpp:
978         (WebCore::GraphicsContext::platformFillEllipse):
979         (WebCore):
980         (WebCore::GraphicsContext::platformStrokeEllipse):
981         * platform/graphics/skia/GraphicsContextSkia.cpp:
982         (WebCore::GraphicsContext::platformFillEllipse):
983         (WebCore):
984         (WebCore::GraphicsContext::platformStrokeEllipse):
985         * rendering/svg/RenderSVGAllInOne.cpp:
986         * rendering/svg/RenderSVGEllipse.cpp: Added.
987         (WebCore):
988         (WebCore::RenderSVGEllipse::RenderSVGEllipse):
989         (WebCore::RenderSVGEllipse::~RenderSVGEllipse):
990         (WebCore::RenderSVGEllipse::createShape):
991         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
992         (WebCore::RenderSVGEllipse::objectBoundingBox):
993         (WebCore::RenderSVGEllipse::strokeBoundingBox):
994         (WebCore::RenderSVGEllipse::fillShape):
995         (WebCore::RenderSVGEllipse::strokeShape):
996         (WebCore::RenderSVGEllipse::shapeDependentStrokeContains):
997         (WebCore::RenderSVGEllipse::shapeDependentFillContains):
998         * rendering/svg/RenderSVGEllipse.h: Added.
999         (WebCore):
1000         (RenderSVGEllipse):
1001         (WebCore::RenderSVGEllipse::isSVGEllipse):
1002         (WebCore::RenderSVGEllipse::renderName):
1003         (WebCore::RenderSVGEllipse::isEmpty):
1004         * svg/SVGCircleElement.cpp:
1005         (WebCore::SVGCircleElement::svgAttributeChanged):
1006         (WebCore):
1007         (WebCore::SVGCircleElement::createRenderer):
1008         * svg/SVGCircleElement.h:
1009         (SVGCircleElement):
1010         * svg/SVGEllipseElement.cpp:
1011         (WebCore::SVGEllipseElement::svgAttributeChanged):
1012         (WebCore::SVGEllipseElement::createRenderer):
1013         (WebCore):
1014         * svg/SVGEllipseElement.h:
1015         (SVGEllipseElement):
1016
1017 2012-03-30  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1018
1019         Add a "preview" state to Page Visibility API implementation
1020         https://bugs.webkit.org/show_bug.cgi?id=81355
1021
1022         Reviewed by Adam Barth.
1023
1024         Updating the Page Visibility API implementation to the current spec version.
1025
1026         This change is covered by fast/events/page-visibility-transition-test.html,
1027         so no new tests needed.
1028
1029         * page/PageVisibilityState.cpp:
1030         (WebCore::pageVisibilityStateString):
1031         * page/PageVisibilityState.h:
1032
1033 2012-03-30  Vsevolod Vlasov  <vsevik@chromium.org>
1034
1035         Web Inspector: [Regression] Execution line is not revealed after pretty print.
1036         https://bugs.webkit.org/show_bug.cgi?id=82727
1037
1038         Reviewed by Pavel Feldman.
1039
1040         This patch makes JavaScriptSourceFrame reveal execution line after pretty print.
1041
1042         * inspector/front-end/JavaScriptSourceFrame.js:
1043         (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine):
1044
1045 2012-03-30  Yury Semikhatsky  <yurys@chromium.org>
1046
1047         Web Inspector: preload field values into local variables for better heap profiler performance
1048         https://bugs.webkit.org/show_bug.cgi?id=82703
1049
1050         Reading from object fields takes a noticable time when the only other thing you do
1051         is just manipulating on big(several million elements) Uint32Array array cells.
1052
1053         Reviewed by Pavel Feldman.
1054
1055         * inspector/front-end/HeapSnapshot.js:
1056         (WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray):
1057         (WebInspector.HeapSnapshot.prototype._buildRetainers):
1058         (WebInspector.HeapSnapshot.prototype._bfs):
1059
1060 2012-03-30  Sheriff Bot  <webkit.review.bot@gmail.com>
1061
1062         Unreviewed, rolling out r112489.
1063         http://trac.webkit.org/changeset/112489
1064         https://bugs.webkit.org/show_bug.cgi?id=82725
1065
1066         Tentatively introduces a lot of webfont-related test flakiness
1067         on Snow Leopard (Requested by apavlov on #webkit).
1068
1069         * css/CSSSegmentedFontFace.cpp:
1070         (WebCore::CSSSegmentedFontFace::getFontData):
1071
1072 2012-03-30  Keishi Hattori  <keishi@webkit.org>
1073
1074         Change ENABLE_INPUT_COLOR to ENABLE_INPUT_TYPE_COLOR and enable it for chromium
1075         https://bugs.webkit.org/show_bug.cgi?id=80972
1076
1077         Reviewed by Kent Tamura.
1078
1079         * CMakeLists.txt:
1080         * Configurations/FeatureDefines.xcconfig:
1081         * GNUmakefile.am:
1082         * WebCore.exp.in:
1083         * css/html.css:
1084         * html/ColorInputType.cpp:
1085         * html/ColorInputType.h:
1086         * html/HTMLInputElement.cpp:
1087         (WebCore):
1088         * html/HTMLInputElement.h:
1089         (HTMLInputElement):
1090         * html/InputType.cpp:
1091         (WebCore::createInputTypeFactoryMap):
1092         (WebCore):
1093         (InputTypeNames):
1094         * html/InputType.h:
1095         (InputType):
1096         (InputTypeNames):
1097         * loader/EmptyClients.h:
1098         (EmptyChromeClient):
1099         * page/Chrome.cpp:
1100         (WebCore):
1101         * page/Chrome.h:
1102         (WebCore):
1103         (Chrome):
1104         * page/ChromeClient.h:
1105         (WebCore):
1106         (ChromeClient):
1107         * platform/ColorChooser.h:
1108         * platform/ColorChooserClient.h:
1109         * testing/InternalSettings.cpp:
1110         * testing/Internals.cpp:
1111         (WebCore):
1112         * testing/Internals.h:
1113         (Internals):
1114         * testing/Internals.idl:
1115
1116 2012-03-30  Charles Wei  <charles.wei@torchmobile.com.cn>
1117
1118         [BlackBerry] EventLoop::platformInit() obsolete.
1119         https://bugs.webkit.org/show_bug.cgi?id=82709
1120
1121         Reviewed by Rob Buis.
1122
1123         No new tests, build fix for BlackBerry porting.
1124
1125         * platform/blackberry/EventLoopBlackBerry.cpp:
1126
1127 2012-03-30  Vsevolod Vlasov  <vsevik@chromium.org>
1128
1129         Web Inspector: ScriptsNavigator should open scripts with single click (not double click).
1130         https://bugs.webkit.org/show_bug.cgi?id=82723
1131
1132         Reviewed by Pavel Feldman.
1133
1134         This patch makes ScriptsNavigator open scripts with single click.
1135
1136         * inspector/front-end/ScriptsNavigator.js:
1137         (WebInspector.NavigatorScriptTreeElement.prototype.onattach):
1138         (WebInspector.NavigatorScriptTreeElement.prototype._onclick):
1139
1140 2012-03-30  Vineet Chaudhary  <rgf748@motorola.com>
1141
1142         IDLParser.pm should be able to parse sequence<T> as method argument.
1143         https://bugs.webkit.org/show_bug.cgi?id=82599
1144
1145         Reviewed by Kentaro Hara.
1146
1147         With this patch IDL parser should support sequence<T> as method argument.
1148         Current behaviour is argument name is not parsed hence shows empty spaces instead.
1149
1150         Tests: bindings/scripts/test/TestObj.idl
1151
1152         * bindings/scripts/CodeGeneratorCPP.pm:
1153         (SkipFunction): Skip functions for specific type.
1154         (SkipAttribute): Skip functions for specific type.
1155         (AddIncludesForType): Skip header for sequence<T> type.
1156         (GenerateHeader): Skip header and declaration for sequence<T> type.
1157         (GenerateImplementation): Skip header and implementation for sequence<T> type.
1158         * bindings/scripts/CodeGeneratorGObject.pm:
1159         (SkipFunction): Skip functions for sequence<T> type.
1160         * bindings/scripts/CodeGeneratorObjC.pm:
1161         (SkipFunction): Skip functions for specific type.
1162         (SkipAttribute): Skip functions for specific type.
1163         (AddForwardDeclarationsForType): Skip header for sequence<T> type.
1164         (AddIncludesForType): Skip header for sequence<T> type.
1165         (GenerateHeader):Skip header and declaration for sequence<T> type.
1166         (GenerateImplementation): Skip header and implementation for sequence<T> type.
1167         * bindings/scripts/CodeGeneratorV8.pm:
1168         (CreateCustomSignature): Add appropriate headers.
1169         * bindings/scripts/IDLStructure.pm: Add support to parse sequence<T>.
1170         * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Modified results from run-binding-tests.
1171         (WebDOMTestObj::objMethodWithArgs):
1172         * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
1173         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
1174         (webkit_dom_test_obj_obj_method_with_args):
1175         * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
1176         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
1177         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
1178         * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
1179         * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
1180         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
1181         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
1182         (WebCore::TestObjInternal::methodWithSequenceArgCallback):
1183         (WebCore::ConfigureV8TestObjTemplate):
1184
1185 2012-03-30  Pavel Feldman  <pfeldman@chromium.org>
1186
1187         Web Inspector: editing resets line-ending of the whole file
1188         https://bugs.webkit.org/show_bug.cgi?id=82708
1189
1190         Reviewed by Yury Semikhatsky.
1191
1192         This change splits TextEditorModel's setText into setText (for initialization) and
1193         editRange (for editing). Distinguishing between the two allowed properly detecting
1194         the preferred line endings.
1195
1196         Test: inspector/editor/text-editor-line-breaks.html
1197
1198         * inspector/front-end/JavaScriptSourceFrame.js:
1199         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
1200         * inspector/front-end/SourceFrame.js:
1201         (WebInspector.SourceFrame.prototype.setContent):
1202         * inspector/front-end/TextEditorModel.js:
1203         (WebInspector.TextEditorCommand):
1204         (WebInspector.TextEditorModel):
1205         (WebInspector.TextEditorModel.endsWithBracketRegex.):
1206         * inspector/front-end/TextViewer.js:
1207         (WebInspector.TextViewer.prototype._textChanged):
1208         (WebInspector.TextEditorMainPanel.prototype._unindentLines.get var):
1209         (WebInspector.TextEditorMainPanel.prototype._unindentLines):
1210         (WebInspector.TextEditorMainPanel.prototype.handleEnterKey.get var):
1211         (WebInspector.TextEditorMainPanel.prototype.handleEnterKey):
1212         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
1213         (WebInspector.TextEditorMainPanel.prototype._editRange):
1214
1215 2012-03-29  Vsevolod Vlasov  <vsevik@chromium.org>
1216
1217         Web Inspector: Take IndexedDB support out of experiments.
1218         https://bugs.webkit.org/show_bug.cgi?id=82635
1219
1220         Reviewed by Pavel Feldman.
1221
1222         This patch takes inspector IndexedDB support out of experiments and enables tests.
1223
1224         Test: http/tests/inspector/indexeddb/resources-panel.html
1225
1226         * inspector/front-end/ResourcesPanel.js:
1227         * inspector/front-end/Settings.js:
1228         (WebInspector.ExperimentsSettings):
1229
1230 2012-03-30  Patrick Gansterer  <paroga@webkit.org>
1231
1232         Build fix after r112482.
1233
1234         * platform/network/cf/FormDataStreamCFNet.h: Added missing forward decleration.
1235
1236 2012-03-30  Philippe Normand  <pnormand@igalia.com>
1237
1238         [GTK] WebAudio channelSize issue
1239         https://bugs.webkit.org/show_bug.cgi?id=81905
1240
1241         Reviewed by Martin Robinson.
1242
1243         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1244         (WebCore::AudioFileReader::handleBuffer): Calculate the audio
1245         buffer duration and frames number from the buffer and caps instead
1246         of relying on the buffer offets that are not always correctly set
1247         depending on the audio file format.
1248
1249 2012-03-29  Alexandru Chiculita  <achicu@adobe.com>
1250
1251         [CSS Filters] Trigger a repaint on elements with changed filter
1252         https://bugs.webkit.org/show_bug.cgi?id=82521
1253
1254         Reviewed by Dean Jackson.
1255
1256         I've added ContextSensitivePropertyFilter and changed RenderStyle::diff to use it when
1257         the filter property is changed. In RenderObject::adjustStyleDifference the appropriate StyleDifferenceRepaintLayer
1258         or StyleDifferenceRecompositeLayer is used depending on whether the layer is painting filters in software or in hardware
1259         (composited).
1260
1261         Tests: css3/filters/filter-change-repaint-composited.html
1262                css3/filters/filter-change-repaint.html
1263
1264         * css/CSSStyleSelector.cpp:
1265         (WebCore::CSSStyleSelector::createFilterOperations): None was treated as an invalid value.
1266         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Shadows were remaining behind. Fixed that.
1267         (PlatformCALayer::setFilters):
1268         * rendering/RenderBoxModelObject.cpp:
1269         (WebCore::RenderBoxModelObject::styleWillChange): Repaint the layer when there is a layout change and a filter change.
1270         * rendering/RenderLayer.cpp:
1271         (WebCore::RenderLayer::styleChanged): Making sure that the backing store is repainted when filters fallback to hardware.
1272         * rendering/RenderObject.cpp:
1273         (WebCore::RenderObject::adjustStyleDifference):
1274         * rendering/style/RenderStyle.cpp:
1275         (WebCore::RenderStyle::diff):
1276         * rendering/style/RenderStyleConstants.h:
1277
1278 2012-03-29  Koji Ishii  <kojiishi@gmail.com>
1279
1280
1281         Vertical flow support for OpenType fonts with the least platform dependencies
1282         https://bugs.webkit.org/show_bug.cgi?id=81326
1283
1284         Reviewed by Dan Bernstein.
1285
1286         This patch introduces a new class OpenTypeVerticalData to read
1287         vertical font metrics from OpenType fonts.
1288
1289         Currently, WebKit relies on platform APIs to do the work. However,
1290         some platforms such as Windows lack support for all the capabilities
1291         WebKit requires for vertical flow and the text-orientation property
1292         to work correctly. Reading OpenType tables directly also gives
1293         benefits in consistent behavior among the WebKit platforms.
1294
1295         This patch is for any platforms that want to parse OpenType tables
1296         directly, but it's currently included only in CGWin and isn't on any
1297         code path even on CGWin yet. Caller's side change for CGWin and
1298         support for other platforms will be in separate bugs.
1299
1300         No new tests are required. No behavior changes.
1301
1302         * WebCore.vcproj/WebCore.vcproj: Added OpenTypeTypes.h and OpenTypeVerticalData.h/cpp.
1303         * platform/SharedBuffer.cpp: Add create(size_t)
1304         (WebCore::SharedBuffer::SharedBuffer):
1305         (WebCore):
1306         * platform/SharedBuffer.h: Add create(size_t)
1307         (WebCore::SharedBuffer::create):
1308         (SharedBuffer):
1309         * platform/graphics/FontPlatformData.h: Added openTypeTable().
1310         (WebCore):
1311         (FontPlatformData):
1312         * platform/graphics/SimpleFontData.h: Added sizePerUnit().
1313         (WebCore::SimpleFontData::sizePerUnit): size() / unitsPerEm() for less multiplication.
1314         * platform/graphics/opentype/OpenTypeTypes.h: Added OpenType basic type definitions.
1315         (OpenType):
1316         (WebCore::OpenType::BigEndianShort::operator short):
1317         (WebCore::OpenType::BigEndianShort::BigEndianShort):
1318         (BigEndianShort):
1319         (WebCore::OpenType::BigEndianUShort::operator unsigned short):
1320         (WebCore::OpenType::BigEndianUShort::BigEndianUShort):
1321         (BigEndianUShort):
1322         (WebCore::OpenType::BigEndianLong::operator int):
1323         (WebCore::OpenType::BigEndianLong::BigEndianLong):
1324         (BigEndianLong):
1325         (WebCore::OpenType::BigEndianULong::operator unsigned):
1326         (WebCore::OpenType::BigEndianULong::BigEndianULong):
1327         (BigEndianULong):
1328         * platform/graphics/opentype/OpenTypeVerticalData.cpp: Added.
1329         (OpenType):
1330         (HheaTable):
1331         (VheaTable):
1332         (Entry):
1333         (VORGTable):
1334         (VertOriginYMetrics):
1335         (WebCore::OpenType::VORGTable::requiredSize):
1336         (WebCore):
1337         (WebCore::validatedPtr):
1338         (WebCore::OpenTypeVerticalData::OpenTypeVerticalData):
1339         (WebCore::OpenTypeVerticalData::advanceHeight): Advance height for a glyph.
1340         (WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs): Vertical origin.
1341         * platform/graphics/opentype/OpenTypeVerticalData.h: Added.
1342         (WebCore):
1343         (OpenTypeVerticalData): A new class to handle vertical flow data in OpenType.
1344         (WebCore::OpenTypeVerticalData::isOpenType):
1345         (WebCore::OpenTypeVerticalData::hasVerticalMetrics):
1346         (WebCore::OpenTypeVerticalData::hasVORG):
1347         * platform/graphics/win/FontPlatformDataWin.cpp:
1348         (WebCore):
1349         (WebCore::FontPlatformData::openTypeTable): Implemented openTypeTable() for Win32.
1350
1351 2012-03-29  Leo Yang  <leo.yang@torchmobile.com.cn>
1352
1353         [BlackBerry] Sync up PlatformMouseEvent
1354         https://bugs.webkit.org/show_bug.cgi?id=82567
1355
1356         Reviewed by Rob Buis.
1357
1358         This patch is adding blackberry specific members to PlatformMouseEvent.
1359         Also re-base PlatformMouseEventBlackBerry to adapt to the re-factor
1360         of PlatformMouseEvent.
1361
1362         * platform/PlatformMouseEvent.h:
1363         (PlatformMouseEvent): BlackBerry specific constructor.
1364         (WebCore::PlatformMouseEvent::inputMethod): Input source of mouse event
1365         for blackberry platform.
1366         * platform/blackberry/PlatformMouseEventBlackBerry.cpp:
1367         (WebCore::PlatformMouseEvent::PlatformMouseEvent): Re-base the constructor
1368         to adapt the re-factor of PlatformMouseEvent.
1369
1370 2012-03-29  Leo Yang  <leo.yang@torchmobile.com.cn>
1371
1372         [BlackBerry] Turn on STORE_FONT_CUSTOM_PLATFORM_DATA in CachedFont.cpp
1373         https://bugs.webkit.org/show_bug.cgi?id=82573
1374
1375         Reviewed by Rob Buis.
1376
1377         Tests: covered by existing tests.
1378
1379         * loader/cache/CachedFont.cpp:
1380
1381 2012-03-29  Adam Barth  <abarth@webkit.org>
1382
1383         [Chromium] Attempt to fix the component build
1384         https://bugs.webkit.org/show_bug.cgi?id=82676
1385
1386         Reviewed by Dirk Pranke.
1387
1388         Now that we're implementing some of the WEBKIT_EXPORT symbols in
1389         WebCore/platform/chromium/support, we need to tell the build system
1390         that we want to actually export these symbols.
1391
1392         * WebCore.gyp/WebCore.gyp:
1393
1394 2012-03-29  Adam Barth  <abarth@webkit.org>
1395
1396         Unreviewed, rolling out r112572.
1397         http://trac.webkit.org/changeset/112572
1398         https://bugs.webkit.org/show_bug.cgi?id=82582
1399
1400         Does not compile in Windows component build
1401
1402         * WebCore.gyp/WebCore.gyp:
1403         * WebCore.gypi:
1404
1405 2012-03-29  Adam Barth  <abarth@webkit.org>
1406
1407         Unreviewed, rolling out r112579.
1408         http://trac.webkit.org/changeset/112579
1409         https://bugs.webkit.org/show_bug.cgi?id=82657
1410
1411         Does not compile in Windows component build
1412
1413         * WebCore.gypi:
1414
1415 2012-03-29  Adam Barth  <abarth@webkit.org>
1416
1417         Unreviewed, rolling out r112611.
1418         http://trac.webkit.org/changeset/112611
1419         https://bugs.webkit.org/show_bug.cgi?id=82676
1420
1421         Does not compile in Windows component build
1422
1423         * WebCore.gyp/WebCore.gyp:
1424
1425 2012-03-29  Bear Travis  <betravis@adobe.com>
1426
1427         Update shape-inside/shape-outside CSS Exclusion properties
1428         https://bugs.webkit.org/show_bug.cgi?id=82365
1429
1430         Reviewed by Ryosuke Niwa.
1431
1432         Updating CSS property names for wrap-shape-inside and wrap-shape-outside
1433         to shape-inside and shape-outside, per the current exclusions spec.
1434         Renaming some parsing functions in CSSParser for clarity.
1435         No new functionality.
1436
1437         * css/CSSComputedStyleDeclaration.cpp:
1438         (WebCore):
1439         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1440         * css/CSSParser.cpp:
1441         (WebCore::CSSParser::parseValue):
1442         (WebCore::CSSParser::parseClipShape):
1443         (WebCore::CSSParser::parseExclusionShapeRect):
1444         (WebCore::CSSParser::parseExclusionShapeCircle):
1445         (WebCore::CSSParser::parseExclusionShapeEllipse):
1446         (WebCore::CSSParser::parseExclusionShapePolygon):
1447         (WebCore::CSSParser::parseExclusionShape):
1448         * css/CSSParser.h:
1449         * css/CSSProperty.cpp:
1450         (WebCore::CSSProperty::isInheritedProperty):
1451         * css/CSSPropertyNames.in:
1452         * css/CSSStyleSelector.cpp:
1453         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1454
1455 2012-03-29  Ryan Sleevi  <rsleevi@chromium.org>
1456
1457         [chromium] Update paths in GYP files
1458         https://bugs.webkit.org/show_bug.cgi?id=82663
1459
1460         Reviewed by Adam Barth.
1461
1462         * WebCore.gypi:
1463         Remove PluginDataGtk.cpp following r112401
1464
1465 2012-03-29  Abhishek Arya  <inferno@chromium.org>
1466
1467         Crash in GenericEventQueue::~GenericEventQueue.
1468         https://bugs.webkit.org/show_bug.cgi?id=81976
1469
1470         Reviewed by Eric Carlson.
1471
1472         * dom/GenericEventQueue.cpp:
1473         (WebCore::GenericEventQueue::create):
1474         (WebCore):
1475         (WebCore::GenericEventQueue::GenericEventQueue):
1476         (WebCore::GenericEventQueue::enqueueEvent):
1477         (WebCore::GenericEventQueue::timerFired):
1478         * dom/GenericEventQueue.h:
1479         (GenericEventQueue):
1480         * html/HTMLMediaElement.cpp:
1481         (WebCore::HTMLMediaElement::HTMLMediaElement):
1482         (WebCore::HTMLMediaElement::scheduleEvent):
1483         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
1484         (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
1485         (WebCore::HTMLMediaElement::hasPendingActivity):
1486         * html/HTMLMediaElement.h:
1487         (HTMLMediaElement):
1488
1489 2012-03-29  Adam Barth  <abarth@webkit.org>
1490
1491         [Chromium] Attempt to fix the component build
1492         https://bugs.webkit.org/show_bug.cgi?id=82676
1493
1494         Unreviewed.
1495
1496         Now that we're implementing some of the WEBKIT_EXPORT symbols in
1497         WebCore/platform/chromium/support, we need to tell the build system
1498         that we want to actually export these symbols.
1499
1500         * WebCore.gyp/WebCore.gyp:
1501
1502 2012-03-29  Nate Chapin  <japhet@chromium.org>
1503
1504         Simplify reporting a main resource error to DocumentLoader and
1505         FrameLoader.
1506         https://bugs.webkit.org/show_bug.cgi?id=82649
1507
1508         Reviewed by Adam Barth.
1509
1510         No new tests, no functionality change intended.
1511
1512         * loader/DocumentLoader.cpp:
1513         (WebCore::DocumentLoader::mainReceivedError): Remove isComplete parameter,
1514             since it was always true. Call FrameLoader::receivedMainResourceError,
1515             instead of the other way around.
1516         * loader/DocumentLoader.h:
1517         * loader/FrameLoader.cpp:
1518         (WebCore::FrameLoader::receivedMainResourceError): Remove isComplete parameter,
1519             since it was always true. Merge in most of mainReceivedCompleteError().
1520         * loader/FrameLoader.h:
1521         * loader/MainResourceLoader.cpp:
1522         (WebCore::MainResourceLoader::receivedError):
1523         (WebCore::MainResourceLoader::didCancel):
1524
1525 2012-03-28  Jer Noble  <jer.noble@apple.com>
1526
1527         Heap-use-after-free in WebCore::InlineFlowBox::deleteLine due to fullscreen issues.
1528         https://bugs.webkit.org/show_bug.cgi?id=82055
1529
1530         Reviewed by David Hyatt.
1531
1532         No new tests; fixes fuzz test crasher which is not reproducible in DRT or WKTR.
1533
1534         When a RenderFullScreen object is inserted between a child and parent renderer, make sure the
1535         parent renderer deletes its line boxes by calling setNeedsLayoutAndPrefWidthsRecalc().  This
1536         forces its InlineBox renderers to be removed from the line boxes and their parents in the correct
1537         order, fixing a double-delete crash.
1538
1539         The same is true when unwrapping the RenderFullScreen object, and when creating and inserting
1540         the full screen placeholder.
1541
1542         * rendering/RenderFullScreen.cpp:
1543         (RenderFullScreen::wrapRenderer):
1544         (RenderFullScreen::unwrapRenderer):
1545         (RenderFullScreen::createPlaceholder):
1546
1547 2012-03-29  Benjamin Poulain  <bpoulain@apple.com>
1548
1549         Get rid of Geolocation::positionChangedInternal(), use positionChanged() directly
1550         https://bugs.webkit.org/show_bug.cgi?id=82543
1551
1552         Reviewed by Andreas Kling.
1553
1554         After the change to client based geolocation, the method positionChangedInternal()
1555         is called only by positionChanged(). This patch remove this extra indirection.
1556
1557         * Modules/geolocation/Geolocation.cpp:
1558         (WebCore::Geolocation::positionChanged):
1559         * Modules/geolocation/Geolocation.h:
1560         (Geolocation):
1561         * WebCore.order:
1562
1563 2012-03-29  Joseph Pecoraro  <pecoraro@apple.com>
1564
1565         InputType attribute changed functions should happen after the attribute change
1566         https://bugs.webkit.org/show_bug.cgi?id=82644
1567
1568         Reviewed by Benjamin Poulain.
1569
1570         * html/HTMLInputElement.cpp:
1571         (WebCore::HTMLInputElement::parseAttribute):
1572
1573 2012-03-29  Bear Travis  <betravis@adobe.com>
1574
1575         Update CSS Exclusion wrap-flow values left & right to start & end
1576         https://bugs.webkit.org/show_bug.cgi?id=82366
1577
1578         http://dev.w3.org/csswg/css3-exclusions/
1579         -webkit-wrap-flow now takes the values start and end rather than
1580         left and right. Updating the code to reflect this. Functionality
1581         is covered by existing tests.
1582         
1583         Reviewed by Andreas Kling.
1584
1585         * css/CSSParser.cpp:
1586         (WebCore::isValidKeywordPropertyAndValue):
1587         * css/CSSPrimitiveValueMappings.h:
1588         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1589         (WebCore::CSSPrimitiveValue::operator WrapFlow):
1590         * rendering/style/RenderStyleConstants.h:
1591
1592 2012-03-29  Dirk Pranke  <dpranke@chromium.org>
1593
1594         rollout r112484, r112545, r112574
1595         https://bugs.webkit.org/show_bug.cgi?id=82662
1596
1597         Unreviewed, build fix.
1598
1599         this appears to be producing some questionable differences on
1600         the apple mac bots, and possibly one test on chromium linux.
1601
1602         * css/mediaControls.css:
1603         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1604         * css/mediaControlsChromium.css:
1605         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1606         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
1607         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
1608         * html/shadow/MediaControlElements.cpp:
1609         (RenderMediaVolumeSliderContainer):
1610         (WebCore):
1611         (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
1612         (WebCore::RenderMediaVolumeSliderContainer::layout):
1613         (WebCore::MediaControlVolumeSliderContainerElement::createRenderer):
1614         * html/shadow/MediaControlElements.h:
1615         (MediaControlVolumeSliderContainerElement):
1616         * html/shadow/MediaControlRootElementChromium.cpp:
1617         (WebCore::MediaControlRootElementChromium::create):
1618
1619 2012-03-29  Julien Chaffraix  <jchaffraix@webkit.org>
1620
1621         REGRESSION (r110065-r110080): Content drawing outside overflow: hidden at ynet.co.il
1622         https://bugs.webkit.org/show_bug.cgi?id=82129
1623
1624         Reviewed by Ojan Vafai.
1625
1626         Tests: fast/overflow/before-after-overflow-hidden-horizontal-writing-mode-tb-expected.html
1627                fast/overflow/before-after-overflow-hidden-horizontal-writing-mode-tb.html
1628                fast/overflow/before-after-overflow-hidden-vertical-writing-mode-rl-expected.html
1629                fast/overflow/before-after-overflow-hidden-vertical-writing-mode-rl.html
1630                fast/overflow/start-end-overflow-hidden-horizontal-writing-mode-tb-expected.html
1631                fast/overflow/start-end-overflow-hidden-horizontal-writing-mode-tb.html
1632                fast/overflow/start-end-overflow-hidden-vertical-writing-mode-rl-expected.html
1633                fast/overflow/start-end-overflow-hidden-vertical-writing-mode-rl.html
1634
1635         This is a regression from r110072. I wrongly thought we should call ensureLayer if we create our RenderOverflow.
1636         However the current overflow code removes the before and start overflows (like in horizontal writing mode with ltr direction,
1637         we never have a top or a left overflow). Because of that we would not get a RenderLayer as expected and the overflow clip rects
1638         would be wrong on our RenderLayer children.
1639
1640         * rendering/RenderBox.cpp:
1641         (WebCore::RenderBox::addLayoutOverflow):
1642         Moved the ensureLayer() call after the check that we do have some overflow but before we remove the overflow in some directions.
1643
1644 2012-03-29  Adam Barth  <abarth@webkit.org>
1645
1646         [Chromium] Move ResourceHandle to WebCore/platform/network/chromium
1647         https://bugs.webkit.org/show_bug.cgi?id=82657
1648
1649         Reviewed by James Robinson.
1650
1651         We finally arive at our destination. This patch actually moves
1652         WebCore::ResourceHandle from Source/WebKit/chromium/src to
1653         Source/WebCore/network/chromium, matching its location in other ports.
1654         To make this happen, we also need to move WrappedResourceRequest and
1655         WrappedResourceResponse.
1656
1657         This patch is the last patch from
1658         https://github.com/abarth/webkit/compare/master...webcore-platform
1659
1660         * WebCore.gypi:
1661         * platform/chromium/support/WrappedResourceRequest.h: Copied from Source/WebKit/chromium/src/WrappedResourceRequest.h.
1662         * platform/chromium/support/WrappedResourceResponse.h: Copied from Source/WebKit/chromium/src/WrappedResourceResponse.h.
1663         * platform/network/chromium/ResourceHandle.cpp: Copied from Source/WebKit/chromium/src/ResourceHandle.cpp.
1664         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1665         (WebCore::ResourceHandleInternal::start):
1666         (WebCore::ResourceHandle::loadResourceSynchronously):
1667         (WebCore::ResourceHandle::cacheMetadata):
1668         * platform/network/chromium/ResourceHandleInternal.h: Copied from Source/WebKit/chromium/src/ResourceHandleInternal.h.
1669
1670 2012-03-29  Patrick Gansterer  <paroga@webkit.org>
1671
1672         Build fix for WinCE after r112555.
1673
1674         * platform/text/wince/TextCodecWinCE.cpp:
1675         (WebCore::LanguageManager::LanguageManager):
1676
1677 2012-03-29  Anders Carlsson  <andersca@apple.com>
1678
1679         Images that reload via media queries don't paint when device scale factor changes
1680         https://bugs.webkit.org/show_bug.cgi?id=82648
1681         <rdar://problem/11143637>
1682
1683         Reviewed by Beth Dakin.
1684
1685         Commit scale factor changes before dirty rect changes, since setting the scale factor
1686         can lead to more rects being dirtied when using the tile cache.
1687
1688         * platform/graphics/ca/GraphicsLayerCA.cpp:
1689         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1690
1691 2012-03-29  Adam Barth  <abarth@webkit.org>
1692
1693         Move CPP files related to ResourceHandle to WebCore/platform
1694         https://bugs.webkit.org/show_bug.cgi?id=82582
1695
1696         Reviewed by James Robinson.
1697
1698         This patch moves a number of files that implement parts of the platform
1699         portion of the Chromium WebKit API from the WebKit layer to
1700         WebCore/platform. These files are in the dependency cone of
1701         ResourceHandle and have no dependencies on anything outside
1702         WebCore/platform.
1703
1704         * WebCore.gyp/WebCore.gyp:
1705         * WebCore.gypi:
1706         * platform/chromium/support: Added.
1707         * platform/chromium/support/WebData.cpp: Copied from Source/WebKit/chromium/src/WebData.cpp.
1708         * platform/chromium/support/WebHTTPBody.cpp: Copied from Source/WebKit/chromium/src/WebHTTPBody.cpp.
1709         * platform/chromium/support/WebHTTPLoadInfo.cpp: Copied from Source/WebKit/chromium/src/WebHTTPLoadInfo.cpp.
1710         * platform/chromium/support/WebURL.cpp: Copied from Source/WebKit/chromium/src/WebURL.cpp.
1711         * platform/chromium/support/WebURLError.cpp: Copied from Source/WebKit/chromium/src/WebURLError.cpp.
1712         * platform/chromium/support/WebURLRequest.cpp: Copied from Source/WebKit/chromium/src/WebURLRequest.cpp.
1713         * platform/chromium/support/WebURLRequestPrivate.h: Copied from Source/WebKit/chromium/src/WebURLRequestPrivate.h.
1714         * platform/chromium/support/WebURLResponse.cpp: Copied from Source/WebKit/chromium/src/WebURLResponse.cpp.
1715         * platform/chromium/support/WebURLResponsePrivate.h: Copied from Source/WebKit/chromium/src/WebURLResponsePrivate.h.
1716
1717 2012-03-29  Michal Mocny  <mmocny@google.com>
1718
1719         [chromium] Ensure framebuffer exists at the start of beginDrawingFrame.
1720         https://bugs.webkit.org/show_bug.cgi?id=82569
1721
1722         Reviewed by James Robinson.
1723
1724         Updated LayerRendererChromiumTest unittests.
1725
1726         * platform/graphics/chromium/LayerRendererChromium.cpp:
1727         (WebCore::LayerRendererChromium::setVisible):
1728         (WebCore::LayerRendererChromium::beginDrawingFrame):
1729         * platform/graphics/chromium/LayerRendererChromium.h:
1730         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1731         (WebCore::CCSingleThreadProxy::compositeAndReadback):
1732         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1733         (WebCore::CCThreadProxy::compositeAndReadback):
1734         (WebCore::CCThreadProxy::requestReadbackOnImplThread):
1735
1736 2012-03-29  Ryosuke Niwa  <rniwa@webkit.org>
1737
1738         Add a compile assert for the size of RenderBlock
1739         https://bugs.webkit.org/show_bug.cgi?id=82586
1740
1741         Reviewed by Tony Chang.
1742         
1743         Add compile asserts for the size of RenderBlock and RenderBlock::MarginValues.
1744         We can't add asserts for FloatingObject and MarginInfo because they're private to RenderBlock.
1745
1746         * rendering/RenderBlock.cpp:
1747         (SameSizeAsRenderBlock):
1748         (WebCore):
1749         (WebCore::RenderBlock::addOverflowFromFloats):
1750         (WebCore::RenderBlock::repaintOverhangingFloats):
1751         (WebCore::RenderBlock::paintFloats):
1752         (WebCore::RenderBlock::insertFloatingObject):
1753         (WebCore::RenderBlock::clearFloats):
1754         (WebCore::RenderBlock::addOverhangingFloats):
1755         (WebCore::RenderBlock::addIntrudingFloats):
1756         (WebCore::RenderBlock::hitTestFloats):
1757         (WebCore::RenderBlock::adjustForBorderFit):
1758         * rendering/RenderBlock.h:
1759         (WebCore::RenderBlock::FloatingObject::shouldPaint):
1760         (WebCore::RenderBlock::FloatingObject::setShouldPaint):
1761         (WebCore::RenderBlock::FloatingObject::isDescendant):
1762         (WebCore::RenderBlock::FloatingObject::setIsDescendant):
1763         (FloatingObject):
1764         (RenderBlock):
1765
1766 2012-03-29  Gavin Barraclough  <barraclough@apple.com>
1767
1768         Template the Yarr::Interpreter on the character type
1769         https://bugs.webkit.org/show_bug.cgi?id=82637
1770
1771         Reviewed by Sam Weinig.
1772
1773         We should be able to call to the interpreter after having already checked the character type,
1774         without having to re-package the character pointer back up into a string!
1775
1776         * inspector/ContentSearchUtils.cpp:
1777         (WebCore::ContentSearchUtils::findMagicComment):
1778         * platform/text/RegularExpression.cpp:
1779         (WebCore::RegularExpression::match):
1780             - Don't pass length.
1781
1782 2012-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1783
1784         Unreviewed, rolling out r112553.
1785         http://trac.webkit.org/changeset/112553
1786         https://bugs.webkit.org/show_bug.cgi?id=82638
1787
1788         It made all tests crash on Qt WK2 (Requested by Ossy_away on
1789         #webkit).
1790
1791         * Modules/geolocation/Geolocation.cpp:
1792         (WebCore::Geolocation::stop):
1793         (WebCore::Geolocation::lastPosition):
1794         (WebCore::Geolocation::requestPermission):
1795         (WebCore::Geolocation::startUpdating):
1796         (WebCore::Geolocation::stopUpdating):
1797         * Modules/geolocation/Geolocation.h:
1798         (WebCore):
1799         * Modules/geolocation/GeolocationController.cpp:
1800         * Modules/geolocation/GeolocationController.h:
1801         * WebCore.exp.in:
1802         * page/GeolocationClient.h:
1803         (WebCore):
1804         (GeolocationClient):
1805         * page/Page.cpp:
1806         (WebCore::Page::Page):
1807         (WebCore::Page::PageClients::PageClients):
1808         * page/Page.h:
1809         (WebCore):
1810         (PageClients):
1811         (Page):
1812         (WebCore::Page::geolocationController):
1813
1814 2012-03-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1815
1816         HashMap<>::add should return a more descriptive object
1817         https://bugs.webkit.org/show_bug.cgi?id=71063
1818
1819         Reviewed by Ryosuke Niwa.
1820
1821         Update code to use AddResult instead of a pair. No new tests, just a refactoring.
1822
1823         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
1824         (WebCore::SQLTransactionCoordinator::acquireLock):
1825         * Modules/webdatabase/chromium/QuotaTracker.cpp:
1826         (WebCore::QuotaTracker::updateDatabaseSize):
1827         * bindings/js/DOMObjectHashTableMap.h:
1828         (WebCore::DOMObjectHashTableMap::get):
1829         * bindings/js/JSDOMBinding.cpp:
1830         (WebCore::cacheDOMStructure):
1831         * bindings/js/JSDOMBinding.h:
1832         (WebCore::cacheWrapper):
1833         * bindings/js/JSDOMGlobalObject.h:
1834         (WebCore::getDOMConstructor):
1835         * bindings/js/PageScriptDebugServer.cpp:
1836         (WebCore::PageScriptDebugServer::addListener):
1837         * bindings/js/ScriptDebugServer.cpp:
1838         (WebCore::ScriptDebugServer::setBreakpoint):
1839         * bindings/js/SerializedScriptValue.cpp:
1840         (WebCore::CloneSerializer::startObjectInternal):
1841         (WebCore::CloneSerializer::write):
1842         * bindings/v8/NPV8Object.cpp:
1843         (WebCore::npCreateV8ScriptObject):
1844         * bridge/IdentifierRep.cpp:
1845         (WebCore::IdentifierRep::get):
1846         * bridge/NP_jsobject.cpp:
1847         (ObjectMap::add):
1848         * css/CSSComputedStyleDeclaration.cpp:
1849         (WebCore::logUnimplementedPropertyID):
1850         * css/CSSFontFaceSource.cpp:
1851         (WebCore::CSSFontFaceSource::getFontData):
1852         * css/CSSFontSelector.cpp:
1853         (WebCore::CSSFontSelector::addFontFaceRule):
1854         (WebCore::CSSFontSelector::getFontData):
1855         * css/CSSSegmentedFontFace.cpp:
1856         (WebCore::CSSSegmentedFontFace::getFontData):
1857         * css/CSSStyleApplyProperty.cpp:
1858         (WebCore::ApplyPropertyCounter::applyInheritValue):
1859         (WebCore::ApplyPropertyCounter::applyValue):
1860         * css/CSSStyleSelector.cpp:
1861         (WebCore::CSSStyleSelector::appendAuthorStylesheets):
1862         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1863         * css/CSSValuePool.cpp:
1864         (WebCore::CSSValuePool::createIdentifierValue):
1865         (WebCore::CSSValuePool::createColorValue):
1866         (WebCore::CSSValuePool::createValue):
1867         (WebCore::CSSValuePool::createFontFamilyValue):
1868         (WebCore::CSSValuePool::createFontFaceValue):
1869         * dom/CheckedRadioButtons.cpp:
1870         (WebCore::RadioButtonGroup::add):
1871         (WebCore::CheckedRadioButtons::addButton):
1872         * dom/ChildListMutationScope.cpp:
1873         (WebCore::ChildListMutationScope::MutationAccumulationRouter::incrementScopingLevel):
1874         * dom/Document.cpp:
1875         (WebCore::Document::windowNamedItems):
1876         (WebCore::Document::documentNamedItems):
1877         (WebCore::Document::getCSSCanvasElement):
1878         (WebCore::Document::getItems):
1879         * dom/DocumentEventQueue.cpp:
1880         (WebCore::DocumentEventQueue::enqueueEvent):
1881         (WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent):
1882         (WebCore::DocumentEventQueue::pendingEventTimerFired):
1883         * dom/DocumentOrderedMap.cpp:
1884         (WebCore::DocumentOrderedMap::add):
1885         * dom/EventListenerMap.cpp:
1886         (WebCore::EventListenerMap::add):
1887         * dom/Node.cpp:
1888         (WebCore::Node::dumpStatistics):
1889         (WebCore::Node::getElementsByTagName):
1890         (WebCore::Node::getElementsByTagNameNS):
1891         (WebCore::Node::getElementsByName):
1892         (WebCore::Node::getElementsByClassName):
1893         (WebCore::Node::collectMatchingObserversForMutation):
1894         * dom/QualifiedName.cpp:
1895         (WebCore::QualifiedName::init):
1896         * dom/SpaceSplitString.cpp:
1897         (WebCore::SpaceSplitStringData::create):
1898         * dom/StyledElement.cpp:
1899         (WebCore::StyledElement::updateAttributeStyle):
1900         * html/HTMLCollection.cpp:
1901         (WebCore::HTMLCollection::append):
1902         * inspector/DOMPatchSupport.cpp:
1903         (WebCore::DOMPatchSupport::diff):
1904         * inspector/InspectorCSSAgent.cpp:
1905         (WebCore::SelectorProfile::commitSelector):
1906         * inspector/InspectorDOMAgent.cpp:
1907         (WebCore::InspectorDOMAgent::performSearch):
1908         * inspector/InspectorDebuggerAgent.cpp:
1909         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
1910         * inspector/InspectorValues.h:
1911         (WebCore::InspectorObject::setValue):
1912         (WebCore::InspectorObject::setObject):
1913         (WebCore::InspectorObject::setArray):
1914         * loader/appcache/ApplicationCacheGroup.cpp:
1915         (WebCore::ApplicationCacheGroup::addEntry):
1916         * loader/appcache/ApplicationCacheStorage.cpp:
1917         (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
1918         * page/EventHandler.cpp:
1919         (WebCore::EventHandler::handleTouchEvent):
1920         * page/PageGroup.cpp:
1921         (WebCore::PageGroup::pageGroup):
1922         (WebCore::PageGroup::addVisitedLink):
1923         (WebCore::PageGroup::addUserScriptToWorld):
1924         (WebCore::PageGroup::addUserStyleSheetToWorld):
1925         * page/SecurityPolicy.cpp:
1926         (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
1927         * page/TouchAdjustment.cpp:
1928         (WebCore::TouchAdjustment::compileSubtargetList):
1929         * platform/cf/BinaryPropertyList.cpp:
1930         (WebCore::BinaryPropertyListPlan::writeInteger):
1931         (WebCore::BinaryPropertyListPlan::writeString):
1932         (WebCore::BinaryPropertyListPlan::writeIntegerArray):
1933         * platform/graphics/blackberry/LayerTiler.cpp:
1934         (WebCore::LayerTiler::addTileJob):
1935         * platform/graphics/ca/GraphicsLayerCA.cpp:
1936         (WebCore::GraphicsLayerCA::findOrMakeClone):
1937         * platform/graphics/ca/mac/TileCache.mm:
1938         (WebCore::TileCache::revalidateTiles):
1939         * platform/graphics/ca/win/LayerChangesFlusher.cpp:
1940         (WebCore::LayerChangesFlusher::flushPendingLayerChangesSoon):
1941         * platform/graphics/chromium/FontUtilsChromiumWin.cpp:
1942         (WebCore::getDerivedFontData):
1943         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
1944         (WebCore::CCLayerAnimationController::startAnimationsWaitingForTargetAvailability):
1945         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
1946         (WebCore::initializeATSUStyle):
1947         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
1948         (WebCore::SimpleFontData::getCFStringAttributes):
1949         * platform/graphics/mac/SimpleFontDataMac.mm:
1950         (WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
1951         * platform/graphics/wince/FontPlatformData.cpp:
1952         (WebCore::FixedSizeFontData::create):
1953         * platform/gtk/RenderThemeGtk3.cpp:
1954         (WebCore::getStyleContext):
1955         * platform/mac/ThreadCheck.mm:
1956         (WebCoreReportThreadViolation):
1957         * platform/network/HTTPHeaderMap.cpp:
1958         (WebCore::HTTPHeaderMap::add):
1959         * platform/network/HTTPHeaderMap.h:
1960         (HTTPHeaderMap):
1961         * platform/network/ResourceRequestBase.cpp:
1962         (WebCore::ResourceRequestBase::addHTTPHeaderField):
1963         * plugins/PluginDatabase.cpp:
1964         (WebCore::PluginDatabase::add):
1965         (WebCore::PluginDatabase::loadPersistentMetadataCache):
1966         * plugins/win/PluginDatabaseWin.cpp:
1967         (WebCore::PluginDatabase::getPluginPathsInDirectories):
1968         * rendering/RenderBlock.cpp:
1969         (WebCore::RenderBlock::addPercentHeightDescendant):
1970         * rendering/RenderBlockLineLayout.cpp:
1971         (WebCore::setLogicalWidthForTextRun):
1972         * rendering/RenderNamedFlowThread.cpp:
1973         (WebCore::RenderNamedFlowThread::addDependencyOnFlowThread):
1974         * rendering/RenderRegion.cpp:
1975         (WebCore::RenderRegion::setRenderBoxRegionInfo):
1976         * rendering/svg/RenderSVGResourceGradient.cpp:
1977         (WebCore::RenderSVGResourceGradient::applyResource):
1978         * rendering/svg/RenderSVGResourcePattern.cpp:
1979         (WebCore::RenderSVGResourcePattern::applyResource):
1980         * storage/StorageMap.cpp:
1981         (WebCore::StorageMap::setItem):
1982         (WebCore::StorageMap::importItem):
1983         * svg/SVGDocumentExtensions.cpp:
1984         (WebCore::SVGDocumentExtensions::addPendingResource):
1985         * xml/XMLHttpRequest.cpp:
1986         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
1987         * xml/XPathFunctions.cpp:
1988         (WebCore::XPath::FunId::evaluate):
1989         * xml/XPathPath.cpp:
1990         (WebCore::XPath::LocationPath::evaluate):
1991         * xml/XPathPredicate.cpp:
1992         (WebCore::XPath::Union::evaluate):
1993
1994 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
1995
1996         Web Inspector: improve window selection accuracy in vertical overview of timeline panel
1997         https://bugs.webkit.org/show_bug.cgi?id=82625
1998
1999         Reviewed by Vsevolod Vlasov.
2000
2001         * inspector/front-end/TimelineOverviewPane.js:
2002         (WebInspector.TimelineVerticalOverview):
2003         (WebInspector.TimelineVerticalOverview.prototype._renderBars): preserve actual padding used while rendering bars.
2004         (WebInspector.TimelineVerticalOverview.prototype.getWindowTimes): account for outer and inter-bars padding when calculating bar offsets.
2005
2006 2012-03-29  Mark Pilgrim  <pilgrim@chromium.org>
2007
2008         GEOLOCATION should be implemented as Page Supplement
2009         https://bugs.webkit.org/show_bug.cgi?id=82228
2010
2011         Reviewed by Adam Barth.
2012
2013         Geolocation now uses the Supplement interface instead of
2014         keeping an instance variable on Page. This allows us to
2015         remove all geolocation-related functions, variables, and
2016         ifdefs out of Page and into Modules/geolocation/.
2017
2018         * Modules/geolocation/Geolocation.cpp:
2019         (WebCore::Geolocation::stop):
2020         (WebCore::Geolocation::lastPosition):
2021         (WebCore::Geolocation::requestPermission):
2022         (WebCore::Geolocation::startUpdating):
2023         (WebCore::Geolocation::stopUpdating):
2024         * Modules/geolocation/Geolocation.h:
2025         (WebCore):
2026         * Modules/geolocation/GeolocationController.cpp:
2027         (WebCore::GeolocationController::supplementName):
2028         (WebCore):
2029         (WebCore::provideGeolocationTo):
2030         * Modules/geolocation/GeolocationController.h:
2031         (GeolocationController):
2032         (WebCore::GeolocationController::from):
2033         * WebCore.exp.in:
2034         * page/GeolocationClient.h:
2035         (WebCore):
2036         (GeolocationClient):
2037         * page/Page.cpp:
2038         (WebCore::Page::Page):
2039         (WebCore::Page::PageClients::PageClients):
2040         * page/Page.h:
2041         (WebCore):
2042         (PageClients):
2043         (Page):
2044
2045 2012-03-29  John Bates  <jbates@google.com>
2046
2047         Sync up WebKit TraceEvent.h with chromium trace_event.h
2048         https://bugs.webkit.org/show_bug.cgi?id=82527
2049
2050         Reviewed by James Robinson.
2051
2052         * platform/chromium/TraceEvent.h:
2053
2054 2012-03-29  Pavel Feldman  <pfeldman@chromium.org>
2055
2056         Web Inspector: subtree disapears from <iframe> after loading
2057         https://bugs.webkit.org/show_bug.cgi?id=76552
2058
2059         Reviewed by Yury Semikhatsky.
2060
2061         The problem was that content document subtree was not unbound upon iframe re-push.
2062         Upon owner element refresh content document was not sent to the frontend
2063         since backend assumed that front-end has already had the up-to-date version.
2064
2065         Test: inspector/elements/iframe-load-event.html
2066
2067         * inspector/InspectorDOMAgent.cpp:
2068         (WebCore::InspectorDOMAgent::loadEventFired):
2069
2070 2012-03-29  Dana Jansens  <danakj@chromium.org>
2071
2072         [chromium] Remove unneeded code+fixmes from CCOcclusionTracker
2073         https://bugs.webkit.org/show_bug.cgi?id=82380
2074
2075         Reviewed by Adrienne Walker.
2076
2077         The current occlusion was exposed on the occlusion tracker for the
2078         transition over to culling 2.0 which has landed, so we can remove
2079         it now. It still had one use in unit tests which is moved to a
2080         test subclass.
2081
2082         Above test subclass already existed in the occlusion tracker tests,
2083         so pulled it out to a common file CCOcclusionTrackerTestCommon.h
2084         so that other unit tests can use it to get at occlusion internals.
2085
2086         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2087         (WebCore):
2088         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
2089
2090 2012-03-29  Joseph Pecoraro  <pecoraro@apple.com>
2091
2092         <http://webkit.org/b/82558> Toggling <input type="range"> readonly or disabled state while active breaks all click events
2093
2094         Test: fast/forms/range/range-drag-when-toggled-disabled.html
2095
2096         Reviewed by Kent Tamura.
2097
2098         * html/shadow/SliderThumbElement.cpp:
2099         (WebCore::SliderThumbElement::defaultEventHandler):
2100         A slider can toggle its readonly or disabled state while in the middle
2101         of dragging, in those cases we should cancel the drag and perform cleanup.
2102
2103 2012-03-29  Adam Klein  <adamk@chromium.org>
2104
2105         Factor out common post-insertion logic in ContainerNode
2106         https://bugs.webkit.org/show_bug.cgi?id=82544
2107
2108         Reviewed by Ryosuke Niwa.
2109
2110         appendChild, insertBefore, and replaceChild all share a great deal of logic.
2111         This patch factors out the "post-insertion" logic that deals with
2112         notifying parents that their children changed and notifying children
2113         that they've been added to the tree.
2114
2115         Besides reducing code duplication, this is in preparation for moving
2116         this post-insertion notification later in the insertion process.
2117
2118         No new tests, no change in behavior.
2119
2120         * dom/ContainerNode.cpp:
2121         (WebCore):
2122         (WebCore::ContainerNode::insertBefore): Factor out shared logic, remove unnecessary "prev" variable.
2123         (WebCore::ContainerNode::replaceChild): ditto.
2124         (WebCore::ContainerNode::appendChild): ditto.
2125         (WebCore::updateTreeAfterInsertion): New helper method encapsulating shared logic.
2126
2127 2012-03-29  Tony Chang  <tony@chromium.org>
2128
2129         Need to implement flex-line-pack
2130         https://bugs.webkit.org/show_bug.cgi?id=70794
2131
2132         Reviewed by Ojan Vafai.
2133
2134         Tests: css3/flexbox/multiline-line-pack-horizontal-column.html
2135                css3/flexbox/multiline-line-pack.html
2136
2137         * rendering/RenderFlexibleBox.cpp:
2138         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
2139         (WebCore::initialLinePackingOffset): Similar to initialPackingOffset.
2140         (WebCore):
2141         (WebCore::linePackingSpaceBetweenChildren): Similar to packingSpaceBetweenChildren.
2142         (WebCore::RenderFlexibleBox::packFlexLines): Move lines based on flex-line-pack.
2143             Note that we don't need to relayout on stretch because
2144             alignChildren will do that for us (only auto size needs stretching).
2145         (WebCore::RenderFlexibleBox::flipForWrapReverse): Pull out the initial
2146             cross axis offset before calling packFlexLines because we can
2147             move the the line contexts.
2148         * rendering/RenderFlexibleBox.h:
2149
2150 2012-03-29  Vsevolod Vlasov  <vsevik@chromium.org>
2151
2152         Web Inspector: SnippetsScriptMapping should process existing snippets on load.
2153         https://bugs.webkit.org/show_bug.cgi?id=82619
2154
2155         Reviewed by Pavel Feldman.
2156
2157         SnippetsScriptMapping now loads existing snippets on creation.
2158         Otherwise scripts panel shows snippets created during current session only.
2159         Drive-by ScriptsNavigator closure compilation fix.
2160
2161         * inspector/front-end/SnippetsModel.js:
2162         (WebInspector.SnippetsModel.prototype.set get snippets):
2163         (WebInspector.SnippetsScriptMapping):
2164         (WebInspector.SnippetsScriptMapping.prototype._handleSnippetAdded):
2165         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
2166
2167 2012-03-29  Yury Semikhatsky  <yurys@chromium.org>
2168
2169         Web Inspector: check more likely condition first in HeapSnapshot._buildAggregates
2170         https://bugs.webkit.org/show_bug.cgi?id=82621
2171
2172         Reviewed by Pavel Feldman.
2173
2174         * inspector/front-end/HeapSnapshot.js: selfSize === 0 is quite rare, moving this condition
2175         to the first place saves 1 of 6 secs on the heap profiler perf test.
2176         (WebInspector.HeapSnapshot.prototype._buildAggregates):
2177         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes): root node is always the first
2178         one and is the only one that doesn't have dominator, so we may start iterating nodes from
2179         the second node and avoid additional check in the loop.
2180
2181 2012-03-29  Pavel Feldman  <pfeldman@chromium.org>
2182
2183         Web Inspector: "go to the previous panel" shortcut is painful to maintain
2184         https://bugs.webkit.org/show_bug.cgi?id=82602
2185
2186         Reviewed by Vsevolod Vlasov.
2187
2188         Present go to previous panel shortcut "Cmd - Left" is painful to support since we have
2189         more and more free flow editing capabilities (where Cmd - Left is handled by the editor).
2190         Remaping it to Cmd - Option - [ (]) /  (Ctrl - Alt - [ (]) ).
2191
2192         Drive-by: de-capitalize captions from the settings panel.
2193
2194         * English.lproj/localizedStrings.js:
2195         * inspector/front-end/ConsoleView.js:
2196         (WebInspector.ConsoleView.prototype._registerShortcuts):
2197         * inspector/front-end/InspectorView.js:
2198         (WebInspector.InspectorView.prototype._keyDown):
2199         * inspector/front-end/ScriptsPanel.js:
2200         * inspector/front-end/TimelinePanel.js:
2201         (WebInspector.TimelinePanel.prototype._registerShortcuts):
2202         (WebInspector.TimelinePanel.prototype._contextMenu):
2203         * inspector/front-end/inspector.js:
2204         (WebInspector._registerShortcuts):
2205
2206 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
2207
2208         Unreviewed, rolling out r112531.
2209         http://trac.webkit.org/changeset/112531
2210         https://bugs.webkit.org/show_bug.cgi?id=82616
2211
2212         Broke timeline overview selection
2213
2214         * inspector/front-end/TimelineOverviewPane.js:
2215         (WebInspector.TimelineOverviewWindow):
2216
2217 2012-03-28  Dirk Schulze  <krit@webkit.org>
2218
2219         Introduce CSSParserMode in all classes
2220         https://bugs.webkit.org/show_bug.cgi?id=82335
2221
2222         Reviewed by Ryosuke Niwa.
2223
2224         Introduce the new CSSParserMode enum to more classes. SVG classes make use of SVGAttributeMode for CSS parsing already.
2225         But SVGAttributeMode does not differ from CSSQuirksMode at the moment. This will change with a followup patch on bug 46112.
2226
2227         No new tests. No change of functionality. Everything gets covered by existing tests.
2228
2229         * css/CSSImportRule.cpp:
2230         (WebCore::CSSImportRule::setCSSStyleSheet):
2231         * css/CSSMediaRule.cpp:
2232         (WebCore::CSSMediaRule::insertRule):
2233         * css/CSSParser.cpp: Move private functions away from strict boolean and make use of CSSParserMode instead.
2234         (WebCore):
2235         (WebCore::parseColorValue):
2236         (WebCore::parseSimpleLengthValue):
2237         (WebCore::CSSParser::parseFontFaceValue):
2238         (WebCore::CSSParser::parseValue):
2239         (WebCore::CSSParser::parseColor):
2240         (WebCore::CSSParser::createStyleRule):
2241         (WebCore::CSSParser::createFontFaceRule):
2242         (WebCore::CSSParser::createPageRule):
2243         (WebCore::CSSParser::createKeyframeRule):
2244         * css/CSSParser.h: Removed constructor with boolean argument. We just use the CSSParserMode enum now.
2245         (CSSParser):
2246         * css/CSSParserMode.h:
2247         (strictToCSSParserMode): New helper function to convert boolean to CSSParserMode.
2248         (isStrictParserMode): Helper function that returns true if argument is CSSStrictMode.
2249         * css/CSSRule.h:
2250         (WebCore::CSSRule::cssParserMode): Renamed useStrictParsing to cssParserMode since it returns CSSParserMode instead of a boolean now.
2251         * css/CSSStyleSheet.cpp:
2252         (WebCore::CSSStyleSheet::CSSStyleSheet):
2253         (WebCore::CSSStyleSheet::insertRule):
2254         (WebCore::CSSStyleSheet::parseString):
2255         (WebCore::CSSStyleSheet::parseStringAtLine):
2256         * css/CSSStyleSheet.h:
2257         (CSSStyleSheet):
2258         (WebCore::CSSStyleSheet::setCSSParserMode): Renamed setStrictParsing to setCSSParserMode since we set an enum now.
2259         (WebCore::CSSStyleSheet::cssParserMode): Renamed useStrictParsing to cssParserMode since it returns CSSParserMode instead of a boolean now.
2260         * css/MediaList.cpp:
2261         (WebCore::MediaQuerySet::parse):
2262         (WebCore::MediaQuerySet::add):
2263         (WebCore::MediaQuerySet::remove):
2264         * css/StylePropertySet.cpp:
2265         (WebCore::StylePropertySet::StylePropertySet):
2266         (WebCore::StylePropertySet::setProperty):
2267         (WebCore::StylePropertySet::parseDeclaration):
2268         * css/StylePropertySet.h: Use unsigned member variables to store the parser mode.  
2269         (WebCore::StylePropertySet::create):
2270         (WebCore::StylePropertySet::setCSSParserMode): Renamed setStrictParsing to setCSSParserMode since we get an enum now. This gets converted to unsigned internally.
2271         (WebCore::StylePropertySet::cssParserMode): Renamed useStrictParsing to cssParserMode since it returns CSSParserMode instead of a boolean now.
2272         (StylePropertySet):
2273         * css/StyleSheet.h:
2274         (StyleSheet):
2275         * css/WebKitCSSKeyframesRule.cpp:
2276         (WebCore::WebKitCSSKeyframesRule::insertRule):
2277         * css/WebKitCSSMatrix.cpp:
2278         (WebCore::WebKitCSSMatrix::setMatrixValue):
2279         * dom/Document.cpp:
2280         (WebCore::Document::webkitGetFlowByName):
2281         (WebCore::Document::pageUserSheet):
2282         (WebCore::Document::pageGroupUserSheets):
2283         * dom/Element.cpp:
2284         (WebCore::Element::webkitMatchesSelector):
2285         * dom/ElementAttributeData.cpp:
2286         (WebCore::ElementAttributeData::ensureInlineStyle):
2287         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
2288         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
2289         * dom/Node.cpp:
2290         (WebCore::Node::querySelector):
2291         (WebCore::Node::querySelectorAll):
2292         * dom/ProcessingInstruction.cpp:
2293         (WebCore::ProcessingInstruction::parseStyleSheet):
2294         * dom/StyleElement.cpp:
2295         (WebCore::StyleElement::createSheet):
2296         * html/HTMLElement.cpp:
2297         (WebCore::StyledElement::copyNonAttributeProperties):
2298         * html/HTMLLinkElement.cpp:
2299         (WebCore::HTMLLinkElement::setCSSStyleSheet):
2300         * html/canvas/CanvasRenderingContext2D.cpp:
2301         (WebCore::CanvasRenderingContext2D::setFont):
2302         * html/shadow/ContentSelectorQuery.cpp:
2303         (WebCore::ContentSelectorQuery::ContentSelectorQuery):
2304         * inspector/InspectorStyleSheet.cpp:
2305         (WebCore::InspectorStyleSheet::reparseStyleSheet):
2306         * svg/SVGElementRareData.h:
2307         (WebCore::SVGElementRareData::ensureAnimatedSMILStyleProperties):
2308         * svg/SVGFontFaceElement.cpp:
2309         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
2310         * svg/SVGStyledElement.cpp:
2311         (WebCore::SVGStyledElement::getPresentationAttribute):
2312         * xml/XSLStyleSheet.h:
2313         (XSLStyleSheet):
2314         * xml/XSLStyleSheetLibxslt.cpp:
2315         (WebCore::XSLStyleSheet::parseString):
2316         * xml/XSLStyleSheetQt.cpp:
2317         (WebCore::XSLStyleSheet::parseString):
2318
2319 2012-03-29  Sanghyun Park  <sh919.park@samsung.com>
2320
2321         Fix the error type in JSAudioBufferSourceNodeCustom to pass layout test.
2322         https://bugs.webkit.org/show_bug.cgi?id=81639
2323
2324         Reviewed by Eric Carlson.
2325
2326         Test : LayoutTest/webaudio/audiobuffersource-channels.html
2327
2328         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
2329
2330 2012-03-29  Vsevolod Vlasov  <vsevik@chromium.org>
2331
2332         Web Inspector: Existing UISourceCode should be loaded on scripts panel creation/reset.
2333         https://bugs.webkit.org/show_bug.cgi?id=82614
2334
2335         Reviewed by Pavel Feldman.
2336
2337         UISourceCode are now loaded from DebuggerPresentationModel on scripts panel creation/reset.
2338         This is needed to show snippets that are loaded before scripts panel creation and are not removed on navigation.
2339
2340         * inspector/front-end/ScriptsPanel.js:
2341         (WebInspector.ScriptsPanel.prototype._handleUISourceCodeAdded):
2342         (WebInspector.ScriptsPanel.prototype._loadUISourceCodes):
2343         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
2344         (WebInspector.ScriptsPanel.prototype._reset):
2345         * inspector/front-end/SnippetsModel.js:
2346         (WebInspector.SnippetsScriptMapping.prototype.uiSourceCodeList):
2347
2348 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
2349
2350         Web Inspector: on a single click in Timeline overview, make a minimal selection centered around cursor
2351         https://bugs.webkit.org/show_bug.cgi?id=82616
2352
2353         Reviewed by Pavel Feldman.
2354
2355         * inspector/front-end/TimelineOverviewPane.js:
2356         (WebInspector.TimelineOverviewWindow): Explicitly handle single click on overview by creating a minimal window around cursor.
2357         (WebInspector.TimelineOverviewWindow.prototype._resizeWindowMinimum):
2358
2359 2012-03-29  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2360
2361         Unavailable pre-processor macro in non-Qt environments
2362         https://bugs.webkit.org/show_bug.cgi?id=82042
2363
2364         Reviewed by Simon Hausmann.
2365
2366         This patch removes the use of the macro QT_VERSION_CHECK() because, in
2367         non-Qt environments, the pre-processors raises an error. Instead of
2368         calling the macro to generate the version number, the version is
2369         expressed directly.
2370
2371         * platform/graphics/texmap/TextureMapperGL.cpp:
2372         (SharedGLData): remove pre-processor macro for Qt version check.
2373
2374 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
2375
2376         Web Inspector: event details popover in Timeline panel displays invalid time offset
2377         https://bugs.webkit.org/show_bug.cgi?id=82611
2378
2379         Reviewed by Pavel Feldman.
2380
2381         * inspector/front-end/TimelinePresentationModel.js:
2382         (WebInspector.TimelinePresentationModel.prototype.addRecord): use time in seconds, not raw model time for minimumRecordTime.
2383
2384 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
2385
2386         Web Inspector: use canvas to render bars in "vertical overview" mode
2387         https://bugs.webkit.org/show_bug.cgi?id=82606
2388
2389         Reviewed by Pavel Feldman.
2390
2391         * inspector/front-end/TimelineOverviewPane.js: Use canvas instead of DOM for rendering vertical overview bars.
2392         (WebInspector.TimelineVerticalOverview):
2393         (WebInspector.TimelineVerticalOverview.prototype.update):
2394         (WebInspector.TimelineVerticalOverview.prototype._renderBars):
2395         (WebInspector.TimelineVerticalOverview.prototype._renderBar):
2396         (WebInspector.TimelineVerticalOverview.prototype.getWindowTimes):
2397         * inspector/front-end/timelinePanel.css: Drop styles previously used for DOM-based vertical overview rendering.
2398         (.timeline-vertical-overview-bars):
2399
2400 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
2401
2402         Web Inspector: timeline overview window selection is not reset upon clear/record
2403         https://bugs.webkit.org/show_bug.cgi?id=82603
2404
2405         Reviewed by Pavel Feldman.
2406
2407         - TimelineOverviewPane.reset() -> _reset();
2408         - perform update() from reset();
2409         - perform reset() upon RecordsCleared event from the model.
2410
2411         * inspector/front-end/TimelineOverviewPane.js:
2412         (WebInspector.TimelineOverviewPane):
2413         (WebInspector.TimelineOverviewPane.prototype._reset):
2414         (WebInspector.TimelineVerticalOverview):
2415         (WebInspector.TimelineVerticalOverview.prototype.update):
2416         (WebInspector.TimelineVerticalOverview.prototype._renderBars):
2417         (WebInspector.TimelineVerticalOverview.prototype._renderBar):
2418         (WebInspector.TimelineVerticalOverview.prototype.getWindowTimes):
2419         * inspector/front-end/timelinePanel.css:
2420         (.timeline-vertical-overview-bars):
2421
2422 2012-03-29  Zalan Bujtas  <zbujtas@gmail.com>
2423
2424         Remove redundant updateViewportArguments() call when page is restored from page cache.
2425         https://bugs.webkit.org/show_bug.cgi?id=82500
2426
2427         Reviewed by Kenneth Rohde Christiansen.
2428
2429         Document::updateViewportArguments() is called twice, while restoring a page from page cache.
2430         First, it is called when the document is set on the mainframe and later, it is called
2431         when page cache finished the restoration. Since viewport arguments don't change between
2432         the 2 calls, it's safe to remove the second.
2433
2434         Manual test added. Viewport value updates heavily depend on UI process code.
2435
2436         * dom/Document.cpp:
2437         (WebCore::Document::documentDidResumeFromPageCache):
2438
2439 2012-03-29  Charles Wei  <charles.wei@torchmobile.com.cn>
2440
2441         [BlackBerry] Add Internal test support for blackberry porting.
2442         https://bugs.webkit.org/show_bug.cgi?id=82597
2443
2444         Reviewed by Rob Buis.
2445
2446         No new tests, just the build system enhancement for BlackBerry porting.
2447
2448         * UseJSC.cmake:
2449
2450 2012-03-28  Yury Semikhatsky  <yurys@chromium.org>
2451
2452         Web Inspector: switch heap profiler front-end to separate storage of nodes and edges
2453         https://bugs.webkit.org/show_bug.cgi?id=82453
2454
2455         When heap snapshot is completely loaded move nodes and containment edges
2456         into two separate arrays. This way we don't need _nodeIndex and _nodePosition
2457         maps to go from node offset inside the raw snapshot to its index and back, instead
2458         we may just divide node offset by the number of node fields to get node index. After
2459         the nodes and containment edges are separated original array (_nodes) is dropped.
2460         All front-end code was switched to the new representation.
2461
2462         Reviewed by Pavel Feldman.
2463
2464         * inspector/front-end/HeapSnapshot.js:
2465         (WebInspector.HeapSnapshotRetainerEdge):
2466         (WebInspector.HeapSnapshotRetainerEdge.prototype.clone):
2467         (WebInspector.HeapSnapshotRetainerEdge.prototype.set edgeIndex):
2468         (WebInspector.HeapSnapshotRetainerEdge.prototype.get _edge):
2469         (WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.hasNext):
2470         (WebInspector.HeapSnapshotNode.prototype.get edgesCount):
2471         (WebInspector.HeapSnapshotNode.prototype.get rawEdges):
2472         (WebInspector.HeapSnapshotNode.prototype.get retainers):
2473         (WebInspector.HeapSnapshotNode.prototype.get _nodes):
2474         (WebInspector.HeapSnapshotNode.prototype._firstEdgeIndex):
2475         (WebInspector.HeapSnapshotNode.prototype._afterLastEdgeIndex):
2476         (WebInspector.HeapSnapshotNode.prototype.get _nextNodeIndex):
2477         (WebInspector.HeapSnapshot.prototype._init):
2478         (WebInspector.HeapSnapshot.prototype._splitNodesAndContainmentEdges):
2479         (WebInspector.HeapSnapshot.prototype._createOnlyNodesArray):
2480         (WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray):
2481         (WebInspector.HeapSnapshot.prototype._buildRetainers):
2482         (WebInspector.HeapSnapshot.prototype.dispose):
2483         (WebInspector.HeapSnapshot.prototype.get maxNodeId):
2484         (WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance):
2485         (WebInspector.HeapSnapshot.prototype._bfs):
2486         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
2487         (WebInspector.HeapSnapshot.prototype._getDominatedIndex):
2488         (WebInspector.HeapSnapshot.prototype._markInvisibleEdges):
2489         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
2490
2491 2012-03-29  Leo Yang  <leo.yang@torchmobile.com.cn>
2492
2493         [BlackBerry] Add m_targetType to WorkerScriptLoader
2494         https://bugs.webkit.org/show_bug.cgi?id=82574
2495
2496         Reviewed by Rob Buis.
2497
2498         Just as Chromium porting blackberry porting is using m_targetType also.
2499
2500         * workers/WorkerScriptLoader.h:
2501         (WorkerScriptLoader):
2502
2503 2012-03-29  Robin Cao  <robin.cao@torchmobile.com.cn>
2504
2505         [BlackBerry] Add an empty implementation of GraphicsContext3D::setErrorMessageCallback
2506         https://bugs.webkit.org/show_bug.cgi?id=82570
2507
2508         Reviewed by Rob Buis.
2509
2510         No new tests, no change in functionality.
2511
2512         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
2513         (WebCore::GraphicsContext3D::setErrorMessageCallback): Add an empty implementation.
2514         (WebCore):
2515
2516 2012-03-29  Robin Cao  <robin.cao@torchmobile.com.cn>
2517
2518         [BlackBerry] Clean up ImageBufferData
2519         https://bugs.webkit.org/show_bug.cgi?id=82444
2520
2521         Reviewed by Rob Buis.
2522
2523         No behavior changes, no new tests.
2524
2525         * platform/graphics/blackberry/skia/ImageBufferDataSkia.h:
2526         (ImageBufferData): Remove unused member variable m_buffer and change the type
2527         of m_platformLayer from LayerWebKitThread to CanvasLayerWebKitThread.
2528
2529 2012-03-28  Antti Koivisto  <antti@apple.com>
2530
2531         Split WebKitCSSKeyframeRule into internal and CSSOM types 
2532         https://bugs.webkit.org/show_bug.cgi?id=82490 
2533
2534         Reviewed by Andreas Kling.
2535
2536         WebKitCSSKeyframeRule is a CSSOM type and should not be used internally.
2537         
2538         - Add StyleKeyframe as the internal data structure for keyframes.
2539         - WebKitCSSKeyframeRule becomes a wrapper for StyleKeyframe.
2540         - Use StyleKeyframe internally so WebKitCSSKeyframeRules are created on CSSOM access only.
2541
2542         * css/CSSGrammar.y:
2543         
2544             Use StyleKeyframes instead of WebKitCSSKeyframeRules.
2545         
2546         * css/CSSMediaRule.h:
2547         (CSSMediaRule):
2548         (WebCore::CSSMediaRule::length):
2549         (WebCore::CSSMediaRule::item):
2550         
2551             Adapt to LiveCSSRuleList changes.
2552         
2553         * css/CSSParser.cpp:
2554         (WebCore::CSSParser::parseKeyframeRule):
2555         (WebCore::CSSParser::createKeyframe):
2556         * css/CSSParser.h:        
2557         (WebCore):
2558         (CSSParser):
2559         
2560             Construct StyleKeyframes.
2561         
2562         * css/CSSRuleList.h:
2563         (WebCore::LiveCSSRuleList::length):
2564         (WebCore::LiveCSSRuleList::item):
2565
2566             Make LiveCSSRuleList call rule item()/length() to avoid accessor duplication.
2567     
2568         * css/CSSStyleSelector.cpp:
2569         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2570         * css/CSSStyleSelector.h:
2571         (CSSStyleSelector):
2572         * css/WebKitCSSKeyframeRule.cpp:
2573         
2574             Use StyleKeyframe.
2575             Make 0% and 100% keyframes static.
2576         
2577         (WebCore):
2578         (WebCore::StyleKeyframe::setProperties):
2579         (WebCore::StyleKeyframe::parseKeyString):
2580         (WebCore::StyleKeyframe::cssText):
2581         (WebCore::WebKitCSSKeyframeRule::WebKitCSSKeyframeRule):
2582         (WebCore::WebKitCSSKeyframeRule::~WebKitCSSKeyframeRule):
2583         (WebCore::WebKitCSSKeyframeRule::style):
2584         * css/WebKitCSSKeyframeRule.h:
2585         (WebCore):
2586         (WebCore::StyleKeyframe::create):
2587         (WebCore::StyleKeyframe::keyText):
2588         (WebCore::StyleKeyframe::setKeyText):
2589         (StyleKeyframe):
2590         (WebCore::StyleKeyframe::properties):
2591         (WebCore::StyleKeyframe::StyleKeyframe):
2592         (WebKitCSSKeyframeRule):
2593         (WebCore::WebKitCSSKeyframeRule::keyText):
2594         (WebCore::WebKitCSSKeyframeRule::setKeyText):
2595         (WebCore::WebKitCSSKeyframeRule::cssText):
2596         
2597             Split to internal and CSSOM wrapper type. The wrapper refs StyleKeyframe. 
2598         
2599         * css/WebKitCSSKeyframesRule.cpp:
2600         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
2601         (WebCore::WebKitCSSKeyframesRule::parserAppendKeyframe):
2602         (WebCore::WebKitCSSKeyframesRule::insertRule):
2603         (WebCore::WebKitCSSKeyframesRule::deleteRule):
2604         (WebCore::WebKitCSSKeyframesRule::findRule):
2605         (WebCore::WebKitCSSKeyframesRule::findKeyframeIndex):
2606         (WebCore::WebKitCSSKeyframesRule::cssText):
2607         (WebCore):
2608         (WebCore::WebKitCSSKeyframesRule::item):
2609         * css/WebKitCSSKeyframesRule.h:
2610         (WebCore):
2611         (WebCore::WebKitCSSKeyframesRule::keyframes):
2612         (WebKitCSSKeyframesRule):
2613         (WebCore::WebKitCSSKeyframesRule::length):
2614         
2615             Keep StyleKeyframes and the wrappers (WebKitCSSKeyframeRules) in separate vectors.
2616             Construct the wrapper vector and wrappers themselves on demand.
2617             Keep the vectors in sync during mutations.
2618         
2619         * css/WebKitCSSRegionRule.h:
2620         
2621             Adapt to LiveCSSRuleList changes.
2622
2623 2012-03-29  Zeno Albisser  <zeno@webkit.org>
2624
2625         Fieldset disabled attribute does not work.
2626         https://bugs.webkit.org/show_bug.cgi?id=58837
2627
2628         Make HTMLFormControlElements inherit the disabled state
2629         from HTMLFieldSetElement ancestors. Subordinates of the
2630         first HTMLLegendElement in a fieldset will never be disabled.
2631
2632         Patch by Zeno Albisser <zeno@webkit.org>
2633
2634         Test: fast/forms/fieldset-disabled.html
2635
2636         Reviewed by Kent Tamura.
2637
2638         * html/HTMLFieldSetElement.cpp:
2639         (WebCore::HTMLFieldSetElement::disabledAttributeChanged):
2640         (WebCore):
2641         (WebCore::HTMLFieldSetElement::legend):
2642         * html/HTMLFieldSetElement.h:
2643         (HTMLFieldSetElement):
2644         * html/HTMLFieldSetElement.idl:
2645         * html/HTMLFormControlElement.cpp:
2646         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2647         (WebCore::HTMLFormControlElement::updateFieldSetAndLegendAncestor):
2648         (WebCore):
2649         (WebCore::HTMLFormControlElement::parseAttribute):
2650         (WebCore::HTMLFormControlElement::disabledAttributeChanged):
2651         (WebCore::HTMLFormControlElement::removedFromTree):
2652         (WebCore::HTMLFormControlElement::disabled):
2653         * html/HTMLFormControlElement.h:
2654         (WebCore):
2655         (HTMLFormControlElement):
2656
2657 2012-03-29  Tommy Widenflycht  <tommyw@google.com>
2658
2659         MediaStream API: Adding two missing release() calls to PeerConnection00.cpp
2660         https://bugs.webkit.org/show_bug.cgi?id=82584
2661
2662         Reviewed by Adam Barth.
2663
2664         No changes that affects functionality.
2665
2666         * Modules/mediastream/PeerConnection00.cpp:
2667         (WebCore::PeerConnection00::createOffer):
2668         (WebCore::PeerConnection00::createAnswer):
2669
2670 2012-03-29  Ryosuke Niwa  <rniwa@webkit.org>
2671
2672         Pack bitfields in InlineBox for Windows
2673         https://bugs.webkit.org/show_bug.cgi?id=82578
2674
2675         Reviewed by Kent Tamura.
2676
2677         Unlike gcc and clang, MSVC pads each consecutive member variables of the same type in bitfields. e.g. if you have:
2678         sturct AB {
2679         unsigned m_1 : 31;
2680         bool m_2 : 1;
2681         }
2682         then MSVC pads m_1 and allocates sizeof(unsigned) * 2 for AB whereas gcc and clang only allocate
2683         sizeof(unsigned) * 1 for AB.
2684
2685         Fixed the bug by packing all bitfields in InlineBox into InlineBoxBitfields and always using either unsigned or int.
2686
2687         * rendering/EllipsisBox.cpp:
2688         (WebCore::EllipsisBox::paint):
2689         (WebCore::EllipsisBox::selectionRect):
2690         (WebCore::EllipsisBox::nodeAtPoint):
2691         * rendering/InlineBox.cpp:
2692         (WebCore):
2693         (SameSizeAsInlineBox):
2694         (WebCore::InlineBox::logicalHeight):
2695         (WebCore::InlineBox::baselinePosition): Moved from the header file since it's a virtual function.
2696         (WebCore::InlineBox::lineHeight): Ditto.
2697         (WebCore::InlineBox::deleteLine):
2698         (WebCore::InlineBox::extractLine):
2699         (WebCore::InlineBox::attachLine):
2700         (WebCore::InlineBox::nextOnLineExists):
2701         (WebCore::InlineBox::clearKnownToHaveNoOverflow):
2702         * rendering/InlineBox.h:
2703         (WebCore::InlineBox::InlineBox):
2704         (WebCore::InlineBox::isText):
2705         (WebCore::InlineBox::setIsText):
2706         (WebCore::InlineBox::hasVirtualLogicalHeight):
2707         (WebCore::InlineBox::setHasVirtualLogicalHeight):
2708         (WebCore::InlineBox::isHorizontal):
2709         (WebCore::InlineBox::setIsHorizontal):
2710         (WebCore::InlineBox::isConstructed):
2711         (WebCore::InlineBox::setConstructed):
2712         (WebCore::InlineBox::setExtracted):
2713         (WebCore::InlineBox::setFirstLineStyleBit):
2714         (WebCore::InlineBox::isFirstLineStyle):
2715         (InlineBox):
2716         (WebCore::InlineBox::bidiLevel):
2717         (WebCore::InlineBox::setBidiLevel):
2718         (WebCore::InlineBox::direction):
2719         (WebCore::InlineBox::isDirty):
2720         (WebCore::InlineBox::markDirty):
2721         (WebCore::InlineBox::expansion):
2722         (WebCore::InlineBox::verticalAlign):
2723         (WebCore::InlineBox::knownToHaveNoOverflow):
2724         (WebCore::InlineBox::dirOverride):
2725         (WebCore::InlineBox::setDirOverride):
2726         (InlineBoxBitfields):
2727         (WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields):
2728         (WebCore::InlineBox::InlineBoxBitfields::bidiEmbeddingLevel):
2729         (WebCore::InlineBox::InlineBoxBitfields::setBidiEmbeddingLevel):
2730         (WebCore::InlineBox::InlineBoxBitfields::determinedIfNextOnLineExists):
2731         (WebCore::InlineBox::InlineBoxBitfields::setDeterminedIfNextOnLineExists):
2732         (WebCore::InlineBox::InlineBoxBitfields::nextOnLineExists):
2733         (WebCore::InlineBox::InlineBoxBitfields::setNextOnLineExists):
2734         (WebCore::InlineBox::InlineBoxBitfields::expansion):
2735         (WebCore::InlineBox::InlineBoxBitfields::setExpansion):
2736         (WebCore::InlineBox::endsWithBreak):
2737         (WebCore::InlineBox::setEndsWithBreak):
2738         (WebCore::InlineBox::hasEllipsisBox):
2739         (WebCore::InlineBox::hasSelectedChildren):
2740         (WebCore::InlineBox::setHasSelectedChildren):
2741         (WebCore::InlineBox::setHasEllipsisBox):
2742         (WebCore::InlineBox::hasHyphen):
2743         (WebCore::InlineBox::setHasHyphen):
2744         (WebCore::InlineBox::canHaveLeadingExpansion):
2745         (WebCore::InlineBox::setCanHaveLeadingExpansion):
2746         (WebCore::InlineBox::setExpansion):
2747         (WebCore::InlineBox::extracted):
2748         * rendering/InlineFlowBox.cpp:
2749         (WebCore::InlineFlowBox::addToLine):
2750         (WebCore::InlineFlowBox::removeChild):
2751         (WebCore::InlineFlowBox::extractLine):
2752         (WebCore::InlineFlowBox::attachLine):
2753         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
2754         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
2755         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2756         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
2757         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
2758         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
2759         (WebCore::InlineFlowBox::paintBoxDecorations):
2760         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
2761         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
2762         * rendering/InlineTextBox.cpp:
2763         (WebCore::InlineTextBox::destroy):
2764         (WebCore::InlineTextBox::logicalOverflowRect):
2765         (WebCore::InlineTextBox::setLogicalOverflowRect):
2766         (WebCore::InlineTextBox::baselinePosition):
2767         (WebCore::InlineTextBox::lineHeight):
2768         (WebCore::InlineTextBox::localSelectionRect):
2769         (WebCore::InlineTextBox::extractLine):
2770         (WebCore::InlineTextBox::attachLine):
2771         (WebCore::InlineTextBox::placeEllipsisBox):
2772         (WebCore::InlineTextBox::paint):
2773         (WebCore::InlineTextBox::paintDecoration):
2774         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
2775         (WebCore::InlineTextBox::paintCompositionUnderline):
2776         (WebCore::InlineTextBox::offsetForPosition):
2777         (WebCore::InlineTextBox::positionForOffset):
2778         (WebCore::InlineTextBox::constructTextRun):
2779         * rendering/InlineTextBox.h:
2780         (InlineTextBox):
2781         (WebCore::InlineTextBox::setExpansion):
2782         (WebCore::InlineTextBox::expansionBehavior):
2783         * rendering/RenderBlockLineLayout.cpp:
2784         (WebCore::RenderBlock::constructLine):
2785         * rendering/RenderTreeAsText.cpp:
2786         (WebCore::writeTextRun):
2787         * rendering/RootInlineBox.cpp:
2788         (WebCore::RootInlineBox::baselinePosition): Moved from the header file since it's a virtual function.
2789         (WebCore::RootInlineBox::lineHeight): Ditto.
2790         (WebCore::RootInlineBox::paint):
2791         (WebCore::RootInlineBox::ascentAndDescentForBox):
2792         (WebCore::RootInlineBox::verticalPositionForBox):
2793         * rendering/RootInlineBox.h:
2794         (RootInlineBox):
2795         * rendering/svg/SVGInlineTextBox.cpp:
2796         (WebCore::SVGInlineTextBox::constructTextRun):
2797         * rendering/svg/SVGRenderTreeAsText.cpp:
2798         (WebCore::writeSVGInlineTextBox):
2799
2800 2012-03-29  hayato@chromium.org  <hayato@chromium.org>
2801
2802         Let focus navigation be compliant with Shadow DOM spec.
2803         https://bugs.webkit.org/show_bug.cgi?id=78588
2804
2805         Reviewed by Dimitri Glazkov.
2806
2807         Re-landing r112500. Fixed an assertion failure on ReifiedTreeTraversal.
2808
2809         Sequential focus navigation now behaves exactly as specified in the Shadow DOM spec.
2810
2811         According to the Shadow DOM spec:
2812         The shadow DOM navigation order sequence is inserted into the document navigation order:
2813         1. immediately after the shadow host, if the shadow host is focusable; or
2814         2. in place of the shadow host as if the shadow host were assigned the value of auto for determining its position.
2815
2816         Prior to this patch, sequential focus navigation goes into Shadow DOM, but it is incomplete
2817         since insertion points, such as <content> elements or <shadow> elements, are not resolved at all.
2818         Now focus navigation can traverse shadow DOM subtrees in 'reified tree order', resolving lower boundaries transparently.
2819
2820         Implementation notes:
2821         Prior to this patch, sequential focus navigation does not go into Shadow DOM if a shadow host is non-focusable.
2822         Now focus navigation must go into Shadow DOM subtrees even if a show host is not focusable as described in 2).
2823         To support this behavior, this patch introduced adjustedTabIndex() locally in FocusController so that
2824         it does not skip a non-focusable shadow host in current focus scope.
2825         After finding a *pseudo* focusable element in current focus scope, it tries to resolve a focused element recursively,
2826         considering a nested focus scope inside of a shadow host or iframe.
2827         To traverse Shadow DOM subtrees, a FocusController makes use of ReifiedTreeTraversal APIs, which was introduced in r112055.
2828
2829         This change does not affect an existing behavior if a shadow dom is not involved.
2830
2831         Test: fast/dom/shadow/focus-navigation.html
2832
2833         * dom/Element.cpp:
2834         (WebCore::Element::focus):
2835         * dom/ReifiedTreeTraversal.cpp:
2836         (WebCore::ReifiedTreeTraversal::parentNodeWithoutCrossingUpperBoundary):
2837         * page/FocusController.cpp:
2838         (WebCore::isShadowHost):
2839         (WebCore):
2840         (WebCore::FocusScope::FocusScope):
2841         (WebCore::FocusScope::rootNode):
2842         (WebCore::FocusScope::owner):
2843         (WebCore::FocusScope::focusScopeOf):
2844         (WebCore::FocusScope::focusScopeOwnedByShadowHost):
2845         (WebCore::FocusScope::focusScopeOwnedByIFrame):
2846         (WebCore::hasCustomFocusLogic):
2847         (WebCore::isNonFocusableShadowHost):
2848         (WebCore::isFocusableShadowHost):
2849         (WebCore::adjustedTabIndex):
2850         (WebCore::shouldVisit):
2851         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocument):
2852         (WebCore::FocusController::advanceFocusInDocumentOrder):
2853         (WebCore::FocusController::findFocusableNodeAcrossFocusScope):
2854         (WebCore::FocusController::findFocusableNodeRecursively):
2855         (WebCore::FocusController::findFocusableNode):
2856         (WebCore::FocusController::findNodeWithExactTabIndex):
2857         (WebCore::nextNodeWithGreaterTabIndex):
2858         (WebCore::previousNodeWithLowerTabIndex):
2859         (WebCore::FocusController::nextFocusableNode):
2860         (WebCore::FocusController::previousFocusableNode):
2861         * page/FocusController.h:
2862         (WebCore):
2863         (FocusScope):
2864         (FocusController):
2865
2866 2012-03-28  Kinuko Yasuda  <kinuko@chromium.org>
2867
2868         [chromium] Add isolated filesystem type and WebDragData::filesystem_id for drag-and-drop using File/DirectoryEntry.
2869         https://bugs.webkit.org/show_bug.cgi?id=76826
2870
2871         Add two helper methods for creating isolated filesystem to the
2872         PlatformSupport interface.
2873
2874         Reviewed by David Levin.
2875
2876         No new tests: tests will be added when app-facing code is added.
2877
2878         * platform/chromium/PlatformSupport.h:
2879         (PlatformSupport):
2880
2881 2012-03-29  Vineet Chaudhary  <rgf748@motorola.com>
2882
2883         Remove custom bindings form Internals.idl of attribute type Array.
2884         https://bugs.webkit.org/show_bug.cgi?id=82319
2885
2886         Reviewed by Kentaro Hara.
2887
2888         Remove custom bindings for Array type and replace Array type with sequence<String>.
2889
2890         No new tests. LayoutTests/fast/harness/user-preferred-language.html should pass
2891         even after these changes.
2892
2893         * Target.pri: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
2894         * UseJSC.cmake: Remove JSInternalsCustom.cpp.
2895         * UseV8.cmake: Remove V8InternalsCustom.cpp.
2896         * WebCore.gypi: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
2897         * WebCore.vcproj/WebCoreTestSupport.vcproj: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
2898         * WebCore.xcodeproj/project.pbxproj: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
2899         * bindings/js/JSDOMBinding.h:
2900         (WebCore):
2901         (WebCore::jsArray): Added new specialize function template for Strings.
2902         * bindings/scripts/CodeGeneratorJS.pm:
2903         (JSValueToNative): Add jsArray<String>() to deduce return type.
2904         (NativeToJSValue): Added check for type String.
2905         * bindings/scripts/CodeGeneratorV8.pm:
2906         (JSValueToNative): Add v8Array<String>() to deduce return type.
2907         (NativeToJSValue): Added check for type String.
2908         * bindings/scripts/test/JS/JSTestObj.cpp:
2909         (WebCore::setJSTestObjSequenceAttr): Modified results from run-binding-tests.
2910         * bindings/scripts/test/V8/V8TestObj.cpp: Modified results from run-binding-tests.
2911         (WebCore::TestObjInternal::sequenceAttrAttrSetter):
2912         * bindings/v8/V8Binding.h: Added new specialize function template for Strings.
2913         (WebCore):
2914         (WebCore::v8Array):
2915         (WebCore::toNativeArray):
2916         * testing/Internals.idl: Replace Array type with sequence<String>
2917         * testing/js/JSInternalsCustom.cpp: Removed.
2918         * testing/v8/V8InternalsCustom.cpp: Removed.
2919
2920 2012-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2921
2922         Unreviewed, rolling out r112500.
2923         http://trac.webkit.org/changeset/112500
2924         https://bugs.webkit.org/show_bug.cgi?id=82576
2925
2926         assertion failed on fast/events/tab-test-not-visible-
2927         imagemap.html on gtk/qt (Requested by hayato on #webkit).
2928
2929         * dom/Element.cpp:
2930         (WebCore::Element::focus):
2931         * page/FocusController.cpp:
2932         (WebCore):
2933         (WebCore::shadowRoot):
2934         (WebCore::isTreeScopeOwner):
2935         (WebCore::FocusController::transferFocusToElementInShadowRoot):
2936         (WebCore::hasCustomFocusLogic):
2937         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocumentOrShadowRoot):
2938         (WebCore::FocusController::advanceFocusInDocumentOrder):
2939         (WebCore::ownerOfTreeScope):
2940         (WebCore::FocusController::findFocusableNodeAcrossTreeScope):
2941         (WebCore::FocusController::findFocusableNode):
2942         (WebCore::nextNodeWithExactTabIndex):
2943         (WebCore::previousNodeWithExactTabIndex):
2944         (WebCore::nextNodeWithGreaterTabIndex):
2945         (WebCore::previousNodeWithLowerTabIndex):
2946         (WebCore::FocusController::nextFocusableNode):
2947         (WebCore::FocusController::previousFocusableNode):
2948         * page/FocusController.h:
2949         (WebCore):
2950         (FocusController):
2951
2952 2012-03-28  Kent Tamura  <tkent@chromium.org>
2953
2954         Add TextFieldDecorationElement::decorate()
2955         https://bugs.webkit.org/show_bug.cgi?id=82572
2956
2957         Reviewed by Hajime Morita.
2958
2959         This change will be needed for Bug 82143.
2960         No new tests because of no behavior changes yet. This code change
2961         doesn't affect non-Chromium ports for now.
2962
2963         * dom/ShadowRoot.cpp:
2964         (WebCore::ShadowRoot::create):
2965         Remove unnecessary assertion. We should allow multiple UA shadow roots.
2966         * html/shadow/TextFieldDecorationElement.cpp:
2967         (WebCore::TextFieldDecorationElement::decorate):
2968         Added.
2969         This function adds another ShadowRoot, and it contains one flexible box container.
2970         The container contains existin ShadowRoot content and the decoration element.
2971         * html/shadow/TextFieldDecorationElement.h:
2972         (TextFieldDecorationElement): Add the declaration of decorate().
2973
2974 2012-03-28  Vineet Chaudhary  <rgf748@motorola.com>
2975
2976         Consider removal of removes jsNull()/v8::Null() from JSInternalsCustom.cpp/V8InternalsCustom.cpp
2977         https://bugs.webkit.org/show_bug.cgi?id=82442
2978
2979         Reviewed by Kentaro Hara.
2980
2981         No new tests. LayoutTests/fast/harness/user-preferred-language.html should pass
2982         even after these changes.
2983
2984         * testing/js/JSInternalsCustom.cpp: Remove jsNull() if Vector is empty.
2985         (WebCore::JSInternals::userPreferredLanguages):
2986         * testing/v8/V8InternalsCustom.cpp: Remove v8::Null() if Vector is empty.
2987         (WebCore::V8Internals::userPreferredLanguagesAccessorGetter):
2988
2989 2012-03-28  Hayato Ito  <hayato@chromium.org>
2990
2991         Let focus navigation be compliant with Shadow DOM spec.
2992         https://bugs.webkit.org/show_bug.cgi?id=78588
2993
2994         Reviewed by Dimitri Glazkov.
2995
2996         Sequential focus navigation now behaves exactly as specified in the Shadow DOM spec.
2997
2998         According to the Shadow DOM spec:
2999         The shadow DOM navigation order sequence is inserted into the document navigation order:
3000         1. immediately after the shadow host, if the shadow host is focusable; or
3001         2. in place of the shadow host as if the shadow host were assigned the value of auto for determining its position.
3002
3003         Prior to this patch, sequential focus navigation goes into Shadow DOM, but it is incomplete
3004         since insertion points, such as <content> elements or <shadow> elements, are not resolved at all.
3005         Now focus navigation can traverse shadow DOM subtrees in 'reified tree order', resolving lower boundaries transparently.
3006
3007         Implementation notes:
3008         Prior to this patch, sequential focus navigation does not go into Shadow DOM if a shadow host is non-focusable.
3009         Now focus navigation must go into Shadow DOM subtrees even if a show host is not focusable as described in 2).
3010         To support this behavior, this patch introduced adjustedTabIndex() locally in FocusController so that
3011         it does not skip a non-focusable shadow host in current focus scope.
3012         After finding a *pseudo* focusable element in current focus scope, it tries to resolve a focused element recursively,
3013         considering a nested focus scope inside of a shadow host or iframe.
3014         To traverse Shadow DOM subtrees, a FocusController makes use of ReifiedTreeTraversal APIs, which was introduced in r112055.
3015
3016         This change does not affect an existing behavior if a shadow dom is not involved.
3017
3018         Test: fast/dom/shadow/focus-navigation.html
3019
3020         * dom/Element.cpp:
3021         (WebCore::Element::focus):
3022         * page/FocusController.cpp:
3023         (WebCore::isShadowHost):
3024         (WebCore):
3025         (WebCore::FocusScope::FocusScope):
3026         (WebCore::FocusScope::rootNode):
3027         (WebCore::FocusScope::owner):
3028         (WebCore::FocusScope::focusScopeOf):
3029         (WebCore::FocusScope::focusScopeOwnedByShadowHost):
3030         (WebCore::FocusScope::focusScopeOwnedByIFrame):
3031         (WebCore::hasCustomFocusLogic):
3032         (WebCore::isNonFocusableShadowHost):
3033         (WebCore::isFocusableShadowHost):
3034         (WebCore::adjustedTabIndex):
3035         (WebCore::shouldVisit):
3036         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocument):
3037         (WebCore::FocusController::advanceFocusInDocumentOrder):
3038         (WebCore::FocusController::findFocusableNodeAcrossFocusScope):
3039         (WebCore::FocusController::findFocusableNodeRecursively):
3040         (WebCore::FocusController::findFocusableNode):
3041         (WebCore::FocusController::findNodeWithExactTabIndex):
3042         (WebCore::nextNodeWithGreaterTabIndex):
3043         (WebCore::previousNodeWithLowerTabIndex):
3044         (WebCore::FocusController::nextFocusableNode):
3045         (WebCore::FocusController::previousFocusableNode):
3046         * page/FocusController.h:
3047         (WebCore):
3048         (FocusScope):
3049         (FocusController):
3050
3051 2012-03-28  Li Yin  <li.yin@intel.com>
3052
3053         [WebSocket]Browser must fail connection if Sec-WebSocket-Protocol mismatched.
3054         https://bugs.webkit.org/show_bug.cgi?id=82307
3055
3056         Reviewed by Kent Tamura.
3057
3058         From RFC6455: http://tools.ietf.org/html/rfc6455#section-4.1
3059         If the WebSocket openhanding respond included the mismatched
3060         Sec-WebSocket-Protocol header field, the client must fail the WebSocket Connection.
3061
3062         Test: http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header.html
3063
3064         * Modules/websockets/WebSocketHandshake.cpp:
3065         (WebCore::WebSocketHandshake::checkResponseHeaders):
3066
3067 2012-03-28  Jessie Berlin  <jberlin@apple.com>
3068
3069         Fix Windows build after r112482.
3070
3071         * platform/network/cf/FormDataStreamCFNet.cpp:
3072         (WebCore::formOpen):
3073         Do not attempt to use an OS X error code on Windows. Use the POSIX errno instead.
3074
3075 2012-03-28  Alexandru Chiculita  <achicu@adobe.com>
3076
3077         [CSS Filters] Avoid rebuilding FEFilters when RenderLayer is destroyed
3078         https://bugs.webkit.org/show_bug.cgi?id=82524
3079
3080         Reviewed by Dean Jackson.
3081
3082         RenderLayer::~RenderLayer is calling clearBacking which updated the m_filter with new filters,
3083         even though they were to be deleted a couple of lines below. This change avoids updating the filters,
3084         if we are in the "destroyed" state.
3085
3086         No new tests. This change has no visible results to HTML or JavaScript, so it cannot be tested without a debugger.
3087
3088         * rendering/RenderLayer.cpp:
3089         (WebCore::RenderLayer::~RenderLayer):
3090         (WebCore::RenderLayer::clearBacking):
3091         * rendering/RenderLayer.h:
3092         (RenderLayer):
3093
3094 2012-03-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3095
3096         Remove ScriptExecutionContext from NavigatorBattery.idl
3097         https://bugs.webkit.org/show_bug.cgi?id=82556
3098
3099         Reviewed by Adam Barth.
3100
3101         As Bug 73528 comment #71, NavigatorBattery.idl doesn't need to have ScriptExecutionContext.
3102         Document can be used instead of ScriptExecutionContext.
3103
3104         Tests: batterystatus/add-listener-from-callback.html
3105                batterystatus/basic-all-types-of-events.html
3106                batterystatus/basic-operation.html
3107                batterystatus/event-after-navigation.html
3108                batterystatus/multiple-frames.html
3109                batterystatus/updates.html
3110                batterystatus/window-property.html
3111
3112         * Modules/battery/BatteryManager.cpp:
3113         (WebCore::BatteryManager::create):
3114         (WebCore::BatteryManager::BatteryManager):
3115         * Modules/battery/BatteryManager.h:
3116         (BatteryManager):
3117         * Modules/battery/NavigatorBattery.cpp:
3118         (WebCore::NavigatorBattery::webkitBattery):
3119         * Modules/battery/NavigatorBattery.h:
3120         (NavigatorBattery):
3121         * Modules/battery/NavigatorBattery.idl:
3122
3123 2012-03-28  Jason Liu  <jason.liu@torchmobile.com.cn>
3124
3125         [BlackBerry]Missing cookies from HTTP response header in Network tab of Web Inspector.
3126         https://bugs.webkit.org/show_bug.cgi?id=82041
3127
3128         We shouldn't overwrite cookies of response if there are more than one
3129         header of Set-Cookie.
3130
3131         Reviewed by Rob Buis.
3132
3133         Test: http/tests/cookies/resources/setArraycookies.php
3134
3135         * platform/network/blackberry/NetworkJob.cpp:
3136         (WebCore::NetworkJob::handleNotifyHeaderReceived):
3137
3138 2012-03-28  Noel Gordon  <noel.gordon@gmail.com>
3139
3140         JPEGImageDecoder: Set frame alpha state before marking a frame complete
3141         https://bugs.webkit.org/show_bug.cgi?id=82428
3142
3143         Reviewed by Kenneth Russell.
3144
3145         r109779 changed JPEG alpha channel handling by marking a JPEG image frame
3146         as having no alpha _after_ setting the image status frame-complete, which
3147         prevents the application of image color profiles in some WebGL cases.
3148
3149         No new tests. The application of the color profile is not guaranteed for
3150         images used as textures in WebGL. Refer to http://wkb.ug/76498.
3151
3152         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3153         (WebCore::JPEGImageDecoder::jpegComplete): Set the image frame alpha state
3154         before marking the image frame status as frame-complete.
3155
3156 2012-03-28  Emil A Eklund  <eae@chromium.org>
3157
3158         Fix rounding in RenderInline::paintOutlineForLine
3159         https://bugs.webkit.org/show_bug.cgi?id=82540
3160
3161         Reviewed by Eric Seidel.
3162
3163         No new tests, no change in functionality.
3164
3165         * rendering/RenderInline.cpp:
3166         (WebCore::RenderInline::paintOutlineForLine):
3167         Change paintOutlineForLine to pixel snap the left and right edges of the
3168         lines instead of adding the offset to an already rounded number.
3169
3170 2012-03-28  David Grogan  <dgrogan@chromium.org>
3171
3172         IndexedDB: don't expose IDBDatabaseError to script
3173         https://bugs.webkit.org/show_bug.cgi?id=82280
3174
3175         It's not used anywhere and firefox doesn't expose it.
3176
3177         Reviewed by Tony Chang.
3178
3179         Test: storage/indexeddb/removed.html
3180
3181         * CMakeLists.txt:
3182         * DerivedSources.cpp:
3183         * DerivedSources.make:
3184         * DerivedSources.pri:
3185         * GNUmakefile.list.am:
3186         * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
3187         * Modules/indexeddb/IDBDatabaseError.idl: Removed.
3188         * Modules/indexeddb/WorkerContextIndexedDatabase.idl:
3189         * WebCore.gypi:
3190         * WebCore.vcproj/WebCore.vcproj:
3191         * WebCore.xcodeproj/project.pbxproj:
3192
3193 2012-03-28  Kenichi Ishibashi  <bashi@chromium.org>
3194
3195         Respects font fallback list during webfonts are loading
3196         https://bugs.webkit.org/show_bug.cgi?id=76684
3197
3198         Reviewed by Dimitri Glazkov.
3199
3200         For layout, use the rest of the fallback list while webfonts are loading.
3201         If the webfont is loading, it will be given an invalid Unicode Range so that
3202         font selection mechansim doesn't use the webfont for layout.
3203
3204         Test: http/tests/webfont/fallback-font-while-loading.html
3205
3206         * css/CSSSegmentedFontFace.cpp:
3207         (WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading): Added.
3208         (WebCore):
3209         (WebCore::CSSSegmentedFontFace::getFontData):
3210
3211 2012-03-28  Mark Rowe  <mrowe@apple.com>
3212
3213         Update Localizable.strings.
3214
3215         * English.lproj/Localizable.strings:
3216
3217 2012-03-28  Victor Carbune  <vcarbune@adobe.com>
3218
3219         Removed particular rendering for the volume slider and used
3220         css positioning instead (simpler and less prone to errors when
3221         changes occur).
3222         https://bugs.webkit.org/show_bug.cgi?id=82150
3223
3224         Reviewed by Eric Carlson.
3225
3226         Test: media/video-controls-rendering-toggle-display-none.html
3227
3228         * css/mediaControls.css: Updated css to correctly render controls.
3229         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
3230         * css/mediaControlsChromium.css: Updated css to correctly render controls.
3231         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): 
3232         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
3233         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
3234         * html/shadow/MediaControlElements.cpp: Removed particular renderer.
3235         (WebCore):
3236         * html/shadow/MediaControlElements.h: Removed particular renderer.
3237         (MediaControlVolumeSliderContainerElement):
3238         * html/shadow/MediaControlRootElementChromium.cpp:
3239         (WebCore::MediaControlRootElementChromium::create): Added an anonymous div container
3240         for the mute button and volume slider (to be displayed on top of each other)
3241
3242 2012-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
3243
3244         Unreviewed, rolling out r110064.
3245         http://trac.webkit.org/changeset/110064
3246         https://bugs.webkit.org/show_bug.cgi?id=82537
3247
3248         The patch leaks the DOM when audio elements are used
3249         (Requested by sundiamonde on #webkit).
3250
3251         * bindings/js/JSNodeCustom.cpp:
3252         (WebCore::isReachableFromDOM):
3253
3254 2012-03-28  Alexey Proskuryakov  <ap@apple.com>
3255
3256         [Win] Some Blob tests crash in CFNetwork in advanceCurrentStream(FormStreamFields*)
3257         https://bugs.webkit.org/show_bug.cgi?id=82386
3258         <rdar://problem/11121501>
3259
3260         Reviewed by Brady Eidson.
3261
3262         Covered by existing tests.
3263
3264         * platform/network/cf/FormDataStreamCFNet.cpp:
3265         * platform/network/cf/FormDataStreamCFNet.h:
3266         Moved low level implementation from FormDataStreamMac, and exposed an additional function
3267         to implement Foundation-based API on top of this.
3268
3269         * platform/network/mac/FormDataStreamMac.h:
3270         * platform/network/mac/FormDataStreamMac.mm:
3271         Rely on toll-free bridging and implementation details to make this work without duplicating
3272         code.
3273         Note that httpBodyFromStream is confusing - I don't see how it can work when sending serialized
3274         requests across process boundary. We probably only get away with this because we don't attempt
3275         to send requests to UI process once they already have streams associated with them.
3276
3277         * WebCore.vcproj/WebCore.vcproj: Added missing platform/cf files.
3278
3279         * platform/cf/FileSystemCF.cpp: Fixed include style.
3280
3281         * platform/win/FileSystemWin.cpp: (WebCore::fileSystemRepresentation): Ifdef out a broken
3282         implementation.
3283
3284 2012-03-28  Adrienne Walker  <enne@google.com>
3285
3286         [chromium] Fix tiled layer assert for huge layers
3287         https://bugs.webkit.org/show_bug.cgi?id=82486
3288
3289         Reviewed by James Robinson.
3290
3291         Test: TiledLayerChromiumTest.hugeLayerUpdateCrash
3292
3293         TilingData::numTiles() is calculated as the product of two ints and so
3294         can potentially overflow, causing numTiles() to be incorrect. To avoid
3295         calling code accidentally falling into this trap, remove this function
3296         and all code that uses tile index from TilingData.  This requires
3297         fixing up a bunch of callers of TilingData and CCLayerTilingData.
3298
3299         Additionally, TilingData::numTiles() has long been a confusing
3300         function name in some contexts, so rename to bool hasEmptyBounds().
3301
3302         Also, remove TilingData::intersectDrawQuad because there are no
3303         clients of that function.
3304
3305         * platform/graphics/chromium/TiledLayerChromium.cpp:
3306         (WebCore::TiledLayerChromium::drawsContent):
3307         (WebCore::TiledLayerChromium::reserveTextures):
3308         (WebCore::TiledLayerChromium::prepareToUpdate):
3309         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
3310         (WebCore::TiledLayerChromium::needsIdlePaint):
3311         (WebCore::TiledLayerChromium::idlePaintRect):
3312         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
3313         (WebCore::CCLayerTilingData::tileRect):
3314         * platform/graphics/chromium/cc/CCLayerTilingData.h:
3315         (WebCore::CCLayerTilingData::hasEmptyBounds):
3316         (WebCore::CCLayerTilingData::tileBounds):
3317         (WebCore::CCLayerTilingData::isEmpty):
3318         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3319         (WebCore::CCTiledLayerImpl::bindContentsTexture):
3320         (WebCore::CCTiledLayerImpl::appendQuads):
3321         * platform/graphics/gpu/Texture.cpp:
3322         (WebCore::Texture::create):
3323         (WebCore::Texture::updateSubRect):
3324         * platform/graphics/gpu/TilingData.cpp:
3325         (WebCore::TilingData::tileBounds):
3326         (WebCore::TilingData::tileBoundsWithBorder):
3327         (WebCore::TilingData::tileBoundsNormalized):
3328         * platform/graphics/gpu/TilingData.h:
3329         (WebCore::TilingData::hasEmptyBounds):
3330         (TilingData):
3331         (WebCore::TilingData::assertTile):
3332
3333 2012-03-28  Emil A Eklund  <eae@chromium.org>
3334
3335         Change FilterOperations::getOutsets to use integers
3336         https://bugs.webkit.org/show_bug.cgi?id=82535
3337
3338         Reviewed by Eric Seidel.
3339
3340         FilterOperations::getOutsets calculates the outsets using integers and
3341         the values are guranteed to be set to full-pixel values. By changing the
3342         function signature we communicate this fact better and avoid unnecessary
3343         type conversions in some cases.
3344
3345         No new tests.
3346
3347         * platform/graphics/filters/FilterOperations.cpp:
3348         (WebCore::FilterOperations::getOutsets):
3349         * platform/graphics/filters/FilterOperations.h:
3350         (FilterOperations):
3351         * rendering/RenderBox.cpp:
3352         (WebCore::RenderBox::computeRectForRepaint):
3353         (WebCore::RenderBox::addVisualEffectOverflow):
3354         * rendering/RenderInline.cpp:
3355         (WebCore::RenderInline::computeRectForRepaint):
3356         * rendering/style/RenderStyle.h:
3357
3358 2012-03-28  Nate Chapin  <japhet@chromium.org>
3359
3360         Remove dispatchDidLoadMainResource callback, since no
3361         port implements it.
3362         https://bugs.webkit.org/show_bug.cgi?id=82539
3363
3364         Reviewed by Alexey Proskuryakov.
3365
3366         No new tests, just deleting dead code.
3367
3368         * loader/EmptyClients.h:
3369         (EmptyFrameLoaderClient):
3370         * loader/FrameLoader.cpp:
3371         (WebCore::FrameLoader::finishedLoading):
3372         (WebCore::FrameLoader::mainReceivedCompleteError):
3373         * loader/FrameLoaderClient.h:
3374         (FrameLoaderClient):
3375         * loader/MainResourceLoader.cpp:
3376         (WebCore::MainResourceLoader::receivedError):
3377         (WebCore::MainResourceLoader::didCancel):
3378
3379 2012-03-28  Enrica Casucci  <enrica@apple.com>
3380
3381         REGRESSION: editing/pasteboard/dataTransfer-setData-getData.html fails on Mac platforms.
3382         https://bugs.webkit.org/show_bug.cgi?id=82497
3383         <rdar://problem/11140334>
3384
3385         Reviewed by Brady Eidson.
3386         
3387         The revision causing this regression fixed the way data is written to the pasteboard for NSURLPboardType.
3388         This change fixes the way data is read from the pasteboard for the same pasteboard type.
3389
3390         No new tests. Fixes the existing one that fails.
3391
3392         * platform/mac/ClipboardMac.mm:
3393         (WebCore::absoluteURLsFromPasteboard):
3394         * platform/mac/PlatformPasteboardMac.mm:
3395         (WebCore::PlatformPasteboard::stringForType):
3396
3397 2012-03-28  Joe Thomas  <joethomas@motorola.com>
3398
3399         SL bot is hitting SHOULD NEVER BE REACHED in WebCore::valueForLength() on many tests
3400         https://bugs.webkit.org/show_bug.cgi?id=82390
3401
3402         Reviewed by Simon Fraser.
3403
3404         This is an attempt to fix the MAC SL/Lion Bot issue as this issue is not reproducible locally.
3405         The assertion happened when length type is Undefined in valueForLength() function but the assertion for Undefined length type
3406         in RenderBox::computeLogicalWidthInRegionUsing which calls the above said function did not get hit.
3407
3408         This patch passes Length structure as const reference to Length calculation functions which avoids the call to the copy-constructor.
3409         And it ensures that the Length structure is not getting modified during copy-construction. 
3410
3411         * css/LengthFunctions.cpp:
3412         (WebCore::minimumValueForLength):
3413         (WebCore::valueForLength):
3414         (WebCore::floatValueForLength):
3415         * css/LengthFunctions.h:
3416         (WebCore):
3417
3418 2012-03-28  Gavin Barraclough  <barraclough@apple.com>
3419
3420         Yarr: if we're not using the output array, don't populate it!
3421         https://bugs.webkit.org/show_bug.cgi?id=82519
3422
3423         Reviewed by Sam Weinig.
3424
3425         * ForwardingHeaders/runtime/MatchResult.h: Added.
3426         * ForwardingHeaders/yarr/YarrJIT.h: Added.
3427             - Added forwarding headers.
3428
3429 2012-03-23  David Hyatt  <hyatt@apple.com>
3430
3431         https://bugs.webkit.org/show_bug.cgi?id=81685
3432         
3433         [New Multicolumn] Add RenderMultiColumnFlowThread to hold the flow thread contents of a multi-column block.
3434         It derives from RenderFlowThread.
3435         
3436         Refactor RenderFlowThread to split out the stuff related to explicit naming into a subclass, RenderNamedFlowThread.
3437         This allows RenderFlowThread to be a simple base class that involves maintaining the regions themselves.
3438     
3439         Reviewed by Julien Chaffraix.
3440
3441         * CMakeLists.txt:
3442         * GNUmakefile.list.am:
3443         * Target.pri:
3444         * WebCore.gypi:
3445         * WebCore.vcproj/WebCore.vcproj:
3446         * WebCore.xcodeproj/project.pbxproj:
3447         * dom/Document.cpp:
3448         * dom/NodeRenderingContext.cpp:
3449         * dom/NodeRenderingContext.h:
3450         (WebCore):
3451         (WebCore::NodeRenderingContext::parentFlowRenderer):
3452         * dom/WebKitNamedFlow.cpp:
3453         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
3454         * dom/WebKitNamedFlow.h:
3455         (WebCore):
3456         (WebCore::WebKitNamedFlow::create):
3457         (WebKitNamedFlow):
3458         * rendering/RenderBlock.cpp:
3459         (WebCore::RenderBlock::collapseAnonymousBoxChild):
3460         * rendering/RenderFlowThread.cpp:
3461         (WebCore::RenderFlowThread::RenderFlowThread):
3462         (WebCore):