Reduce calls to CGImageSourceCopyPropertiesAtIndex from frameSizeAtIndex
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-10-06  Pratik Solanki  <psolanki@apple.com>
2
3         Reduce calls to CGImageSourceCopyPropertiesAtIndex from frameSizeAtIndex
4         https://bugs.webkit.org/show_bug.cgi?id=98607
5
6         Reviewed by Dan Bernstein.
7
8         Refactor code so that we avoid a second call to CGImageSourceCopyPropertiesAtIndex under
9         ImageSource::frameSizeAtIndex().
10
11         No new tests because no functional change.
12
13         * platform/graphics/cg/ImageSourceCG.cpp:
14         (WebCore::orientationFromProperties):
15         (WebCore):
16         (WebCore::ImageSource::frameSizeAtIndex):
17         (WebCore::ImageSource::orientationAtIndex):
18
19 2012-10-06  Mark Rowe  <mrowe@apple.com>
20
21         Build fix.
22
23         Stop calling -[NSSliderCell setTitle:]. It's never done anything on OS X.
24
25         * rendering/RenderThemeMac.mm:
26         (WebCore::RenderThemeMac::sliderThumbHorizontal):
27         (WebCore::RenderThemeMac::sliderThumbVertical):
28
29 2012-10-06  Andreas Kling  <kling@webkit.org>
30
31         Clipboard::types() should return an ordered collection.
32         <http://webkit.org/b/98547>
33
34         Reviewed by Darin Adler.
35
36         Let Clipboard::types() return a ListHashSet<String> instead of a HashSet<String> to make sure
37         it retains the order in which type strings are added.
38
39         No test, this fixes an issue that was uncovered when lowering the default table size of WTF
40         hash tables, causing the HashSet<String> to rehash and reorder itself.
41
42         * bindings/js/JSClipboardCustom.cpp:
43         (WebCore::JSClipboard::types):
44         * bindings/v8/custom/V8ClipboardCustom.cpp:
45         (WebCore::V8Clipboard::typesAccessorGetter):
46         * dom/Clipboard.h:
47         (Clipboard):
48         * platform/blackberry/ClipboardBlackBerry.cpp:
49         (WebCore::ClipboardBlackBerry::types):
50         * platform/blackberry/ClipboardBlackBerry.h:
51         (ClipboardBlackBerry):
52         * platform/chromium/ChromiumDataObject.cpp:
53         (WebCore::ChromiumDataObject::types):
54         * platform/chromium/ChromiumDataObject.h:
55         (ChromiumDataObject):
56         * platform/chromium/ClipboardChromium.cpp:
57         (WebCore::ClipboardChromium::types):
58         * platform/chromium/ClipboardChromium.h:
59         (ClipboardChromium):
60         * platform/efl/ClipboardEfl.cpp:
61         (WebCore::ClipboardEfl::types):
62         * platform/efl/ClipboardEfl.h:
63         (ClipboardEfl):
64         * platform/gtk/ClipboardGtk.cpp:
65         (WebCore::ClipboardGtk::types):
66         * platform/gtk/ClipboardGtk.h:
67         (ClipboardGtk):
68         * platform/mac/ClipboardMac.h:
69         (ClipboardMac):
70         * platform/mac/ClipboardMac.mm:
71         (WebCore::addHTMLClipboardTypesForCocoaType):
72         (WebCore::ClipboardMac::types):
73         * platform/qt/ClipboardQt.cpp:
74         (WebCore::ClipboardQt::types):
75         * platform/qt/ClipboardQt.h:
76         (ClipboardQt):
77         * platform/win/ClipboardWin.cpp:
78         (WebCore::addMimeTypesForFormat):
79         (WebCore::ClipboardWin::types):
80         * platform/win/ClipboardWin.h:
81         (ClipboardWin):
82         * platform/wx/ClipboardWx.cpp:
83         (WebCore::ClipboardWx::types):
84         * platform/wx/ClipboardWx.h:
85         (ClipboardWx):
86
87 2012-10-06  Geoffrey Garen  <ggaren@apple.com>
88
89         If Node X is reachable from JavaScript, all Nodes in the same tree should be kept alive
90         https://bugs.webkit.org/show_bug.cgi?id=88834
91
92         Reviewed by Gavin Barraclough.
93
94         Follow-up patch to address some comments by Darin Adler.
95
96         * bindings/js/JSNodeCustom.h:
97         (WebCore::willCreatePossiblyOrphanedTreeByRemoval): Save some space by
98         collapsing comment lines. Use Node::hasChildNodes() for brevity.
99
100 2012-10-06  Benjamin Poulain  <benjamin@webkit.org>
101
102         Fix weird use of KURL's protocolIs
103         https://bugs.webkit.org/show_bug.cgi?id=98584
104
105         Reviewed by Adam Barth.
106
107         Converting a KURL to string is a bad idea.
108
109         Invalid URLs can return a string that pass the tests, while an
110         invalid URL will fail protocolIs().
111
112         * loader/cache/CachedResource.cpp:
113         (WebCore::CachedResource::removeClient):
114         * platform/graphics/MediaPlayer.cpp:
115         (WebCore::MediaPlayer::load):
116         * platform/network/DataURL.cpp:
117         (WebCore::handleDataURL):
118
119 2012-10-06  Dan Bernstein  <mitz@apple.com>
120
121         WebCore part of <rdar://problem/12446507> [mac] WebKit clients cannot change the behavior of text-rendering: auto
122         https://bugs.webkit.org/show_bug.cgi?id=98601
123
124         Reviewed by Darin Adler.
125
126         * WebCore.exp.in: Exported Font::setDefaultTypesettingFeatures().
127         * platform/graphics/Font.cpp:
128         (WebCore::Font::s_defaultTypesettingFeatures): Defined this static.
129         (WebCore::Font::setDefaultTypesettingFeatures): Added this setter.
130         (WebCore::Font::defaultTypesettingFeatures): Added this getter.
131         * platform/graphics/Font.h:
132         (WebCore::Font::typesettingFeatures): Changed to use the value of the new static member
133         s_defaultTypesettingFeatures, rather than 0, if text-redering is set to auto.
134
135 2012-10-04  Geoffrey Garen  <ggaren@apple.com>
136
137         If Node X is reachable from JavaScript, all Nodes in the same tree should be kept alive
138         https://bugs.webkit.org/show_bug.cgi?id=88834
139
140         Reviewed by Gavin Barraclough.
141
142         * bindings/js/JSNodeCustom.cpp:
143         (WebCore::isObservable): Clarified this comment, since it seems to have
144         misled some folks. 
145
146         * bindings/js/JSNodeCustom.h:
147         (WebCore::willCreatePossiblyOrphanedTreeByRemoval): New helper function
148         to ensure that a disconnected tree is visible to JavaScript.
149
150         * bindings/js/ScriptState.cpp:
151         (WebCore::mainWorldScriptState): Need to check for null because a document's
152         frame can be null.
153
154         * dom/ContainerNode.cpp:
155         (WebCore::dispatchChildRemovalEvents): When we remove a subtree from the
156         document, we sever the reference that JavaScript previously held by
157         referencing its root. So, we give JavaScript an opportunity to establish
158         a reference to the new root.
159
160 2012-10-06  Byungwoo Lee  <bw80.lee@samsung.com>
161
162         Fix build warning : -Wunused-parameter.
163         https://bugs.webkit.org/show_bug.cgi?id=98583
164
165         Reviewed by Kentaro Hara.
166
167         Use ASSERT_UNUSED() macro to remove build warning.
168
169         * plugins/PluginStream.cpp:
170         (WebCore::PluginStream::delayDeliveryTimerFired):
171         (WebCore::PluginStream::didReceiveResponse):
172         (WebCore::PluginStream::didReceiveData):
173         (WebCore::PluginStream::didFail):
174         (WebCore::PluginStream::didFinishLoading):
175         * plugins/PluginView.cpp:
176         (WebCore::PluginView::requestTimerFired):
177         (WebCore::PluginView::invalidateTimerFired):
178
179 2012-10-05  Adam Barth  <abarth@webkit.org>
180
181         [V8] toV8(Node*, ...) does more work than needed (6% faster on dom-traverse)
182         https://bugs.webkit.org/show_bug.cgi?id=98567
183
184         Reviewed by Kentaro Hara.
185
186         This patch introduces toV8Fast for Node*. This function works a
187         differently from the existing toV8 function in two ways:
188
189         1) It uses the inline wrapper cache in Node to determine if we're
190            executing in the main world. This is faster both in the case when
191            isolated worlds exist because we don't need to retrieve any state
192            for the current context.
193
194         2) It doesn't attempt to inline the hash table lookup used to find the
195            wrapper in the isolated world. There isn't a big need to inline this
196            code since performance in the isolated world case is dominated by
197            the hash table lookup.
198
199         Because of these two changes, toV8Fast is small enough to inline into
200         each attribute getter profitably. Over time, I would like to convert
201         all the performance critical uses of toV8(Node*) to toV8Fast. At that
202         point, we can delete toV8 and rename toV8Slow to toV8.
203
204         * bindings/scripts/CodeGeneratorV8.pm:
205         (GenerateHeader):
206         (GenerateNormalAttrGetter):
207
208 2012-10-05  Huang Dongsung  <luxtella@company100.net>
209
210         [mac] REGRESSION (r122215): Animated GIF outside the viewport doesn't play when scrolled into view.
211         https://bugs.webkit.org/show_bug.cgi?id=94874
212
213         Reviewed by Simon Fraser.
214
215         Rollback previous patch because this patch caused two problems.
216         1. GIF animation is occasionally paused when tiled scrolling is enabled.
217         2. This change regressed Apple's Membuster benchmark by ~20% (80MB.)
218
219         * loader/cache/CachedImage.cpp:
220         (WebCore::CachedImage::shouldPauseAnimation):
221         * loader/cache/CachedImage.h:
222         (CachedImage):
223         * loader/cache/CachedResource.h:
224         * loader/cache/MemoryCache.cpp:
225         (WebCore::MemoryCache::pruneLiveResourcesToSize):
226         * rendering/RenderObject.cpp:
227         (WebCore::RenderObject::willRenderImage):
228
229 2012-10-05  Xianzhu Wang  <wangxianzhu@chromium.org>
230
231         OpenTypeVerticalData issue with DroidSansFallback.ttf on chromium-android and chromium-linux
232         https://bugs.webkit.org/show_bug.cgi?id=97824
233
234         Reviewed by Tony Chang.
235
236         The issue occurred when a font that contains vert GSUB table but doesn't have
237         a DFLT script and the first script doesn't have vert feature. Added logic to
238         handle the case.
239
240         Test: fast/writing-mode/vertical-subst-font-vert-no-dflt.html
241
242         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
243         (FeatureList):
244         (WebCore::OpenType::FeatureList::findFeature): Added to find the matching feature in FeatureList.
245         (WebCore::OpenType::GSUBTable::feature): Added logic to handle the case of no DFLT script and no vert feature under the first script.
246
247 2012-10-05  Tony Chang  <tony@chromium.org>
248
249         Form controls should always be horizontal
250         https://bugs.webkit.org/show_bug.cgi?id=98563
251
252         Reviewed by Ojan Vafai.
253
254         Fix a regression where we didn't force form controls to be horizontal.
255
256         Tests: fast/dom/HTMLMeterElement/meter-writing-mode.html
257                fast/dom/HTMLProgressElement/progress-writing-mode.html
258                fast/table/colspanMinWidth-vertical.html
259
260         * css/html.css:
261         (input, textarea, keygen, select, button, isindex, meter, progress):
262
263 2012-10-05  Sheriff Bot  <webkit.review.bot@gmail.com>
264
265         Unreviewed, rolling out r130556 and r130564.
266         http://trac.webkit.org/changeset/130556
267         http://trac.webkit.org/changeset/130564
268         https://bugs.webkit.org/show_bug.cgi?id=98572
269
270         The patch wasn't reviewed by a reviewer and it is breaking
271         Chromium Windows (Requested by jchaffraix on #webkit).
272
273         * WebCore.exp.in:
274         * WebCore.xcodeproj/project.pbxproj:
275         * css/mediaControls.css:
276         (video::-webkit-media-text-track-container):
277         (video::-webkit-media-text-track-past-nodes):
278         (video::-webkit-media-text-track-future-nodes):
279         (video::-webkit-media-text-track-display):
280         * html/HTMLMediaElement.cpp:
281         (WebCore::HTMLMediaElement::HTMLMediaElement):
282         (WebCore::HTMLMediaElement::attach):
283         (WebCore::HTMLMediaElement::userIsInterestedInThisLanguage):
284         (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind):
285         (WebCore::HTMLMediaElement::setClosedCaptionsVisible):
286         (WebCore::HTMLMediaElement::updateClosedCaptionsControls):
287         * html/HTMLMediaElement.h:
288         (HTMLMediaElement):
289         * html/shadow/MediaControlElements.cpp:
290         (WebCore):
291         (WebCore::MediaControlTextTrackContainerElement::updateSizes):
292         * html/shadow/MediaControlElements.h:
293         (MediaControlTextTrackContainerElement):
294         * html/shadow/MediaControlRootElement.cpp:
295         (WebCore::MediaControlRootElement::updateTextTrackDisplay):
296         * html/shadow/MediaControlRootElement.h:
297         (MediaControlRootElement):
298         * html/shadow/MediaControls.h:
299         (MediaControls):
300         * html/track/TextTrack.cpp:
301         (WebCore::TextTrack::TextTrack):
302         (WebCore::TextTrack::isValidKindKeyword):
303         (WebCore::TextTrack::setKind):
304         (WebCore::TextTrack::setMode):
305         (WebCore::TextTrack::mode):
306         * html/track/TextTrack.h:
307         (WebCore::TextTrack::create):
308         (WebCore::TextTrack::kind):
309         (TextTrack):
310         (WebCore::TextTrack::label):
311         (WebCore::TextTrack::setLabel):
312         (WebCore::TextTrack::language):
313         (WebCore::TextTrack::setLanguage):
314         * html/track/TextTrackCue.cpp:
315         (WebCore::TextTrackCueBox::TextTrackCueBox):
316         (WebCore::TextTrackCueBox::shadowPseudoId):
317         (WebCore):
318         (WebCore::TextTrackCue::updateDisplayTree):
319         * html/track/TextTrackCue.h:
320         (TextTrackCueBox):
321         (TextTrackCue):
322         * platform/mac/WebCoreSystemInterface.h:
323         * platform/mac/WebCoreSystemInterface.mm:
324         * rendering/CaptionPreferencesChangedListener.h: Removed.
325         * rendering/RenderTheme.h:
326         (WebCore):
327         (RenderTheme):
328         * rendering/RenderThemeMac.h:
329         (RenderThemeMac):
330         * rendering/RenderThemeMac.mm:
331         (WebCore):
332         (WebCore::RenderThemeMac::RenderThemeMac):
333         (WebCore::RenderThemeMac::~RenderThemeMac):
334
335 2012-10-05  Tim Horton  <timothy_horton@apple.com>
336
337         [cg] GraphicsContextCG should ask CG whether the shadow offset workaround is required
338         https://bugs.webkit.org/show_bug.cgi?id=98565
339         <rdar://problem/12436468>
340
341         Reviewed by Simon Fraser.
342
343         On Mountain Lion and above, CG can tell us whether we need to work around incorrect
344         shadow offsets. Prior to Mountain Lion, we should assume we need to apply the workaround.
345
346         No new tests, as this requires an obscure configuration to test.
347
348         * WebCore.exp.in:
349         * platform/graphics/cg/GraphicsContextCG.cpp:
350         (WebCore::applyShadowOffsetWorkaroundIfNeeded):
351         (WebCore::GraphicsContext::setPlatformShadow):
352         * platform/mac/WebCoreSystemInterface.h: Add wkCGContextDrawsWithCorrectShadowOffsets.
353         * platform/mac/WebCoreSystemInterface.mm: Add wkCGContextDrawsWithCorrectShadowOffsets.
354
355 2012-10-05  Anders Carlsson  <andersca@apple.com>
356
357         Try to fix the build.
358
359         * rendering/RenderThemeMac.mm:
360         (WebCore::RenderThemeMac::captionsWindowColor):
361
362 2012-10-05  Eric Seidel  <eric@webkit.org>
363
364         Remove needless virtual calls and inline RenderStyle::logical* to make table layout faster
365         https://bugs.webkit.org/show_bug.cgi?id=98550
366
367         Reviewed by Andreas Kling.
368
369         This shaved another 5% (100ms) off of the runtime of resizecol.html microbenchmark:
370         http://www.robohornet.org/tests/resizecol.html
371
372         * rendering/AutoTableLayout.cpp:
373         (WebCore::AutoTableLayout::recalcColumn):
374         * rendering/style/RenderStyle.cpp:
375         * rendering/style/RenderStyle.h:
376
377 2012-10-04  Eric Carlson  <eric.carlson@apple.com>
378
379         Allow ports to override text track rendering style
380         https://bugs.webkit.org/show_bug.cgi?id=97800
381         <rdar://problem/12044964>
382
383         Reviewed by Silvia Pfeiffer.
384
385         * WebCore.exp.in: Export new WebkitSystemInterface functions.
386         * WebCore.xcodeproj/project.pbxproj: Add CaptionPreferencesChangedListener.h.
387
388         * css/mediaControls.css: Rearrange the caption CSS so it is possible to style the cue window,
389             background, and text independently.
390
391         * html/HTMLMediaElement.cpp:
392         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_disableCaptions with theme->userPrefersCaptions().
393         (WebCore::HTMLMediaElement::attach): Register for caption preferences change callbacks.
394         (WebCore::HTMLMediaElement::detach): Unregister for caption preferences change callbacks.
395         (WebCore::HTMLMediaElement::userPrefersCaptions): Return theme->userPrefersCaptions().
396         (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Consider userPrefersCaptions().
397         (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Move the code that marks all tracks as
398             un-configured to markCaptionAndSubtitleTracksAsUnconfigured so it can be reused.
399         (WebCore::HTMLMediaElement::captionPreferencesChanged): New, force a reevaluation of all text tracks.
400         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): New, code moved from 
401             setClosedCaptionsVisible
402         * html/HTMLMediaElement.h: Inherit from CaptionPreferencesChangedListener.
403
404         * html/shadow/MediaControlElements.cpp:
405         (WebCore::MediaControlTextTrackContainerElement::userCaptionPreferencesChanged): New, if theme
406             has a captions style sheet override, inject it into the current page group, otherwise
407             remove injected sheet.
408         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Get rid of unnecessary member
409             variable. Get caption font scale from theme instead of hard coding.
410         * html/shadow/MediaControlElements.h:
411
412         * html/shadow/MediaControlRootElement.cpp:
413         (WebCore::MediaControlRootElement::userCaptionPreferencesChanged): New.
414         (WebCore::MediaControlRootElement::updateTextTrackDisplay):
415         * html/shadow/MediaControlRootElement.h: Add userCaptionPreferencesChanged, minor cleanup.
416
417         * html/shadow/MediaControls.h:
418         (WebCore::MediaControls::userCaptionPreferencesChanged): New.
419
420         * html/track/TextTrackCue.cpp:
421         (WebCore::TextTrackCueBox::TextTrackCueBox): Set the shadow pseudo id.
422         (WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId): New, class method to return the 
423             shadow pseudo id so it can be used elsewhere.
424         (WebCore::TextTrackCueBox::shadowPseudoId): Call textTrackCueBoxShadowPseudoId.
425         (WebCore::TextTrackCue::pastNodesShadowPseudoId): New, class method to return the 
426             shadow pseudo id so it can be used elsewhere.
427         (WebCore::TextTrackCue::futureNodesShadowPseudoId): Ditto.
428         (WebCore::TextTrackCue::updateDisplayTree):
429         * html/track/TextTrackCue.h:
430
431         * platform/mac/WebCoreSystemInterface.h: Updated.
432         * platform/mac/WebCoreSystemInterface.mm: Ditto.
433
434         * rendering/CaptionPreferencesChangedListener.h: Added.
435
436         * rendering/RenderTheme.h:
437         (WebCore::RenderTheme::userPrefersCaptions): New, default do-nothing implementation.
438         (WebCore::RenderTheme::userHasCaptionPreferences): Ditto.
439         (WebCore::RenderTheme::captionFontSizeScale): Ditto.
440         (WebCore::RenderTheme::captionsStyleSheetOverride): Ditto.
441         (WebCore::RenderTheme::registerForCaptionPreferencesChangedCallbacks): Ditto.
442         (WebCore::RenderTheme::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
443
444         * rendering/RenderThemeMac.h:
445         * rendering/RenderThemeMac.mm:
446         (WebCore::userCaptionPreferencesChangedNotificationCallback): New, receives preference changed notifications.
447         (WebCore::RenderThemeMac::RenderThemeMac): Initialize m_listeningForCaptionPreferenceNotifications.
448         (WebCore::RenderThemeMac::~RenderThemeMac): Unregister for notifications if necessary.
449         (WebCore::RenderThemeMac::userHasCaptionPreferences): New, passthrough to WKSI function.
450         (WebCore::RenderThemeMac::userPrefersCaptions): Ditto.
451         (WebCore::RenderThemeMac::captionsWindowColor): Return Color with user's caption window color preference.
452         (WebCore::RenderThemeMac::captionsBackgroundColor): Return Color with user's caption 
453             background color preference.
454         (WebCore::RenderThemeMac::captionsTextColor): Return Color with user's caption text color preference.
455         (WebCore::RenderThemeMac::captionsEdgeColorForTextColor): Return Color for text edge effect.
456         (WebCore::RenderThemeMac::cssPropertyWithTextEdgeColor): Return String with CSS to set a text-shadow
457             or webkit-text-stroke property.
458         (WebCore::RenderThemeMac::cssColorProperty): Return a String with css to set a property 
459             with a color value.
460         (WebCore::RenderThemeMac::captionsTextEdgeStyle): Return a String with css to style caption 
461             text with the user's preferred text edge stye.
462         (WebCore::RenderThemeMac::captionsDefaultFont): Return a String with css to style caption
463             text with the user's preferred font.
464         (WebCore::RenderThemeMac::captionsStyleSheetOverride): Return a String with css to style captions
465             with the user's preferred style.
466         (WebCore::RenderThemeMac::captionFontSizeScale): Return the user's preferred caption font scale.
467         (WebCore::RenderThemeMac::captionPreferencesChanged): Notify listeners of caption preference change.
468         (WebCore::RenderThemeMac::registerForCaptionPreferencesChangedCallbacks): Add a caption preferences 
469             changes listener.
470         (WebCore::RenderThemeMac::unregisterForCaptionPreferencesChangedCallbacks): Remove a caption preferences
471             changes listener.
472
473 2012-10-05  Takashi Sakamoto  <tasak@google.com>
474
475         Inline continuations create :after generated content on style recalcs
476         https://bugs.webkit.org/show_bug.cgi?id=93170
477
478         Reviewed by Abhishek Arya.
479
480         The bug is caused by RenderInline::styleDidChange's setContinuation(0).
481         RenderObjectChildList uses continuation to know whether the given
482         renderer should have AFTER render object or not.
483         However, setContinuation(0) makes RenderObjectChildList to
484         misunderstand that all continuations are last continuation.
485         To avoid the misunderstanding, added a new flag to class
486         RenderObejctChildList to enable/disable updating :after content (and
487         also :before content).
488
489         Tests: fast/css-generated-content/after-with-inline-continuation.html
490                fast/css-generated-content/dynamic-apply-after-for-inline.html
491
492         * rendering/RenderInline.cpp:
493         (WebCore::RenderInline::styleDidChange):
494         Disable upating :after content for continuations which are not
495         the last one during setStyle just after setContinuation(0).
496         The setStyle invokes RenderInline::styleDidChange and also invokes
497         updateBeforeAfterContent via the styleDidChange. This means,
498         the last continuation's updateBeforeAfterContent is also invoked
499         after setContinuation(0). We have to update :after for the last
500         continuation.
501         * rendering/RenderObjectChildList.cpp:
502         (WebCore):
503         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
504         If s_updateBeforeAfterContent is false, quickly exit
505         updateBeforeAfterContent.
506         * rendering/RenderObjectChildList.h:
507         (RenderObjectChildList):
508         Added a new flag s_enableUpdateBeforeAfterContent to enable/disable
509         updating :before or :after content.
510
511 2012-10-05  Simon Fraser  <simon.fraser@apple.com>
512
513         Don't assume that TileCache layers are opaque
514         https://bugs.webkit.org/show_bug.cgi?id=98555
515
516         Reviewed by Dean Jackson.
517
518         TileCache previously set all its tile CALayers as opaque.
519         However, we will need non-opaque tile caches when we use this
520         tile cache for tiled layers, so add a member function to
521         control tile opacity.
522         
523         RenderLayerBacking already calls m_graphicsLayer->setContentsOpaque()
524         using the FrameView's notion of opaqueness, so this change will
525         cause the main tile cache to be non-opaque if external forces have
526         set the FrameView to be non-opaque.
527         
528         Also tweak the layer border widths on tiled layers.
529
530         * platform/graphics/ca/mac/TileCache.h:
531         (TileCache):
532         (WebCore::TileCache::tilesAreOpaque):
533         * platform/graphics/ca/mac/TileCache.mm:
534         (WebCore::TileCache::TileCache):
535         (WebCore::TileCache::setTilesOpaque):
536         (WebCore::TileCache::createTileLayer):
537         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
538         (-[WebTileCacheLayer setOpaque:]):
539         (-[WebTileCacheLayer isOpaque]):
540         (-[WebTileCacheLayer setBorderWidth:]):
541
542 2012-10-05  Tony Chang  <tony@chromium.org>
543
544         Fix margin box ascent computation in flexbox
545         https://bugs.webkit.org/show_bug.cgi?id=98540
546
547         Reviewed by Ojan Vafai.
548
549         The margin box ascent doesn't depend on the margin below the box.
550
551         Tests: css3/flexbox/flex-align.html: Fixed a test case and removed a FIXME.
552                css3/flexbox/flex-align-vertical-writing-mode.html: Similar test case.
553
554         * rendering/RenderFlexibleBox.cpp:
555         (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
556
557 2012-10-05  Ojan Vafai  <ojan@chromium.org>
558
559         Deprecated flexboxes subtract scrollbar width/height twice
560         https://bugs.webkit.org/show_bug.cgi?id=98552
561
562         Reviewed by Tony Chang.
563
564         This is a regression from http://trac.webkit.org/changeset/119507.
565         The problem is that contentHeight subtracts the scrollbar and
566         RenderDeprecatedFlexbox subtracts the scrollbar.
567
568         -Make it so that we only access override sizes if one has been set.
569         I think this makes the calling code more clear.
570         -If we don't have one set, grab the height/width - borderAndPadding.
571         -Add a FIXME to change this all back to being borderbox sizes.
572         There's something trick with making table padding/border work right for that
573         though (noted in the original patch).
574
575         Test: fast/flexbox/flexing-overflow-scroll-item.html
576
577         * rendering/RenderBox.cpp:
578         (WebCore::RenderBox::overrideLogicalContentWidth):
579         (WebCore::RenderBox::overrideLogicalContentHeight):
580         (WebCore::RenderBox::availableLogicalHeightUsing):
581         * rendering/RenderBox.h:
582         (RenderBox):
583         * rendering/RenderDeprecatedFlexibleBox.cpp:
584         (WebCore::contentWidthForChild):
585         (WebCore):
586         (WebCore::contentHeightForChild):
587         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
588         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
589         (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
590
591 2012-10-05  Eric Seidel  <eric@webkit.org>
592
593         Make tables which don't use col/row span much faster to layout
594         https://bugs.webkit.org/show_bug.cgi?id=98221
595
596         Reviewed by Julien Chaffraix.
597
598         My sense is that most tables on webpages do not use colspan/rowspan
599         so I stole another bit from RenderTableCell::m_column to avoid
600         having to re-parse the colSpan/rowSpan attributes for every cell
601         when doing table layout.
602         This made these symbols disappear from biggrid.html/redraw.html (dglazkov's spreadsheets benchmarks)
603         as well as moved our robohornet/resizecol.html number from an average of 3221ms to 2608ms (~20%!).
604
605         I removed m_hasHTMLTableCellElement (from http://trac.webkit.org/changeset/97691)
606         since it was attempting to do the same sort of optimization.
607
608         * rendering/RenderTableCell.cpp:
609         (WebCore::RenderTableCell::RenderTableCell):
610         (WebCore::RenderTableCell::parseColSpanFromDOM):
611         (WebCore::RenderTableCell::parseRowSpanFromDOM):
612         (WebCore::RenderTableCell::layout):
613         * rendering/RenderTableCell.h:
614         (WebCore::RenderTableCell::colSpan):
615         (WebCore::RenderTableCell::rowSpan):
616         (RenderTableCell):
617
618 2012-10-05  Oli Lan  <olilan@chromium.org>
619
620         Allow EventHandler to handle longpress gestures, including longpress selection on Android.
621         https://bugs.webkit.org/show_bug.cgi?id=98173
622         
623         Reviewed by Ryosuke Niwa.
624
625         Adds handling for GestureLongPress to EventHandler::handleGestureEvent, with a new
626         handleGestureLongPress method. On Android, this method selects the closest word
627         if the gesture event was over non-link text.
628
629         This is tested via a new chromium test WebViewTest.LongPressSelection.  
630
631         * page/EventHandler.cpp:
632         (WebCore::EventHandler::selectClosestWordFromHitTestResult):
633         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
634         (WebCore):
635         (WebCore::EventHandler::handleGestureEvent):
636         (WebCore::EventHandler::handleGestureLongPress):
637         * page/EventHandler.h:
638         (EventHandler):
639
640 2012-10-05  Tab Atkins  <jackalmage@gmail.com>
641
642         <marquee> element forces itself to be at least 1em high, regardless of 'height' declaration
643         https://bugs.webkit.org/show_bug.cgi?id=18098
644
645         Reviewed by Eric Seidel.
646
647         This restriction originally existed to match IE, but IE changed some time ago to be normal instead.
648         We're the last browser, afaict, to still enforce this de-facto restriction.
649         This patch makes <marquee> instead act like a normal element.
650
651         Tests: fast/css/MarqueeLayoutTest.html (rewritten from the older, bad version)
652
653         * rendering/RenderMarquee.cpp:
654         (WebCore::RenderMarquee::updateMarqueeStyle):
655
656 2012-10-05  Joe Mason  <jmason@rim.com>
657
658         [BlackBerry] Fix regression in proxy auth
659         https://bugs.webkit.org/show_bug.cgi?id=98533
660
661         Reviewed by Yong Li.
662
663         The proxy auth dialog gets the proxy address from
664         BlackBerry::Platform::Settings::proxyAddress, which returns
665         "host:port", but we try to parse it with a KURL, which expects
666         "scheme://host:port".  Since this is an http proxy, add http:// to the
667         url to get it to parse.
668
669         PR 220567.
670
671         * platform/network/blackberry/NetworkJob.cpp:
672         (WebCore::NetworkJob::sendRequestWithCredentials):
673
674 2012-10-05  Jer Noble  <jer.noble@apple.com>
675
676         No autorelease pool in place, causing buildup of autoreleased objects.
677         https://bugs.webkit.org/show_bug.cgi?id=98522
678         <rdar://problem/11647950>
679
680         Reviewed by Alexey Proskuryakov.
681
682         Wrap each timer callback in an AutodrainPool, ensuring an autorelease
683         pool is present during calls from C/C++ into ObjC.
684
685         * platform/cf/RunLoopTimerCF.cpp:
686         (WebCore::timerFired):
687
688 2012-10-05  Ryosuke Niwa  <rniwa@webkit.org>
689
690         Deleting across multiple paragraphs can change the style of surrounding text
691         https://bugs.webkit.org/show_bug.cgi?id=97266
692
693         Reviewed by Levi Weintraub.
694
695         Preserve editing styles from CSS rules in wrappingStyleForSerialization as well as inline styles
696         even when we're not annotating. We don't want to preserve all styles because it's against
697         the user expectation to keep borders, etc... when merging paragraphs. We also don't want to copy
698         styles from a mail blockquote because that's not a style the user has applied. See the comment
699         in EditingStyle::wrappingStyleForSerialization.
700
701         Test: editing/deleting/merge-paragraph-with-style-from-rule.html
702
703         * editing/EditingStyle.cpp:
704         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
705         (WebCore::EditingStyle::wrappingStyleForSerialization):
706
707 2012-10-05  Dan Bernstein  <mitz@apple.com>
708
709         Reversing a GlyphBuffer needlessly queries its size multiple times
710         https://bugs.webkit.org/show_bug.cgi?id=98530
711
712         Reviewed by Simon Fraser.
713
714         No new tests because there is no change in behavior.
715
716         * WebCore.xcodeproj/project.pbxproj:
717         * platform/graphics/FontFastPath.cpp:
718         (WebCore::Font::getGlyphsAndAdvancesForSimpleText): Replaced the condition
719         (i < glyphBuffer.size() / 2) with the equivalent test (i < end).
720         * platform/graphics/mac/FontComplexTextMac.cpp:
721         (WebCore::Font::getGlyphsAndAdvancesForComplexText): Ditto.
722
723 2012-10-05  José Dapena Paz  <jdapena@igalia.com>
724
725         [GTK] Add support for creating EGL contexts
726         https://bugs.webkit.org/show_bug.cgi?id=77921
727
728         Reviewed by Martin Robinson.
729
730         This patch adds support for EGL, using OpenGL and OpenGL ES 2. Both
731         options are set up on compile time, with the configure options
732         --enable-egl and --enable-gles2.
733
734         The implementation only adds support for EGL on top of X11, to
735         isolate the changes to the minimum. More changes should come
736         later to enable EGL for other targets (as Wayland).
737
738         No new tests required, as existing WebGL and AC tests should cover
739         the cases.
740
741         * GNUmakefile.am:
742         * GNUmakefile.list.am:
743         * platform/graphics/GraphicsContext3D.h:
744         (GraphicsContext3D):
745         * platform/graphics/OpenGLESShims.h:
746         * platform/graphics/cairo/GLContext.cpp:
747         (WebCore):
748         (WebCore::GLContext::sharedX11Display):
749         (WebCore::GLContext::cleanupSharedX11Display):
750         (WebCore::activeContextList):
751         (WebCore::GLContext::addActiveContext):
752         (WebCore::GLContext::removeActiveContext):
753         (WebCore::GLContext::cleanupActiveContextsAtExit):
754         (WebCore::GLContext::createContextForWindow):
755         (WebCore::GLContext::createOffscreenContext):
756         * platform/graphics/cairo/GLContext.h:
757         (GLContext):
758         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
759         (WebCore::GraphicsContext3D::create):
760         (WebCore::GraphicsContext3D::GraphicsContext3D):
761         (WebCore::GraphicsContext3D::~GraphicsContext3D):
762         (WebCore::GraphicsContext3D::isGLES2Compliant):
763         * platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
764         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
765         * platform/graphics/clutter/GraphicsContext3DClutter.cpp:
766         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
767         * platform/graphics/egl/GLContextEGL.cpp: Added.
768         (WebCore):
769         (WebCore::sharedEGLDisplay):
770         (WebCore::getEGLConfig):
771         (WebCore::GLContextEGL::createWindowContext):
772         (WebCore::GLContextEGL::createPbufferContext):
773         (WebCore::GLContextEGL::createPixmapContext):
774         (WebCore::GLContextEGL::createContext):
775         (WebCore::GLContextEGL::GLContextEGL):
776         (WebCore::GLContextEGL::~GLContextEGL):
777         (WebCore::GLContextEGL::canRenderToDefaultFramebuffer):
778         (WebCore::GLContextEGL::defaultFrameBufferSize):
779         (WebCore::GLContextEGL::makeContextCurrent):
780         (WebCore::GLContextEGL::swapBuffers):
781         (WebCore::GLContextEGL::waitNative):
782         (WebCore::GLContextEGL::platformContext):
783         * platform/graphics/egl/GLContextEGL.h: Added.
784         (WebCore):
785         (GLContextEGL):
786         * platform/graphics/glx/GLContextGLX.cpp:
787         (WebCore::GLContextGLX::createWindowContext):
788         (WebCore::GLContextGLX::createPbufferContext):
789         (WebCore::GLContextGLX::createPixmapContext):
790         (WebCore::GLContextGLX::createContext):
791         (WebCore::GLContextGLX::~GLContextGLX):
792         (WebCore::GLContextGLX::defaultFrameBufferSize):
793         (WebCore::GLContextGLX::makeContextCurrent):
794         (WebCore::GLContextGLX::swapBuffers):
795         (WebCore):
796         (WebCore::GLContextGLX::waitNative):
797         * platform/graphics/glx/GLContextGLX.h:
798         (GLContextGLX):
799         * platform/graphics/mac/GraphicsContext3DMac.mm:
800         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
801         (WebCore::GraphicsContext3D::releaseShaderCompiler):
802         (WebCore):
803         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
804         (WebCore::GraphicsContext3D::readPixels):
805         (WebCore::GraphicsContext3D::reshapeFBOs):
806         (WebCore::GraphicsContext3D::renderbufferStorage):
807         * platform/graphics/qt/GraphicsContext3DQt.cpp:
808         * platform/graphics/texmap/TextureMapper.h:
809         * platform/gtk/RedirectedXCompositeWindow.cpp:
810         (WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
811         (WebCore::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
812         (WebCore::RedirectedXCompositeWindow::resize):
813         * platform/gtk/RedirectedXCompositeWindow.h:
814
815 2012-10-04  Jon Lee  <jonlee@apple.com>
816
817         Add a setting to enable plugin snapshotting
818         https://bugs.webkit.org/show_bug.cgi?id=98319
819         <rdar://problem/12426480>
820
821         Reviewed by Brady Eidson.
822
823         Add a new bit for this preference.
824
825         * page/Settings.cpp:
826         (WebCore::Settings::Settings): Preference is false by default.
827         * page/Settings.h: Added m_plugInSnapshottingEnabled bit.
828         (WebCore::Settings::setPlugInSnapshottingEnabled): Set the bit.
829         (WebCore::Settings::plugInSnapshottingEnabled): Return the bit.
830
831 2012-10-05  Vsevolod Vlasov  <vsevik@chromium.org>
832
833         Unreviewed inspector front-end closure compilaiton fixes.
834
835         * inspector/InjectedScriptCanvasModuleSource.js:
836         * inspector/InjectedScriptExterns.js:
837         (InjectedScriptHost.prototype.getInternalProperties):
838         * inspector/front-end/DockController.js:
839         * inspector/front-end/externs.js:
840         (InspectorFrontendHostAPI.prototype.requestSetDockSide):
841
842 2012-10-05  Tab Atkins  <jackalmage@gmail.com>
843
844         Replace uses of prefixed properties with unprefixed versions in the UA stylesheets
845         https://bugs.webkit.org/show_bug.cgi?id=98453
846
847         Reviewed by Ojan Vafai.
848
849         Switched 'border-radius' and 'box-shadow' to their unprefixed version in the UA stylesheets.
850
851         No new tests, because the unprefixed properties have the same behavior as the prefixed.
852
853         * css/fullscreenQuickTime.css:
854         (video:-webkit-full-screen::-webkit-media-controls-panel):
855         * css/html.css:
856         (keygen, select):
857         (select[size][multiple]):
858         (select[size="1"]):
859         (::-webkit-validation-bubble-message):
860         * css/themeBlackBerry.css:
861         (input, textarea):
862         * css/themeChromiumAndroid.css:
863         (select[size][multiple]):
864         * css/themeQtNoListboxes.css:
865         (select[size][multiple]):
866         * css/themeWin.css:
867         (select[size="1"]):
868         * css/view-source.css:
869         (.webkit-html-message-bubble):
870
871 2012-10-05  Kevin Ellis  <kevers@chromium.org>
872
873         [chromium] Only inflate the height of rows in a popup menu when a touch device is detected.
874         https://bugs.webkit.org/show_bug.cgi?id=98515
875
876         Reviewed by Adam Barth.
877
878         Enforces a minimum row height for popup menus when a touch device is
879         detected.  In a previous patch (r127597), the sizing of popup was 
880         consolidated for touch and non-touch.  Based on user feedback, reverting
881         to the old behavior for non-touch and only adding padding for touch
882         devices seems like a much safer strategy.  This patch is not a direct
883         revert of r127567 since the padding previously used for touch is a bit
884         excessive.
885
886         Covered by existing tests.
887
888         * platform/chromium/PopupListBox.cpp:
889         (WebCore::PopupListBox::getRowHeight):
890         * platform/chromium/PopupMenuChromium.cpp:
891         (WebCore):
892         * platform/chromium/PopupMenuChromium.h:
893         (WebCore::PopupMenuChromium::optionRowHeightForTouch):
894         (WebCore::PopupMenuChromium::setOptionRowHeightForTouch):
895         (PopupMenuChromium):
896
897 2012-10-05  Alexander Pavlov  <apavlov@chromium.org>
898
899         Web Inspector: [Styles] Unable to edit properties in broken stylesheets
900         https://bugs.webkit.org/show_bug.cgi?id=98246
901
902         Reviewed by Vsevolod Vlasov.
903
904         Pop source data for invalid rules off the stack whenever we have consecutive CSSParser::markRuleHeaderStart() invocations.
905
906         Test: inspector/styles/parse-stylesheet-errors.html
907
908         * css/CSSParser.cpp:
909         (WebCore::CSSParser::popRuleData):
910         (WebCore::CSSParser::markRuleHeaderStart):
911         (WebCore::CSSParser::markRuleBodyStart):
912         * css/CSSParser.h:
913         (CSSParser):
914
915 2012-10-05  Gabor Rapcsanyi  <rgabor@webkit.org>
916
917         Add ARM-NEON support to VectorMath in WebAudio
918         https://bugs.webkit.org/show_bug.cgi?id=98131
919
920         Reviewed by Zoltan Herczeg.
921
922         Speed up vector operations in WebAudio with NEON intrinsics.
923
924         * platform/audio/VectorMath.cpp:
925         (WebCore::VectorMath::vsma):
926         (WebCore::VectorMath::vsmul):
927         (WebCore::VectorMath::vadd):
928         (WebCore::VectorMath::vmul):
929         (WebCore::VectorMath::zvmul):
930         (WebCore::VectorMath::vsvesq):
931         (WebCore::VectorMath::vmaxmgv):
932
933 2012-10-05  Simon Hausmann  <simon.hausmann@digia.com>
934
935         Unreviewed, rolling out r130495.
936         http://trac.webkit.org/changeset/130495
937         https://bugs.webkit.org/show_bug.cgi?id=98268
938
939         Made WK2 tests crash.
940
941         * Target.pri:
942         * platform/qt/QStyleFacade.cpp: Removed.
943         * platform/qt/QStyleFacade.h: Removed.
944
945 2012-10-05  Simon Hausmann  <simon.hausmann@digia.com>
946
947         [Qt] Make RenderThemeQStyle/ScrollbarThemeQStyle compile without QStyle/QtWidgets
948         https://bugs.webkit.org/show_bug.cgi?id=98268
949
950         Reviewed by Tor Arne Vestbø.
951
952         Extracted QStyle/QWidget related code into a QWebStyle class that implements the QStyleFacade interface.
953
954         QStyleFacade is a pure interface that lives in WebCore/platform/qt
955         (next to RenderThemeQStyle and ScrollbarThemeQStyle) and provides a
956         minimal interface of what we need to draw with QStyle as well as basic
957         hit testing and metric retrieval. It also provides a
958         QStyleFacadeOption class that aggregates common meta-data for
959         rendering primitives, such as direction, rectangle, state (sunken,
960         enabled, etc.) or palette. It also provides some more slider/scrollbar
961         specific fields in a slider sub-structure.
962
963         RenderThemeQStyle/ScrollbarThemeQStyle used to instantiate specific QStyleOption sub-classes and populate
964         them with state information from render objects, before calling straight to QStyle. Most of the common code
965         was encapsulated in StylePainterQStyle.
966
967         The new RenderThemeQStyle/ScrolllbarThemeQStyle uses common code in
968         StylePainterQStyle to populate state into QStyleFacadeOption before
969         calling into QStyleFacade.
970
971         The style facade is then implemented by QStyleFacadeImp, which extracts
972         meta-data from QStyleFacadeOption arguments, populates style
973         primitive specific QStyleOption objects and then calls on QStyle.
974
975         RenderThemeQStyle/ScrollbarThemeQStyle can only use interface methods
976         from QStyleFacade. QStyleFacadeImp on the other hand will live in the
977         separate QtWebKitWidgets library in the future and therefore cannot use
978         any WebCore types.
979
980         * Target.pri:
981         * platform/qt/QStyleFacade.cpp: Added.
982         (WebCore):
983         (WebCore::QStyleFacade::styleForPage):
984         * platform/qt/QStyleFacade.h: Added.
985         (WebCore):
986         (QStyleFacade):
987         (WebCore::QStyleFacade::~QStyleFacade):
988         (WebCore::QStyleFacadeOption::QStyleFacadeOption):
989         (QStyleFacadeOption):
990         * platform/qt/RenderThemeQStyle.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp.
991         (WebCore):
992         (WebCore::RenderThemeQStyle::getStylePainter):
993         (WebCore::StylePainterQStyle::StylePainterQStyle):
994         (WebCore::StylePainterQStyle::init):
995         (WebCore::RenderThemeQStyle::create):
996         (WebCore::RenderThemeQStyle::setStyleFactoryFunction):
997         (WebCore::RenderThemeQStyle::styleFactory):
998         (WebCore::RenderThemeQStyle::RenderThemeQStyle):
999         (WebCore::RenderThemeQStyle::~RenderThemeQStyle):
1000         (WebCore::RenderThemeQStyle::setPaletteFromPageClientIfExists):
1001         (WebCore::RenderThemeQStyle::inflateButtonRect):
1002         (WebCore::RenderThemeQStyle::computeSizeBasedOnStyle):
1003         (WebCore::RenderThemeQStyle::adjustButtonStyle):
1004         (WebCore::RenderThemeQStyle::setButtonPadding):
1005         (WebCore::RenderThemeQStyle::paintButton):
1006         (WebCore::RenderThemeQStyle::paintTextField):
1007         (WebCore::RenderThemeQStyle::adjustTextAreaStyle):
1008         (WebCore::RenderThemeQStyle::paintTextArea):
1009         (WebCore::RenderThemeQStyle::setPopupPadding):
1010         (WebCore::RenderThemeQStyle::colorPalette):
1011         (WebCore::RenderThemeQStyle::paintMenuList):
1012         (WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
1013         (WebCore::RenderThemeQStyle::paintMenuListButton):
1014         (WebCore::RenderThemeQStyle::animationDurationForProgressBar):
1015         (WebCore::RenderThemeQStyle::paintProgressBar):
1016         (WebCore::RenderThemeQStyle::paintSliderTrack):
1017         (WebCore::RenderThemeQStyle::adjustSliderTrackStyle):
1018         (WebCore::RenderThemeQStyle::paintSliderThumb):
1019         (WebCore::RenderThemeQStyle::adjustSliderThumbStyle):
1020         (WebCore::RenderThemeQStyle::paintSearchField):
1021         (WebCore::RenderThemeQStyle::adjustSearchFieldDecorationStyle):
1022         (WebCore::RenderThemeQStyle::paintSearchFieldDecoration):
1023         (WebCore::RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle):
1024         (WebCore::RenderThemeQStyle::paintSearchFieldResultsDecoration):
1025         (WebCore::RenderThemeQStyle::paintInnerSpinButton):
1026         (WebCore::RenderThemeQStyle::initializeCommonQStyleOptions):
1027         (WebCore::RenderThemeQStyle::adjustSliderThumbSize):
1028         * platform/qt/RenderThemeQStyle.h: Renamed from Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h.
1029         (WebCore):
1030         (RenderThemeQStyle):
1031         (WebCore::RenderThemeQStyle::qStyle):
1032         (StylePainterQStyle):
1033         (WebCore::StylePainterQStyle::isValid):
1034         (WebCore::StylePainterQStyle::paintButton):
1035         (WebCore::StylePainterQStyle::paintTextField):
1036         (WebCore::StylePainterQStyle::paintComboBox):
1037         (WebCore::StylePainterQStyle::paintComboBoxArrow):
1038         (WebCore::StylePainterQStyle::paintSliderTrack):
1039         (WebCore::StylePainterQStyle::paintSliderThumb):
1040         (WebCore::StylePainterQStyle::paintInnerSpinButton):
1041         (WebCore::StylePainterQStyle::paintProgressBar):
1042         (WebCore::StylePainterQStyle::paintScrollCorner):
1043         (WebCore::StylePainterQStyle::paintScrollBar):
1044         * platform/qt/ScrollbarThemeQStyle.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.cpp.
1045         (WebCore):
1046         (WebCore::ScrollbarThemeQStyle::ScrollbarThemeQStyle):
1047         (WebCore::ScrollbarThemeQStyle::~ScrollbarThemeQStyle):
1048         (WebCore::scPart):
1049         (WebCore::scrollbarPart):
1050         (WebCore::initSliderStyleOption):
1051         (WebCore::ScrollbarThemeQStyle::paint):
1052         (WebCore::ScrollbarThemeQStyle::hitTest):
1053         (WebCore::ScrollbarThemeQStyle::shouldCenterOnThumb):
1054         (WebCore::ScrollbarThemeQStyle::invalidatePart):
1055         (WebCore::ScrollbarThemeQStyle::scrollbarThickness):
1056         (WebCore::ScrollbarThemeQStyle::thumbPosition):
1057         (WebCore::ScrollbarThemeQStyle::thumbLength):
1058         (WebCore::ScrollbarThemeQStyle::trackPosition):
1059         (WebCore::ScrollbarThemeQStyle::trackLength):
1060         (WebCore::ScrollbarThemeQStyle::paintScrollCorner):
1061         * platform/qt/ScrollbarThemeQStyle.h: Renamed from Source/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.h.
1062         (WebCore):
1063         (ScrollbarThemeQStyle):
1064         (WebCore::ScrollbarThemeQStyle::qStyle):
1065
1066 2012-10-05  Andrei Bucur  <abucur@adobe.com>
1067
1068         Incomplete repaint of boxes with inset box-shadow and padding when resized
1069         https://bugs.webkit.org/show_bug.cgi?id=59863
1070
1071         Reviewed by Simon Fraser.
1072
1073         The patch extends the repaint rectangle to include the inset shadow extent for renderers that resize and need to be repainted. The rectangle computations are also better fragmented and easier to read.
1074
1075         New Test: fast/repaint/box-shadow-inset-repaint.html
1076
1077         * rendering/RenderObject.cpp:
1078         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
1079         * rendering/style/RenderStyle.cpp:
1080         (WebCore::RenderStyle::getShadowInsetExtent):
1081         (WebCore):
1082         * rendering/style/RenderStyle.h:
1083
1084 2012-10-04  Kent Tamura  <tkent@chromium.org>
1085
1086         Fix sub-field width to the maximum width of a placeholder and the maximum value
1087         https://bugs.webkit.org/show_bug.cgi?id=98481
1088
1089         Reviewed by Hajime Morita.
1090
1091         We can't assume a placeholder text is shorter than the width of
1092         digits. The placeholder string for the year field of
1093         input[type=week] is "----", but input[type=date] will have a
1094         localized string for it.
1095
1096         We should set the 'width' CSS property to the maximum of the
1097         placeholder width and the maximum value width in order to prevent
1098         the field width from growing/narrowing.
1099
1100         Before this patch, we secured four digits space for a year field,
1101         and allowed the field to grow its width when a larger year is
1102         set. After this patch, we don't allow it to grow because the
1103         'width' property is set to the maximum width.
1104
1105         Update week-multiple-fields-appearance-basic.html, and the
1106         following tests are affected.
1107         - fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-classes.html
1108         - fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements.html
1109         - fast/forms/week-multiple-fields/week-multiple-fields-appearance-style.html
1110
1111         * html/shadow/DateTimeNumericFieldElement.cpp:
1112         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement):
1113         Enable customStyleForRenderer.
1114         (WebCore::DateTimeNumericFieldElement::customStyleForRenderer):
1115         Added. The code is similar to DateTimeSymbolicFieldElement::customStyleForRenderer().
1116         (WebCore::DateTimeNumericFieldElement::formatValue):
1117         Made a function with the code in value(). This is used in
1118         customStyleForRenderer() and value().
1119         (WebCore::DateTimeNumericFieldElement::value): Use formatValue().
1120         * html/shadow/DateTimeNumericFieldElement.h:
1121         (DateTimeNumericFieldElement): Declare new functions.
1122
1123 2012-10-05  Kent Tamura  <tkent@chromium.org>
1124
1125         Improve spelling and performance of Localizer.cpp
1126         https://bugs.webkit.org/show_bug.cgi?id=98485
1127
1128         Reviewed by Kentaro Hara.
1129
1130         Some improvements pointed in webkit.org/b/98229#c5.
1131
1132         No new tests because of no behavior change.
1133
1134         * platform/text/Localizer.h:
1135         (Localizer):
1136          - Rename dateTimeFormatWithSecond to dateTimeFormatWithSeconds
1137          - Rename dateTimeFormatWithoutSecond to dateTimeFormatWithoutSeconds
1138          - Add data members: m_dateTimeFormatWithSeconds and m_dateTimeFormatWithoutSeconds.
1139         * platform/text/Localizer.cpp:
1140         (WebCore::Localizer::timeFormat): Check isNull instead of isEmpty
1141         (WebCore::Localizer::shortTimeFormat): Ditto.
1142         (WebCore::Localizer::dateTimeFormatWithSeconds):
1143         - Renamed.
1144         - Cache the concatenation result to a data member.
1145         (WebCore::Localizer::dateTimeFormatWithoutSeconds): Ditto.
1146
1147         * html/DateTimeInputType.cpp:
1148         (WebCore::DateTimeInputType::setupLayoutParameters): Follow the renaming.
1149         * html/DateTimeLocalInputType.cpp:
1150         (WebCore::DateTimeLocalInputType::setupLayoutParameters): Ditto.
1151
1152 2012-10-04  Kenichi Ishibashi  <bashi@chromium.org>
1153
1154         [WebSocket] ExtensionParser should have its own file
1155         https://bugs.webkit.org/show_bug.cgi?id=98475
1156
1157         Reviewed by Yuta Kitamura.
1158
1159         Factor out ExtensionParser from WebSocketExtensionDispatcher and rename it as WebSocketExtensionParser.
1160         WebSocketExtensionParser has its own file.
1161
1162         No changes in behavior. Added a test case for parsing Sec-WebSocket-Extensions field as a chromium unit test.
1163
1164         * CMakeLists.txt: Added WebSocketExtensionParser.
1165         * GNUmakefile.list.am: Ditto.
1166         * Modules/websockets/WebSocketExtensionDispatcher.cpp:
1167         (WebCore::WebSocketExtensionDispatcher::processHeaderValue):
1168         Use WebSocketExtensionParser::parseExtension() to parser extension header value.
1169         * Modules/websockets/WebSocketExtensionParser.cpp: Added.
1170         (WebCore):
1171         (WebCore::WebSocketExtensionParser::finished): Moved from ExtensionParser.
1172         (WebCore::WebSocketExtensionParser::parsedSuccessfully): Ditto.
1173         (WebCore::isSeparator): Ditto.
1174         (WebCore::WebSocketExtensionParser::skipSpaces): Ditto.
1175         (WebCore::WebSocketExtensionParser::consumeToken): Ditto.
1176         (WebCore::WebSocketExtensionParser::consumeQuotedString): Ditto.
1177         (WebCore::WebSocketExtensionParser::consumeQuotedStringOrToken): Ditto.
1178         (WebCore::WebSocketExtensionParser::consumeCharacter): Ditto.
1179         (WebCore::WebSocketExtensionParser::parseExtension): Moved from WebSocketExtensionDispatcher.
1180         * Modules/websockets/WebSocketExtensionParser.h: Added.
1181         (WebCore):
1182         (WebSocketExtensionParser):
1183         (WebCore::WebSocketExtensionParser::WebSocketExtensionParser):
1184         (WebCore::WebSocketExtensionParser::currentToken):
1185         * Target.pri: Added WebSocketExtensionParser.
1186         * WebCore.gypi: Ditto.
1187         * WebCore.vcproj/WebCore.vcproj: Ditto.
1188         * WebCore.xcodeproj/project.pbxproj: Ditto.
1189
1190 2012-10-04  Kunihiko Sakamoto  <ksakamoto@chromium.org>
1191
1192         <input> size attribute should throw INDEX_SIZE_ERR when set to 0
1193         https://bugs.webkit.org/show_bug.cgi?id=61675
1194
1195         Reviewed by Kent Tamura.
1196
1197         According to the spec, the size IDL attribute of input elements is limited
1198         to only non-negative numbers greater than zero. It should throw INDEX_SIZE_ERR
1199         exception when set to 0. New behavior matches both Firefox and IE.
1200         Spec: http://www.w3.org/TR/html5/common-input-element-attributes.html#the-size-attribute
1201
1202         Test: fast/dom/HTMLInputElement/input-size-attribute.html
1203
1204         * html/HTMLInputElement.cpp:
1205         (WebCore::HTMLInputElement::setSize):
1206         * html/HTMLInputElement.h:
1207         (HTMLInputElement):
1208         * html/HTMLInputElement.idl:
1209
1210 2012-10-04  Kent Tamura  <tkent@chromium.org>
1211
1212         Fix font for date/time input types.
1213         https://bugs.webkit.org/show_bug.cgi?id=98478
1214
1215         Reviewed by Kentaro Hara.
1216
1217         input[type=date] should use monospace font if
1218         ENABLE_INPUT_MULTIPLE_FIELDS_UI && ENABLE_INPUT_TYPE_DATE.
1219
1220         For other date/time types, they should use monospace font only
1221         if their types are enabled. input[type="foo"] matches input
1222         element with type="foo" even if the foo type is not supported.
1223
1224         The input[type=date] change is covered by
1225         fast/forms/date/calendar-picker-appearance.html,
1226         platform/chromium/fast/forms/date/date-suggestion-picker-appearance*.html
1227
1228         * css/html.css:
1229         (input[type="date"]):
1230         (input[type="datetime"]):
1231         (input[type="datetime-local"]):
1232         (input[type="month"]):
1233         (input[type="time"]):
1234
1235 2012-10-04  Hajime Morrita  <morrita@google.com>
1236
1237         [Refactoring] Some classes in StyleResolver.cpp/h could have its own file.
1238         https://bugs.webkit.org/show_bug.cgi?id=98469
1239
1240         Reviewed by Dimitri Glazkov.
1241
1242         This change extracts RuleData, RuleSet, RuleFeature and Featurs class
1243         to its own file: RuleSet.h/cpp and RuleFeature.h/cpp
1244
1245         RuleFeature class is moved fro StyleResolver inner class to plain WebCore class.
1246         Feaures class is renamed to RuleFeatureSet to avoid possible name conflict.
1247
1248         No new tests. Just splitting file and doing simple rename.
1249
1250         * CMakeLists.txt:
1251         * GNUmakefile.list.am:
1252         * Target.pri:
1253         * WebCore.gypi:
1254         * WebCore.xcodeproj/project.pbxproj:
1255         * css/CSSAllInOne.cpp:
1256         * css/RuleFeature.cpp: Added.
1257         (WebCore):
1258         (WebCore::RuleFeatureSet::add):
1259         (WebCore::RuleFeatureSet::clear):
1260         (WebCore::RuleFeatureSet::reportMemoryUsage):
1261         * css/RuleFeature.h: Added.
1262         (WebCore):
1263         (RuleFeature):
1264         (WebCore::RuleFeature::RuleFeature):
1265         (RuleFeatureSet):
1266         (WebCore::RuleFeatureSet::RuleFeatureSet):
1267         * css/RuleSet.cpp: Added.
1268         (WebCore):
1269         (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
1270         (WebCore::selectorListContainsUncommonAttributeSelector):
1271         (WebCore::isCommonAttributeSelectorAttribute):
1272         (WebCore::containsUncommonAttributeSelector):
1273         (WebCore::RuleData::RuleData):
1274         (WebCore::RuleData::reportMemoryUsage):
1275         (WebCore::reportAtomRuleMap):
1276         (WebCore::RuleSet::reportMemoryUsage):
1277         (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
1278         (WebCore::collectFeaturesFromSelector):
1279         (WebCore::collectFeaturesFromRuleData):
1280         (WebCore::RuleSet::addToRuleSet):
1281         (WebCore::RuleSet::addRule):
1282         (WebCore::RuleSet::addPageRule):
1283         (WebCore::RuleSet::addRegionRule):
1284         (WebCore::RuleSet::addRulesFromSheet):
1285         (WebCore::RuleSet::addStyleRule):
1286         (WebCore::shrinkMapVectorsToFit):
1287         (WebCore::RuleSet::shrinkToFit):
1288         * css/RuleSet.h: Added.
1289         (WebCore):
1290         (RuleData):
1291         (WebCore::RuleData::position):
1292         (WebCore::RuleData::rule):
1293         (WebCore::RuleData::selector):
1294         (WebCore::RuleData::selectorIndex):
1295         (WebCore::RuleData::hasFastCheckableSelector):
1296         (WebCore::RuleData::hasMultipartSelector):
1297         (WebCore::RuleData::hasRightmostSelectorMatchingHTMLBasedOnRuleHash):
1298         (WebCore::RuleData::containsUncommonAttributeSelector):
1299         (WebCore::RuleData::specificity):
1300         (WebCore::RuleData::linkMatchType):
1301         (WebCore::RuleData::hasDocumentSecurityOrigin):
1302         (WebCore::RuleData::isInRegionRule):
1303         (WebCore::RuleData::descendantSelectorIdentifierHashes):
1304         (SameSizeAsRuleData):
1305         (RuleSet):
1306         (WebCore::RuleSet::create):
1307         (WebCore::RuleSet::disableAutoShrinkToFit):
1308         (WebCore::RuleSet::features):
1309         (WebCore::RuleSet::idRules):
1310         (WebCore::RuleSet::classRules):
1311         (WebCore::RuleSet::tagRules):
1312         (WebCore::RuleSet::shadowPseudoElementRules):
1313         (WebCore::RuleSet::linkPseudoClassRules):
1314         (WebCore::RuleSet::focusPseudoClassRules):
1315         (WebCore::RuleSet::universalRules):
1316         (WebCore::RuleSet::pageRules):
1317         (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
1318         (RuleSetSelectorPair):
1319         (WebCore::RuleSet::RuleSet):
1320         * css/StyleResolver.cpp:
1321         (WebCore):
1322         (WebCore::makeRuleSet):
1323         (WebCore::StyleResolver::collectMatchingRulesForList):
1324         * css/StyleResolver.h:
1325         (StyleResolver):
1326
1327 2012-10-04  Adam Barth  <abarth@webkit.org>
1328
1329         FeatureObserver should distinguish between legacy HTML and text notifications
1330         https://bugs.webkit.org/show_bug.cgi?id=98441
1331
1332         Reviewed by Tony Chang.
1333
1334         We might be able to drop support for legacy HTML notifications before
1335         we can drop support for legacy text notifications. We should measure
1336         and find out.
1337
1338         * Modules/notifications/NotificationCenter.idl:
1339         * page/FeatureObserver.h:
1340
1341 2012-10-04  Pravin D  <pravind.2k4@gmail.com>
1342
1343         Removing the unused member variable m_wasMalformed from HTMLFormElement class and its related code frgment.
1344         https://bugs.webkit.org/show_bug.cgi?id=98444
1345
1346         Reviewed by Eric Seidel.
1347
1348         The member variable m_wasMalformed of HTMLFormElement class was used to determine if the <form> tag was malformed or not.
1349         This information was used elsewhere to decide if bottom margins have to be included for such a <form>.
1350         However currently this member variable is not being set by any code following code refactoring in HTML parser class.
1351
1352         Code cleanup patch. No new tests required.
1353
1354         * html/HTMLFormElement.cpp:
1355         (WebCore::HTMLFormElement::HTMLFormElement):
1356           Removed m_wasMalformed initialization.
1357
1358         * html/HTMLFormElement.h:
1359         (HTMLFormElement):
1360          Removed m_wasMalformed variable.
1361          Removed m_wasMalformed variable's setter and getter functions.
1362
1363         * rendering/RenderBlock.cpp:
1364         (WebCore::RenderBlock::layoutBlock):
1365          Removed code fragment using/dependent on m_wasMalformed.
1366
1367 2012-10-04  Rik Cabanier  <cabanier@adobe.com>
1368
1369         Turn Compositing on by default in WebKit build
1370         https://bugs.webkit.org/show_bug.cgi?id=98315
1371
1372         Reviewed by Simon Fraser.
1373
1374         enable -webkit-blend-mode on trunk.
1375
1376         No new tests. Existing blending test were updated.
1377
1378         * Configurations/FeatureDefines.xcconfig:
1379         * css/CSSPropertyNames.in:
1380         * css/CSSValueKeywords.in:
1381
1382 2012-10-04  Hayato Ito  <hayato@chromium.org>
1383
1384         [Refactoring] Introduce a traversal strategy in SelectorChecker
1385         https://bugs.webkit.org/show_bug.cgi?id=97298
1386
1387         Reviewed by Antti Koivisto.
1388
1389         We extract DOM traversal code from SelectorChecker so that we can use another traversal strategy.
1390         Another traversal strategy will be introduced in Bug 96990.
1391
1392         Since this code path is very hot, we were very careful not to regress performance.
1393         We will use template specialization to change the traversal implementation.
1394
1395         We confirmed that this patch does not regress SelectorCheckerPerformance. I have checked the performance of
1396         the added test in my Linux Box using run-perf-tests.
1397
1398         The performance of the added test before using this patch was:
1399
1400           RESULT CSS: PseudoClassSelectors= 3399.68308031 runs/s
1401           median= 3404.48685564 runs/s, stdev= 37.3480114449 runs/s, min= 3272.64871114 runs/s, max= 3438.72385184 runs/s
1402
1403         When we used this patch, the performance was:
1404
1405           RESULT CSS: PseudoClassSelectors= 3367.74473886 runs/s
1406           median= 3367.12072755 runs/s, stdev= 14.1464547639 runs/s, min= 3348.55881171 runs/s, max= 3395.98212857 runs/s
1407
1408         Test: PerformanceTests/CSS/PseudoClass-Selectors.html
1409
1410         * css/SelectorChecker.cpp:
1411         (WebCore):
1412         (WebCore::SelectorChecker::checkSelector): Make this a template method to accept another Context type.
1413         Another Context type will be introduced in coming patch.
1414         (WebCore::SelectorChecker::checkOneSelector):
1415         (WebCore::SelectorChecker::DOMTraversalStrategy::isFirstChild):
1416         (WebCore::SelectorChecker::DOMTraversalStrategy::isLastChild):
1417         (WebCore::SelectorChecker::DOMTraversalStrategy::isFirstOfType):
1418         (WebCore::SelectorChecker::DOMTraversalStrategy::isLastOfType):
1419         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsBefore):
1420         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsOfTypeBefore):
1421         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsAfter):
1422         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsOfTypeAfter):
1423         * css/SelectorChecker.h:
1424         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
1425         (SelectorCheckingContext):
1426         (SelectorChecker):
1427         (DOMTraversalStrategy): Extracted the DOM traversal code from SelectorChecker. Another traversal code
1428         will be introduced the coming patch.
1429
1430 2012-10-04  Eric Seidel  <eric@webkit.org>
1431
1432         SVGAttributeHashTranslator does not need to copy QualifiedName in the common case
1433         https://bugs.webkit.org/show_bug.cgi?id=98473
1434
1435         Reviewed by Adam Barth.
1436
1437         I tested this using instruments on a test case which modified SVG attributes in a loop.
1438         I believe pdr has some perf-tests in this area, but they weren't needed here.  A simple sample showed this as a huge win,
1439         since we're no longer creating a QualifiedName (and thus adding it to the hash) on each QualifiedName-based lookup in SVG.
1440
1441         * svg/SVGElement.h:
1442         (WebCore::SVGAttributeHashTranslator::hash):
1443         (WebCore::SVGAttributeHashTranslator::equal):
1444
1445 2012-10-04  Julien Chaffraix  <jchaffraix@webkit.org>
1446
1447         Split the intrinsic padding update code out of RenderTableSection::layoutRows
1448         https://bugs.webkit.org/show_bug.cgi?id=98454
1449
1450         Reviewed by Eric Seidel.
1451
1452         RenderTableSection::layoutRows is very long and it's difficult to see what's
1453         going on. This change moves the intrinsic padding update code into RenderTableCell
1454         for clarity. While at it, cleaned up a bit the code (renaming variables, functions).
1455
1456         Change covered by existing table tests.
1457
1458         * rendering/RenderTableCell.cpp:
1459         (WebCore::RenderTableCell::computeIntrinsicPadding):
1460         Added this new function that does the update. Removed the 'default' case, replaced by
1461         the explicit label BASELINE_MIDDLE.
1462
1463         * rendering/RenderTableCell.h:
1464         (WebCore::RenderTableCell::setIntrinsicPaddingBefore):
1465         (WebCore::RenderTableCell::setIntrinsicPaddingAfter):
1466         (WebCore::RenderTableCell::setIntrinsicPadding):
1467         Moved those setters to the private section as we want other classes
1468         to use computeIntrinsicPadding.
1469
1470         * rendering/RenderTableSection.cpp:
1471         (WebCore::RenderTableSection::layoutRows):
1472         Replaced the code with a call to RenderTableCell::computeIntrinsicPadding.
1473         Also moved 2 variables in the loop per our coding style.
1474
1475         * rendering/RenderTableSection.h:
1476         (WebCore::RenderTableSection::rowBaseline):
1477         Renamed to match our coding style.
1478
1479 2012-10-04  Nate Chapin  <japhet@chromium.org>
1480
1481         Crash in EventHandler::mouseMoved().
1482         https://bugs.webkit.org/show_bug.cgi?id=98460
1483
1484         Reviewed by Abhishek Arya.
1485
1486         No new tests, this fixes fast/events/mouse-moved-remove-frame-crash.html.
1487
1488         * page/EventHandler.cpp:
1489         (WebCore::EventHandler::mouseMoved):
1490
1491 2012-10-04  Adam Barth  <abarth@webkit.org>
1492
1493         [V8] NotificationCenter leaks because it uses buggy custom bindings
1494         https://bugs.webkit.org/show_bug.cgi?id=98445
1495
1496         Reviewed by Tony Chang.
1497
1498         There's no reason to use custom bindings here. All they do is cause leaks..
1499
1500         * Modules/notifications/NotificationCenter.idl:
1501         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
1502
1503 2012-10-04  Tab Atkins  <jackalmage@gmail.com>
1504
1505         Selector specificity categories "overflow" into higher categories
1506         https://bugs.webkit.org/show_bug.cgi?id=98295
1507
1508         Reviewed by Eric Seidel.
1509
1510         This patch adds per-component overflow guards for CSS selector specificity.
1511         Previously, we didn't guard against overflow. 
1512         Since we stored each component as a byte mapped into a single unsigned int for the whole specificity,
1513         256 of a particular simple selector was equivalent to 1 of the next-higher-group selector.
1514         This violated the Selectors specification,
1515         which requires the components to be compared lexicographically.
1516
1517         Tests: /fast/selectors/specificity-overflow.html
1518
1519         * css/CSSSelector.cpp:
1520         (WebCore::CSSSelector::specificity):
1521
1522 2012-10-04  Enrica Casucci  <enrica@apple.com>
1523
1524         Font::glyphDataAndPageForCharacter doesn't account for text orientation when using systemFallback on a cold cache.
1525         https://bugs.webkit.org/show_bug.cgi?id=98452.
1526
1527         Reviewed by Dan Bernstein.
1528
1529         The text orientation was considered only when there is a cache hit.
1530         This change moves the logic to handle text orientation to a separate
1531         inline function that is called also when the glyph is added to the cache.
1532
1533         Test: fast/text/vertical-rl-rtl-linebreak.html
1534
1535         * platform/graphics/FontFastPath.cpp:
1536         (WebCore::applyTextOrientationForCharacter): Added.
1537         (WebCore::Font::glyphDataAndPageForCharacter): Modified to use the new function in
1538         both cases of cold and warm cache.
1539
1540 2012-10-04  Adam Klein  <adamk@chromium.org>
1541
1542         MutationRecord attributeName should be null for non attribute changes
1543         https://bugs.webkit.org/show_bug.cgi?id=98438
1544
1545         Reviewed by Ojan Vafai.
1546
1547         Test: fast/mutation/mutation-record-nullity.html
1548
1549         * dom/MutationRecord.idl:
1550
1551 2012-10-04  Simon Fraser  <simon.fraser@apple.com>
1552
1553         Final part of "sync" to "flush" renaming
1554         https://bugs.webkit.org/show_bug.cgi?id=98430
1555
1556         Reviewed by Tim Horton.
1557
1558         Change method names on GraphicsLayer and GraphicsLayerClient that
1559         refer to "sync" to use the term "flush" instead, to be consistent
1560         with the rest of the code.
1561
1562         * platform/graphics/GraphicsLayer.h:
1563         (WebCore::GraphicsLayer::flushCompositingState):
1564         (WebCore::GraphicsLayer::flushCompositingStateForThisLayerOnly):
1565         * platform/graphics/GraphicsLayerClient.h:
1566         (GraphicsLayerClient):
1567         * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
1568         (WebCore::GraphicsLayerBlackBerry::notifyFlushRequired):
1569         * platform/graphics/blackberry/LayerWebKitThread.cpp:
1570         (WebCore::LayerWebKitThread::setNeedsCommit):
1571         * platform/graphics/ca/GraphicsLayerCA.cpp:
1572         (WebCore::GraphicsLayerCA::flushCompositingState):
1573         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
1574         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
1575         (WebCore::GraphicsLayerCA::positionForCloneRootLayer):
1576         (WebCore::GraphicsLayerCA::noteLayerPropertyChanged):
1577         * platform/graphics/ca/GraphicsLayerCA.h:
1578         (GraphicsLayerCA):
1579         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1580         (WebCore::GraphicsLayerTextureMapper::notifyChange):
1581         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
1582         (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
1583         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1584         (GraphicsLayerTextureMapper):
1585         * platform/graphics/texmap/TextureMapperLayer.cpp:
1586         (WebCore::TextureMapperLayer::flushCompositingState):
1587         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
1588         * platform/graphics/texmap/TextureMapperLayer.h:
1589         (TextureMapperLayer):
1590         * rendering/RenderLayerBacking.cpp:
1591         (WebCore::RenderLayerBacking::notifyFlushRequired):
1592         * rendering/RenderLayerBacking.h:
1593         (RenderLayerBacking):
1594         * rendering/RenderLayerCompositor.cpp:
1595         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1596         * rendering/RenderLayerCompositor.h:
1597         (WebCore::RenderLayerCompositor::notifyFlushRequired):
1598
1599 2012-10-04  Tab Atkins  <tabatkins@google.com>
1600
1601         1ex should equal .5em when the font has no x-height metric
1602         https://bugs.webkit.org/show_bug.cgi?id=80360
1603
1604         Reviewed by Eric Seidel.
1605
1606         Updated FontMetrics and CSSPrimitiveValue to have/use an explicit "hasXHeight" flag to determine how to size an 'ex' unit.
1607
1608         Updated a few of the platform font files to set the flag properly.
1609
1610         Patch cleanup by David Barr <davidbarr@chromium.org>.
1611
1612         Test: fast/css/ex-unit-with-no-x-height.html
1613
1614         * css/CSSPrimitiveValue.cpp:
1615         (WebCore::CSSPrimitiveValue::computeLengthDouble):
1616         * platform/graphics/FontMetrics.h:
1617         (WebCore::FontMetrics::FontMetrics):
1618         (WebCore::FontMetrics::setXHeight):
1619         (FontMetrics):
1620         (WebCore::FontMetrics::hasXHeight):
1621         (WebCore::FontMetrics::setHasXHeight):
1622         (WebCore::FontMetrics::reset):
1623         * platform/graphics/skia/SimpleFontDataSkia.cpp:
1624         (WebCore::SimpleFontData::platformInit):
1625
1626 2012-10-04  Ryosuke Niwa  <rniwa@webkit.org>
1627
1628         Build fix after r130411. Add the right offset.
1629         Also use RefPtr instead of a raw pointer for next and previous pointers.
1630
1631         * editing/ReplaceSelectionCommand.cpp:
1632         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
1633
1634 2012-10-04  Alec Flett  <alecflett@chromium.org>
1635
1636         IndexedDB: promote objectstore/index backend ids to the frontend
1637         https://bugs.webkit.org/show_bug.cgi?id=97834
1638
1639         Reviewed by Tony Chang.
1640
1641         Expose int64-based database/objectStore/index ids to the renderer,
1642         step 1 of 2. Support both styles of createObjectStore and
1643         createIndex: those that take an explicit id, and those that take
1644         -1, meaning to autogenerate an id on the backend. In part 2, after
1645         the chromium side lands, support for the autogenerated ids will be
1646         removed. (See https://bugs.webkit.org/show_bug.cgi?id=98085)
1647
1648         This is a part of larger refactoring work to ultimately make the interface
1649         between the frontend and the backend simpler.
1650
1651         No new tests, extensive ASSERTs and existing tests cover correctness.
1652
1653         * Modules/indexeddb/IDBBackingStore.h:
1654         (IDBBackingStore):
1655         * Modules/indexeddb/IDBDatabase.cpp:
1656         (WebCore::IDBDatabase::createObjectStore):
1657         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1658         (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
1659         (WebCore::IDBDatabaseBackendImpl::openInternal):
1660         (WebCore::IDBDatabaseBackendImpl::metadata):
1661         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1662         (WebCore):
1663         (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
1664         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
1665         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1666         (IDBDatabaseBackendImpl):
1667         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
1668         (IDBDatabaseBackendInterface):
1669         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
1670         (WebCore::IDBIndexBackendImpl::metadata):
1671         * Modules/indexeddb/IDBIndexBackendImpl.h:
1672         (WebCore::IDBIndexBackendImpl::create):
1673         (IDBIndexBackendImpl):
1674         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
1675         (WebCore):
1676         (WebCore::getMaxObjectStoreId):
1677         (WebCore::IDBLevelDBBackingStore::getIDBDatabaseMetaData):
1678         (WebCore::IDBLevelDBBackingStore::deleteDatabase):
1679         (WebCore::IDBLevelDBBackingStore::getObjectStores):
1680         (WebCore::setMaxObjectStoreId):
1681         (WebCore::IDBLevelDBBackingStore::createObjectStore):
1682         (WebCore::getMaxIndexId):
1683         (WebCore::setMaxIndexId):
1684         (WebCore::IDBLevelDBBackingStore::createIndex):
1685         * Modules/indexeddb/IDBLevelDBBackingStore.h:
1686         (IDBLevelDBBackingStore):
1687         * Modules/indexeddb/IDBMetadata.h:
1688         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
1689         (IDBDatabaseMetadata):
1690         (WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata):
1691         (IDBObjectStoreMetadata):
1692         (WebCore::IDBIndexMetadata::IDBIndexMetadata):
1693         (IDBIndexMetadata):
1694         * Modules/indexeddb/IDBObjectStore.cpp:
1695         (WebCore::IDBObjectStore::createIndex):
1696         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1697         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
1698         (WebCore::IDBObjectStoreBackendImpl::metadata):
1699         (WebCore::IDBObjectStoreBackendImpl::createIndex):
1700         (WebCore):
1701         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
1702         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
1703         (WebCore::IDBObjectStoreBackendImpl::create):
1704         (IDBObjectStoreBackendImpl):
1705         * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
1706 2012-10-04  Pravin D  <pravind.2k4@gmail.com>
1707
1708         Layout broken after cloning and re-inserting a table with a misplaced <form>
1709         https://bugs.webkit.org/show_bug.cgi?id=86746
1710
1711         Reviewed by Julien Chaffraix.
1712
1713         There is a concept of demotion for a <form> contained in a table. A <form> is demoted if its immediate parent
1714         is either a <table>, table sections (tbody, etc) or a table row (tr). A renderer for such a <form> is created only
1715         if its display is one of the table display types (TABLE, INLINE_TABLE, TABLE_FOOTER_GROUP, etc).
1716         However when a <table> containing a demoted <form> is cloned, the <form> does not retain its demotion state and 
1717         results in the table getting improperly rendered.
1718
1719         Test: fast/table/form-with-non-table-display-inside-table-elements.html
1720
1721         * html/HTMLFormElement.cpp:
1722         (WebCore::HTMLFormElement::copyNonAttributePropertiesFromElement):
1723           Extended the virtual function for HTMLFormElement class specific implementation.
1724           The function is used to copy any necessary state information(member variables) associated with
1725           the <form> element being cloned to the current node.
1726           For HTMLFormElement node the member variable can be classified into five groups based on the 
1727           information they hold:
1728             1) Variables containing information regarding <form> subtree and elements associated with it.
1729                These get updated as and when an element is added to the <form> subtree.
1730             2) Variables containing <form> submit state information.
1731             3) Flag to hold information if reset() has been called.
1732             4) Flag(m_wasDemoted) that indicates whether the form is demoted or not, based on which it needs to
1733                be handled differently during creation of its renderer.
1734                This information is currently being updated only during the HTML tree construction phase.
1735             5) Flag(m_wasMalformed) to hold information if the <form> is malformed or not.
1736
1737           Variables of group (1) will be updated as and when elements are added to the <form> subtree. Whereas,
1738           (2) and (3) hold instance specific information, thus copying them is not required. Also (5) is currently not
1739           being used(not set by any code).
1740
1741           On the other hand, (4) is required to be copied during cloning as this information cannot be accessed
1742           during the cloning process.
1743
1744         (WebCore):
1745         * html/HTMLFormElement.h:
1746           Added copyNonAttributePropertiesFromElement() declaration.
1747
1748 2012-10-04  Dean Jackson  <dino@apple.com>
1749
1750         Attribute and Uniform variable names need translation in shader
1751         https://bugs.webkit.org/show_bug.cgi?id=70989
1752
1753         Reviewed by Tim Horton (and Darin Adler).
1754
1755         WebGL specifies some maximum lengths for variable names (attributes
1756         and uniforms). Also, some GL drivers have issues with long names. For
1757         that reason, ANGLE has an option to rewrite the shader, translating
1758         long names into short names. Turning this on helps shaders compile,
1759         but we need to keep a mapping between the original names and the
1760         translated names, so that we bind to the right location from user code
1761         (which won't ever see the translated source).
1762
1763         This provided an opportunity to clean up some other bits of code:
1764         CSS Filters examined the uniform names after a compilation; It can
1765         now use the variable name map. I also added a typedef for the
1766         HashMaps that keep the shader, the source code and the variable name
1767         mappings.
1768
1769         I also opened a followup bug to make sure these tables are deleted
1770         when the associated shaders (or linked programs) go away:
1771         https://bugs.webkit.org/show_bug.cgi?id=98204
1772
1773         Covered by existing tests (with some enhancements):
1774         - fast/canvas/webgl/attrib-location-length-limits.html:
1775         - fast/canvas/webgl/uniform-location-length-limits.html:
1776
1777         * platform/graphics/ANGLEWebKitBridge.cpp:
1778         (WebCore::getSymbolInfo): Extracts all the information on symbols (either attributes
1779         or uniforms) from the newly compiled shader.
1780         (WebCore):
1781         (WebCore::ANGLEWebKitBridge::compileShaderSource): New method name.
1782         * platform/graphics/ANGLEWebKitBridge.h:
1783         (WebCore::getUniforms): Deleted this method.
1784         (WebCore::ANGLEShaderSymbol::isSampler): Make sure the symbol is a uniform.
1785         (ANGLEWebKitBridge):
1786         * platform/graphics/GraphicsContext3D.h:
1787         (WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo): A new object that
1788         holds the size, type and translated name of a symbol from a WebGL shader.
1789         (ShaderSourceEntry):
1790         (WebCore::GraphicsContext3D::ShaderSourceEntry::ShaderSourceEntry): Now keeps track
1791         of the translated source code and symbol mappings.
1792         (WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap): Helper function to
1793         get the member variable corresponding to the type of symbol you're asking fo.
1794         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
1795         (WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram): Calls new method
1796         name which also produces a set of symbols to examine.
1797         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1798         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): We now can pass
1799         in some extra compile options to do translation of long symbol names. Also fill the
1800         map of translated symbol names.
1801         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1802         (WebCore::GraphicsContext3D::compileShader):
1803         (WebCore::GraphicsContext3D::mappedSymbolName): Returns the mapped name for
1804         a shader symbol if it was translated during compilation.
1805         (WebCore):
1806         (WebCore::GraphicsContext3D::getAttribLocation):
1807         (WebCore::GraphicsContext3D::getShaderiv):
1808         (WebCore::GraphicsContext3D::getShaderInfoLog):
1809         (WebCore::GraphicsContext3D::getShaderSource):
1810         (WebCore::GraphicsContext3D::getUniformLocation):
1811
1812 2012-10-04  Alpha Lam  <hclam@chromium.org>
1813
1814         [skia] Drawing a subrect of bitmap image is misaligned
1815         https://bugs.webkit.org/show_bug.cgi?id=95121
1816
1817         Reviewed by Stephen White.
1818
1819         When drawing a subrect of BitmapImage and the subrect is not aligned
1820         to integer boundaries, skia expands it to the closest enclosing integer
1821         rectangle. This creates prominent rendering artifacts when an image
1822         is used as background and its sub-regions are invalidated frequently.
1823
1824         This patch fixes the problem by doing alignment to integer boundaries
1825         and clipping for both cases of RESAMPLE_AWESOME and RESAMPLE_LINEAR.
1826
1827         A clip rect is applied to the canvas using original destination
1828         rectangle, while source and destination rectangles are enlarged
1829         appropriately to ensure source rectangle is aligned.
1830
1831         This patch also fixes a closely related problem. In RESAMPLE_AWESOME
1832         resampling mode the previous algorithm applies different approximated
1833         scale factor for each scaled image fragment. This caused the stitched
1834         image to look ugly.
1835
1836         Scale factor is approximated using entire image size, this gives a
1837         more accurate approximation because of greater denominator and a
1838         consistent scale factor across all fragments.
1839
1840         Changes in Skia enable caching of the scaled image and return the
1841         scaled fragment because scale factor is now consistent for all
1842         fragments.
1843
1844         Tests: fast/images/paint-subrect-grid.html
1845                fast/images/paint-subrect.html
1846                fast/images/repaint-subrect-grid.html
1847
1848         * platform/graphics/skia/ImageSkia.cpp:
1849         (WebCore::computeResamplingMode): Use float for width and height.
1850         (WebCore):
1851         (WebCore::areBoundariesIntegerAligned):
1852         (WebCore::computeBitmapDrawRects):
1853         (WebCore::extractScaledImageFragment):
1854         (WebCore::drawResampledBitmap): New algorithm for drawing scaled image fragment.
1855         (WebCore::paintSkBitmap):
1856         (WebCore::Image::drawPattern):
1857         (WebCore::BitmapImage::draw): Use SkRect instead of SkIRect.
1858         (WebCore::BitmapImageSingleFrameSkia::draw):
1859         * platform/graphics/skia/NativeImageSkia.cpp:
1860         Changing the algorithm for extracting a scaled image fragment.
1861         A fragment is now identified by (scaledImageSize, scaledImageSubset).
1862         (WebCore::NativeImageSkia::hasResizedBitmap):
1863         (WebCore::NativeImageSkia::resizedBitmap):
1864         (WebCore::NativeImageSkia::shouldCacheResampling):
1865         (WebCore::NativeImageSkia::CachedImageInfo::CachedImageInfo):
1866         (WebCore):
1867         (WebCore::NativeImageSkia::CachedImageInfo::isEqual):
1868         (WebCore::NativeImageSkia::CachedImageInfo::set):
1869         (WebCore::NativeImageSkia::CachedImageInfo::rectInSubset):
1870         * platform/graphics/skia/NativeImageSkia.h:
1871         (NativeImageSkia):
1872         (CachedImageInfo):
1873
1874 2012-10-03  Ryosuke Niwa  <rniwa@webkit.org>
1875
1876         ReplaceSelectionCommand should merge text nodes
1877         https://bugs.webkit.org/show_bug.cgi?id=98188
1878
1879         Reviewed by Levi Weintraub.
1880
1881         Added mergeTextNodesAroundPosition to ReplaceSelectionCommand to merge text nodes after the replace in
1882         completeHTMLReplacement. Also fixed a bunch of bugs in other classes and functions to make this work.
1883
1884         This behavior change is tested by existing tests.
1885
1886         * editing/InsertParagraphSeparatorCommand.cpp:
1887         (WebCore::InsertParagraphSeparatorCommand::doApply): When splitting a text node, place the insertionPosition
1888         at the end of the first half. Leaving it at the beginning of the second half confuses the rest of the code in
1889         the function. However, the logic to handle the "insignificant" white spaces needs the position at the start of
1890         the second half. So keep this position.
1891         * editing/ReplaceSelectionCommand.cpp:
1892         (WebCore::ReplaceSelectionCommand::doApply): Update visibleStart after inserting a paragraph separator so that
1893         the logic to cleanup the nested div checks the right condition (right beneath it starting with a long comment).
1894         (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace): Insert a space for smart paste at the appropriate
1895         offset instead of at the end of endNode. Also update the layout before obtaining startDownstream as we may have 
1896         modified the DOM by inserting a space for endNode. Finally, a non-breaking space should be treated like a space
1897         isCharacterSmartReplaceExempt for the purpose of smart replace. e.g. if we're inserting "world" after
1898         "hello&nbsp;", we shouldn't be inserting another space between "hello" and "world".
1899         (WebCore::ReplaceSelectionCommand::completeHTMLReplacement):
1900         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition): Added. Merge text nodes around position, and
1901         adjust position and positionOnlyToBeUpdated accordingly. We need to call updatePositionForNodeRemoval when
1902         positions were before or after the text node.
1903         * editing/ReplaceSelectionCommand.h:
1904         (ReplaceSelectionCommand):
1905
1906 2012-10-04  Tony Chang  <tony@chromium.org>
1907
1908         Fix <input type="month"> tests
1909         https://bugs.webkit.org/show_bug.cgi?id=98426
1910
1911         Reviewed by Ojan Vafai.
1912
1913         The month picker uses flexbox and assumes that it will be aligned with
1914         the last line box. This looks visually correct. I will follow up on
1915         www-style to see what the expected behavior is.
1916
1917         Tests: fast/forms/month-multiple-fields tests cover this.
1918
1919         * rendering/RenderFlexibleBox.cpp:
1920         * rendering/RenderFlexibleBox.h:
1921
1922 2012-10-04  Sheriff Bot  <webkit.review.bot@gmail.com>
1923
1924         Unreviewed, rolling out r130396.
1925         http://trac.webkit.org/changeset/130396
1926         https://bugs.webkit.org/show_bug.cgi?id=98421
1927
1928         This patch is causing crashes on 4 tests on Lion Debug and
1929         Mountain Lion Debug (Requested by jernoble on #webkit).
1930
1931         * rendering/RenderLayerCompositor.cpp:
1932         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
1933         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1934         * rendering/RenderLayerCompositor.h:
1935         * testing/InternalSettings.cpp:
1936         (WebCore::InternalSettings::Backup::Backup):
1937         (WebCore::InternalSettings::Backup::restoreTo):
1938         * testing/InternalSettings.h:
1939         (Backup):
1940
1941 2012-10-04  Tony Chang  <tony@chromium.org>
1942
1943         inline-flex baseline is sometimes wrong
1944         https://bugs.webkit.org/show_bug.cgi?id=96188
1945
1946         Reviewed by Ojan Vafai.
1947
1948         Implement the necessary methods to get the proper baseline alignment of flexbox.
1949         We were falling back to the inline-block behavior.
1950
1951         Test: css3/flexbox/flexbox-baseline.html
1952
1953         * rendering/RenderFlexibleBox.cpp:
1954         (WebCore::RenderFlexibleBox::RenderFlexibleBox):
1955         (WebCore::RenderFlexibleBox::baselinePosition): Used to get the baseline of the box.
1956         Mostly just the first line box baseline.
1957         (WebCore):
1958         (WebCore::RenderFlexibleBox::lastLineBoxBaseline): This is used for getting the baseline when in an inline-block.
1959         We actually don't want the last line, but the flexbox's baseline.
1960         (WebCore::RenderFlexibleBox::firstLineBoxBaseline): Compute the baseline according to the rules in the spec.
1961         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Keep track of the number of children on the
1962         first line so we don't have to re-compute this when getting the baseline.
1963         (WebCore::RenderFlexibleBox::crossAxisExtentForChild): Make const.
1964         (WebCore::RenderFlexibleBox::mainAxisExtentForChild): Make const.
1965         (WebCore::RenderFlexibleBox::hasAutoMarginsInCrossAxis): Make const.
1966         * rendering/RenderFlexibleBox.h: Add a size_t to keep track of how many children are in the first line.
1967
1968 2012-10-04  Xianzhu Wang  <wangxianzhu@chromium.org>
1969
1970         [Chromium] Should set unitsPerEm in SimpleFontDataSkia.cpp
1971         https://bugs.webkit.org/show_bug.cgi?id=98100
1972
1973         Reviewed by Stephen White.
1974
1975         At least on chromium-linux and chromium-android, unitsPerEm was not set
1976         according to the information in the font, causing at least problems in
1977         OpenTypeVerticalData when calculating vertical advance.
1978
1979         Test: fast/writing-mode/vertical-font-vmtx-units-per-em.html
1980
1981         * platform/graphics/skia/SimpleFontDataSkia.cpp:
1982         (WebCore::SimpleFontData::platformInit):
1983
1984 2012-10-04  Simon Fraser  <simon.fraser@apple.com>
1985
1986         Standardize on "flush" terminology for compositing layer flushing/syncing
1987         https://bugs.webkit.org/show_bug.cgi?id=98321
1988
1989         Reviewed by Simon Fraser.
1990
1991         Rename compositing-related methods that refer to "syncing" to instead
1992         refer to "flushing".
1993
1994         * WebCore.exp.in:
1995         * loader/EmptyClients.h:
1996         (WebCore::EmptyChromeClient::scheduleCompositingLayerFlush):
1997         * page/ChromeClient.h:
1998         (ChromeClient):
1999         * page/FrameView.cpp:
2000         (WebCore::FrameView::flushCompositingStateForThisFrame):
2001         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
2002         (WebCore::FrameView::paintContents):
2003         * page/FrameView.h:
2004         (FrameView):
2005         * rendering/RenderLayerCompositor.cpp:
2006         (WebCore::RenderLayerCompositor::scheduleLayerFlush):
2007         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2008
2009 2012-10-04  Peter Rybin  <peter.rybin@gmail.com>
2010
2011         Web Inspector: expose object internal properties such as PrimitiveValue or BoundThis
2012         https://bugs.webkit.org/show_bug.cgi?id=94397
2013
2014         Reviewed by Yury Semikhatsky.
2015
2016         Internal property access is built from Injected Script to V8 debug API. JSC binding
2017         has a stub imlpementation. Protocol is updated to explicitly reflect internal properties.
2018
2019         Test: inspector-protocol/runtime-getProperties.html
2020
2021         * bindings/js/JSInjectedScriptHostCustom.cpp:
2022         (WebCore::JSInjectedScriptHost::getInternalProperties):
2023         (WebCore):
2024         * bindings/v8/DebuggerScript.js:
2025         * bindings/v8/ScriptDebugServer.cpp:
2026         (WebCore::ScriptDebugServer::getInternalProperties):
2027         (WebCore):
2028         * bindings/v8/ScriptDebugServer.h:
2029         (ScriptDebugServer):
2030         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2031         (WebCore::V8InjectedScriptHost::getInternalPropertiesCallback):
2032         (WebCore):
2033         * inspector/InjectedScript.cpp:
2034         (WebCore::InjectedScript::getInternalProperties):
2035         (WebCore):
2036         * inspector/InjectedScript.h:
2037         (InjectedScript):
2038         * inspector/InjectedScriptHost.idl:
2039         * inspector/InjectedScriptSource.js:
2040         (.):
2041         * inspector/Inspector.json:
2042         * inspector/InspectorRuntimeAgent.cpp:
2043         (WebCore::InspectorRuntimeAgent::getProperties):
2044         * inspector/InspectorRuntimeAgent.h:
2045         (InspectorRuntimeAgent):
2046
2047 2012-10-04  Sami Kyostila  <skyostil@chromium.org>
2048
2049         Fixed position visibility check does not consider descendants
2050         https://bugs.webkit.org/show_bug.cgi?id=98144
2051
2052         Reviewed by Simon Fraser.
2053
2054         The check against creating composition layers for invisible fixed positioned
2055         elements is too aggressive in that it does not consider descendants of the
2056         fixed positioned element that may be visible even though the element itself is
2057         out of view.
2058
2059         Fix the problem by calculating the true composited bounds of the fixed
2060         element instead of just using the size of the fixed layer. Because calculating
2061         the true bounds may be expensive, it is only done if the fixed layer itself is
2062         invisible.
2063
2064         Test: compositing/layer-creation/fixed-position-absolute-descendant.html
2065
2066         * rendering/RenderLayerCompositor.cpp:
2067         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
2068         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2069         * rendering/RenderLayerCompositor.h:
2070
2071 2012-10-04  Vsevolod Vlasov  <vsevik@chromium.org>
2072
2073         Web Inspector: When uiSourceCode content has diverged from VM script, call frames should be shown in temporary script based uiSourceCodes.
2074         https://bugs.webkit.org/show_bug.cgi?id=98385
2075
2076         Reviewed by Pavel Feldman.
2077
2078         When javaScriptSource diverges from VM, ResourceScriptMapping now switches debugging
2079         to temporary VM scripts based uiSourceCode with isDivergedReplacement property set.
2080         Added hasDivergedFromVM and isDivergingFromVM properties to JavaScriptSource.
2081         JavaScriptSourceFrame and ScriptSnippetsModel are updated to process breakpoint changes correctly.
2082
2083         * inspector/front-end/BreakpointManager.js:
2084         (WebInspector.BreakpointManager.prototype.restoreBreakpoints):
2085         (WebInspector.BreakpointManager.prototype._uiSourceCodeRemoved):
2086         * inspector/front-end/JavaScriptSource.js:
2087         (WebInspector.JavaScriptSource.prototype.workingCopyCommitted):
2088         (WebInspector.JavaScriptSource.prototype.workingCopyChanged):
2089         (WebInspector.JavaScriptSource.prototype.fireHasDivergedFromVMChanged):
2090         * inspector/front-end/JavaScriptSourceFrame.js:
2091         (WebInspector.JavaScriptSourceFrame.prototype.commitEditing):
2092         (WebInspector.JavaScriptSourceFrame.prototype._hasDivergedFromVM):
2093         (WebInspector.JavaScriptSourceFrame.prototype.onTextChanged):
2094         (WebInspector.JavaScriptSourceFrame.prototype._getBreakpointDecorations):
2095         (WebInspector.JavaScriptSourceFrame.prototype._muteBreakpointsWhileEditing):
2096         (WebInspector.JavaScriptSourceFrame.prototype._didEditContent):
2097         (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
2098         (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
2099         * inspector/front-end/ResourceScriptMapping.js:
2100         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
2101         (WebInspector.ResourceScriptMapping.prototype._hasDivergedFromVMChanged):
2102         (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
2103         (WebInspector.ResourceScriptMapping.prototype._getOrCreateTemporaryUISourceCode):
2104         * inspector/front-end/ScriptSnippetModel.js:
2105         (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
2106         (WebInspector.ScriptSnippetModel.prototype._restoreBreakpoints):
2107         * inspector/front-end/ScriptsPanel.js:
2108         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
2109         * inspector/front-end/UISourceCode.js:
2110         (WebInspector.UISourceCode.prototype.formatted):
2111
2112 2012-10-04  Vsevolod Vlasov  <vsevik@chromium.org>
2113
2114         Web Inspector: Scripts panel should not automatically switch to snippet evaluation when previously evaluated snippet is edited.
2115         https://bugs.webkit.org/show_bug.cgi?id=98402
2116
2117         Reviewed by Pavel Feldman.
2118
2119         Scripts panel does not automatically switch to snippet evaluation when
2120         one edits previously evaluated snippet.
2121
2122         * inspector/front-end/ScriptSnippetModel.js:
2123         (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
2124         * inspector/front-end/ScriptsPanel.js:
2125         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
2126
2127 2012-10-04  Balazs Kelemen  <kbalazs@webkit.org>
2128
2129         Don't allow to disable compositing in forced compositing mode
2130         https://bugs.webkit.org/show_bug.cgi?id=98048
2131
2132         Reviewed by Jocelyn Turcotte.
2133
2134         Make forced compositing mode imply accelerated compositing. This will
2135         avoid unexpected situations for platforms that don't want to support
2136         the non-accelerated rendering path.
2137
2138         Covered by existing tests.
2139
2140         * WebCore.exp.in: Export Settings::setAcceleratedCompositingEnabled
2141         because it has been deinlined.
2142         * page/Settings.cpp:
2143         (WebCore::Settings::setAcceleratedCompositingEnabled):
2144         (WebCore::Settings::setForceCompositingMode):
2145         (WebCore):
2146         * page/Settings.h:
2147         (Settings):
2148         (WebCore::Settings::forceCompositingMode): Make it const as a side fix.
2149
2150 2012-10-04  Harald Alvestrand  <hta@google.com>
2151
2152         Change RTCPeerConnection GetStats to use Date timestamp format
2153         https://bugs.webkit.org/show_bug.cgi?id=98263
2154
2155         Reviewed by Yury Semikhatsky.
2156
2157         Tested by extension to RTCPeerConnection-stats test.
2158
2159         * Modules/mediastream/RTCStatsElement.cpp:
2160         (WebCore::RTCStatsElement::create):
2161         (WebCore::RTCStatsElement::RTCStatsElement):
2162         * Modules/mediastream/RTCStatsElement.h: long -> double
2163         (RTCStatsElement):
2164         (WebCore::RTCStatsElement::timestamp):
2165         * Modules/mediastream/RTCStatsElement.idl: long -> Date
2166         * Modules/mediastream/RTCStatsReport.cpp:
2167         (WebCore::RTCStatsReport::addElement):
2168         * Modules/mediastream/RTCStatsReport.h:
2169         (RTCStatsReport):
2170         * Modules/mediastream/RTCStatsResponse.cpp:
2171         (WebCore::RTCStatsResponse::addElement):
2172         * Modules/mediastream/RTCStatsResponse.h:
2173         (RTCStatsResponse):
2174         * platform/chromium/support/WebRTCStatsResponse.cpp:
2175         (WebKit::WebRTCStatsResponse::addElement):
2176         * platform/mediastream/RTCStatsResponseBase.h:
2177         (RTCStatsResponseBase):
2178
2179 2012-10-04  Sheriff Bot  <webkit.review.bot@gmail.com>
2180
2181         Unreviewed, rolling out r130377.
2182         http://trac.webkit.org/changeset/130377
2183         https://bugs.webkit.org/show_bug.cgi?id=98392
2184
2185         Chromium Win compilation is broken (Requested by yurys on
2186         #webkit).
2187
2188         * Modules/mediastream/RTCStatsElement.cpp:
2189         (WebCore::RTCStatsElement::create):
2190         (WebCore::RTCStatsElement::RTCStatsElement):
2191         * Modules/mediastream/RTCStatsElement.h:
2192         (RTCStatsElement):
2193         (WebCore::RTCStatsElement::timestamp):
2194         * Modules/mediastream/RTCStatsElement.idl:
2195         * Modules/mediastream/RTCStatsReport.cpp:
2196         (WebCore::RTCStatsReport::addElement):
2197         * Modules/mediastream/RTCStatsReport.h:
2198         (RTCStatsReport):
2199         * Modules/mediastream/RTCStatsResponse.cpp:
2200         (WebCore::RTCStatsResponse::addElement):
2201         * Modules/mediastream/RTCStatsResponse.h:
2202         (RTCStatsResponse):
2203         * platform/chromium/support/WebRTCStatsResponse.cpp:
2204         (WebKit::WebRTCStatsResponse::addElement):
2205         * platform/mediastream/RTCStatsResponseBase.h:
2206         (RTCStatsResponseBase):
2207
2208 2012-10-04  Harald Alvestrand  <hta@google.com>
2209
2210         Change RTCPeerConnection GetStats to use Date timestamp format
2211         https://bugs.webkit.org/show_bug.cgi?id=98263
2212
2213         Reviewed by Adam Barth.
2214
2215         Tested by extension to RTCPeerConnection-stats test.
2216
2217         * Modules/mediastream/RTCStatsElement.cpp:
2218         (WebCore::RTCStatsElement::create):
2219         (WebCore::RTCStatsElement::RTCStatsElement):
2220         * Modules/mediastream/RTCStatsElement.h: long -> double
2221         (RTCStatsElement):
2222         (WebCore::RTCStatsElement::timestamp):
2223         * Modules/mediastream/RTCStatsElement.idl: long -> Date
2224         * Modules/mediastream/RTCStatsReport.cpp:
2225         (WebCore::RTCStatsReport::addElement):
2226         * Modules/mediastream/RTCStatsReport.h:
2227         (RTCStatsReport):
2228         * Modules/mediastream/RTCStatsResponse.cpp:
2229         (WebCore::RTCStatsResponse::addElement):
2230         * Modules/mediastream/RTCStatsResponse.h:
2231         (RTCStatsResponse):
2232         * platform/chromium/support/WebRTCStatsResponse.cpp:
2233         (WebKit::WebRTCStatsResponse::addElement):
2234         * platform/mediastream/RTCStatsResponseBase.h:
2235         (RTCStatsResponseBase):
2236
2237 2012-10-05  Kent Tamura  <tkent@chromium.org>
2238
2239         [Chromium] Enable the multiple fields UI for input[type=date]
2240         https://bugs.webkit.org/show_bug.cgi?id=98351
2241
2242         Reviewed by Hajime Morita.
2243
2244         Touch files related to ENABLE_INPUT_TYPE_DATE_LEGACY_UI to avoid build
2245         issues.
2246
2247         No new tests. Many tests will be landed shortly.
2248
2249         * html/DateInputType.cpp:
2250         * html/DateInputType.h:
2251
2252 2012-10-04  Kent Tamura  <tkent@chromium.org>
2253
2254         Add code for input[type=date] with the multiple fields UI
2255         https://bugs.webkit.org/show_bug.cgi?id=98340
2256
2257         Reviewed by Hajime Morita.
2258
2259         The new code is available if !ENABLE(INPUT_TYPE_DATE_LEGACY_UI). At this
2260         moment, there are no platforms enabling the new code. We're going to
2261         enable it soon on desktop Chromium, and add tests. Then we're going to
2262         remove the code for ENABLE(INPUT_TYPE_DATE_LEGACY_UI).
2263
2264         ENABLE(INPUT_TYPE_DATE_LEGACY_UI) means the current UI; input[type=date]
2265         is represetnted as a kind of text field, and it has code to invoke a
2266         calendar picker.
2267         ENABLE(CALENDAR_PICKER) was used wrongly. It meant calendar picker
2268         support + text field UI of input[type=date]. Now it means only calendar
2269         picker support.
2270
2271         * html/DateInputType.h:
2272         (WebCore): If ENABLE(INPUT_MULTIPLE_FIELDS_UI) &&
2273         !ENABLE(INPUT_TYPE_DATE_LEGACY_UI), change the base class to the class
2274         for multiple fields UI.
2275         (DateInputType): Wrap the code for text fields behavior and calendar
2276         picker UI with ENABLE(INPUT_TYPE_DATE_LEGACY_UI). Add functions for
2277         ENABLE(INPUT_MULTIPLE_FIELDS_UI)
2278         * html/DateInputType.cpp:
2279         (WebCore::DateInputType::DateInputType):
2280         Change the flag name; CALENDAR_PICKER -> INPUT_TYPE_DATE_LEGACY_UI
2281         (WebCore): ditto.
2282         (WebCore::DateInputType::formatDateTimeFieldsState):
2283         A callback for multiple fields UI. This constructs a string value from
2284         each of values of multiple fields.
2285         Note that we don't need to do +1 to month().
2286         (WebCore::DateInputType::setupLayoutParameters):
2287         A callback for multiple fields UI. Passes information to build UI.
2288
2289         * html/BaseMultipleFieldsDateAndTimeInputType.h:
2290         (BaseMultipleFieldsDateAndTimeInputType):
2291         Add m_pickerIndicatorIsAlwaysVisible member, wrap some members with flags.
2292         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2293         (WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
2294         Initialize m_pickerIndicatorIsAlwaysVisible.
2295         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
2296         If a type supports calendar picker, we should always show the picker
2297         indicator. We introduce m_pickerIndicatorIsAlwaysVisible flag, and ask
2298         RenderTheme for support status of each of types.
2299         Add a local variable 'document' to avoid multiple element()->document().
2300         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility):
2301         - If m_pickerIndicatorIsAlwaysVisible, don't hide the picker indicator element.
2302         - Wrap the code with appropriate flags.
2303
2304         * rendering/RenderTheme.h:
2305         (WebCore::RenderTheme::supportsCalendarPicker): Added.
2306         * rendering/RenderThemeChromiumMac.h: Override supportsCalendarPicker.
2307         * rendering/RenderThemeChromiumMac.mm:
2308         (WebCore::RenderThemeChromiumMac::supportsCalendarPicker):
2309         Added. Delegate to RenderThemeChromiumCommon.
2310         * rendering/RenderThemeChromiumSkia.h: Override supportsCalendarPicker.
2311         * rendering/RenderThemeChromiumSkia.cpp:
2312         (WebCore::RenderThemeChromiumSkia::supportsCalendarPicker):
2313         Added. Delegate to RenderThemeChromiumCommon.
2314         * rendering/RenderThemeChromiumCommon.h:
2315         (RenderThemeChromiumCommon): Declare supportsCalendarPicker.
2316         * rendering/RenderThemeChromiumCommon.cpp:
2317         (WebCore::RenderThemeChromiumCommon::supportsCalendarPicker):
2318         Returns true if the type is "date."
2319
2320         * html/DateTimeFieldsState.h:
2321         (DateTimeFieldsState): Add a comment for the m_month field.
2322
2323 2012-10-04  Kent Tamura  <tkent@chromium.org>
2324
2325         DateTimeYearFieldElement should respect min/max values specified by page authors
2326         https://bugs.webkit.org/show_bug.cgi?id=98227
2327
2328         Reviewed by Hajime Morita.
2329
2330         Before this patch, we always set 1 to the minimum limit and 275760 to
2331         the maximum limit for a year field, and a user can specify any year
2332         regardless of min/max attributes. Such wide range is unnecessary for
2333         normal applications and we should provide a way to limit the range.
2334
2335         Test: fast/forms/month-multiple-fields/month-multiple-fields-keyboard-events.html
2336
2337         * html/shadow/DateTimeFieldElements.h:
2338         To add four constructor arguments, introduce Parameters struct.
2339         Actually, we add the followings;
2340          - minimum year in UI
2341          - maximum year in UI
2342          - min attribute is specified
2343          - max attribute is specified
2344         (Parameters):
2345         (WebCore::DateTimeYearFieldElement::Parameters::Parameters):
2346         (DateTimeYearFieldElement):
2347         * html/shadow/DateTimeFieldElements.cpp:
2348         (WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement): ditto.
2349         (WebCore::DateTimeYearFieldElement::create): ditto.
2350         (WebCore::DateTimeYearFieldElement::clampValueForHardLimits):
2351         Override DateTimeNumericFieldElement::clampValueForHardLimits.
2352         By this, we allow to set out-of-range year values.
2353         (WebCore::currentFullYear): A helper to get the current year.
2354         (WebCore::DateTimeYearFieldElement::defaultValueForStepDown):
2355         If the field has no value and step down operation occurs,
2356          - the field has the current year if the max attribute is not specified.
2357          - the field has the maximum value otherwise.
2358         (WebCore::DateTimeYearFieldElement::defaultValueForStepUp): Similar change.
2359
2360         * html/shadow/DateTimeNumericFieldElement.h:
2361         (DateTimeNumericFieldElement): Declare clampValueForHardLimits.
2362         * html/shadow/DateTimeNumericFieldElement.cpp:
2363         (WebCore::DateTimeNumericFieldElement::clampValueForHardLimits):
2364         (WebCore::DateTimeNumericFieldElement::setValueAsInteger):
2365         Call clampValueForHardLimits instead of clampValue in order to
2366         distinguish limits for UI and limits for internal value update.
2367
2368         * html/shadow/DateTimeEditElement.h:
2369         (LayoutParameters): Add minimumYear and maximumYear members.
2370         (WebCore::DateTimeEditElement::LayoutParameters::LayoutParameters):
2371         Initialize minimumYear and maximumYear.
2372         (WebCore::DateTimeEditElement::LayoutParameters::undefinedYear):
2373         Represents 'undefined' value for minimumYear and maximumYear.
2374         * html/shadow/DateTimeEditElement.cpp:
2375         (WebCore::DateTimeEditBuilder::visitField):
2376         Preparas DateTimeYearField::Parameters and pass it to the DateTimeYearField factory.
2377
2378         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2379         (WebCore::BaseMultipleFieldsDateAndTimeInputType::fullYear):
2380         A helper to get a year value from an attribute value string.
2381         * html/BaseMultipleFieldsDateAndTimeInputType.h:
2382         (BaseMultipleFieldsDateAndTimeInputType): Add fullYear().
2383
2384         * html/DateTimeInputType.cpp:
2385         (WebCore::DateTimeInputType::setupLayoutParameters):
2386         Set LayoutParameters::minimumYear and maximumYear.
2387         * html/DateTimeLocalInputType.cpp:
2388         (WebCore::DateTimeLocalInputType::setupLayoutParameters): ditto.
2389         * html/MonthInputType.cpp:
2390         (WebCore::MonthInputType::setupLayoutParameters): ditto.
2391         * html/WeekInputType.cpp:
2392         (WebCore::WeekInputType::setupLayoutParameters): ditto.
2393
2394 2012-10-03  Adam Barth  <abarth@webkit.org>
2395
2396         Unreviewed. Fix parse error in vcproj file.
2397
2398         * WebCore.vcproj/WebCore.vcproj:
2399
2400 2012-10-03  Keishi Hattori  <keishi@webkit.org>
2401
2402         Implement localizeValue for TimeInputType
2403         https://bugs.webkit.org/show_bug.cgi?id=98237
2404
2405         Reviewed by Kent Tamura.
2406
2407         We want to localize time values for the suggestion picker.
2408         DateTimeStringBuilder parses a format and creates a formatted string.
2409
2410         Added chromium unit test LocaleMacTest.formatTime
2411
2412         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2413         (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldHaveSecondField): Moved from LayoutParameters because we want to use it inside localizeValue.
2414         (WebCore):
2415         * html/BaseMultipleFieldsDateAndTimeInputType.h:
2416         (BaseMultipleFieldsDateAndTimeInputType):
2417         * html/DateTimeInputType.cpp:
2418         (WebCore::DateTimeInputType::setupLayoutParameters):
2419         * html/DateTimeLocalInputType.cpp:
2420         (WebCore::DateTimeLocalInputType::setupLayoutParameters):
2421         * html/TimeInputType.cpp:
2422         (WebCore::TimeInputType::localizeValue):
2423         (WebCore):
2424         (WebCore::TimeInputType::setupLayoutParameters):
2425         * html/TimeInputType.h:
2426         (TimeInputType):
2427         * html/shadow/DateTimeEditElement.cpp:
2428         (WebCore):
2429         * html/shadow/DateTimeEditElement.h:
2430         (WebCore::DateTimeEditElement::LayoutParameters::LayoutParameters):
2431         * platform/text/LocaleICU.cpp:
2432         (WebCore::LocaleICU::formatDateTime): Calls Localizer::formatDateTime if the date component is not a date.
2433         * platform/text/LocaleICU.h:
2434         (LocaleICU):
2435         * platform/text/LocaleWin.cpp:
2436         (WebCore::LocaleWin::formatDateTime): Calls Localizer::formatDateTime if the date component is not a date.
2437         * platform/text/LocaleWin.h:
2438         (LocaleWin):
2439         * platform/text/LocaleNone.cpp:
2440         (LocaleNone):
2441         (WebCore::LocaleNone::formatDateTime):
2442         * platform/text/Localizer.cpp:
2443         (DateTimeStringBuilder):
2444         (WebCore):
2445         (WebCore::DateTimeStringBuilder::DateTimeStringBuilder): Takes a
2446         Localizer pointer. This is used inside the Localizer so the Localizer
2447         will out live the DateTimeStringBuilder.
2448         (WebCore::DateTimeStringBuilder::build): Builds a localized string for the given format.
2449         (WebCore::DateTimeStringBuilder::zeroPadString):
2450         (WebCore::DateTimeStringBuilder::appendNumber): Appends a number with left zero padding to match width.
2451         (WebCore::DateTimeStringBuilder::visitField):
2452         (WebCore::DateTimeStringBuilder::visitLiteral):
2453         (WebCore::DateTimeStringBuilder::toString): Returns the localized string.
2454         (WebCore::Localizer::formatDateTime):
2455         * platform/text/Localizer.h:
2456         * platform/text/mac/LocaleMac.h:
2457         (LocaleMac):
2458         * platform/text/mac/LocaleMac.mm:
2459         (WebCore::LocaleMac::formatDateTime): Calls Localizer::formatDateTime if the date component is not a date.
2460
2461 2012-10-03  Douglas Stockwell  <dstockwell@chromium.org>
2462
2463         Chromium needs support for border radius clipping
2464         https://bugs.webkit.org/show_bug.cgi?id=69866
2465
2466         Reviewed by Stephen White.
2467
2468         Changes to make this suitably efficient have already landed upstream in skia:
2469         http://code.google.com/p/skia/source/detail?r=2924
2470
2471         Covered by existing tests.
2472
2473         * rendering/RenderLayer.cpp:
2474
2475 2012-10-03  Benjamin Poulain  <bpoulain@apple.com>
2476
2477         Simplify attribute access in Element::computeInheritedLanguage
2478         https://bugs.webkit.org/show_bug.cgi?id=98327
2479
2480         Reviewed by Andreas Kling.
2481
2482         * dom/Element.cpp:
2483         (WebCore::Element::computeInheritedLanguage):
2484         By using Element::fastGetAttribute(), we check for the existence of attributeData twice
2485         and do a bunch of useless operation on AtomicString.
2486
2487         By using ElementAttributeData directly, we can cut it to the two important branch.
2488
2489 2012-10-03  Kangil Han  <kangil.han@samsung.com>
2490
2491         Fix unused parameter compile warnings.
2492         https://bugs.webkit.org/show_bug.cgi?id=98243
2493
2494         Reviewed by Alexey Proskuryakov.
2495
2496         Fixed unused parameter compile warning by removing parameter names and adding UNUSED_PARAM usage.
2497
2498         * plugins/PluginDebug.cpp:
2499         (WebCore::prettyNameForNPPVariable):
2500         * plugins/npapi.cpp:
2501         (NPN_MemFlush):
2502         (NPN_RequestRead):
2503         (NPN_GetJavaPeer):
2504
2505 2012-10-03  Adam Barth  <abarth@webkit.org>
2506
2507         Measure the usage of WebSQLDatabase
2508         https://bugs.webkit.org/show_bug.cgi?id=98330
2509
2510         Reviewed by Ojan Vafai.
2511
2512         WebKit is the only engine that implements WebSQLDatabase. This patch
2513         causes us to measure its usage so we can see how quickly web sites move
2514         to IndexedDB.
2515
2516         * Modules/webdatabase/DOMWindowWebDatabase.idl:
2517         * page/FeatureObserver.h:
2518
2519 2012-10-03  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2520
2521         [soup] WebKit crashes when doing a http request
2522         https://bugs.webkit.org/show_bug.cgi?id=98055
2523
2524         Reviewed by Martin Robinson.
2525
2526         On i386, (d->m_firstRequest.timeoutInterval() * 1000) results in 0 if
2527         timeoutInterval() is INT_MAX. So, set default timeout to 0 to avoid
2528         calling soup_add_timeout with a 0 value.
2529
2530         Also, if resource handle is deleted before "request-started" signal is
2531         emitted, soupMessage handle points to a deleted object, and a crash
2532         occurs. So, reset soupMessage handle data in
2533         cleanupSoupRequestOperation so it won't happen anymore.
2534
2535         Lastly, if timeout occurs before request is completed, handle is
2536         deleted, and crash occurs in sendRequestCallback due to an early
2537         destroyed handle. To avoid that, call handle->cancel in
2538         requestTimeoutCallback. There is no need to call
2539         cleanupSoupRequestOperation anymore since handle->cancel will trigger
2540         sendRequestCallback, and as handle is deleted,
2541         cleanupSoupRequestOperation will be called automatically.
2542
2543         No new tests yet, tests will be added with the patch in bug 74802.
2544
2545         * platform/network/ResourceRequestBase.cpp:
2546         (WebCore):
2547         * platform/network/soup/ResourceHandleSoup.cpp:
2548         (WebCore::cleanupSoupRequestOperation):
2549         (WebCore::ResourceHandle::platformSetDefersLoading):
2550         (WebCore::requestTimeoutCallback):
2551
2552 2012-10-03  Adam Barth  <abarth@webkit.org>
2553
2554         Remove support for ENABLE(LEGACY_WEBKIT_BLOB_BUILDER)
2555         https://bugs.webkit.org/show_bug.cgi?id=98301
2556
2557         Reviewed by Eric Seidel.
2558
2559         According to anonymous usage statistics, the APIs guarded by
2560         ENABLE(LEGACY_WEBKIT_BLOB_BUILDER) are used on approximately 0.006% of
2561         web pages. Given that this feature is only enabled in GTK and Chromium,
2562         it seems likely that we should remove it.
2563
2564         * CMakeLists.txt:
2565         * DerivedSources.make:
2566         * DerivedSources.pri:
2567         * GNUmakefile.features.am:
2568         * GNUmakefile.list.am:
2569         * WebCore.gypi:
2570         * WebCore.xcodeproj/project.pbxproj:
2571         * fileapi/WebKitBlobBuilder.idl: Removed.
2572         * page/DOMWindow.idl:
2573
2574 2012-10-03  Beth Dakin  <bdakin@apple.com>
2575
2576         https://bugs.webkit.org/show_bug.cgi?id=98313
2577         ScrollingStateNode should keep a Vector of children instead of child 
2578         pointers
2579
2580         Reviewed by Simon Fraser.
2581
2582         This patch re-names ScrollingStateNode::cloneNode() to 
2583         ScrollingStateNode::cloneAndResetNode(). The new function resets the 
2584         change properties of the current node after cloning it, and it also 
2585         takes care of cloning children, which the old function did not do.
2586
2587         m_firstChild and m_nextSibling are gone. Use the m_children Vector 
2588         instead.
2589         * page/scrolling/ScrollingStateNode.cpp:
2590         (WebCore::ScrollingStateNode::cloneAndResetChildNodes):
2591         (WebCore::ScrollingStateNode::appendChild):
2592         * page/scrolling/ScrollingStateNode.h:
2593         (ScrollingStateNode):
2594         (WebCore::ScrollingStateNode::parent):
2595         (WebCore::ScrollingStateNode::setParent):
2596
2597         Reset the change properties and clone children in cloneAndResetNode()
2598         * page/scrolling/ScrollingStateScrollingNode.cpp:
2599         (WebCore::ScrollingStateScrollingNode::cloneAndResetNode):
2600         * page/scrolling/ScrollingStateScrollingNode.h:
2601
2602         Yay, this function can be vastly simplified now that we don't have 
2603         those messy child and sibling pointers.
2604         * page/scrolling/ScrollingStateTree.cpp:
2605         (WebCore::ScrollingStateTree::commit):
2606
2607 2012-10-03  Ojan Vafai  <ojan@chromium.org>
2608
2609         Replace uses of -webkit-box-sizing with box-sizing
2610         https://bugs.webkit.org/show_bug.cgi?id=98312
2611
2612         Reviewed by Tony Chang.
2613
2614         No need to use the prefixed version when the unprefixed works the same.
2615         No new tests since there's no change in behavior..
2616
2617         * css/html.css:
2618
2619 2012-10-03  Joshua Bell  <jsbell@chromium.org>
2620
2621         IndexedDB: Don't do full commit for empty transactions
2622         https://bugs.webkit.org/show_bug.cgi?id=89239
2623
2624         Reviewed by Tony Chang.
2625
2626         Don't bother creating a leveldb write batch if there's nothing in the transaction
2627         to commit. Note that a read-only transaction may still have index cleanup so may
2628         not be an empty transaction.
2629
2630         This cuts the Lookup2 benchmark in http://reyesr.github.com/html5-storage-benchmark/
2631         from 70s to 2s.
2632
2633         Covered by existing tests, e.g. storage/indexeddb/transaction-basics.html
2634
2635         * platform/leveldb/LevelDBTransaction.cpp:
2636         (WebCore::LevelDBTransaction::commit):
2637
2638 2012-10-03  Adam Klein  <adamk@chromium.org>
2639
2640         Remove bogus FIXME from Document.idl
2641         https://bugs.webkit.org/show_bug.cgi?id=98302
2642
2643         Reviewed by Adam Barth.
2644
2645         The FIXME claimed that document.body throwing an exception was not
2646         specced, but in fact it is:
2647         http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-body
2648
2649         * dom/Document.idl:
2650
2651 2012-10-03  Joshua Bell  <jsbell@chromium.org>
2652
2653         IndexedDB: Memory leak when deleting object stores with indexes
2654         https://bugs.webkit.org/show_bug.cgi?id=98292
2655
2656         Reviewed by Tony Chang.
2657
2658         Reference cycles between IDBObjectStore and IDBIndex instances are explicitly
2659         broken when the transaction completes (and the spec allows traversal to fail).
2660         Deleted stores need to have the reference cycle broken too.
2661
2662         Caught by running valgrind over: storage/indexeddb/keypath-basics.html
2663
2664         * Modules/indexeddb/IDBTransaction.cpp:
2665         (WebCore::IDBTransaction::objectStoreDeleted): Add store to set.
2666         (WebCore::IDBTransaction::dispatchEvent): Notify stores in set.
2667         * Modules/indexeddb/IDBTransaction.h: Add set of deleted stores.
2668
2669 2012-10-03  Adam Barth  <abarth@webkit.org>
2670
2671         CSSNamespace.h is empty and should be deleted
2672         https://bugs.webkit.org/show_bug.cgi?id=98304
2673
2674         Reviewed by Eric Seidel.
2675
2676         There's no reason to have this file in the repository.
2677
2678         * GNUmakefile.list.am:
2679         * WebCore.gypi:
2680         * WebCore.vcproj/WebCore.vcproj:
2681         * WebCore.xcodeproj/project.pbxproj:
2682         * css/CSSNamespace.h: Removed.
2683
2684 2012-10-03  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2685
2686         Build failure with css filters enabled and accelerated compositing disabled
2687         https://bugs.webkit.org/show_bug.cgi?id=95908
2688
2689         Reviewed by Tony Chang.
2690
2691         Do not try to setBackingNeedsRepaint when building without accelerated
2692         compositing.
2693
2694         Also, allow painting with filter (paintsWithFilters returns true if
2695         renderer has filter) when accelerated compositing is not enabled.
2696
2697         No functional change, so no new tests.
2698
2699         * rendering/RenderLayer.cpp:
2700         (WebCore::RenderLayer::styleChanged):
2701
2702 2012-10-03  Emil A Eklund  <eae@chromium.org>
2703
2704         Round image sizes when zooming
2705         https://bugs.webkit.org/show_bug.cgi?id=98205
2706
2707         Reviewed by Eric Seidel.
2708
2709         We currently floor image sizes when zooming which can result in
2710         images being rendered at one pixel less than the actual size.
2711         This is especially likely to happen for very large images.
2712
2713         Test: fast/sub-pixel/zoomed-image-tiles.html
2714
2715         * loader/cache/CachedImage.cpp:
2716         (WebCore::CachedImage::imageSizeForRenderer):
2717
2718 2012-10-03  Hugo Parente Lima  <hugo.lima@openbossa.org>
2719
2720         [WK2] PageViewportController.cpp is supposed to be a generic WebKit2 file but only works with Qt port.
2721         https://bugs.webkit.org/show_bug.cgi?id=98186
2722
2723         Reviewed by Noam Rosenthal.
2724
2725         Remove the implicit conversion from WebCore::FloatSize to QSize.
2726
2727         * platform/graphics/FloatSize.h:
2728         (FloatSize):
2729
2730 2012-10-03  Levi Weintraub  <leviw@chromium.org>
2731
2732         [Sub-pixel layout] incorrect rendering when painting sub-layers as their own root
2733         https://bugs.webkit.org/show_bug.cgi?id=97484
2734
2735         Reviewed by Eric Seidel.
2736
2737         When in compositing mode, layer painting can be triggered through the backing store. When this
2738         happens, a non-top-level RenderLayer is called to paint as its own root. Normally, we attempt to preserve
2739         the proper sub-pixel accumulation through layers to their children, but since we're not
2740         starting with the top-level layer, we haven't properly accumulated one, and convertToLayerCoords,
2741         another source of correctly getting the sub-pixel offset for a layer, also avoids crawling
2742         past the listed root layer.
2743
2744         When painting a root layer, we're aligned to the surface we're painting to, so we round our
2745         offset to avoid moving objects around.
2746
2747         * rendering/RenderLayer.cpp:
2748         (WebCore::RenderLayer::paintLayerContents):
2749
2750 2012-10-03  Jeff Timanus  <twiz@chromium.org>
2751
2752         [chromium] Expose settings value to conditionally enable pinch-zoom scaling in the Chromium compositor.  The
2753         flag defaults to disabled, so this change should be a no-op for scaling/scrolling behaviour.
2754         https://bugs.webkit.org/show_bug.cgi?id=93292
2755
2756         Reviewed by James Robinson.
2757
2758         Tests:  Existing page-scale layout tests.
2759
2760         * page/Frame.cpp:
2761         (WebCore::Frame::frameScaleFactor):
2762         * page/Settings.cpp:
2763         (WebCore::Settings::Settings):
2764         * page/Settings.h:
2765         (WebCore::Settings::setApplyPageScaleFactorInCompositor):
2766         (WebCore::Settings::applyPageScaleFactorInCompositor):
2767         (Settings):
2768
2769 2012-10-03  Stephen Chenney  <schenney@chromium.org>
2770
2771         Font data is purged while fonts are still using it
2772         https://bugs.webkit.org/show_bug.cgi?id=93640
2773
2774         Reviewed by Eric Seidel.
2775
2776         Move the handling of custom font pruning from Document to FontFallbackList.
2777         The previous inplementation allowed fonts to be removed before all their
2778         clients were done. This change moves handling of custom font purging to the
2779         FontFallbackList class, which is the shared object that is only removed
2780         when all clients of a font are done with it. This fixes a crash in Angry
2781         Birds due to a seamless iframe and some failing tests in fast/frames/seamless.
2782
2783         The specific element that causes problems is:
2784         <iframe id="ingame_frame0" name="ingame_frame0" frameborder="0" seamless="true"
2785           src="http://chrome.angrybirds.com/ingame_graphic.html"
2786           onload="this.style.opacity = 1; parent.adLoaded();" scrolling="no"
2787           style="opacity: 1; -webkit-transition: opacity 1s ease-in-out 0s;
2788           position: absolute; border: 0px; width: 312px; height: 320px; z-index:
2789           300; overflow: hidden; visibility: visible;"></iframe>
2790         The source document uses the same font as the embedding document.
2791
2792         Tests: fast/frames/seamless/seamless-custom-font-pruning-crash.html
2793                fast/frames/seamless/seamless-nested-crash.html
2794
2795         * css/CSSFontFaceSource.cpp:
2796         (WebCore::CSSFontFaceSource::getFontData): Remove code to register the font with the document.
2797         * css/CSSSegmentedFontFace.cpp:
2798         (WebCore::CSSSegmentedFontFace::getFontData): Remove code to register the font with the document.
2799         * dom/Document.cpp:
2800         (WebCore::Document::~Document): Remove code that records and purges custom fonts.
2801         (WebCore):
2802         (WebCore::Document::reportMemoryUsage): Remove reference to non-existent objects.
2803         * dom/Document.h:
2804         (WebCore):
2805         (Document): Remove method declarations for custom font handling.
2806         * platform/graphics/FontFallbackList.h:
2807         (FontFallbackList): Moved some code around and made non-copyable.
2808         (WebCore::FontFallbackList::setGlyphPageZero): Moved.
2809         (WebCore::FontFallbackList::setGlyphPages): Moved.
2810         * platform/graphics/GlyphPageTreeNode.cpp:
2811         (WebCore::GlyphPageTreeNode::pruneFontData): Removed unnecessary null check.
2812         * platform/graphics/SegmentedFontData.cpp:
2813         (WebCore::SegmentedFontData::~SegmentedFontData): Added code to prune the Glyph pages when this is deleted.
2814         * platform/graphics/SimpleFontData.cpp:
2815         (WebCore::SimpleFontData::~SimpleFontData): Added code to prune the Glyph pages when this is deleted.
2816
2817 2012-10-03  Adam Barth  <abarth@webkit.org>
2818
2819         Crash when calling document.open during unload
2820         https://bugs.webkit.org/show_bug.cgi?id=98287
2821
2822         Reviewed by Nate Chapin.
2823
2824         Calling document.open results in us nulling out m_documentLoader. This
2825         code doesn't properly handle that case and crashes.
2826
2827         Test: fast/parser/document-open-in-unload.html
2828
2829         * loader/FrameLoader.cpp:
2830         (WebCore::FrameLoader::commitProvisionalLoad):
2831
2832 2012-10-03  Benjamin Poulain  <bpoulain@apple.com>
2833
2834         Element::computeInheritedLanguage: evaluate the while() condition after fetching the string
2835         https://bugs.webkit.org/show_bug.cgi?id=98220
2836
2837         Reviewed by Andreas Kling.
2838
2839         * dom/Element.cpp:
2840         (WebCore::Element::computeInheritedLanguage):
2841         The condition is never false on the first execution. Move the condition to the
2842         end of the loop for fun and profit.
2843
2844 2012-10-03  Hans Wennborg  <hans@chromium.org>
2845
2846         Speech JavaScript API: Add SpeechRecognition.interimResults attribute
2847         https://bugs.webkit.org/show_bug.cgi?id=98279
2848
2849         Reviewed by Adam Barth.
2850
2851         Add the interimResults attribute and pass it to the embedder. It was
2852         added to the spec draft in
2853         http://dvcs.w3.org/hg/speech-api/rev/d25fea0d029c
2854
2855         Tested in fast/speech/scripted/basics.html
2856
2857         * Modules/speech/SpeechRecognition.cpp:
2858         (WebCore::SpeechRecognition::start):
2859         (WebCore::SpeechRecognition::SpeechRecognition):
2860         * Modules/speech/SpeechRecognition.h:
2861         (WebCore::SpeechRecognition::interimResults):
2862         (WebCore::SpeechRecognition::setInterimResults):
2863         * Modules/speech/SpeechRecognition.idl:
2864         * Modules/speech/SpeechRecognitionClient.h:
2865         (SpeechRecognitionClient):
2866         * Modules/speech/SpeechRecognitionController.h:
2867         (WebCore::SpeechRecognitionController::start):
2868
2869 2012-10-03  Hans Wennborg  <hans@chromium.org>
2870
2871         Speech JavaScript API: Remove resultdeleted event
2872         https://bugs.webkit.org/show_bug.cgi?id=98272
2873
2874         Reviewed by Adam Barth.
2875
2876         Remove the resultdeleted event. This was never used, and was removed
2877         from the spec draft in
2878         http://dvcs.w3.org/hg/speech-api/rev/f9d53ab8b449
2879
2880         The fast/speech/scripted/basics.html test is updated to reflect this.
2881
2882         * Modules/speech/SpeechRecognition.cpp:
2883         * Modules/speech/SpeechRecognition.h:
2884         (SpeechRecognition):
2885         * Modules/speech/SpeechRecognition.idl:
2886         * Modules/speech/SpeechRecognitionEvent.cpp:
2887         * Modules/speech/SpeechRecognitionEvent.h:
2888         (SpeechRecognitionEvent):
2889         * dom/EventNames.h:
2890         (WebCore):
2891
2892 2012-09-16  Mark Hahnenberg  <mhahnenberg@apple.com>
2893
2894         Delayed structure sweep can leak structures without bound
2895         https://bugs.webkit.org/show_bug.cgi?id=96546
2896
2897         Reviewed by Geoffrey Garen.
2898
2899         This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only
2900         allocators. We now have separate allocators for our three types of objects: those objects with no destructors,
2901         those objects with destructors and with immortal structures, and those objects with destructors that don't have 
2902         immortal structures. All of the objects of the third type (destructors without immortal structures) now 
2903         inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores 
2904         the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction.
2905
2906         No new tests.
2907
2908         * ForwardingHeaders/runtime/JSDestructableObject.h: Added.
2909         * bindings/js/JSDOMWrapper.h: Inherits from JSDestructibleObject.
2910         (JSDOMWrapper):
2911         (WebCore::JSDOMWrapper::JSDOMWrapper):
2912         * bindings/scripts/CodeGeneratorJS.pm: Add finalizers to anything that inherits from JSGlobalObject,
2913         e.g. JSDOMWindow and JSWorkerContexts. For those classes we also need to define needsDestruction as true.
2914         (GenerateHeader):
2915         * bridge/objc/objc_runtime.h: Inherit from JSDestructibleObject.
2916         (ObjcFallbackObjectImp):
2917         * bridge/objc/objc_runtime.mm:
2918         (Bindings):
2919         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
2920         * bridge/runtime_array.cpp: Use a finalizer so that JSArray isn't forced to inherit from JSDestructibleObject.
2921         (JSC):
2922         (JSC::RuntimeArray::destroy):
2923         * bridge/runtime_array.h:
2924         (JSC::RuntimeArray::create):
2925         (JSC):
2926         * bridge/runtime_object.cpp: Inherit from JSDestructibleObject.
2927         (Bindings):
2928         (JSC::Bindings::RuntimeObject::RuntimeObject):
2929         * bridge/runtime_object.h:
2930         (RuntimeObject):
2931
2932 2012-10-02  Anders Carlsson  <andersca@apple.com>
2933
2934         Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory
2935         https://bugs.webkit.org/show_bug.cgi?id=98217
2936
2937         Reviewed by Andreas Kling.
2938
2939         * WebCore.exp.in:
2940         * rendering/RenderLayerBacking.cpp:
2941         (WebCore::RenderLayerBacking::createGraphicsLayer):
2942         * rendering/RenderLayerCompositor.cpp:
2943         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2944         (WebCore::RenderLayerCompositor::ensureRootLayer):
2945
2946 2012-10-03  Joshua Bell  <jsbell@chromium.org>
2947
2948         IndexedDB: Optimize encodeString/decodeString
2949         https://bugs.webkit.org/show_bug.cgi?id=97794
2950
2951         Reviewed by Tony Chang.
2952
2953         Optimize string encoding/decoding, which showed up as a CPU hot spot during profiling.
2954         The backing store uses big-endian ordering of 16-bit code unit strings, so a memcopy
2955         isn't sufficient, but the code used StringBuilder::append() character-by-character
2956         and custom byte-swapping which was slow.
2957
2958         Ran a test w/ DumpRenderTree (to avoid multiprocess overhead) taking a 10k character string
2959         and putting it 20k times and getting it 20k times. On my test box, mean time before the
2960         patch was 8.2s, mean time after the patch was 4.6s.
2961
2962         Tested by Chromium's webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.*String*'
2963
2964         * Modules/indexeddb/IDBLevelDBCoding.cpp:
2965         (WebCore::IDBLevelDBCoding::encodeString):
2966         (WebCore::IDBLevelDBCoding::decodeString):
2967
2968 2012-10-03  Keishi Hattori  <keishi@webkit.org>
2969
2970         Implement DataList UI for input type time on chromium
2971         https://bugs.webkit.org/show_bug.cgi?id=98240
2972
2973         Reviewed by Kent Tamura.
2974
2975         This adds datalist UI for input type time. We add the picker indicator to
2976         BaseMultipleFieldsDateAndTimeInputType. We enclose the dateTimeEdit element
2977         and picker indicator inside a new div element so we can position the picker
2978         indicator in the same place as input type=date.
2979
2980         Tests: platform/chromium/fast/forms/time/time-suggestion-picker-appearance-rtl.html
2981                platform/chromium/fast/forms/time/time-suggestion-picker-appearance-with-scroll-bar.html
2982                platform/chromium/fast/forms/time/time-suggestion-picker-appearance.html
2983                platform/chromium/fast/forms/time/time-suggestion-picker-key-operations.html
2984                platform/chromium/fast/forms/time/time-suggestion-picker-mouse-operations.html
2985
2986         * css/html.css:
2987         (input::-webkit-date-and-time-container):
2988         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2989         (WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
2990         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree): Creates a picker indicator.
2991         (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent): Open the picker on Alt+Down.
2992         (WebCore):
2993         (WebCore::BaseMultipleFieldsDateAndTimeInputType::listAttributeTargetChanged): Updates picker visibility.
2994         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility): In the future, DateInputType can override
2995         this so the picker indicator is always visible.
2996         (WebCore::BaseMultipleFieldsDateAndTimeInputType::hidePickerIndicator):
2997         (WebCore::BaseMultipleFieldsDateAndTimeInputType::showPickerIndicator):
2998         * html/BaseMultipleFieldsDateAndTimeInputType.h:
2999         (WebCore):
3000         (BaseMultipleFieldsDateAndTimeInputType):
3001         * html/shadow/DateTimeFieldElement.cpp:
3002         (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler): Ignore Alt+down because it should trigger the picker to open.
3003         * rendering/RenderThemeChromiumCommon.cpp:
3004         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Add time to the list.
3005
3006 2012-10-03  Andreas Kling  <kling@webkit.org>
3007
3008         Give CSSValueList backing vector an inline capacity.
3009         <http://webkit.org/b/98266>
3010         <rdar://problem/12421425>
3011
3012         Reviewed by Anders Carlsson.
3013
3014         Set an inline capacity of 4 on the CSSValue vector backing CSSValueList. This avoids an extra heap allocation
3015         in the common case, and reduces total memory use across the board, since the majority of CSSValueLists have
3016         at least 1 item, and the Vector will bump from 0 to 16 capacity on the first append.
3017
3018         394kB progression on Membuster3.
3019
3020         * css/CSSValueList.h:
3021         (CSSValueList):
3022
3023 2012-10-03  Ilya Tikhonovsky  <loislo@chromium.org>
3024
3025         Web Inspector: NMI: instrument NativeImageSkia.
3026         https://bugs.webkit.org/show_bug.cgi?id=96277
3027
3028         Reviewed by Yury Semikhatsky.
3029
3030         * platform/graphics/skia/NativeImageSkia.cpp:
3031         (WebCore::NativeImageSkia::reportMemoryUsage):
3032         (WebCore::reportMemoryUsage):
3033
3034 2012-10-03  Pavel Feldman  <pfeldman@chromium.org>
3035
3036         Web Inspector: remember the last dock option so that user could toggle between dock to bottom and right
3037         https://bugs.webkit.org/show_bug.cgi?id=98255
3038
3039         Reviewed by Vsevolod Vlasov.
3040
3041         - Introduced DockController.js that covers the dock mechanics
3042         - Removed dock orientation from the settings
3043         - Storing the last dock option to present it as default
3044         - Simplified the multi-option status bar button
3045
3046         * WebCore.gypi:
3047         * WebCore.vcproj/WebCore.vcproj:
3048         * inspector/compile-front-end.py:
3049         * inspector/front-end/DockController.js: Added.
3050         (WebInspector.DockController):
3051         (WebInspector.DockController.prototype.get element):
3052         (WebInspector.DockController.prototype.setDocked.set if):
3053         (WebInspector.DockController.prototype.setDocked):
3054         (WebInspector.DockController.prototype.setDockingUnavailable):
3055         (WebInspector.DockController.prototype._updateUI.get states):
3056         (WebInspector.DockController.prototype._updateUI):
3057         (WebInspector.DockController.prototype._decorateButtonForTargetState):
3058         (WebInspector.DockController.prototype._createDockOptions):
3059         (WebInspector.DockController.prototype._toggleDockState):
3060         (WebInspector.DockController.prototype.isCompactMode):
3061         (WebInspector.DockController.prototype.setCompactMode):
3062         * inspector/front-end/InspectorFrontendAPI.js:
3063         (InspectorFrontendAPI.setAttachedWindow):
3064         * inspector/front-end/InspectorFrontendHostStub.js:
3065         (.WebInspector.InspectorFrontendHostStub.prototype.requestAttachWindow):
3066         (.WebInspector.InspectorFrontendHostStub.prototype.requestDetachWindow):
3067         * inspector/front-end/Settings.js:
3068         * inspector/front-end/SettingsScreen.js:
3069         (WebInspector.GenericSettingsTab):
3070         * inspector/front-end/StatusBarButton.js:
3071         (WebInspector.StatusBarButton):
3072         * inspector/front-end/Toolbar.js:
3073         (WebInspector.Toolbar):
3074         (WebInspector.Toolbar.prototype.setCompactMode):
3075         (WebInspector.Toolbar.prototype._toolbarDragStart):
3076         (WebInspector.Toolbar.prototype._toolbarDrag):
3077         * inspector/front-end/WebKit.qrc:
3078         * inspector/front-end/externs.js:
3079         (WebInspector.toggleSearchingForNode):
3080         * inspector/front-end/inspector.css:
3081         (body.undocked.platform-mac-snowleopard #toolbar):
3082         (body.undocked.platform-mac-snowleopard #toolbar-dropdown):
3083         * inspector/front-end/inspector.html:
3084         * inspector/front-end/inspector.js:
3085         (WebInspector._createGlobalStatusBarItems):
3086         (windowLoaded):
3087         (WebInspector.setDockingUnavailable):
3088         * inspector/front-end/inspectorCommon.css:
3089         (body.dock-to-right:not(.undocked)):
3090         (body.dock-to-right.inactive:not(.undocked)):
3091
3092 2012-10-03  Vsevolod Vlasov  <vsevik@chromium.org>
3093
3094         Web Inspector: UISourceCode commitWorkingCopy should not fail when original script had syntax error.
3095         https://bugs.webkit.org/show_bug.cgi?id=97272
3096
3097         Reviewed by Pavel Feldman.
3098
3099         This patch is based on patch by John J. Barton.
3100
3101         * inspector/front-end/JavaScriptSource.js:
3102         (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): added rawLocation null check.
3103
3104 2012-10-03  Alexander Pavlov  <apavlov@chromium.org>
3105
3106         Web Inspector: After "Edit as HTML", any click outside box should stop editing
3107         https://bugs.webkit.org/show_bug.cgi?id=98258
3108
3109         Reviewed by Vsevolod Vlasov.
3110
3111         Make the DOM tree OL span the entire height of its container in the Elements panel to catch mouse events.
3112
3113         * inspector/front-end/elementsPanel.css:
3114         (#elements-content > ol):
3115
3116 2012-10-03  Dongwoo Joshua Im  <dw.im@samsung.com>
3117
3118         [EFL] Skeleton code of File system API.
3119         https://bugs.webkit.org/show_bug.cgi?id=91187
3120
3121         Reviewed by Gyuyoung Kim.
3122
3123         Add skeleton code of File System API on EFL port.
3124         Implementation patches will be created later.
3125
3126         No new tests because this is just skeleton code.
3127
3128         * CMakeLists.txt: Add new files which created by other patches in Modules/filesystem/ directory.
3129         * PlatformEfl.cmake: Add AsyncFileSystemEfl.cpp.
3130         * platform/AsyncFileSystem.cpp:
3131         (WebCore):
3132         * platform/efl/AsyncFileSystemEfl.cpp: Added.
3133         * platform/efl/AsyncFileSystemEfl.h: Added.
3134
3135 2012-10-03  Andreas Kling  <kling@webkit.org>
3136
3137         Shrink ElementRareData by moving bool flags to NodeRareData.
3138         <http://webkit.org/b/98225>
3139
3140         Reviewed by Antti Koivisto.
3141
3142         Move all bool flags from ElementRareData to the bitfield in its base class NodeRareData.
3143         This shrinks ElementRareData by 8 bytes (on 64-bit) and saves a whopping 58kB on Membuster3.
3144         Also removed some double raredata hash lookups.
3145
3146         * dom/Element.cpp:
3147         (WebCore::Element::detach):
3148         (WebCore::Element::recalcStyle):
3149         (WebCore::Element::ensureShadow):
3150         (WebCore::Element::setStyleAffectedByEmpty):
3151         (WebCore::Element::styleAffectedByEmpty):
3152         (WebCore::Element::setIsInCanvasSubtree):
3153         (WebCore::Element::isInCanvasSubtree):
3154         (WebCore::Element::containsFullScreenElement):
3155         (WebCore::Element::setContainsFullScreenElement):
3156         * dom/ElementRareData.h:
3157         (ElementRareData):
3158         (WebCore::ElementRareData::ElementRareData):
3159         * dom/NodeRareData.h:
3160         (WebCore::NodeRareData::styleAffectedByEmpty):
3161         (WebCore::NodeRareData::setStyleAffectedByEmpty):
3162         (WebCore::NodeRareData::isInCanvasSubtree):
3163         (WebCore::NodeRareData::setIsInCanvasSubtree):
3164         (NodeRareData):
3165         (WebCore::NodeRareData::containsFullScreenElement):
3166         (WebCore::NodeRareData::setContainsFullScreenElement):
3167
3168 2012-10-03  Jussi Kukkonen  <jussi.kukkonen@intel.com>
3169
3170         getComputedStyle perspective-origin is based on the wrong bounding box
3171         https://bugs.webkit.org/show_bug.cgi?id=98027
3172
3173         Reviewed by Simon Fraser.
3174
3175         perspective-origin for ComputedStyleDeclaration is currently calculated using the
3176         wrong bounding box (sizingBox() which ends up as the contentbox).
3177
3178         Start using borderbox for ComputedStyleDeclaration perspective-origin, similar to
3179         what transform-origin already does.
3180
3181         Test: fast/css/getComputedStyle/getComputedStyle-origin-percentage.html
3182
3183         * css/CSSComputedStyleDeclaration.cpp:
3184         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3185
3186 2012-10-03  Patrick Gansterer  <paroga@webkit.org>
3187
3188         Build fix for WinCE after r130160.
3189
3190         * platform/graphics/FontFastPath.cpp:
3191         (WebCore::Font::glyphDataAndPageForCharacter):
3192
3193 2012-10-03  Tommy Widenflycht  <tommyw@google.com>
3194
3195         MediaStream API: RTCPeerConnection should send down its handler via the FrameLoaderClient directly after creation.
3196         https://bugs.webkit.org/show_bug.cgi?id=98149
3197
3198         Reviewed by Adam Barth.
3199
3200         The chromium implementation needs to know which Frame created a PeerConnection so
3201         that the right housekeeping can take place correctly.
3202
3203         Not testable in DRT, but have verified the change manually and with our pyautotests.
3204
3205         * Modules/mediastream/RTCPeerConnection.cpp:
3206         (WebCore::RTCPeerConnection::RTCPeerConnection):
3207         * loader/FrameLoaderClient.h:
3208         (WebCore):
3209         (FrameLoaderClient):
3210         (WebCore::FrameLoaderClient::dispatchWillStartUsingPeerConnectionHandler):
3211         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
3212         (WebCore::RTCPeerConnectionHandlerChromium::toWebRTCPeerConnectionHandler):
3213         (WebCore):
3214         (WebCore::RTCPeerConnectionHandlerChromium::RTCPeerConnectionHandlerChromium):
3215         (WebCore::RTCPeerConnectionHandlerChromium::initialize):
3216         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
3217         (RTCPeerConnectionHandlerChromium):
3218
3219 2012-10-03  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3220
3221         Web Inspector: Profiles: taking heap snapshot causes error message in console.
3222         https://bugs.webkit.org/show_bug.cgi?id=97890
3223
3224         Reviewed by Yury Semikhatsky.
3225
3226         Actual problem is that proxy loader is closed twice.
3227
3228         "_snapshotReceived" should never try to close receiver,
3229         because it is a callback fired by close.
3230
3231         Also minor glitches fixed:
3232          - taking snapshot shows "Loading..." status first,
3233         and then "Saving xxx%";
3234          - after all chunks are sent "Parsing" status is set and
3235         then is replaced with "Saving 100%";
3236          - removed dead code in proxy;
3237          - proxy was ignoring callback parameter;
3238          - "Loading %d\%" is not localized.
3239
3240         * English.lproj/localizedStrings.js: Added missing "Loading %d%" string.
3241         * inspector/front-end/HeapSnapshotProxy.js: Removed dead code.
3242         (WebInspector.HeapSnapshotLoaderProxy):
3243         (WebInspector.HeapSnapshotLoaderProxy.prototype.write): Make this method
3244         interface-conformant.
3245         * inspector/front-end/HeapSnapshotView.js:
3246         (WebInspector.HeapProfileHeader): Fixed update-status and
3247         finish-transfer logic.
3248
3249 2012-10-03  Jochen Eisinger  <jochen@chromium.org>
3250
3251         Make sure that user gestures can't be consumed twice
3252         https://bugs.webkit.org/show_bug.cgi?id=97483
3253
3254         Reviewed by Adam Barth.
3255
3256         Instead of a simple counter, use a ref counted token to track how many
3257         user gestures happened and where consumed. When creating a timer that
3258         is supposed to forward the user gesture, take a reference to this token
3259         and reinstantiate the UserGestureIndicator with that token when the
3260         timer is triggered.
3261
3262         Tests: platform/chromium/fast/events/popup-forwarded-gesture-blocked.html
3263                platform/chromium/fast/events/popup-forwarded-gesture.html
3264
3265         * dom/UserGestureIndicator.cpp:
3266         (WebCore):
3267         (WebCore::UserGestureIndicator::UserGestureIndicator):
3268         (WebCore::UserGestureIndicator::~UserGestureIndicator):
3269         (WebCore::UserGestureIndicator::processingUserGesture):
3270         (WebCore::UserGestureIndicator::consumeUserGesture):
3271         (WebCore::UserGestureIndicator::currentToken):
3272         * dom/UserGestureIndicator.h:
3273         (Token):
3274         (WebCore::UserGestureIndicator::Token::~Token):
3275         (UserGestureIndicator):
3276         * page/DOMTimer.cpp:
3277         (WebCore::DOMTimer::DOMTimer):
3278         (WebCore::DOMTimer::fired):
3279         * page/DOMTimer.h:
3280         (DOMTimer):
3281
3282 2012-10-03  Dominic Mazzoni  <dmazzoni@google.com>
3283
3284         AX: Heap-use-after-free when deleting a ContainerNode with an AX object
3285         https://bugs.webkit.org/show_bug.cgi?id=98073
3286
3287         Reviewed by Hajime Morita.
3288
3289         Calls axObjectCache()->remove(this) in ~ContainerNode so that the AX tree
3290         doesn't try to access the container node while walking up the parent chain
3291         from one of the container node's children.
3292
3293         Test: accessibility/container-node-delete-causes-crash.html
3294
3295         * dom/ContainerNode.cpp:
3296         (WebCore::ContainerNode::~ContainerNode):
3297         * dom/Node.cpp:
3298         (WebCore::Node::~Node):
3299         * dom/Node.h:
3300         (WebCore::Node::document):
3301         (WebCore::Node::documentInternal):
3302
3303 2012-10-03  Vsevolod Vlasov  <vsevik@chromium.org>
3304
3305         Web Inspector: SourceURL should be taken from debugger agent when possible.
3306         https://bugs.webkit.org/show_bug.cgi?id=98239
3307
3308         Reviewed by Yury Semikhatsky.
3309
3310         Removed a check that sourceURL coming from js engine is the same as the one parsed by debugger agent.
3311         Alwys use the one from debugger agent now.
3312
3313         * inspector/InspectorDebuggerAgent.cpp:
3314         (WebCore::InspectorDebuggerAgent::didParseSource):
3315
3316 2012-10-03  Ilya Tikhonovsky  <loislo@chromium.org>
3317
3318         Unreviewed. Touch FrameView.cpp file for fixing mac bot compilation.
3319
3320         * page/FrameView.cpp:
3321         (WebCore):
3322
3323 2012-10-02  Ilya Tikhonovsky  <loislo@chromium.org>
3324
3325         Web Inspector: "Load profile..." context menu item has to be shown only for left column with the list of profiles.
3326         https://bugs.webkit.org/show_bug.cgi?id=98163
3327
3328         Reviewed by Yury Semikhatsky.
3329
3330         The text was changed to "Load Heap Snapshot..."
3331         Also I changed "Save profile..." to "Save Heap Snapshot..." because other profiles don't support Save/Load operations yet.
3332         The Load context menu item will appear only when the user clicked in sidebar the tree empty space or a profile.
3333
3334         * English.lproj/localizedStrings.js:
3335         * inspector/front-end/ProfilesPanel.js:
3336         (WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
3337         (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
3338
3339 2012-10-03  Harald Alvestrand  <hta@google.com>
3340
3341         Add data passing to the GetStats interface of RTCPeerConnection
3342         https://bugs.webkit.org/show_bug.cgi?id=98003
3343
3344         Reviewed by Adam Barth.
3345
3346         Added an RTCStatsResponseBase interface to platform, and let the
3347         RTCStatsRequestImpl class produce an implementation of it that's returned
3348         to WebCore.
3349
3350         Tested by extension of the RTCPeerConnection-stats.html test.
3351
3352         * Modules/mediastream/RTCStatsElement.cpp:
3353         (WebCore::RTCStatsElement::addStatistic):
3354         (WebCore):
3355         * Modules/mediastream/RTCStatsElement.h:
3356         (RTCStatsElement):
3357         * Modules/mediastream/RTCStatsReport.cpp:
3358         (WebCore):
3359         (WebCore::RTCStatsReport::addElement):
3360         (WebCore::RTCStatsReport::addStatistic):
3361         * Modules/mediastream/RTCStatsReport.h:
3362         (RTCStatsReport):
3363         * Modules/mediastream/RTCStatsRequestImpl.cpp:
3364         (WebCore::RTCStatsRequestImpl::createResponse):
3365         (WebCore):
3366         (WebCore::RTCStatsRequestImpl::requestSucceeded):
3367         * Modules/mediastream/RTCStatsRequestImpl.h:
3368         (RTCStatsRequestImpl):
3369         * Modules/mediastream/RTCStatsResponse.cpp:
3370         (WebCore::RTCStatsResponse::create):
3371         (WebCore::RTCStatsResponse::addReport):
3372         (WebCore):
3373         (WebCore::RTCStatsResponse::addElement):
3374         (WebCore::RTCStatsResponse::addStatistic):
3375         * Modules/mediastream/RTCStatsResponse.h:
3376         (RTCStatsResponse):
3377         * WebCore.gypi:
3378         * platform/chromium/support/WebRTCStatsRequest.cpp:
3379         (WebKit::WebRTCStatsRequest::response):
3380         (WebKit):
3381         (WebKit::WebRTCStatsRequest::requestSucceeded):
3382         * platform/chromium/support/WebRTCStatsResponse.cpp: Added.
3383         (WebKit):
3384         (WebKit::WebRTCStatsResponse::WebRTCStatsResponse):
3385         (WebKit::WebRTCStatsResponse::assign):
3386         (WebKit::WebRTCStatsResponse::reset):
3387         (WebKit::WebRTCStatsResponse::operator WTF::PassRefPtr<WebCore::RTCStatsResponseBase>):
3388         (WebKit::WebRTCStatsResponse::addReport):
3389         (WebKit::WebRTCStatsResponse::addElement):
3390         (WebKit::WebRTCStatsResponse::addStatistic):
3391         * platform/mediastream/RTCStatsRequest.h:
3392         (WebCore):
3393         (RTCStatsRequest):
3394         * platform/mediastream/RTCStatsResponseBase.h: Added.
3395         (WebCore):
3396         (RTCStatsResponseBase):
3397         (WebCore::RTCStatsResponseBase::~RTCStatsResponseBase):
3398
3399 2012-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
3400
3401         [GTK] Add API to get the web view that initiated a custom URI request to WebKit2 GTK+
3402         https://bugs.webkit.org/show_bug.cgi?id=97895
3403
3404         Reviewed by Martin Robinson.
3405
3406         * platform/network/NetworkingContext.h:
3407         (NetworkingContext): Add initiatingPageID().
3408         * platform/network/ResourceHandle.h:
3409         (ResourceHandle): Add static method
3410         getSoupRequestInitiaingPageID().
3411         * platform/network/ResourceHandleInternal.h:
3412         (ResourceHandleInternal): Add initiatingPageID().
3413         * platform/network/soup/ResourceHandleSoup.cpp:
3414         (WebCore::ResourceHandleInternal::initiatingPageID): Get the
3415         initiating page ID of the resource handle networking context.
3416         (WebCore::setSoupRequestInitiaingPageID): Helper function to
3417         attach a page ID to a SoupRequest.
3418         (WebCore::startHTTPRequest): Call setSoupRequestInitiaingPageID()
3419         to attch the initiating page ID to the SoupRequest.
3420         (WebCore::startNonHTTPRequest): Ditto.
3421         (WebCore::ResourceHandle::getSoupRequestInitiaingPageID): Static
3422         method to get the page ID attached to a SoupRequest.
3423
3424 2012-10-03  Kent Tamura  <tkent@chromium.org>
3425
3426         Introduce DateComponents::minimumYear and maximumYear
3427         https://bugs.webkit.org/show_bug.cgi?id=98230
3428
3429         Reviewed by Kentaro Hara.
3430
3431         Share same difinitions in DateComponents.cpp and DateTimeFieldElements.cpp.
3432
3433         No new tests. This doesn't change any bahevior.
3434
3435         * platform/DateComponents.h:
3436         (WebCore::DateComponents::minimumYear): Moved from DateComponents.cpp.
3437         (WebCore::DateComponents::maximumYear): ditto.
3438         * platform/DateComponents.cpp:
3439         (WebCore): Move out static minimumYear and maximumYear.
3440         (WebCore::DateComponents::parseYear): Use DateCompnents::minimumYear and/or maximumYear.
3441         (WebCore::withinHTMLDateLimits): ditto.
3442         (WebCore::DateComponents::parseWeek): ditto.
3443         (WebCore::DateComponents::setMonthsSinceEpoch): ditto.
3444         (WebCore::DateComponents::setMillisecondsSinceEpochForWeek): ditto.
3445
3446         * html/shadow/DateTimeFieldElements.cpp:
3447         (WebCore): Remove minimumYear and maximumYear.
3448         (WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement):
3449         Use DateComponents::minimumYear and maximumYear.
3450
3451
3452 2012-10-02  Arko Saha  <arko@motorola.com>
3453
3454         Microdata: itemprop names must not override builtin properties.
3455         https://bugs.webkit.org/show_bug.cgi?id=98025
3456
3457         Reviewed by Kentaro Hara.
3458
3459         We should look in the prototype for functions before assuming it as
3460         an item's name. Return false if the prototype of the object has a
3461         property (function) with propertyName.
3462         Named properties Spec: http://dev.w3.org/2006/webapi/WebIDL/#idl-named-properties
3463         Named property visibility algorithm:
3464         http://dev.w3.org/2006/webapi/WebIDL/#indexed-and-named-properties
3465         ...
3466         7. If the result of calling the [[HasProperty]] internal method on
3467         prototype with property name P is true, then return false.
3468         ...
3469         Also [OverrideBuiltins] is not declared for any of the properties,
3470         hence no overriding is allowed in this case.
3471
3472         Test: fast/dom/MicroData/itemprop-names-override-builtin-properties.html
3473
3474         * bindings/scripts/CodeGeneratorJS.pm:
3475         (GenerateGetOwnPropertySlotBody):
3476         (GenerateGetOwnPropertyDescriptorBody):
3477
3478 2012-10-02  Keishi Hattori  <keishi@webkit.org>
3479
3480         REGRESSION (r129738): Suggestion picker label is placed in the wrong location
3481         https://bugs.webkit.org/show_bug.cgi?id=98094
3482
3483         Reviewed by Kent Tamura.
3484
3485         We needed to reverse padding-left/right when rtl.
3486
3487         No new tests. Covered by date-suggestion-picker-appearance.html.
3488
3489         * Resources/pagepopups/suggestionPicker.css:
3490         (.suggestion-list-entry .label):
3491         (.rtl .suggestion-list-entry .label):
3492
3493 2012-10-02  Yury Semikhatsky  <yurys@chromium.org>
3494
3495         Provide memory instrumentation for HashCountedSet
3496         https://bugs.webkit.org/show_bug.cgi?id=98138
3497
3498         Reviewed by Pavel Feldman.
3499
3500         Replaced addHashCountedSet calls with addMember that now automatically
3501         detects HashCountedSet and calls appropriate routine.
3502
3503         * css/CSSImageGeneratorValue.cpp:
3504         (WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
3505         * loader/cache/CachedResource.cpp:
3506
3507 2012-10-02  Nandor Huszka  <hnandor@inf.u-szeged.hu>
3508
3509         Buildfix after r130235.
3510
3511         Reviewed by Csaba Osztrogonác.
3512
3513         systemAllowsMultisamplingOnATICards was deleted from GraphicsContext3D,
3514         but function body remained in GraphicsContext3DOpenGLES. Delete method body.
3515
3516         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
3517
3518 2012-10-02  Kent Tamura  <tkent@chromium.org>
3519
3520         Fix assertion failures on Chromium Debug bots for datetime/datetime-local input types.
3521
3522         * html/shadow/DateTimeFieldElements.cpp:
3523         If a placeholder stirng is empty, use a sequence of "-".
3524         (WebCore::DateTimeDayFieldElement::create):
3525         (WebCore::DateTimeMonthFieldElement::create):
3526         (WebCore::DateTimeYearFieldElement::create):
3527
3528 2012-10-02  MORITA Hajime  <morrita@google.com>
3529
3530         https://bugs.webkit.org/show_bug.cgi?id=98134
3531         [Refactoring] StyleResolver::matchScopedAuthorRules() could be simpler.
3532
3533         Reviewed by Dimitri Glazkov.
3534
3535         matchScopedAuthorRules() did have some optimization which only
3536         makes sense for heavily nested shadow tree. However, we don't see
3537         such type of usage of Shadow DOM and this looks premature
3538         optimization. This change unified its triple for loop into one,
3539         which makes the code much simpler.
3540
3541         No new tests. Covered by existing tests.
3542
3543         * css/StyleResolver.cpp:
3544         (WebCore::StyleResolver::matchScopedAuthorRules):
3545
3546 2012-10-02  Kent Tamura  <tkent@chromium.org>
3547
3548         Introduce Localizer::dateTimeFormatWithSecond and dateTimeFormatWithoutSecond
3549         https://bugs.webkit.org/show_bug.cgi?id=98229
3550
3551         Reviewed by Kentaro Hara.
3552
3553         Unify identical code in DateTimeInputType and DateTimeLocalInputType as
3554         Localizer member functions.
3555         They still have some common code. We'll address it later.
3556
3557         No new tests. This doesn't change any behavior.
3558
3559         * platform/text/Localizer.h:
3560         (Localizer): Add dateTimeFormatWithSecond and dateTimeFormatWithoutSecond.
3561         * platform/text/Localizer.cpp:
3562         (WebCore::Localizer::dateTimeFormatWithSecond):
3563         Implemented. Just concatenating dateFormat, a space, and timeFormat.
3564         (WebCore::Localizer::dateTimeFormatWithoutSecond):
3565         Implemented. Just concatenating dateFormat, a space, and shortTimeFormat.
3566
3567         * html/DateTimeInputType.cpp:
3568         (WebCore::DateTimeInputType::setupLayoutParameters):
3569         Use dateTimeFormatWithSecond and dateTimeFormatWithoutSecond.
3570         * html/DateTimeLocalInputType.cpp:
3571         (WebCore::DateTimeLocalInputType::setupLayoutParameters): ditto.
3572
3573 2012-10-03  Kent Tamura  <tkent@chromium.org>
3574
3575         Refactoring: DateTimeEditBuilder had better hold LayoutParameters
3576         https://bugs.webkit.org/show_bug.cgi?id=98228
3577
3578         Reviewed by Kentaro Hara.
3579
3580         Stop copying multiple members of LayoutParameters in DateTimeEditBuilder
3581         constructor. This change improves code size and runtime cost.
3582
3583         No new tests. This doesn't change user-visible behavior.
3584
3585         * html/shadow/DateTimeEditElement.cpp:
3586         (DateTimeEditBuilder): Add a comment about lifetime of objects.
3587         (WebCore::DateTimeEditBuilder::stepRange):
3588         Added. A helper to access m_parameters.stepRange.
3589         (WebCore::DateTimeEditBuilder::DateTimeEditBuilder):
3590         Remove m_stepRange, m_localizer, m_placeholderFor* members.
3591         Add m_parameters.
3592         (WebCore::DateTimeEditBuilder::needMillisecondField):
3593         Use stepRange() instead of m_stepRange.
3594         (WebCore::DateTimeEditBuilder::visitField):
3595         Use m_parameters.placeholderFor*.
3596         (WebCore::DateTimeEditBuilder::shouldMillisecondFieldReadOnly):
3597         Use stepRange() instead of m_stepRange.
3598         (WebCore::DateTimeEditBuilder::shouldMinuteFieldReadOnly): ditto.
3599         (WebCore::DateTimeEditBuilder::shouldSecondFieldReadOnly): ditto.
3600
3601 2012-10-02  Kent Tamura  <tkent@chromium.org>
3602
3603         Implement LocaleICU::dateFormat
3604         https://bugs.webkit.org/show_bug.cgi?id=98118
3605
3606         Reviewed by Hajime Morita.
3607
3608         http://trac.webkit.org/changeset/130127 introduced
3609         Localizer::dateFormat, and this is its implementation for LocaleICU
3610         classs. The code is going to be used when
3611         ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
3612
3613         No new tests. The function is not used yet.
3614
3615         * platform/text/LocaleICU.cpp:
3616         (WebCore::LocaleICU::dateFormat):
3617         Implemented. Note that m_shortDateFormat is a UDateFormat object, which
3618         knows various format information.
3619         * platform/text/LocaleICU.h:
3620         (LocaleICU): Add m_dateFormat to cache the format string.
3621
3622 2012-10-02  Kent Tamura  <tkent@chromium.org>
3623
3624         [Mac][Chromium-Mac] Implement LocaleMac::dateFormat
3625         https://bugs.webkit.org/show_bug.cgi?id=98116
3626
3627         Reviewed by Hajime Morita.
3628
3629         http://trac.webkit.org/changeset/130127 introduced
3630         Localizer::dateFormat, and this is its implementation for LocaleICU
3631         classs. The code is going to be used when
3632         ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
3633
3634         No new tests. The function is not used yet.
3635
3636         * platform/text/mac/LocaleMac.h:
3637         (LocaleMac): Declare m_dateFormat.
3638         * platform/text/mac/LocaleMac.mm:
3639         (WebCore::LocaleMac::dateFormat): Implemented.
3640
3641 2012-10-02  Kent Tamura  <tkent@chromium.org>
3642
3643         [Chromium-Win] Implement LocaleWin::dateFormat
3644         https://bugs.webkit.org/show_bug.cgi?id=98117
3645
3646         Reviewed by Kentaro Hara.
3647
3648         http://trac.webkit.org/changeset/130127 introduced
3649         Localizer::dateFormat, and this is its implementation for LocaleICU
3650         classs. The code is going to be used when
3651         ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
3652
3653         Tests: Added a new test to WebKit/chromium/tests/LocaleWinTest.cpp.
3654
3655         * platform/text/LocaleWin.cpp:
3656         (WebCore::parseDateFormat):
3657         Fix a continuous apostrophes parsing bug; "abc''''def" produced "abc'''def"
3658         (WebCore::appendAsLDMLLiteral):
3659         A helper function to make a literal string for LDML.
3660         (WebCore::convertWindowsDateFormatToLDML):
3661         Creates an LDML format from a parsed date format tokens.
3662         (WebCore::LocaleWin::dateFormat):
3663         Implemented. This uses convertWindowsDateFormatToLDML.
3664         (WebCore::LocaleWin::dateFormat):
3665         Added for testing. The source windows format is specified as a function
3666         argument.
3667         * platform/text/LocaleWin.h:
3668         (LocaleWin): Declare m_dateFormat and dateFormat().
3669
3670 2012-10-02  Ian Vollick  <vollick@chromium.org>
3671
3672         [chromium] Fix spelling of isNVIDIA override in Extensions3DChromium
3673         https://bugs.webkit.org/show_bug.cgi?id=98219
3674
3675         Reviewed by Dean Jackson.
3676
3677         The override in Extensions3dChromium should have been spelled isNVIDIA, not isNVidia.
3678
3679         No new tests. No change in functionality.
3680
3681         * platform/graphics/chromium/Extensions3DChromium.h:
3682         (WebCore::Extensions3DChromium::isNVIDIA):
3683
3684 2012-10-02  Anders Carlsson  <andersca@apple.com>
3685
3686         Try to fix the Snow Leopard build.
3687
3688         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
3689
3690 2012-10-02  Joshua Bell  <jsbell@chromium.org>
3691
3692         Add htons/htonl definitions and implementations
3693         https://bugs.webkit.org/show_bug.cgi?id=98054
3694
3695         Reviewed by Darin Adler.
3696
3697         Update users of htons and friends to use new wtf/ByteOrder.h header.
3698
3699         No new tests - just refactoring.
3700
3701         * platform/graphics/WOFFFileFormat.cpp:
3702         * platform/graphics/chromium/VDMXParser.cpp:
3703
3704 == Rolled over to ChangeLog-2012-10-02 ==