Fix scale of screen.width, window.outerWidth and @media device-width when page scale...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-01-10  John Mellor  <johnme@chromium.org>
2
3         Fix scale of screen.width, window.outerWidth and @media device-width when page scale not applied in compositor.
4         https://bugs.webkit.org/show_bug.cgi?id=106460
5
6         Reviewed by Kenneth Rohde Christiansen.
7
8         screen.width, window.outerWidth and @media device-width should be in
9         density independent (UI) pixels, not physical screen pixels.
10
11         This already works on most ports (including iOS). However Chrome for
12         Android currently internally sizes its windows in physical screen pixels
13         instead of density independent pixels, and this leaks through in the
14         sizes provided to WebCore.
15
16         This patch scales these sizes appropriately before they reach JavaScript,
17         on platforms where the applyPageScaleFactorInCompositor setting is false
18         (i.e. just Chrome for Android). Once Chrome for Android switches over to
19         the same coordinate space, the applyPageScaleFactorInCompositor setting
20         will be removed, along with any code (such as this) that depends on it.
21
22         The effect of this patch on Chrome for Android when viewing a page with
23         a width=device-width viewport on a Galaxy Nexus (720x1280 @ dPR 2) is:
24             @media device-width      changes from 720 to 360
25             screen.width             changes from 720 to 360
26             screen.availWidth        changes from 720 to 360
27             window.outerWidth        changes from 720 to 360
28             window.innerWidth                    remains 360 (at overview zoom)
29             @media width                         remains 360
30             document.documentElement.clientWidth remains 360
31             document.documentElement.offsetWidth remains 360
32             document.documentElement.scrollWidth remains 360
33             document.body.clientWidth            remains 360
34             document.body.offsetWidth            remains 360
35             document.body.scrollWidth            remains 360
36         And similarly for heights (though they are slightly less than 640, since
37         toolbars etc. get subtracted from the available height).
38
39         No new tests, as applyDeviceScaleFactorInCompositor appears to always be
40         true in DumpRenderTree, so this situation cannot occur there.
41
42         * page/Settings.in:
43             Added applyDeviceScaleFactorInCompositor setting, which allows
44             detecting whether we need to normalize the scale.
45         * platform/chromium/PlatformScreenChromium.cpp:
46         (WebCore::toUserSpace):
47             Static function for normalizing screen rect scale.
48         (WebCore::screenRect):
49             Uses toUserSpace.
50         (WebCore::screenAvailableRect):
51             Uses toUserSpace.
52         * rendering/TextAutosizer.cpp:
53         (WebCore::TextAutosizer::processSubtree):
54             Use applyDeviceScaleFactorInCompositor instead of
55             applyPageScaleFactorInCompositor, to scale the window rect correctly
56             on platforms other than Chrome for Android.
57
58 2013-01-10  Florin Malita  <fmalita@chromium.org>
59
60         Rename GraphicsContext::addRoundedRectClip
61         https://bugs.webkit.org/show_bug.cgi?id=106581
62
63         Reviewed by Simon Fraser.
64
65         This patch renames GraphicsContext::addRoundedRectClip to clipRoundedRect for consistency
66         with the other GC clipping methods.
67
68         No new tests: no functional changes.
69
70         * WebCore.order:
71         * platform/graphics/GraphicsContext.cpp:
72         (WebCore::GraphicsContext::clipRoundedRect):
73         * platform/graphics/GraphicsContext.h:
74         (GraphicsContext):
75         * platform/graphics/skia/GraphicsContextSkia.cpp:
76         (WebCore::GraphicsContext::clipRoundedRect):
77         * rendering/RenderBox.cpp:
78         (WebCore::RenderBox::paintBoxDecorations):
79         (WebCore::RenderBox::pushContentsClip):
80         * rendering/RenderBoxModelObject.cpp:
81         (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
82         (WebCore::RenderBoxModelObject::paintBorder):
83         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
84         * rendering/RenderLayer.cpp:
85         (WebCore::RenderLayer::clipToRect):
86         * rendering/RenderThemeChromiumWin.cpp:
87         (WebCore):
88         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
89         * rendering/RenderThemeMacShared.mm:
90         (WebCore::RenderThemeMacShared::paintMenuListButtonGradients):
91         (WebCore::RenderThemeMacShared::paintSliderTrack):
92         * rendering/RenderThemeSafari.cpp:
93         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
94         (WebCore::RenderThemeSafari::paintSliderTrack):
95         * rendering/RenderThemeWinCE.cpp:
96         (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
97
98 2013-01-10  Tommy Widenflycht  <tommyw@google.com>
99
100         MediaStream API: Adding the new id attribute to MediaStream and MediaStreamTrack
101         https://bugs.webkit.org/show_bug.cgi?id=106564
102
103         Reviewed by Adam Barth.
104
105         Specification: http://dev.w3.org/2011/webrtc/editor/getusermedia.html
106         MediaStream looses its label attribute and instead gets an id attribute.
107         MediaStreamTrack gets an id attribute.
108
109         Not testable yet, will add tests in a followup patch.
110
111         * Modules/mediastream/MediaStream.h:
112         (WebCore::MediaStream::label):
113         (MediaStream):
114         (WebCore::MediaStream::id):
115         * Modules/mediastream/MediaStream.idl:
116         * Modules/mediastream/MediaStreamTrack.cpp:
117         (WebCore::MediaStreamTrack::id):
118         (WebCore):
119         * Modules/mediastream/MediaStreamTrack.h:
120         * Modules/mediastream/MediaStreamTrack.idl:
121         * platform/chromium/support/WebMediaStreamComponent.cpp:
122         (WebKit::WebMediaStreamComponent::initialize):
123         (WebKit):
124         (WebKit::WebMediaStreamComponent::isEnabled):
125         (WebKit::WebMediaStreamComponent::id):
126         (WebKit::WebMediaStreamComponent::source):
127         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
128         (WebKit::WebMediaStreamDescriptor::label):
129         (WebKit):
130         (WebKit::WebMediaStreamDescriptor::id):
131         * platform/mediastream/MediaStreamComponent.h:
132         (WebCore::MediaStreamComponent::id):
133         (WebCore::MediaStreamComponent::MediaStreamComponent):
134         (MediaStreamComponent):
135         * platform/mediastream/MediaStreamDescriptor.h:
136         (WebCore::MediaStreamDescriptor::create):
137         (WebCore::MediaStreamDescriptor::id):
138         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
139         (MediaStreamDescriptor):
140
141 2013-01-10  Ojan Vafai  <ojan@chromium.org>
142
143         Flexboxes incorrectly add the scrollbar width to the intrinsic width of fixed-width items
144         https://bugs.webkit.org/show_bug.cgi?id=106591
145
146         Reviewed by Levi Weintraub.
147
148         The scrollbar width should only be added if the width of the flex item
149         is not fixed.
150
151         Test: fast/css/fixed-width-intrinsic-width-excludes-scrollbars.html
152
153         * rendering/RenderBlock.cpp:
154         (WebCore::RenderBlock::computePreferredLogicalWidths):
155         Use shared helper method. This also happens to fix the vertical
156         writing-mode case.
157
158         * rendering/RenderBox.cpp:
159         (WebCore::RenderBox::instrinsicScrollbarLogicalWidth):
160         (WebCore):
161         * rendering/RenderBox.h:
162         (RenderBox):
163         Add a method for determining the scrollbar's contribution to the boxes
164         intrinsic width.
165
166         * rendering/RenderDeprecatedFlexibleBox.cpp:
167         (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
168         * rendering/RenderFlexibleBox.cpp:
169         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
170         Use shared code for determining the scrollbar width and only add the
171         width when computing the intrinsic widths.
172
173         * rendering/RenderGrid.cpp:
174         (WebCore::RenderGrid::computePreferredLogicalWidths):\
175         Just adding a FIXME to account for scrollbar width.
176
177 2013-01-10  Nate Chapin  <japhet@chromium.org>
178
179         Replace unnecessary null-checks with an assert in MainResourceLoader::continueAfterNavigationPolicy.
180         https://bugs.webkit.org/show_bug.cgi?id=106476
181
182         Reviewed by Alexey Proskuryakov.
183
184         * loader/MainResourceLoader.cpp:
185         (WebCore::MainResourceLoader::continueAfterNavigationPolicy): Null-checks for resourceLoader were
186             added in an abundance of caution in r139150. Given that we know the load hasn't been cancelled,
187             resourceLoader can only be null if continueAfterNavigationPolicy() has already been called
188             before when m_substituteData is valid. continueAfterNavigationPolicy() is only called for redirects,
189             and SubstituteData doesn't support redirects, so it is correct to assert that resourceLoader is non-null.
190
191 2013-01-10  Levi Weintraub  <leviw@chromium.org>
192
193         ScrollingCoordinator touch event hit rects aren't converted to proper coordinates when in nested views
194         https://bugs.webkit.org/show_bug.cgi?id=106383
195
196         Reviewed by James Robinson.
197
198         ScrollingCoordinator uses clippedOverflowRectForRepaint(0) to generate the bounds for a renderer's hit
199         testing rect. The rect this returns is in the coordinates of its document. This change converts the
200         rect to the outermost view's coordinate system using convertToContainingView.
201
202         Tests: platform/chromium/fast/events/touch/touch-hit-rects-in-iframe.html
203
204         * page/scrolling/ScrollingCoordinator.cpp:
205         (WebCore::accumulateRendererTouchEventTargetRects):
206
207 2013-01-10  Levi Weintraub  <leviw@chromium.org>
208
209         Regression(r137939): Heap-use-after-free in WebCore::accumulateDocumentEventTargetRects
210         https://bugs.webkit.org/show_bug.cgi?id=106454
211
212         Reviewed by James Robinson.
213
214         Correctly removing child Documents from their parent's tracked touch handler maps when detaching and
215         when their last touch event handler is removed.
216
217         Test: fast/events/touch/nested-document-with-touch-handler-detached-crash.html
218
219         * dom/Document.cpp:
220         (WebCore::Document::detach):
221         (WebCore::Document::didRemoveEventTargetNode):
222
223 2013-01-10  Nate Chapin  <japhet@chromium.org>
224
225         REGRESSION(r138222): WebDocumentLoaderMac-related leaks seen on Leaks bot
226         https://bugs.webkit.org/show_bug.cgi?id=106137
227
228         Reviewed by Brady Eidson.
229
230         Tested manually by comparing before and after leaks output for WK1-mac.
231
232         * loader/MainResourceLoader.cpp:
233         (WebCore::MainResourceLoader::receivedError): Call dispatchDidFailLoading() if
234             a SubstituteData load fails or is cancelled. Without this call, load counts
235             are not balanced on WebDocumentLoaderMac and it is retained forever.
236         (WebCore::MainResourceLoader::didFinishLoading):
237
238 2013-01-10  Robert Kroeger  <rjkroege@chromium.org>
239
240         Manually revert http://trac.webkit.org/changeset/136012
241         https://bugs.webkit.org/show_bug.cgi?id=106580
242
243         Reviewed by Dimitri Glazkov.
244
245         136012 broke touch-scrolling of an overflow div in an iframe. Revert manually
246         to work around conflicts.
247
248         * page/EventHandler.cpp:
249         (WebCore::EventHandler::handleWheelEvent):
250
251 2013-01-10  Robert Hogan  <robert@webkit.org>
252
253         REGRESSION(r136967): margin-top + overflow:hidden causes incorrect layout for internal floated elements
254         https://bugs.webkit.org/show_bug.cgi?id=106374
255
256         Reviewed by David Hyatt.
257
258         r136397 treated any self-collapsing block that had a clearance delta as though it was clearing a float, but
259         blocks that avoid floats can get a clearance delta too. So just ensure there is clearance on the block when deciding
260         whether we need to add the margin back in before placing the float.
261
262         Test: fast/block/margin-collapse/self-collapsing-block-with-overflow-hidden-and-float-child.html
263
264         * rendering/RenderBlockLineLayout.cpp:
265         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
266
267 2013-01-10  Alexander Pavlov  <apavlov@chromium.org>
268
269         Web Inspector: Color picker in Styles pane shows wrong initial color
270         https://bugs.webkit.org/show_bug.cgi?id=106567
271
272         Reviewed by Pavel Feldman.
273
274         The RGB's G value for "crimson" was wrong.
275
276         * inspector/front-end/Color.js:
277
278 2013-01-10  Tony Chang  <tony@chromium.org>
279
280         Speed up supplemental dependency computation
281         https://bugs.webkit.org/show_bug.cgi?id=106503
282
283         Reviewed by Adam Barth.
284
285         On my machine, generating supplemental IDL dependencies was taking about 18s
286         because it has to run the C preprocessor on each IDL file. Avoid this by using
287         a regular expression to find the Supplemental= value in each IDL file rather than
288         doing a full parse. Now generating supplemental IDL dependencies is less than a
289         second.
290
291         preprocess-idls.pl used to also check IDL attributes against IDLAttributes.txt.
292         Move this code to run in generate-bindings.pl. This change revealed that
293         TestRunner.idl uses PassContext so add that to IDLAttributes.txt.
294
295         No new tests, this is a build refactor. EWS bots should be green.
296
297         * DerivedSources.make: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
298         * DerivedSources.pri: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
299         * GNUmakefile.am: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
300         * UseJSC.cmake: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
301         * UseV8.cmake: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
302         * WebCore.gyp/WebCore.gyp: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
303         * bindings/scripts/IDLAttributes.txt: Add PassContext needed by TestRunner.idl.
304         * bindings/scripts/generate-bindings.pl:
305         (loadIDLAttributes): Moved from preprocess-idls.pl.
306         (checkIDLAttributes): Moved from preprocess-idls.pl.
307         (checkIfIDLAttributesExists): Moved from preprocess-idls.pl.
308         * bindings/scripts/preprocess-idls.pl:
309         (getSupplementalFromIDLFile): Helper method to get Supplemental=* quickly.
310
311 2013-01-10  Max Vujovic  <mvujovic@adobe.com>
312
313         [CSS Filters] RenderLayerCompositor::addToOverlapMap should take into account the filters outsets (ie. blur and drop-shadow)
314         https://bugs.webkit.org/show_bug.cgi?id=94022
315
316         Reviewed by Simon Fraser.
317
318         When a layer has a filter that moves pixels, we need to add its entire bounds, including its
319         outsets and children, to the overlap map. The filter can move the children's pixels
320         anywhere in the layer, so we can't rely on the children's bounds.
321
322         Eventually, we should avoid adding children to the overlap map if the parent's bounds used
323         for overlap testing already include the children. I've added a FIXME for this optimization.
324
325         Tests: compositing/filters/sw-layer-overlaps-hw-shadow.html
326                compositing/filters/sw-nested-shadow-overlaps-hw-nested-shadow.html
327                compositing/filters/sw-shadow-overlaps-hw-layer.html
328                compositing/filters/sw-shadow-overlaps-hw-shadow.html
329
330         * rendering/RenderLayer.h:
331         (WebCore::RenderLayer::overlapBounds):
332             If necessary, return the calculated layer bounds, including the children. Otherwise,
333             return the localBoundingBox.
334         (RenderLayer):
335         (WebCore::RenderLayer::overlapBoundsIncludeChildren):
336             If the layer has a filter that moves pixels, return true.
337         * rendering/RenderLayerCompositor.cpp:
338         (WebCore::RenderLayerCompositor::addToOverlapMap):
339             Add the overlapBounds instead of the localBoundingBox to the overlap map.
340         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
341             Use the overlapBounds instead of the localBoundingBox for overlap testing.
342
343 2013-01-09  Ojan Vafai  <ojan@chromium.org>
344
345         intrinsic min-widths don't override width for file upload controls
346         https://bugs.webkit.org/show_bug.cgi?id=106517
347
348         Reviewed by Tony Chang.
349
350         Separate out computing intrinsic width from perferred width so that
351         we can use the intrinsic width correctly when applying min-width/max-width.
352         The preferred width is the width used in its container's computation
353         of its intrinsic width.
354
355         This is the first in a series of patches making this work across
356         the render tree. 
357
358         Test: fast/forms/file/intrinsic-min-width-overrides-width.html
359
360         * rendering/RenderBox.cpp:
361         (WebCore::RenderBox::minIntrinsicLogicalWidth):
362         (WebCore):
363         (WebCore::RenderBox::maxIntrinsicLogicalWidth):
364         (WebCore::RenderBox::computeIntrinsicLogicalWidths):
365         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
366         * rendering/RenderBox.h:
367         (RenderBox):
368         * rendering/RenderFileUploadControl.cpp:
369         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
370         (WebCore):
371         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
372         * rendering/RenderFileUploadControl.h:
373         (RenderFileUploadControl):
374
375 2013-01-10  Victor Carbune  <victor@rosedu.org>
376
377         media/video-controls-captions.html fails after fixing https://bugs.webkit.org/show_bug.cgi?id=105536
378         https://bugs.webkit.org/show_bug.cgi?id=106230
379
380         Reviewed by Eric Carlson.
381
382         Until Chromium has proper controls for lists of text tracks, the caption button
383         needs to preserve its functionality.
384
385         Updated TestExpectations to reactivate test.
386
387         * html/HTMLMediaElement.cpp:
388         (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Added explicit call to updateTextTrackDisplay.
389         This enables hiding the tracks immediately.
390         * html/shadow/MediaControlElements.cpp:
391         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Added extra check before rendering
392         that captions should actually be displayed.
393
394 2013-01-10  Hajime Morrita  <morrita@google.com>
395
396         ComposedShadowTreeWalker shouldn't be exposed to non-ShadowDOM classes
397         https://bugs.webkit.org/show_bug.cgi?id=106505
398
399         Reviewed by Dimitri Glazkov.
400
401         This change hides ComposedShadowTreeWalker from non-ShadowDOM classes by
402
403         - introducing thin wrapper functions on NodeRenderingTraversal and relacing
404           CSTW callsites with it,
405         - replacing ComposedShadowTreeWalker usage with AncestorChainWalker if possible and
406         - moving AncestorChainWalker to its own file and including it on files
407           which needs only AncestorChainWalker. This eliminates ComposedShadowTreeWalker.h inclusions.
408
409         No new tests. No behavior change.
410
411         * CMakeLists.txt:
412         * GNUmakefile.list.am:
413         * Target.pri:
414         * WebCore.gypi:
415         * WebCore.xcodeproj/project.pbxproj:
416         * dom/AncestorChainWalker.cpp: Added. Extracted from ComposedShadowTreeWalker.cpp
417         (WebCore):
418         (WebCore::AncestorChainWalker::AncestorChainWalker):
419         (WebCore::AncestorChainWalker::parent):
420         * dom/AncestorChainWalker.h: Added. Extracted from ComposedShadowTreeWalker.h
421         (WebCore):
422         (AncestorChainWalker):
423         (WebCore::AncestorChainWalker::get):
424         (WebCore::AncestorChainWalker::crossingInsertionPoint):
425         * dom/ComposedShadowTreeWalker.cpp:
426         * dom/ComposedShadowTreeWalker.h:
427         * dom/DOMAllInOne.cpp:
428         * dom/ElementShadow.h:
429         (WebCore::shadowOfParent):
430         (WebCore):
431         * dom/EventDispatcher.cpp:
432         * dom/Node.cpp:
433         * dom/NodeRenderingTraversal.cpp:
434         (WebCore::NodeRenderingTraversal::nextInScope):
435         (NodeRenderingTraversal):
436         (WebCore::NodeRenderingTraversal::previousInScope): Added.
437         (WebCore::NodeRenderingTraversal::parentInScope): Added.
438         (WebCore::NodeRenderingTraversal::lastChildInScope): Added.
439         * dom/NodeRenderingTraversal.h:
440         (NodeRenderingTraversal):
441         * dom/TreeScope.cpp:
442         * html/HTMLLIElement.cpp:
443         (WebCore::HTMLLIElement::attach):
444         * page/EventHandler.cpp:
445         * page/FocusController.cpp: Replacing CSTW with NRT
446         (WebCore):
447         (WebCore::FocusNavigationScope::focusNavigationScopeOf):
448         (WebCore::FocusController::findNodeWithExactTabIndex):
449         (WebCore::nextNodeWithGreaterTabIndex):
450         (WebCore::previousNodeWithLowerTabIndex):
451         (WebCore::FocusController::nextFocusableNode):
452         (WebCore::FocusController::previousFocusableNode):
453
454 2013-01-10  Zan Dobersek  <zandobersek@gmail.com>
455
456         Remove the ENABLE_ANIMATION_API feature define occurences
457         https://bugs.webkit.org/show_bug.cgi?id=106544
458
459         Reviewed by Simon Fraser.
460
461         The Animation API code was removed in r137243. The ENABLE_ANIMATION_API
462         feature define handling still lingers in various build systems and configurations
463         but is of no use, so it should be removed.
464
465         No new tests - no new functionality.
466
467         * Configurations/FeatureDefines.xcconfig:
468         * GNUmakefile.features.am.in:
469
470 2013-01-10  Robert Phillips  <robertphillips@chromium.org>
471
472         Serialization of Gradients fails when PlatformContextSkia is not bitmap backed
473         https://bugs.webkit.org/show_bug.cgi?id=106559
474
475         Reviewed by Stephen White.
476
477         This patch switches over from having platform/Skia improperly
478         crack open the device to find the bitmap configuration to just
479         specifying it directly.
480
481         No new tests. This bug is Chromium specific and only occurs in a
482         debugging tool (when serializing to a Skia-specific file format).
483
484         * platform/graphics/skia/PlatformContextSkia.cpp:
485         (WebCore::PlatformContextSkia::createCompatibleDevice):
486
487 2013-01-10  Alexander Pavlov  <apavlov@chromium.org>
488
489         The "outline-offset" property is not found in the computed style property list
490         https://bugs.webkit.org/show_bug.cgi?id=106561
491
492         Reviewed by Alexis Menard.
493
494         Listed CSSPropertyOutlineOffset in the CSSComputedStyleDeclaration's computedProperties[].
495
496         Test: fast/css/getComputedStyle/getComputedStyle-outline-offset.html
497
498         * css/CSSComputedStyleDeclaration.cpp:
499
500 2013-01-10  David Faure  <faure@kde.org>
501
502         PluginPackage::freeLibraryTimerFired asserts if plugin got loaded again meanwhile
503         https://bugs.webkit.org/show_bug.cgi?id=106463
504
505         Reviewed by Simon Hausmann.
506
507         No new tests, this code path will be tested by bug 106140.
508
509         * plugins/PluginPackage.cpp:
510         (WebCore::PluginPackage::freeLibraryTimerFired): skip unloading if loaded again meanwhile.
511
512 2013-01-10  Alexander Pavlov  <apavlov@chromium.org>
513
514         CSSParser does not allow the absence of whitespace between "and" and "expression"
515         https://bugs.webkit.org/show_bug.cgi?id=106458
516
517         Reviewed by Antti Koivisto.
518
519         The issue was that a construct similar to "and(max-width: 480px)" looks like a function call (token type FUNCTION), even though
520         it is actually a MEDIA_AND followed by a parenthesized expression.
521
522         Test: fast/css/media-rule-no-whitespace.html
523
524         * css/CSSParser.cpp:
525         (WebCore::CSSParser::detectFunctionTypeToken): Return if the detection has been successful.
526         (WebCore::CSSParser::realLex): Test for media query tokens if function type detection has failed.
527         * css/CSSParser.h:
528
529 2013-01-10  Alexis Menard  <alexis@webkit.org>
530
531         ASSERT_NOT_REACHED in StylePropertySet::fontValue when accessing font style property through JS after setting style font size.
532         https://bugs.webkit.org/show_bug.cgi?id=88866
533
534         Reviewed by Alexander Pavlov.
535
536         StylePropertySet::fontValue always assumed that it was called using
537         style.font after a subsequent call which set the shorthand font. The
538         ASSERT_NOT_REACHED assumed that all longhands of the font shorthand not
539         set by the shorthand itself were set to initial. While it's true when
540         we set the font shorthand (i.e all longhands are set to implicit initial)
541         it is not true when you set the longhands individually. For example setting
542         font-size will not set other font properties to initial. It is the behavior of all
543         other shorthands in WebKit. When reconstructing the shorthand other
544         properties tests whether the value of each longhands is initial or not
545         (if not then we omit the value, as we should always construct the
546         shortest shorthand possible) or if the value is set or not (if set then
547         we include it in the shorthand if not then we omit it). The comment
548         removed was also talking about invalid font property potentially built
549         by fontValue(). So far appendFontLonghandValueIfExplicit will always
550         construct a valid value as it takes care of adding ' ' or '/' when
551         needed, so the return value is parsable and correct.
552
553         Test: fast/css/font-shorthand-from-longhands.html
554
555         * css/StylePropertySet.cpp:
556         (WebCore::StylePropertySet::appendFontLonghandValueIfExplicit):
557         (WebCore::StylePropertySet::fontValue):
558         * css/StylePropertySet.h:
559
560 2013-01-10  Sheriff Bot  <webkit.review.bot@gmail.com>
561
562         Unreviewed, rolling out r139306.
563         http://trac.webkit.org/changeset/139306
564         https://bugs.webkit.org/show_bug.cgi?id=106550
565
566         it broke inspector-protocol/nmi-webaudio-leak-test.html
567         (Requested by loislo on #webkit).
568
569         * bindings/v8/V8PerIsolateData.cpp:
570         (WebCore::V8PerIsolateData::reportMemoryUsage):
571         * css/CSSMediaRule.cpp:
572         (WebCore::CSSMediaRule::reportMemoryUsage):
573         * css/CSSProperty.cpp:
574         (WebCore::CSSProperty::reportMemoryUsage):
575         * css/CSSStyleSheet.cpp:
576         (WebCore::CSSStyleSheet::reportMemoryUsage):
577         * css/MediaList.cpp:
578         (WebCore::MediaList::reportMemoryUsage):
579         * css/RuleSet.cpp:
580         (WebCore::RuleData::reportMemoryUsage):
581         (WebCore::RuleSet::reportMemoryUsage):
582         (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
583         * css/StyleResolver.cpp:
584         (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
585         (WebCore::StyleResolver::reportMemoryUsage):
586         * css/StyleSheetContents.cpp:
587         (WebCore::StyleSheetContents::reportMemoryUsage):
588         * dom/TreeScope.cpp:
589         (WebCore::TreeScope::reportMemoryUsage):
590         * inspector/HeapGraphSerializer.cpp:
591         (WebCore::HeapGraphSerializer::reportMemoryUsage):
592         * inspector/InspectorMemoryAgent.cpp:
593         * inspector/InspectorProfilerAgent.cpp:
594         (WebCore::InspectorProfilerAgent::reportMemoryUsage):
595         * inspector/MemoryInstrumentationImpl.cpp:
596         (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
597         * loader/DocumentLoader.cpp:
598         (WebCore::DocumentLoader::reportMemoryUsage):
599         * loader/FrameLoader.cpp:
600         (WebCore::FrameLoader::reportMemoryUsage):
601         * loader/MainResourceLoader.cpp:
602         (WebCore::MainResourceLoader::reportMemoryUsage):
603         * loader/Prerenderer.cpp:
604         (WebCore::Prerenderer::reportMemoryUsage):
605         * loader/ResourceLoader.cpp:
606         (WebCore::ResourceLoader::reportMemoryUsage):
607         * loader/cache/CachedImage.cpp:
608         (WebCore::CachedImage::reportMemoryUsage):
609         * page/Page.cpp:
610         (WebCore::Page::reportMemoryUsage):
611
612 2013-01-10  Ilya Tikhonovsky  <loislo@chromium.org>
613
614         Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrumented classes 2/N
615         https://bugs.webkit.org/show_bug.cgi?id=106546
616
617         Reviewed by Vsevolod Vlasov.
618
619         Many nontrivial class members were instrumented in reportMemoryUsage methods.
620
621         * bindings/v8/V8PerIsolateData.cpp:
622         (WebCore::V8PerIsolateData::reportMemoryUsage):
623         * css/CSSMediaRule.cpp:
624         (WebCore::CSSMediaRule::reportMemoryUsage):
625         * css/CSSProperty.cpp:
626         (WebCore::CSSProperty::reportMemoryUsage):
627         * css/CSSStyleSheet.cpp:
628         (WebCore::CSSStyleSheet::reportMemoryUsage):
629         * css/MediaList.cpp:
630         (WebCore::MediaList::reportMemoryUsage):
631         * css/RuleSet.cpp:
632         (WebCore::RuleData::reportMemoryUsage):
633         (WebCore::RuleSet::reportMemoryUsage):
634         (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
635         * css/StyleResolver.cpp:
636         (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
637         (WebCore::StyleResolver::reportMemoryUsage):
638         * css/StyleSheetContents.cpp:
639         (WebCore::StyleSheetContents::reportMemoryUsage):
640         * dom/TreeScope.cpp:
641         (WebCore::TreeScope::reportMemoryUsage):
642         * inspector/HeapGraphSerializer.cpp:
643         (WebCore::HeapGraphSerializer::reportMemoryUsage):
644         * inspector/InspectorMemoryAgent.cpp:
645         * inspector/InspectorProfilerAgent.cpp:
646         (WebCore::InspectorProfilerAgent::reportMemoryUsage):
647         * inspector/MemoryInstrumentationImpl.cpp:
648         (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
649         * loader/DocumentLoader.cpp:
650         (WebCore::DocumentLoader::reportMemoryUsage):
651         * loader/FrameLoader.cpp:
652         (WebCore::FrameLoader::reportMemoryUsage):
653         * loader/MainResourceLoader.cpp:
654         (WebCore::MainResourceLoader::reportMemoryUsage):
655         * loader/Prerenderer.cpp:
656         (WebCore::Prerenderer::reportMemoryUsage):
657         * loader/ResourceLoader.cpp:
658         (WebCore::ResourceLoader::reportMemoryUsage):
659         * loader/cache/CachedImage.cpp:
660         (WebCore::CachedImage::reportMemoryUsage):
661         * page/Page.cpp:
662         (WebCore::Page::reportMemoryUsage):
663
664 2013-01-10  Christophe Dumez  <christophe.dumez@intel.com>
665
666         [EFL] Add gstreamer 1.0.5 to jhbuild
667         https://bugs.webkit.org/show_bug.cgi?id=106178
668
669         Reviewed by Laszlo Gombos.
670
671         Remove GSTREAMER_INTERFACES_LIBRARIES from EFL
672         CMake configuration.
673
674         No new tests, no behavior change for layout tests.
675
676         * PlatformEfl.cmake:
677
678 2013-01-09  Christophe Dumez  <christophe.dumez@intel.com>
679
680         Unreviewed build fix after r139266.
681
682         r139266 broke the debug build of the gstreamer backend due
683         to a missing header include.
684
685         No new tests, no behavior change.
686
687         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
688
689 2013-01-09  Alec Flett  <alecflett@chromium.org>
690
691         IndexedDB: Allow createIndex/createObjectStore to be asynchronous
692         https://bugs.webkit.org/show_bug.cgi?id=106377
693
694         Reviewed by Tony Chang.
695
696         Migrate implementations of createIndex/deleteIndex,
697         createObjectStore/deleteObjectStore over to IDBDatabaseBackendImpl,
698         so that they can be asynchronous in multi-process ports.
699
700         Has the side effect of removing the last consumers of
701         IDBIndexBackendImpl and IDBObjectStoreBackendImpl. The former
702         is removed complete and the latter becomes a temporary namespace
703         pending a further more mechanical code shuffle.
704
705         A key refactoring effect is that the IDBDatabaseBackendImpl
706         now contains the authoritative IDBDatabaseMetadata hierarchy,
707         and updates to it are consolidated in one place rather than
708         scattered across a parallel object tree.
709
710         No new tests as this is just refactoring.
711
712         * Modules/indexeddb/IDBBackingStore.cpp: Simplify objectstore/index loading and propagate errors.
713         (WebCore::IDBBackingStore::getObjectStores):
714         (WebCore::IDBBackingStore::getIndexes):
715         * Modules/indexeddb/IDBBackingStore.h:
716         (IDBBackingStore):
717         * Modules/indexeddb/IDBCursorBackendImpl.cpp: Dependency cleanup.
718         * Modules/indexeddb/IDBCursorBackendImpl.h: Dependency cleanup.
719         (WebCore):
720         * Modules/indexeddb/IDBDatabase.cpp: Frontend IDBObjectStores no longer hold onto backend objects.
721         (WebCore::IDBDatabase::createObjectStore):
722         (WebCore::IDBDatabase::deleteObjectStore):
723         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Add all create/deleteIndex operations from IDBIndexBackendImpl.
724         (WebCore::CreateObjectStoreOperation::create):
725         (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
726         (CreateObjectStoreOperation):
727         (WebCore::DeleteObjectStoreOperation::create):
728         (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
729         (DeleteObjectStoreOperation):
730         (WebCore::CreateObjectStoreAbortOperation::create):
731         (WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
732         (CreateObjectStoreAbortOperation):
733         (WebCore::DeleteObjectStoreAbortOperation::create):
734         (WebCore::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
735         (DeleteObjectStoreAbortOperation):
736         (CreateIndexOperation):
737         (WebCore::CreateIndexOperation::create):
738         (WebCore::CreateIndexOperation::CreateIndexOperation):
739         (WebCore):
740         (DeleteIndexOperation):
741         (WebCore::DeleteIndexOperation::create):
742         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
743         (CreateIndexAbortOperation):
744         (WebCore::CreateIndexAbortOperation::create):
745         (WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
746         (DeleteIndexAbortOperation):
747         (WebCore::DeleteIndexAbortOperation::create):
748         (WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
749         (WebCore::GetOperation::GetOperation):
750         (WebCore::IDBDatabaseBackendImpl::addObjectStore):
751         (WebCore::IDBDatabaseBackendImpl::removeObjectStore):
752         (WebCore::IDBDatabaseBackendImpl::addIndex):
753         (WebCore::IDBDatabaseBackendImpl::removeIndex):
754         (WebCore::IDBDatabaseBackendImpl::openInternal):
755         (WebCore::IDBDatabaseBackendImpl::metadata):
756         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
757         (WebCore::CreateObjectStoreOperation::perform):
758         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
759         (WebCore::IDBDatabaseBackendImpl::createIndex):
760         (WebCore::CreateIndexOperation::perform):
761         (WebCore::CreateIndexAbortOperation::perform):
762         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
763         (WebCore::DeleteIndexOperation::perform):
764         (WebCore::DeleteIndexAbortOperation::perform):
765         (WebCore::IDBDatabaseBackendImpl::get):
766         (WebCore::IDBDatabaseBackendImpl::put):
767         (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
768         (WebCore::IDBDatabaseBackendImpl::count):
769         (WebCore::DeleteRangeOperation::perform):
770         (WebCore::DeleteObjectStoreOperation::perform):
771         (WebCore::IDBDatabaseBackendImpl::deleteDatabaseFinal):
772         (WebCore::IDBDatabaseBackendImpl::loadObjectStores): Load directly into metadata from backing store.
773         (WebCore::CreateObjectStoreAbortOperation::perform):
774         (WebCore::DeleteObjectStoreAbortOperation::perform):
775         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
776         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
777         (WebCore):
778         (IDBDatabaseBackendImpl):
779         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
780         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
781         * Modules/indexeddb/IDBIndexBackendImpl.cpp: Removed.
782         * Modules/indexeddb/IDBIndexBackendImpl.h: Removed.
783         * Modules/indexeddb/IDBObjectStore.cpp:
784         (WebCore::IDBObjectStore::IDBObjectStore): Frontend IDBIndex objects no longer hold onto backend.
785         (WebCore::IDBObjectStore::createIndex): 
786         (WebCore::IDBObjectStore::deleteIndex):
787         * Modules/indexeddb/IDBObjectStore.h:
788         (WebCore::IDBObjectStore::create):
789         (IDBObjectStore):
790         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
791         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
792         (WebCore):
793         (IDBObjectStoreBackendImpl):
794         * Modules/indexeddb/IDBTransaction.cpp:
795         (WebCore::IDBTransaction::objectStore):
796         * Modules/indexeddb/IDBTransaction.h:
797         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
798         * Modules/indexeddb/IDBTransactionBackendImpl.h:
799         (WebCore::IDBTransactionBackendImpl::objectStore):
800         * WebCore.gypi:
801         * WebCore.vcproj/WebCore.vcproj:
802         * WebCore.xcodeproj/project.pbxproj:
803
804 2013-01-09  John J. Barton  <johnjbarton@chromium.org>
805
806         Web Inspector: Don't throw exceptions when we don't have a callstack
807         https://bugs.webkit.org/show_bug.cgi?id=104849
808
809         Reviewed by Pavel Feldman.
810
811         Check array details.callFrames.length before accessing array;
812
813         No new tests, but this fix may help us find the cause of 'other' reasons.
814
815         * inspector/front-end/ScriptsPanel.js:
816         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
817
818 2013-01-09  Eugene Klyuchnikov  <eustas@chromium.org>
819
820         Web Inspector: [Network] Data grid header and content cells are misaligned.
821         https://bugs.webkit.org/show_bug.cgi?id=105795
822
823         Reviewed by Pavel Feldman.
824
825         Header and content tables have different width -> same percent values
826         turn to different cell widths.
827
828         * inspector/front-end/DataGrid.js: Add "corner" cell to all rows.
829         * inspector/front-end/dataGrid.css: Apply "corner" rules to "td" nodes.
830         (.data-grid .data-container): Remove artificial padding.
831
832 2013-01-09  Tien-Ren Chen  <trchen@chromium.org>
833
834         Make caret repainting container-aware
835         https://bugs.webkit.org/show_bug.cgi?id=103955
836
837         Reviewed by Simon Fraser.
838
839         Only invalidate local rects on the caret's repaint container,
840         instead of invalidating an absolute rect on the whole view.
841
842         Test: fast/repaint/caret-with-transformation.html
843
844         * editing/FrameSelection.cpp:
845         (WebCore::caretRendersInsideNode):
846         (WebCore::caretRenderer):
847         (WebCore::FrameSelection::caretRenderer):
848         (WebCore::DragCaretController::caretRenderer):
849         (WebCore::repaintCaretForLocalRect):
850         (WebCore::FrameSelection::recomputeCaretRect):
851         (WebCore::CaretBase::invalidateCaretRect):
852         (WebCore::FrameSelection::focusedOrActiveStateChanged):
853         * editing/FrameSelection.h:
854         * rendering/RenderView.cpp:
855         (WebCore::RenderView::repaintSelection):
856         * rendering/RenderView.h:
857
858 2013-01-09  Ryosuke Niwa  <rniwa@webkit.org>
859
860         Rebaseline the binding test after r139278.
861
862         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
863         (WebCore::JSTestEventTarget::getOwnPropertySlot):
864
865 2013-01-09  Ryosuke Niwa  <rniwa@webkit.org>
866
867         [JSC] REGRESSION(r135093): A form control with name=length overrides length property on form.elements
868         https://bugs.webkit.org/show_bug.cgi?id=105775
869
870         Reviewed by Sam Weinig.
871
872         Fixed the bug by respecting properties on ancestor classes.
873
874         Test: fast/dom/collection-length-should-not-be-overridden.html
875
876         * bindings/js/JSDOMBinding.h:
877         (WebCore::getStaticValueSlotEntryWithoutCaching): Added.
878         * bindings/scripts/CodeGeneratorJS.pm:
879         (GenerateGetOwnPropertySlotBody): Use getStaticValueSlotEntryWithoutCaching to climb up the class
880         hierarchy.
881
882 2013-01-09  Kondapally Kalyan  <kalyan.kondapally@intel.com>
883
884         [EFL] [WebGL] Remove GLX dependencies from X11WindowResources..
885         https://bugs.webkit.org/show_bug.cgi?id=106319
886
887         Reviewed by Kenneth Rohde Christiansen.
888
889         This patch removes GLX specific calls from X11WindowResources.
890         This class is shared by both GLX and EGL implementations.
891
892         * platform/graphics/surfaces/glx/GLXSurface.cpp:
893         (WebCore::GLXTransportSurface::setGeometry):
894         * platform/graphics/surfaces/glx/X11WindowResources.cpp:
895         (WebCore::X11OffScreenWindow::reSizeWindow):
896
897 2013-01-09  Huang Dongsung  <luxtella@company100.net>
898
899         Remove deviceScaleFactor argument in computeMinimumScaleFactorForContentContained().
900         https://bugs.webkit.org/show_bug.cgi?id=106500
901
902         Reviewed by Kenneth Rohde Christiansen.
903
904         deviceScaleFactor argument is not used after r139189.
905
906         No new tests. Refactoring only.
907
908         * dom/ViewportArguments.cpp:
909         (WebCore::computeMinimumScaleFactorForContentContained):
910         * dom/ViewportArguments.h:
911         (WebCore):
912
913 2013-01-09  Elliott Sprehn  <esprehn@gmail.com>
914
915         Node::containingShadowRoot should be constant time
916         https://bugs.webkit.org/show_bug.cgi?id=106494
917
918         Reviewed by Dimitri Glazkov.
919
920         There's no reason to traverse up the tree to find the containing
921         ShadowRoot when we already know if we're in a ShadowRoot by looking at
922         the treeScope().
923
924         No new tests, just refactoring.
925
926         * dom/Node.cpp:
927         (WebCore::Node::containingShadowRoot):
928
929 2013-01-09  Hajime Morrita  <morrita@google.com>
930
931         [Shadow DOM] Distribution related code on ElementShadow should be minimized.
932         https://bugs.webkit.org/show_bug.cgi?id=106294
933
934         Reviewed by Dimitri Glazkov.
935
936         This change moves ElementShadow::m_selectFeatures,
937         m_shouldCollectSelectFeatureSet and related methods to
938         ContentDistributor.
939
940         There are also some renaming and small refactorings for better fit
941         on new place:
942
943         - shouldCollectSelectFeatureSet is renamed needsSelectorRuleSet for conciseness.
944         - setShouldCollectSelectFeatureSet() which used recursion morphed into
945           iterative willAffectSelector().
946         - ensureDistributionFromDocument() becomes a static method.
947
948         No new tests. Refactoring.
949
950         * WebCore.exp.in:
951         * dom/Element.cpp:
952         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
953         * dom/ElementShadow.cpp:
954         (WebCore::ElementShadow::addShadowRoot):
955         (WebCore::ElementShadow::removeAllShadowRoots):
956         * dom/ElementShadow.h:
957         (ElementShadow):
958         (WebCore::ElementShadow::invalidateDistribution):
959         (WebCore::ElementShadow::ensureDistribution):
960         (WebCore::ElementShadow::didAffectSelector):
961         (WebCore::ElementShadow::willAffectSelector):
962         (WebCore::ElementShadow::containingShadow):
963         (WebCore):
964         * html/shadow/ContentDistributor.cpp:
965         (WebCore::ScopeContentDistribution::registerInsertionPoint):
966         (WebCore::ScopeContentDistribution::unregisterInsertionPoint):
967         (WebCore::ContentDistributor::ContentDistributor):
968         (WebCore::ContentDistributor::ensureDistribution):
969         (WebCore):
970         (WebCore::ContentDistributor::ensureDistributionFromDocument):
971         (WebCore::ContentDistributor::invalidateDistribution):
972         (WebCore::ContentDistributor::ensureSelectFeatureSet):
973         (WebCore::ContentDistributor::collectSelectFeatureSetFrom):
974         (WebCore::ContentDistributor::didAffectSelector):
975         (WebCore::ContentDistributor::willAffectSelector):
976         (WebCore::ContentDistributor::didShadowBoundaryChange):
977         * html/shadow/ContentDistributor.h:
978         (ScopeContentDistribution):
979         (WebCore::ContentDistributor::needsSelectFeatureSet):
980         (WebCore::ContentDistributor::setNeedsSelectFeatureSet):
981         (ContentDistributor):
982         (WebCore::ContentDistributor::setValidity):
983         (WebCore::ContentDistributor::needsInvalidation):
984         * html/shadow/HTMLContentElement.cpp:
985         (WebCore::HTMLContentElement::parseAttribute):
986         * html/shadow/HTMLContentElement.h:
987         * html/shadow/HTMLShadowElement.cpp:
988         (WebCore::HTMLShadowElement::olderShadowRoot):
989         * html/shadow/InsertionPoint.cpp:
990         (WebCore::InsertionPoint::getDistributedNodes):
991         (WebCore::InsertionPoint::insertedInto):
992         (WebCore::InsertionPoint::removedFrom):
993         * html/shadow/InsertionPoint.h:
994         (WebCore::InsertionPoint::canAffectSelector):
995         * testing/Internals.cpp:
996         (WebCore::Internals::hasSelectorForIdInShadow):
997         (WebCore::Internals::hasSelectorForClassInShadow):
998         (WebCore::Internals::hasSelectorForAttributeInShadow):
999         (WebCore::Internals::hasSelectorForPseudoClassInShadow):
1000
1001 2013-01-09  Shinya Kawanaka  <shinyak@chromium.org>
1002
1003         Assert triggered in SelectorChecker::checkOneSelector when scrollbar (e.g. :horizontal) selector is specified.
1004         https://bugs.webkit.org/show_bug.cgi?id=106414
1005
1006         Reviewed by Dimitri Glazkov.
1007
1008         In SelectorChecker::checkOneSelector, scrollbar related pseudoType (e.g. :horizontal) is not handled anywhere.
1009         This caused ASSERT triggered. We have to check them.
1010
1011         Test: fast/css/scrollbar-crash.html
1012
1013         * css/SelectorChecker.cpp:
1014         (WebCore::SelectorChecker::checkOneSelector):
1015
1016 2013-01-09  Filip Pizlo  <fpizlo@apple.com>
1017
1018         Unreviewed, fix build after http://trac.webkit.org/changeset/139262
1019
1020         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
1021
1022 2013-01-09  Chris Rogers  <crogers@google.com>
1023
1024         Allow live/local audio input to be enabled only when needed
1025         https://bugs.webkit.org/show_bug.cgi?id=106490
1026
1027         Reviewed by Kenneth Russell.
1028         
1029         WebAudio can process live/local audio input using a MediaStreamAudioSourceNode.
1030         But currently the audio back-end is not able to know when/if audio input will be
1031         needed, so it needs to assume the worst and initialize the system to support potential
1032         audio input in all cases.  For some audio back-ends this can end up being less efficient
1033         than initializing for audio output only.  This patch adds the ability for the audio back-end
1034         to be able to initialize itself for audio input later on, only when/if it's needed.
1035
1036         * Modules/webaudio/AudioContext.cpp:
1037         (WebCore::AudioContext::createMediaStreamSource):
1038         * Modules/webaudio/AudioDestinationNode.h:
1039         (AudioDestinationNode):
1040         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
1041         (WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode):
1042         (WebCore::DefaultAudioDestinationNode::initialize):
1043         (WebCore::DefaultAudioDestinationNode::uninitialize):
1044         (WebCore::DefaultAudioDestinationNode::createDestination):
1045         (WebCore):
1046         (WebCore::DefaultAudioDestinationNode::enableInput):
1047         * Modules/webaudio/DefaultAudioDestinationNode.h:
1048         (DefaultAudioDestinationNode):
1049         * Modules/webaudio/OfflineAudioDestinationNode.h:
1050         (OfflineAudioDestinationNode):
1051         (WebCore::OfflineAudioDestinationNode::sampleRate):
1052         * platform/audio/AudioDestination.h:
1053         (AudioDestination):
1054         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
1055         (WebCore::AudioDestination::create):
1056         * platform/audio/mac/AudioDestinationMac.cpp:
1057         (WebCore::AudioDestination::create):
1058
1059 2013-01-09  Tim Horton  <timothy_horton@apple.com>
1060
1061         Don't drop to huge tile mode if we're only slow-scrolling because of a page overlay
1062         https://bugs.webkit.org/show_bug.cgi?id=106502
1063         <rdar://problem/12959143>
1064
1065         Reviewed by Simon Fraser.
1066
1067         We only use the MainThreadScrollingReason "ForcedOnMainThread" if WebKit2 installs
1068         a page overlay (TiledCoreAnimationDrawingArea::didInstallPageOverlay), which clients
1069         can cause arbitrarily.
1070
1071         We probably should still use default-sized tiles in this case (this will also
1072         prevent us from falling into gigantic tiles for WebKit2 find-in-page, among other things).
1073
1074         * rendering/RenderLayerBacking.cpp:
1075         (WebCore::RenderLayerBacking::adjustTileCacheCoverage):
1076
1077 2013-01-09  Takashi Sakamoto  <tasak@google.com>
1078
1079         border-radius with box-shadow is not rendered correctly
1080         https://bugs.webkit.org/show_bug.cgi?id=106404
1081
1082         Reviewed by Hajime Morita.
1083
1084         RoundedRect::isRenderable is wrong. So RoundedRect::adjustRadii
1085         is invoked for renderable RoundedRects.
1086
1087         Test: fast/borders/border-radius-with-box-shadow.html
1088
1089         * platform/graphics/RoundedRect.cpp:
1090         (WebCore::RoundedRect::isRenderable):
1091         Have to compare topLeft's height plus bottomLeft's height with
1092         rect's height and to compare topRight's height plus bottomRight's
1093         height with rect's height.
1094
1095 2013-01-09  Joanmarie Diggs  <jdiggs@igalia.com>
1096
1097         [GTK] accessibility/aria-labelledby-overrides-label.html requires a proper baseline
1098         https://bugs.webkit.org/show_bug.cgi?id=105638
1099
1100         Reviewed by Martin Robinson.
1101
1102         The test was failing for two reasons:
1103         - AccessibilityRenderObject::correspondingLabelForControlElement() was
1104           not ignoring the ARIA labelled-by property
1105         - AccessibilityController::accessibleElementById() was not implemented
1106
1107         Because getting an element by ID cannot be done in the UIProcess, the
1108         decision was made to expose the element's ID as an accessible attribute
1109         of the object.
1110
1111         In addition, fixing the bug in AccessibilityRenderObject made it possible
1112         to eliminate the Gtk platform-specific expectations for another test.
1113
1114         No new tests; instead, the failing test was unskipped and a proper baseline
1115         provided.
1116
1117         * accessibility/AccessibilityRenderObject.cpp:
1118         (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
1119         Return null for objects where hasTextAlternative() is true.
1120         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1121         (webkitAccessibleGetAttributes): Expose the element's ID as an accessible
1122         attribute.
1123
1124 2013-01-09  Tony Gentilcore  <tonyg@chromium.org>
1125
1126         Remove unused includes from HTMLTreeBuilder
1127         https://bugs.webkit.org/show_bug.cgi?id=106496
1128
1129         Reviewed by Levi Weintraub.
1130
1131         Noticed these while searching HTMLTreeBuilder for non-thread friendly deps.
1132
1133         No new tests because no new functionality.
1134
1135         * html/parser/HTMLTreeBuilder.cpp:
1136
1137 2013-01-09  Max Vujovic  <mvujovic@adobe.com>
1138
1139         [CSS Shaders] Detached identifier after mesh box type is not applied
1140         https://bugs.webkit.org/show_bug.cgi?id=105321
1141
1142         Reviewed by Dean Jackson.
1143
1144         Before this patch, if a "detached" identifier followed a mesh box type identifier, the
1145         detached identifier was not applied. In other words, the mesh would still be attached.
1146
1147         For example:
1148         -webkit-filter: custom(url(...) mix(url(...) normal source-atop), 1 1 border-box detached);
1149
1150         Although the mesh box type is being removed from the Filter Effects spec, for now, we
1151         continue to accept the mesh box type in parsing because of existing content. Eventually,
1152         custom filters will transition to an at-rule syntax, once it is defined.
1153
1154         Test: css3/filters/custom/custom-filter-detached-mesh-with-mesh-box-type.html
1155
1156         * css/CSSParser.cpp:
1157         (WebCore::CSSParser::parseCustomFilter):
1158             In CSSParser, do not add the mesh box type identifier to the list that will be passed to
1159             StyleResolver. StyleResolver is expecting a "detached" identifier in that position and
1160             does not interpret mesh box types.
1161
1162 2013-01-09  Dan Winship  <danw@gnome.org>
1163
1164         [Soup] Handle redirection inside WebKit
1165         https://bugs.webkit.org/show_bug.cgi?id=61122
1166         https://bugs.webkit.org/show_bug.cgi?id=88961
1167
1168         Reviewed by Martin Robinson.
1169
1170         Rather than using libsoup's built-in redirection handling (which
1171         doesn't do everything exactly the way WebKit wants, and can't
1172         handle redirects to non-http URIs anyway), process redirections
1173         ourselves.
1174
1175         No new tests; unskips a few existing tests.
1176
1177         * platform/network/ResourceHandleInternal.h:
1178         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1179         (ResourceHandleInternal):
1180         * platform/network/soup/ResourceError.h:
1181         (ResourceError):
1182         * platform/network/soup/ResourceErrorSoup.cpp:
1183         (WebCore::ResourceError::transportError):
1184         (WebCore):
1185         (WebCore::ResourceError::httpError):
1186         * platform/network/soup/ResourceHandleSoup.cpp:
1187         (WebCore):
1188         (WebCore::gotHeadersCallback):
1189         (WebCore::restartedCallback):
1190         (WebCore::shouldRedirect):
1191         (WebCore::doRedirect):
1192         (WebCore::redirectCloseCallback):
1193         (WebCore::redirectSkipCallback):
1194         (WebCore::cleanupSoupRequestOperation):
1195         (WebCore::sendRequestCallback):
1196         (WebCore::createSoupMessageForHandleAndRequest):
1197         (WebCore::createSoupRequestAndMessageForHandle):
1198         (WebCore::ResourceHandle::start):
1199
1200 2013-01-09  Florin Malita  <fmalita@chromium.org>
1201
1202         [Skia] Implement GraphicsContext::addRoundedRectClip() using SkCanvas::clipRRect()
1203         https://bugs.webkit.org/show_bug.cgi?id=106461
1204
1205         Reviewed by Stephen White.
1206
1207         This patch adds a Skia-specific version of GraphicsContext::addRoundedRectClip() to take
1208         advantage of the SkCanvas::clipRRect() primitive.
1209
1210         As a minor cleanup, the anonymous namespace in GraphicsContextSkia.cpp is extended to cover
1211         all the local helper functions.
1212
1213         No new tests: coverage provided by existing tests.
1214
1215         * platform/graphics/GraphicsContext.cpp:
1216         (WebCore):
1217         * platform/graphics/skia/GraphicsContextSkia.cpp:
1218         (WebCore::GraphicsContext::addRoundedRectClip):
1219         (WebCore):
1220         (WebCore::GraphicsContext::fillRoundedRect):
1221         * platform/graphics/skia/PlatformContextSkia.h:
1222         (WebCore::PlatformContextSkia::clipRRect):
1223         (WebCore):
1224
1225 2013-01-09  Andreas Kling  <akling@apple.com>
1226
1227         SVG-as-image: Throw out cached bitmap renderings after they sit unused for some time.
1228         <http://webkit.org/b/106484>
1229         <rdar://problem/12983216>
1230
1231         Reviewed by Antti Koivisto.
1232
1233         Add a one-shot timer to SVGImageCache to self-clear the bitmap cache 30 seconds after last access.
1234         This prevents us from keeping huge ImageBuffers around in memory for the lifetime of the elements
1235         referencing that particular SVG file. (The ownership model is actually a bit more complicated
1236         but that's irrelevant to this issue.)
1237
1238         10234kB progression on Membuster3.
1239
1240         * svg/graphics/SVGImageCache.cpp:
1241         (WebCore::SVGImageCache::SVGImageCache):
1242         (WebCore::SVGImageCache::~SVGImageCache):
1243         (WebCore::SVGImageCache::clearBitmapCache):
1244         (WebCore::SVGImageCache::cacheClearTimerFired):
1245         (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
1246         * svg/graphics/SVGImageCache.h:
1247         (SVGImageCache):
1248
1249 2013-01-09  Alexey Proskuryakov  <ap@apple.com>
1250
1251         Assertion failure in SubresourceLoader::didFail when reloading
1252         https://bugs.webkit.org/show_bug.cgi?id=101416
1253
1254         Reviewed by Nate Chapin.
1255
1256         Test: http/tests/cache/network-error-during-revalidation.html
1257
1258         * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didFail): Handle revalidation.
1259
1260 2013-01-09  Alexandru Chiculita  <achicu@adobe.com>
1261
1262         Assertion Failure in WebCore::RenderLayerCompositor::updateCompositingLayers
1263         https://bugs.webkit.org/show_bug.cgi?id=106419
1264
1265         Reviewed by Simon Fraser.
1266
1267         No new tests added, just un-skipped 3 existing tests.
1268
1269         RenderLayerCompositor::updateCompositingLayers is being called with a pending layout, so computing the
1270         layers at that point would be useless & error-prone as they will be using incorrect layout values. If a layout is pending it means that 
1271         RenderLayerCompositor::updateCompositingLayers would get called again after the pending layout ends, so any values calculated at that point would be
1272         overwritten immediately. This patch removes the old ASSERT and makes it a return instead.
1273
1274         * rendering/RenderLayerCompositor.cpp:
1275         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1276
1277 2013-01-09  Robert Hogan  <robert@webkit.org>
1278
1279         REGRESSION(r111439): Focus ring is rendered incorrectly in fast/inline/continuation-outlines-with-layers.html
1280         https://bugs.webkit.org/show_bug.cgi?id=106064
1281
1282         Reviewed by David Hyatt.
1283
1284         * rendering/RenderBlock.cpp:
1285         (WebCore::RenderBlock::paintObject): 
1286
1287 2013-01-09  Gregg Tavares  <gman@google.com>
1288
1289         Add stub for CanvasProxy
1290         https://bugs.webkit.org/show_bug.cgi?id=106275
1291
1292         Reviewed by Dean Jackson.
1293
1294         No new tests as no new fuctionality exposed.
1295
1296         * CMakeLists.txt:
1297         * DerivedSources.make:
1298         * DerivedSources.pri:
1299         * GNUmakefile.list.am:
1300         * Target.pri:
1301         * WebCore.gypi:
1302         * WebCore.xcodeproj/project.pbxproj:
1303         * html/canvas/CanvasProxy.cpp: Added.
1304         * html/canvas/CanvasProxy.h: Added.
1305         * html/canvas/CanvasProxy.idl: Added.
1306
1307 2013-01-09  Antti Koivisto  <antti@apple.com>
1308
1309         Release FastMalloc thread caches on memory warning
1310         https://bugs.webkit.org/show_bug.cgi?id=106471
1311
1312         Reviewed by Geoff Garen.
1313         
1314         FastMalloc keeps some memory in per-thread caches (currently 2MB each). We currently flush these caches on memory warning 
1315         for the main thread only. We should do it for other WebKit threads that use FastMalloc too.
1316
1317         Call WTF::releaseFastMallocFreeMemory in a bunch of WebCore support threads on memory warning. Unfortunately we don't have 
1318         an uniform way of doing threads so this requires bunch of thread type specific code.
1319         
1320         Looks to be ~1% progression in membuster3 final and maximum numbers.
1321
1322         * platform/mac/MemoryPressureHandlerMac.mm:
1323         (WebCore::MemoryPressureHandler::releaseMemory):
1324         * storage/StorageTask.cpp:
1325         (WebCore::StorageTask::performTask):
1326         * storage/StorageTask.h:
1327         (WebCore::StorageTask::createReleaseFastMallocFreeMemory):
1328         * storage/StorageThread.cpp:
1329         (WebCore::storageThreads):
1330         (WebCore):
1331         (WebCore::StorageThread::StorageThread):
1332         (WebCore::StorageThread::~StorageThread):
1333         (WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThread):
1334         * storage/StorageThread.h:
1335         (StorageThread):
1336         * workers/WorkerThread.cpp:
1337         (WebCore::threadSetMutex):
1338         (WebCore::workerThreads):
1339         (WebCore::WorkerThread::workerThreadCount):
1340         (WebCore::WorkerThread::WorkerThread):
1341         (WebCore::WorkerThread::~WorkerThread):
1342         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThread):
1343         (WebCore):
1344         * workers/WorkerThread.h:
1345         (WorkerThread):
1346
1347 2013-01-09  Tony Gentilcore  <tonyg@chromium.org>
1348
1349         REGRESSION(r139141): Assertion failure in WebCore::HTMLConstructionSite::HTMLConstructionSite
1350         https://bugs.webkit.org/show_bug.cgi?id=106412
1351
1352         Reviewed by Darin Adler.
1353
1354         This corrects the assertion added in r139141. The assertion was designed to make sure that we are using the
1355         HTMLDocument class. XHTML documents also use HTMLDocument.
1356
1357         No new tests because no new functionality.
1358
1359         * html/parser/HTMLConstructionSite.cpp:
1360         (WebCore::HTMLConstructionSite::HTMLConstructionSite):
1361
1362 2013-01-08  Ojan Vafai  <ojan@chromium.org>
1363
1364         min-content gets the wrong value if min-width is set on some form controls
1365         https://bugs.webkit.org/show_bug.cgi?id=106389
1366
1367         Reviewed by Tony Chang.
1368
1369         Simplify the logic. The only exposed change in behavior is that
1370         m_minPreferredLogicalWidth gets set to m_maxPreferredLogicalWidth
1371         instead of 0 when min-width is set.
1372
1373         Test: fast/forms/min-content-form-controls.html
1374
1375         * rendering/RenderFileUploadControl.cpp:
1376         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
1377         * rendering/RenderListBox.cpp:
1378         (WebCore::RenderListBox::computePreferredLogicalWidths):
1379         * rendering/RenderMenuList.cpp:
1380         (WebCore::RenderMenuList::computePreferredLogicalWidths):
1381         * rendering/RenderSlider.cpp:
1382         (WebCore::RenderSlider::computePreferredLogicalWidths):
1383         * rendering/RenderTextControl.cpp:
1384         (WebCore::RenderTextControl::computePreferredLogicalWidths):
1385
1386 2013-01-09  Abhishek Arya  <inferno@chromium.org>
1387
1388         Mitigate out-of-bounds access in InlineIterator
1389         https://bugs.webkit.org/show_bug.cgi?id=104812
1390
1391         Reviewed by Levi Weintraub.
1392
1393         Share code between InlineIterator::current and InlineIterator::previousInSameNode,
1394         thereby checking for access outside text renderer's length.
1395
1396         * rendering/InlineIterator.h:
1397         (InlineIterator):
1398         (WebCore::InlineIterator::characterAt):
1399         (WebCore):
1400         (WebCore::InlineIterator::current):
1401         (WebCore::InlineIterator::previousInSameNode):
1402
1403 2013-01-09  Yongjun Zhang  <yongjun_zhang@apple.com>
1404
1405         If ImageLoader's loadEventSender or errorEventSender fires after document is detached, the document will be leaked.
1406
1407         https://bugs.webkit.org/show_bug.cgi?id=106394
1408
1409         Reviewed by Alexey Proskuryakov.
1410
1411         ImageLoader's loadEventSender and errorEventSender schedule event dispatching in separate timers and refs
1412         the Element in updatedHasPendingEvent.  If the Document is detached before either eventSender dispatches,
1413         we would leak the Document since we bail out early in dispatchPendingLoadEvent or dispatchPendingErrorEvent,
1414         without deref-ing the Element itself.
1415
1416         No new tests.  Verified manually by using heap tool to count the living HTMLDocuments.
1417
1418         * loader/ImageLoader.cpp:
1419         (WebCore::ImageLoader::dispatchPendingLoadEvent): also call updatedHasPendingEvent to deref the Element if
1420                     the document is detached.
1421         (WebCore::ImageLoader::dispatchPendingErrorEvent): ditto.
1422
1423 2013-01-09  Dimitri Glazkov  <dglazkov@chromium.org>
1424
1425         Unreviewed, rolling out r139143.
1426         http://trac.webkit.org/changeset/139143
1427         https://bugs.webkit.org/show_bug.cgi?id=106135
1428
1429         Broke Chromium content_browsertests.
1430
1431         * platform/leveldb/LevelDBDatabase.cpp:
1432         (WebCore::LevelDBDatabase::open):
1433         (WebCore::LevelDBDatabase::openInMemory):
1434
1435 2013-01-09  Sam Weinig  <sam@webkit.org>
1436
1437         Add Settings.in and make_settings.pl to the project.
1438
1439         Reviewed by Anders Carlsson.
1440
1441         * WebCore.xcodeproj/project.pbxproj:
1442
1443 2013-01-09  Ojan Vafai  <ojan@chromium.org>
1444
1445         marquee special-case in RenderBlock is not needed
1446         https://bugs.webkit.org/show_bug.cgi?id=106396
1447
1448         Reviewed by Simon Fraser.
1449
1450         This was added in http://trac.webkit.org/changeset/105772. The layout test
1451         in that patch (which is disabled) works and the original site that was broken
1452         also still works.
1453
1454         * rendering/RenderBlock.cpp:
1455         (WebCore::RenderBlock::computePreferredLogicalWidths):
1456
1457 2013-01-09  Tony Chang  <tony@chromium.org>
1458
1459         Automatically generate Settings::unifiedTextCheckerEnabled
1460         https://bugs.webkit.org/show_bug.cgi?id=106382
1461
1462         Reviewed by Adam Barth.
1463
1464         No new tests, no change in behavior. This is covered by existing editing/spelling tests.
1465
1466         * page/Settings.cpp:
1467         (WebCore): Move default value into a global so we can generate the initializer.
1468         (WebCore::Settings::Settings): Remove initializer code that is now generated.
1469         * page/Settings.h:
1470         (Settings): Remove getters and setters.
1471         * page/Settings.in: Add entry to be generated.
1472         * testing/InternalSettings.cpp:
1473         (WebCore::InternalSettings::Backup::Backup): Remove backup since the generated code does this.
1474         (WebCore::InternalSettings::Backup::restoreTo): Remove restore code since the generated code does this.
1475         * testing/InternalSettings.h:
1476         (InternalSettings): Remove member variable.
1477         * testing/InternalSettings.idl: The getter was unused so it's being removed. The setter is now generated.
1478
1479 2013-01-09  Alexis Menard  <alexis@webkit.org>
1480
1481         Implement CSS computed style value for transition shorthand
1482         https://bugs.webkit.org/show_bug.cgi?id=105035
1483
1484         Reviewed by Dean Jackson.
1485
1486         Implement support for query the transition and webkit-transition
1487         shorthand from the computed style.
1488
1489         Test: transitions/transitions-parsing.html
1490
1491         * css/CSSComputedStyleDeclaration.cpp:
1492         (WebCore::createTransitionPropertyValue): Factor the code to create the
1493         correct value into a function to reuse it for the shorthand.
1494         (WebCore::getTransitionPropertyValue):
1495         (WebCore::createTimingFunctionValue): Little refactor, the intermediate
1496         local variables are not needed.
1497         (WebCore::getTimingFunctionValue):
1498         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1499
1500 2013-01-09  Hajime Morrita  <morrita@google.com>
1501
1502         Document::setActiveNode() should be Document::setActiveElement()
1503         https://bugs.webkit.org/show_bug.cgi?id=106437
1504
1505         Reviewed by Ojan Vafai.
1506
1507         No new tests. No functoinal change.
1508
1509         * dom/Document.cpp:
1510         (WebCore::Document::setActiveElement):
1511         (WebCore::Document::updateHoverActiveState):
1512         * dom/Document.h:
1513         (Document):
1514         * rendering/HitTestResult.cpp:
1515         (WebCore::HitTestResult::innerElement):
1516         (WebCore):
1517         * rendering/HitTestResult.h:
1518         (HitTestResult):
1519
1520 2013-01-09  Shinya Kawanaka  <shinyak@chromium.org>
1521
1522         [Shadow DOM]: ShadowRoot has wrong nodeName attribute
1523         https://bugs.webkit.org/show_bug.cgi?id=104995
1524
1525         Reviewed by Dimitri Glazkov.
1526
1527         According to the Shadow DOM spec, ShadowRoot.nodeName should return '#document-fragment' instead of '#shadow-root'.
1528         We remove ShadowRoot::nodeName.
1529
1530         No new tests, covered by existing tests.
1531
1532         * dom/ShadowRoot.cpp:
1533         * dom/ShadowRoot.h:
1534         (ShadowRoot):
1535
1536 2013-01-09  Zoltan Horvath  <zoltan@webkit.org>
1537
1538         [CSS Regions] Selecting text through nested regions causes weird and unclearable selection  
1539         https://bugs.webkit.org/show_bug.cgi?id=105641
1540
1541         Reviewed by David Hyatt.
1542
1543         If you have a region with a nested region inside what is rendered below the base region and you are trying select text
1544         starting from the base region and ending it in the nested region, firstly you got a weird selection, secondly you can't
1545         clear the selection. We could prevent this strange behavior by preventing the selection through different region flows.
1546
1547         Test: fast/regions/selecting-text-through-different-region-flows.html
1548
1549         * rendering/RenderView.cpp:
1550         (WebCore::RenderView::setSelection): Don't allow selection when trying to select different region flows.
1551
1552 2013-01-09  Hugo Parente Lima  <hugo.lima@openbossa.org>
1553
1554         Regression(r138681) : Add HAVE(ACCESSIBILITY) guard to atk files, fix for a fix.
1555         https://bugs.webkit.org/show_bug.cgi?id=106448
1556
1557         Reviewed by Gyuyoung Kim.
1558
1559         Some atk files don't use HAVE(ACCESSIBILITY). It might make build errors when
1560         the macro isn't enabled.
1561
1562         * accessibility/atk/WebKitAccessibleHyperlink.h:
1563         * accessibility/atk/WebKitAccessibleInterfaceAction.h:
1564         * accessibility/atk/WebKitAccessibleInterfaceComponent.h:
1565         * accessibility/atk/WebKitAccessibleInterfaceHypertext.h:
1566
1567 2013-01-09  Chris Fleizach  <cfleizach@apple.com>
1568
1569         AX: native popup buttons should not use textUnderElement for their title
1570         https://bugs.webkit.org/show_bug.cgi?id=106349
1571
1572         Reviewed by Ryosuke Niwa.
1573
1574         Chromium relies on the older title() method to return its title. As a result, we also
1575         need to handle the case of <select> element pop up buttons returning the textUnderElement().
1576
1577         No new tests. Fix existing break.
1578
1579         * accessibility/AccessibilityNodeObject.cpp:
1580         (WebCore::AccessibilityNodeObject::title):
1581
1582 2013-01-09  Jussi Kukkonen  <jussi.kukkonen@intel.com>
1583
1584         IndexedDB: Remove ASSERTs that can't assert but result in compiler warnings
1585         https://bugs.webkit.org/show_bug.cgi?id=106442
1586
1587         Reviewed by Kentaro Hara.
1588
1589         IDBLevelDBCoding::m_metaDataType has been changed to unsigned
1590         so ASSERT(m_metaDataType >= 0) is no longer useful: the compiler
1591         warnings however create build difficulties at least with EFL.
1592
1593         * Modules/indexeddb/IDBLevelDBCoding.cpp:
1594         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::metaDataType):
1595         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):
1596
1597 2012-12-29  Ilya Tikhonovsky  <loislo@chromium.org>
1598
1599         Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrumented classes 1/N
1600         https://bugs.webkit.org/show_bug.cgi?id=106445
1601
1602         Reviewed by Vsevolod Vlasov.
1603
1604         The patch has almost mechanical changes.
1605
1606         * bindings/v8/V8Binding.cpp:
1607         * bindings/v8/V8ValueCache.cpp:
1608         (WTF):
1609         (WebCore::StringCache::reportMemoryUsage):
1610         (WebCore):
1611         * dom/Document.cpp:
1612         (WebCore::Document::reportMemoryUsage):
1613         * dom/DocumentStyleSheetCollection.cpp:
1614         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
1615         * dom/ElementRareData.cpp:
1616         (WebCore::ElementRareData::reportMemoryUsage):
1617         * loader/cache/CachedResource.cpp:
1618         (WebCore::CachedResource::reportMemoryUsage):
1619         * page/Frame.cpp:
1620         (WebCore::Frame::reportMemoryUsage):
1621         * page/Page.cpp:
1622         (WebCore::Page::reportMemoryUsage):
1623         * platform/graphics/skia/NativeImageSkia.cpp:
1624         (WebCore::NativeImageSkia::reportMemoryUsage):
1625         * platform/network/FormData.cpp:
1626         (WebCore::FormData::reportMemoryUsage):
1627         (WebCore):
1628         (WebCore::FormDataElement::reportMemoryUsage):
1629         * platform/network/FormData.h:
1630         (FormDataElement):
1631         * rendering/RenderView.cpp:
1632         (WebCore::RenderView::reportMemoryUsage):
1633         * rendering/style/StyleRareNonInheritedData.cpp:
1634         (WebCore::StyleRareNonInheritedData::reportMemoryUsage):
1635
1636 2013-01-09  Florin Malita  <fmalita@chromium.org>
1637
1638         [Skia] Implement GraphicsContext::fillRoundedRect() using SkCanvas::drawRRect()
1639         https://bugs.webkit.org/show_bug.cgi?id=106366
1640
1641         Reviewed by Stephen White.
1642
1643         Skia provides rounded-rect primitives, so we can avoid degrading fillRoundedRect() to
1644         drawPath().
1645
1646         Due to subtle pixel differences (not visually noticeable), switching from drawPath() to
1647         drawRRect() requires rebaselining some of the existing results.
1648
1649         No new tests: coverage provided by existing tests.
1650
1651         * platform/graphics/skia/GraphicsContextSkia.cpp:
1652         (WebCore::GraphicsContext::fillRoundedRect):
1653         * platform/graphics/skia/PlatformContextSkia.h:
1654         (WebCore::PlatformContextSkia::drawRRect):
1655         (WebCore):
1656
1657 2013-01-09  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1658
1659         Web Inspector: cannot undock inspector when window size is too small
1660         https://bugs.webkit.org/show_bug.cgi?id=106054
1661
1662         Reviewed by Pavel Feldman.
1663
1664         Consider dockingUnavailable flag only when dockSide is in undocked
1665         state.
1666
1667         * inspector/front-end/DockController.js:
1668         (WebInspector.DockController.prototype._updateUI.get document):
1669
1670 2013-01-09  Zeno Albisser  <zeno@webkit.org>
1671
1672         [Qt] WebGL content is incomplete when using multiple canvas
1673         https://bugs.webkit.org/show_bug.cgi?id=106313
1674
1675         While we are using double buffering for WebGL,
1676         we do not use a drawable that implements a mechanism
1677         for swapping buffers.
1678         Therefore we have to make sure that all GL commands
1679         have been executed properly before copying the texture
1680         onto the GraphicsSurface.
1681
1682         Reviewed by Simon Hausmann.
1683
1684         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1685         (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext):
1686
1687 2013-01-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1688
1689         Unreviewed. Fix make distcheck.
1690
1691         * GNUmakefile.list.am: Add missing headers.
1692
1693 2013-01-09  Zeno Albisser  <zeno@webkit.org>
1694
1695         [Qt][Mac] GraphicsSurface does not need glEnable/glDisable for texture targets.
1696         https://bugs.webkit.org/show_bug.cgi?id=106310
1697
1698         glEnable/glDisable for texture targets is only necessary
1699         when using the fixed function pipeline.
1700         Enabling or disabling the target might cause unexpected
1701         behavior to texture bindings and is therefore considered harmful.
1702
1703         Reviewed by Noam Rosenthal.
1704
1705         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1706         (WebCore::createTexture):
1707         (WebCore::GraphicsSurfacePrivate::copyFromTexture):
1708         (WebCore::GraphicsSurface::platformCopyToGLTexture):
1709
1710 2013-01-09  Kunihiko Sakamoto  <ksakamoto@chromium.org>
1711
1712         INPUT_MULTIPLE_FIELDS_UI: min/max attributes should not make all fields read-only
1713         https://bugs.webkit.org/show_bug.cgi?id=106422
1714
1715         Reviewed by Kent Tamura.
1716
1717         Do not make day-field of date input and month-field of month input readonly
1718         even if min and max are the same.
1719
1720         Tests: fast/forms/date-multiple-fields/date-multiple-fields-readonly-subfield.html
1721                fast/forms/month-multiple-fields/month-multiple-fields-readonly-subfield.html
1722
1723         * html/shadow/DateTimeEditElement.cpp:
1724         (WebCore::DateTimeEditBuilder::visitField): Added check for date type.
1725
1726 2013-01-09  Kunihiko Sakamoto  <ksakamoto@chromium.org>
1727
1728         INPUT_MULTIPLE_FIELDS_UI: Step-up/-down of week field should respect min/max attributes
1729         https://bugs.webkit.org/show_bug.cgi?id=106416
1730
1731         Reviewed by Kent Tamura.
1732
1733         Make step-up/-down of the week field respect the min/max attributes of the element.
1734         Note that it still accepts any keyboard inputs (the element
1735         becomes 'invalid' state when out-of-range values entered).
1736
1737         Tests: fast/forms/week-multiple-fields/week-multiple-fields-readonly-subfield.html
1738                fast/forms/week-multiple-fields/week-multiple-fields-stepup-stepdown-from-renderer.html
1739
1740         * css/html.css: Add a CSS rule for week field.
1741         * html/shadow/DateTimeEditElement.cpp:
1742         (WebCore::DateTimeEditBuilder::visitField):
1743         Compute minimum/maximum values of week field from the min/max parameters of the element.
1744         * html/shadow/DateTimeFieldElements.cpp:
1745         (WebCore::DateTimeWeekFieldElement::DateTimeWeekFieldElement): Add mininum/maximum arguments.
1746         (WebCore::DateTimeWeekFieldElement::create): Ditto.
1747         (WebCore::DateTimeWeekFieldElement::clampValueForHardLimits): Added.
1748         * html/shadow/DateTimeFieldElements.h:
1749         (DateTimeWeekFieldElement): Add mininum/maximum arguments and declare clampValueForHardLimits.
1750
1751 2013-01-08  Arpita Bahuguna  <arpitabahuguna@gmail.com>
1752
1753         Caret is incorrectly painted for a contenteditable <div> containing a <br> in vertical writing mode
1754         https://bugs.webkit.org/show_bug.cgi?id=103621
1755
1756         Reviewed by Ryosuke Niwa.
1757
1758         While computing the caret rect for the given specific scenario, we
1759         canonicalize our position. For the upstream (or downstream) block flow
1760         candidates a check to ignore the nodes having renderers with zero height
1761         is carried out. This is where we fail our check in the vertical writing mode.
1762
1763         In the vertical writing mode, instead of verifying the height of the descendants
1764         of the candidate nodes, a check for their width should be carried out.
1765
1766         For our case, i.e. the <br> element contained inside the div, the bounding box
1767         in the vertical writing mode would have a width greater than zero and height
1768         equal to zero (as is to be expected in the vertical mode).
1769
1770         Thus, we need to make a check against the logical height. For the vertical
1771         writing mode, the logical height should return the width of the computed
1772         bounding box.
1773
1774         Test: editing/selection/caret-in-div-containing-br-in-vertical-mode.html
1775
1776         * dom/Position.cpp:
1777         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
1778         Have modified the code to verify against the logical height, instead
1779         of simply the height, both in case of RenderText and RenderBox.
1780         The logical height of the computed rects returns a value according
1781         to the writing mode.
1782
1783         For the RenderText a new function, linesLogicalBoundingBox() is called
1784         which returns the values depending on the writing mode.
1785         Similarly, on the RenderBox, pixelSnappedLogicalHeight() is called which
1786         too takes care of the writing mode internally. (borderBoundingBox()
1787         internally calls on the pixelSnappedRect).
1788
1789         * rendering/RenderText.cpp:
1790         (WebCore::RenderText::linesLogicalBoundingBox):
1791         (WebCore):
1792         * rendering/RenderText.h:
1793         (RenderText):
1794         New function is added to return the logical linesBoundingBox, i.e.,
1795         the width and height of the linesBoundingBox are set according to
1796         the writing mode.
1797
1798 2013-01-08  Tony Gentilcore  <tonyg@chromium.org>
1799
1800         Remove a few unused includes from HTMLTreeBuilder
1801         https://bugs.webkit.org/show_bug.cgi?id=106401
1802
1803         Reviewed by Adam Barth.
1804
1805         I happened to notice these while attempting to remove non-thread friendly deps from HTMLTreeBuilder.
1806
1807         No new tests because no new functionality.
1808
1809         * html/parser/HTMLTreeBuilder.cpp:
1810
1811 2013-01-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1812
1813         Regression(r138681): Add HAVE(ACCESSIBILITY) guard to atk files
1814         https://bugs.webkit.org/show_bug.cgi?id=106290
1815
1816         Reviewed by Martin Robinson.
1817
1818         Some atk files don't use HAVE(ACCESSIBILITY). It might make build errors when
1819         the macro isn't enabled.
1820
1821         * accessibility/atk/AXObjectCacheAtk.cpp:
1822         * accessibility/atk/WebKitAccessibleHyperlink.h:
1823         * accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
1824         * accessibility/atk/WebKitAccessibleInterfaceAction.h:
1825         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
1826         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
1827         * accessibility/atk/WebKitAccessibleInterfaceDocument.h:
1828         * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
1829         * accessibility/atk/WebKitAccessibleInterfaceEditableText.h:
1830         * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp:
1831         * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.h:
1832         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
1833         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
1834         * accessibility/atk/WebKitAccessibleInterfaceImage.h:
1835         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
1836         * accessibility/atk/WebKitAccessibleInterfaceSelection.h:
1837         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1838         * accessibility/atk/WebKitAccessibleInterfaceTable.h:
1839         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1840         * accessibility/atk/WebKitAccessibleInterfaceText.h:
1841         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
1842         * accessibility/atk/WebKitAccessibleInterfaceValue.h:
1843         * accessibility/atk/WebKitAccessibleUtil.cpp:
1844         * accessibility/atk/WebKitAccessibleUtil.h:
1845         * accessibility/atk/WebKitAccessibleWrapperAtk.h:
1846
1847 2013-01-08  Matt Falkenhagen  <falken@chromium.org>
1848
1849         Make NodeRenderingContext::parentRenderer and nextRenderer top layer aware
1850         https://bugs.webkit.org/show_bug.cgi?id=103477
1851
1852         Reviewed by Hajime Morita.
1853
1854         Original patch by Elliott Sprehn (minor code and layout tests added).
1855
1856         Instead of using adjustInsertionPointForTopLayerElement and reassigning
1857         pointers passed by reference we should just make nextRenderer and parentRenderer
1858         handle the top layer properly. Right now they would return the wrong values
1859         since we only correctly handle the top layer during renderer creation.
1860
1861         This makes handling of top layer elements consistent with handling of
1862         other special renderering systems like flow threads.
1863
1864         Tests: fast/dom/HTMLDialogElement/modal-dialog-in-replaced-renderer.html
1865                fast/dom/HTMLDialogElement/modal-dialog-in-table-column.html
1866                fast/dom/HTMLDialogElement/modal-dialog-sibling.html
1867
1868         * dom/NodeRenderingContext.cpp:
1869         (WebCore::isRendererReparented): Added this helper function. We must skip
1870         renderers that are reparented in nextRenderer and previousRenderer.
1871         (WebCore):
1872         (WebCore::adjustInsertionPointForTopLayerElement): Removed this method.
1873         (WebCore::NodeRenderingContext::nextRenderer):
1874         (WebCore::NodeRenderingContext::previousRenderer):
1875         (WebCore::NodeRenderingContext::parentRenderer):
1876         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
1877
1878 2013-01-08  Kent Tamura  <tkent@chromium.org>
1879
1880         REGRESSION(r135836): Invalid user input for input[type=number] should be cleared by input.value=""
1881         https://bugs.webkit.org/show_bug.cgi?id=106284
1882
1883         Reviewed by Hajime Morita.
1884
1885         No new tests. Updates fast/forms/number/number/validity-badinput.html.
1886
1887         * html/NumberInputType.cpp:
1888         (WebCore::NumberInputType::setValue):
1889         If the new sanitized value is empty and innerTextValue is a bad input
1890         (it means !valueChanged && !innerTextValue().isEmpty() because the new
1891         sanitized value is empty), we need to update innerTextValue with the
1892         empty string.
1893         * html/NumberInputType.h:
1894         (NumberInputType): Declare setValue.
1895
1896 2013-01-08  Nate Chapin  <japhet@chromium.org>
1897
1898         REGRESSION(r138222?): [Mac WK1] http/tests/appcache/main-resource-redirect.html asserts in WebFrameLoaderClient::dispatchDidFinishLoading
1899         https://bugs.webkit.org/show_bug.cgi?id=106123
1900
1901         Reviewed by Alexey Proskuryakov.
1902
1903         No new tests, fixing an existing test.
1904
1905         * loader/MainResourceLoader.cpp:
1906         (WebCore::MainResourceLoader::continueAfterNavigationPolicy): Before calling m_resource->removeClient(this)
1907             and potentially canceling the ResourceLoader, ensure it won't send resource load callbacks.
1908         * loader/ResourceLoader.h:
1909         (WebCore::ResourceLoader::setSendCallbackPolicy):
1910
1911 2013-01-08  Alexandru Chiculita  <achicu@adobe.com>
1912
1913         Assert in RenderGeometryMap::mapToContainer
1914         https://bugs.webkit.org/show_bug.cgi?id=106068
1915
1916         Reviewed by Simon Fraser.
1917
1918         The assert was due to a pending layout, so the values used to compute the layer bounding boxes were incorrect.
1919         That was because of the Document::setVisualUpdatesAllowed mechanism, which triggers a compositor update
1920         and a repaint, but before this patch didn't check whether a layout was pending or not.
1921
1922         Added a check in Document::setVisualUpdatesAllowed for pending layouts and bailed when such case happened.
1923         A layout will come anyway and trigger the correct updates. Couldn't not force an inline layout at that time
1924         as this function is sometimes called really soon, when the WebKit parts are not fully created yet and updates were
1925         calling back into some client callbacks that were not ready.
1926
1927         Also added an assert in RenderLayerCompositor::updateCompositingLayers to check for other cases that might
1928         try to update the layers with a layout pending. That one led to finding an issue in the RenderMarquee, which
1929         was updating on a timer callback. It might happen that a layout is pending while this timer fires and it 
1930         tries to update the scroll position of the layers while a layout is still due.
1931
1932         There was already a protection to bail if a layout is pending in RenderMarquee::timerFired, so I've just broadened the scope
1933         to the whole RenderView to catch all the layout requests.
1934
1935         Tests: compositing/geometry/assert-layout-not-done.html
1936                compositing/geometry/assert-marquee-timer.html
1937
1938         * dom/Document.cpp:
1939         (WebCore::Document::setVisualUpdatesAllowed):
1940         * rendering/RenderLayerCompositor.cpp:
1941         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1942         * rendering/RenderMarquee.cpp:
1943         (WebCore::RenderMarquee::timerFired):
1944
1945 2013-01-08  Justin Novosad  <junov@google.com>
1946
1947         CanvasRenderingContext2D::setFont argument may reference destroyed object
1948         https://bugs.webkit.org/show_bug.cgi?id=106385
1949
1950         Reviewed by Abhishek Arya.
1951
1952         No new tests: covered by fast/canvas/canvas-measureText.html
1953
1954         This is a re-write of r138994.  Fixing bug in setFont instead of
1955         workaround at call site. 
1956
1957         * html/canvas/CanvasRenderingContext2D.cpp:
1958         (WebCore::CanvasRenderingContext2D::setFont):
1959         (WebCore::CanvasRenderingContext2D::accessFont):
1960
1961 2013-01-08  David Grogan  <dgrogan@chromium.org>
1962
1963         IndexedDB: Provide LevelDB with IDBEnv instead of Env::Default
1964         https://bugs.webkit.org/show_bug.cgi?id=106135
1965
1966         Reviewed by Tony Chang.
1967
1968         IDBEnv only changes the name of the histogram where errors are logged.
1969
1970         * platform/leveldb/LevelDBDatabase.cpp:
1971         (WebCore::LevelDBDatabase::open):
1972         (WebCore::LevelDBDatabase::openInMemory):
1973
1974 2013-01-08  Brandon Jones  <bajones@chromium.org>
1975
1976         Make WebGLRenderingContext inherit from ActiveDOMObject
1977         https://bugs.webkit.org/show_bug.cgi?id=104733
1978
1979         Reviewed by Adam Barth.
1980
1981         When ActiveDOMObject::stop is called on the WebGLRenderingContext the
1982         DrawingBuffer and GraphicsContext3D instances are forcibly released in
1983         order to keep GPU memory utilization to a minimum.
1984
1985         Incorporated new layout test based on one just added to the WebGL
1986         conformance suite. Also tested manually by reloading and
1987         navigating between many WebGL apps.
1988
1989         Test: fast/canvas/webgl/context-release-upon-reload.html
1990
1991         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1992         (WebCore::V8HTMLCanvasElement::getContextCallback):
1993             Removed garbage collection hack added in Bug 76255.
1994         * html/canvas/WebGLRenderingContext.cpp:
1995         (WebCore):
1996         (WebCore::WebGLRenderingContext::create):
1997             Call suspendIfNeeded per ActiveDOMObject contract.
1998         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
1999             Call ActiveDOMObject constructor.
2000         (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
2001             Call destroyGraphicsContext3D.
2002         (WebCore::WebGLRenderingContext::destroyGraphicsContext3D):
2003             Drop DrawingBuffer backing store and delete GraphicsContext3D.
2004         (WebCore::WebGLRenderingContext::hasPendingActivity):
2005             Always return false.
2006         (WebCore::WebGLRenderingContext::stop):
2007             Force lost context upon page reload or navigation.
2008         * html/canvas/WebGLRenderingContext.h:
2009         (WebGLRenderingContext):
2010             Inherit from ActiveDOMObject and override notifications.
2011         * platform/graphics/blackberry/DrawingBufferBlackBerry.cpp:
2012         (WebCore):
2013         (WebCore::DrawingBuffer::clearPlatformLayer):
2014             Add currently no-op implementation.
2015         * platform/graphics/cairo/DrawingBufferCairo.cpp:
2016         (WebCore):
2017         (WebCore::DrawingBuffer::clearPlatformLayer):
2018             Add currently no-op implementation.
2019         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2020         (WebCore::DrawingBufferPrivate::clearTextureId):
2021             Clear texture ID from compositor's layer.
2022         (DrawingBufferPrivate):
2023         (WebCore::DrawingBuffer::framebuffer):
2024             Moved around to reduce number of #ifdefs.
2025         (WebCore):
2026         (WebCore::DrawingBuffer::platformLayer):
2027         (WebCore::DrawingBuffer::clearPlatformLayer):
2028             Tell compositor to stop referencing DrawingBuffer's texture.
2029         * platform/graphics/clutter/DrawingBufferClutter.cpp:
2030         (WebCore):
2031         (WebCore::DrawingBuffer::clearPlatformLayer):
2032             Add currently no-op implementation.
2033         * platform/graphics/gpu/DrawingBuffer.cpp:
2034         (WebCore::DrawingBuffer::clear):
2035             Call clearPlatformLayer before deleting OpenGL resources.
2036         * platform/graphics/gpu/DrawingBuffer.h:
2037         (DrawingBuffer):
2038             Add clearPlatformLayer.
2039         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
2040         (WebCore):
2041         (WebCore::DrawingBuffer::clearPlatformLayer):
2042             Add currently no-op implementation.
2043         * platform/graphics/gpu/qt/DrawingBufferQt.cpp:
2044         (WebCore):
2045         (WebCore::DrawingBuffer::clearPlatformLayer):
2046             Add currently no-op implementation.
2047
2048 2013-01-08  Tony Gentilcore  <tonyg@chromium.org>
2049
2050         Remove dependency on Document from HTMLConstructionSite::inQuirksMode()
2051         https://bugs.webkit.org/show_bug.cgi?id=106375
2052
2053         Reviewed by Adam Barth.
2054
2055         This is another step towards removing main thread object dependencies
2056         from the parser.
2057
2058         No new tests because no new functionality.
2059
2060         * dom/Document.h:
2061         * html/HTMLDocument.cpp:
2062         * html/HTMLDocument.h:
2063         (HTMLDocument):
2064         * html/parser/HTMLConstructionSite.cpp:
2065         (WebCore::HTMLConstructionSite::HTMLConstructionSite):
2066         (WebCore::HTMLConstructionSite::setDefaultCompatibilityMode):
2067         (WebCore):
2068         (WebCore::HTMLConstructionSite::setCompatibilityMode):
2069         (WebCore::HTMLConstructionSite::setCompatibilityModeFromDoctype):
2070         (WebCore::HTMLConstructionSite::insertDoctype):
2071         (WebCore::HTMLConstructionSite::inQuirksMode):
2072         * html/parser/HTMLConstructionSite.h:
2073         (HTMLConstructionSite):
2074
2075 2013-01-08  Florin Malita  <fmalita@chromium.org>
2076
2077         Remove unused GraphicsContext::addInnerRoundedRectClip()
2078         https://bugs.webkit.org/show_bug.cgi?id=106376
2079
2080         Reviewed by Andreas Kling.
2081
2082         Since there don't seem to be any users left for it, remove addInnerRoundedRectClip().
2083
2084         No new tests: no functional changes.
2085
2086         * platform/graphics/GraphicsContext.h:
2087         (GraphicsContext):
2088         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2089         * platform/graphics/cg/GraphicsContextCG.cpp:
2090         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
2091         * platform/graphics/qt/GraphicsContextQt.cpp:
2092         * platform/graphics/skia/GraphicsContextSkia.cpp:
2093         (WebCore):
2094         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2095         * platform/graphics/wx/GraphicsContextWx.cpp:
2096
2097 2013-01-08  Justin Novosad  <junov@google.com>
2098
2099         Color bleeding with rounded rectangles on high dpi displays
2100         https://bugs.webkit.org/show_bug.cgi?id=106373
2101
2102         Reviewed by Simon Fraser.
2103
2104         Test: fast/backgrounds/gradient-background-leakage-hidpi.html
2105
2106         Avoid using the BackgroundBleedShrinkBackground draw strategy for
2107         RenderBox when border width is less than two layout units. This
2108         is because rounded rectangles are always snapped to integer layout
2109         coordinates, even with subpixel layout enabled.
2110
2111         * rendering/RenderBox.cpp:
2112         (WebCore::RenderBox::determineBackgroundBleedAvoidance):
2113
2114 2013-01-08  Elliott Sprehn  <esprehn@chromium.org>
2115
2116         Merge getLineAtIndex into RenderBlock::lineAtIndex
2117         https://bugs.webkit.org/show_bug.cgi?id=106379
2118
2119         Reviewed by Eric Seidel.
2120
2121         getLineAtIndex can be merged into lineAtIndex, which was it's only caller.
2122
2123         No new tests, just refactoring.
2124
2125         * rendering/RenderBlock.cpp:
2126         (WebCore::RenderBlock::lineAtIndex):
2127         (WebCore::RenderBlock::lineCount):
2128         * rendering/RenderBlock.h:
2129         (RenderBlock):
2130
2131 2013-01-08  Rafael Weinstein  <rafaelw@chromium.org>
2132
2133         [HTMLTemplateElement] Allow <template> content to be inspected
2134         https://bugs.webkit.org/show_bug.cgi?id=105839
2135
2136         Reviewed by Pavel Feldman.
2137
2138         In addition to the plumbing which allows template contents to be
2139         displayed within the inspector, this patch adds a manually-managed
2140         weakref from the template document back to its host document (typically
2141         the creator). This is required so that the inspector agent can be found
2142         for template elements.
2143
2144         * dom/Document.cpp:
2145         (WebCore::Document::~Document):
2146         (WebCore::Document::templateDocument):
2147         * dom/Document.h:
2148         (Document):
2149         (WebCore::Document::setTemplateDocumentHost):
2150         (WebCore::Document::templateDocumentHost):
2151         * editing/markup.cpp:
2152         (WebCore::createFragmentForInnerOuterHTML):
2153         * html/HTMLTemplateElement.cpp:
2154         (WebCore::HTMLTemplateElement::content):
2155         * inspector/Inspector.json:
2156         * inspector/InspectorDOMAgent.cpp:
2157         (WebCore::InspectorDOMAgent::buildObjectForNode):
2158         * inspector/InspectorInstrumentation.h:
2159         (WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
2160         * inspector/front-end/DOMAgent.js:
2161         (WebInspector.DOMNode):
2162         (WebInspector.DOMNode.prototype.hasChildNodes):
2163         (WebInspector.DOMNode.prototype._insertChild):
2164         (WebInspector.DOMNode.prototype._setChildrenPayload):
2165
2166 2013-01-08  Hajime Morrita  <morrita@google.com>
2167
2168         [Shadow DOM] Distribution related code on ShadowRoot should be minimized.
2169         https://bugs.webkit.org/show_bug.cgi?id=106282
2170
2171         Reviewed by Dimitri Glazkov.
2172
2173         ShadowRoot had a certain amount of logic which is dedicated for
2174         node distribution computation.  These code is going to be compiled
2175         out (Bug 103339) and better be part of the node distribution
2176         algorithm, which is ScopeContentDistribution class.
2177
2178         This change
2179
2180         - Renames ShadowRootContentDistributionData to
2181           ScopeContentDistribution.  New name is concise and a bit more
2182           meaningful: It owns per TreeScope distribution state.
2183         - Moves distribution related code from ShadowRoot to ScopeContentDistribution
2184
2185         No new tests. Refactoring.
2186
2187         * WebCore.exp.in:
2188         * css/StyleScopeResolver.cpp:
2189         (WebCore::StyleScopeResolver::styleSharingCandidateMatchesHostRules):
2190         (WebCore::StyleScopeResolver::matchHostRules):
2191         * dom/ComposedShadowTreeWalker.cpp:
2192         (WebCore::nodeCanBeDistributed):
2193         (WebCore::ComposedShadowTreeWalker::traverseBackToYoungerShadowRoot):
2194         (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost):
2195         (WebCore::AncestorChainWalker::parent):
2196         * dom/ElementShadow.cpp:
2197         (WebCore::ElementShadow::collectSelectFeatureSetFrom):
2198         * dom/ShadowRoot.cpp:
2199         (WebCore::ShadowRoot::insertedInto):
2200         (WebCore::ShadowRoot::removedFrom):
2201         (WebCore::ShadowRoot::ensureScopeDistribution):
2202         (WebCore::ShadowRoot::reportMemoryUsage):
2203         * dom/ShadowRoot.h:
2204         (WebCore):
2205         (ShadowRoot):
2206         (WebCore::ShadowRoot::scopeDistribution):
2207         * html/shadow/ContentDistributor.cpp:
2208         (WebCore::ScopeContentDistribution::ScopeContentDistribution):
2209         (WebCore::ScopeContentDistribution::invalidateInsertionPointList):
2210         (WebCore::ScopeContentDistribution::ensureInsertionPointList):
2211         (WebCore::ScopeContentDistribution::registerInsertionPoint):
2212         (WebCore::ScopeContentDistribution::unregisterInsertionPoint):
2213         (WebCore::ScopeContentDistribution::hasShadowElement):
2214         (WebCore):
2215         (WebCore::ScopeContentDistribution::hasContentElement):
2216         (WebCore::ScopeContentDistribution::countElementShadow):
2217         (WebCore::ScopeContentDistribution::hasInsertionPoint):
2218         (WebCore::ScopeContentDistribution::assignedTo):
2219         (WebCore::ContentDistributor::distribute):
2220         (WebCore::ContentDistributor::invalidate):
2221         * html/shadow/ContentDistributor.h:
2222         (ScopeContentDistribution):
2223         (WebCore::ScopeContentDistribution::registerElementShadow):
2224         (WebCore::ScopeContentDistribution::unregisterElementShadow):
2225         (WebCore::ScopeContentDistribution::hasElementShadow):
2226         * html/shadow/HTMLShadowElement.cpp:
2227         (WebCore::HTMLShadowElement::olderShadowRoot):
2228         * html/shadow/InsertionPoint.cpp:
2229         (WebCore::InsertionPoint::insertedInto):
2230         (WebCore::InsertionPoint::removedFrom):
2231         (WebCore::InsertionPoint::contains):
2232         (WebCore):
2233         (WebCore::resolveReprojection):
2234         * html/shadow/InsertionPoint.h:
2235         (InsertionPoint):
2236         (WebCore):
2237         * testing/Internals.cpp:
2238         (WebCore::Internals::hasShadowInsertionPoint):
2239         (WebCore::Internals::hasContentElement):
2240         (WebCore::Internals::countElementShadow):
2241
2242 2013-01-08  Tom Sepez  <tsepez@chromium.org>
2243
2244         Copy-paste preserves <embed> tags containing active content.
2245         https://bugs.webkit.org/show_bug.cgi?id=77625
2246
2247         Reviewed by Ryosuke Niwa.
2248
2249         Test: editing/pasteboard/paste-noplugin.html
2250
2251         * dom/FragmentScriptingPermission.h:
2252         (WebCore::scriptingContentIsAllowed):
2253         (WebCore::pluginContentIsAllowed):
2254         Add new permission to restrict plugin pasting.  Add inline functions to check
2255         the implications of each permission rather than having a list of raw comparisions
2256         sprinkled throughout the code. 
2257         
2258         * editing/markup.cpp:
2259         (WebCore::createFragmentFromMarkup):
2260         Revert back to unsafe plugin pasting regardless of caller's intentions when
2261         the settings allow it.
2262
2263         * dom/Element.cpp:
2264         (WebCore::Element::parserSetAttributes):
2265         * html/parser/HTMLConstructionSite.cpp:
2266         (WebCore::HTMLConstructionSite::insertScriptElement):
2267         * xml/parser/XMLDocumentParserLibxml2.cpp:
2268         (WebCore::XMLDocumentParser::endElementNs):
2269         * xml/parser/XMLDocumentParserQt.cpp:
2270         (WebCore::XMLDocumentParser::parseEndElement):
2271         Use new inline functions to check implications of permissions rather than raw
2272         comparisions.
2273         
2274         * html/parser/HTMLTreeBuilder.cpp:
2275         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
2276         (WebCore::HTMLTreeBuilder::processEndTag):
2277         Check if plugin pasting is allowed before inserting applet/embed/oject elements.
2278
2279         * page/Settings.in:
2280         Declaration of new unsafePluginPastingEnabled setting.
2281
2282         * platform/mac/PasteboardMac.mm:
2283         (WebCore::Pasteboard::documentFragment):
2284         * platform/blackberry/PasteboardBlackBerry.cpp:
2285         (WebCore::Pasteboard::documentFragment):
2286         * platform/chromium/DragDataChromium.cpp:
2287         (WebCore::DragData::asFragment):
2288         * platform/chromium/PasteboardChromium.cpp:
2289         (WebCore::Pasteboard::documentFragment):
2290         * platform/gtk/PasteboardGtk.cpp:
2291         (WebCore::Pasteboard::documentFragment):
2292         * platform/qt/DragDataQt.cpp:
2293         (WebCore::DragData::asFragment):
2294         * platform/qt/PasteboardQt.cpp:
2295         (WebCore::Pasteboard::documentFragment):
2296         * platform/win/ClipboardUtilitiesWin.cpp:
2297         (WebCore::fragmentFromCFHTML):
2298         (WebCore::fragmentFromHTML):
2299         * platform/wx/PasteboardWx.cpp:
2300         (WebCore::Pasteboard::documentFragment):
2301         Pass DisallowScriptingAndPluginContent enum value.
2302         
2303 2013-01-08  Alexis Menard  <alexis@webkit.org>
2304
2305         WebKit does not reject some cubic-bezier form values for transition-timing-function.
2306         https://bugs.webkit.org/show_bug.cgi?id=106369
2307
2308         Reviewed by Dean Jackson.
2309
2310         http://www.w3.org/TR/css3-transitions/#transition-timing-function-property
2311         describes restricitions on cubic-bezier values where the x values of
2312         the curve should be between [0, 1] and y values can exceed this range.
2313         WebKit was not following the specification by allowing x values
2314         exceeding the range.
2315         The spec also says that we should reject the defintion if the condition
2316         is not respected which is what the new code does.
2317
2318         Test: transitions/transitions-parsing.html
2319
2320         * css/CSSParser.cpp:
2321         (WebCore::CSSParser::parseAnimationTimingFunction):
2322
2323 2013-01-08  Andreas Kling  <akling@apple.com>
2324
2325         Heap-use-after-free in bool WebCore::SelectorChecker::checkOneSelector.
2326         <http://webkit.org/b/105834>
2327
2328         Reviewed by Antti Koivisto.
2329
2330         Suppress the DOMSubtreeModified event when synchronizing the "style" attribute and we've
2331         instantiated an Attr node wrapper for the said attribute.
2332
2333         Also added an assertion that Document's StyleResolver isn't cleared during style recalc,
2334         which will help us catch this kind of bug in the future.
2335
2336         Test: fast/dom/mutation-event-listener-with-dirty-inline-style-crash.html
2337
2338         * dom/Document.cpp:
2339         (WebCore::Document::styleResolverThrowawayTimerFired):
2340         * dom/Element.cpp:
2341         (WebCore::Element::setAttributeInternal):
2342
2343 2013-01-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2344
2345         Unreviewed, rolling out r139096.
2346         http://trac.webkit.org/changeset/139096
2347         https://bugs.webkit.org/show_bug.cgi?id=106367
2348
2349         not a complete fix (Requested by bweinstein on #webkit).
2350
2351         * html/HTMLPlugInImageElement.cpp:
2352         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
2353
2354 2013-01-08  Brian Weinstein  <bweinstein@apple.com>
2355
2356         Plug-ins shouldn’t be added to list to autostart if you start a plugin in private browsing.
2357         https://bugs.webkit.org/show_bug.cgi?id=106348
2358         <rdar://problem/12968442>
2359
2360         Reviewed by Anders Carlsson.
2361
2362         * html/HTMLPlugInImageElement.cpp:
2363         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Don't call addAutoStartOrigin if we are
2364             in private browsing mode.
2365
2366 2013-01-08  Chris Fleizach  <cfleizach@apple.com>
2367
2368         AX: native popup buttons should not use textUnderElement for their title
2369         https://bugs.webkit.org/show_bug.cgi?id=106349
2370
2371         Reviewed by Ryosuke Niwa.
2372
2373         Native popup buttons (<select> elements) were calculating its title based on the text
2374         under the element. When Bug 103794 introduced a more complete way of getting render text,
2375         it causes popup buttons to start returning a title.
2376         The fix is that we should not be calculating a title for a native popup button from its children.
2377
2378         Existing tests cover this functionality. This will fix a failing test.
2379
2380         * accessibility/AccessibilityNodeObject.cpp:
2381         (WebCore::AccessibilityNodeObject::visibleText):
2382
2383 2013-01-08  Ojan Vafai  <ojan@chromium.org>
2384
2385         text controls are sized too small when a percentage height is set
2386         https://bugs.webkit.org/show_bug.cgi?id=106277
2387
2388         Reviewed by Tony Chang.
2389
2390         This makes our behavior match Firefox 17, IE 9 and Opera 12.
2391         The current logic came from http://trac.webkit.org/changeset/13723,
2392         which itself was copy-pasted from RenderReplaced and no longer has this clause..
2393
2394         Test: fast/forms/percent-height-auto-width-form-controls.html
2395
2396         * rendering/RenderFileUploadControl.cpp:
2397         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
2398         * rendering/RenderListBox.cpp:
2399         (WebCore::RenderListBox::computePreferredLogicalWidths):
2400         * rendering/RenderMenuList.cpp:
2401         (WebCore::RenderMenuList::computePreferredLogicalWidths):
2402         * rendering/RenderSlider.cpp:
2403         (WebCore::RenderSlider::computePreferredLogicalWidths):
2404         * rendering/RenderTextControl.cpp:
2405         (WebCore::RenderTextControl::computePreferredLogicalWidths):
2406
2407 2013-01-08  Peter Beverloo  <peter@chromium.org>
2408
2409         [Chromium] Modify Android's user agent CSS to not set a border-radius on select elements
2410         https://bugs.webkit.org/show_bug.cgi?id=106327
2411
2412         Reviewed by Adam Barth.
2413
2414         Android's user agent CSS overrides the style applied to <select>
2415         elements with a @size or @multiple attribute, and then applies
2416         (among other things) a border-radius of 5 pixels. While select
2417         elements with a larger size or multiple selection should appear
2418         as drop-down boxes for now, setting the border radius causes
2419         Chromium to skip rendering the background and border, making
2420         them hard to read when the page relies on the default styling.
2421
2422         This is covered by existing pixel tests.
2423
2424         * css/themeChromiumAndroid.css:
2425         (select[size][multiple]):
2426
2427 2013-01-08  Mike West  <mkwst@chromium.org>
2428
2429         CSP: 'none' should take effect only if no other source expression is present.
2430         https://bugs.webkit.org/show_bug.cgi?id=106314
2431
2432         Reviewed by Adam Barth.
2433
2434         WebKit's handling of 'none' in Content Security Policy source lists
2435         doesn't quite match the spec. Currently, we're treating any source list
2436         that contains 'none' as its first token as an empty list. That is:
2437         "script-src 'none'" is handled in the same way as
2438         "script-src 'none' example.com". Based on a bit of public-webappsec@
2439         discussion[1], the behavior we actually want should treat the first as
2440         an empty list, while treating the second as "script-src example.com". In
2441         other words, 'none' in a source list is a no-op, unless it is the _only_
2442         item in the source list.
2443
2444         This patch adjusts our parsing behavior accordingly, and tweaks the
2445         console log we emit for invalid source expressions to warn specifically
2446         about this case.
2447
2448         [1]: http://lists.w3.org/Archives/Public/public-webappsec/2013Jan/0006.html
2449
2450         Test: http/tests/security/contentSecurityPolicy/source-list-parsing-none.html
2451
2452         * page/ContentSecurityPolicy.cpp:
2453         (WebCore::isSourceListNone):
2454             A new static method that returns true when given a string that
2455             contains only 'none' (potentially surrounded by whitespace), and
2456             false otherwise.
2457         (WebCore):
2458         (WebCore::CSPSourceList::parse):
2459             Move the 'none' check into the initial layer of parsing, which means
2460             that we can drop the 'isFirstSourceInList' check entirely.
2461         (WebCore::CSPSourceList::parseSource):
2462             Since we've already checked for 'none' in ::parse, we can at this
2463             point safely treat any occurance of 'none' in the source list as an
2464             invalid expression.
2465         (WebCore::ContentSecurityPolicy::reportInvalidSourceExpression):
2466             If the invalid expression is 'none', add a clarification to the
2467             console message, noting that 'none' only has effect when it's all
2468             alone.
2469
2470 2013-01-08  Alok Priyadarshi  <alokp@chromium.org>
2471
2472         Added OpaqueRegionSkia::currentTrackingOpaqueRect
2473
2474         [chromium] Add OpaqueRegionSkia::currentTrackingOpaqueRect
2475         https://bugs.webkit.org/show_bug.cgi?id=106267
2476
2477         Reviewed by Stephen White.
2478
2479         No new tests needed. No change in functionality.
2480
2481         * platform/graphics/skia/OpaqueRegionSkia.cpp:
2482         (WebCore::OpaqueRegionSkia::applyOpaqueRegionFromLayer):
2483         (WebCore::OpaqueRegionSkia::markRectAsOpaque):
2484         (WebCore::OpaqueRegionSkia::markRectAsNonOpaque):
2485         (WebCore::OpaqueRegionSkia::markAllAsNonOpaque):
2486         (WebCore::OpaqueRegionSkia::currentTrackingOpaqueRect):
2487         (WebCore):
2488         * platform/graphics/skia/OpaqueRegionSkia.h:
2489         (OpaqueRegionSkia):
2490
2491 2013-01-08  Zan Dobersek  <zandobersek@gmail.com>
2492
2493         [GTK] Build failures when building with python 3.3
2494         https://bugs.webkit.org/show_bug.cgi?id=106194
2495
2496         Reviewed by Dirk Pranke.
2497
2498         Python 3.3 introduced changes to dictionaries which can result in changed
2499         iteration order. More about these changes:
2500         http://docs.python.org/3.3/whatsnew/3.3.html#pep-412-key-sharing-dictionary
2501         http://www.python.org/dev/peps/pep-0412/#cons
2502
2503         This causes the Source/WebCore/inspector/generate-inspector-protocol-version
2504         script to fail the self-testing when using Python 3.3. These changes work
2505         around this problem by not checking for expected errors in order but rather
2506         for their presence in the error output sequence. The number of actual errors
2507         is also checked to be equal to the number of expected errors.
2508
2509         No new tests - no new functionality.
2510
2511         * inspector/generate-inspector-protocol-version:
2512         (self_test):
2513
2514 2013-01-08  Antoine Quint  <graouts@apple.com>
2515
2516         <track> element's mode set to "disabled" after load although it was explicitly set to "hidden"
2517         https://bugs.webkit.org/show_bug.cgi?id=105536
2518
2519         Remove all concept of "showing by default". This means removing the showingByDefault()
2520         and setShowingByDefault() methods on TextTrack. As I was going  through this code,
2521         I also noticed that in HTMLMediaElement::configureTextTrackGroup(), we would set
2522         defaultTrack to textTrack.get() even though defaultTrack was created to be a RefPtr<TextTrack>.
2523
2524         As a result, we can now pass an additional 8 tests from the Opera-submitted test suite:
2525
2526         LayoutTests/media/track/opera/interfaces/TextTrack/addCue.html
2527         LayoutTests/media/track/opera/interfaces/TextTrack/removeCue.html
2528         LayoutTests/media/track/opera/interfaces/TextTrackCue/endTime.html
2529         LayoutTests/media/track/opera/interfaces/TextTrackCue/startTime.html
2530         LayoutTests/media/track/opera/interfaces/TextTrackCue/align.html
2531         LayoutTests/media/track/opera/interfaces/TextTrackCue/id.html
2532         LayoutTests/media/track/opera/interfaces/TextTrackCue/pauseOnExit.html
2533         LayoutTests/media/track/opera/interfaces/TextTrackCue/track.html
2534
2535         Reviewed by Eric Carlson.
2536
2537         * html/HTMLMediaElement.cpp:
2538         (WebCore::HTMLMediaElement::configureTextTrackGroup):
2539         (WebCore::HTMLMediaElement::toggleTrackAtIndex):
2540         * html/track/TextTrack.cpp:
2541         (WebCore::TextTrack::TextTrack):
2542         (WebCore::TextTrack::setMode):
2543         (WebCore::TextTrack::isRendered):
2544         * html/track/TextTrack.h:
2545         (WebCore::TextTrack::mode):
2546         (TextTrack):
2547
2548 2013-01-08  Mark Lam  <mark.lam@apple.com>
2549
2550         Removed the need for the ProposedDatabase mechanism.
2551         https://bugs.webkit.org/show_bug.cgi?id=106292.
2552
2553         Reviewed by Sam Weinig.
2554
2555         No new tests.
2556
2557         * Modules/webdatabase/AbstractDatabase.cpp:
2558         (WebCore::AbstractDatabase::details):
2559         (WebCore):
2560         * Modules/webdatabase/AbstractDatabase.h:
2561         (AbstractDatabase):
2562         * Modules/webdatabase/DatabaseContext.cpp:
2563         (WebCore::DatabaseContext::databaseExceededQuota):
2564         * Modules/webdatabase/DatabaseContext.h:
2565         (DatabaseContext):
2566         * Modules/webdatabase/DatabaseTracker.cpp:
2567         (WebCore::DatabaseTracker::canEstablishDatabase):
2568         (WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
2569         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
2570         * Modules/webdatabase/DatabaseTracker.h:
2571         (DatabaseTracker):
2572         * Modules/webdatabase/SQLTransactionClient.cpp:
2573         (WebCore::SQLTransactionClient::didExceedQuota):
2574         * loader/EmptyClients.h:
2575         (WebCore::EmptyChromeClient::exceededDatabaseQuota):
2576         * page/ChromeClient.h:
2577         (ChromeClient):
2578
2579 2013-01-08  Chris Fleizach  <cfleizach@apple.com>
2580
2581         AX: PopUpButtons do not report that AXValueAttribute is supported
2582         https://bugs.webkit.org/show_bug.cgi?id=106333
2583
2584         Reviewed by Ryosuke Niwa.
2585
2586         The Mac platform expects that AXPopUpButton's expose the AXValue attribute.
2587
2588         Test: platform/mac/accessibility/popup-button-exposes-axvalue.html
2589
2590         * accessibility/AccessibilityObject.h:
2591         (WebCore::AccessibilityObject::isPopUpButton):
2592         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
2593         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2594
2595 2013-01-08  Alexis Menard  <alexis@webkit.org>
2596
2597         transition-delay and transition-duration return incorrect values when querying using the computed style.
2598         https://bugs.webkit.org/show_bug.cgi?id=105432
2599
2600         Reviewed by Dean Jackson.
2601
2602         When setting the transition-delay to 10ms for example the value of transition-delay
2603         on the computed style was incorrect, it should return 0.01s but it was
2604         returning something like 0.0099999999...s. In fact the bug was after
2605         the parsing step when creating the Animation object where a conversion
2606         from a double to float was done. This conversion is not needed as the
2607         animation class expects double for delay and transition times.
2608
2609         Test: transitions/transitions-parsing.html
2610
2611         * css/CSSToStyleMap.cpp:
2612         (WebCore::CSSToStyleMap::mapAnimationDelay):
2613         (WebCore::CSSToStyleMap::mapAnimationDuration):
2614
2615 2013-01-08  Hajime Morrita  <morrita@google.com>
2616
2617         [Shadow DOM] Refactoring: invalidateParentDistributionIfNecessary() calls are too intrusive
2618         https://bugs.webkit.org/show_bug.cgi?id=106305
2619
2620         Reviewed by Dimitri Glazkov.
2621
2622         Scattering invalidateParentDistributionIfNecessary() looks bad because
2623         - it has long name whose terminology is cryptic for people who don't know much about Shadow DOM standard.
2624         - its calls are always paired with setNeedsStyleRecalc() and people do setNeedsStyleRecalc()
2625           need to be aware about distribution feature bit tracking. Separate invalidateParentDistributionIfNecessary()
2626           call doesn't help that recognition.
2627
2628         This change introduces Element::didAffectSelector() to replace a setNeedsStyleRecalc()-i37y() call sequence.
2629         SelectRuleFeatureSet::FeatureRule is renamed AffectedSelectorType so that it explains its purpose
2630         in a bit more plain WebKit term.
2631
2632         No new tests. Refactoring.
2633
2634         * dom/Document.cpp:
2635         (WebCore::Document::setCSSTarget): Adopted didAffectSelector.
2636         * dom/Element.cpp:
2637         (WebCore::Element::didAffectSelector): Added.
2638         (WebCore):
2639         * dom/Element.h:
2640         (Element):
2641         * dom/ElementShadow.cpp:
2642         (WebCore::ElementShadow::didAffectSelector): Morphed from invalidateParentDistributionIfNecessary().
2643         * dom/ElementShadow.h:
2644         (ElementShadow):
2645         * html/HTMLAnchorElement.cpp:
2646         (WebCore::HTMLAnchorElement::parseAttribute): Adopted didAffectSelector
2647         * html/HTMLDetailsElement.cpp:
2648         * html/HTMLFormControlElement.cpp:
2649         (WebCore::HTMLFormControlElement::disabledAttributeChanged): Adopted didAffectSelector
2650         * html/HTMLInputElement.cpp:
2651         (WebCore::HTMLInputElement::setChecked): Adopted didAffectSelector
2652         (WebCore::HTMLInputElement::setIndeterminate): Adopted didAffectSelector
2653         * html/HTMLOptGroupElement.cpp:
2654         (WebCore::HTMLOptGroupElement::parseAttribute): Adopted didAffectSelector
2655         * html/HTMLOptionElement.cpp:
2656         (WebCore::HTMLOptionElement::parseAttribute): Adopted didAffectSelector
2657         (WebCore::HTMLOptionElement::setSelectedState): Adopted didAffectSelector
2658         * html/HTMLProgressElement.cpp:
2659         (WebCore::HTMLProgressElement::didElementStateChange): Adopted didAffectSelector
2660         * html/HTMLSummaryElement.cpp:
2661         * html/shadow/HTMLContentElement.cpp:
2662         * html/shadow/SelectRuleFeatureSet.cpp:
2663         (WebCore::SelectRuleFeatureSet::collectFeaturesFromSelector): Followed renaming.
2664         * html/shadow/SelectRuleFeatureSet.h: Followed renaming.
2665         (WebCore::SelectRuleFeatureSet::hasSelectorForChecked):
2666         (WebCore::SelectRuleFeatureSet::hasSelectorForEnabled):
2667         (WebCore::SelectRuleFeatureSet::hasSelectorForDisabled):
2668         (WebCore::SelectRuleFeatureSet::hasSelectorForIndeterminate):
2669         (WebCore::SelectRuleFeatureSet::hasSelectorForLink):
2670         (WebCore::SelectRuleFeatureSet::hasSelectorForTarget):
2671         (WebCore::SelectRuleFeatureSet::hasSelectorForVisited):
2672         (WebCore::SelectRuleFeatureSet::hasSelectorFor):
2673         (WebCore::SelectRuleFeatureSet::setSelectRuleFeature):
2674
2675 2013-01-08  Sergio Villar Senin  <svillar@igalia.com>
2676
2677         [Qt] Fix build with --web-audio
2678         https://bugs.webkit.org/show_bug.cgi?id=106328
2679
2680         Reviewed by Philippe Normand.
2681
2682         Build fix, no new tests required.
2683
2684         * Target.pri: addded missing OfflineAudioContext.[cpp|h].
2685
2686 2013-01-08  Martin Robinson  <mrobinson@igalia.com>
2687
2688         [GTK] Login & password shown in browsers' URL entry after successful HTTP authentication
2689         https://bugs.webkit.org/show_bug.cgi?id=105190
2690
2691         Reviewed by Carlos Garcia Campos.
2692
2693         Test: http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url.html
2694
2695         * platform/network/soup/ResourceHandleSoup.cpp:
2696         (WebCore::restartedCallback): After sending a redirect with credentials to libsoup, strip
2697         the credentials from the request. This ensures that the credentials do not show up in
2698         the user agent or in document.location.
2699
2700 2013-01-08  Keishi Hattori  <keishi@webkit.org>
2701
2702         [Chromium] Don't confine page popups to root view on Mac
2703         https://bugs.webkit.org/show_bug.cgi?id=106315
2704
2705         Reviewed by Kent Tamura.
2706
2707         No new tests.
2708
2709         * Resources/pagepopups/pickerCommon.js:
2710         (adjustWindowRect): Remove code to confine to root view.
2711
2712 2012-12-12  Antonio Gomes  <a1.gomes@sisa.samsung.com>
2713
2714         Make RenderLayer::updateNeedsCompositedScrolling scrollbars agnostic
2715         https://bugs.webkit.org/show_bug.cgi?id=95494
2716
2717         Reviewed by James Robinson.
2718
2719         Some ports (including Qt-wk1 and BlackBerry) allow disabling
2720         scrollbars at FrameView creation level. That said, cheking for the
2721         scrollbars presence in order to determine if we should promote a
2722         RenderLayer to use composited scrolling is not ideal, as done in
2723         RenderLayerCompositor::updateNeedsCompositedScrolling()
2724
2725         Instead, this patch makes the RenderLayer class to query its FrameView
2726         if it has been cached as scrollable by the later.
2727
2728         Least, patch also takes this opportunity to remove RenderLayer::allowsScrolling,
2729         which became unused.
2730
2731         No new tests added, since there is no *practical* behavior change: ports
2732         like Chromium and others who currently check for the scrollbars presence
2733         in order to determine either to promote or not layers to benefit of composited
2734         scrolling should not be affected.
2735
2736         * rendering/RenderLayer.cpp:
2737         (WebCore::RenderLayer::updateNeedsCompositedScrolling):
2738         * rendering/RenderLayer.h:
2739         (RenderLayer):
2740
2741 2012-12-20  Antonio Gomes  <a1.gomes@sisa.samsung.com>
2742
2743         Introduce a compositing trigger for scrollable frames
2744         https://bugs.webkit.org/show_bug.cgi?id=105573
2745
2746         Reviewed by James Robinson.
2747
2748         Make requiresCompositingForScrollableFrame to check the
2749         newly added compositing trigger instead of the associated setting.
2750
2751         It introduces no have behavior change, so no new tests. Patch basically
2752         does some preparation work for adding support to composite scrollable inner
2753         frames independently from "force compositing mode" bit.
2754
2755         * page/ChromeClient.h:
2756         * rendering/RenderLayerCompositor.cpp:
2757         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
2758         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):
2759
2760 2013-01-08  Kihong Kwon  <kihong.kwon@samsung.com>
2761
2762         Add DeviceProximityController to support Device Proximity Events.
2763         https://bugs.webkit.org/show_bug.cgi?id=97630
2764
2765         Reviewed by Hajime Morita.
2766
2767         Implement DeviceProximityController which is inherited from DeviceController to support Device Proximity Events.
2768         DeviceProximityController has two major functionalities.
2769         - When listener is added, DeviceProximityController stores DOMWindow pointer to m_listeners
2770           and start gathering proximity event.
2771         - When DeviceProximityController receives a proximity event from client, fire an event using m_listeners.
2772         In addition, setDeviceProximity function is added to Internals for layout test.
2773
2774         Tests: proximity/add-listener-from-callback.html
2775                proximity/basic-operation.html
2776                proximity/create-event.html
2777                proximity/event-after-navigation.html
2778                proximity/multiple-frames.html
2779                proximity/no-page-cache.html
2780                proximity/optional-event-properties.html
2781                proximity/updates.html
2782                proximity/window-property.html
2783
2784         * CMakeLists.txt:
2785         * GNUmakefile.am:
2786         * GNUmakefile.list.am:
2787         * Modules/proximity/DeviceProximityClient.h: Added.
2788         (WebCore):
2789         (DeviceProximityClient):
2790         (WebCore::DeviceProximityClient::~DeviceProximityClient):
2791         * Modules/proximity/DeviceProximityController.cpp: Added.
2792         (WebCore):
2793         (WebCore::DeviceProximityController::DeviceProximityController):
2794         (WebCore::DeviceProximityController::create):
2795         (WebCore::DeviceProximityController::didChangeDeviceProximity):
2796         (WebCore::DeviceProximityController::deviceProximityClient):
2797         (WebCore::DeviceProximityController::hasLastData):
2798         (WebCore::DeviceProximityController::getLastEvent):
2799         (WebCore::DeviceProximityController::supplementName):
2800         (WebCore::DeviceProximityController::from):
2801         (WebCore::DeviceProximityController::isActiveAt):
2802         (WebCore::provideDeviceProximityTo):
2803         * Modules/proximity/DeviceProximityController.h: Added.
2804         (WebCore):
2805         (DeviceProximityController):
2806         (WebCore::DeviceProximityController::~DeviceProximityController):
2807         * Target.pri:
2808         * WebCore.gyp/WebCore.gyp:
2809         * WebCore.gypi:
2810         * WebCore.pri:
2811         * WebCore.vcproj/WebCore.vcproj:
2812         * WebCore.vcproj/WebCoreCommon.vsprops:
2813         * WebCore.xcodeproj/project.pbxproj:
2814         * history/PageCache.cpp:
2815         When a page has Device Proximity Event Listener, it has not to be cached like Device Orientation.
2816         (WebCore::logCanCachePageDecision):
2817         (WebCore::PageCache::canCache):
2818         * page/DOMWindow.cpp:
2819         (WebCore::DOMWindow::addEventListener):
2820         (WebCore::DOMWindow::removeEventListener):
2821         (WebCore::DOMWindow::removeAllEventListeners):
2822         * testing/Internals.cpp:
2823         (WebCore::Internals::setDeviceProximity):
2824         (WebCore):
2825         * testing/Internals.h:
2826         (Internals):
2827         * testing/Internals.idl:
2828
2829 2013-01-03  Sergio Villar Senin  <svillar@igalia.com>
2830
2831         [GTK] Add WebP image support
2832         https://bugs.webkit.org/show_bug.cgi?id=105915
2833
2834         Reviewed by Martin Robinson.
2835
2836         * GNUmakefile.am: add WTF_USE_WEBP definition.
2837         * GNUmakefile.list.am: properly sort image decoders in the sources list.
2838
2839 2013-01-08  Steve Block  <steveblock@chromium.org>
2840
2841         Rename 'IntSize toSize(const IntPoint&)' to 'toIntSize'
2842         https://bugs.webkit.org/show_bug.cgi?id=106307
2843
2844         This matches other method names which distinguish between sizes and
2845         points. See https://bugs.webkit.org/show_bug.cgi?id=105992#c4.
2846
2847         Reviewed by Kentaro Hara.
2848
2849         Refactoring only, no functional change.
2850
2851         * accessibility/AccessibilityRenderObject.cpp:
2852         (WebCore::AccessibilityRenderObject::scrollTo):
2853         * html/HTMLSelectElement.cpp:
2854         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2855         * platform/ScrollView.h:
2856         (WebCore::ScrollView::scrollOffset):
2857         * platform/graphics/IntPoint.h:
2858         (WebCore::toIntSize):
2859         * rendering/RenderLayer.cpp:
2860         (WebCore::RenderLayer::updateLayerPositions):
2861         (WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
2862         (WebCore::RenderLayer::paintOverflowControls):
2863         * rendering/RenderLayerBacking.cpp:
2864         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2865
2866 2013-01-08  Yoshifumi Inoue  <yosin@chromium.org>
2867
2868         Dragging over an element with scrollbars should scroll the element when dragging near edges
2869         https://bugs.webkit.org/show_bug.cgi?id=39725
2870
2871         Reviewed by Hajime Morita.
2872
2873         This patch introduces auto scrolling functionality during drag-and-drop
2874         when drop source is near edge of scrollable element.
2875
2876         When drop source is inside 20px of scrollable element more than 200ms,
2877         scrollable element is automatically scrolled every 50ms toward drop
2878         source position, e.g. vertically scroll up when drop source is in top
2879         edge.
2880
2881         Test: fast/events/drag-and-drop-autoscroll.html
2882
2883         * page/AutoscrollController.cpp:
2884         (WebCore::AutoscrollController::AutoscrollController): Changed to initialize m_dragAndDropAutoscrollStartTime.
2885         (WebCore::AutoscrollController::updateDragAndDrop): Added for start/stop autoscroll during drag-and-drop.
2886         (WebCore::AutoscrollController::autoscrollTimerFired): Changed to add autoscroll for drag-and-drop, and to pass last know position to RenderBox::autoscroll().
2887         * page/AutoscrollController.h:
2888         (AutoscrollController): Changed to add updateDragAndDrop() and m_dragAndDropAutoscrollReferencePosition and m_dragAndDropAutoscrollStartTime.
2889         * page/EventHandler.cpp:
2890         (WebCore::EventHandler::updateDragAndDrop): Changed to call AutoscrollController::updateDragAndDrop().
2891         * rendering/RenderBox.cpp:
2892         (WebCore::RenderBox::autoscroll): Changed for new parameter position.
2893         (WebCore::RenderBox::calculateAutoscrollDirection): Added for autoscroll.
2894         * rendering/RenderBox.h:
2895         (RenderBox):
2896         * rendering/RenderLayer.cpp:
2897         (WebCore::RenderLayer::autoscroll):  Changed for new parameter position and move updateSelectionForMouseDrag() to AutoscrollController.
2898         * rendering/RenderLayer.h:
2899         (RenderLayer):
2900         * rendering/RenderListBox.cpp:
2901         (WebCore::RenderListBox::autoscroll):  Changed for new parameter position.
2902         * rendering/RenderListBox.h:
2903         (RenderListBox):
2904         * rendering/RenderTextControlSingleLine.cpp:
2905         (WebCore::RenderTextControlSingleLine::autoscroll):  Changed for new parameter position.
2906         * rendering/RenderTextControlSingleLine.h:
2907         (RenderTextControlSingleLine):
2908
2909 2013-01-08  Jochen Eisinger  <jochen@chromium.org>
2910
2911         REGRESSION(r139036): 'WebCore::DateTimeSymbolicFieldElement::isInRange' hides overloaded virtual function
2912         https://bugs.webkit.org/show_bug.cgi?id=106311
2913
2914         Unreviewed build fix.
2915
2916         * html/shadow/DateTimeSymbolicFieldElement.cpp:
2917         (WebCore::DateTimeSymbolicFieldElement::stepDown):
2918         (WebCore::DateTimeSymbolicFieldElement::stepUp):
2919         * html/shadow/DateTimeSymbolicFieldElement.h:
2920         (WebCore::DateTimeSymbolicFieldElement::indexIsInRange): renamed method to avoid hiding Element::isInRange
2921
2922 2013-01-08  Adam Barth  <abarth@webkit.org>
2923
2924         HTMLTreeBuilder shouldn't keep a Document pointer
2925         https://bugs.webkit.org/show_bug.cgi?id=106268
2926
2927         Reviewed by Eric Seidel.
2928
2929         The tree builder shouldn't interact with the Document directly.
2930         Instead, the tree builder should use the HTMLConstructionSite to
2931         interact with the document.
2932
2933         Unfortunately, the HTMLTreeBuilder does need to read back one bit of
2934         information (the quirks mode) from the Document. Currently the
2935         HTMLConstructionSite reads the information directly from the Document.
2936         If/when we move the parser onto its own thread, we'll need to keep
2937         track of this bit on the parser thread. (We should be able to
2938         encapsulate all that logic in the HTMLConstructionSite.)
2939
2940         * html/parser/HTMLConstructionSite.cpp:
2941         (WebCore::HTMLConstructionSite::setDefaultCompatibilityMode):
2942         (WebCore):
2943         (WebCore::HTMLConstructionSite::finishedParsing):
2944         (WebCore::HTMLConstructionSite::inQuirksMode):
2945         * html/parser/HTMLConstructionSite.h:
2946         (HTMLConstructionSite):
2947         * html/parser/HTMLTreeBuilder.cpp:
2948         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2949         (WebCore::HTMLTreeBuilder::detach):
2950         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
2951         (WebCore::HTMLTreeBuilder::defaultForInitial):
2952         (WebCore::HTMLTreeBuilder::finished):
2953         * html/parser/HTMLTreeBuilder.h:
2954         (HTMLTreeBuilder):
2955
2956 2013-01-08  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
2957
2958         Float block's logical top margin is illegal in vertical writing mode.
2959         https://bugs.webkit.org/show_bug.cgi?id=96597
2960
2961         Reviewed by Hajime Morita.
2962
2963         flipFloatForWritingModeForChild() should use child->renderer()->width() not child->width() like horizontal writing mode.
2964
2965         Test: fast/writing-mode/vertical-float-margin.html
2966
2967         * rendering/RenderBlock.cpp:
2968         (WebCore::RenderBlock::flipFloatForWritingModeForChild):
2969
2970 2013-01-07  Kent Tamura  <tkent@chromium.org>
2971
2972         REGRESSION(r137406): Text inside an empty optgroup prevents subsequent options from appearing
2973         https://bugs.webkit.org/show_bug.cgi?id=106298
2974
2975         Reviewed by Ryosuke Niwa.
2976
2977         Test: fast/forms/select/select-empty-optgroup.html
2978
2979         * html/HTMLSelectElement.cpp:
2980         (WebCore::HTMLSelectElement::recalcListItems):
2981         Traverse to the first element within the 'current' only if it exists.
2982
2983 2013-01-07  Steve Block  <steveblock@chromium.org>
2984
2985         Use toSize() to convert from Int/FloatPoint to Int/FloatSize
2986         https://bugs.webkit.org/show_bug.cgi?id=105992
2987
2988         Reviewed by Kentaro Hara.
2989
2990         Refactoring only, no change in behavior.
2991
2992         * html/HTMLAreaElement.cpp:
2993         (WebCore::HTMLAreaElement::computePath):
2994         * platform/ScrollView.h:
2995         (WebCore::ScrollView::scrollOffset):
2996         * platform/graphics/FloatPoint.h:
2997         (WebCore::toFloatSize):
2998         Add 'inline FloatSize toFloatSize(const FloatPoint&)' to match IntPoint.
2999         * rendering/RenderLayerBacking.cpp:
3000         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3001
3002 2013-01-07  Kunihiko Sakamoto  <ksakamoto@chromium.org>
3003
3004         INPUT_MULTIPLE_FIELDS_UI: Step-up/-down of month/day field should respect min/max attributes
3005         https://bugs.webkit.org/show_bug.cgi?id=106212
3006
3007         Reviewed by Kent Tamura.
3008
3009         Make step-up/-down of the month and day fields respect the min/max
3010         attributes of the element.
3011         Note that these fields still accept any keyboard inputs (the element
3012         becomes 'invalid' state when out-of-bounds values entered).
3013
3014         Tests: fast/forms/date-multiple-fields/date-multiple-fields-readonly-subfield.html
3015                fast/forms/date-multiple-fields/date-multiple-fields-stepup-stepdown-from-renderer.html
3016                fast/forms/month-multiple-fields/month-multiple-fields-readonly-subfield.html
3017                fast/forms/month-multiple-fields/month-multiple-fields-stepup-stepdown-from-renderer.html
3018
3019         * css/html.css: Add CSS rules for month and day fields.
3020         * html/shadow/DateTimeEditElement.cpp:
3021         (WebCore::DateTimeEditBuilder::visitField):
3022         Compute minimum/maximum values of month/day fields from the min/max
3023         parameters of the element. If minimum, maximum, and current value is
3024         the same, makes the field read-only.
3025         * html/shadow/DateTimeFieldElements.cpp:
3026         (WebCore::DateTimeAMPMFieldElement::DateTimeAMPMFieldElement): Add mininum/maximum arguments.
3027         (WebCore::DateTimeDayFieldElement::DateTimeDayFieldElement): Ditto.
3028         (WebCore::DateTimeDayFieldElement::create): Ditto.
3029         (WebCore::DateTimeDayFieldElement::clampValueForHardLimits): Added.
3030         (WebCore::DateTimeMonthFieldElement::DateTimeMonthFieldElement): Add mininum/maximum arguments.
3031         (WebCore::DateTimeMonthFieldElement::create): Ditto.
3032         (WebCore::DateTimeMonthFieldElement::clampValueForHardLimits): Added.
3033         (WebCore::DateTimeSymbolicMonthFieldElement::DateTimeSymbolicMonthFieldElement): Add mininum/maximum arguments.
3034         (WebCore::DateTimeSymbolicMonthFieldElement::create): Ditto.
3035         * html/shadow/DateTimeFieldElements.h:
3036         (DateTimeDayFieldElement): Add mininum/maximum arguments and declare clampValueForHardLimits.
3037         (DateTimeMonthFieldElement): Ditto.
3038         (DateTimeSymbolicMonthFieldElement): Add mininum/maximum arguments.
3039         * html/shadow/DateTimeSymbolicFieldElement.cpp:
3040         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement): Add mininum/maximum arguments.
3041         (WebCore::DateTimeSymbolicFieldElement::maximum): Returns m_maximumIndex + 1 as it assumes 1-origin value.
3042         (WebCore::DateTimeSymbolicFieldElement::minimum): Ditto.
3043         (WebCore::DateTimeSymbolicFieldElement::stepDown): Restrict value to m_minimumIndex-m_maximumIndex.
3044         (WebCore::DateTimeSymbolicFieldElement::stepUp): Ditto.
3045         * html/shadow/DateTimeSymbolicFieldElement.h:
3046         (DateTimeSymbolicFieldElement): Add m_minimumIndex and m_maximumIndex.
3047         (WebCore::DateTimeSymbolicFieldElement::isInRange): Added.
3048
3049 2013-01-07  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
3050
3051         [EFL][WK2][WebGL] The top left side of the screen is shown inside the canvas element
3052         https://bugs.webkit.org/show_bug.cgi?id=105136
3053
3054         Reviewed by Noam Rosenthal.
3055
3056         Use glXSwapBuffers to force resize of GL surface after X window resize.
3057
3058         Fixes fast/canvas/webgl/webgl-composite-modes.html pixel test on EFL platform.
3059
3060         * platform/graphics/surfaces/glx/X11WindowResources.cpp:
3061         (WebCore::X11OffScreenWindow::reSizeWindow):
3062
3063 2013-01-07  Steve Block  <steveblock@chromium.org>
3064
3065         Use explicit constructor to convert from Int/FloatSize to Int/FloatPoint
3066         https://bugs.webkit.org/show_bug.cgi?id=106209
3067
3068         Reviewed by Kentaro Hara.
3069
3070         Refactoring only, no functional change.
3071
3072         * rendering/RenderLayerBacking.cpp:
3073         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3074
3075 2013-01-07  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
3076
3077         [EFL][WebGL] Crash of WebKitTestRunner when running webgl layout tests
3078         https://bugs.webkit.org/show_bug.cgi?id=105936
3079
3080         Reviewed by Laszlo Gombos.
3081
3082         If canvas window becomes invalid don't create pixmap from it and don't 
3083         use it for painting.
3084
3085         Improves stability of existing webgl layout tests.
3086
3087         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
3088         (WebCore::GraphicsSurfacePrivate::createPixmap):
3089         (WebCore::GraphicsSurfacePrivate::size):
3090         (WebCore::GraphicsSurface::platformGetTextureID):
3091         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
3092
3093 2013-01-07  Hajime Morrita  <morrita@google.com>
3094
3095         Document::m_activeNode should be always an Element.
3096         https://bugs.webkit.org/show_bug.cgi?id=106193
3097
3098         Reviewed by Ryosuke Niwa.
3099
3100         r137277 tightened an invariant that assumes that active node is
3101         always an element. But Document::updateHoverActiveState() didn't
3102         respect that assumption. This change forces it.
3103
3104         Test: svg/custom/text-use-click-crash.html
3105
3106         * dom/Document.cpp:
3107         (WebCore::Document::removedLastRef):
3108         (WebCore::Document::detach):
3109         (WebCore::Document::setActiveNode):
3110         (WebCore::Document::activeChainNodeDetached):
3111         (WebCore::Document::updateHoverActiveState):
3112         * dom/Document.h:
3113         (WebCore::Document::activeElement): Renamed from m_activeNode for the clarification.
3114         (Document):
3115
3116 2013-01-07  Hajime Morrita  <morrita@google.com>
3117
3118         WebKit should compile on Mac with --shadow-dom
3119         https://bugs.webkit.org/show_bug.cgi?id=105469
3120
3121         Reviewed by Dimitri Glazkov.
3122
3123         No new tests. Just changing build files.
3124
3125         * WebCore.exp.in:
3126         * WebCore.xcodeproj/project.pbxproj:
3127         * dom/Element.idl:
3128
3129 2013-01-07  Stephen White  <senorblanco@chromium.org>
3130
3131         Add a flag to control canvas antialiasing.
3132         https://bugs.webkit.org/show_bug.cgi?id=106255
3133
3134         Reviewed by Darin Fisher.
3135
3136         This flag is not exposed through TestRunner or DRT, so no testing is
3137         possible yet.
3138
3139         * html/HTMLCanvasElement.cpp:
3140         (WebCore::HTMLCanvasElement::createImageBuffer):
3141         * page/Settings.in:
3142
3143 2013-01-07  Julien Chaffraix  <jchaffraix@webkit.org>
3144
3145         [CSS Grid Layout] Implement grid items sizing for fixed minmax grid tracks
3146         https://bugs.webkit.org/show_bug.cgi?id=104700
3147
3148         Reviewed by Tony Chang.
3149
3150         This change implements parts of the minmax() track sizing algorithm. The chosen subset enables us
3151         to resolve any sizing function that doesn't size based on the content (min-content, max-content).
3152
3153         Tests: fast/css-grid-layout/minmax-fixed-logical-height-only.html
3154                fast/css-grid-layout/minmax-fixed-logical-width-only.html
3155
3156         * rendering/RenderGrid.cpp:
3157         (WebCore::GridTrack::GridTrack):
3158         Added a new member to hold the maximum track breadth.
3159
3160         (WebCore::RenderGrid::computePreferredLogicalWidths):
3161         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
3162         Updated these functions to work on both min and max track breadth. In order to match
3163         the specification, if max track breadth < min track breadth, we ignore the max track breadth.
3164         For computedUsedBreadthOfGridTracks, it also involves calling distributeSpaceToTracks.
3165
3166         (WebCore::RenderGrid::computeUsedBreadthOfLength):
3167         New helper function that compute a single length's size.
3168
3169         (WebCore::sortByGridTrackGrowthPotential):
3170         Ordering function for the sorting the track: it orders the track per increasing potential
3171         growth (defined as the difference between max breadth and the currently used breadth).
3172
3173         (WebCore::RenderGrid::distributeSpaceToTracks):
3174         Added this function that matches the specification's algorithm. Only the relevant bits from
3175         the specification were implemented for now (for example, SubsetOfTracksForGrowthBeyondTrackGrowthConstraint
3176         is always the empty set so it was omitted).
3177
3178         * rendering/RenderGrid.h:
3179         Added the new functions and declared GridTrack as public into the WebCore namespace.
3180
3181         * rendering/style/GridTrackSize.h:
3182         (WebCore::GridTrackSize::minTrackBreadth):
3183         (WebCore::GridTrackSize::maxTrackBreadth):
3184         Removed 2 ASSERTs as the layout algorithm doesn't care if the min / max were
3185         set from a single track breadth or through minmax().
3186
3187 2013-01-07  Xianzhu Wang  <wangxianzhu@chromium.org>
3188
3189         Add a setting to enable composited scrolling for frames
3190         https://bugs.webkit.org/show_bug.cgi?id=104950
3191
3192         Reviewed by James Robinson.
3193
3194         Test: compositing/iframes/iframe-composited-scrolling.html
3195
3196         * page/FrameView.cpp:
3197         (WebCore::FrameView::usesCompositedScrolling): Returns true if compositedScrollingForFramesEnabled and the frame is in forced compositing mode (which is set when forced compositing mode and compositing for scrollable frames are enabled), so that ScrollingCoordinator won't include the region of the frame in the nonFastScrollableRegion.
3198         (WebCore):
3199         * page/FrameView.h:
3200         (FrameView):
3201         * page/Settings.in: Add compositedScrollingForFramesEnabled setting.
3202         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
3203         (WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated): Changed the comment about which ScrollableAreas are non-fast-scrollable.
3204         * rendering/RenderLayerCompositor.cpp:
3205         (WebCore::RenderLayerCompositor::frameViewDidScroll): Let ScrollongCoordinator know when the scrolling changes for a frame with composited scrolling enabled.
3206
3207 2013-01-07  Alexandre Elias  <aelias@chromium.org>
3208
3209         Divide gesture scroll delta by scale factor
3210         https://bugs.webkit.org/show_bug.cgi?id=106263
3211
3212         Reviewed by Adam Barth.
3213
3214         Gesture scroll deltas were not being adjusted by the frame's scale
3215         factors, resulting in overly fast main-thread scrolling when zoomed
3216         in.
3217
3218         New test: fast/events/touch/gesture/touch-gesture-scroll-div-scaled.html
3219
3220         * page/EventHandler.cpp:
3221         (WebCore::EventHandler::handleGestureScrollCore):
3222
3223 2013-01-07  Adam Barth  <abarth@webkit.org>
3224
3225         HTMLTreeBuilder should not depend on Frame
3226         https://bugs.webkit.org/show_bug.cgi?id=106256
3227
3228         Reviewed by Eric Seidel.
3229
3230         Rather than have the tree builder ask the Frame whether scripting and
3231         plugins are enabled, we now push that information to the tree builder
3232         via HTMLParserOptions, letting us remove the Frame dependency from the
3233         tree builder.
3234
3235         As a consequence of this change, the "script enabled" bit in the parser
3236         is now locked in when the parser starts. This bit doesn't actually
3237         control when script execute, only how the <noscript> element is parsed.
3238
3239         * html/parser/HTMLDocumentParser.cpp:
3240         (WebCore::tokenizerStateForContextElement):
3241         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3242         * html/parser/HTMLMetaCharsetParser.cpp:
3243         (WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser):
3244         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
3245         * html/parser/HTMLParserOptions.cpp:
3246         (WebCore::HTMLParserOptions::HTMLParserOptions):
3247         * html/parser/HTMLParserOptions.h:
3248         (HTMLParserOptions):
3249         (WebCore::HTMLParserOptions::HTMLParserOptions):
3250         * html/parser/HTMLPreloadScanner.cpp:
3251         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
3252         (WebCore::HTMLPreloadScanner::processToken):
3253         * html/parser/HTMLTokenizer.cpp:
3254         (WebCore::HTMLTokenizer::HTMLTokenizer):
3255         (WebCore::HTMLTokenizer::nextToken):
3256         (WebCore::HTMLTokenizer::updateStateFor):
3257         * html/parser/HTMLTokenizer.h:
3258         (WebCore::HTMLTokenizer::create):
3259         (HTMLTokenizer):
3260         * html/parser/HTMLTreeBuilder.cpp:
3261         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3262         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
3263         * html/parser/HTMLTreeBuilder.h:
3264         * html/parser/HTMLViewSourceParser.cpp:
3265         (WebCore::HTMLViewSourceParser::HTMLViewSourceParser):
3266         (WebCore::HTMLViewSourceParser::updateTokenizerState):
3267
3268 2013-01-07  Tony Chang  <tony@chromium.org>
3269
3270         Remove more internals.settings that are autogenerated
3271         https://bugs.webkit.org/show_bug.cgi?id=106253
3272
3273         Reviewed by Adam Barth.
3274
3275         Remove 8 methods that are autogenerated by Settings.in.
3276
3277         No new tests, this is a refactor and is convered by existing tests.
3278
3279         * testing/InternalSettings.cpp:
3280         (WebCore::InternalSettings::Backup::Backup): Remove backup.
3281         (WebCore::InternalSettings::Backup::restoreTo): Remove restore.
3282         * testing/InternalSettings.h:
3283         (Backup): Remove member variables and functions.
3284         (InternalSettings):
3285         * testing/InternalSettings.idl: Remove functions.
3286
3287 2013-01-07  Ryosuke Niwa  <rniwa@webkit.org>
3288
3289         Another incremental build fix after r139013.
3290
3291         * mathml/MathMLAllInOne.cpp:
3292
3293 2013-01-07  Ryosuke Niwa  <rniwa@webkit.org>
3294
3295         Incremental build system on Windows port does not necessarily rebuild RenderBox.cpp after r139013.
3296
3297         * rendering/RenderingAllInOne.cpp:
3298
3299 2013-01-07  Emil A Eklund  <eae@chromium.org>
3300
3301         REGRESSION(SUBPIXEL_LAYOUT): el.offsetWidth < el.clientWidth for elements of a certain size
3302         https://bugs.webkit.org/show_bug.cgi?id=106107
3303
3304         Reviewed by Levi Weintraub.
3305         
3306         Add overloaded pixelSnappedOffsetWidth|Height methods to
3307         RenderBox that do pixel snapping with the same offset
3308         as clientWidth/height to ensure consistent rounding.
3309
3310         Test: fast/sub-pixel/client-and-offset-width.html
3311
3312         * rendering/RenderBox.cpp:
3313         (WebCore::RenderBox::pixelSnappedOffsetWidth):
3314         (WebCore::RenderBox::pixelSnappedOffsetHeight):
3315         Snap using the same offset as the clientWidth/height versions.
3316         
3317         * rendering/RenderBox.h:
3318         Remove out of date FIXME and add OVERRIDE keyword.
3319         
3320         * rendering/RenderBoxModelObject.h:
3321         Mark pixelSnappedOffsetWidth|Height as virtual.
3322
3323 2013-01-07  Adam Barth  <abarth@webkit.org>
3324
3325         Introduce HTMLParserOptions to encapsulate HTML parser options
3326         https://bugs.webkit.org/show_bug.cgi?id=106251
3327
3328         Reviewed by Eric Seidel.
3329
3330         Currently, the HTMLTreeBuilder (and potentially other parts of the
3331         parser) use their Document* to read configuration information from the
3332         Document (such as Settings). This patch introduces the
3333         HTMLParserOptions class to encapsulate that information, making it
3334         easier to move the HTML parser to a background thread (because the
3335         HTMLTreeBuilder won't need to talk to the Document directly).
3336
3337         * CMakeLists.txt:
3338         * GNUmakefile.list.am:
3339         * Target.pri:
3340         * WebCore.gypi:
3341         * WebCore.vcproj/WebCore.vcproj:
3342         * html/parser/HTMLDocumentParser.cpp:
3343         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3344         (WebCore::HTMLDocumentParser::pumpTokenizer):
3345         (WebCore::HTMLDocumentParser::insert):
3346         * html/parser/HTMLDocumentParser.h:
3347         (HTMLDocumentParser):
3348         * html/parser/HTMLPreloadScanner.cpp:
3349         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
3350         * html/parser/HTMLPreloadScanner.h:
3351         (WebCore):
3352         (HTMLPreloadScanner):
3353         * html/parser/HTMLTreeBuilder.cpp:
3354         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
3355         (WebCore::HTMLTreeBuilder::processEndTag):
3356         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
3357         * html/parser/HTMLTreeBuilder.h:
3358         (WebCore::HTMLTreeBuilder::create):
3359         (HTMLTreeBuilder):
3360         * html/parser/HTMLViewSourceParser.cpp:
3361         (WebCore::HTMLViewSourceParser::HTMLViewSourceParser):
3362
3363 2013-01-07  Joseph Pecoraro  <pecoraro@apple.com>
3364
3365         Minor improvements to HTMLMediaElement
3366         https://bugs.webkit.org/show_bug.cgi?id=105353
3367
3368         Reviewed by Eric Carlson.
3369
3370         * html/HTMLMediaElement.cpp:
3371         (WebCore::HTMLMediaElement::canPlayType):
3372         (WebCore::createFileURLForApplicationCacheResource):
3373         (WebCore::stringForNetworkState):
3374         (WebCore::HTMLMediaElement::preload):
3375         (WebCore::HTMLMediaElement::getPluginProxyParams):
3376         Use ASCIILiteral for literal strings becoming WTFStrings.
3377
3378         (WebCore::HTMLMediaElement::setLoop):
3379         By going through setAttribute, parseAttribute would already take care of
3380         updating the disable sleep, so the call here is not needed.
3381
3382 2013-01-07  Joseph Pecoraro  <pecoraro@apple.com>
3383
3384         String improvements in geolocation and notifications modules
3385         https://bugs.webkit.org/show_bug.cgi?id=105352
3386
3387         Reviewed by Sam Weinig.
3388
3389         * Modules/geolocation/Geolocation.cpp:
3390         (WebCore::Geolocation::GeoNotifier::timerFired):
3391         (WebCore::Geolocation::startRequest):
3392         (WebCore::Geolocation::requestUsesCachedPosition):
3393         (WebCore::Geolocation::makeCachedPositionCallbacks):
3394         (WebCore::Geolocation::setIsAllowed):
3395         (WebCore::Geolocation::cancelRequests):
3396         (WebCore::Geolocation::handlePendingPermissionNotifiers):
3397         * Modules/geolocation/GeolocationController.cpp:
3398         (WebCore::GeolocationController::positionChanged):
3399         * Modules/notifications/WorkerContextNotifications.cpp:
3400         Use ASCIILiteral for constant strings becoming WTFStrings.
3401
3402         (WebCore::WorkerContextNotifications::from):
3403         Use AtomicString::ConstructFromLiteral for the static local.
3404
3405 2013-01-07  Chris Fleizach  <cfleizach@apple.com>
3406
3407         AX: the text of render counters are not exposed to Accessibility
3408         https://bugs.webkit.org/show_bug.cgi?id=103794
3409
3410         Reviewed by Ryosuke Niwa.
3411
3412         Support RenderText objects that don't have nodes (like RenderCounter).
3413
3414         Test: accessibility/render-counter-text.html
3415
3416         * accessibility/AccessibilityRenderObject.cpp:
3417         (WebCore::AccessibilityRenderObject::textUnderElement):
3418
3419 2013-01-07  Tim Horton  <timothy_horton@apple.com>
3420
3421         Tiled-layer TileCaches shouldn't unparent offscreen tiles
3422         https://bugs.webkit.org/show_bug.cgi?id=106258
3423         <rdar://problem/12969116>
3424
3425         Reviewed by Simon Fraser.
3426
3427         Add a setting on TiledBacking (implemented on TileCache) that controls whether or not
3428         the TileCache should unparent offscreen tiles. We can't use this behavior for tiled-layer TileCaches
3429         currently because m_isInWindow is not updated for tiled-layer TileCaches, and because we haven't
3430         decided exactly what their behavior should be. So, revert to the old behavior for them.
3431
3432         * platform/graphics/TiledBacking.h:
3433         * platform/graphics/ca/mac/TileCache.h:
3434         (TileCache): Add setUnparentsOffscreenTiles/unparentsOffscreenTiles.
3435         * platform/graphics/ca/mac/TileCache.mm:
3436         (WebCore::TileCache::TileCache): m_unparentsOffscreenTiles defaults to false.
3437         (WebCore::TileCache::revalidateTiles):
3438         Return to the old behavior of always adding new layers to the layer tree regardless of m_isInWindow if m_unparentsOffscreenTiles is false.
3439         Return to the old behavior of never unparenting tiles regardless of m_isInWindow if m_unparentsOffscreenTiles is false.
3440         (WebCore::TileCache::ensureTilesForRect): Return to the old behavior of always ensuring tiles regardless of m_isInWindow if m_unparentsOffscreenTiles is false.
3441         * rendering/RenderLayerBacking.cpp:
3442         (WebCore::RenderLayerBacking::RenderLayerBacking): Tell primary TileCaches that it's OK to unparent offscreen tiles.
3443
3444 2013-01-07  Justin Novosad  <junov@google.com>
3445
3446         Fixing memory read after free in CanvasRenderingContext2D::accessFont
3447         https://bugs.webkit.org/show_bug.cgi?id=106244
3448
3449         Reviewed by Abhishek Arya.
3450
3451         Using a temporary String object to hold ref count on string that is
3452         passed by reference in CanvasRenderingContext2D::accessFont.
3453
3454         Test: fast/canvas/canvas-measureText.html
3455
3456         * html/canvas/CanvasRenderingContext2D.cpp:
3457         (WebCore::CanvasRenderingContext2D::accessFont):
3458
3459 2013-01-07  Anders Carlsson  <andersca@apple.com>
3460
3461         DOMEvents.h should include DOMProgressEvent.h