1fb8d4bb4c1b1559fbdb750e0ef7912a9c2028b1
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-13  Christian Biesinger  <cbiesinger@chromium.org>
2
3         Crash when encountering <object style="resize:both;">
4         https://bugs.webkit.org/show_bug.cgi?id=109728
5
6         See also https://code.google.com/p/chromium/issues/detail?id=175535
7         This bug can be reproduced on
8         http://dramalink.net/tudou.y/?xink=162601060
9
10         Reviewed by Eric Seidel.
11
12         Test: fast/css/resize-object-crash.html
13
14         * rendering/RenderWidget.cpp:
15         (WebCore::RenderWidget::paint):
16         Only call paintResizer() if we have a layer and canResize() is true
17
18 2013-02-13  Arko Saha  <arko@motorola.com>
19
20         [Microdata] HTMLPropertiesCollection code cleanup
21         https://bugs.webkit.org/show_bug.cgi?id=109721
22
23         Reviewed by Ryosuke Niwa.
24
25         Removed forward declaration of DOMStringList class.
26         Removed unused findRefElements() method declaration.
27         Also Removed unused parameter Element* from updatePropertyCache() method.
28
29         No new test since no change in behavior.
30
31         * html/HTMLPropertiesCollection.cpp:
32         (WebCore::HTMLPropertiesCollection::updateNameCache):
33         * html/HTMLPropertiesCollection.h:
34         (WebCore):
35         (HTMLPropertiesCollection):
36         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
37
38 2013-02-13  Kondapally Kalyan  <kalyan.kondapally@intel.com>
39
40         [WebGL][EFL][GTK][Qt]Add support for OES_vertex_array_object.
41         https://bugs.webkit.org/show_bug.cgi?id=109382
42
43         Reviewed by Kenneth Russell.
44
45         Covered by fast/canvas/webgl/oes-vertex-array-object.html
46
47         This patch adds support for using Vertex Array Object with OpenGl.
48         The patch adds support for loading necessary opengl functions
49         and support for checking GL_ARB_vertex_array_object. The support
50         for OES_vertex_array_object is advertised if GL_ARB_vertex_array_object is
51         supported.
52
53         * platform/graphics/OpenGLShims.cpp:
54         (WebCore::initializeOpenGLShims):
55         * platform/graphics/OpenGLShims.h:
56         (_OpenGLFunctionTable):
57         Added support for loading the necessary functions.
58
59         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
60         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
61         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
62         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
63         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
64         (WebCore::Extensions3DOpenGL::supportsExtension):
65
66         (WebCore):
67         (WebCore::Extensions3DOpenGL::isVertexArrayObjectSupported):
68         * platform/graphics/opengl/Extensions3DOpenGL.h:
69         (Extensions3DOpenGL):
70
71 2013-02-13  Eberhard Graether  <egraether@google.com>
72
73         chromium: remove CompositorHUDFontAtlas
74         https://bugs.webkit.org/show_bug.cgi?id=109328
75
76         Reviewed by James Robinson.
77
78         After switching the HudLayer to use skia's font rendering the
79         CompositorHUDFontAtlas has become obsolete. This change removes
80         this class and the related WebLayerTreeView API.
81
82         No new tests.
83
84         * WebCore.gypi:
85         * platform/graphics/chromium/CompositorHUDFontAtlas.cpp: Removed.
86         * platform/graphics/chromium/CompositorHUDFontAtlas.h: Removed.
87
88 2013-02-13  Dean Jackson  <dino@apple.com>
89
90         Small update to speech bubble for captions menu [Mac]
91         https://bugs.webkit.org/show_bug.cgi?id=109641
92
93         Reviewed by Eric Carlson
94
95         Small adjustment to the embedded SVG that draws a speech bubble
96         for the captions button. Remove a polygon that was so small
97         it looked like a rendering error.
98
99         * css/mediaControlsQuickTime.css:
100         (video::-webkit-media-controls-toggle-closed-captions-button):
101
102 2013-02-13  Dean Jackson  <dino@apple.com>
103
104         Clicking outside captions menu should dismiss it
105         https://bugs.webkit.org/show_bug.cgi?id=109648
106
107         Reviewed by Eric Carlson.
108
109         Add a virtual override to the platform-specific
110         defaultEventHandler to intercept any click in the controls,
111         and hide the captions menu if it is showing.
112
113         Test: media/video-controls-captions-trackmenu-hide-on-click.html
114
115         * html/shadow/MediaControlsApple.cpp:
116         (WebCore::MediaControlsApple::defaultEventHandler): Override from MediaControls. Hide
117             captions menu if a click event comes in.
118         * html/shadow/MediaControlsApple.h:
119
120 2013-02-13  Tommy Widenflycht  <tommyw@google.com>
121
122         MediaStream API: Use the source id when creating new tracks
123         https://bugs.webkit.org/show_bug.cgi?id=109688
124
125         Reviewed by Adam Barth.
126
127         This patch reuses the ids from the source when creating tracks instead of creating a new one.
128         This was requested by the chromium port to greatly simplify their implementation.
129         In the longer run the API should be rewritten to only use tracks instead of sources.
130
131         Covered by existing tests.
132
133         * platform/chromium/support/WebMediaStream.cpp:
134         (WebKit::WebMediaStream::audioTracks):
135         (WebKit::WebMediaStream::videoTracks):
136         (WebKit::WebMediaStream::initialize):
137         (WebKit):
138         * platform/chromium/support/WebMediaStreamTrack.cpp:
139         (WebKit::WebMediaStreamTrack::initialize):
140         (WebKit):
141         * platform/mediastream/MediaStreamComponent.h:
142         (WebCore::MediaStreamComponent::create):
143         (MediaStreamComponent):
144         (WebCore::MediaStreamComponent::MediaStreamComponent):
145         (WebCore):
146         * platform/mediastream/MediaStreamDescriptor.h:
147         (WebCore::MediaStreamDescriptor::create):
148         (MediaStreamDescriptor):
149         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
150
151 2013-02-13  Eric Seidel  <eric@webkit.org>
152
153         Use fancy new Vector-based String constructors in the WebVTT parser
154         https://bugs.webkit.org/show_bug.cgi?id=109619
155
156         Reviewed by Benjamin Poulain.
157
158         No change in behavior. Added some FIXMEs for future perf optimization.
159
160         * html/track/WebVTTParser.cpp:
161         (WebCore::WebVTTParser::constructTreeFromToken):
162
163 2013-02-13  Morten Stenshorne  <mstensho@opera.com>
164
165         WebKit ignores column-rules wider than column-gap
166         https://bugs.webkit.org/show_bug.cgi?id=15553
167
168         Paint column rules even if they are wider than the gap.
169         Rules wider than the gap should just overlap with column contents.
170
171         Reviewed by Eric Seidel.
172
173         Test: fast/multicol/rule-thicker-than-gap.html
174
175         * rendering/RenderBlock.cpp:
176         (WebCore::RenderBlock::paintColumnRules):
177
178 2013-02-13  Philip Rogers  <pdr@google.com>
179
180         Replace SVG bitmap cache with directly-rendered SVG
181         https://bugs.webkit.org/show_bug.cgi?id=106159
182
183         Reviewed by Tim Horton.
184
185         This patch removes the caching of SVG bitmaps so SVG images are rendered directly. This
186         enables WebKit to pass the IE Chalkboard demo in 10s on a Z620:
187         http://ie.microsoft.com/testdrive/Performance/Chalkboard/
188
189         On a simple scaled SVG benchmark similar to the IE10 Chalkboard demo
190         (http://philbit.com/SvgImagePerformance/viewport.html):
191             without patch: ~20FPS
192             with patch: ~55FPS
193
194         The bitmap SVG image cache had several shortcomings:
195             - The bitmap cache prevented viewport rendering. (WK104693)
196             - Bitmap memory usage was high. (WK106484)
197             - Caching animating images was expensive.
198
199         This change removes almost all of the SVGImageCache implementation, replacing it with
200         directly-rendered SVG. Instead of caching bitmaps, an SVGImageForContainer is cached which
201         is a thin wrapper around an SVG image with the associated container size and scale.
202         When rendering patterns (e.g., tiled backgrounds), a temporary bitmap is used for
203         performance. This change also removes the redraw timer of the old cache, instead relying
204         on the SVG image to notify clients if the image changes (e.g., during animations).
205
206         This patch fixes two existing bugs (WK99481 and WK104189) that were due to caching bitmaps
207         at a fixed size. A test has been added for each of these bugs.
208
209         Tests: svg/as-image/svg-image-scaled.html
210                svg/as-image/svg-image-viewbox.html
211
212         * CMakeLists.txt:
213         * GNUmakefile.list.am:
214         * Target.pri:
215         * WebCore.gypi:
216         * WebCore.vcproj/WebCore.vcproj:
217         * WebCore.xcodeproj/project.pbxproj:
218         * loader/cache/CachedImage.cpp:
219         (WebCore::CachedImage::lookupOrCreateImageForRenderer):
220         (WebCore::CachedImage::setContainerSizeForRenderer):
221         (WebCore::CachedImage::clear):
222         (WebCore::CachedImage::changedInRect):
223
224             SVG images are no longer special-cased here. When the SVG image changes, users are
225             notified through this function, and users can then request their content to be redrawn.
226
227         * svg/graphics/SVGImage.cpp:
228         (WebCore::SVGImage::setContainerSize):
229         (WebCore::SVGImage::drawForContainer):
230
231             drawForContainer lays out the SVG content for a specific container size and renders it.
232             The logic is fairly straightforward but a note about the scales and zooms here:
233                 the destination rect parameter is zoomed but not scaled
234                 the source rect parameter is zoomed but not scaled
235                 the context is scaled but not zoomed
236             SVGImage::draw(...) only accepts a source and destination rect but does not consider
237             scale or zoom. Therefore, drawForContainer removes the zoom component from the source
238             so SVGImage::draw(...) will draw from the pre-zoom source to the post-zoom destination.
239
240         (WebCore::SVGImage::drawPatternForContainer):
241
242             For performance, drawPatternForContainer renders the SVG content onto a bitmap, then
243             has the bitmap image draw the pattern. This is necessary because drawPattern is used
244             for tiling.
245
246         (WebCore):
247         (WebCore::SVGImage::startAnimation):
248         (WebCore::SVGImage::stopAnimation):
249         (WebCore::SVGImage::resetAnimation):
250         (WebCore::SVGImage::reportMemoryUsage):
251         * svg/graphics/SVGImage.h:
252         (WebCore):
253         (SVGImage):
254         * svg/graphics/SVGImageCache.cpp:
255
256             Instead of storing a SizeAndScales values for each renderer, a SVGImageForContainer
257             is stored which is just a thin wrapper around an SVG image that contains container
258             sizing information. By combining the image and size information, the two maps of
259             SVGImageCache have been merged into one.
260
261             To make this patch easier to review, SVGImageCache still exists and works similar to
262             how it did before the patch. Now, SVGImageCache simply stores the SVGImageForContainers.
263             In a followup patch it will be removed.
264
265             Note: the redraw timer of SVGImageCache has been removed because animation
266             invalidation is now properly propagated back to the image clients.
267
268         (WebCore):
269         (WebCore::SVGImageCache::SVGImageCache):
270         (WebCore::SVGImageCache::~SVGImageCache):
271         (WebCore::SVGImageCache::removeClientFromCache):
272         (WebCore::SVGImageCache::setContainerSizeForRenderer):
273         (WebCore::SVGImageCache::imageSizeForRenderer):
274
275             Previously, this function returned the scaled image size which was incorrect. The image
276             size is used by clients such as GraphicsContext2D to determine the source size
277             for drawing the image. draw() accepts zoomed but not scaled values, so this has been
278             changed.
279
280         (WebCore::SVGImageCache::imageForRenderer):
281
282             A FIXME has been added here to not set the scale on every lookup. This can be improved
283             by setting the page scale factor in setContainerSizeForRenderer() in a future patch.
284
285         * svg/graphics/SVGImageCache.h:
286         (WebCore):
287         (SVGImageCache):
288         * svg/graphics/SVGImageForContainer.cpp: Added.
289         (WebCore):
290
291             SVGImageForContainer is a thin wrapper around an SVG image. The lifetime of the
292             SVGImage will be longer than the image cache.
293
294         (WebCore::SVGImageForContainer::size):
295
296             This is the only logic in SVGImageForContainer. The size returned needs to be zoomed
297             but not scaled because it is used (e.g., by RenderImage) to pass back into draw() which
298             takes zoomed but not scaled values.
299
300         (WebCore::SVGImageForContainer::draw):
301         (WebCore::SVGImageForContainer::drawPattern):
302         * svg/graphics/SVGImageForContainer.h: Added.
303         (WebCore):
304         (SVGImageForContainer):
305
306             In a future patch SVGImageForContainer can be made immutable but without a refactoring
307             for not setting the page scale factor in SVGImageCache::lookupOrCreateImageForRenderer,
308             setters are needed.
309
310         (WebCore::SVGImageForContainer::create):
311         (WebCore::SVGImageForContainer::containerSize):
312         (WebCore::SVGImageForContainer::pageScale):
313         (WebCore::SVGImageForContainer::zoom):
314         (WebCore::SVGImageForContainer::setSize):
315         (WebCore::SVGImageForContainer::setZoom):
316         (WebCore::SVGImageForContainer::setPageScale):
317         (WebCore::SVGImageForContainer::SVGImageForContainer):
318         (WebCore::SVGImageForContainer::destroyDecodedData):
319         (WebCore::SVGImageForContainer::decodedSize):
320
321 2013-02-12  Antti Koivisto  <antti@apple.com>
322
323         Avoid updating timer heap when nothing changes
324         https://bugs.webkit.org/show_bug.cgi?id=109630
325
326         Reviewed by Andreas Kling.
327
328         When the fire time of a Timer is changed we remove it from the timer heap and reinsert it. This is pretty slow. 
329         Turns out that in ~80% of cases we are already in the heap and the insertion position is the same as the 
330         original position. We can check if anything is actually going to change before doing this work.
331         
332         This makes starting a timer ~30% faster in average, ~0.1% progression in PLT3.
333         
334         * platform/Timer.cpp:
335         (TimerHeapLessThanFunction):
336         (WebCore::TimerHeapLessThanFunction::operator()):
337         (WebCore::parentHeapPropertyHolds):
338         (WebCore):
339         (WebCore::childHeapPropertyHolds):
340         (WebCore::TimerBase::hasValidHeapPosition):
341         
342             The code here assumes that STL heap is a normal binary heap. If there is a different implementation
343             somewhere the assertions will catch it.
344
345         (WebCore::TimerBase::updateHeapIfNeeded):
346         
347             Skip updating the heap if it is already valid.
348
349         (WebCore::TimerBase::setNextFireTime):
350         * platform/Timer.h:
351         (TimerBase):
352
353 2013-02-13  Martin Robinson  <mrobinson@igalia.com>
354
355         [GTK] Remove remaining dead code from the GLib unicode backend
356         https://bugs.webkit.org/show_bug.cgi?id=109707
357
358         Reviewed by Philippe Normand.
359
360         * platform/KURL.cpp:
361         (WebCore::appendEncodedHostname):
362         * platform/text/TextEncoding.cpp:
363         (WebCore::TextEncoding::encode):
364         * platform/text/TextEncodingRegistry.cpp:
365         (WebCore::buildBaseTextCodecMaps):
366         (WebCore::extendTextCodecMaps):
367
368 2013-02-13  Xianzhu Wang  <wangxianzhu@chromium.org>
369
370         Heap-use-after-free in WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects
371         https://bugs.webkit.org/show_bug.cgi?id=108695
372
373         See comments of RenderLayerModelObject::willBeDestroyed() below for details.
374
375         Reviewed by Abhishek Arya.
376
377         Test: ManulTests/scrolling-coordinator-viewport-constrained-crash.html
378         Unable to write a normal layout test because
379         1) must waitUntilDone() to reproduce the crash but the redirected URL can't notifyDone();
380         2) Can't use a frame to contain the test because ScrollingCoordinator handles only the main frame.
381
382         * rendering/RenderBoxModelObject.cpp:
383         (WebCore::RenderBoxModelObject::willBeDestroyed): Moved removeViewportConstrainedObject() call into RenderLayerModelObject::willBeDestroyed() because only RenderLayerModelObjects can be added as viewportConstrainedObjects.
384         * rendering/RenderLayerModelObject.cpp:
385         (WebCore::RenderLayerModelObject::willBeDestroyed): Changed this->view() (then view->frameView()) to this->frame() (then frame->view()) because when willBeDestroyed() is called, the document has set its renderView to 0 thus this->view() will return 0, causing removeViewportConstrainedObject() not called and a deleted RenderLayerModelObject in FrameView's viewportConstrainedObjects.
386
387 2013-02-13  Florin Malita  <fmalita@chromium.org>
388
389         [SVG] OOB access in SVGListProperty::replaceItemValues()
390         https://bugs.webkit.org/show_bug.cgi?id=109293
391
392         Replacing a list property item with itself should be a no-op. This patch updates the related
393         APIs and logic to detect the self-replace case and prevent removal of the item from the list.
394
395         To avoid scanning the list multiple times, removeItemFromList() is updated to operate on
396         indices and a findItem() method is added to resolve an item to an index.
397
398         Reviewed by Dirk Schulze.
399
400         No new tests: updated existing tests cover the change.
401
402         * svg/properties/SVGAnimatedListPropertyTearOff.h:
403         (WebCore::SVGAnimatedListPropertyTearOff::findItem):
404         (SVGAnimatedListPropertyTearOff):
405         (WebCore::SVGAnimatedListPropertyTearOff::removeItemFromList):
406         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
407         (WebCore::SVGAnimatedPathSegListPropertyTearOff::findItem):
408         (SVGAnimatedPathSegListPropertyTearOff):
409         (WebCore::SVGAnimatedPathSegListPropertyTearOff::removeItemFromList):
410         Add a findItem() delegating method, and update removeItemFromList() to use the new
411         index-based API.
412
413         * svg/properties/SVGListProperty.h:
414         (WebCore::SVGListProperty::insertItemBeforeValues):
415         (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
416         (WebCore::SVGListProperty::replaceItemValues):
417         (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
418         (SVGListProperty):
419         Updated to handle the no-op case for insertItemBefore() & replaceItem().
420
421         * svg/properties/SVGListPropertyTearOff.h:
422         (WebCore::SVGListPropertyTearOff::findItem):
423         (WebCore::SVGListPropertyTearOff::removeItemFromList):
424         Index-based API updates.
425
426         (WebCore::SVGListPropertyTearOff::processIncomingListItemValue):
427         (WebCore::SVGListPropertyTearOff::processIncomingListItemWrapper):
428         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
429         (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemValue):
430         Detect the self-replace case and return without removing the item from the list.
431
432         * svg/properties/SVGPathSegListPropertyTearOff.h:
433         (WebCore::SVGPathSegListPropertyTearOff::findItem):
434         (WebCore::SVGPathSegListPropertyTearOff::removeItemFromList):
435         (SVGPathSegListPropertyTearOff):
436         (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemWrapper):
437         * svg/properties/SVGStaticListPropertyTearOff.h:
438         (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemValue):
439         (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemWrapper):
440         Index-based API updates.
441
442 2013-02-13  Takashi Sakamoto  <tasak@google.com>
443
444         [Refactoring] StyleResolver::State should have methods to access its member variables.
445         https://bugs.webkit.org/show_bug.cgi?id=108563
446
447         Reviewed by Antti Koivisto.
448
449         Made all member variables private and added methods to access the
450         variables, because most of the member variables are read-only.
451         We don't need to update those read-only variables while resolving
452         styles.
453
454         No new tests, because just refactoring.
455
456         * css/SVGCSSStyleSelector.cpp:
457         (WebCore::StyleResolver::applySVGProperty):
458         * css/StyleResolver.cpp:
459         (WebCore):
460         (WebCore::StyleResolver::collectMatchingRules):
461         (WebCore::StyleResolver::collectMatchingRulesForRegion):
462         (WebCore::StyleResolver::sortAndTransferMatchedRules):
463         (WebCore::StyleResolver::matchScopedAuthorRules):
464         (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules):
465         (WebCore::StyleResolver::matchHostRules):
466         (WebCore::StyleResolver::matchAuthorRules):
467         (WebCore::StyleResolver::matchUserRules):
468         (WebCore::StyleResolver::matchUARules):
469         (WebCore::StyleResolver::collectMatchingRulesForList):
470         (WebCore::StyleResolver::sortMatchedRules):
471         (WebCore::StyleResolver::matchAllRules):
472         (WebCore::StyleResolver::State::initElement):
473         (WebCore::StyleResolver::initElement):
474         Modified to invoke m_state.initElement if a given element is
475         different from current m_state's element.
476         (WebCore::StyleResolver::State::initForStyleResolve):
477         Moved from StyleResolver.
478         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
479         (WebCore::StyleResolver::canShareStyleWithControl):
480         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
481         (WebCore::StyleResolver::canShareStyleWithElement):
482         (WebCore::StyleResolver::locateSharedStyle):
483         (WebCore::StyleResolver::styleForElement):
484         (WebCore::StyleResolver::styleForKeyframe):
485         (WebCore::StyleResolver::keyframeStylesForAnimation):
486         (WebCore::StyleResolver::pseudoStyleForElement):
487         Changed ASSERT in the first line. ASSERT(m_state.parentStyle) would be
488         wrong, because it depends on previous resolving. However,
489         initForStyleResolve will also update m_state.parentStyle. No code in
490         pseudoStyleForElement depends on previous resolving state.
491         (WebCore::StyleResolver::styleForPage):
492         (WebCore::StyleResolver::defaultStyleForElement):
493         (WebCore::StyleResolver::adjustRenderStyle):
494         (WebCore::StyleResolver::updateFont):
495         (WebCore::StyleResolver::pseudoStyleRulesForElement):
496         (WebCore::StyleResolver::ruleMatches):
497         Added one more parameter, dynamicPseudo, because dynamicPseudo in
498         State class is just used for returning matched pseudo style from
499         this ruleMatches to collectMatchingRulesForList. No need to keep
500         dynamicPseudo while resolving styles.
501         (WebCore::StyleResolver::checkRegionSelector):
502         Removed m_pseudoStyle = NOPSEUDO, because this method uses just
503         SelectorChecker::matched. SelectorChecker doesn't see StyleResolver's
504         m_pseudoStyle directly. Need to use SelectorCheckerContext. So no
505         need to set m_pseudoStyle to be NOPSEUDO.
506         (WebCore::StyleResolver::applyProperties):
507         (WebCore::StyleResolver::applyMatchedProperties):
508         (WebCore::StyleResolver::isLeftPage):
509         (WebCore::StyleResolver::applyPropertyToStyle):
510         (WebCore::StyleResolver::useSVGZoomRules):
511         (WebCore::createGridTrackBreadth):
512         (WebCore::StyleResolver::resolveVariables):
513         (WebCore::StyleResolver::applyProperty):
514         (WebCore::StyleResolver::cachedOrPendingFromValue):
515         (WebCore::StyleResolver::generatedOrPendingFromValue):
516         (WebCore::StyleResolver::setOrPendingFromValue):
517         (WebCore::StyleResolver::cursorOrPendingFromValue):
518         (WebCore::StyleResolver::checkForTextSizeAdjust):
519         (WebCore::StyleResolver::initializeFontStyle):
520         (WebCore::StyleResolver::setFontSize):
521         (WebCore::StyleResolver::colorFromPrimitiveValue):
522         (WebCore::StyleResolver::loadPendingSVGDocuments):
523         (WebCore::StyleResolver::cachedOrPendingStyleShaderFromValue):
524         (WebCore::StyleResolver::loadPendingShaders):
525         (WebCore::StyleResolver::parseCustomFilterTransformParameter):
526         (WebCore::StyleResolver::createFilterOperations):
527         (WebCore::StyleResolver::loadPendingImage):
528         (WebCore::StyleResolver::loadPendingImages):
529         * css/StyleResolver.h:
530         (WebCore::StyleResolver::style):
531         (WebCore::StyleResolver::parentStyle):
532         (WebCore::StyleResolver::rootElementStyle):
533         (WebCore::StyleResolver::element):
534         (WebCore::StyleResolver::hasParentNode):
535         (StyleResolver):
536         (WebCore::StyleResolver::State::State):
537         (State):
538         (WebCore::StyleResolver::State::clear):
539         Modified to use clear at the end of styleForElement.
540         (WebCore::StyleResolver::State::document):
541         (WebCore::StyleResolver::State::element):
542         (WebCore::StyleResolver::State::styledElement):
543         (WebCore::StyleResolver::State::setStyle):
544         (WebCore::StyleResolver::State::style):
545         (WebCore::StyleResolver::State::takeStyle):
546         (WebCore::StyleResolver::State::ensureRuleList):
547         (WebCore::StyleResolver::State::takeRuleList):
548         (WebCore::StyleResolver::State::parentNode):
549         (WebCore::StyleResolver::State::setParentStyle):
550         (WebCore::StyleResolver::State::parentStyle):
551         (WebCore::StyleResolver::State::rootElementStyle):
552         (WebCore::StyleResolver::State::regionForStyling):
553         (WebCore::StyleResolver::State::setSameOriginOnly):
554         (WebCore::StyleResolver::State::isSameOriginOnly):
555         (WebCore::StyleResolver::State::pseudoStyle):
556         (WebCore::StyleResolver::State::elementLinkState):
557         (WebCore::StyleResolver::State::distributedToInsertionPoint):
558         (WebCore::StyleResolver::State::setElementAffectedByClassRules):
559         (WebCore::StyleResolver::State::elementAffectedByClassRules):
560         (WebCore::StyleResolver::State::setApplyPropertyToRegularStyle):
561         (WebCore::StyleResolver::State::setApplyPropertyToVisitedLinkStyle):
562         (WebCore::StyleResolver::State::applyPropertyToRegularStyle):
563         (WebCore::StyleResolver::State::applyPropertyToVisitedLinkStyle):
564         (WebCore::StyleResolver::State::pendingImageProperties):
565         (WebCore::StyleResolver::State::pendingSVGDocuments):
566         (WebCore::StyleResolver::State::setHasPendingShaders):
567         (WebCore::StyleResolver::State::hasPendingShaders):
568         (WebCore::StyleResolver::State::setLineHeightValue):
569         (WebCore::StyleResolver::State::lineHeightValue):
570         (WebCore::StyleResolver::State::setFontDirty):
571         (WebCore::StyleResolver::State::fontDirty):
572         (WebCore::StyleResolver::State::cacheBorderAndBackground):
573         (WebCore::StyleResolver::State::hasUAAppearance):
574         (WebCore::StyleResolver::State::borderData):
575         (WebCore::StyleResolver::State::backgroundData):
576         (WebCore::StyleResolver::State::backgroundColor):
577         (WebCore::StyleResolver::State::fontDescription):
578         (WebCore::StyleResolver::State::parentFontDescription):
579         (WebCore::StyleResolver::State::setFontDescription):
580         (WebCore::StyleResolver::State::setZoom):
581         (WebCore::StyleResolver::State::setEffectiveZoom):
582         (WebCore::StyleResolver::State::setTextSizeAdjust):
583         (WebCore::StyleResolver::State::setWritingMode):
584         (WebCore::StyleResolver::State::setTextOrientation):
585         fontDescription, ... and setTextOrientation were moved from
586         StyleResolver.
587         (WebCore::StyleResolver::State::matchedRules):
588         (WebCore::StyleResolver::State::addMatchedRule):
589         Moved from StyleResolver.
590         (WebCore::StyleResolver::applyPropertyToRegularStyle):
591         (WebCore::StyleResolver::applyPropertyToVisitedLinkStyle):
592         (WebCore::StyleResolver::fontDescription):
593         (WebCore::StyleResolver::parentFontDescription):
594         (WebCore::StyleResolver::setFontDescription):
595         (WebCore::StyleResolver::setZoom):
596         (WebCore::StyleResolver::setEffectiveZoom):
597         (WebCore::StyleResolver::setTextSizeAdjust):
598         (WebCore::StyleResolver::setWritingMode):
599         (WebCore::StyleResolver::setTextOrientation):
600         These fontDescription, ..., setTextOrientation are wrappers to
601         invoke State's methods. StyleBuilder still depends on StyleResolver
602         and invokes these methods. So we need these wrappers.
603
604 2013-02-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
605
606         [Qt] window.open passes height and width parameters even if not defined in a page
607         https://bugs.webkit.org/show_bug.cgi?id=107705
608
609         Reviewed by Kenneth Rohde Christiansen.
610
611         Do not override width or height of 0, as that indicates default size, and not minimum size.
612
613         Tested by tst_qwebpage.
614
615         * page/DOMWindow.cpp:
616         (WebCore::DOMWindow::adjustWindowRect):
617
618 2013-02-13  Rashmi Shyamasundar  <rashmi.s2@samsung.com>
619
620         The 2D Canvas functions fillText()/strokeText() should display nothing when maxWidth is less then or equal to zero
621         https://bugs.webkit.org/show_bug.cgi?id=102656
622
623         Reviewed by Dirk Schulze.
624
625         The functions fillText()/strokeText() should not display anything when 
626         maxWidth is less than or equal to zero, according to spec :
627         http://www.w3.org/TR/2dcontext/#text-preparation-algorithm
628
629         Test: fast/canvas/canvas-fillText-maxWidth-zero.html
630
631         * html/canvas/CanvasRenderingContext2D.cpp:
632         (WebCore::CanvasRenderingContext2D::drawTextInternal):
633
634 2013-02-13  ChangSeok Oh  <shivamidow@gmail.com>
635
636         [GTK][AC] Implement basic transform animations with clutter ac backend
637         https://bugs.webkit.org/show_bug.cgi?id=109363
638
639         Reviewed by Gustavo Noronha Silva.
640
641         Implement basic transform animation with clutter ac backend.
642         GraphicsLayerClutter is almost same with GraphicsLayerCA. And PlatformClutterAnimation
643         interfaces are also similar with PlatformCAAnimation, but they are implemented
644         with native clutter APIs. Clutter backend AC supports a basic single transform animation
645         with this patch now, but additive animation combination and keyframe animation
646         are not supported yet.
647
648         Covered by existing animation tests.
649
650         * platform/graphics/clutter/GraphicsLayerActor.cpp:
651         (graphicsLayerActorSetTransform):
652         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
653         (WebCore::isTransformTypeTransformationMatrix):
654         (WebCore):
655         (WebCore::isTransformTypeFloatPoint3D):
656         (WebCore::isTransformTypeNumber):
657         (WebCore::getTransformFunctionValue):
658         (WebCore::getValueFunctionNameForTransformOperation):
659         (WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
660         (WebCore::GraphicsLayerClutter::appendToUncommittedAnimations):
661         (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
662         * platform/graphics/clutter/GraphicsLayerClutter.h:
663         (GraphicsLayerClutter):
664         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
665         (WebCore::toClutterActorPropertyString):
666         (WebCore):
667         (WebCore::PlatformClutterAnimation::supportsValueFunction):
668         (WebCore::PlatformClutterAnimation::duration):
669         (WebCore::PlatformClutterAnimation::setDuration):
670         (WebCore::PlatformClutterAnimation::setAdditive):
671         (WebCore::PlatformClutterAnimation::valueFunction):
672         (WebCore::PlatformClutterAnimation::setValueFunction):
673         (WebCore::PlatformClutterAnimation::setFromValue):
674         (WebCore::PlatformClutterAnimation::setToValue):
675         (WebCore::PlatformClutterAnimation::timeline):
676         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
677         (WebCore::PlatformClutterAnimation::addOpacityTransition):
678         (WebCore::PlatformClutterAnimation::addTransformTransition):
679         (WebCore::PlatformClutterAnimation::addAnimationForKey):
680         * platform/graphics/clutter/PlatformClutterAnimation.h:
681         (PlatformClutterAnimation):
682
683 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
684
685         Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
686         https://bugs.webkit.org/show_bug.cgi?id=109554
687
688         In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
689         can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
690
691         Drive by fix: I introduced a client interface for the HeapGraphSerializer.
692         It helps me to do the tests for the serializer.
693
694         Reviewed by Yury Semikhatsky.
695
696         It is covered by newly added tests in TestWebKitAPI.
697
698         * inspector/HeapGraphSerializer.cpp:
699         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
700         (WebCore::HeapGraphSerializer::pushUpdate):
701         (WebCore::HeapGraphSerializer::reportNode):
702         (WebCore::HeapGraphSerializer::toNodeId):
703         (WebCore::HeapGraphSerializer::addRootNode):
704         * inspector/HeapGraphSerializer.h:
705         (HeapGraphSerializer):
706         (Client):
707         (WebCore::HeapGraphSerializer::Client::~Client):
708         * inspector/InspectorMemoryAgent.cpp:
709         (WebCore):
710         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
711
712 2013-02-13  Yury Semikhatsky  <yurys@chromium.org>
713
714         Web Inspector: add experimental native heap graph to Timeline panel
715         https://bugs.webkit.org/show_bug.cgi?id=109687
716
717         Reviewed by Alexander Pavlov.
718
719         Added experimentatl support for native heap graph on the Timeline panel.
720         Native memory usage data is collected after each top level task and can
721         be displayed instead of DOM counters graph on the Timeline panel if
722         corresponding experiment is enabled in the inspector settings.
723
724         * inspector/Inspector.json:
725         * inspector/InspectorController.cpp:
726         (WebCore::InspectorController::InspectorController):
727         * inspector/InspectorTimelineAgent.cpp:
728         (TimelineAgentState):
729         (WebCore::InspectorTimelineAgent::setIncludeDomCounters):
730         (WebCore):
731         (WebCore::InspectorTimelineAgent::setIncludeNativeMemoryStatistics):
732         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
733         (WebCore::InspectorTimelineAgent::setDOMCounters):
734         (WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
735         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
736         * inspector/InspectorTimelineAgent.h:
737         (WebCore):
738         (WebCore::InspectorTimelineAgent::create):
739         (InspectorTimelineAgent):
740         * inspector/WorkerInspectorController.cpp:
741         (WebCore::WorkerInspectorController::WorkerInspectorController):
742         * inspector/front-end/MemoryStatistics.js:
743         (WebInspector.MemoryStatistics):
744         * inspector/front-end/NativeMemoryGraph.js:
745         (WebInspector.NativeMemoryGraph):
746         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
747         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
748         * inspector/front-end/Settings.js:
749         (WebInspector.ExperimentsSettings):
750         * inspector/front-end/TimelinePanel.js:
751
752 2013-02-13  Vladislav Kaznacheev  <kaznacheev@chromium.org>
753
754         Web Inspector: Fixed colorpicker editing and scrolling.
755         https://bugs.webkit.org/show_bug.cgi?id=109434.
756
757         Reviewed by Alexander Pavlov.
758
759         The color picker scrolling logic relied on the fixed DOM structure which changed with the introduction of
760         SidebarPaneStack (https://bugs.webkit.org/show_bug.cgi?id=108183).
761         Added a special CSS class to mark the scroll target.
762
763         No new tests.
764
765         * inspector/front-end/SplitView.js:
766         (WebInspector.SplitView):
767         * inspector/front-end/StylesSidebarPane.js:
768         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.):
769         * inspector/front-end/TabbedPane.js:
770         (WebInspector.TabbedPane):
771  
772 2013-02-13  Andrey Lushnikov  <lushnikov@chromium.org>
773
774         Web Inspector: fix js compilation warnings in TextPrompt
775         https://bugs.webkit.org/show_bug.cgi?id=109685
776
777         Reviewed by Alexander Pavlov.
778
779         Mark last argument of _applySuggestion function as optional.
780
781         No new tests: no change in behaviour.
782
783         * inspector/front-end/TextPrompt.js:
784
785 2013-02-13  Pablo Flouret  <pablof@motorola.com>
786
787         Implement css-conditional's CSS.supports()
788         https://bugs.webkit.org/show_bug.cgi?id=100324
789
790         Reviewed by Antti Koivisto.
791
792         http://dev.w3.org/csswg/css3-conditional/#the-css-interface
793
794         The supports() method provides the css @supports rule's corresponding
795         dom api.
796         The patch also adds the CSS interface on DOMWindow, which holds "useful
797         CSS-related functions that do not belong elsewhere". This is where
798         supports() lives.
799
800         Test: css3/supports-dom-api.html
801
802         * CMakeLists.txt:
803         * DerivedSources.cpp:
804         * DerivedSources.make:
805         * DerivedSources.pri:
806         * GNUmakefile.list.am:
807         * Target.pri:
808         * WebCore.exp.in:
809         * WebCore.gypi:
810         * WebCore.vcproj/WebCore.vcproj:
811         * WebCore.xcodeproj/project.pbxproj:
812         * bindings/gobject/GNUmakefile.am:
813         * bindings/scripts/CodeGeneratorGObject.pm:
814         (SkipFunction):
815             Add DOMWindowCSS.* to the build systems.
816
817         * bindings/scripts/CodeGenerator.pm:
818         (WK_lcfirst):
819             Handle CSS prefixes correctly (s/cSS/css/).
820
821         * css/CSSGrammar.y.in:
822         * css/CSSParser.cpp:
823         (WebCore::CSSParser::CSSParser):
824         (WebCore::CSSParser::parseSupportsCondition):
825         (WebCore::CSSParser::detectAtToken):
826         * css/CSSParser.h:
827             webkit_supports_condition parses just the condition part of an
828             @supports rule and evaluates it, outputting whether the condition
829             is supported or not.
830
831         * css/CSSAllInOne.cpp:
832         * css/DOMWindowCSS.cpp: Added.
833         * css/DOMWindowCSS.h: Added.
834         * css/DOMWindowCSS.idl: Added.
835             The CSS interface object.
836
837         * page/DOMWindow.cpp:
838         (WebCore::DOMWindow::css):
839         * page/DOMWindow.h:
840         * page/DOMWindow.idl:
841             window.CSS
842
843 2013-02-13  Vladislav Kaznacheev  <kaznacheev@chromium.org>
844
845         Web Inspector: Simplify SplitView to rely more on CSS
846         https://bugs.webkit.org/show_bug.cgi?id=109426
847
848         Reviewed by Vsevolod Vlasov.
849
850         Simplified Javascript code by moving large part of the layout logic into CSS rules. The patch is larger than it
851         should be because one of the clients (TimelinePanel) is breaking SplitView incapsulation by reparenting its
852         resizer.
853
854         No new tests.
855
856         * inspector/front-end/SidebarView.js:
857         (WebInspector.SidebarView):
858         * inspector/front-end/SplitView.js:
859         (WebInspector.SplitView):
860         (WebInspector.SplitView.prototype._innerSetVertical):
861         (WebInspector.SplitView.prototype.setSecondIsSidebar):
862         (WebInspector.SplitView.prototype._showOnly):
863         (WebInspector.SplitView.prototype._removeAllLayoutProperties):
864         * inspector/front-end/TimelinePanel.js:
865         * inspector/front-end/cssNamedFlows.css:
866         (.css-named-flow-collections-view .split-view-sidebar):
867         (.css-named-flow-collections-view .split-view-sidebar .sidebar-content):
868         (.css-named-flow-collections-view .split-view-sidebar .selection):
869         (.css-named-flow-collections-view .split-view-sidebar .named-flow-overflow::before, .css-named-flow-collections-view .region-empty:before, .css-named-flow-collections-view .region-fit::before, .css-named-flow-collections-view .region-overset::before):
870         (.css-named-flow-collections-view .split-view-sidebar .named-flow-overflow::before):
871         * inspector/front-end/splitView.css:
872         (.split-view-contents.maximized):
873         (.split-view-vertical .split-view-contents):
874         (.split-view-vertical .split-view-contents-first):
875         (.split-view-vertical .split-view-contents-first.maximized):
876         (.split-view-vertical .split-view-contents-second):
877         (.split-view-vertical .split-view-contents-second.maximized):
878         (.split-view-horizontal .split-view-contents):
879         (.split-view-horizontal .split-view-contents-first):
880         (.split-view-horizontal .split-view-contents-first.maximized):
881         (.split-view-horizontal .split-view-contents-second):
882         (.split-view-horizontal .split-view-contents-second.maximized):
883         (.split-view-vertical .split-view-sidebar.split-view-contents-first:not(.maximized)):
884         (.split-view-vertical .split-view-sidebar.split-view-contents-second:not(.maximized)):
885         (.split-view-horizontal .split-view-sidebar.split-view-contents-first:not(.maximized)):
886         (.split-view-horizontal .split-view-sidebar.split-view-contents-second:not(.maximized)):
887         (.split-view-vertical .split-view-resizer):
888         (.split-view-horizontal .split-view-resizer):
889         * inspector/front-end/timelinePanel.css:
890         (.timeline.split-view-vertical .split-view-resizer):
891         (#timeline-container .split-view-sidebar):
892
893 2013-02-13  Kentaro Hara  <haraken@chromium.org>
894
895         Unreviewed, rolling out r142730.
896         http://trac.webkit.org/changeset/142730
897         https://bugs.webkit.org/show_bug.cgi?id=109666
898
899         chromium browser tests are failing
900
901         * bindings/scripts/CodeGeneratorV8.pm:
902         (GenerateNormalAttrGetter):
903         (GenerateNormalAttrSetter):
904         (GenerateSingleBatchedAttribute):
905         (GenerateImplementation):
906         * bindings/scripts/test/V8/V8TestInterface.cpp:
907         (TestInterfaceV8Internal):
908         (WebCore):
909         * bindings/scripts/test/V8/V8TestObj.cpp:
910         (WebCore):
911
912 2013-02-13  Tamas Czene  <tczene@inf.u-szeged.hu>
913
914         OpenCL implementation of Flood SVG filters.
915         https://bugs.webkit.org/show_bug.cgi?id=109580
916
917         Reviewed by Zoltan Herczeg.
918
919         * Target.pri:
920         * platform/graphics/filters/FEFlood.h:
921         (FEFlood):
922         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
923         (WebCore):
924         (WebCore::PROGRAM_STR):
925         (WebCore::FilterContextOpenCL::compileFill):
926         (WebCore::FilterContextOpenCL::fill):
927         * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
928         (WebCore::FilterContextOpenCL::FilterContextOpenCL):
929         (FilterContextOpenCL):
930         * platform/graphics/gpu/opencl/OpenCLFEFlood.cpp: Added.
931         (WebCore):
932         (WebCore::FEFlood::platformApplyOpenCL):
933
934 2013-02-13  Mike West  <mkwst@chromium.org>
935
936         location.href does not throw SECURITY_ERR when accessed across origins with JSC bindings
937         https://bugs.webkit.org/show_bug.cgi?id=43891
938
939         Reviewed by Adam Barth.
940
941         Other browsers (IE, Firefox, and Opera) throw an exception when accessing
942         properties of a Location object across origins, as the spec suggests[1].
943         WebKit is currently the outlier.
944
945         This has a few negative effects: developers are forced to hack around
946         access violations in two ways rather than having a single code path, and
947         (more annoyingly) developers are unable to avoid generating the error
948         message. See every ad on the internet for the effect on the console. :)
949
950         This patch adds a SECURITY_ERR exception to these access violations,
951         which is the first step towards getting rid of the console spam. Getting
952         rid of the message entirely will require a solution to
953         http://wkbug.com/98050.
954
955         A fairly inconclusive thread[2] on webkit-dev popped up in 2010 and
956         trailed off without reaching conclusion. A more recent thread reached
957         agreement that this patch seems like a reasonable thing to do[3].
958
959         This is the JSC half of the patch. V8 is coming in http://wkbug.com/43892
960
961         [1]: http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#security-location
962         [2]: https://lists.webkit.org/pipermail/webkit-dev/2010-August/013880.html
963         [2]: https://lists.webkit.org/pipermail/webkit-dev/2012-February/023636.html
964
965         * bindings/js/JSLocationCustom.cpp:
966         (WebCore::JSLocation::getOwnPropertySlotDelegate):
967
968 2013-02-13  Andrew Wilson  <atwilson@chromium.org>
969
970         Unreviewed Chromium gyp-file cleanup after glib backend removal.
971         https://bugs.webkit.org/show_bug.cgi?id=109672
972
973         Removed references to GLib unicode backend:
974
975         * WebCore.gypi:
976
977 2013-02-12  Kentaro Hara  <haraken@chromium.org>
978
979         [V8] Generate wrapper methods for custom getters/setters
980         https://bugs.webkit.org/show_bug.cgi?id=109666
981
982         Reviewed by Adam Barth.
983
984         Currently V8 directly calls back custom getters/setters written
985         in custom binding files. This makes it impossible for code generators
986         to hook custom getters/setters (e.g. Code generators cannot insert a code
987         for FeatureObservation into custom getters/setters). We should generate
988         wrapper methods for custom getters/setters.
989
990         In the future, I will insert TRACE_EVENT() macros into these wrapper methods
991         to profile DOM getters/setters/methods.
992
993         * bindings/scripts/CodeGeneratorV8.pm:
994         (GenerateNormalAttrGetter):
995         (GenerateNormalAttrSetter):
996         (GenerateSingleBatchedAttribute):
997         (GenerateImplementation):
998         * bindings/scripts/test/V8/V8TestInterface.cpp:
999         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
1000         (TestInterfaceV8Internal):
1001         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
1002         (WebCore):
1003         * bindings/scripts/test/V8/V8TestObj.cpp:
1004         (WebCore::TestObjV8Internal::customAttrAttrGetter):
1005         (TestObjV8Internal):
1006         (WebCore::TestObjV8Internal::customAttrAttrSetter):
1007         (WebCore):
1008
1009 2013-02-13  Sheriff Bot  <webkit.review.bot@gmail.com>
1010
1011         Unreviewed, rolling out r142611.
1012         http://trac.webkit.org/changeset/142611
1013         https://bugs.webkit.org/show_bug.cgi?id=109668
1014
1015         Suggest box is not shown anymore when user types "window." in
1016         inspector console. (Requested by vsevik on #webkit).
1017
1018         * inspector/front-end/TextPrompt.js:
1019         (WebInspector.TextPrompt.prototype.complete):
1020
1021 2013-02-13  Kentaro Hara  <haraken@chromium.org>
1022
1023         [V8] There is no XXXConstructor that requires a custom getter
1024         https://bugs.webkit.org/show_bug.cgi?id=109667
1025
1026         Reviewed by Adam Barth.
1027
1028         Currently '[Custom] attribute XXXConstructor xxx' generates
1029         XXXAttrGetter(). However, there is no XXXConstructor with [Custom].
1030         In addition, it does make no sense to generate XXXAttrGetter() for such cases.
1031         We can remove the logic from CodeGeneratorV8.pm.
1032
1033         * bindings/scripts/CodeGeneratorV8.pm:
1034         (GenerateSingleBatchedAttribute):
1035
1036 2013-02-12  Hajime Morrita  <morrita@google.com>
1037
1038         [Internals] setShadowDOMEnabled() shouldn't be used except a few tests.
1039         https://bugs.webkit.org/show_bug.cgi?id=109642
1040
1041         Reviewed by Kent Tamura.
1042
1043         InternalSettings.setShadowDOMEnabled() shouldn't be called after
1044         any relevant DOM bindings are touched. However for fuzzers, it
1045         isn't trivial to regulate its behavior.
1046
1047         This change whitelists the URL of running test for prevent
1048         unintended API calls. This doesn't hurt the Internals usability
1049         since the API is called from just a couple of tests and the number
1050         isn't expected to grow.
1051
1052         Test: fast/dom/shadow/shadow-dom-enabled-flag-whitelist.html
1053
1054         * testing/InternalSettings.cpp:
1055         (WebCore::urlIsWhitelisted):
1056         (WebCore):
1057         (WebCore::InternalSettings::setShadowDOMEnabled):
1058
1059 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
1060
1061         Web Inspector: Introduce version controller to migrate settings versions.
1062         https://bugs.webkit.org/show_bug.cgi?id=109553
1063
1064         Reviewed by Yury Semikhatsky.
1065
1066         This patch introduces version controller that could be used to migrate inspector settings.
1067
1068         Test: inspector/version-controller.html
1069
1070         * inspector/front-end/Settings.js:
1071         (WebInspector.Settings):
1072         (WebInspector.VersionController):
1073         (WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion):
1074         (WebInspector.VersionController.prototype._updateVersionFrom0To1):
1075         * inspector/front-end/inspector.js:
1076
1077 2013-02-12  Martin Robinson  <mrobinson@igalia.com>
1078
1079         [GTK] Remove the GLib unicode backend
1080         https://bugs.webkit.org/show_bug.cgi?id=109627
1081
1082         Reviewed by Benjamin Poulain.
1083
1084         Remove references to the GLib unicode backend from WebCore.
1085
1086         * GNUmakefile.list.am: Update the source list.
1087         * platform/text/gtk/TextBreakIteratorGtk.cpp: Removed.
1088         * platform/text/gtk/TextCodecGtk.cpp: Removed.
1089         * platform/text/gtk/TextCodecGtk.h: Removed.
1090
1091 2013-02-12  Chris Fleizach  <cfleizach@apple.com>
1092
1093          AX: crash when accessing AccessibilityScrollbar after page has been unloaded
1094          https://bugs.webkit.org/show_bug.cgi?id=109524
1095
1096          Reviewed by Ryosuke Niwa.
1097
1098          AX clients can hold onto AccesibilityScrollbar references that reference parent
1099          AccessibilityScrollViews that have already gone away.
1100
1101          AccessibilityScrollView is not calling detachFromParent after it is removed, which
1102          leads to a crash. The fix is to clearChildren() when an object is deallocated.
1103
1104          I could not create a test because the crash only manifests over multiple page loads.
1105
1106          * accessibility/AccessibilityObject.cpp:
1107          (WebCore::AccessibilityObject::detach):
1108
1109 2013-02-12  Hayato Ito  <hayato@chromium.org>
1110
1111         Use FocusEvent.relatedTarget in {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator.
1112         https://bugs.webkit.org/show_bug.cgi?id=109650
1113
1114         Reviewed by Dimitri Glazkov.
1115
1116         Set FocusEvent.relatedTarget in its constructor so that each
1117         EventDispatchMediator can use FocusEvent.relatedTarget rather than
1118         its redundant m_{old,new}FocusedNode member variable.
1119
1120         I've also removed FIXME comments, mentioning bug 109261, since I
1121         can not reproduce the issue.
1122
1123         No new tests. No change in functionality.
1124
1125         * dom/FocusEvent.cpp:
1126         (WebCore::FocusEventDispatchMediator::create):
1127         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
1128         (WebCore::FocusEventDispatchMediator::dispatchEvent):
1129         (WebCore::BlurEventDispatchMediator::create):
1130         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
1131         (WebCore::BlurEventDispatchMediator::dispatchEvent):
1132         (WebCore::FocusInEventDispatchMediator::create):
1133         (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
1134         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
1135         (WebCore::FocusOutEventDispatchMediator::create):
1136         (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
1137         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
1138         * dom/FocusEvent.h:
1139         (FocusEventDispatchMediator):
1140         (BlurEventDispatchMediator):
1141         (FocusInEventDispatchMediator):
1142         (FocusOutEventDispatchMediator):
1143         * dom/Node.cpp:
1144         (WebCore::Node::dispatchFocusInEvent):
1145         (WebCore::Node::dispatchFocusOutEvent):
1146         (WebCore::Node::dispatchFocusEvent):
1147         (WebCore::Node::dispatchBlurEvent):
1148
1149 2013-02-12  Takashi Sakamoto  <tasak@google.com>
1150
1151         [Refactoring] Make SelectorChecker::mode a constructor parameter.
1152         https://bugs.webkit.org/show_bug.cgi?id=109653
1153
1154         Reviewed by Dimitri Glazkov.
1155
1156         No new tests, because just refactoring.
1157
1158         * css/SelectorChecker.cpp:
1159         (WebCore::SelectorChecker::SelectorChecker):
1160         Made mode a constructor parameter.
1161         * css/SelectorChecker.h:
1162         Removed setMode.
1163         (SelectorChecker):
1164         * css/StyleResolver.cpp:
1165         (WebCore::StyleResolver::ruleMatches):
1166         (WebCore::StyleResolver::checkRegionSelector):
1167         * dom/SelectorQuery.cpp:
1168         (WebCore::SelectorQuery::matches):
1169         (WebCore::SelectorQuery::queryAll):
1170         (WebCore::SelectorQuery::queryFirst):
1171         * html/shadow/ContentSelectorQuery.cpp:
1172         (WebCore::ContentSelectorChecker::ContentSelectorChecker):
1173
1174 2013-02-12  Andreas Kling  <akling@apple.com>
1175
1176         Remove Element::ensureAttributeData().
1177         <http://webkit.org/b/109643>
1178
1179         Reviewed by Anders Carlsson.
1180
1181         * dom/Element.h:
1182         * dom/Element.cpp:
1183         (WebCore::Element::classAttributeChanged):
1184         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
1185
1186             Use attributeData() instead of ensureAttributeData(), it's already guaranteed to exist in
1187             both these functions as they are called in response to attribute changes.
1188
1189         * svg/SVGElement.h:
1190         (WebCore::SVGElement::invalidateSVGAttributes):
1191
1192             Use mutableAttributeData() instead of ensureAttributeData() when invalidating animated
1193             SVG attributes. While I can't find any bugs caused by this, an element with property animations
1194             shouldn't share attribute data with other elements.
1195
1196 2013-02-12  Hayato Ito  <hayato@chromium.org>
1197
1198         Make {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator type safe.
1199         https://bugs.webkit.org/show_bug.cgi?id=109561
1200
1201         Reviewed by Dimitri Glazkov.
1202
1203         Use FocusEvent rather than Event in {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator.
1204
1205         No new tests. No change in functionality.
1206
1207         * dom/FocusEvent.cpp:
1208         (WebCore::FocusEventDispatchMediator::create):
1209         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
1210         (WebCore::BlurEventDispatchMediator::create):
1211         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
1212         (WebCore::FocusInEventDispatchMediator::create):
1213         (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
1214         (WebCore::FocusOutEventDispatchMediator::create):
1215         (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
1216         * dom/FocusEvent.h:
1217         (FocusEventDispatchMediator):
1218         (WebCore::FocusEventDispatchMediator::event):
1219         (BlurEventDispatchMediator):
1220         (WebCore::BlurEventDispatchMediator::event):
1221         (FocusInEventDispatchMediator):
1222         (WebCore::FocusInEventDispatchMediator::event):
1223         (FocusOutEventDispatchMediator):
1224         (WebCore::FocusOutEventDispatchMediator::event):
1225
1226 2013-02-12  Eric Seidel  <eric@webkit.org>
1227
1228         Fix HTMLToken::Attribute member naming and update callsites to use Vector-based String functions
1229         https://bugs.webkit.org/show_bug.cgi?id=109638
1230
1231         Reviewed by Adam Barth.
1232
1233         Darin Adler noted in:
1234         https://bugs.webkit.org/show_bug.cgi?id=109408#c4
1235         that HTMLToken::Attribute (then MarkupTokenBase::Attribute)
1236         was a struct, yet incorrectly used m_ for its public members.
1237
1238         This patch fixes the members to not have the m_, and since I was
1239         touching all callers, I also updated all callers to use modern
1240         Vector-based String creation/append functions instead of manually
1241         calling UChar*, size_t versions.
1242
1243         There should be no behavior change to this patch.  Where I saw
1244         performance/memory bugs, I noted them with FIXMEs to keep
1245         this change simple.
1246
1247         * html/HTMLViewSourceDocument.cpp:
1248         (WebCore::HTMLViewSourceDocument::processTagToken):
1249         * html/parser/AtomicHTMLToken.h:
1250         (WebCore::AtomicHTMLToken::publicIdentifier):
1251         (WebCore::AtomicHTMLToken::systemIdentifier):
1252         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1253         (WebCore::AtomicHTMLToken::initializeAttributes):
1254         * html/parser/CompactHTMLToken.cpp:
1255         (WebCore::CompactHTMLToken::CompactHTMLToken):
1256         * html/parser/HTMLMetaCharsetParser.cpp:
1257         (WebCore::HTMLMetaCharsetParser::processMeta):
1258         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
1259         * html/parser/HTMLPreloadScanner.cpp:
1260         (WebCore::StartTagScanner::processAttributes):
1261         (WebCore::HTMLPreloadScanner::scan):
1262         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
1263         (WebCore::HTMLPreloadScanner::processToken):
1264         * html/parser/HTMLToken.h:
1265         (Range):
1266         (Attribute):
1267         (WebCore::HTMLToken::clear):
1268         (WebCore::HTMLToken::startIndex):
1269         (WebCore::HTMLToken::endIndex):
1270         (WebCore::HTMLToken::end):
1271         (WebCore::HTMLToken::nameString):
1272         (WebCore::HTMLToken::addNewAttribute):
1273         (WebCore::HTMLToken::beginAttributeName):
1274         (WebCore::HTMLToken::endAttributeName):
1275         (WebCore::HTMLToken::beginAttributeValue):
1276         (WebCore::HTMLToken::endAttributeValue):
1277         (WebCore::HTMLToken::appendToAttributeName):
1278         (WebCore::HTMLToken::appendToAttributeValue):
1279         (WebCore::HTMLToken::eraseValueOfAttribute):
1280         * html/parser/HTMLTokenizer.cpp:
1281         (WebCore::AtomicHTMLToken::nameForAttribute):
1282         * html/parser/HTMLViewSourceParser.cpp:
1283         (WebCore::HTMLViewSourceParser::updateTokenizerState):
1284         * html/parser/XSSAuditor.cpp:
1285         (WebCore::findAttributeWithName):
1286         (WebCore::XSSAuditor::filterParamToken):
1287         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
1288         (WebCore::XSSAuditor::eraseAttributeIfInjected):
1289         (WebCore::XSSAuditor::decodedSnippetForAttribute):
1290
1291 2013-02-12  Ryosuke Niwa  <rniwa@webkit.org>
1292
1293         Build fix.
1294
1295         * editing/Editor.h:
1296         (WebCore::Editor::avoidIntersectionWithDeleteButtonController):
1297
1298 2013-02-12  Nate Chapin  <japhet@chromium.org>
1299
1300         REGRESSION: Reloading a local file doesn't pick up changes
1301         https://bugs.webkit.org/show_bug.cgi?id=109344
1302
1303         Reviewed by Alexey Proskuryakov.
1304
1305         Test: http/tests/cache/reload-main-resource.php
1306
1307         * loader/cache/CachedResource.cpp:
1308         (WebCore::CachedResource::load):
1309         * loader/cache/CachedResourceLoader.cpp:
1310         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1311         (WebCore::CachedResourceLoader::cachePolicy): Don't use subresourceCachePolicy()
1312             for main resources.
1313         * loader/cache/CachedResourceLoader.h:
1314         (CachedResourceLoader):
1315
1316 2013-02-12  Ryosuke Niwa  <rniwa@webkit.org>
1317
1318         Turn avoidIntersectionWithNode into Editor member functions to encapsulate delete button controller
1319         https://bugs.webkit.org/show_bug.cgi?id=109549
1320
1321         Reviewed by Tony Chang.
1322
1323         Renamed avoidIntersectionWithNode to Editor::avoidIntersectionWithDeleteButtonController and added trivial
1324         implementations when delete button controllers are disabled (ENABLE_DELETION_UI is 0).
1325
1326         * editing/DeleteButtonController.cpp:
1327         * editing/EditCommand.cpp:
1328         (WebCore::EditCommand::EditCommand):
1329         * editing/Editor.cpp:
1330         (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Moved from htmlediting.cpp and renamed.
1331         The version that takes VisibleSelection has been updated to use updatePositionForNodeRemoval to share
1332         mode code with that function.
1333         (WebCore::Editor::rangeForPoint):
1334         * editing/Editor.h:
1335         (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Added; trivial implementations.
1336         * editing/htmlediting.cpp:
1337         * editing/htmlediting.h:
1338         * editing/markup.cpp:
1339         (WebCore::createMarkupInternal): Extracted from createMarkup.
1340         (WebCore::createMarkup):
1341
1342 2013-02-12  Joseph Pecoraro  <pecoraro@apple.com>
1343
1344         [iOS] Enable PAGE_VISIBILITY_API
1345         https://bugs.webkit.org/show_bug.cgi?id=109399
1346
1347         Reviewed by David Kilzer.
1348
1349         * Configurations/FeatureDefines.xcconfig:
1350
1351 2013-02-12  Andreas Kling  <akling@apple.com>
1352
1353         Move ElementAttributeData into Element.cpp/h
1354         <http://webkit.org/b/109610>
1355
1356         Reviewed by Anders Carlsson.
1357
1358         Removed ElementAttributeData.cpp/h and moved the class itself into Element headquarters.
1359         In the near future, Element should be the only client of this class, and thus it won't
1360         be necessary for other classes to know anything about it.
1361
1362         * dom/ElementAttributeData.cpp: Removed.
1363         * dom/ElementAttributeData.h: Removed.
1364         * CMakeLists.txt:
1365         * GNUmakefile.list.am:
1366         * Target.pri:
1367         * WebCore.gypi:
1368         * WebCore.xcodeproj/project.pbxproj:
1369         * dom/DOMAllInOne.cpp:
1370         * dom/DocumentSharedObjectPool.cpp:
1371         * dom/Element.cpp:
1372         * dom/Element.h:
1373         * workers/SharedWorker.cpp:
1374         * Modules/webdatabase/DatabaseManager.cpp: Add ExceptionCode.h since Element.h doesn't pull it in anymore.
1375
1376 2013-02-12  Simon Fraser  <simon.fraser@apple.com>
1377
1378         Crash when scrolling soon after page starts loading
1379         https://bugs.webkit.org/show_bug.cgi?id=109631
1380         <rdar://problem/13157533&13159627&13196727>
1381         
1382         Reviewed by Anders Carlsson.
1383         
1384         Make the scrolling tree more robust when the root state node,
1385         and/or scrolling node are null. This can happen if we try to
1386         handle a wheel event before we've done the first scrolling
1387         tree commit.
1388
1389         * page/scrolling/ScrollingStateTree.cpp:
1390         (WebCore::ScrollingStateTree::commit): Handle the case where
1391         m_rootStateNode is null. We'll still commit, but the state tree
1392         will have no state nodes.
1393         * page/scrolling/ScrollingTree.cpp:
1394         (WebCore::ScrollingTree::handleWheelEvent): Null-check m_rootNode.
1395         (WebCore::ScrollingTree::commitNewTreeState): Handle a null root node.
1396         (WebCore::ScrollingTree::updateTreeFromStateNode): If the rood state node
1397         is null, just clear the map and null out the root scrolling node.
1398         * page/scrolling/ScrollingTree.h: m_debugInfoLayer was unused.
1399         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1400         (WebCore::ScrollingCoordinatorMac::ensureRootStateNodeForFrameView): It may be possible
1401         to get here before we've registered the root scroll layer, in which case scrollLayerID()
1402         will be 0. Assert to see if this can ever happen.
1403         (WebCore::ScrollingCoordinatorMac::scrollingStateTreeAsText): Handle case of rootStateNode()
1404         being null.
1405
1406 2013-02-12  Raymond Toy  <rtoy@google.com>
1407
1408         Synchronize setting of panner node model and processing
1409         https://bugs.webkit.org/show_bug.cgi?id=109599
1410
1411         Reviewed by Chris Rogers.
1412
1413         No new tests.
1414
1415         * Modules/webaudio/PannerNode.cpp:
1416         (WebCore::PannerNode::process):
1417         (WebCore::PannerNode::setPanningModel):
1418         * Modules/webaudio/PannerNode.h:
1419
1420 2013-02-12  Dean Jackson  <dino@apple.com>
1421
1422         Add class name for snapshotted plugin based on dimensions
1423         https://bugs.webkit.org/show_bug.cgi?id=108369
1424
1425         Reviewed by Simon Fraser.
1426
1427         As the size of the plugin changes, the Shadow Root for the snapshot
1428         might want to toggle different interfaces. Expose "tiny", "small",
1429         "medium" and "large" classes on the Shadow. (The dimensions are
1430         currently chosen fairly arbitrarily).
1431
1432         Because we only know the dimensions after layout, we set up
1433         a post layout task to add the class. Luckily there already was
1434         a post layout task for plugins - I just updated it to handle
1435         both real and snapshotted plugins. This involved modifying
1436         the list of RenderEmbeddedObjects in FrameView to take generic
1437         RenderObjects, and decide which type they are when calling
1438         the update method.
1439
1440         * html/HTMLPlugInImageElement.cpp: Some new dimensions for the various size thresholds.
1441         (WebCore::classNameForShadowRootSize): New static function that returns a class name
1442             after examining the size of the object.
1443         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Sets the class name for
1444             the shadow root. This is called in the post layout task.
1445         (WebCore::shouldPlugInShowLabelAutomatically): Use new size names.
1446         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Ditto.
1447         * html/HTMLPlugInImageElement.h:
1448         (HTMLPlugInImageElement): New method updateSnapshotInfo.
1449
1450         * page/FrameView.cpp:
1451         (WebCore::FrameView::addWidgetToUpdate): Change RenderEmbeddedObject* to RenderObject*.
1452         (WebCore::FrameView::removeWidgetToUpdate): Ditto
1453         (WebCore::FrameView::updateWidget): Branch based on EmbeddedObject vs SnapshottedPlugIn. Call
1454             plugin snapshot update if necessary.
1455         (WebCore::FrameView::updateWidgets): Handle both EmbeddedObject and SnapshottedPlugIn cases.
1456         * page/FrameView.h: Change RenderEmbeddedObject* to RenderObject* for post layout widget updates.
1457
1458         * rendering/RenderSnapshottedPlugIn.cpp:
1459         (WebCore::RenderSnapshottedPlugIn::layout): New virtual override. If size has changed, ask the
1460             FrameView to recalculate size after layout.
1461         * rendering/RenderSnapshottedPlugIn.h: New layout() method.
1462
1463 2013-02-12  Mike West  <mkwst@chromium.org>
1464
1465         Implement script MIME restrictions for X-Content-Type-Options: nosniff
1466         https://bugs.webkit.org/show_bug.cgi?id=71851
1467
1468         Reviewed by Adam Barth.
1469
1470         This patch adds support for 'X-Content-Type-Options: nosniff' when
1471         deciding whether or not to execute a given chunk of JavaScript. If the
1472         header is present, script will only execute if it matches a predefined
1473         set of MIME types[1] that are deemed "executable". Scripts served with
1474         types that don't match the list will not execute.
1475
1476         IE introduced this feature, and Gecko is working on an implementation[2]
1477         now. There's been some discussion on the WHATWG list about formalizing
1478         the specification for this feature[3], but nothing significant has been
1479         decided.
1480
1481         This implementation's list of acceptible MIME types differs from IE's:
1482         it matches the list of supported JavaScript MIME types defined in
1483         MIMETypeRegistry::initializeSupportedJavaScriptMIMETypes()[4]. In
1484         particular, the VBScript types are not accepted, and
1485         'text/javascript1.{1,2,3}' are accepted, along with 'text/livescript'.
1486
1487         This feature is locked tightly behind the ENABLE_NOSNIFF flag, which is
1488         currently only enabled on the Chromium port.
1489
1490         [1]: http://msdn.microsoft.com/en-us/library/gg622941(v=vs.85).aspx
1491         [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=471020
1492         [3]: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-November/037974.html
1493         [4]: http://trac.webkit.org/browser/trunk/Source/WebCore/platform/MIMETypeRegistry.cpp?rev=142086#L307
1494
1495         Tests: http/tests/security/contentTypeOptions/invalid-content-type-options-allowed.html
1496                http/tests/security/contentTypeOptions/nosniff-script-allowed.html
1497                http/tests/security/contentTypeOptions/nosniff-script-blocked.html
1498                http/tests/security/contentTypeOptions/nosniff-script-without-content-type-allowed.html
1499
1500         * dom/ScriptElement.cpp:
1501         (WebCore::ScriptElement::executeScript):
1502             Before executing script, ensure that it shouldn't be blocked due to
1503             its MIME type. If it is blocked, write an error message to the
1504             console.
1505         * loader/cache/CachedScript.cpp:
1506         (WebCore::CachedScript::mimeType):
1507             Make scripts' MIME type available outside the context of
1508             CachedScript in order to correctly populate error messages we write
1509             to the console in ScriptElement::executeScript
1510         (WebCore):
1511         (WebCore::CachedScript::mimeTypeAllowedByNosniff):
1512         * loader/cache/CachedScript.h:
1513         (CachedScript):
1514             A new method which checks the resource's HTTP headers to set the
1515             'nosniff' disposition, and compares the resource's MIME type against
1516             the list of allowed executable types. Returns true iff the script
1517             is allowed.
1518         * platform/network/HTTPParsers.cpp:
1519         (WebCore):
1520         (WebCore::parseContentTypeOptionsHeader):
1521         * platform/network/HTTPParsers.h:
1522             Adds a new enum which relates the sniffable status of the resource,
1523             and a method to parse the HTTP header.
1524
1525 2013-02-12  Adam Barth  <abarth@webkit.org>
1526
1527         Threaded HTML parser should pass the remaining fast/tokenizer tests
1528         https://bugs.webkit.org/show_bug.cgi?id=109607
1529
1530         Reviewed by Eric Seidel.
1531
1532         This patch fixes some edge cases involving document.write. Previously,
1533         we would drop input characters on the floor if the tokenizer wasn't
1534         able to consume them synchronously. In this patch, we send the unparsed
1535         characters to the background thread for consumption after rewinding the
1536         input stream.
1537
1538         * html/parser/BackgroundHTMLInputStream.cpp:
1539         (WebCore::BackgroundHTMLInputStream::rewindTo):
1540         * html/parser/BackgroundHTMLInputStream.h:
1541         (BackgroundHTMLInputStream):
1542         * html/parser/BackgroundHTMLParser.cpp:
1543         (WebCore::BackgroundHTMLParser::resumeFrom):
1544         * html/parser/BackgroundHTMLParser.h:
1545         (Checkpoint):
1546         * html/parser/HTMLDocumentParser.cpp:
1547         (WebCore::HTMLDocumentParser::canTakeNextToken):
1548         (WebCore::HTMLDocumentParser::didFailSpeculation):
1549         (WebCore::HTMLDocumentParser::pumpTokenizer):
1550         (WebCore::HTMLDocumentParser::finish):
1551         * html/parser/HTMLInputStream.h:
1552         (WebCore::HTMLInputStream::closeWithoutMarkingEndOfFile):
1553         (HTMLInputStream):
1554
1555 2013-02-12  Csaba Osztrogon√°c  <ossy@webkit.org>
1556
1557         Unreviewed buildfix for !ENABLE(INSPECTOR) platforms after r142654.
1558
1559         * inspector/InspectorInstrumentation.h:
1560         (WebCore::InspectorInstrumentation::scriptsEnabled):
1561
1562 2013-02-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1563
1564         Remove remaining traces of Web Intents
1565         https://bugs.webkit.org/show_bug.cgi?id=109586
1566
1567         Reviewed by Eric Seidel.
1568
1569         Remove remaining traces of Web Intents as the functionality was
1570         removed in r142549.
1571
1572         No new tests, no behavior change for layout tests.
1573
1574         * GNUmakefile.features.am.in:
1575         * html/HTMLTagNames.in:
1576
1577 2013-02-12  Robert Hogan  <robert@webkit.org>
1578
1579         REGRESSION(r136967): Combination of float and clear yields to bad layout
1580         https://bugs.webkit.org/show_bug.cgi?id=109476
1581
1582         Reviewed by Levi Weintraub.
1583
1584         Test: fast/block/margin-collapse/self-collapsing-block-with-float-children.html
1585
1586         The change made at http://trac.webkit.org/changeset/136967 only needs to worry about the first floated
1587         child of a self-collapsing block. The ones that follow are not affected by its margins.
1588
1589         * rendering/RenderBlockLineLayout.cpp:
1590         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
1591
1592 2013-02-12  Levi Weintraub  <leviw@chromium.org>
1593
1594         ASSERTION FAILED: !object || object->isBox(), UNKNOWN in WebCore::RenderListItem::positionListMarker
1595         https://bugs.webkit.org/show_bug.cgi?id=108699
1596
1597         Reviewed by Abhishek Arya.
1598
1599         RenderListItems performs special management of its children to maintain list markers. Splitting a flow
1600         through a list item results in assumptions made inside RenderListItem failing, so for now, avoid splitting
1601         flows when inside one.
1602
1603         Test: fast/multicol/span/list-multi-column-crash.html
1604
1605         * rendering/RenderBlock.cpp:
1606         (WebCore::RenderBlock::containingColumnsBlock):
1607
1608 2013-02-12  Roger Fong  <roger_fong@apple.com>
1609
1610         Unreviewed Windows build fix.
1611
1612         * testing/Internals.cpp:
1613         (WebCore::Internals::resetToConsistentState):
1614         (WebCore::Internals::Internals):
1615
1616 2013-02-12  Vivek Galatage  <vivek.vg@samsung.com>
1617
1618         Web Inspector: JavaScript execution disabled by browser/UA should be notified to the front-end
1619         https://bugs.webkit.org/show_bug.cgi?id=109402
1620
1621         Reviewed by Yury Semikhatsky.
1622
1623         Whenever the UA/Browser changes the Script Execution state of a page, it should notify the
1624         inspector front-end. Added the InspectorInstrumentation method didScriptExecutionStateChange
1625         to achieve this. Also the state change triggered by the inspector should be ignored to avoid
1626         infinite loop.
1627
1628         Test: inspector/script-execution-state-change-notification.html
1629
1630         * inspector/Inspector.json:
1631         * inspector/InspectorInstrumentation.cpp:
1632         (WebCore):
1633         (WebCore::InspectorInstrumentation::scriptsEnabledImpl):
1634         * inspector/InspectorInstrumentation.h:
1635         (InspectorInstrumentation):
1636         (WebCore::InspectorInstrumentation::scriptsEnabled):
1637         (WebCore):
1638         * inspector/InspectorPageAgent.cpp:
1639         (WebCore::InspectorPageAgent::InspectorPageAgent):
1640         (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
1641         (WebCore::InspectorPageAgent::scriptsEnabled):
1642         (WebCore):
1643         * inspector/InspectorPageAgent.h:
1644         (InspectorPageAgent):
1645         * inspector/front-end/ResourceTreeModel.js:
1646         (WebInspector.PageDispatcher.prototype.javascriptDialogClosed):
1647         (WebInspector.PageDispatcher.prototype.scriptsEnabled):
1648         * page/Settings.cpp:
1649         (WebCore::Settings::setScriptEnabled):
1650
1651 2013-02-12  Antti Koivisto  <antti@apple.com>
1652
1653         Cache timer heap pointer to timers
1654         https://bugs.webkit.org/show_bug.cgi?id=109597
1655
1656         Reviewed by Andreas Kling.
1657
1658         Accessing timer heap through thread global storage is slow (~0.1% in PLT3). We can cache the heap pointer to
1659         each TimerBase. There are not huge numbers of timers around so memory is not an issue and many timers are heavily reused.
1660
1661         * platform/Timer.cpp:
1662         (WebCore::threadGlobalTimerHeap):
1663         (WebCore::TimerHeapReference::operator=):
1664         (WebCore::TimerHeapIterator::checkConsistency):
1665         (WebCore::TimerBase::TimerBase):
1666         (WebCore::TimerBase::checkHeapIndex):
1667         (WebCore::TimerBase::setNextFireTime):
1668         * platform/Timer.h:
1669         (WebCore::TimerBase::timerHeap):
1670         (TimerBase):
1671
1672 2013-02-12  Adam Barth  <abarth@webkit.org>
1673
1674         BackgroundHTMLParser::resumeFrom should take a struct
1675         https://bugs.webkit.org/show_bug.cgi?id=109598
1676
1677         Reviewed by Eric Seidel.
1678
1679         This patch is purely a syntatic change that paves the way for fixing
1680         the partial-entity document.write tests. To fix those tests, we'll need
1681         to pass more information to resumeFrom, but we're hitting the argument
1682         limits in Functional.h. Rather than adding yet more arguments, this
1683         patch moves to a single argument that's a struct.
1684
1685         * html/parser/BackgroundHTMLParser.cpp:
1686         (WebCore::BackgroundHTMLParser::resumeFrom):
1687         * html/parser/BackgroundHTMLParser.h:
1688         (Checkpoint):
1689         (BackgroundHTMLParser):
1690         * html/parser/HTMLDocumentParser.cpp:
1691         (WebCore::HTMLDocumentParser::didFailSpeculation):
1692
1693 2013-02-12  Elliott Sprehn  <esprehn@chromium.org>
1694
1695         rootRenderer in FrameView is really RenderView
1696         https://bugs.webkit.org/show_bug.cgi?id=109510
1697
1698         Reviewed by Eric Seidel.
1699
1700         The global function rootRenderer(FrameView*) is really just a way
1701         to get the RenderView from the Frame so replace it with a renderView()
1702         method and replace usage of the word "root" with renderView so it's
1703         obvious the root we're talking about is the renderView. This is an
1704         important distinction to make since we also have rootRenderer in the code
1705         for the documentElement()'s renderer and we also have a "layout root" which
1706         is entirely different.
1707
1708         No new tests, just refactoring.
1709
1710         * page/FrameView.cpp:
1711         (WebCore::FrameView::rootRenderer): Removed.
1712         (WebCore::FrameView::setFrameRect):
1713         (WebCore::FrameView::adjustViewSize):
1714         (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
1715         (WebCore::FrameView::updateCompositingLayersAfterLayout):
1716         (WebCore::FrameView::clearBackingStores):
1717         (WebCore::FrameView::restoreBackingStores):
1718         (WebCore::FrameView::usesCompositedScrolling):
1719         (WebCore::FrameView::layerForHorizontalScrollbar):
1720         (WebCore::FrameView::layerForVerticalScrollbar):
1721         (WebCore::FrameView::layerForScrollCorner):
1722         (WebCore::FrameView::tiledBacking):
1723         (WebCore::FrameView::scrollLayerID):
1724         (WebCore::FrameView::layerForOverhangAreas):
1725         (WebCore::FrameView::flushCompositingStateForThisFrame):
1726         (WebCore::FrameView::hasCompositedContent):
1727         (WebCore::FrameView::enterCompositingMode):
1728         (WebCore::FrameView::isSoftwareRenderable):
1729         (WebCore::FrameView::didMoveOnscreen):
1730         (WebCore::FrameView::willMoveOffscreen):
1731         (WebCore::FrameView::layout):
1732         (WebCore::FrameView::embeddedContentBox):
1733         (WebCore::FrameView::contentsInCompositedLayer):
1734         (WebCore::FrameView::scrollContentsFastPath):
1735         (WebCore::FrameView::scrollContentsSlowPath):
1736         (WebCore::FrameView::maintainScrollPositionAtAnchor):
1737         (WebCore::FrameView::scrollPositionChanged):
1738         (WebCore::FrameView::repaintFixedElementsAfterScrolling):
1739         (WebCore::FrameView::updateFixedElementsAfterScrolling):
1740         (WebCore::FrameView::visibleContentsResized):
1741         (WebCore::FrameView::scheduleRelayoutOfSubtree):
1742         (WebCore::FrameView::needsLayout):
1743         (WebCore::FrameView::setNeedsLayout):
1744         (WebCore::FrameView::performPostLayoutTasks):
1745         (WebCore::FrameView::updateControlTints):
1746         (WebCore::FrameView::paintContents):
1747         (WebCore::FrameView::forceLayoutForPagination):
1748         (WebCore::FrameView::adjustPageHeightDeprecated):
1749         (WebCore::FrameView::resetTrackedRepaints):
1750         (WebCore::FrameView::isVerticalDocument):
1751         (WebCore::FrameView::isFlippedDocument):
1752         * page/FrameView.h:
1753         (WebCore::FrameView::renderView): Added.
1754
1755 2013-02-12  Tomas Popela  <tpopela@redhat.com>
1756
1757         [GTK][Introspection] GObject bindings for DataTransferItemList - one add() method must be removed from .idl
1758         https://bugs.webkit.org/show_bug.cgi?id=109180
1759
1760         Reviewed by Xan Lopez.
1761
1762         When compiling WebKit with --enable-introspection and generating GObject bindings
1763         for DataTransferItemList we must disable one add() method, because GObject is
1764         based on C and C does not allow two functions with the same name.
1765
1766         No tests needed.
1767
1768         * bindings/scripts/CodeGeneratorGObject.pm:
1769
1770 2013-02-12  Uday Kiran  <udaykiran@motorola.com>
1771
1772         Background size width specified in viewport percentage units not working
1773         https://bugs.webkit.org/show_bug.cgi?id=109536
1774
1775         Reviewed by Antti Koivisto.
1776
1777         Corrected the check for viewport percentage unit while calculating
1778         background image width.
1779
1780         Test: fast/backgrounds/size/backgroundSize-viewportPercentage-width.html
1781
1782         * rendering/RenderBoxModelObject.cpp:
1783         (WebCore::RenderBoxModelObject::calculateFillTileSize):
1784
1785 2013-02-12  Abhishek Arya  <inferno@chromium.org>
1786
1787         Heap-use-after-free in WebCore::DeleteButtonController::enable
1788         https://bugs.webkit.org/show_bug.cgi?id=109447
1789
1790         Reviewed by Ryosuke Niwa.
1791
1792         RefPtr frame pointer since it can get deleted due to mutation events
1793         fired inside AppendNodeCommand::doUnapply.
1794
1795         No new tests. Testcase is hard to minimize due to recursive
1796         calls with DOMNodeRemovedFromDocument mutation event.
1797
1798         * editing/CompositeEditCommand.cpp:
1799         (WebCore::EditCommandComposition::unapply):
1800         (WebCore::EditCommandComposition::reapply):
1801
1802 2013-02-12  Eric Seidel  <eric@webkit.org>
1803
1804         Remove HTMLTokenTypes header (and split out AtomicHTMLToken.h from HTMLToken.h)
1805         https://bugs.webkit.org/show_bug.cgi?id=109525
1806
1807         Reviewed by Adam Barth.
1808
1809         We no longer need a separate HTMLTokenTypes class now that NEW_XML is gone.
1810         However, to remove HTMLTokenTypes, I had to split AtomicHTMLToken.h from
1811         HTMLToken.h (to fix a circular dependancy).
1812
1813         * GNUmakefile.list.am:
1814         * Target.pri:
1815         * WebCore.gypi:
1816         * WebCore.vcproj/WebCore.vcproj:
1817         * WebCore.vcxproj/WebCore.vcxproj:
1818         * WebCore.vcxproj/WebCore.vcxproj.filters:
1819         * WebCore.xcodeproj/project.pbxproj:
1820         * html/HTMLViewSourceDocument.cpp:
1821         (WebCore::HTMLViewSourceDocument::addSource):
1822         * html/parser/AtomicHTMLToken.h: Added.
1823         (WebCore):
1824         (AtomicHTMLToken):
1825         (WebCore::AtomicHTMLToken::create):
1826         (WebCore::AtomicHTMLToken::forceQuirks):
1827         (WebCore::AtomicHTMLToken::type):
1828         (WebCore::AtomicHTMLToken::name):
1829         (WebCore::AtomicHTMLToken::setName):
1830         (WebCore::AtomicHTMLToken::selfClosing):
1831         (WebCore::AtomicHTMLToken::getAttributeItem):
1832         (WebCore::AtomicHTMLToken::attributes):
1833         (WebCore::AtomicHTMLToken::characters):
1834         (WebCore::AtomicHTMLToken::charactersLength):
1835         (WebCore::AtomicHTMLToken::isAll8BitData):
1836         (WebCore::AtomicHTMLToken::comment):
1837         (WebCore::AtomicHTMLToken::publicIdentifier):
1838         (WebCore::AtomicHTMLToken::systemIdentifier):
1839         (WebCore::AtomicHTMLToken::clearExternalCharacters):
1840         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1841         (WebCore::AtomicHTMLToken::initializeAttributes):
1842         * html/parser/BackgroundHTMLParser.cpp:
1843         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
1844         * html/parser/CompactHTMLToken.cpp:
1845         (WebCore::CompactHTMLToken::CompactHTMLToken):
1846         * html/parser/CompactHTMLToken.h:
1847         (WebCore::CompactHTMLToken::type):
1848         * html/parser/HTMLConstructionSite.cpp:
1849         (WebCore::HTMLConstructionSite::insertDoctype):
1850         (WebCore::HTMLConstructionSite::insertComment):
1851         (WebCore::HTMLConstructionSite::insertCommentOnDocument):
1852         (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
1853         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
1854         (WebCore::HTMLConstructionSite::insertForeignElement):
1855         * html/parser/HTMLDocumentParser.cpp:
1856         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
1857         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
1858         * html/parser/HTMLDocumentParser.h:
1859         * html/parser/HTMLMetaCharsetParser.cpp:
1860         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
1861         * html/parser/HTMLPreloadScanner.cpp:
1862         (WebCore::isStartTag):
1863         (WebCore::isStartOrEndTag):
1864         (WebCore::HTMLPreloadScanner::processToken):
1865         * html/parser/HTMLSourceTracker.cpp:
1866         (WebCore::HTMLSourceTracker::start):
1867         (WebCore::HTMLSourceTracker::sourceForToken):
1868         * html/parser/HTMLStackItem.h:
1869         (WebCore::HTMLStackItem::HTMLStackItem):
1870         * html/parser/HTMLToken.h:
1871         (WebCore::HTMLToken::clear):
1872         (WebCore::HTMLToken::isUninitialized):
1873         (WebCore::HTMLToken::type):
1874         (WebCore::HTMLToken::makeEndOfFile):
1875         (WebCore::HTMLToken::data):
1876         (WebCore::HTMLToken::name):
1877         (WebCore::HTMLToken::appendToName):
1878         (WebCore::HTMLToken::forceQuirks):
1879         (WebCore::HTMLToken::setForceQuirks):
1880         (WebCore::HTMLToken::beginDOCTYPE):
1881         (WebCore::HTMLToken::publicIdentifier):
1882         (WebCore::HTMLToken::systemIdentifier):
1883         (WebCore::HTMLToken::setPublicIdentifierToEmptyString):
1884         (WebCore::HTMLToken::setSystemIdentifierToEmptyString):
1885         (WebCore::HTMLToken::appendToPublicIdentifier):
1886         (WebCore::HTMLToken::appendToSystemIdentifier):
1887         (WebCore::HTMLToken::selfClosing):
1888         (WebCore::HTMLToken::setSelfClosing):
1889         (WebCore::HTMLToken::beginStartTag):
1890         (WebCore::HTMLToken::beginEndTag):
1891         (WebCore::HTMLToken::addNewAttribute):
1892         (WebCore::HTMLToken::appendToAttributeName):
1893         (WebCore::HTMLToken::appendToAttributeValue):
1894         (WebCore::HTMLToken::attributes):
1895         (WebCore::HTMLToken::eraseValueOfAttribute):
1896         (WebCore::HTMLToken::ensureIsCharacterToken):
1897         (WebCore::HTMLToken::characters):
1898         (WebCore::HTMLToken::appendToCharacter):
1899         (WebCore::HTMLToken::comment):
1900         (WebCore::HTMLToken::beginComment):
1901         (WebCore::HTMLToken::appendToComment):
1902         (WebCore::HTMLToken::eraseCharacters):
1903         (HTMLToken):
1904         * html/parser/HTMLTokenTypes.h: Removed.
1905         * html/parser/HTMLTokenizer.cpp:
1906         (WebCore::AtomicHTMLToken::usesName):
1907         (WebCore::AtomicHTMLToken::usesAttributes):
1908         (WebCore::HTMLTokenizer::flushBufferedEndTag):
1909         (WebCore::HTMLTokenizer::nextToken):
1910         * html/parser/HTMLTokenizer.h:
1911         (WebCore::HTMLTokenizer::saveEndTagNameIfNeeded):
1912         (WebCore::HTMLTokenizer::haveBufferedCharacterToken):
1913         * html/parser/HTMLTreeBuilder.cpp:
1914         (WebCore::HTMLTreeBuilder::processToken):
1915         (WebCore::HTMLTreeBuilder::processDoctypeToken):
1916         (WebCore::HTMLTreeBuilder::processFakeStartTag):
1917         (WebCore::HTMLTreeBuilder::processFakeEndTag):
1918         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
1919         (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
1920         (WebCore):
1921         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1922         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
1923         (WebCore::HTMLTreeBuilder::processStartTag):
1924         (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
1925         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
1926         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
1927         (WebCore::HTMLTreeBuilder::processEndTagForInRow):
1928         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
1929         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
1930         (WebCore::HTMLTreeBuilder::processEndTagForInTable):
1931         (WebCore::HTMLTreeBuilder::processEndTag):
1932         (WebCore::HTMLTreeBuilder::processComment):
1933         (WebCore::HTMLTreeBuilder::processCharacter):
1934         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
1935         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
1936         (WebCore::HTMLTreeBuilder::defaultForInHead):
1937         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
1938         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
1939         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
1940         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
1941         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
1942         (WebCore::HTMLTreeBuilder::processScriptStartTag):
1943         (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
1944         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
1945         * html/parser/HTMLViewSourceParser.cpp:
1946         (WebCore::HTMLViewSourceParser::updateTokenizerState):
1947         * html/parser/TextDocumentParser.cpp:
1948         (WebCore::TextDocumentParser::insertFakePreElement):
1949         * html/parser/XSSAuditor.cpp:
1950         (WebCore::XSSAuditor::filterToken):
1951         (WebCore::XSSAuditor::filterScriptToken):
1952         (WebCore::XSSAuditor::filterObjectToken):
1953         (WebCore::XSSAuditor::filterParamToken):
1954         (WebCore::XSSAuditor::filterEmbedToken):
1955         (WebCore::XSSAuditor::filterAppletToken):
1956         (WebCore::XSSAuditor::filterIframeToken):
1957         (WebCore::XSSAuditor::filterMetaToken):
1958         (WebCore::XSSAuditor::filterBaseToken):
1959         (WebCore::XSSAuditor::filterFormToken):
1960
1961 2013-02-12  Pablo Flouret  <pablof@motorola.com>
1962
1963         Handle error recovery in @supports
1964         https://bugs.webkit.org/show_bug.cgi?id=103934
1965
1966         Reviewed by Antti Koivisto.
1967
1968         Tests 021, 024, 031, and 033 in
1969         http://hg.csswg.org/test/file/5f94e4b03ed9/contributors/opera/submitted/css3-conditional
1970         fail because there's no explicit error recovery in @support's grammar.
1971         Opera and Firefox pass the tests.
1972
1973         No new tests, modified css3/supports{,-cssom}.html
1974
1975         * css/CSSGrammar.y.in:
1976         * css/CSSParser.cpp:
1977         (WebCore::CSSParser::createSupportsRule):
1978         (WebCore::CSSParser::markSupportsRuleHeaderEnd):
1979         (WebCore::CSSParser::popSupportsRuleData):
1980         * css/CSSParser.h:
1981
1982 2013-02-12  Eric Carlson  <eric.carlson@apple.com>
1983
1984         [Mac] guard against NULL languages array
1985         https://bugs.webkit.org/show_bug.cgi?id=109595
1986
1987         Reviewed by Dean Jackson.
1988
1989         No new tests, existing tests won't crash if this is correct.
1990
1991         * page/CaptionUserPreferencesMac.mm:
1992         (WebCore::CaptionUserPreferencesMac::preferredLanguages):
1993
1994 2013-02-12  Emil A Eklund  <eae@chromium.org>
1995
1996         TransformState::move should not round offset to int
1997         https://bugs.webkit.org/show_bug.cgi?id=108266
1998
1999         Reviewed by Simon Fraser.
2000         
2001         Currently TransformState::move rounds the offset to the nearest
2002         integer values, this results in operations using TransformState
2003         to compute a position to misreport the location, specifically
2004         Element:getBoundingClientRect and repaint rects. Sizes are
2005         handled correctly and do not have the same problem.
2006
2007         Tests: fast/sub-pixel/boundingclientrect-subpixel-margin.html
2008                fast/sub-pixel/clip-rect-box-consistent-rounding.html
2009
2010         * page/FrameView.cpp:
2011         (WebCore::FrameView::convertFromRenderer):
2012         Change to use pixel snapping instead of enclosing box. All other
2013         code paths use pixelSnappedIntRect to align the rects to device
2014         pixels however this used enclosingIntRect (indirectly through
2015         the FloatQuad::enclosingBoundingBox call).
2016         Without the rounding in TransformState this causes repaint rects
2017         for elements on subpixel bounds to be too large by up to one
2018         pixel on each axis. For normal repaints this isn't really a
2019         problem but in scrollContentsSlowPath it can result in moving
2020         too large a rect.
2021
2022         * platform/graphics/transforms/TransformState.cpp:
2023         (WebCore::TransformState::translateTransform):
2024         (WebCore::TransformState::translateMappedCoordinates):
2025         Change to take a LayoutSize instead of an IntSize.
2026
2027         (WebCore::TransformState::move):
2028         (WebCore::TransformState::applyAccumulatedOffset):
2029         * platform/graphics/transforms/TransformState.h:
2030         Remove rounding logic and use original, more precise, value.
2031
2032         * rendering/RenderGeometryMap.cpp:
2033         (WebCore::RenderGeometryMap::mapToContainer):
2034         Remove rounding logic and use original, more precise, value.
2035
2036 2013-02-12  Jessie Berlin  <jberlin@apple.com>
2037
2038         Rollout r142618, it broke all the Mac builds.
2039
2040         * inspector/HeapGraphSerializer.cpp:
2041         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
2042         (WebCore::HeapGraphSerializer::pushUpdate):
2043         (WebCore::HeapGraphSerializer::reportNode):
2044         (WebCore::HeapGraphSerializer::toNodeId):
2045         (WebCore::HeapGraphSerializer::addRootNode):
2046         * inspector/HeapGraphSerializer.h:
2047         (WebCore):
2048         (HeapGraphSerializer):
2049         * inspector/InspectorMemoryAgent.cpp:
2050         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
2051
2052 2013-02-12  Rafael Weinstein  <rafaelw@chromium.org>
2053
2054         [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
2055         https://bugs.webkit.org/show_bug.cgi?id=109338
2056
2057         Reviewed by Adam Barth.
2058
2059         This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
2060         is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
2061
2062         Tests added to html5lib.
2063
2064         * html/parser/HTMLTreeBuilder.cpp:
2065         (WebCore):
2066         (WebCore::HTMLTreeBuilder::popAllTemplates):
2067         (WebCore::HTMLTreeBuilder::processEndTag):
2068         (WebCore::HTMLTreeBuilder::processEndOfFile):
2069         * html/parser/HTMLTreeBuilder.h:
2070         (HTMLTreeBuilder):
2071
2072 2013-02-12  Dominic Mazzoni  <dmazzoni@google.com>
2073
2074         ASSERTION FAILED: i < size(), UNKNOWN in WebCore::AccessibilityMenuListPopup::didUpdateActiveOption
2075         https://bugs.webkit.org/show_bug.cgi?id=109452
2076
2077         Reviewed by Chris Fleizach.
2078
2079         Send the accessibility childrenChanged notification in
2080         HTMLSelectElement::setRecalcListItems instead of in childrenChanged
2081         so that all possible codepaths are caught.
2082
2083         Test: accessibility/insert-selected-option-into-select-causes-crash.html
2084
2085         * html/HTMLSelectElement.cpp:
2086         (WebCore::HTMLSelectElement::childrenChanged):
2087         (WebCore::HTMLSelectElement::setRecalcListItems):
2088
2089 2013-02-12  Peter Rybin  <prybin@chromium.org>
2090
2091         Web Inspector: for event listener provide handler function value in protocol and in UI
2092         https://bugs.webkit.org/show_bug.cgi?id=109284
2093
2094         Reviewed by Yury Semikhatsky.
2095
2096         The feature implies that we include a real handler function value into event listener description.
2097         Protocol description, inspector DOM agent (with V8 and JSC backends) and front-end is patched accordingly.
2098
2099         * bindings/js/ScriptEventListener.cpp:
2100         (WebCore::eventListenerHandler):
2101         (WebCore):
2102         (WebCore::eventListenerHandlerScriptState):
2103         * bindings/js/ScriptEventListener.h:
2104         (WebCore):
2105         * bindings/v8/ScriptEventListener.cpp:
2106         (WebCore::eventListenerHandler):
2107         (WebCore):
2108         (WebCore::eventListenerHandlerScriptState):
2109         * bindings/v8/ScriptEventListener.h:
2110         (WebCore):
2111         * inspector/Inspector.json:
2112         * inspector/InspectorDOMAgent.cpp:
2113         (WebCore::InspectorDOMAgent::getEventListenersForNode):
2114         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2115         * inspector/InspectorDOMAgent.h:
2116         (InspectorDOMAgent):
2117         * inspector/front-end/DOMAgent.js:
2118         (WebInspector.DOMNode.prototype.eventListeners):
2119         * inspector/front-end/EventListenersSidebarPane.js:
2120         (WebInspector.EventListenersSidebarPane.prototype.update):
2121         (.):
2122
2123 2013-02-12  Yury Semikhatsky  <yurys@chromium.org>
2124
2125         Web Inspector: add initial implementation of native memory graph to Timeline
2126         https://bugs.webkit.org/show_bug.cgi?id=109578
2127
2128         Reviewed by Alexander Pavlov.
2129
2130         This change adds inital implementation of native memory graph UI. The graph
2131         will be shown in the same place as DOM counters graph on the Timeline panel.
2132
2133         Added NativeMemoryGraph.js that reuses parts of DOM counters graph
2134         implementation. MemoryStatistics.js was refactor to allow sharing
2135         more code between DOM counters and native memory graph.
2136
2137         * WebCore.gypi:
2138         * WebCore.vcproj/WebCore.vcproj:
2139         * inspector/compile-front-end.py:
2140         * inspector/front-end/MemoryStatistics.js:
2141         (WebInspector.MemoryStatistics):
2142         (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
2143         (WebInspector.MemoryStatistics.prototype._createCounterUIList):
2144         (WebInspector.MemoryStatistics.prototype._createCounterUIList.getNodeCount):
2145         (WebInspector.MemoryStatistics.prototype._createCounterUIList.getListenerCount):
2146         (WebInspector.MemoryStatistics.prototype._canvasHeight):
2147         (WebInspector.MemoryStatistics.prototype._updateSize):
2148         (WebInspector.MemoryStatistics.prototype._highlightCurrentPositionOnGraphs):
2149         (WebInspector.MemoryStatistics.prototype._drawMarker):
2150         * inspector/front-end/NativeMemoryGraph.js: Added.
2151         (WebInspector.NativeMemoryGraph):
2152         (WebInspector.NativeMemoryCounterUI):
2153         (WebInspector.NativeMemoryCounterUI.prototype._hslToString):
2154         (WebInspector.NativeMemoryCounterUI.prototype.updateCurrentValue):
2155         (WebInspector.NativeMemoryCounterUI.prototype.clearCurrentValueAndMarker):
2156         (WebInspector.NativeMemoryGraph.prototype._createCurrentValuesBar):
2157         (WebInspector.NativeMemoryGraph.prototype._createCounterUIList.getCounterValue):
2158         (WebInspector.NativeMemoryGraph.prototype._createCounterUIList):
2159         (WebInspector.NativeMemoryGraph.prototype._canvasHeight):
2160         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
2161         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
2162         (WebInspector.NativeMemoryGraph.prototype._draw):
2163         (WebInspector.NativeMemoryGraph.prototype._clearCurrentValueAndMarker):
2164         (WebInspector.NativeMemoryGraph.prototype._updateCurrentValue):
2165         (WebInspector.NativeMemoryGraph.prototype._restoreImageUnderMarker):
2166         (WebInspector.NativeMemoryGraph.prototype._saveImageUnderMarker):
2167         (WebInspector.NativeMemoryGraph.prototype._drawMarker):
2168         (WebInspector.NativeMemoryGraph.prototype._maxCounterValue):
2169         (WebInspector.NativeMemoryGraph.prototype._resetTotalValues):
2170         (WebInspector.NativeMemoryGraph.prototype.valueGetter):
2171         (WebInspector.NativeMemoryGraph.prototype._drawGraph):
2172         (WebInspector.NativeMemoryGraph.prototype._discardImageUnderMarker):
2173         * inspector/front-end/TimelinePanel.js:
2174         * inspector/front-end/WebKit.qrc:
2175         * inspector/front-end/timelinePanel.css:
2176         (#memory-graphs-canvas-container.dom-counters .resources-dividers):
2177         (.memory-category-value):
2178
2179 2013-02-12  Andrey Lushnikov  <lushnikov@chromium.org>
2180
2181         Web Inspector: refactor some reusable functionality from BraceHighlighter
2182         https://bugs.webkit.org/show_bug.cgi?id=109574
2183
2184         Reviewed by Pavel Feldman.
2185
2186         New test: inspector/editor/text-editor-brace-highlighter.html
2187
2188         Extract functionality which, for given line and cursor position, will
2189         return position for a brace that should be highlighted. Add a layout
2190         test to verify brace highlighter funcionality.
2191
2192         * inspector/front-end/DefaultTextEditor.js:
2193         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.activeBraceColumnForCursorPosition):
2194         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
2195         * inspector/front-end/TextUtils.js:
2196         (WebInspector.TextUtils.isOpeningBraceChar):
2197         (WebInspector.TextUtils.isClosingBraceChar):
2198         (WebInspector.TextUtils.isBraceChar):
2199
2200 2013-02-12  Ilya Tikhonovsky  <loislo@chromium.org>
2201
2202         Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
2203         https://bugs.webkit.org/show_bug.cgi?id=109554
2204
2205         In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
2206         can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
2207
2208         Drive by fix: I introduced a client interface for the HeapGraphSerializer.
2209         It helps me to do the tests for the serializer.
2210
2211         Reviewed by Yury Semikhatsky.
2212
2213         It is covered by newly added tests in TestWebKitAPI.
2214
2215         * inspector/HeapGraphSerializer.cpp:
2216         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
2217         (WebCore::HeapGraphSerializer::pushUpdate):
2218         (WebCore::HeapGraphSerializer::reportNode):
2219         (WebCore::HeapGraphSerializer::toNodeId):
2220         (WebCore::HeapGraphSerializer::addRootNode):
2221         * inspector/HeapGraphSerializer.h:
2222         (HeapGraphSerializerClient):
2223         (WebCore::HeapGraphSerializerClient::~HeapGraphSerializerClient):
2224         (HeapGraphSerializer):
2225         * inspector/InspectorMemoryAgent.cpp:
2226         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
2227
2228 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
2229
2230         Web Inspector: Introduce version controller to migrate settings versions.
2231         https://bugs.webkit.org/show_bug.cgi?id=109553
2232
2233         Reviewed by Yury Semikhatsky.
2234
2235         This patch introduces version controller that could be used to migrate inspector settings.
2236
2237         Test: inspector/version-controller.html
2238
2239         * inspector/front-end/Settings.js:
2240         (WebInspector.Settings):
2241         (WebInspector.VersionController):
2242         (WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion):
2243         (WebInspector.VersionController.prototype._updateVersionFrom0To1):
2244         * inspector/front-end/inspector.js:
2245
2246 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
2247
2248         Web Inspector: File system should produce more verbose error messages and recover from errors
2249         https://bugs.webkit.org/show_bug.cgi?id=109571
2250
2251         Reviewed by Alexander Pavlov.
2252
2253         Error handler prints original file system call params now.
2254         Added callbacks to error handler to recover from errors.
2255
2256         * inspector/front-end/FileSystemProjectDelegate.js:
2257         (WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
2258         (WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
2259         (WebInspector.FileSystemUtils.errorMessage):
2260         (.fileSystemLoaded):
2261         (.fileEntryLoaded):
2262         (.errorHandler):
2263         (WebInspector.FileSystemUtils.requestFileContent):
2264         (WebInspector.FileSystemUtils.setFileContent):
2265         (WebInspector.FileSystemUtils._readDirectory):
2266         (.innerCallback):
2267         (WebInspector.FileSystemUtils._requestEntries):
2268
2269 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
2270
2271         Web Inspector: Get rid of unnecessary complexity in FileSystemUtil: remove _getDirectory() method.
2272         https://bugs.webkit.org/show_bug.cgi?id=109567
2273
2274         Reviewed by Alexander Pavlov.
2275
2276         The code in this method was redundant as the same result could be achieved by using File System API directly.
2277
2278         * inspector/front-end/FileSystemProjectDelegate.js:
2279
2280 2013-02-12  Alexander Pavlov  <apavlov@chromium.org>
2281
2282         Web Inspector: [SuggestBox] SuggestBox not hidden when prefix is empty and there is preceding input
2283         https://bugs.webkit.org/show_bug.cgi?id=109568
2284
2285         Reviewed by Vsevolod Vlasov.
2286
2287         The suggestbox would get hidden in the case of empty input, yet it should get hidden
2288         in the case of empty user-entered prefix (which is a wider notion.)
2289
2290         * inspector/front-end/TextPrompt.js:
2291         (WebInspector.TextPrompt.prototype.complete):
2292
2293 2013-02-12  Andrey Lushnikov  <lushnikov@chromium.org>
2294
2295         Web Inspector: separate SuggestBox from TextPrompt
2296         https://bugs.webkit.org/show_bug.cgi?id=109430
2297
2298         Reviewed by Alexander Pavlov.
2299
2300         Create WebInspector.SuggestBoxDelegate interface and
2301         refactor TextPrompt to use this interface. Separate SuggestBox into
2302         WebInspector.SuggestBox namespace and put it into its own file.
2303
2304         No new tests: no change in behaviour.
2305
2306         * WebCore.gypi:
2307         * WebCore.vcproj/WebCore.vcproj:
2308         * inspector/compile-front-end.py:
2309         * inspector/front-end/SuggestBox.js: Added.
2310         (WebInspector.SuggestBoxDelegate):
2311         (WebInspector.SuggestBoxDelegate.prototype.applySuggestion):
2312         (WebInspector.SuggestBoxDelegate.prototype.acceptSuggestion):
2313         (WebInspector.SuggestBoxDelegate.prototype.userEnteredText):
2314         (WebInspector.SuggestBox):
2315         (WebInspector.SuggestBox.prototype.get visible):
2316         (WebInspector.SuggestBox.prototype.get hasSelection):
2317         (WebInspector.SuggestBox.prototype._onscrollresize):
2318         (WebInspector.SuggestBox.prototype._updateBoxPositionWithExistingAnchor):
2319         (WebInspector.SuggestBox.prototype._updateBoxPosition):
2320         (WebInspector.SuggestBox.prototype._onboxmousedown):
2321         (WebInspector.SuggestBox.prototype.hide):
2322         (WebInspector.SuggestBox.prototype.removeFromElement):
2323         (WebInspector.SuggestBox.prototype._applySuggestion):
2324         (WebInspector.SuggestBox.prototype.acceptSuggestion):
2325         (WebInspector.SuggestBox.prototype._selectClosest):
2326         (WebInspector.SuggestBox.prototype.updateSuggestions):
2327         (WebInspector.SuggestBox.prototype._onItemMouseDown):
2328         (WebInspector.SuggestBox.prototype._createItemElement):
2329         (WebInspector.SuggestBox.prototype._updateItems):
2330         (WebInspector.SuggestBox.prototype._selectItem):
2331         (WebInspector.SuggestBox.prototype._canShowBox):
2332         (WebInspector.SuggestBox.prototype._rememberRowCountPerViewport):
2333         (WebInspector.SuggestBox.prototype._completionsReady):
2334         (WebInspector.SuggestBox.prototype.upKeyPressed):
2335         (WebInspector.SuggestBox.prototype.downKeyPressed):
2336         (WebInspector.SuggestBox.prototype.pageUpKeyPressed):
2337         (WebInspector.SuggestBox.prototype.pageDownKeyPressed):
2338         (WebInspector.SuggestBox.prototype.enterKeyPressed):
2339         (WebInspector.SuggestBox.prototype.tabKeyPressed):
2340         * inspector/front-end/TextPrompt.js:
2341         (WebInspector.TextPrompt.prototype.userEnteredText):
2342         (WebInspector.TextPrompt.prototype._attachInternal):
2343         (WebInspector.TextPrompt.prototype._completionsReady):
2344         (WebInspector.TextPrompt.prototype.applySuggestion):
2345         (WebInspector.TextPrompt.prototype._applySuggestion):
2346         (WebInspector.TextPrompt.prototype.enterKeyPressed):
2347         (WebInspector.TextPrompt.prototype.upKeyPressed):
2348         (WebInspector.TextPrompt.prototype.downKeyPressed):
2349         (WebInspector.TextPrompt.prototype.pageUpKeyPressed):
2350         (WebInspector.TextPrompt.prototype.pageDownKeyPressed):
2351         * inspector/front-end/WebKit.qrc:
2352         * inspector/front-end/inspector.html:
2353
2354 2013-02-12  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
2355
2356         [TexMap] Apply frames-per-second debug counter to WK1.
2357         https://bugs.webkit.org/show_bug.cgi?id=109540
2358
2359         Reviewed by Noam Rosenthal.
2360
2361         Adds basysKom copyright info to TextureMapperFPSCounter header.
2362
2363         * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
2364         * platform/graphics/texmap/TextureMapperFPSCounter.h:
2365
2366 2013-02-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2367
2368         Unreviewed, rolling out r142531.
2369         http://trac.webkit.org/changeset/142531
2370         https://bugs.webkit.org/show_bug.cgi?id=109569
2371
2372         Causes html5lib/run-template layout test to crash. (Requested
2373         by atwilson_ on #webkit).
2374
2375         * html/parser/HTMLTreeBuilder.cpp:
2376         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
2377         (WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup):
2378         (WebCore::HTMLTreeBuilder::processEndOfFile):
2379         * html/parser/HTMLTreeBuilder.h:
2380         (HTMLTreeBuilder):
2381
2382 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
2383
2384         [GTK] Enable CSS image-set support in development builds
2385         https://bugs.webkit.org/show_bug.cgi?id=109475
2386
2387         Reviewed by Martin Robinson.
2388
2389         No new tests - majority of the related tests now passes.
2390
2391         * GNUmakefile.features.am.in: Add the feature define for the CSS image-set feature
2392         with the define value defaulting to 0. The value gets overridden with 1 in development
2393         builds, meaning the feature is enabled under that configuration.
2394
2395 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
2396
2397         [GTK] Enable DOM4 events constructors in development builds
2398         https://bugs.webkit.org/show_bug.cgi?id=109471
2399
2400         Reviewed by Martin Robinson.
2401
2402         No new tests - the related tests now pass.
2403
2404         * GNUmakefile.features.am.in: Add the feature define for the DOM4 events
2405         constructors feature, its value defaulting to 0. This value is overridden
2406         with 1 in development builds, effectively enabling the feature.
2407
2408 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
2409
2410         Unreviewed build fix for the GTK port after r142595.
2411         Adding the TextureMapperFPSCounter files to the list of build targets
2412         in case of using the OpenGL texture mapper.
2413
2414         * GNUmakefile.list.am:
2415
2416 2013-02-12  Andrey Kosyakov  <caseq@chromium.org>
2417
2418         Web Inspector: fix closure compiler warnings in extension server and API
2419         https://bugs.webkit.org/show_bug.cgi?id=109563
2420
2421         Reviewed by Vsevolod Vlasov.
2422
2423         * inspector/front-end/ExtensionAPI.js: drive-by: make sure we fail if extensionServer is not defined in outer scope.
2424         * inspector/front-end/ExtensionServer.js:
2425         (WebInspector.ExtensionServer.prototype.):
2426         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
2427         * inspector/front-end/externs.js: add extensionServer
2428
2429 2013-02-12  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2430
2431         Unreviewed. Fix !ENABLE(INSPECTOR) builds after r142575
2432
2433         * inspector/InspectorInstrumentation.h:
2434         (WebCore::InspectorInstrumentation::willDispatchEvent):
2435
2436 2013-02-12  Andrey Lushnikov  <lushnikov@chromium.org>
2437
2438         Web Inspector: move showWhitespace option into experiments
2439         https://bugs.webkit.org/show_bug.cgi?id=109552
2440
2441         Reviewed by Vsevolod Vlasov.
2442
2443         Remove "show whitespace" setting and add it to experiments.
2444
2445         No new tests: fixed an existing test to verify changes.
2446
2447         * English.lproj/localizedStrings.js:
2448         * inspector/front-end/DefaultTextEditor.js:
2449         (WebInspector.TextEditorMainPanel):
2450         (WebInspector.TextEditorMainPanel.prototype.wasShown):
2451         (WebInspector.TextEditorMainPanel.prototype.willHide):
2452         * inspector/front-end/Settings.js:
2453         (WebInspector.ExperimentsSettings):
2454         * inspector/front-end/SettingsScreen.js:
2455         (WebInspector.GenericSettingsTab):
2456
2457 2013-02-12  Tamas Czene  <tczene@inf.u-szeged.hu>
2458
2459         Add error checking into OpenCL version of SVG filters.
2460         https://bugs.webkit.org/show_bug.cgi?id=107444
2461
2462         Reviewed by Zoltan Herczeg.
2463
2464         In case of an error the program runs through all the remaining filters by doing nothing. 
2465         After that deletes the results of every filter and starts software rendering.
2466
2467         * platform/graphics/filters/FilterEffect.cpp:
2468         (WebCore):
2469         (WebCore::FilterEffect::applyAll): At software rendering this is a simple inline methode, but at OpenCL rendering it releases OpenCL things. If we have an error remove filter's results and start software rendering.
2470         (WebCore::FilterEffect::clearResultsRecursive):
2471         (WebCore::FilterEffect::openCLImageToImageBuffer):
2472         (WebCore::FilterEffect::createOpenCLImageResult):
2473         (WebCore::FilterEffect::transformResultColorSpace):
2474         * platform/graphics/filters/FilterEffect.h:
2475         (FilterEffect):
2476         (WebCore::FilterEffect::applyAll):
2477         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
2478         (WebCore::FilterContextOpenCL::isFailed):
2479         (WebCore):
2480         (WebCore::FilterContextOpenCL::freeResources):
2481         (WebCore::FilterContextOpenCL::destroyContext):
2482         (WebCore::FilterContextOpenCL::compileTransformColorSpaceProgram):
2483         (WebCore::FilterContextOpenCL::openCLTransformColorSpace):
2484         (WebCore::FilterContextOpenCL::compileProgram):
2485         (WebCore::FilterContextOpenCL::freeResource):
2486         * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
2487         (WebCore::FilterContextOpenCL::FilterContextOpenCL):
2488         (WebCore::FilterContextOpenCL::setInError):
2489         (WebCore::FilterContextOpenCL::inError):
2490         (FilterContextOpenCL):
2491         (WebCore::FilterContextOpenCL::RunKernel::RunKernel):
2492         (WebCore::FilterContextOpenCL::RunKernel::addArgument):
2493         (WebCore::FilterContextOpenCL::RunKernel::run):
2494         (RunKernel):
2495         * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp:
2496         (WebCore::FilterContextOpenCL::compileFEColorMatrix):
2497         (WebCore::FEColorMatrix::platformApplyOpenCL):
2498         * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp:
2499         (WebCore::FilterContextOpenCL::compileFETurbulence):
2500         (WebCore::FETurbulence::platformApplyOpenCL):
2501         * rendering/svg/RenderSVGResourceFilter.cpp:
2502         (WebCore::RenderSVGResourceFilter::postApplyResource):
2503
2504 2013-02-12  Huang Dongsung  <luxtella@company100.net>
2505
2506         [TexMap] Apply frames-per-second debug counter to WK1.
2507         https://bugs.webkit.org/show_bug.cgi?id=109540
2508
2509         Reviewed by Noam Rosenthal.
2510
2511         r142524 implemented frames-per-second debug counter on WK2. This patch
2512         applies frames-per-second debug counter to WK1 also.
2513
2514         Visual debugging feature, no need for new tests.
2515
2516         * CMakeLists.txt:
2517         * GNUmakefile.list.am:
2518         * Target.pri:
2519         * platform/graphics/texmap/TextureMapper.h:
2520         * platform/graphics/texmap/TextureMapperFPSCounter.cpp: Added.
2521         (WebCore):
2522         (WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
2523         (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
2524         * platform/graphics/texmap/TextureMapperFPSCounter.h: Added.
2525         (WebCore):
2526         (TextureMapperFPSCounter):
2527         * platform/graphics/texmap/TextureMapperGL.cpp:
2528         (WebCore):
2529         (WebCore::TextureMapperGL::drawNumber):
2530           Rename from drawRepaintCounter to drawNumber.
2531         * platform/graphics/texmap/TextureMapperGL.h:
2532         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2533         (WebCore::TextureMapperImageBuffer::drawNumber):
2534         * platform/graphics/texmap/TextureMapperImageBuffer.h:
2535         (TextureMapperImageBuffer):
2536         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
2537         (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
2538         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
2539         (WebCore::CoordinatedBackingStore::drawRepaintCounter):
2540         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2541           Move frames-per-second debug counter code to TextureMapperFPSCounter.
2542         (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
2543         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
2544         (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
2545         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2546
2547 2013-02-11  Yury Semikhatsky  <yurys@chromium.org>
2548
2549         Web Inspector: stack trace is cut at native bind if inspector is closed
2550         https://bugs.webkit.org/show_bug.cgi?id=109427
2551
2552         Reviewed by Pavel Feldman.
2553
2554         Only top frame is collected instead of full stack trace when inspector
2555         front-end is closed to avoid expensive operations when exceptions are
2556         thrown.
2557
2558         Test: http/tests/inspector-enabled/console-exception-while-no-inspector.html
2559
2560         * inspector/InspectorConsoleAgent.cpp:
2561         (WebCore::InspectorConsoleAgent::addMessageToConsole):
2562
2563 2013-02-12  Kent Tamura  <tkent@chromium.org>
2564
2565         INPUT_MULTIPLE_FIELDS_UI: Mouse click not on sub-fields in multiple fields input  should not move focus
2566         https://bugs.webkit.org/show_bug.cgi?id=109544
2567
2568         Reviewed by Kentaro Hara.
2569
2570         This is similar to Bug 108914, "Should not move focus if the element
2571         already has focus." We fixed a focus() case in Bug 108914. However we
2572         still have the problem in a case of focusing by mouse click.
2573
2574         The fix for Bug 108914 intercepted focus() function to change the
2575         behavior. However focus-by-click doesn't call focus(), but calls
2576         FocusController::setFocusedNode. To fix this problem, we introduce
2577         oldFocusedNode argument to handleFocusEvent, and
2578         BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent restores the
2579         focus to oldFocusedNode if oldFocusedNode is one of sub-fields.
2580         handleFocusEvent is called whenever the focused node is changed.
2581
2582         We don't need InputType::willCancelFocus any more because the new code
2583         in handleFocusEvent covers it.
2584
2585         Tests: Update fast/forms/time-multiple-fields/time-multiple-fields-focus.html.
2586
2587         * html/HTMLTextFormControlElement.h:
2588         (WebCore::HTMLTextFormControlElement::handleFocusEvent):
2589         Add oldFocusedNode argument.
2590         * html/HTMLTextFormControlElement.cpp:
2591         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
2592         Pass oldFocusedNode to handleFocusEvent.
2593
2594         * html/HTMLInputElement.h:
2595         (HTMLInputElement):
2596          - Add oldFocusedNode argument to handleFocusEvent.
2597          - Remove focus() override.
2598         * html/HTMLInputElement.cpp: Remove focus() override.
2599         (WebCore::HTMLInputElement::handleFocusEvent):
2600         Pass oldFocusedNode to InputType::handleFocusEvent.
2601         * html/InputType.cpp: Remove willCancelFocus.
2602         (WebCore::InputType::handleFocusEvent):
2603         Add oldFocusedNode argument.
2604         * html/InputType.h:
2605         (InputType): Ditto.
2606         * html/PasswordInputType.cpp:
2607         (WebCore::PasswordInputType::handleFocusEvent): Ditto.
2608         * html/PasswordInputType.h:
2609         (PasswordInputType): Ditto.
2610
2611         * html/BaseMultipleFieldsDateAndTimeInputType.h:
2612         (BaseMultipleFieldsDateAndTimeInputType):
2613         Remove willCancelFocus, and add oldFocusedNode argument to handleFocusEvent.
2614         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2615         (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent):
2616         Pass oldFocusedNode to DateTimeEditElement::focusByOwner if the
2617         direction is FocusDirectionNone.
2618
2619         * html/shadow/DateTimeEditElement.h:
2620         (DateTimeEditElement): Add oldFocusedNode argument to focusByOwner.
2621         * html/shadow/DateTimeEditElement.cpp:
2622         (WebCore::DateTimeEditElement::focusByOwner):
2623         If oldFocusedNode is one of sub-fields, focus on it again.
2624
2625 2013-02-12  Takashi Sakamoto  <tasak@google.com>
2626
2627         [Refactoring] Make m_selectorChecker in StyleResolver an on-stack object.
2628         https://bugs.webkit.org/show_bug.cgi?id=108595
2629
2630         Reviewed by Eric Seidel.
2631
2632         StyleResolver uses SelectorChecker's mode to change its resolving mode.
2633         However it is a state of StyleResolver. StyleResolver should have the
2634         mode and make SelectorChecker instance on a stack while required.
2635
2636         No new tests, just refactoring.
2637
2638         * css/SelectorChecker.cpp:
2639         (WebCore::SelectorChecker::fastCheckRightmostSelector):
2640         (WebCore::SelectorChecker::fastCheck):
2641         (WebCore::SelectorChecker::commonPseudoClassSelectorMatches):
2642         (WebCore::SelectorChecker::matchesFocusPseudoClass):
2643         Changed to static class function, because these methods never use
2644         "this".
2645         (WebCore):
2646         * css/SelectorChecker.h:
2647         (SelectorChecker):
2648         * css/StyleResolver.cpp:
2649         (WebCore::StyleResolver::StyleResolver):
2650         (WebCore::StyleResolver::collectMatchingRules):
2651         Now, matchesFocusPseudoClass is not a static method of
2652         SelectorChecker, so replaced "m_selectorChecker." with
2653         "SelectorChecker::".
2654         (WebCore::StyleResolver::sortAndTransferMatchedRules):
2655         (WebCore::StyleResolver::collectMatchingRulesForList):
2656         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2657         (WebCore::StyleResolver::matchUARules):
2658         (WebCore::StyleResolver::adjustRenderStyle):
2659         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2660         Use m_mode instead of m_selectorChecker.mode().
2661         Also use document()->inQuirksMode() instead of
2662         m_selectoChecker.strictParsing().
2663         (WebCore::StyleResolver::ruleMatches):
2664         (WebCore::StyleResolver::checkRegionSelector):
2665         Created an on-stack SelectorChecker object and used it to check
2666         selectors.
2667         * css/StyleResolver.h:
2668         (WebCore::StyleResolver::State::State):
2669         Added m_mode, this keeps m_selectorChecker's mode.
2670         (State):
2671         (StyleResolver):
2672         Removed m_selectorChecker.
2673
2674 2013-02-11  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
2675
2676         [Qt][EFL][WebGL] Minor refactoring of GraphicsSurface/GraphicsSurfaceGLX
2677         https://bugs.webkit.org/show_bug.cgi?id=108686
2678
2679         Reviewed by Noam Rosenthal.
2680
2681         Remove unused platformSurface()/m_platformSurface from GraphicsSurface.
2682         Move m_texture from GraphicsSurface to GLX GraphicsSurfacePrivate to match
2683         Win and Mac implementations.
2684
2685         No new tests, refactoring only.
2686
2687         * platform/graphics/surfaces/GraphicsSurface.cpp:
2688         (WebCore::GraphicsSurface::GraphicsSurface):
2689         * platform/graphics/surfaces/GraphicsSurface.h:
2690         (GraphicsSurface):
2691         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
2692         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2693         (WebCore::GraphicsSurfacePrivate::swapBuffers):
2694         (WebCore::GraphicsSurfacePrivate::surface):
2695         (GraphicsSurfacePrivate):
2696         (WebCore::GraphicsSurfacePrivate::textureID):
2697         (WebCore::GraphicsSurfacePrivate::clear):
2698         (WebCore::GraphicsSurface::platformExport):
2699         (WebCore::GraphicsSurface::platformGetTextureID):
2700         (WebCore::GraphicsSurface::platformSwapBuffers):
2701         (WebCore::GraphicsSurface::platformCreate):
2702         (WebCore::GraphicsSurface::platformImport):
2703         (WebCore::GraphicsSurface::platformDestroy):
2704
2705 2013-02-11  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
2706
2707         [EFL][WebGL] WebGL content is not painted after resizing the viewport.
2708         https://bugs.webkit.org/show_bug.cgi?id=106358
2709
2710         Reviewed by Noam Rosenthal.
2711
2712         When page size changes and layer parameters get updated LayerTreeRenderer::setLayerState
2713         clears the layer backing store and detaches the canvas surface from the layer. If the layer
2714         size is not changed then the canvas is not recreated. This leaves the canvas detached from
2715         the layer, but still referenced from m_surfaceBackingStores.
2716         Don't assign layer backing store to layer in assignImageBackingToLayer if there is a canvas
2717         surface already attached to the layer.
2718
2719         Test: fast/canvas/webgl/webgl-layer-update.html
2720
2721         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2722         (WebCore::CoordinatedGraphicsScene::setLayerState):
2723         (WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
2724         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2725
2726 2013-02-11  Eric Carlson  <eric.carlson@apple.com>
2727
2728         [Mac] Track language selection should be sticky
2729         https://bugs.webkit.org/show_bug.cgi?id=109466
2730
2731         Reviewed by Dean Jackson.
2732
2733         Choosing a text track from the caption menu should make that track's language the
2734         preferred caption language. Turning captions off from the menu should disable captions
2735         in videos loaded subsequently.
2736
2737         OS X has system support for these settings, so changes made by DRT should not change the
2738         settings on the user's system. Add support for all other ports in DRT only.
2739
2740         Test: media/track/track-user-preferences.html
2741
2742         * WebCore.exp.in: Export PageGroup::captionPreferences().
2743
2744         * html/HTMLMediaElement.cpp:
2745         (WebCore::HTMLMediaElement::HTMLMediaElement): Use page()->group().captionPreferences().
2746         (WebCore::HTMLMediaElement::attach): Ditto.
2747         (WebCore::HTMLMediaElement::detach): Ditto.
2748         (WebCore::HTMLMediaElement::userPrefersCaptions): Ditto.
2749         (WebCore::HTMLMediaElement::configureTextTrackGroup): Ditto. Update for 
2750             preferredLanguageFromList change.
2751         (WebCore::HTMLMediaElement::toggleTrackAtIndex): Set user prefs for captions visible and
2752             caption language as appropriate.
2753
2754         * html/shadow/MediaControlElements.cpp:
2755         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Remove unneeded comment.
2756         (WebCore::MediaControlTextTrackContainerElement::updateSizes):  Use page()->group().captionPreferences().
2757
2758         * html/shadow/MediaControlsApple.cpp:
2759         (WebCore::MediaControlsApple::closedCaptionTracksChanged): Update caption menu button visibility.
2760
2761         * page/CaptionUserPreferences.h:
2762         (WebCore::CaptionUserPreferences::userPrefersCaptions): Support "testing" mode.
2763         (WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
2764         (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks): Ditto.
2765         (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks): Ditto.
2766         (WebCore::CaptionUserPreferences::setPreferredLanguage): Ditto.
2767         (WebCore::CaptionUserPreferences::preferredLanguages): Ditto.
2768         (WebCore::CaptionUserPreferences::testingMode): Ditto.
2769         (WebCore::CaptionUserPreferences::setTestingMode): Ditto.
2770         (WebCore::CaptionUserPreferences::CaptionUserPreferences): Ditto.
2771
2772         * page/CaptionUserPreferencesMac.h:
2773         * page/CaptionUserPreferencesMac.mm:
2774         (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Support "testing" mode.
2775         (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
2776         (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
2777         (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Change name from
2778             registerForCaptionPreferencesChangedCallbacks. Support "testing" mode.
2779         (WebCore::CaptionUserPreferencesMac::unregisterForPreferencesChangedCallbacks):  Change name from
2780             unregisterForCaptionPreferencesChangedCallbacks. Support "testing" mode.
2781         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Support "testing" mode.
2782         (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
2783         (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
2784         (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto. Return the platform override when set.
2785
2786         * page/PageGroup.cpp:
2787         (WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): Remove because it is already
2788             available from the caption preference object.
2789         (WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
2790         (WebCore::PageGroup::userPrefersCaptions): Ditto.
2791         (WebCore::PageGroup::userHasCaptionPreferences): Ditto.
2792         (WebCore::PageGroup::captionFontSizeScale): Ditto.
2793         * page/PageGroup.h:
2794
2795         * platform/Language.cpp:
2796         (WebCore::preferredLanguageFromList): Take the list of preferred languages instead of assuming
2797             the system list.
2798         * platform/Language.h:
2799
2800         * testing/Internals.cpp:
2801         (WebCore::Internals::resetToConsistentState): Disable caption testing mode.
2802         (WebCore::Internals::Internals): Enable caption testing mode so the user's system
2803             preferences are not modified.
2804
2805 2013-02-11  Huang Dongsung  <luxtella@company100.net>
2806
2807         Coordinated Graphics: Make CoordinatedGraphicsScene not know contents size.
2808         https://bugs.webkit.org/show_bug.cgi?id=108922
2809
2810         Reviewed by Noam Rosenthal.
2811
2812         Currently, CoordinatedGraphicsScene has two methods to know contents
2813         size: setContentsSize() and setVisibleContentsRect(). Contents size is
2814         used when adjusting a scroll position, but adjustment is not needed
2815         because EFL and Qt platform code (currently PageViewportController)
2816         already adjusts a scroll position, and it is natural for each platform
2817         to be in charge of adjusting. So this patch makes CoordinatedGraphicsScene
2818         not know contents size.
2819
2820         In addition, now DrawingAreaProxy::coordinatedLayerTreeHostProxy() is only used
2821         to get CoordinatedGraphicsScene.
2822
2823         This patch can only be tested manually since there is no automated
2824         testing facilities for in-motion touch.
2825         Test: ManualTests/fixed-position.html
2826               ManualTests/nested-fixed-position.html
2827
2828         * platform/graphics/texmap/TextureMapperLayer.cpp:
2829         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
2830         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2831         (WebCore::CoordinatedGraphicsScene::setScrollPosition):
2832         (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
2833         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2834         (CoordinatedGraphicsScene):
2835
2836 2013-02-11  Huang Dongsung  <luxtella@company100.net>
2837
2838         Coordinated Graphics: remove the DidChangeScrollPosition message.
2839         https://bugs.webkit.org/show_bug.cgi?id=108051
2840
2841         Reviewed by Noam Rosenthal.
2842         Signed off for WebKit2 by Benjamin Poulain.
2843
2844         Currently, we use the DidChangeScrollPosition message to send the scroll
2845         position that WebCore used in this frame to UI Process. We had to have
2846         some member variables for the DidChangeScrollPosition message.
2847         However, we can send a scroll position via the DidRenderFrame message,
2848         because CoordinatedGraphicsScene::m_renderedContentsScrollPosition is
2849         updated at the moment of flushing. So we can remove the
2850         DidChangeScrollPosition message and some redundant member variables.
2851
2852         No tests. No change in behavior.
2853
2854         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2855         (WebCore::CoordinatedGraphicsScene::flushLayerChanges):
2856         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2857         (CoordinatedGraphicsScene):
2858
2859 2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
2860
2861         Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
2862         https://bugs.webkit.org/show_bug.cgi?id=109534
2863
2864         Reviewed by Anders Carlsson.
2865
2866         * editing/DeleteButtonController.cpp:
2867         (WebCore::DeleteButtonController::show):
2868         * editing/Editor.cpp:
2869         (WebCore):
2870         * editing/Editor.h:
2871         (Editor):
2872         * loader/EmptyClients.h:
2873         (WebCore::EmptyEditorClient::shouldDeleteRange):
2874         (EmptyEditorClient):
2875         (WebCore::EmptyEditorClient::shouldShowDeleteInterface):
2876         * page/EditorClient.h:
2877         (EditorClient):
2878
2879 2013-02-11  Hayato Ito  <hayato@chromium.org>
2880
2881         Factor EventContext and introduces MouseOrFocusEventContext.
2882         https://bugs.webkit.org/show_bug.cgi?id=109278
2883
2884         Reviewed by Dimitri Glazkov.
2885
2886         To supoort Touch event retargeting (bug 107800), we have to factor
2887         event retargeting code so that it can support not only MouseEvent or FocusEvent,
2888         but also other events.
2889
2890         This is the first attempt to refactor event retargeting code, a
2891         separated patch from bug 109156.  EventContext is now factored and
2892         MouseOrFocusEventContext was introduced to support MouseEvent or
2893         FocusEvent separately.
2894
2895         In following patches, I'll introduce TouchEventContext and
2896         TouchEventDispatchMediator to support Touch event retargeting.
2897
2898         No new tests. No change in functionality.
2899
2900         * dom/EventContext.cpp:
2901         (WebCore::EventContext::EventContext): Factor relatedTarget out from EventContext into MouseOrFocusEventContext.
2902         (WebCore::EventContext::~EventContext):
2903         (WebCore):
2904         (WebCore::EventContext::handleLocalEvents):
2905         (WebCore::EventContext::isMouseOrFocusEventContext):
2906         (WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext):  New. Handles MouseEvent's (or FocusEvent's) relatedTarget retargeting.
2907         (WebCore::MouseOrFocusEventContext::~MouseOrFocusEventContext):
2908         (WebCore::MouseOrFocusEventContext::handleLocalEvents):
2909         (WebCore::MouseOrFocusEventContext::isMouseOrFocusEventContext):
2910         * dom/EventContext.h:
2911         (EventContext):
2912         (WebCore::EventContext::node):
2913         (WebCore::EventContext::target):
2914         (WebCore::EventContext::currentTargetSameAsTarget):
2915         (WebCore):
2916         (MouseOrFocusEventContext):
2917         (WebCore::MouseOrFocusEventContext::relatedTarget):
2918         (WebCore::MouseOrFocusEventContext::setRelatedTarget):
2919         * dom/EventDispatcher.cpp:
2920         (WebCore::EventRelatedTargetAdjuster::adjust):
2921         (WebCore::EventDispatcher::adjustRelatedTarget):
2922         (WebCore::EventDispatcher::ensureEventPath):  Renamad from ensureEventAncestors. Use the DOM Core terminology.
2923         (WebCore::EventDispatcher::dispatchEvent):
2924         (WebCore::EventDispatcher::dispatchEventAtCapturing):
2925         (WebCore::EventDispatcher::dispatchEventAtTarget):
2926         (WebCore::EventDispatcher::dispatchEventAtBubbling):
2927         (WebCore::EventDispatcher::dispatchEventPostProcess):
2928         (WebCore::EventDispatcher::topEventContext):
2929         * dom/EventDispatcher.h:
2930         (EventRelatedTargetAdjuster):
2931         (EventDispatcher):
2932         * inspector/InspectorInstrumentation.cpp:
2933         (WebCore):
2934         (WebCore::eventHasListeners):
2935         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
2936         * inspector/InspectorInstrumentation.h:
2937         (InspectorInstrumentation):
2938         (WebCore::InspectorInstrumentation::willDispatchEvent):
2939
2940 2013-02-11  peavo@outlook.com  <peavo@outlook.com>
2941
2942         [Curl] setCookiesFromDOM function does not save cookies to disk.
2943         https://bugs.webkit.org/show_bug.cgi?id=109285
2944
2945         Reviewed by Brent Fulgham.
2946
2947         Write cookies to disk by using the Curl easy api.
2948
2949         * platform/network/curl/CookieJarCurl.cpp:
2950         (WebCore::setCookiesFromDOM):Write cookie to disk.
2951         * platform/network/curl/ResourceHandleManager.cpp:
2952         (WebCore::ResourceHandleManager::getCurlShareHandle): Added method to get Curl share handle.
2953         (WebCore::ResourceHandleManager::getCookieJarFileName): Added method to get cookie file name.
2954         * platform/network/curl/ResourceHandleManager.h: Added methods to get cookie file name, and Curl share handle.
2955
2956 2013-02-11  Hayato Ito  <hayato@chromium.org>
2957
2958         Split each RuleSet and feature out from StyleResolver into its own class.
2959         https://bugs.webkit.org/show_bug.cgi?id=107777
2960
2961         Reviewed by Dimitri Glazkov.
2962
2963         Re-landing r141964, which was reverted in r141973, since r141964 seem to be innocent.
2964
2965         No tests. No change in behavior.
2966
2967         * CMakeLists.txt:
2968         * GNUmakefile.list.am:
2969         * Target.pri:
2970         * WebCore.gypi:
2971         * WebCore.xcodeproj/project.pbxproj:
2972         * css/CSSAllInOne.cpp:
2973         * css/DocumentRuleSets.cpp: Added.
2974         (WebCore):
2975         (WebCore::DocumentRuleSets::DocumentRuleSets):
2976         (WebCore::DocumentRuleSets::~DocumentRuleSets):
2977         (WebCore::DocumentRuleSets::initUserStyle): New helper to initialize each RuleSets.
2978         (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets): Factored out from StyleResolver.
2979         (WebCore::makeRuleSet): Ditto.
2980         (WebCore::DocumentRuleSets::resetAuthorStyle): Ditto.
2981         (WebCore::DocumentRuleSets::appendAuthorStyleSheets): Ditto.
2982         (WebCore::DocumentRuleSets::collectFeatures): Ditto.
2983         (WebCore::DocumentRuleSets::reportMemoryUsage): New methods to report memory usage. Factored out from StyleResolver.
2984         * css/DocumentRuleSets.h: Added.
2985         (WebCore):
2986         (DocumentRuleSets):
2987         (WebCore::DocumentRuleSets::authorStyle): Moved from StyleResolver.
2988         (WebCore::DocumentRuleSets::userStyle): Ditto.
2989         (WebCore::DocumentRuleSets::features): Ditto.
2990         (WebCore::DocumentRuleSets::sibling): Ditto.
2991         (WebCore::DocumentRuleSets::uncommonAttribute): Ditto.
2992         * css/StyleResolver.cpp:
2993         (WebCore::StyleResolver::StyleResolver):
2994         (WebCore::StyleResolver::appendAuthorStyleSheets): Now calls DocumentRuleSets::appendAuthorStyleSheets.
2995         (WebCore::StyleResolver::matchAuthorRules): Use m_ruleSets.
2996         (WebCore::StyleResolver::matchUserRules): Ditto.
2997         (WebCore::StyleResolver::classNamesAffectedByRules): Ditto.
2998         (WebCore::StyleResolver::locateCousinList): Ditto.
2999         (WebCore::StyleResolver::canShareStyleWithElement): Ditto.
3000         (WebCore::StyleResolver::locateSharedStyle): Ditto.
3001         (WebCore::StyleResolver::styleForPage): Ditto.
3002         (WebCore::StyleResolver::checkRegionStyle): Ditto.
3003         (WebCore::StyleResolver::applyProperty): Ditto.
3004         (WebCore::StyleResolver::reportMemoryUsage): Now calls DocumentRuleSets::reportMemoryUsage.
3005         * css/StyleResolver.h:
3006         (WebCore::StyleResolver::scopeResolver):
3007         (StyleResolver):
3008         (WebCore::StyleResolver::ruleSets): accessor r to DocumentRuleSets.
3009         (WebCore::StyleResolver::usesSiblingRules): Use m_ruleSets.
3010         (WebCore::StyleResolver::usesFirstLineRules): Ditto.
3011         (WebCore::StyleResolver::usesBeforeAfterRules): Ditto.
3012         (WebCore::StyleResolver::hasSelectorForAttribute): Ditto.
3013         (WebCore::StyleResolver::hasSelectorForClass): Ditto.
3014         (WebCore::StyleResolver::hasSelectorForId): Ditto.
3015         * dom/DocumentStyleSheetCollection.cpp:
3016         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
3017
3018 2013-02-11  Keishi Hattori  <keishi@webkit.org>
3019
3020         REGRESSION (r140778):Calendar Picker buttons are wrong when rtl
3021         https://bugs.webkit.org/show_bug.cgi?id=109158
3022
3023         Reviewed by Kent Tamura.
3024
3025         The calendar picker button's icon and position where wrong when rtl.
3026
3027
3028         Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html
3029
3030         * Resources/pagepopups/calendarPicker.css:
3031         (.year-month-button-left .year-month-button): Use -webkit-margin-end so the margin is applide to the right side.
3032         (.year-month-button-right .year-month-button): Use -webkit-margin-start so the margin is applide to the right side.
3033         (.today-clear-area .today-button): Use -webkit-margin-end so the margin is applide to the right side.
3034         * Resources/pagepopups/calendarPicker.js:
3035         (YearMonthController.prototype._attachLeftButtonsTo): Flip icon image when rtl.
3036         (YearMonthController.prototype._attachRightButtonsTo): Ditto.
3037
3038 2013-02-11  KwangYong Choi  <ky0.choi@samsung.com>
3039
3040         REGRESSION (r142549): Remove web intents code
3041         https://bugs.webkit.org/show_bug.cgi?id=109532
3042
3043         Reviewed by Nico Weber.
3044
3045         Remove remaning code related to web intents.
3046
3047         No new tests, no change on behavior.
3048
3049         * UseJSC.cmake:
3050         * bindings/js/JSIntentConstructor.cpp: Removed.
3051
3052 2013-02-11  Kenneth Russell  <kbr@google.com>
3053
3054         Add temporary typedef to ANGLEWebKitBridge to support incompatible API upgrade
3055         https://bugs.webkit.org/show_bug.cgi?id=109127
3056
3057         Reviewed by Dean Jackson.
3058
3059         No new tests. Built and tested WebKit and Chromium with this change.
3060
3061         * platform/graphics/ANGLEWebKitBridge.cpp:
3062         (WebCore):
3063             Define temporary typedef spanning int -> size_t change.
3064         (WebCore::getValidationResultValue):
3065         (WebCore::getSymbolInfo):
3066             Use temporary typedef.
3067
3068 2013-02-11  Kentaro Hara  <haraken@chromium.org>
3069
3070         [V8] ScheduledAction::m_context can be empty, so we shouldn't
3071         retrieve an Isolate by using m_context->GetIsolate()
3072         https://bugs.webkit.org/show_bug.cgi?id=109523
3073
3074         Reviewed by Adam Barth.
3075
3076         Chromium bug: https://code.google.com/p/chromium/issues/detail?id=175307#makechanges
3077
3078         Currently ScheduledAction is retrieving an Isolate by using m_context->GetIsolate().
3079         This can crash because ScheduledAction::m_context can be empty. Specifically,
3080         ScheduledAction::m_context is set to ScriptController::currentWorldContext(),
3081         which can return an empty handle when a frame does not exist. In addition,
3082         'if(context.IsEmpty())' in ScheduledAction.cpp implies that it can be empty.
3083
3084         Alternately, we should pass an Isolate explicitly when a ScheduledAction is instantiated.
3085
3086         No tests. The Chromium crash report doesn't provide enough information
3087         to reproduce the bug.
3088
3089         * bindings/v8/ScheduledAction.cpp:
3090         (WebCore::ScheduledAction::ScheduledAction):
3091         (WebCore):
3092         (WebCore::ScheduledAction::~ScheduledAction):
3093         * bindings/v8/ScheduledAction.h:
3094         (ScheduledAction):
3095         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3096         (WebCore::WindowSetTimeoutImpl):
3097         * bindings/v8/custom/V8WorkerContextCustom.cpp:
3098         (WebCore::SetTimeoutOrInterval):
3099
3100 2013-02-11  Adenilson Cavalcanti  <cavalcantii@gmail.com>
3101
3102         Build fix: r142549 broke EFL build
3103         https://bugs.webkit.org/show_bug.cgi?id=109527
3104
3105         Reviewed by Kentaro Hara.
3106
3107         No new tests, no change on behavior.
3108
3109         * CMakeLists.txt:
3110
3111 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
3112
3113         REGRESSION (r142520?): Space no longer scrolls the page
3114         https://bugs.webkit.org/show_bug.cgi?id=109526
3115
3116         Reviewed by Tim Horton.
3117
3118         ScrollingTree::updateTreeFromStateNode() used to bail early when it had
3119         no children (no fixed or sticky elements), but that left updateAfterChildren()
3120         uncalled. Fix by always calling updateAfterChildren(), which updates the scroll
3121         position.
3122
3123         * page/scrolling/ScrollingTree.cpp:
3124         (WebCore::ScrollingTree::updateTreeFromStateNode):
3125
3126 2013-02-11  Tim Horton  <timothy_horton@apple.com>
3127
3128         Remove extra early-return in FrameView::setScrollPosition
3129
3130         Rubber-stamped by Simon Fraser.
3131
3132         * page/FrameView.cpp:
3133         (WebCore::FrameView::setScrollPosition):
3134
3135 2013-02-11  Arko Saha  <arko@motorola.com>
3136
3137         [Microdata] Fix crash after r141034 in chromuim port
3138         https://bugs.webkit.org/show_bug.cgi?id=109514
3139
3140         Reviewed by Ryosuke Niwa.
3141
3142         Added V8SkipVTableValidation extended attribute to skip
3143         VTable validation check for DOMSettableTokenList interface.
3144
3145         This patch fixes below test failures:
3146         Tests: fast/dom/MicroData/domsettabletokenlist-attributes-add-token.html
3147                fast/dom/MicroData/domsettabletokenlist-attributes-out-of-range-index.html
3148                fast/dom/MicroData/element-with-empty-itemprop.html
3149                fast/dom/MicroData/itemprop-add-remove-tokens.html
3150                fast/dom/MicroData/itemprop-for-an-element-must-be-correct.html
3151                fast/dom/MicroData/itemprop-must-be-read-only.html
3152                fast/dom/MicroData/itemprop-reflected-by-itemProp-property.html
3153                fast/dom/MicroData/itemref-add-remove-tokens.html
3154                fast/dom/MicroData/itemref-attribute-reflected-by-itemRef-property.html
3155                fast/dom/MicroData/itemref-for-an-element-must-be-correct.html
3156                fast/dom/MicroData/itemref-must-be-read-only.html
3157                fast/dom/MicroData/itemtype-add-remove-tokens.html
3158                fast/dom/MicroData/itemtype-attribute-test.html
3159                fast/dom/MicroData/microdata-domtokenlist-attribute-add-remove-tokens.html
3160                fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html
3161                fast/dom/MicroData/propertynodelist-add-remove-itemprop-tokens.html
3162                fast/dom/MicroData/propertynodelist-add-remove-itemref-tokens.html
3163
3164         * html/DOMSettableTokenList.idl:
3165
3166 2013-02-11  Adam Barth  <abarth@webkit.org>
3167
3168         Load event fires too early with threaded HTML parser (take 2)
3169         https://bugs.webkit.org/show_bug.cgi?id=109485
3170
3171         Reviewed by Eric Seidel.
3172
3173         This patch restores the code that was removed in
3174         http://trac.webkit.org/changeset/142492 and adds code to
3175         DocumentLoader.cpp to avoid the regression.
3176
3177         * dom/Document.cpp:
3178         (WebCore::Document::hasActiveParser):
3179         (WebCore::Document::decrementActiveParserCount):
3180         * loader/DocumentLoader.cpp:
3181         (WebCore::DocumentLoader::isLoadingInAPISense):
3182
3183 2013-02-11  Eric Seidel  <eric@webkit.org>
3184
3185         Fold HTMLTokenizerState back into HTMLTokenizer now that MarkupTokenizerBase is RFG
3186         https://bugs.webkit.org/show_bug.cgi?id=109502
3187
3188         Reviewed by Tony Gentilcore.
3189
3190         Just a search replace of HTMLTokenizerState with HTMLTokenizer and moving the enum.
3191         This restores us to the peacefull world pre-NEW_XML.
3192
3193         * html/parser/BackgroundHTMLParser.cpp:
3194         (WebCore::BackgroundHTMLParser::forcePlaintextForTextDocument):
3195         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
3196         * html/parser/HTMLDocumentParser.cpp:
3197         (WebCore::tokenizerStateForContextElement):
3198         (WebCore::HTMLDocumentParser::forcePlaintextForTextDocument):
3199         (WebCore::HTMLDocumentParser::pumpTokenizer):
3200         * html/parser/HTMLTokenizer.cpp:
3201         (WebCore::isEndTagBufferingState):
3202         (WebCore):
3203         (WebCore::HTMLTokenizer::reset):
3204         (WebCore::HTMLTokenizer::flushEmitAndResumeIn):
3205         (WebCore::HTMLTokenizer::nextToken):
3206         (WebCore::HTMLTokenizer::updateStateFor):
3207         * html/parser/HTMLTokenizer.h:
3208         (HTMLTokenizer):
3209         (WebCore::HTMLTokenizer::create):
3210         (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
3211         (WebCore::HTMLTokenizer::emitEndOfFile):
3212         * html/parser/HTMLTreeBuilder.cpp:
3213         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3214         (WebCore::HTMLTreeBuilder::processEndTag):
3215         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
3216         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
3217         (WebCore::HTMLTreeBuilder::processScriptStartTag):
3218         * html/parser/TextViewSourceParser.cpp:
3219         (WebCore::TextViewSourceParser::TextViewSourceParser):
3220
3221 2013-02-11  Kentaro Hara  <haraken@chromium.org>
3222
3223         Build fix after r142528
3224         https://bugs.webkit.org/show_bug.cgi?id=109520
3225
3226         Reviewed by Eric Seidel.
3227
3228         r142528 changed GIFImageReader from a struct to a class.
3229         We also need to fix a forward declaration.
3230
3231         No tests.
3232
3233         * platform/image-decoders/gif/GIFImageDecoder.h:
3234
3235 2013-02-11  Nico Weber  <thakis@chromium.org>
3236
3237         Remove web intents code
3238         https://bugs.webkit.org/show_bug.cgi?id=109501
3239
3240         Reviewed by Eric Seidel.
3241
3242         See thread "Removing ENABLE(WEB_INTENTS) code" on webkit-dev.
3243
3244         * DerivedSources.make:
3245         * Modules/intents/DOMWindowIntents.cpp: Removed.
3246         * Modules/intents/DOMWindowIntents.h: Removed.
3247         * Modules/intents/DOMWindowIntents.idl: Removed.
3248         * Modules/intents/DeliveredIntent.cpp: Removed.
3249         * Modules/intents/DeliveredIntent.h: Removed.
3250         * Modules/intents/DeliveredIntent.idl: Removed.
3251         * Modules/intents/Intent.cpp: Removed.
3252         * Modules/intents/Intent.h: Removed.
3253         * Modules/intents/Intent.idl: Removed.
3254         * Modules/intents/IntentRequest.cpp: Removed.
3255         * Modules/intents/IntentRequest.h: Removed.
3256         * Modules/intents/IntentResultCallback.h: Removed.
3257         * Modules/intents/IntentResultCallback.idl: Removed.
3258         * Modules/intents/NavigatorIntents.cpp: Removed.
3259         * Modules/intents/NavigatorIntents.h: Removed.
3260         * Modules/intents/NavigatorIntents.idl: Removed.
3261         * WebCore.gyp/WebCore.gyp:
3262         * WebCore.gypi:
3263         * bindings/generic/RuntimeEnabledFeatures.cpp:
3264         (WebCore):
3265         * bindings/generic/RuntimeEnabledFeatures.h:
3266         (RuntimeEnabledFeatures):
3267         * bindings/v8/custom/V8IntentCustom.cpp: Removed.
3268         * html/HTMLElementsAllInOne.cpp:
3269         * html/HTMLIntentElement.cpp: Removed.
3270         * html/HTMLIntentElement.h: Removed.
3271         * html/HTMLIntentElement.idl: Removed.
3272         * loader/EmptyClients.cpp:
3273         * loader/EmptyClients.h:
3274         (EmptyFrameLoaderClient):
3275         * loader/FrameLoaderClient.h:
3276         (WebCore):
3277         * page/DOMWindow.idl:
3278
3279 2013-02-11  Eric Seidel  <eric@webkit.org>
3280
3281         Fix Mac build after http://trac.webkit.org/changeset/142535.
3282
3283         Unreviewed build fix.
3284
3285         * html/parser/HTMLTokenizer.h:
3286         (WebCore::HTMLTokenizer::emitAndReconsumeIn):
3287
3288 2013-02-11  David Farler  <dfarler@apple.com>
3289
3290         Make WebCore Derived Sources work with SDK identifiers too
3291         https://bugs.webkit.org/show_bug.cgi?id=109324
3292
3293         Reviewed by Sam Weinig.
3294
3295         * WebCore.xcodeproj/project.pbxproj: Pass SDKROOT to make for DerivedSources.make
3296
3297 2013-02-11  Zhenyao Mo  <zmo@google.com>
3298
3299         WEBGL_compressed_texture_s3tc extension can be enabled even when not supported
3300         https://bugs.webkit.org/show_bug.cgi?id=109508
3301
3302         Reviewed by Kenneth Russell.
3303
3304         * html/canvas/WebGLRenderingContext.cpp:
3305         (WebCore):
3306         (WebCore::WebGLRenderingContext::getExtension): Check whether the extension support is there before returning the extension pointer.
3307
3308 2013-02-11  Emil A Eklund  <eae@chromium.org>
3309
3310         Change RenderFrameSet::paint to use m-rows/m_cols directly.
3311         https://bugs.webkit.org/show_bug.cgi?id=108503
3312
3313         Reviewed by Eric Seidel.
3314
3315         Test: fast/frames/invalid-frameset.html
3316
3317         * rendering/RenderFrameSet.cpp:
3318         (WebCore::RenderFrameSet::paint):
3319
3320 2013-02-11  Yong Li  <yoli@rim.com>
3321
3322         XMLHttpRequestProgressEventThrottle::resume() always schedules timer even when unnecessary
3323         https://bugs.webkit.org/show_bug.cgi?id=105348
3324
3325         Reviewed by Alexey Proskuryakov.
3326
3327         Let resume() clear the defer flag and return if there is deferred events to dispatch.
3328
3329         No new tests as this should not affect existing cross-platform behavior. It should be
3330         OK as long as it doesn't break anything.
3331
3332         * xml/XMLHttpRequestProgressEventThrottle.cpp:
3333         (WebCore::XMLHttpRequestProgressEventThrottle::resume):
3334
3335 2013-02-11  Eric Seidel  <eric@webkit.org>
3336
3337         Fold MarkupTokenizerBase into HTMLTokenizer now that it is the only subclass
3338         https://bugs.webkit.org/show_bug.cgi?id=109499
3339
3340         Reviewed by Adam Barth.
3341
3342         For great justice.  And sanity.
3343         Epic amount of template code deleted.
3344
3345         * GNUmakefile.list.am:
3346         * Target.pri:
3347         * WebCore.gypi:
3348         * WebCore.vcproj/WebCore.vcproj:
3349         * WebCore.vcxproj/WebCore.vcxproj:
3350         * WebCore.vcxproj/WebCore.vcxproj.filters:
3351         * WebCore.xcodeproj/project.pbxproj:
3352         * html/parser/HTMLTokenizer.cpp:
3353         (WebCore::HTMLTokenizer::HTMLTokenizer):
3354         * html/parser/HTMLTokenizer.h:
3355         (HTMLTokenizer):
3356         (Checkpoint):
3357         (WebCore::HTMLTokenizer::state):
3358         (WebCore::HTMLTokenizer::setState):
3359         (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
3360         (WebCore::HTMLTokenizer::bufferCharacter):
3361         (WebCore::HTMLTokenizer::emitAndResumeIn):
3362         (WebCore::HTMLTokenizer::emitAndReconsumeIn):
3363         (WebCore::HTMLTokenizer::emitEndOfFile):
3364         (WebCore::HTMLTokenizer::haveBufferedCharacterToken):
3365         * xml/parser/MarkupTokenizerBase.h: Removed.
3366
3367 2013-02-11  Anton Vayvod  <avayvod@chromium.org>
3368
3369         [Text Autosizing] Collect narrow descendants and process them separately. Refactoring for
3370         a change to follow.
3371         https://bugs.webkit.org/show_bug.cgi?id=109054
3372
3373         Preparational change to combine narrow descendants of the same autosizing cluster into
3374         groups by the width difference between the descendant and the block containing all text of
3375         the parent autosizing cluster. The groups will be autosized with the same multiplier.
3376
3377         For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
3378         a large margin individually applied (via a CSS selector), causing them all to individually
3379         appear narrower than their enclosing blockContainingAllText. Rather than making each of
3380         these paragraphs into a separate cluster, we eventually want to be able to merge them back
3381         together into one (or a few) descendant clusters.
3382
3383         Reviewed by Julien Chaffraix.
3384
3385         No behavioral changes thus no new tests or test changes.
3386
3387         * rendering/TextAutosizer.cpp:
3388         (TextAutosizingClusterInfo): Vector of narrow descendants.
3389         (WebCore::TextAutosizer::processCluster): Process narrow descendants separately.
3390         (WebCore::TextAutosizer::processContainer):
3391
3392             Remember narrow descendants of the parent cluster for later processing.
3393
3394 2013-02-11  Enrica Casucci  <enrica@apple.com>
3395
3396         Add ENABLE_DELETION_UI to control the use of the deletion UI.
3397         https://bugs.webkit.org/show_bug.cgi?id=109463.
3398
3399         Reviewed by Ryosuke Niwa.
3400         
3401         This patch adds #if ENABLE(DELETION_UI) in every spot where
3402         DeleteButtonController is used. This class is now only instantiated
3403         if the feature is enabled. I've also done some cleanup in the
3404         DeleteButtonController class, removing unused methods and making
3405         private some methods only used internally to the class.
3406         Both DeleteButtonController and DeleteButton classes are now excluded
3407         from the compilation if the feature is not enabled.
3408
3409         No new tests, no change of functionality.
3410
3411         * dom/ContainerNode.cpp:
3412         (WebCore::ContainerNode::cloneChildNodes):
3413         * editing/CompositeEditCommand.cpp:
3414         (WebCore::EditCommandComposition::unapply):
3415         (WebCore::EditCommandComposition::reapply):
3416         (WebCore::CompositeEditCommand::apply):
3417         * editing/DeleteButton.cpp:
3418         * editing/DeleteButtonController.cpp:
3419         * editing/DeleteButtonController.h: Some cleanup.
3420         (WebCore::DeleteButtonController::enabled): Made private.
3421         * editing/EditCommand.cpp:
3422         (WebCore::EditCommand::EditCommand):
3423         * editing/Editor.cpp:
3424         (WebCore::Editor::notifyComponentsOnChangedSelection):
3425         (WebCore::Editor::Editor):
3426         (WebCore::Editor::rangeForPoint):
3427         (WebCore::Editor::deviceScaleFactorChanged):
3428         * editing/Editor.h:
3429         * editing/htmlediting.cpp: avoidIntersectionWithNode is
3430         used only if the feature is enabled.
3431         * editing/htmlediting.h:
3432         * editing/markup.cpp:
3433         (WebCore::createMarkup):
3434         (WebCore::createFragmentFromNodes):
3435         * rendering/RenderTable.cpp: Removed unnecessary include
3436         fo DeleteButtonController.h
3437
3438 2013-02-11  Rafael Weinstein  <rafaelw@chromium.org>
3439
3440         [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
3441         https://bugs.webkit.org/show_bug.cgi?id=109338
3442
3443         Reviewed by Adam Barth.
3444
3445         This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
3446         is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
3447
3448         Tests added to html5lib.
3449
3450         * html/parser/HTMLTreeBuilder.cpp:
3451         (WebCore):
3452         (WebCore::HTMLTreeBuilder::popAllTemplates):
3453         (WebCore::HTMLTreeBuilder::processEndTag):
3454         (WebCore::HTMLTreeBuilder::processEndOfFile):
34