flexbox does wrong baseline item alignment in columns
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-10-01  Tony Chang  <tony@chromium.org>
2
3         flexbox does wrong baseline item alignment in columns
4         https://bugs.webkit.org/show_bug.cgi?id=97948
5
6         Reviewed by Ojan Vafai.
7
8         For columns, baseline alignment should just be flex-start.  We were previously
9         moving the logical left edge by the ascent.
10
11         Test: css3/flexbox/align-baseline.html
12
13         * rendering/RenderFlexibleBox.cpp:
14         (WebCore::RenderFlexibleBox::alignmentForChild): Map baseline to flex-start for orthogonal children.
15         (WebCore::RenderFlexibleBox::alignChildren): Add FIXME for bug in baseline alignment.
16         * rendering/RenderFlexibleBox.h:
17
18 2012-10-01  Keishi Hattori  <keishi@webkit.org>
19
20         Rename CalendarPickerElement to PickerIndicatorElement
21         https://bugs.webkit.org/show_bug.cgi?id=98096
22
23         Reviewed by Kent Tamura.
24
25         Renaming CalendarPickerElement to PickerIndicatorElement because we want to use it for other input types like time, week, month, datetime.
26
27         No new tests. Just a rename.
28
29         * GNUmakefile.list.am:
30         * WebCore.gypi:
31         * html/DateInputType.cpp:
32         (WebCore::DateInputType::createShadowSubtree):
33         * html/DateInputType.h:
34         (WebCore):
35         (DateInputType):
36         * html/shadow/PickerIndicatorElement.cpp: Renamed from Source/WebCore/html/shadow/CalendarPickerElement.cpp.
37         (WebCore):
38         (WebCore::PickerIndicatorElement::PickerIndicatorElement):
39         (WebCore::PickerIndicatorElement::create):
40         (WebCore::PickerIndicatorElement::~PickerIndicatorElement):
41         (WebCore::PickerIndicatorElement::createRenderer):
42         (WebCore::PickerIndicatorElement::hostInput):
43         (WebCore::PickerIndicatorElement::defaultEventHandler):
44         (WebCore::PickerIndicatorElement::willRespondToMouseClickEvents):
45         (WebCore::PickerIndicatorElement::didChooseValue):
46         (WebCore::PickerIndicatorElement::didEndChooser):
47         (WebCore::PickerIndicatorElement::openPopup):
48         (WebCore::PickerIndicatorElement::closePopup):
49         (WebCore::PickerIndicatorElement::detach):
50         * html/shadow/PickerIndicatorElement.h: Renamed from Source/WebCore/html/shadow/CalendarPickerElement.h.
51         (WebCore):
52         (PickerIndicatorElement):
53
54 2012-10-01  Ojan Vafai  <ojan@chromium.org>
55
56         Unreviewed, rolling out r130079.
57         http://trac.webkit.org/changeset/130079
58         https://bugs.webkit.org/show_bug.cgi?id=95866
59
60         Broke the chomium windows compile.
61
62         * css/CSSFontFace.cpp:
63         (WebCore::CSSFontFace::getFontData):
64         * css/CSSFontFace.h:
65         (CSSFontFace):
66         * css/CSSFontFaceSource.cpp:
67         (WebCore::CSSFontFaceSource::getFontData):
68         * css/CSSFontFaceSource.h:
69         (CSSFontFaceSource):
70         * css/CSSFontSelector.cpp:
71         (WebCore::fontDataForGenericFamily):
72         (WebCore::CSSFontSelector::getFontData):
73         * css/CSSFontSelector.h:
74         * css/CSSSegmentedFontFace.cpp:
75         (WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading):
76         (WebCore::CSSSegmentedFontFace::getFontData):
77         * css/CSSSegmentedFontFace.h:
78         (CSSSegmentedFontFace):
79         * dom/Document.cpp:
80         (WebCore::Document::registerCustomFont):
81         * dom/Document.h:
82         (Document):
83         * platform/graphics/Font.h:
84         (WebCore):
85         * platform/graphics/FontCache.cpp:
86         (WebCore):
87         (WebCore::FontCache::getCachedFontData):
88         (WebCore::FontCache::getNonRetainedLastResortFallbackFont):
89         (WebCore::FontCache::releaseFontData):
90         (WebCore::FontCache::purgeInactiveFontData):
91         (WebCore::FontCache::getFontData):
92         * platform/graphics/FontCache.h:
93         (FontCache):
94         * platform/graphics/FontData.h:
95         * platform/graphics/FontFallbackList.cpp:
96         (WebCore::FontFallbackList::releaseFontData):
97         (WebCore::FontFallbackList::fontDataAt):
98         (WebCore::FontFallbackList::setPlatformFont):
99         * platform/graphics/FontFallbackList.h:
100         (FontFallbackList):
101         * platform/graphics/FontFastPath.cpp:
102         (WebCore::Font::glyphDataAndPageForCharacter):
103         * platform/graphics/FontSelector.h:
104         (FontSelector):
105         * platform/graphics/GlyphPageTreeNode.cpp:
106         (WebCore::GlyphPageTreeNode::initializePage):
107         * platform/graphics/SegmentedFontData.cpp:
108         (WebCore::SegmentedFontData::fontDataForCharacter):
109         * platform/graphics/SegmentedFontData.h:
110         (WebCore::FontDataRange::FontDataRange):
111         (WebCore::FontDataRange::fontData):
112         (FontDataRange):
113         (SegmentedFontData):
114         * platform/graphics/SimpleFontData.cpp:
115         (WebCore::SimpleFontData::verticalRightOrientationFontData):
116         (WebCore::SimpleFontData::uprightOrientationFontData):
117         (WebCore::SimpleFontData::brokenIdeographFontData):
118         * platform/graphics/SimpleFontData.h:
119         (SimpleFontData):
120         (WebCore::SimpleFontData::variantFontData):
121         (DerivedFontData):
122         * platform/graphics/chromium/FontCacheAndroid.cpp:
123         (WebCore::FontCache::getFontDataForCharacters):
124         (WebCore::FontCache::getSimilarFontPlatformData):
125         (WebCore::FontCache::getLastResortFallbackFont):
126         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
127         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
128         (GetLastResortFallbackFontProcData):
129         (WebCore::FontCache::getFontDataForCharacters):
130         (WebCore::FontCache::getSimilarFontPlatformData):
131         (WebCore::FontCache::getLastResortFallbackFont):
132         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
133         (WebCore::SimpleFontData::createScaledFontData):
134         (WebCore::SimpleFontData::smallCapsFontData):
135         (WebCore::SimpleFontData::emphasisMarkFontData):
136         * platform/graphics/freetype/FontCacheFreeType.cpp:
137         (WebCore::FontCache::getFontDataForCharacters):
138         (WebCore::FontCache::getSimilarFontPlatformData):
139         (WebCore::FontCache::getLastResortFallbackFont):
140         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
141         (WebCore::SimpleFontData::createScaledFontData):
142         (WebCore::SimpleFontData::smallCapsFontData):
143         (WebCore::SimpleFontData::emphasisMarkFontData):
144         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
145         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
146         * platform/graphics/mac/FontCacheMac.mm:
147         (WebCore::FontCache::getFontDataForCharacters):
148         (WebCore::FontCache::getSimilarFontPlatformData):
149         (WebCore::FontCache::getLastResortFallbackFont):
150         * platform/graphics/mac/FontComplexTextMac.cpp:
151         (WebCore::Font::fontDataForCombiningCharacterSequence):
152         * platform/graphics/mac/SimpleFontDataMac.mm:
153         (WebCore::SimpleFontData::platformDestroy):
154         (WebCore::SimpleFontData::createScaledFontData):
155         (WebCore::SimpleFontData::smallCapsFontData):
156         (WebCore::SimpleFontData::emphasisMarkFontData):
157         * platform/graphics/pango/FontCachePango.cpp:
158         (WebCore::FontCache::getFontDataForCharacters):
159         (WebCore::FontCache::getSimilarFontPlatformData):
160         (WebCore::FontCache::getLastResortFallbackFont):
161         * platform/graphics/pango/SimpleFontDataPango.cpp:
162         (WebCore::SimpleFontData::createScaledFontData):
163         (WebCore::SimpleFontData::smallCapsFontData):
164         (WebCore::SimpleFontData::emphasisMarkFontData):
165         * platform/graphics/qt/FontCacheQt.cpp:
166         (WebCore::FontCache::getFontDataForCharacters):
167         (WebCore::FontCache::getSimilarFontPlatformData):
168         (WebCore::FontCache::getLastResortFallbackFont):
169         * platform/graphics/qt/SimpleFontDataQt.cpp:
170         (WebCore::SimpleFontData::createScaledFontData):
171         (WebCore::SimpleFontData::smallCapsFontData):
172         (WebCore::SimpleFontData::emphasisMarkFontData):
173         * platform/graphics/skia/FontCacheSkia.cpp:
174         (WebCore::FontCache::getFontDataForCharacters):
175         (WebCore::FontCache::getSimilarFontPlatformData):
176         (WebCore::FontCache::getLastResortFallbackFont):
177         * platform/graphics/skia/SimpleFontDataSkia.cpp:
178         (WebCore::SimpleFontData::createScaledFontData):
179         (WebCore::SimpleFontData::smallCapsFontData):
180         (WebCore::SimpleFontData::emphasisMarkFontData):
181         * platform/graphics/win/FontCacheWin.cpp:
182         (WebCore::FontCache::getFontDataForCharacters):
183         (WebCore::FontCache::getSimilarFontPlatformData):
184         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
185         (WebCore::FontCache::getLastResortFallbackFont):
186         * platform/graphics/win/SimpleFontDataWin.cpp:
187         (WebCore::SimpleFontData::createScaledFontData):
188         (WebCore::SimpleFontData::smallCapsFontData):
189         (WebCore::SimpleFontData::emphasisMarkFontData):
190         * platform/graphics/wince/FontCacheWinCE.cpp:
191         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
192         (WebCore::SimpleFontData::createScaledFontData):
193         (WebCore::SimpleFontData::smallCapsFontData):
194         (WebCore::SimpleFontData::emphasisMarkFontData):
195         * platform/graphics/wx/FontCacheWx.cpp:
196         (WebCore::FontCache::getFontDataForCharacters):
197         (WebCore::FontCache::getSimilarFontPlatformData):
198         (WebCore::FontCache::getLastResortFallbackFont):
199         * platform/graphics/wx/SimpleFontDataWx.cpp:
200         (WebCore::SimpleFontData::createScaledFontData):
201         (WebCore::SimpleFontData::smallCapsFontData):
202         (WebCore::SimpleFontData::emphasisMarkFontData):
203
204 2012-10-01  Beth Dakin  <bdakin@apple.com>
205
206         Speculative GTK build fix after http://trac.webkit.org/changeset/130091
207
208         * GNUmakefile.list.am:
209
210 2012-10-01  Adam Barth  <abarth@webkit.org>
211
212         [V8] ScriptWrappable should hold the wrapper handle directly (Dromaeo/dom-traverse gets 4% faster)
213         https://bugs.webkit.org/show_bug.cgi?id=97974
214
215         Reviewed by Kentaro Hara.
216
217         Previously, we stored a pointer to a handle to a wrapper in Node. That
218         is an extra layer of indirection that slows down finding the wrapper
219         for the node. A handle is just a pointer, so we might as we just store
220         the handle in the Node directly. That speeds up dom-traverse by about 4%.
221
222         We were using the extra layer of indirection in IntrusiveDOMWrapperMap
223         to make removal more efficient. Rather than using a chunked table, we
224         now use a HashSet, which also lets us remove elements quickly.
225
226         * bindings/v8/IntrusiveDOMWrapperMap.h:
227         (WebCore::IntrusiveDOMWrapperMap::IntrusiveDOMWrapperMap):
228         (WebCore::IntrusiveDOMWrapperMap::get):
229         (WebCore::IntrusiveDOMWrapperMap::set):
230         (WebCore::IntrusiveDOMWrapperMap::contains):
231         (WebCore::IntrusiveDOMWrapperMap::visit):
232         (WebCore::IntrusiveDOMWrapperMap::removeIfPresent):
233         (WebCore::IntrusiveDOMWrapperMap::clear):
234         * bindings/v8/ScriptWrappable.h:
235         (WebCore::ScriptWrappable::ScriptWrappable):
236         (WebCore::ScriptWrappable::wrapper):
237         (WebCore::ScriptWrappable::setWrapper):
238         (WebCore::ScriptWrappable::disposeWrapper):
239         (WebCore::ScriptWrappable::reportMemoryUsage):
240         (ScriptWrappable):
241         * bindings/v8/V8DOMWrapper.h:
242         (WebCore::V8DOMWrapper::getCachedWrapper):
243
244 2012-10-01  Ojan Vafai  <ojan@chromium.org>
245
246         Unreviewed, rolling out r130062.
247         http://trac.webkit.org/changeset/130062
248         https://bugs.webkit.org/show_bug.cgi?id=98001
249
250         Causes a ton of gtest failures on the chromium bots.
251
252         * platform/chromium/LanguageChromium.cpp:
253         (WebCore::platformLanguage):
254
255 2012-10-01  David Barton  <dbarton@mathscribe.com>
256
257         [MathML] Baseline wrong for fractions or munder/mover with padding
258         https://bugs.webkit.org/show_bug.cgi?id=97990
259
260         Reviewed by Eric Seidel.
261
262         We include any border or padding in our baseline computation. We also take this opportunity
263         to quit adding extra left & right padding to numerators and denominators, making our output
264         tighter and also more compatible with Firefox and TeX, since we are rebaselining some
265         fraction pixel tests now anyway.
266
267         Tests added to LayoutTests/mathml/presentation/{over,row-alignment}.xhtml
268
269         * rendering/mathml/RenderMathMLFraction.cpp:
270         (WebCore::RenderMathMLFraction::fixChildStyle):
271         (WebCore::RenderMathMLFraction::paint):
272         (WebCore::RenderMathMLFraction::firstLineBoxBaseline):
273         * rendering/mathml/RenderMathMLUnderOver.cpp:
274         (WebCore::RenderMathMLUnderOver::firstLineBoxBaseline):
275
276 2012-10-01  Joshua Bell  <jsbell@chromium.org>
277
278         IndexedDB: Fire error rather than raising on request creation if transaction aborts asynchronously.
279         https://bugs.webkit.org/show_bug.cgi?id=93054
280
281         Reviewed by Tony Chang.
282
283         All IDB data operations are asynchronous, producing IDBRequest objects. This was implemented
284         by passing all data from the front-end to the back-end synchronously, and synchronously
285         returning an exception code back if the request was invalid. Previous changes have moved
286         request validation to the front-end except for the case of the back-end transaction having
287         asynchronously aborted in the mean time.
288
289         To eliminate that case (which would allow front-end to back-end communication to be
290         asynchronous in multi-process ports), change from returning an exception code to relying on
291         the front-end to abort the request when the abort event finally arrives.
292
293         The difference would be noticeable in scripts - in a multi-process environment:
294
295         var request1 = store.get(0);
296         request1.onerror = errorHandler; // (A)
297         // (B)
298         var request2 = store.get(0); // (C)
299         request2.onerror = errorHandler; // (D)
300
301         If the transaction back-end were to asynchronously abort at exactly point (B), then prior to
302         this patch an exception would be thrown at (C). With this patch, no exception but (D) would
303         fire, same as (A).
304
305         The back-end explicitly fires an error callback as well, as intermediate layers may rely on
306         this to stop tracking the pending callback.
307
308         No new layout tests - change is not observable in single-process ports.
309         Added webkit_unit_test IDBRequestTest.AbortErrorAfterAbort to verify that IDBRequest
310         is resilient to this pattern, but it was previous.
311
312         * Modules/indexeddb/IDBCursor.cpp:
313         (WebCore::IDBCursor::advance): Back end should never fail a request.
314         (WebCore::IDBCursor::continueFunction): Ditto.
315         (WebCore::IDBCursor::deleteFunction): Ditto, and also move "is key cursor" test
316         here from back-end.
317         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
318         (WebCore::IDBCursorBackendImpl::continueFunction): Change from EC to firing error.
319         (WebCore::IDBCursorBackendImpl::advance): Ditto.
320         (WebCore::IDBCursorBackendImpl::deleteFunction): Ditto, and remove test moved to FE.
321         (WebCore::IDBCursorBackendImpl::prefetchContinue): Ditto.
322         * Modules/indexeddb/IDBDatabaseError.cpp:
323         (WebCore::IDBDatabaseError::create): Add overload that looks up message via code.
324         (WebCore::IDBDatabaseError::IDBDatabaseError): Look up message via exception table.
325         * Modules/indexeddb/IDBDatabaseException.h: Add getErrorDescription.
326         * Modules/indexeddb/IDBDatabaseException.cpp: Implementation of getErrorDescription.
327         * Modules/indexeddb/IDBIndex.cpp:
328         (WebCore::IDBIndex::openCursor): Back end should never fail a request.
329         (WebCore::IDBIndex::count): Ditto.
330         (WebCore::IDBIndex::openKeyCursor): Ditto.
331         (WebCore::IDBIndex::get): Ditto.
332         (WebCore::IDBIndex::getKey): Ditto.
333         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
334         (WebCore::IDBIndexBackendImpl::openCursor): Change from EC to firing error.
335         (WebCore::IDBIndexBackendImpl::openKeyCursor): Ditto.
336         (WebCore::IDBIndexBackendImpl::count): Ditto.
337         (WebCore::IDBIndexBackendImpl::get): Ditto.
338         (WebCore::IDBIndexBackendImpl::getKey): Ditto.
339         * Modules/indexeddb/IDBObjectStore.cpp:
340         (WebCore::IDBObjectStore::get): Back end should never fail a request.
341         (WebCore::IDBObjectStore::put): Ditto.
342         (WebCore::IDBObjectStore::deleteFunction): Ditto.
343         (WebCore::IDBObjectStore::clear): Ditto.
344         (WebCore): Ditto.
345         (WebCore::IDBObjectStore::openCursor): Ditto.
346         (WebCore::IDBObjectStore::count): Ditto.
347         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
348         (WebCore::IDBObjectStoreBackendImpl::get): Change from EC to firing error.
349         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): Ditto.
350         (WebCore):
351         (WebCore::IDBObjectStoreBackendImpl::deleteFunction): Ditto.
352         (WebCore::IDBObjectStoreBackendImpl::clear): Ditto.
353         (WebCore::IDBObjectStoreBackendImpl::openCursor): Ditto.
354         (WebCore::IDBObjectStoreBackendImpl::count): Ditto.
355
356 2012-10-01  Ryosuke Niwa  <rniwa@webkit.org>
357
358         Build fix. Clearly, these objects could be instantiated in worker threads.
359         Not sure why my patch asserted that we're in the main thread.
360
361         * dom/ContainerNode.h:
362         (WebCore::NoEventDispatchAssertion::NoEventDispatchAssertion):
363         (WebCore::NoEventDispatchAssertion::~NoEventDispatchAssertion):
364
365 2012-10-01  Beth Dakin  <bdakin@apple.com>
366
367         https://bugs.webkit.org/show_bug.cgi?id=97365
368         ScrollingTreeState needs to be a tree of nodes
369
370         Reviewed by Simon Fraser.
371
372         This patch should not change any behavior.
373
374         Prior to this patch, ScrollingTreeState attempted to contain all of 
375         the state information needed for the whole scrolling tree in one 
376         object. But in the future when there are multiple nodes in the 
377         scrolling tree, a single state object will not be sufficient. 
378         ScrollingState should also be represented by a tree. This patch makes 
379         scrolling state into a tree. The old ScrollingTreeState class has 
380         become the ScrollingStateScrollingNode class since the majority of 
381         the class represents scroll state that is specific to ScrollableAreas 
382         and will not be applicable to fixed or sticky layers.
383
384         Some new files and some moved files.
385         * WebCore.xcodeproj/project.pbxproj:
386
387         Everything that used to refer to the ScrollingTreeState should now 
388         refer to the ScrollingStateTree instead. Right now, all of this code 
389         continues to deal with only the root node of the tree. In the future, 
390         it will have to deal with all of the nodes.
391         * page/scrolling/ScrollingCoordinator.cpp:
392         (WebCore::ScrollingCoordinator::ScrollingCoordinator):
393         (WebCore::ScrollingCoordinator::pageDestroyed):
394         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
395         (WebCore::ScrollingCoordinator::setScrollLayer):
396         (WebCore::ScrollingCoordinator::setNonFastScrollableRegion):
397         (WebCore::ScrollingCoordinator::setScrollParameters):
398         (WebCore::ScrollingCoordinator::setWheelEventHandlerCount):
399         (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
400         (WebCore::ScrollingCoordinator::scheduleTreeStateCommit):
401         (WebCore::ScrollingCoordinator::scrollingStateTreeCommitterTimerFired):
402         (WebCore::ScrollingCoordinator::commitTreeStateIfNeeded):
403         (WebCore::ScrollingCoordinator::commitTreeState):
404         * page/scrolling/ScrollingCoordinator.h:
405         (WebCore):
406         (ScrollingCoordinator):
407
408         This is a new abstract base class for the nodes in the 
409         ScrollingStateTree.
410         * page/scrolling/ScrollingStateNode.cpp: Added.
411         (WebCore):
412         (WebCore::ScrollingStateNode::ScrollingStateNode):
413         (WebCore::ScrollingStateNode::~ScrollingStateNode):
414         (WebCore::ScrollingStateNode::appendChild):
415         (WebCore::ScrollingStateNode::cloneChildNodes):
416         (WebCore::ScrollingStateNode::traverseNext):
417         * page/scrolling/ScrollingStateNode.h: Added.
418         (WebCore):
419         (ScrollingStateNode):
420         (WebCore::ScrollingStateNode::scrollLayerDidChange):
421         (WebCore::ScrollingStateNode::setScrollLayerDidChange):
422         (WebCore::ScrollingStateNode::scrollingStateTree):
423         (WebCore::ScrollingStateNode::parent):
424         (WebCore::ScrollingStateNode::firstChild):
425         (WebCore::ScrollingStateNode::nextSibling):
426         (WebCore::ScrollingStateNode::setParent):
427         (WebCore::ScrollingStateNode::setFirstChild):
428         (WebCore::ScrollingStateNode::setNextSibling):
429         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
430         * page/scrolling/mac/ScrollingStateNodeMac.mm: Copied from page/scrolling/mac/ScrollingTreeStateMac.mm.
431         (WebCore::ScrollingStateNode::platformScrollLayer):
432         (WebCore::ScrollingStateNode::setScrollLayer):
433         (WebCore):
434
435         Right now, the ScrollingStateScrollingNode is the only type of 
436         ScrollingStateNode. In the future there will be, for example, 
437         ScrollingStateFixedNodes that will have a different set of state 
438         information to keep track of.
439         * page/scrolling/ScrollingStateScrollingNode.cpp: Copied from page/scrolling/ScrollingTreeState.cpp.
440         (WebCore::ScrollingStateScrollingNode::create):
441         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
442         (WebCore):
443         (WebCore::ScrollingStateScrollingNode::~ScrollingStateScrollingNode):
444         (WebCore::ScrollingStateScrollingNode::cloneNode):
445         (WebCore::ScrollingStateScrollingNode::setViewportRect):
446         (WebCore::ScrollingStateScrollingNode::setContentsSize):
447         (WebCore::ScrollingStateScrollingNode::setNonFastScrollableRegion):
448         (WebCore::ScrollingStateScrollingNode::setWheelEventHandlerCount):
449         (WebCore::ScrollingStateScrollingNode::setShouldUpdateScrollLayerPositionOnMainThread):
450         (WebCore::ScrollingStateScrollingNode::setHorizontalScrollElasticity):
451         (WebCore::ScrollingStateScrollingNode::setVerticalScrollElasticity):
452         (WebCore::ScrollingStateScrollingNode::setHasEnabledHorizontalScrollbar):
453         (WebCore::ScrollingStateScrollingNode::setHasEnabledVerticalScrollbar):
454         (WebCore::ScrollingStateScrollingNode::setHorizontalScrollbarMode):
455         (WebCore::ScrollingStateScrollingNode::setVerticalScrollbarMode):
456         (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
457         (WebCore::ScrollingStateScrollingNode::setScrollOrigin):
458         * page/scrolling/ScrollingStateScrollingNode.h: Copied from page/scrolling/ScrollingTreeState.h.
459         (ScrollingStateScrollingNode):
460         * page/scrolling/ScrollingStateTree.cpp: Added.
461         (WebCore):
462         (WebCore::ScrollingStateTree::create):
463         (WebCore::ScrollingStateTree::ScrollingStateTree):
464         (WebCore::ScrollingStateTree::~ScrollingStateTree):
465         (WebCore::ScrollingStateTree::commit):
466
467         The ScrollingStateTree manages the nodes in the tree via the root 
468         node. It is responsible for cloning the tree and sending it over to 
469         the scrolling thread.
470         * page/scrolling/ScrollingStateTree.h: Added.
471         (WebCore):
472         (ScrollingStateTree):
473         (WebCore::ScrollingStateTree::rootStateNode):
474         (WebCore::ScrollingStateTree::setHasChangedProperties):
475         (WebCore::ScrollingStateTree::hasChangedProperties):
476         (WebCore::ScrollingStateTree::setRootStateNode):
477
478         Everything that used to refer to the ScrollingTreeState should now 
479         refer to the ScrollingStateTree instead. Right now, all of this code 
480         continues to deal with only the root node of the tree. In the future, 
481         it will have to deal with all of the nodes.
482         * page/scrolling/ScrollingTree.cpp:
483         (WebCore::ScrollingTree::commitNewTreeState):
484         * page/scrolling/ScrollingTree.h:
485         (WebCore):
486         * page/scrolling/ScrollingTreeNode.cpp:
487         (WebCore::ScrollingTreeNode::update):
488         * page/scrolling/ScrollingTreeNode.h:
489         (WebCore):
490         (ScrollingTreeNode):
491         * page/scrolling/mac/ScrollingTreeNodeMac.h:
492         (ScrollingTreeNodeMac):
493         * page/scrolling/mac/ScrollingTreeNodeMac.mm:
494         (WebCore::ScrollingTreeNodeMac::update):
495
496         ScrollingTreeState.cpp --> ScrollingStateScrollingNode.cpp
497         * page/scrolling/ScrollingTreeState.cpp: Removed.
498
499         ScrollingTreeState.h --> ScrollingStateScrollingNode.h
500         * page/scrolling/ScrollingTreeState.h: Removed.
501
502         ScrollingTreeStateMac.mm --> ScrollingStateNodeMac.mm
503         * page/scrolling/mac/ScrollingTreeStateMac.mm: Removed.
504
505 2012-10-01  Dimitri Glazkov  <dglazkov@chromium.org>
506
507         Kill transitive effects of SelectorChecker::checkOneSelector.
508         https://bugs.webkit.org/show_bug.cgi?id=97953
509
510         Reviewed by Eric Seidel.
511
512         The dynamicPseudo/hasUnknownPseudoelements by-ref parameters that are passed into checkOneSelector make the logic harder to understand and aren't needed. Refactor the code to rid of them, replacing them instead with two flags in SelectorCheckingContext.
513
514         No change in behavior, covered by existing tests.
515
516         * css/SelectorChecker.cpp:
517         (WebCore::SelectorChecker::checkSelector): Rolled pseudo-element-checking code out of checkOneSelector into here, since that is where t
518         (WebCore::SelectorChecker::checkOneSelector): Changed to use SelectorCheckingContext rather than transitive params.
519         * css/SelectorChecker.h:
520         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext): Added two new flags.
521         (SelectorCheckingContext): Ditto.
522
523
524 2012-10-01  Andreas Kling  <kling@webkit.org>
525
526         349kB below SelectorDataList::initialize() on Membuster3.
527         <http://webkit.org/b/98072>
528         <rdar://problem/12408605>
529
530         Reviewed by Anders Carlsson.
531
532         Make a separate pass over the CSSSelectorList to figure out the capacity needed for SelectorDataList::m_selectors.
533         Reduces memory consumption by 322kB on Membuster3.
534
535         * dom/SelectorQuery.cpp:
536         (WebCore::SelectorDataList::initialize):
537
538 2012-10-01  Anders Carlsson  <andersca@apple.com>
539
540         Add a GraphicsLayerFactory getter to ChromeClient
541         https://bugs.webkit.org/show_bug.cgi?id=98069
542
543         Reviewed by Andreas Kling.
544
545         * page/ChromeClient.h:
546         (WebCore::ChromeClient::graphicsLayerFactory):
547         New function that can be overridden by ports to customize the layer type created for a page.
548
549         * rendering/RenderLayerCompositor.cpp:
550         (WebCore::RenderLayerCompositor::graphicsLayerFactory):
551         * rendering/RenderLayerCompositor.h:
552         Add helper getter that's unused for now but will be called by RenderLayerBacking when creating graphics layers.
553
554 2012-10-01  Ryosuke Niwa  <rniwa@webkit.org>
555
556         Rename AssertNoEventDispatch to NoEventDispatchAssertion
557         https://bugs.webkit.org/show_bug.cgi?id=98075
558
559         Reviewed by Abhishek Arya.
560
561         Renamed the class.
562
563         * dom/ContainerNode.cpp:
564         (WebCore):
565         (WebCore::ContainerNode::insertBeforeCommon):
566         (WebCore::ContainerNode::replaceChild):
567         (WebCore::ContainerNode::removeBetween):
568         (WebCore::ContainerNode::removeChildren):
569         (WebCore::ContainerNode::appendChild):
570         (WebCore::ContainerNode::parserAppendChild):
571         (WebCore::dispatchChildInsertionEvents):
572         (WebCore::dispatchChildRemovalEvents):
573         * dom/ContainerNode.h:
574         (WebCore::NoEventDispatchAssertion::NoEventDispatchAssertion):
575         (WebCore::NoEventDispatchAssertion::~NoEventDispatchAssertion):
576         * dom/ContainerNodeAlgorithms.h:
577         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
578         (WebCore::ChildNodeInsertionNotifier::notify):
579         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
580         * dom/Document.cpp:
581         (WebCore::Document::dispatchWindowEvent):
582         (WebCore::Document::dispatchWindowLoadEvent):
583         * dom/EventDispatcher.cpp:
584         (WebCore::EventDispatcher::dispatchEvent):
585         * dom/EventTarget.cpp:
586         (WebCore::EventTarget::fireEventListeners):
587         * dom/Node.cpp:
588         (WebCore::Node::dispatchSubtreeModifiedEvent):
589         (WebCore::Node::dispatchFocusInEvent):
590         (WebCore::Node::dispatchFocusOutEvent):
591         (WebCore::Node::dispatchDOMActivateEvent):
592         * dom/WebKitNamedFlow.cpp:
593         (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
594         * html/HTMLMediaElement.cpp:
595         (WebCore::HTMLMediaElement::loadInternal):
596
597 2012-10-01  Stephen Chenney  <schenney@chromium.org>
598
599         Rename Font::m_fontList to avoid confusion
600         https://bugs.webkit.org/show_bug.cgi?id=95867
601
602         Reviewed by Eric Seidel.
603
604        Renames Font::m_fontList to Font::m_fontFallbackList to avoid confusion
605        with FontFallbackList::m_fontList.
606
607         No new tests as behavior is absolutely not different.
608
609         * platform/graphics/Font.cpp:
610         (WebCore::Font::Font):
611         (WebCore::Font::operator=):
612         (WebCore::Font::operator==):
613         (WebCore::Font::update):
614         * platform/graphics/Font.h:
615         (WebCore::Font::fontList):
616         (WebCore::Font::loadingCustomFonts):
617         (Font):
618         (WebCore::Font::primaryFont):
619         (WebCore::Font::fontDataAt):
620         (WebCore::Font::isFixedPitch):
621         (WebCore::Font::fontSelector):
622         * platform/graphics/FontFastPath.cpp:
623         (WebCore::Font::glyphDataAndPageForCharacter):
624
625 2012-10-01  Florin Malita  <fmalita@chromium.org>
626
627         Refactor layer-related logic out of RenderBoxModelObject
628         https://bugs.webkit.org/show_bug.cgi?id=86022
629
630         Reviewed by David Hyatt.
631
632         This patch extracts layer-related logic into a dedicated class
633         (RenderLayerModelObject) and refactors dependent code to make use
634         of the new type instead of RenderBoxModelObject. This is in preparation
635         of adding non-RenderBoxModelObject layer supprt.
636
637         All methods that were using RenderBoxModelObject for layer-related
638         functionality are updated to work with RenderLayerModelObject
639         instead (a RenderLayer's renderer() can no longer be assumed to be
640         a RenderBoxModelObject).
641
642         No new tests: refactoring with no behavior changes.
643
644         * CMakeLists.txt:
645         * GNUmakefile.list.am:
646         * Target.pri:
647         * WebCore.exp.in:
648         * WebCore.gypi:
649         * WebCore.order:
650         * WebCore.vcproj/WebCore.vcproj:
651         * WebCore.xcodeproj/project.pbxproj:
652         * rendering/LayoutRepainter.h:
653         (WebCore):
654         (LayoutRepainter):
655         * rendering/RenderBR.h:
656         * rendering/RenderBlock.cpp:
657         (WebCore::RenderBlock::selectionGapRectsForRepaint):
658         (WebCore::RenderBlock::rectWithOutlineForRepaint):
659         * rendering/RenderBlock.h:
660         (RenderBlock):
661         * rendering/RenderBox.cpp:
662         (WebCore::RenderBox::styleDidChange):
663         (WebCore::RenderBox::updateFromStyle):
664         (WebCore::RenderBox::outlineBoundsForRepaint):
665         (WebCore::RenderBox::mapLocalToContainer):
666         (WebCore::RenderBox::pushMappingToContainer):
667         (WebCore::RenderBox::clippedOverflowRectForRepaint):
668         (WebCore::RenderBox::computeRectForRepaint):
669         (WebCore::RenderBox::enclosingFloatPaintingLayer):
670         * rendering/RenderBox.h:
671         (RenderBox):
672         * rendering/RenderBoxModelObject.cpp:
673         (WebCore):
674         (WebCore::RenderBoxModelObject::RenderBoxModelObject):
675         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
676         (WebCore::RenderBoxModelObject::willBeDestroyed):
677         (WebCore::RenderBoxModelObject::updateFromStyle):
678         * rendering/RenderBoxModelObject.h:
679         (RenderBoxModelObject):
680         * rendering/RenderGeometryMap.cpp:
681         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
682         (WebCore::RenderGeometryMap::popMappingsToAncestor):
683         * rendering/RenderGeometryMap.h:
684         (RenderGeometryMap):
685         * rendering/RenderInline.cpp:
686         (WebCore::RenderInline::updateFromStyle):
687         (WebCore::RenderInline::clippedOverflowRectForRepaint):
688         (WebCore::RenderInline::rectWithOutlineForRepaint):
689         (WebCore::RenderInline::computeRectForRepaint):
690         (WebCore::RenderInline::mapLocalToContainer):
691         (WebCore::RenderInline::pushMappingToContainer):
692         * rendering/RenderInline.h:
693         (RenderInline):
694         * rendering/RenderLayer.cpp:
695         (WebCore::RenderLayer::RenderLayer):
696         (WebCore::RenderLayer::updateLayerPositions):
697         (WebCore::RenderLayer::computeRepaintRects):
698         (WebCore::checkContainingBlockChainForPagination):
699         (WebCore::RenderLayer::updateLayerPosition):
700         (WebCore::isPositionedContainer):
701         (WebCore::RenderLayer::hasAncestorWithFilterOutsets):
702         (WebCore::RenderLayer::scrollTo):
703         (WebCore::RenderLayer::repaintIncludingNonCompositingDescendants):
704         * rendering/RenderLayer.h:
705         (RenderLayer):
706         (WebCore::RenderLayer::renderer):
707         * rendering/RenderLayerBacking.h:
708         (WebCore::RenderLayerBacking::renderer):
709         * rendering/RenderLayerCompositor.cpp:
710         (WebCore::RenderLayerCompositor::updateBacking):
711         (WebCore::RenderLayerCompositor::repaintOnCompositingChange):
712         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
713         (WebCore::RenderLayerCompositor::reasonForCompositing):
714         * rendering/RenderListMarker.cpp:
715         (WebCore::RenderListMarker::selectionRectForRepaint):
716         * rendering/RenderListMarker.h:
717         (RenderListMarker):
718         * rendering/RenderObject.cpp:
719         (WebCore::RenderObject::addChild):
720         (WebCore::addLayers):
721         (WebCore::RenderObject::removeLayers):
722         (WebCore::RenderObject::moveLayers):
723         (WebCore::RenderObject::findNextLayer):
724         (WebCore::RenderObject::enclosingLayer):
725         (WebCore::RenderObject::setLayerNeedsFullRepaint):
726         (WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
727         (WebCore::RenderObject::containerForRepaint):
728         (WebCore::RenderObject::repaintUsingContainer):
729         (WebCore::RenderObject::repaint):
730         (WebCore::RenderObject::repaintRectangle):
731         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
732         (WebCore::RenderObject::rectWithOutlineForRepaint):
733         (WebCore::RenderObject::clippedOverflowRectForRepaint):
734         (WebCore::RenderObject::computeRectForRepaint):
735         (WebCore::RenderObject::computeFloatRectForRepaint):
736         (WebCore::RenderObject::adjustStyleDifference):
737         (WebCore::RenderObject::mapLocalToContainer):
738         (WebCore::RenderObject::pushMappingToContainer):
739         (WebCore::RenderObject::shouldUseTransformFromContainer):
740         (WebCore::RenderObject::getTransformFromContainer):
741         (WebCore::RenderObject::localToContainerQuad):
742         (WebCore::RenderObject::localToContainerPoint):
743         (WebCore::RenderObject::container):
744         (WebCore::RenderObject::willBeDestroyed):
745         (WebCore::RenderObject::isComposited):
746         * rendering/RenderObject.h:
747         (WebCore):
748         (WebCore::RenderObject::isLayerModelObject):
749         (RenderObject):
750         (WebCore::RenderObject::selectionRectForRepaint):
751         (WebCore::RenderObject::outlineBoundsForRepaint):
752         * rendering/RenderReplaced.cpp:
753         (WebCore::RenderReplaced::selectionRectForRepaint):
754         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
755         * rendering/RenderReplaced.h:
756         (RenderReplaced):
757         * rendering/RenderSelectionInfo.h:
758         (WebCore::RenderSelectionInfoBase::repaintContainer):
759         (RenderSelectionInfoBase):
760         * rendering/RenderTableCell.cpp:
761         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
762         (WebCore::RenderTableCell::computeRectForRepaint):
763         * rendering/RenderTableCell.h:
764         (RenderTableCell):
765         * rendering/RenderTableCol.cpp:
766         (WebCore::RenderTableCol::clippedOverflowRectForRepaint):
767         * rendering/RenderTableCol.h:
768         (RenderTableCol):
769         * rendering/RenderTableRow.cpp:
770         (WebCore::RenderTableRow::clippedOverflowRectForRepaint):
771         * rendering/RenderTableRow.h:
772         (RenderTableRow):
773         * rendering/RenderText.cpp:
774         (WebCore::RenderText::clippedOverflowRectForRepaint):
775         (WebCore::RenderText::selectionRectForRepaint):
776         * rendering/RenderText.h:
777         (RenderText):
778         * rendering/RenderLayerModelObject.cpp: Added.
779         (WebCore):
780         (WebCore::RenderLayerModelObject::RenderLayerModelObject):
781         (WebCore::RenderLayerModelObject::~RenderLayerModelObject):
782         (WebCore::RenderLayerModelObject::destroyLayer):
783         (WebCore::RenderLayerModelObject::ensureLayer):
784         (WebCore::RenderLayerModelObject::hasSelfPaintingLayer):
785         (WebCore::RenderLayerModelObject::willBeDestroyed):
786         (WebCore::RenderLayerModelObject::styleWillChange):
787         (WebCore::RenderLayerModelObject::styleDidChange):
788         * rendering/RenderLayerModelObject.h: Added.
789         (WebCore):
790         (RenderLayerModelObject):
791         (WebCore::RenderLayerModelObject::layer):
792         (WebCore::RenderLayerModelObject::updateFromStyle):
793         (WebCore::toRenderLayerModelObject):
794         * rendering/RenderView.cpp:
795         (WebCore::RenderView::mapLocalToContainer):
796         (WebCore::RenderView::pushMappingToContainer):
797         (WebCore::isComposited):
798         (WebCore::RenderView::computeRectForRepaint):
799         (WebCore::RenderView::absoluteRects):
800         (WebCore::RenderView::absoluteQuads):
801         (WebCore::RenderView::selectionBounds):
802         (WebCore::RenderView::setSelection):
803         (WebCore::RenderView::clearSelection):
804         * rendering/RenderView.h:
805         (RenderView):
806         * rendering/RenderingAllInOne.cpp:
807         * rendering/svg/RenderSVGBlock.cpp:
808         (WebCore::RenderSVGBlock::updateFromStyle):
809         * rendering/svg/RenderSVGBlock.h:
810         (RenderSVGBlock):
811         * rendering/svg/RenderSVGForeignObject.cpp:
812         (WebCore::RenderSVGForeignObject::clippedOverflowRectForRepaint):
813         (WebCore::RenderSVGForeignObject::computeFloatRectForRepaint):
814         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
815         (WebCore::RenderSVGForeignObject::pushMappingToContainer):
816         * rendering/svg/RenderSVGForeignObject.h:
817         (RenderSVGForeignObject):
818         * rendering/svg/RenderSVGGradientStop.h:
819         * rendering/svg/RenderSVGHiddenContainer.h:
820         * rendering/svg/RenderSVGInline.cpp:
821         (WebCore::RenderSVGInline::clippedOverflowRectForRepaint):
822         (WebCore::RenderSVGInline::computeFloatRectForRepaint):
823         (WebCore::RenderSVGInline::mapLocalToContainer):
824         (WebCore::RenderSVGInline::pushMappingToContainer):
825         * rendering/svg/RenderSVGInline.h:
826         (RenderSVGInline):
827         * rendering/svg/RenderSVGModelObject.cpp:
828         (WebCore::RenderSVGModelObject::clippedOverflowRectForRepaint):
829         (WebCore::RenderSVGModelObject::computeFloatRectForRepaint):
830         (WebCore::RenderSVGModelObject::mapLocalToContainer):
831         (WebCore::RenderSVGModelObject::pushMappingToContainer):
832         (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
833         * rendering/svg/RenderSVGModelObject.h:
834         (RenderSVGModelObject):
835         * rendering/svg/RenderSVGRoot.cpp:
836         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
837         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
838         (WebCore::RenderSVGRoot::mapLocalToContainer):
839         (WebCore::RenderSVGRoot::pushMappingToContainer):
840         * rendering/svg/RenderSVGRoot.h:
841         (RenderSVGRoot):
842         * rendering/svg/RenderSVGText.cpp:
843         (WebCore::RenderSVGText::clippedOverflowRectForRepaint):
844         (WebCore::RenderSVGText::computeRectForRepaint):
845         (WebCore::RenderSVGText::computeFloatRectForRepaint):
846         (WebCore::RenderSVGText::mapLocalToContainer):
847         (WebCore::RenderSVGText::pushMappingToContainer):
848         * rendering/svg/RenderSVGText.h:
849         (RenderSVGText):
850         * rendering/svg/SVGRenderSupport.cpp:
851         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
852         (WebCore::SVGRenderSupport::computeFloatRectForRepaint):
853         (WebCore::SVGRenderSupport::mapLocalToContainer):
854         (WebCore::SVGRenderSupport::pushMappingToContainer):
855         * rendering/svg/SVGRenderSupport.h:
856         (WebCore):
857         (SVGRenderSupport):
858
859 2012-10-01  Stephen Chenney  <schenney@chromium.org>
860
861         Refactor WebCore::FontData handling to clarify pointer ownership
862         https://bugs.webkit.org/show_bug.cgi?id=95866
863
864         Reviewed by Eric Seidel.
865
866         This patch makes all FontData and derived classes ref-counted in all
867         code paths that lead to caching or other retention of a
868         pointer. The goal is to avert crashes and memory leaks, and to bring
869         the code more in line with current WebKit practices.
870
871         Specifically, this patch allows us to use ref pointers for all the
872         FontData stored in FontFallbackList objects. The FontFallbackList can
873         then own custom font data and manage its lifetime (forthcoming patch).
874         Currently Document owns custom font data and does an end run around
875         FontFallbackList in deleting glyph pages and custom font data, leaving
876         FontFallbackList with invalid pointers.
877
878         All FontData derived classes have been switched to use static create
879         methods with private constructors.
880
881         All caches that hold FontData now use RefPtrs.
882
883         All methods that construct new font data now return PassRefPtr, with the
884         exception of code only used to generate temporary data for text run layout.
885
886         All methods that handle FontData in a call stack that passes through
887         FontFallbackList::fontDataAt return PassRefPtr.
888
889         Performance tested with both WebKit Perf-o-matic, which showed
890         performance changes in the noise, and Chrome's page cycling tests with
891         the acid3 benchmark set, which showed no performance difference at all.
892
893         No new tests as this is refactoring code only and has no impact on functionality.
894
895         * css/CSSFontFace.cpp:
896         (WebCore::CSSFontFace::getFontData):
897         * css/CSSFontFace.h:
898         (CSSFontFace):
899         * css/CSSFontFaceSource.cpp:
900         (WebCore::CSSFontFaceSource::getFontData):
901         * css/CSSFontFaceSource.h:
902         (CSSFontFaceSource):
903         * css/CSSFontSelector.cpp:
904         (WebCore::fontDataForGenericFamily):
905         (WebCore::CSSFontSelector::getFontData):
906         * css/CSSFontSelector.h:
907         * css/CSSSegmentedFontFace.cpp:
908         (WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading):
909         (WebCore::CSSSegmentedFontFace::getFontData):
910         * css/CSSSegmentedFontFace.h:
911         (CSSSegmentedFontFace):
912         * dom/Document.cpp:
913         (WebCore::Document::registerCustomFont):
914         * dom/Document.h:
915         (Document):
916         * platform/graphics/Font.h:
917         (WebCore):
918         * platform/graphics/FontCache.cpp:
919         (WebCore):
920         (WebCore::FontCache::getCachedFontData):
921         (WebCore::FontCache::getNonRetainedLastResortFallbackFont):
922         (WebCore::FontCache::releaseFontData):
923         (WebCore::FontCache::purgeInactiveFontData):
924         (WebCore::FontCache::getFontData):
925         * platform/graphics/FontCache.h:
926         (FontCache):
927         * platform/graphics/FontData.h:
928         * platform/graphics/FontFallbackList.cpp:
929         (WebCore::FontFallbackList::releaseFontData):
930         (WebCore::FontFallbackList::fontDataAt):
931         (WebCore::FontFallbackList::setPlatformFont):
932         * platform/graphics/FontFallbackList.h:
933         (FontFallbackList):
934         * platform/graphics/FontFastPath.cpp:
935         (WebCore::Font::glyphDataAndPageForCharacter):
936         * platform/graphics/FontSelector.h:
937         (FontSelector):
938         * platform/graphics/GlyphPageTreeNode.cpp:
939         (WebCore::GlyphPageTreeNode::initializePage):
940         * platform/graphics/SegmentedFontData.cpp:
941         (WebCore::SegmentedFontData::fontDataForCharacter):
942         * platform/graphics/SegmentedFontData.h:
943         (WebCore::FontDataRange::FontDataRange):
944         (WebCore::FontDataRange::fontData):
945         (FontDataRange):
946         (WebCore::SegmentedFontData::create):
947         (SegmentedFontData):
948         (WebCore::SegmentedFontData::SegmentedFontData):
949         * platform/graphics/SimpleFontData.cpp:
950         (WebCore::SimpleFontData::verticalRightOrientationFontData):
951         (WebCore::SimpleFontData::uprightOrientationFontData):
952         (WebCore::SimpleFontData::brokenIdeographFontData):
953         * platform/graphics/SimpleFontData.h:
954         (WebCore::SimpleFontData::create):
955         (SimpleFontData):
956         (WebCore::SimpleFontData::variantFontData):
957         (DerivedFontData):
958         * platform/graphics/chromium/FontCacheAndroid.cpp:
959         (WebCore::FontCache::getFontDataForCharacters):
960         (WebCore::FontCache::getSimilarFontPlatformData):
961         (WebCore::FontCache::getLastResortFallbackFont):
962         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
963         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
964         (GetLastResortFallbackFontProcData):
965         (WebCore::FontCache::getFontDataForCharacters):
966         (WebCore::FontCache::getSimilarFontPlatformData):
967         (WebCore::FontCache::getLastResortFallbackFont):
968         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
969         (WebCore::SimpleFontData::createScaledFontData):
970         (WebCore::SimpleFontData::smallCapsFontData):
971         (WebCore::SimpleFontData::emphasisMarkFontData):
972         * platform/graphics/freetype/FontCacheFreeType.cpp:
973         (WebCore::FontCache::getFontDataForCharacters):
974         (WebCore::FontCache::getSimilarFontPlatformData):
975         (WebCore::FontCache::getLastResortFallbackFont):
976         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
977         (WebCore::SimpleFontData::createScaledFontData):
978         (WebCore::SimpleFontData::smallCapsFontData):
979         (WebCore::SimpleFontData::emphasisMarkFontData):
980         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
981         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
982         * platform/graphics/mac/FontCacheMac.mm:
983         (WebCore::FontCache::getFontDataForCharacters):
984         (WebCore::FontCache::getSimilarFontPlatformData):
985         (WebCore::FontCache::getLastResortFallbackFont):
986         * platform/graphics/mac/FontComplexTextMac.cpp:
987         (WebCore::Font::fontDataForCombiningCharacterSequence):
988         * platform/graphics/mac/SimpleFontDataMac.mm:
989         (WebCore::SimpleFontData::platformDestroy):
990         (WebCore::SimpleFontData::createScaledFontData):
991         (WebCore::SimpleFontData::smallCapsFontData):
992         (WebCore::SimpleFontData::emphasisMarkFontData):
993         * platform/graphics/pango/FontCachePango.cpp:
994         (WebCore::FontCache::getFontDataForCharacters):
995         (WebCore::FontCache::getSimilarFontPlatformData):
996         (WebCore::FontCache::getLastResortFallbackFont):
997         * platform/graphics/pango/SimpleFontDataPango.cpp:
998         (WebCore::SimpleFontData::createScaledFontData):
999         (WebCore::SimpleFontData::smallCapsFontData):
1000         (WebCore::SimpleFontData::emphasisMarkFontData):
1001         * platform/graphics/qt/FontCacheQt.cpp:
1002         (WebCore::FontCache::getFontDataForCharacters):
1003         (WebCore::FontCache::getSimilarFontPlatformData):
1004         (WebCore::FontCache::getLastResortFallbackFont):
1005         * platform/graphics/qt/SimpleFontDataQt.cpp:
1006         (WebCore::SimpleFontData::createScaledFontData):
1007         (WebCore::SimpleFontData::smallCapsFontData):
1008         (WebCore::SimpleFontData::emphasisMarkFontData):
1009         * platform/graphics/skia/FontCacheSkia.cpp:
1010         (WebCore::FontCache::getFontDataForCharacters):
1011         (WebCore::FontCache::getSimilarFontPlatformData):
1012         (WebCore::FontCache::getLastResortFallbackFont):
1013         * platform/graphics/skia/SimpleFontDataSkia.cpp:
1014         (WebCore::SimpleFontData::createScaledFontData):
1015         (WebCore::SimpleFontData::smallCapsFontData):
1016         (WebCore::SimpleFontData::emphasisMarkFontData):
1017         * platform/graphics/win/FontCacheWin.cpp:
1018         (WebCore::FontCache::getFontDataForCharacters):
1019         (WebCore::FontCache::getSimilarFontPlatformData):
1020         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
1021         (WebCore::FontCache::getLastResortFallbackFont):
1022         * platform/graphics/win/SimpleFontDataWin.cpp:
1023         (WebCore::SimpleFontData::createScaledFontData):
1024         (WebCore::SimpleFontData::smallCapsFontData):
1025         (WebCore::SimpleFontData::emphasisMarkFontData):
1026         * platform/graphics/wince/FontCacheWinCE.cpp:
1027         (WebCore::FontCache::getFontDataForCharacters):
1028         (WebCore::FontCache::getSimilarFontPlatformData):
1029         (WebCore::FontCache::getLastResortFallbackFont):
1030         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
1031         (WebCore::SimpleFontData::createScaledFontData):
1032         (WebCore::SimpleFontData::smallCapsFontData):
1033         (WebCore::SimpleFontData::emphasisMarkFontData):
1034         * platform/graphics/wx/FontCacheWx.cpp:
1035         (WebCore::FontCache::getFontDataForCharacters):
1036         (WebCore::FontCache::getSimilarFontPlatformData):
1037         (WebCore::FontCache::getLastResortFallbackFont):
1038         * platform/graphics/wx/SimpleFontDataWx.cpp:
1039         (WebCore::SimpleFontData::createScaledFontData):
1040         (WebCore::SimpleFontData::smallCapsFontData):
1041         (WebCore::SimpleFontData::emphasisMarkFontData):
1042
1043 2012-10-01  Ryosuke Niwa  <rniwa@webkit.org>
1044
1045         Turn forbidEventDispatch and allowEventDispatch into a RAII object
1046         https://bugs.webkit.org/show_bug.cgi?id=96717
1047
1048         Reviewed by Abhishek Arya.
1049
1050         Replaced forbidEventDispatch and allowEventDispatch by AssertNoEventDispatch.
1051
1052         * dom/ContainerNode.cpp:
1053         (WebCore):
1054         (WebCore::ContainerNode::insertBeforeCommon):
1055         (WebCore::ContainerNode::replaceChild):
1056         (WebCore::ContainerNode::removeBetween):
1057         (WebCore::ContainerNode::removeChildren):
1058         (WebCore::ContainerNode::appendChild):
1059         (WebCore::ContainerNode::parserAddChild):
1060         (WebCore::dispatchChildInsertionEvents):
1061         (WebCore::dispatchChildRemovalEvents):
1062         * dom/ContainerNode.h:
1063         (AssertNoEventDispatch):
1064         (WebCore::AssertNoEventDispatch::AssertNoEventDispatch):
1065         (WebCore::AssertNoEventDispatch::~AssertNoEventDispatch):
1066         (WebCore::AssertNoEventDispatch::isEventDispatchForbidden):
1067         (WebCore):
1068         * dom/ContainerNodeAlgorithms.h:
1069         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
1070         (WebCore::ChildNodeInsertionNotifier::notify):
1071         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
1072         * dom/Document.cpp:
1073         (WebCore::Document::dispatchWindowEvent):
1074         (WebCore::Document::dispatchWindowLoadEvent):
1075         * dom/EventDispatcher.cpp:
1076         (WebCore::EventDispatcher::dispatchEvent):
1077         * dom/EventTarget.cpp:
1078         (WebCore):
1079         (WebCore::EventTarget::fireEventListeners):
1080         * dom/EventTarget.h:
1081         (WebCore):
1082         * dom/Node.cpp:
1083         (WebCore::Node::dispatchSubtreeModifiedEvent):
1084         (WebCore::Node::dispatchFocusInEvent):
1085         (WebCore::Node::dispatchFocusOutEvent):
1086         (WebCore::Node::dispatchDOMActivateEvent):
1087         * dom/WebKitNamedFlow.cpp:
1088         (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
1089         * html/HTMLMediaElement.cpp:
1090         (WebCore::HTMLMediaElement::loadInternal):
1091
1092 2012-10-01  Anders Carlsson  <andersca@apple.com>
1093
1094         Would like a way to customize the type of GraphicsLayers created on a per page basis
1095         https://bugs.webkit.org/show_bug.cgi?id=98051
1096
1097         Reviewed by Simon Fraser.
1098
1099         Add a GraphicsLayerFactory abstract class and a new GraphicsLayer::create overload that takes
1100         a factory object. Eventually, all calls to the old GraphicsLayer::create will be replaced with
1101         the new version that takes an optional factory.
1102
1103         * WebCore.xcodeproj/project.pbxproj:
1104         * platform/graphics/GraphicsLayer.h:
1105         (WebCore):
1106         (GraphicsLayer):
1107         * platform/graphics/GraphicsLayerFactory.h: Added.
1108         (WebCore):
1109         (GraphicsLayerFactory):
1110         (WebCore::GraphicsLayerFactory::~GraphicsLayerFactory):
1111         * platform/graphics/ca/GraphicsLayerCA.cpp:
1112         (WebCore::GraphicsLayer::create):
1113         (WebCore):
1114
1115 2012-10-01  Adam Klein  <adamk@chromium.org>
1116
1117         Consolidate more MutationObserverRegistration logic in Node
1118         https://bugs.webkit.org/show_bug.cgi?id=98058
1119
1120         Reviewed by Ryosuke Niwa.
1121
1122         One remaining oddity of Node's MutationObserver-related interface was
1123         that registerMutationObserver returned the resulting MutationObserverRegistration
1124         object.
1125
1126         Instead, Node now internally handles resetting the observation
1127         if the registration already exists, and updating the Document's list of
1128         mutation observer types.
1129
1130         No change in behavior, refactoring only.
1131
1132         * dom/MutationObserver.cpp:
1133         (WebCore::MutationObserver::observe): Simplified to just call
1134         Node::registerMutationObserver; nothing else is needed.
1135         * dom/MutationObserverRegistration.cpp:
1136         (WebCore::MutationObserverRegistration::create): Take options and attributeFilter,
1137         avoiding an unnecessary call to resetObservation().
1138         (WebCore::MutationObserverRegistration::MutationObserverRegistration): ditto
1139         * dom/MutationObserverRegistration.h:
1140         (MutationObserverRegistration):
1141         * dom/Node.cpp:
1142         (WebCore::Node::registerMutationObserver): Handle observation
1143         resetting if that observer's already registered, and update the list
1144         of active MutationObserver types in the Document.
1145         * dom/Node.h:
1146         (Node):
1147
1148 2012-10-01  Glenn Adams  <glenn@skynav.com>
1149
1150         YYDEBUG doesn't print token values
1151         https://bugs.webkit.org/show_bug.cgi?id=97896
1152
1153         Reviewed by Simon Fraser.
1154
1155         Define YYPRINT macro to print token values when YYDEBUG is set.
1156
1157         No new tests. For CSS lexer/parser debug usage only.
1158
1159         * css/CSSGrammar.y:
1160         Define YYPRINT macro to output IDENT and STRING typed tokens. Others can be added
1161         in the future.
1162
1163 2012-10-01  Jochen Eisinger  <jochen@chromium.org>
1164
1165         [chromium] ASSERT that the embedder has set a default locale
1166         https://bugs.webkit.org/show_bug.cgi?id=98001
1167
1168         Reviewed by Adam Barth.
1169
1170         The callsites assume that the default language is always defined, e.g.
1171         Document::getCachedLocalizer. Add an ASSERT() statement so an embedder
1172         doesn't have to guess what they did wrong.
1173
1174         * platform/chromium/LanguageChromium.cpp:
1175         (WebCore::platformLanguage):
1176
1177 2012-10-01  Christophe Dumez  <christophe.dumez@intel.com>
1178
1179         Fix compilation warnings
1180         https://bugs.webkit.org/show_bug.cgi?id=98020
1181
1182         Reviewed by Gyuyoung Kim.
1183
1184         Fix compilation warnings in PluginView code.
1185
1186         No new tests, no behavior change.
1187
1188         * plugins/PluginView.cpp:
1189         (WebCore::PluginView::newStream):
1190         (WebCore::PluginView::write):
1191         (WebCore::PluginView::getAuthenticationInfo):
1192         * plugins/efl/PluginViewEfl.cpp:
1193         (WebCore::PluginView::setNPWindowRect):
1194         (WebCore::PluginView::invalidateRegion):
1195
1196 2012-10-01  Arpita Bahuguna  <arpitabahuguna@gmail.com>
1197
1198         RenderBlock incorrectly calculates pref width when a replaced object follows a RenderInline with width
1199         https://bugs.webkit.org/show_bug.cgi?id=84624
1200
1201         Reviewed by Levi Weintraub.
1202
1203         For the specific scenario, wherein an inline replaced element (image)
1204         follows an inline flow object within a render block, we should allow
1205         for that block to grow to accomodate the replaced element so as to
1206         avoid it's overflow.
1207
1208         This quirk is handled well by other browsers.
1209
1210         Test: fast/block/block-with-inline-replaced-child.html
1211
1212         * rendering/RenderBlock.cpp:
1213         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1214         We should not cause our line to break for the scenario wherein an inline
1215         replaced element follows an inline flow object.
1216
1217         For handling the same have introduced a flag: isPrevChildInlineFlow which
1218         shall be set for an inline flow element.
1219         Based on this, while handling the inline replaced elements, we either
1220         terminate the line (for minWidth calculation) or not depending upon
1221         this flag.
1222
1223 2012-10-01  Yury Semikhatsky  <yurys@chromium.org>
1224
1225         Unreviewed. Chromium build fix.
1226
1227         * bindings/v8/V8DOMMap.h: included Node.h as reportMemoryUsage now uses Node definition.
1228
1229 2012-10-01  Yury Semikhatsky  <yurys@chromium.org>
1230
1231         Web Inspector: provide memory instrumentation for HashMap
1232         https://bugs.webkit.org/show_bug.cgi?id=98005
1233
1234         Reviewed by Pavel Feldman.
1235
1236         Updated all call sites of MemoryInstrumentation::addHashMap to use generic
1237         method of reporting memory footprint instead. 
1238
1239         * bindings/v8/ScopedDOMDataStore.cpp:
1240         * bindings/v8/V8Binding.cpp:
1241         (WebCore::StringCache::reportMemoryUsage):
1242         * bindings/v8/V8DOMMap.h:
1243         * bindings/v8/V8PerIsolateData.cpp:
1244         (WebCore::V8PerIsolateData::reportMemoryUsage):
1245         * css/CSSImageGeneratorValue.cpp:
1246         (WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
1247         * css/PropertySetCSSStyleDeclaration.cpp:
1248         (WebCore::PropertySetCSSStyleDeclaration::reportMemoryUsage):
1249         * css/StyleResolver.cpp:
1250         (WebCore::StyleResolver::collectMatchingRulesForList):
1251         * css/StyleSheetContents.cpp:
1252         (WebCore::StyleSheetContents::reportMemoryUsage):
1253         * dom/Document.cpp:
1254         (WebCore::Document::reportMemoryUsage):
1255         * loader/DocumentLoader.cpp:
1256         (WebCore::DocumentLoader::reportMemoryUsage):
1257         * loader/cache/CachedResourceLoader.cpp:
1258         (WebCore::CachedResourceLoader::reportMemoryUsage):
1259         * loader/cache/MemoryCache.cpp:
1260         (WebCore::MemoryCache::reportMemoryUsage):
1261         * platform/network/ResourceRequestBase.cpp:
1262         (WebCore::ResourceRequestBase::reportMemoryUsage):
1263         * platform/network/ResourceResponseBase.cpp:
1264         (WebCore::ResourceResponseBase::reportMemoryUsage):
1265         * rendering/style/StyleRareNonInheritedData.cpp:
1266
1267 2012-10-01  Yury Semikhatsky  <yurys@chromium.org>
1268
1269         Put implementation details of StyleBuilder.cpp into anonymous namespace
1270         https://bugs.webkit.org/show_bug.cgi?id=98028
1271
1272         Reviewed by Pavel Feldman.
1273
1274         All types that are declared and used only inside StyleBuilder were moved
1275         into anonymous namespace to avoid name conflicts with the rest of WebCore.
1276
1277         * css/StyleBuilder.cpp:
1278         (WebCore::StyleBuilder::StyleBuilder): renamed BorderImageType::Image into BorderImageType::BorderImage
1279         as otherwise there is an ambiguity at placess where setPropertyHandler is called.
1280
1281 2012-10-01  Andrei Bucur  <abucur@adobe.com>
1282
1283         [CSS Regions] Remove the deprecated API Document.webkitGetFlowByName
1284         https://bugs.webkit.org/show_bug.cgi?id=97657
1285
1286         Reviewed by Andreas Kling.
1287
1288         The Document.getFlowByName() API has been deprecated in favor of the NamedFlowCollection.namedItem(DOMString).
1289         Link to spec: http://www.w3.org/TR/css3-regions/#the-namedflow-interface
1290
1291         Tests: The old tests have been adapted to use the new API.
1292
1293         * dom/Document.cpp:
1294         (WebCore):
1295         * dom/Document.h:
1296         (Document):
1297         * dom/Document.idl:
1298
1299 2012-09-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
1300
1301         Make sure that the history position is applied correctly when using delegatesScrolling
1302         https://bugs.webkit.org/show_bug.cgi?id=97778
1303
1304         Reviewed by Kenneth Rohde Christiansen.
1305
1306         The position is applied asynchronously and the UI process is the one holding the current
1307         state. For this reason we can't rely in WebCore on ScrollView::scrollPosition holding
1308         the current position in that case.
1309
1310         * page/Page.cpp:
1311         (WebCore::Page::setPageScaleFactor):
1312
1313 2012-09-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
1314
1315         [Qt] Decide when to apply a scrolled position to the viewport based on the rect covered by the tiles
1316         https://bugs.webkit.org/show_bug.cgi?id=97777
1317
1318         Reviewed by Kenneth Rohde Christiansen.
1319
1320         * platform/graphics/TiledBackingStore.cpp:
1321         (WebCore::TiledBackingStore::createTiles):
1322         * platform/graphics/TiledBackingStore.h:
1323         (WebCore::TiledBackingStore::coverRect):
1324         (WebCore::TiledBackingStore::setCoverRect):
1325         (TiledBackingStore):
1326
1327 2012-10-01  Carlos Garcia Campos  <cgarcia@igalia.com>
1328
1329         Unreviewed. Fix make distcheck.
1330
1331         * GNUmakefile.list.am: ClipPathOperation.h was moved.
1332
1333 2012-10-01  Arko Saha  <arko@motorola.com>
1334
1335         Microdata: names.item() must return null for out of range indexes.
1336         https://bugs.webkit.org/show_bug.cgi?id=97898
1337
1338         Reviewed by Kentaro Hara.
1339
1340         DOMStringList.item() must return null for an invalid index.
1341         Spec: http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList
1342         Removed [IsIndex] extended IDL attribute from item() method's index
1343         parameter in DOMStringList interface.
1344         Firefox and Opera's behavior is consistent with the spec. Both
1345         returns null for invalid index.
1346
1347         Test: fast/dom/MicroData/names-item-out-of-range-index.html
1348
1349         * dom/DOMStringList.idl:
1350
1351 2012-10-01  Yoshifumi Inoue  <yosin@chromium.org>
1352
1353         [Forms] Multiple fields week input UI
1354         https://bugs.webkit.org/show_bug.cgi?id=97877
1355
1356         Reviewed by Kent Tamura.
1357
1358         This patch introduces multiple fields "week" input UI in DRT. We'll
1359         enable this feature once we add tests.
1360
1361         Note: This patch affects ports which enable both ENABLE_INPUT_TYPE_WEEK
1362         and ENABLE_INPUT_MULTIPLE_FIELDS_UI.
1363
1364         No new tests. To reduce size of this patch, other patches add tests
1365         for multiple fields week input UI.
1366
1367         Note: Actual outputs of two tests
1368           - fast/forms/week/week-input-visible-string.html
1369           - fast/forms/week/week-stepup-stepdown-from-renderer.html
1370         are different.
1371
1372         * css/thml.css:
1373         (input::-webkit-datetime-edit-week-field): Added for field appearance.
1374         (input::-webkit-datetime-edit-week-field:focus): Added to remove focus ring.
1375         * html/WeekInputType.cpp:
1376         (WebCore::WeekInputType::formatDateTimeFieldsState): Added to format numeric value to string value as specified in HTML5 specification.
1377         (WebCore::WeekInputType::setupLayoutParameters):  Added to set layout of multiple fields.
1378         * html/WeekInputType.h: Changed to include BaseMultipleFieldsDateAndTimeInputType.h and introduce BaseWeekInputType typedef.
1379         (WebCore::WeekInputType::WeekInputType): Changed base class name to BaseWeekInputType.
1380         (WeekInputType): Changed to add declarations for formatDateTimeFieldsState() and setupLayoutParameters().
1381         * html/shadow/DateTimeEditElement.cpp:
1382         (WebCore::DateTimeEditBuilder::visitField): Changed to support week field.
1383
1384 2012-10-01  Pavel Feldman  <pfeldman@chromium.org>
1385
1386         Web Inspector: do not use InspectorInstrumentation::hasFrontends() check when collecting stacks
1387         https://bugs.webkit.org/show_bug.cgi?id=96730
1388
1389         Reviewed by Vsevolod Vlasov.
1390
1391         - Introduced InspectorInstrumentation::console|timeline|runtime|canvasAgentEnabled
1392         - Using it all over the place instead of the hasFrontend (the latter is now only used once to guard hot path)
1393         - Introduced explicit "enabled" state of the console and runtime agents
1394
1395         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1396         (WebCore::JSHTMLCanvasElement::getContext):
1397         * bindings/js/JSMainThreadExecState.h:
1398         (WebCore::JSMainThreadExecState::instrumentFunctionCall):
1399         * bindings/js/ScheduledAction.cpp:
1400         (WebCore::ScheduledAction::create):
1401         * bindings/js/ScriptCallStackFactory.cpp:
1402         (WebCore::createScriptCallStackForConsole):
1403         * bindings/js/ScriptCallStackFactory.h:
1404         (WebCore):
1405         * bindings/scripts/CodeGeneratorJS.pm:
1406         (GenerateCallWith):
1407         * bindings/scripts/CodeGeneratorV8.pm:
1408         (GenerateCallWith):
1409         * bindings/scripts/test/JS/JSTestObj.cpp:
1410         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
1411         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
1412         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
1413         * bindings/scripts/test/V8/V8TestObj.cpp:
1414         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter):
1415         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter):
1416         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackCallback):
1417         * bindings/v8/ScriptCallStackFactory.cpp:
1418         (WebCore::createScriptCallStackForConsole):
1419         * bindings/v8/ScriptCallStackFactory.h:
1420         (WebCore):
1421         * bindings/v8/ScriptController.cpp:
1422         (WebCore::ScriptController::callFunctionWithInstrumentation):
1423         * bindings/v8/V8DOMWindowShell.cpp:
1424         (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
1425         * bindings/v8/V8WorkerContextEventListener.cpp:
1426         (WebCore::V8WorkerContextEventListener::callListenerFunction):
1427         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1428         (WebCore::WindowSetTimeoutImpl):
1429         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1430         (WebCore::V8HTMLCanvasElement::getContextCallback):
1431         * bindings/v8/custom/V8WorkerContextCustom.cpp:
1432         (WebCore::SetTimeoutOrInterval):
1433         * inspector/Inspector.json:
1434         * inspector/InspectorConsoleAgent.cpp:
1435         (WebCore):
1436         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
1437         (WebCore::InspectorConsoleAgent::enable):
1438         (WebCore::InspectorConsoleAgent::disable):
1439         (WebCore::InspectorConsoleAgent::clearMessages):
1440         (WebCore::InspectorConsoleAgent::clearFrontend):
1441         (WebCore::InspectorConsoleAgent::addConsoleMessage):
1442         * inspector/InspectorConsoleAgent.h:
1443         (WebCore::InspectorConsoleAgent::enabled):
1444         (InspectorConsoleAgent):
1445         * inspector/InspectorController.cpp:
1446         (WebCore::InspectorController::connectFrontend):
1447         (WebCore::InspectorController::disconnectFrontend):
1448         * inspector/InspectorInstrumentation.cpp:
1449         (WebCore):
1450         (WebCore::InspectorInstrumentation::canvasAgentEnabled):
1451         (WebCore::InspectorInstrumentation::consoleAgentEnabled):
1452         (WebCore::InspectorInstrumentation::runtimeAgentEnabled):
1453         (WebCore::InspectorInstrumentation::timelineAgentEnabled):
1454         * inspector/InspectorInstrumentation.h:
1455         (InspectorInstrumentation):
1456         (WebCore::InspectorInstrumentation::canvasAgentEnabled):
1457         (WebCore::InspectorInstrumentation::consoleAgentEnabled):
1458         (WebCore::InspectorInstrumentation::runtimeAgentEnabled):
1459         (WebCore::InspectorInstrumentation::timelineAgentEnabled):
1460         * inspector/InspectorRuntimeAgent.cpp:
1461         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
1462         * inspector/InspectorRuntimeAgent.h:
1463         (WebCore::InspectorRuntimeAgent::enabled):
1464         (WebCore::InspectorRuntimeAgent::enable):
1465         (WebCore::InspectorRuntimeAgent::disable):
1466         (InspectorRuntimeAgent):
1467         * inspector/PageRuntimeAgent.cpp:
1468         (PageRuntimeAgentState):
1469         (WebCore::PageRuntimeAgent::clearFrontend):
1470         (WebCore::PageRuntimeAgent::restore):
1471         (WebCore):
1472         (WebCore::PageRuntimeAgent::enable):
1473         (WebCore::PageRuntimeAgent::disable):
1474         (WebCore::PageRuntimeAgent::didClearWindowObject):
1475         (WebCore::PageRuntimeAgent::didCreateIsolatedContext):
1476         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
1477         * inspector/PageRuntimeAgent.h:
1478         (PageRuntimeAgent):
1479         * inspector/WorkerRuntimeAgent.cpp:
1480         * inspector/WorkerRuntimeAgent.h:
1481         * inspector/front-end/RuntimeModel.js:
1482         (WebInspector.RuntimeModel.prototype._didLoadCachedResources):
1483         * page/DOMWindow.cpp:
1484         (WebCore::DOMWindow::postMessage):
1485
1486 2012-10-01  Kenichi Ishibashi  <bashi@chromium.org>
1487
1488         [WebSocket] Setting wrong value to binaryType should not raise exception
1489         https://bugs.webkit.org/show_bug.cgi?id=97999
1490
1491         Reviewed by Yuta Kitamura.
1492
1493         Don't raise exception when binaryType is the wrong value.
1494         Instead, show an error message to console.
1495
1496         No new tests. Updated existing test.
1497
1498         * Modules/websockets/WebSocket.cpp:
1499         (WebCore::WebSocket::setBinaryType): See the description.
1500         * Modules/websockets/WebSocket.h:
1501         (WebSocket): Removed ExceptionCode argument of setBinaryType().
1502         * Modules/websockets/WebSocket.idl:
1503         Removed "setter raises(DOMException)" and "[TreatReturnedNullStringAs=Undefined]".
1504         They are no longer needed.
1505
1506 2012-10-01  Yoshifumi Inoue  <yosin@chromium.org>
1507
1508         [Forms] Adding DateTimeWeekFieldElement for multiple fields "week" input UI
1509         https://bugs.webkit.org/show_bug.cgi?id=97992
1510
1511         Reviewed by Kent Tamura.
1512
1513         This patch introduces DateTimeWeekFieldElement class for implementing
1514         multiple fields "week" input UI.
1515
1516         No new tests. This patch doesn't change behavior.
1517
1518         * html/shadow/DateTimeFieldElements.cpp:
1519         (WebCore::DateTimeWeekFieldElement::DateTimeWeekFieldElement): Added.
1520         (WebCore::DateTimeWeekFieldElement::create): Added.
1521         (WebCore::DateTimeWeekFieldElement::populateDateTimeFieldsState): Added.
1522         (WebCore::DateTimeWeekFieldElement::setValueAsDate): Added.
1523         (WebCore::DateTimeWeekFieldElement::setValueAsDateTimeFieldsState): Added.
1524         * html/shadow/DateTimeFieldElements.h:
1525         (DateTimeWeekFieldElement): Added.
1526         * platform/DateComponents.h:
1527         (WebCore::DateComponents): Added declarations of static const member variables, DateComponents::maximumWeekNumber and minimumWeekNumber.
1528         * platform/DateComponents.cpp: Added definitions of DateComponents::maximumWeekNumber and minimumWeekNumber.
1529         (WebCore::DateComponents::maxWeekNumberInYear): Changed to use maximumWeekNumber.
1530         (WebCore::DateComponents::parseWeek): Changed to use minimumWeekNumber.
1531
1532 2012-09-30  Vsevolod Vlasov  <vsevik@chromium.org>
1533
1534         Web Inspector: Separate CSSStyleModelResourceBinding into resource and content binding.
1535         https://bugs.webkit.org/show_bug.cgi?id=97994
1536
1537         Reviewed by Pavel Feldman.
1538
1539         Extracted StyleContentBinding from CSSStyleModelResourceBinding.
1540         Now CSSStyleModelResourceBinding is responsible for mapping between stylesheets and resources.
1541         StyleContentBinding is now responsible for synchronization between stylesheet content and uiSourceCode content.
1542
1543         * inspector/front-end/CSSStyleModel.js:
1544         (WebInspector.CSSStyleModelResourceBinding):
1545         (WebInspector.CSSStyleModelResourceBinding.prototype.requestStyleSheetIdForResource):
1546         (WebInspector.CSSStyleModelResourceBinding.prototype.requestResourceURLForStyleSheetId):
1547         * inspector/front-end/StyleSource.js:
1548         (WebInspector.StyleSource.prototype._commitIncrementalEdit):
1549         * inspector/front-end/StylesSourceMapping.js:
1550         (WebInspector.StyleContentBinding):
1551         (WebInspector.StyleContentBinding.prototype.setStyleContent.callback):
1552         (WebInspector.StyleContentBinding.prototype.setStyleContent):
1553         (WebInspector.StyleContentBinding.prototype._innerSetContent.callback):
1554         (WebInspector.StyleContentBinding.prototype._innerSetContent):
1555         (WebInspector.StyleContentBinding.prototype._styleSheetChanged.callback):
1556         (WebInspector.StyleContentBinding.prototype._styleSheetChanged):
1557         (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged):
1558         * inspector/front-end/inspector.js:
1559
1560 2012-10-01  Alexander Pavlov  <apavlov@chromium.org>
1561
1562         Web Inspector: [Device Metrics] Remove the gutter overlay moving its functionality into the InspectorOverlay
1563         https://bugs.webkit.org/show_bug.cgi?id=97799
1564
1565         Reviewed by Pavel Feldman.
1566
1567         Re-applying r129746 with test flakiness fixed.
1568
1569         In order to reduce the amount of port-specific code, the gutter overlay painted in the device metrics emulation mode
1570         has been replaced by the respective functionality in the HTML-based InspectorOverlay in WebCore. The InspectorOverlay
1571         now covers the entire WebView rather than the FrameView only.
1572
1573         * inspector/InspectorController.cpp:
1574         (WebCore::InspectorController::webViewResized):
1575         (WebCore):
1576         * inspector/InspectorController.h:
1577         (WebCore):
1578         (InspectorController):
1579         * inspector/InspectorOverlay.cpp:
1580         (WebCore::InspectorOverlay::InspectorOverlay):
1581         (WebCore::InspectorOverlay::paint):
1582         (WebCore::InspectorOverlay::resize):
1583         (WebCore):
1584         (WebCore::InspectorOverlay::update):
1585         (WebCore::InspectorOverlay::drawGutter):
1586         (WebCore::InspectorOverlay::reset):
1587         * inspector/InspectorOverlay.h:
1588         (InspectorOverlay):
1589         * inspector/InspectorOverlayPage.html: Introduce the gutter painting functionality previously found in the Chromium's
1590         DeviceMetricsSupport class, which used to implement WebPageOverlay.
1591
1592 2012-10-01  Carlos Garcia Campos  <cgarcia@igalia.com>
1593
1594         Unreviewed. Fix GTK+ build after r129908.
1595
1596         * GNUmakefile.list.am: Add new files to compilation.
1597
1598 2012-10-01  Philip Rogers  <pdr@google.com>
1599
1600         Remove overzealous assert in SVGElement::localAttributeToPropertyMap
1601         https://bugs.webkit.org/show_bug.cgi?id=97291
1602
1603         Reviewed by Nikolas Zimmermann.
1604
1605         This patch removes an assert where we did not expect
1606         SVGElement::localAttributeToPropertyMap where we did not to be called. This
1607         function turns out to be useful and this patch removes that assert.
1608
1609         If we encounter a non-SVG tag during SVG parsing (e.g. <svg><price></svg>) we return a
1610         vanilla SVGElement instance from SVGElementFactory::createSVGElement. Previously,
1611         trying to animate this would ASSERT because it was not possible to determine the
1612         animated type. After this patch, an empty localAttributeToPropertyMap is used so
1613         that the animated type returned from SVGAnimateElement::determineAnimatedPropertyType
1614         is AnimatedUnknown.
1615
1616         This patch simply removes an ASSERT so no test is provided.
1617
1618         * svg/SVGElement.cpp:
1619         (WebCore::SVGElement::localAttributeToPropertyMap):
1620
1621 2012-10-01  Sheriff Bot  <webkit.review.bot@gmail.com>
1622
1623         Unreviewed, rolling out r130004.
1624         http://trac.webkit.org/changeset/130004
1625         https://bugs.webkit.org/show_bug.cgi?id=97996
1626
1627         Test shadow-dom-modify-chardata.html is failing (Requested by
1628         keishi on #webkit).
1629
1630         * dom/CharacterData.cpp:
1631         (WebCore::CharacterData::dispatchModifiedEvent):
1632
1633 2012-10-01  Keishi Hattori  <keishi@webkit.org>
1634
1635         REGRESSION(r127727): Calendar picker is ignoring step
1636         https://bugs.webkit.org/show_bug.cgi?id=97893
1637
1638         Reviewed by Kent Tamura.
1639
1640         There were two mistakes:
1641         - An if-statement to check step attribute validity was wrong, and
1642         - DateTiemChooserParameters.step was milleseconds when it should be number of days.
1643         This will be changing the DateTimeChooserParameters.step to milliseconds so we can handle steps for other input types in the future.
1644
1645         Test: fast/forms/date/calendar-picker-appearance-with-step.html
1646
1647         * Resources/pagepopups/calendarPicker.js:
1648         (CalendarPicker):
1649         * html/shadow/CalendarPickerElement.cpp:
1650         (WebCore::CalendarPickerElement::openPopup): If statement was wrong.
1651
1652 2012-09-30  Glenn Adams  <glenn@skynav.com>
1653
1654         Sign in front of keyframe selector causes stylesheet parsing to abort
1655         https://bugs.webkit.org/show_bug.cgi?id=96844
1656
1657         Reviewed by Simon Fraser.
1658
1659         Allow optional unary operator (+|-) on PERCENTAGE in keyframe selector.
1660
1661         Test: animations/keyframe-selector-negative-percentage.html
1662
1663         * css/CSSGrammar.y:
1664         Add maybe_unary_operator to PERCENTAGE on keyframe selector. Negative keyframe
1665         selector value is already ignored in StyleKeyframe::parseKeyString.
1666
1667 2012-09-30  MORITA Hajime  <morrita@google.com>
1668
1669         https://bugs.webkit.org/show_bug.cgi?id=97988
1670         Crash on FrameTree::scopedChildCount()
1671
1672         Reviewed by Kent Tamura.
1673
1674         The series of crash reports says that there are some null pointer
1675         access in scopedChildCount(). This change added a null guard
1676         against Frame::document(), that can return null.
1677
1678         No new tests. This is tied to some specific timing and is hard to reproduce.
1679
1680         * page/FrameTree.cpp:
1681         (WebCore::FrameTree::scopedChildCount):
1682         (WebCore::FrameTree::scopedChild):
1683         (WebCore):
1684
1685 2012-09-30  Yoshifumi Inoue  <yosin@chromium.org>
1686
1687         Make multiple fields date/time input UI related files to available all ports
1688         https://bugs.webkit.org/show_bug.cgi?id=97989
1689
1690         Reviewed by Kent Tamura.
1691
1692         This patch adds multiple fields date/time input UI related files for
1693         ports not using WebCore.gyp and simplifies include directive in
1694         MonthInputType.h and TimeInputType.h.
1695
1696         Added files are:
1697           - html/BaseMultipleFieldsDateAndTimeInputType.{cpp,h}
1698           - html/shadow/DateTimeEditElement.{cpp,h}
1699           - html/shadow/DateTimeFieldElement.{cpp,h}
1700           - html/shadow/DateTimeFieldElements.{cpp,h}
1701           - html/shadow/DateTimeNumericFieldElement.{cpp,h}
1702           - html/shadow/DateTimeSymbolicFieldElement.{cpp,h}
1703
1704         No new tests. This patch doesn't change behavior.
1705
1706         * CMakeLists.txt: Changed to add multiple fields date/time input UI related files.
1707         * GNUmakefile.list.am: ditto
1708         * Target.pri: ditto
1709         * WebCore.vcproj/WebCore.vcproj: ditto
1710         * WebCore.xcodeproj/project.pbxproj: ditto
1711         * html/MonthInputType.h: Changed to simplify include directive for base class.
1712         * html/TimeInputType.h: ditto
1713
1714 2012-09-30  Keishi Hattori  <keishi@webkit.org>
1715
1716         Web Inspector: Modifications in a shadow tree don't update the Elements panel.
1717         https://bugs.webkit.org/show_bug.cgi?id=97056
1718
1719         Reviewed by Pavel Feldman.
1720
1721         Send characterDataModified event for shadow dom nodes too so they update the elements panel.
1722
1723         Test: inspector/elements/shadow-dom-modify-chardata.html
1724
1725         * dom/CharacterData.cpp:
1726         (WebCore::CharacterData::dispatchModifiedEvent):
1727
1728 2012-09-30  Andreas Kling  <kling@webkit.org>
1729
1730         Split EventTargetData out of NodeRareData to reduce memory use.
1731         <http://webkit.org/b/97987>
1732         <rdar://problem/12403258>
1733
1734         Reviewed by Anders Carlsson.
1735
1736         Move EventTargetData to its own Node-flag/hashmap instead of piggybacking on NodeRareData.
1737         This reduces memory consumption by 1.06MB on Membuster3. Note that NodeRareData shrinks by
1738         one pointer as well.
1739
1740         * dom/Node.cpp:
1741         (WebCore::Node::~Node):
1742         (WebCore::eventTargetDataMap):
1743         (WebCore::Node::eventTargetData):
1744         (WebCore::Node::ensureEventTargetData):
1745         (WebCore::Node::clearEventTargetData):
1746         (WebCore::Node::handleLocalEvents):
1747         * dom/Node.h:
1748         (WebCore::Node::hasEventTargetData):
1749         (WebCore::Node::setHasEventTargetData):
1750         * dom/NodeRareData.h:
1751         (NodeRareData):
1752
1753 2012-09-30  Andreas Kling  <kling@webkit.org>
1754
1755         444kB below CSSParser::parseDeprecatedGradient() on Membuster3.
1756         <http://webkit.org/b/97981>
1757         <rdar://problem/12403058>
1758
1759         Reviewed by Anders Carlsson.
1760
1761         Slap an inline capacity of 2 on the Vector<CSSGradientColorStop> in CSSGradientValue.
1762         This covers the majority of gradient values, and reduces memory consumption by ~250kB on Membuster3.
1763
1764         * css/CSSGradientValue.h:
1765         (WebCore::CSSGradientValue::stopCount):
1766         * css/CSSParser.cpp:
1767         (WebCore::CSSParser::parseLinearGradient):
1768         (WebCore::CSSParser::parseGradientColorStops):
1769
1770 2012-09-30  Mike West  <mkwst@chromium.org>
1771
1772         Remove FIXME comments refering to non-existent code in JSDOMBinding.cpp
1773         https://bugs.webkit.org/show_bug.cgi?id=97977
1774
1775         Reviewed by Adam Barth.
1776
1777         I did a quick grep through the code to determine where these FIXME
1778         comments were suggesting that code should be merged. So far as I can
1779         tell, 'immediatelyReportUnsafeAccessTo' only exists in these comments.
1780
1781         Just cleanup, no functional change.
1782
1783         * bindings/js/JSDOMBinding.cpp:
1784         (WebCore::shouldAllowAccessToFrame):
1785         (WebCore::shouldAllowAccessToDOMWindow):
1786
1787 2012-09-30  Martin Robinson  <mrobinson@igalia.com>
1788
1789         [TextureMapper] [WebKit2] Crash in WebCore::BitmapTextureGL::updateContents
1790         https://bugs.webkit.org/show_bug.cgi?id=97394
1791
1792         Reviewed by Noam Rosenthal.
1793
1794         When a TextureMapper is destroyed, layers can still contain references
1795         to textures obtained from that TextureMapper's texture pool. Trying to
1796         access an unreffed TextureMapper in the BitmapTexture's destructor
1797         causes a crash.
1798
1799         Instead of storing a raw pointer to a TextureMapper, we can simply store
1800         a reference to the underlying GraphicsContext3D. All TextureMapper
1801         implementations use the current GL context at this moment, so one GC3D
1802         referencing the current context is the same as any other.
1803
1804         * platform/graphics/texmap/TextureMapper.h: Remove the clearTexturePool
1805         method. It's no longer used.
1806         (WebCore::BitmapTexture::applyFilters): Add a TextureMapper* argument.
1807         * platform/graphics/texmap/TextureMapperGL.cpp:
1808         (WebCore::BitmapTextureGL::BitmapTextureGL): Keep a reference to the
1809         GraphicsContext3D instead of the TextureMapper.
1810         (WebCore::BitmapTextureGL::didReset): Use the GC3D reference.
1811         (WebCore::BitmapTextureGL::updateContents): Ditto.
1812         (WebCore::BitmapTextureGL::applyFilters): Accept the TextureMapper as an argument.
1813         (WebCore::BitmapTextureGL::initializeStencil): Use the GC3D reference.
1814         (WebCore::BitmapTextureGL::clearIfNeeded): Ditto.
1815         (WebCore::BitmapTextureGL::createFboIfNeeded): Ditto.
1816         (WebCore::BitmapTextureGL::bind): Accept the TextureMapper as an argument.
1817         (WebCore::BitmapTextureGL::~BitmapTextureGL): Use the GC3D reference.
1818         (WebCore::TextureMapperGL::~TextureMapperGL): Remove the call to clearTexturePool
1819         as it's no longer necessary.
1820         (WebCore::TextureMapperGL::bindSurface): Ditto.
1821         * platform/graphics/texmap/TextureMapperGL.h:
1822         (BitmapTextureGL): Keep a GC3D reference instead of a TextureMapper pointer.
1823         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
1824         (WebCore::BitmapTextureImageBuffer::applyFilters): Add a TextureMapper argument.
1825         * platform/graphics/texmap/TextureMapperImageBuffer.h:
1826         (BitmapTextureImageBuffer):
1827         * platform/graphics/texmap/TextureMapperLayer.cpp:
1828         (WebCore::applyFilters): Ditto.
1829
1830 2012-09-29  Dongwoo Joshua Im  <dw.im@samsung.com>
1831
1832         AsyncFileSystem::openFileSystem should have FileSystemType as a parameter.
1833         https://bugs.webkit.org/show_bug.cgi?id=97963
1834
1835         Reviewed by Gyuyoung Kim.
1836
1837         FileSystemType is an important information to maintain the file system,
1838         and AsyncFileSystem::openFileSystem need to get the type as a parameter.
1839         And, there are "FIXME" comments about that in WebCore source codes.
1840
1841         No new functionality, no new tests.
1842
1843         * Modules/filesystem/LocalFileSystem.cpp: Add FileSystemType as a parameter of AsyncFileSystem::openFileSystem.
1844         (WebCore::openFileSystem):
1845         (WebCore::LocalFileSystem::readFileSystem):
1846         (WebCore::LocalFileSystem::requestFileSystem):
1847         * platform/AsyncFileSystem.cpp: ditto.
1848         (WebCore::AsyncFileSystem::openFileSystem):
1849         * platform/AsyncFileSystem.h: ditto.
1850         (AsyncFileSystem):
1851         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: ditto.
1852         (WebCore::AsyncFileSystem::openFileSystem):
1853         * platform/gtk/AsyncFileSystemGtk.cpp: ditto.
1854         (WebCore::AsyncFileSystem::openFileSystem):
1855
1856 2012-09-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1857
1858         Unreviewed, rolling out r129965.
1859         http://trac.webkit.org/changeset/129965
1860         https://bugs.webkit.org/show_bug.cgi?id=97970
1861
1862         Causes ASSERTs in workers (Requested by abarth on #webkit).
1863
1864         * bindings/v8/DOMData.cpp:
1865         (WebCore::DOMData::getCurrentStore):
1866         * bindings/v8/ScopedPersistent.h:
1867         * bindings/v8/ScriptController.cpp:
1868         (WebCore::ScriptController::resetIsolatedWorlds):
1869         (WebCore::ScriptController::evaluateInIsolatedWorld):
1870         (WebCore::ScriptController::currentWorldContext):
1871         * bindings/v8/V8Binding.cpp:
1872         (WebCore::perContextDataForCurrentWorld):
1873         * bindings/v8/V8DOMWindowShell.cpp:
1874         (WebCore::setIsolatedWorldField):
1875         (WebCore::V8DOMWindowShell::enteredIsolatedWorldContext):
1876         (WebCore::V8DOMWindowShell::destroyIsolatedShell):
1877         (WebCore):
1878         (WebCore::isolatedContextWeakCallback):
1879         (WebCore::V8DOMWindowShell::disposeContext):
1880         (WebCore::V8DOMWindowShell::initializeIfNeeded):
1881         (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
1882         * bindings/v8/V8DOMWindowShell.h:
1883         (V8DOMWindowShell):
1884         (WebCore::V8DOMWindowShell::getEntered):
1885         * bindings/v8/V8DOMWrapper.h:
1886         (WebCore::V8DOMWrapper::getCachedWrapper):
1887         * bindings/v8/WorldContextHandle.cpp:
1888         (WebCore::WorldContextHandle::WorldContextHandle):
1889         * bindings/v8/custom/V8DocumentCustom.cpp:
1890         (WebCore::toV8):
1891         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1892         (WebCore::toV8):
1893         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
1894         (WebCore::toV8):
1895         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
1896         (WebCore::V8XMLHttpRequest::constructorCallback):
1897
1898 2012-09-29  Emil A Eklund  <eae@chromium.org>
1899
1900         Unreviewed build fix for chromium/clank.
1901
1902         * platform/FractionalLayoutUnit.h:
1903         (WebCore::FractionalLayoutUnit::FractionalLayoutUnit):
1904
1905 2012-09-29  Byungwoo Lee  <bw80.lee@samsung.com>
1906
1907         Fix build warning : -Wparentheses.
1908         https://bugs.webkit.org/show_bug.cgi?id=97961
1909
1910         Reviewed by Kentaro Hara.
1911
1912         Explicit braces are added around the && statement to fix -Wparentheses warning.
1913
1914         * mathml/MathMLElement.h:
1915         (WebCore::toMathMLElement):
1916
1917 2012-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1918
1919         Scroll offset of flex items lost during relayout
1920         https://bugs.webkit.org/show_bug.cgi?id=97706
1921
1922         Reviewed by Tony Chang.
1923
1924         Test: fast/flexbox/overflow-keep-scrollpos.html
1925
1926         Flex box does a second pass layout of the flex children.
1927
1928         We layout the child without scrollbars (to get the size
1929         used for flexing), then we relayout the child at its final size.
1930
1931         We must not apply the scroll position during the first pass,
1932         as it will be clamped to 0 (no scrolling possible).
1933
1934         * rendering/RenderBlock.h:
1935         (RenderBlock):
1936
1937         Make updateScrollInfoAfterLayout public
1938
1939         * rendering/RenderFlexibleBox.cpp:
1940         (WebCore::RenderFlexibleBox::layoutBlock):
1941
1942         Delay applying scroll info until we clamp the size of the child
1943         and get scrollbars back again. For this to work we use
1944         RenderBlock::updateScrollInfoAfterLayout instead of the non-guarded
1945         RenderLayer::updateScrollInfoAfterLayout.
1946
1947         * rendering/RenderBlock.cpp:
1948         (WebCore::RenderBlock::updateScrollInfoAfterLayout):
1949
1950         Add workaround for now to keep passing css3/flexbox/child-overflow.html
1951
1952         Basically do not postpone applying scroll changes for RenderBlocks
1953         with opposite writing mode, as they need to have their content
1954         overflow in the right direction.
1955
1956 2012-09-29  Dimitri Glazkov  <dglazkov@chromium.org>
1957
1958         Slightly improve clarity of the patch in bug 78595.
1959         https://bugs.webkit.org/show_bug.cgi?id=97944
1960
1961         Reviewed by Andreas Kling.
1962
1963         Since all types of relations, except SubSelector are effectively ignoring the calculated value of pseudoId, make the code reflect that a bit more clearly. 
1964
1965         No change in behavior, covered by test in bug 78595.
1966
1967         * css/SelectorChecker.cpp:
1968         (WebCore::SelectorChecker::checkSelector): Added ignoreDynamicPseudo value that's given to all callsites that should ignore the result.
1969
1970 2012-09-29  Kent Tamura  <tkent@chromium.org>
1971
1972         Remove LocalizedDate*.*
1973         https://bugs.webkit.org/show_bug.cgi?id=97957
1974
1975         Reviewed by Kentaro Hara.
1976
1977         The functions declared in LocalizedDate.h are replaced with member
1978         functions of Localizer. LocalizedDate.h and its implementations
1979         are not needed any more.
1980
1981         No new tests. This should not change any behavior.
1982
1983         * GNUmakefile.list.am: Remove LocalizedDate.h and LocalizedDateNode.cpp
1984         * WebCore.vcproj/WebCore.vcproj: ditto.
1985         * WebCore.xcodeproj/project.pbxproj: ditto.
1986         * CMakeLists.txt: Remove LocalizedDateNone.cpp
1987         * Target.pri: ditto.
1988         * WebCore.gyp/WebCore.gyp: Remove LocalizedDate*.*. Update a comment.
1989         * WebCore.gypi: Remove LocalizedDate*.*.
1990
1991         * html/BaseDateAndTimeInputType.cpp: Use Localizer functions.
1992         (WebCore::BaseDateAndTimeInputType::localizeValue):
1993         (WebCore::BaseDateAndTimeInputType::convertFromVisibleValue):
1994         * html/DateInputType.cpp: ditto.
1995         (WebCore::DateInputType::fixedPlaceholder):
1996
1997         * platform/text/Localizer.h:
1998         (Localizer): Move comments from LocalziedDate.h.
1999         * platform/text/mac/LocaleMac.mm:
2000         Remove unnecessary include of LocalizedDate.h.
2001
2002         * platform/text/LocalizedDate.h: Removed.
2003         * platform/text/LocalizedDateICU.cpp: Removed.
2004         * platform/text/LocalizedDateNone.cpp: Removed.
2005         * platform/text/LocalizedDateWin.cpp: Removed.
2006         * platform/text/mac/LocalizedDateMac.cpp: Removed.
2007
2008 2012-09-28  Adam Barth  <abarth@webkit.org>
2009
2010         [V8] The concept of forceNewObject is unneeded (dom-traverse gets 3% faster)
2011         https://bugs.webkit.org/show_bug.cgi?id=97943
2012
2013         Reviewed by Kentaro Hara.
2014
2015         We don't need the concept of forceNewObject. It doesn't do anything
2016         useful and it makes the bindings slower.
2017
2018         * bindings/scripts/CodeGeneratorV8.pm:
2019         (GenerateHeader):
2020         (GenerateToV8Converters):
2021         (NativeToJSValue):
2022         * bindings/v8/custom/V8DocumentCustom.cpp:
2023         (WebCore::toV8):
2024         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2025         (WebCore::toV8):
2026         * bindings/v8/custom/V8HTMLElementCustom.cpp:
2027         (WebCore::toV8):
2028         * bindings/v8/custom/V8NodeCustom.cpp:
2029         (WebCore::toV8Slow):
2030         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
2031         (WebCore::toV8):
2032         * bindings/v8/custom/V8SVGElementCustom.cpp:
2033         (WebCore::toV8):
2034         * dom/make_names.pl:
2035         (printWrapperFactoryCppFile):
2036         (printWrapperFactoryHeaderFile):
2037
2038 2012-09-28  Elliott Sprehn  <esprehn@chromium.org>
2039
2040         Allow any kind of v8::Handle in invokeCallback instead of requiring a v8::Persistent.
2041         https://bugs.webkit.org/show_bug.cgi?id=97956
2042
2043         Reviewed by Adam Barth.
2044
2045         Use v8::Handle instead of v8::Persistent for the callback argument on invokeCallback.
2046         There doesn't seem to be any reason for requiring a Persistent, and it makes it harder
2047         to use this API.
2048
2049         This is factored out of http://wkbug.com/93661
2050
2051         No new tests, this is functionally equivalent.
2052
2053         * bindings/v8/V8Callback.cpp:
2054         (WebCore::invokeCallback):
2055         * bindings/v8/V8Callback.h:
2056         (WebCore):
2057
2058 2012-09-28  Anders Carlsson  <andersca@apple.com>
2059
2060         Remove support for method overloading from bridge code
2061         https://bugs.webkit.org/show_bug.cgi?id=97959
2062
2063         Reviewed by Dan Bernstein.
2064
2065         The method overloading handling was only in place for the (now removed) Java bridge. 
2066         Replace MethodList everywhere with a single Method pointer.
2067
2068         * GNUmakefile.am:
2069         * GNUmakefile.list.am:
2070         * WebCore.exp.in:
2071         * bridge/c/c_class.cpp:
2072         (JSC::Bindings::CClass::methodNamed):
2073         * bridge/c/c_class.h:
2074         (CClass):
2075         * bridge/c/c_instance.cpp:
2076         (JSC::Bindings::CRuntimeMethod::create):
2077         (JSC::Bindings::CRuntimeMethod::CRuntimeMethod):
2078         (JSC::Bindings::CInstance::getMethod):
2079         (JSC::Bindings::CInstance::invokeMethod):
2080         * bridge/jsc/BridgeJSC.h:
2081         (Bindings):
2082         (Class):
2083         * bridge/objc/objc_class.h:
2084         (ObjcClass):
2085         * bridge/objc/objc_class.mm:
2086         (JSC::Bindings::ObjcClass::methodNamed):
2087         * bridge/objc/objc_instance.mm:
2088         (ObjCRuntimeMethod::create):
2089         (ObjCRuntimeMethod::ObjCRuntimeMethod):
2090         (ObjcInstance::invokeMethod):
2091         * bridge/qt/qt_class.cpp:
2092         (JSC::Bindings::QtClass::methodNamed):
2093         * bridge/qt/qt_class.h:
2094         (QtClass):
2095         * bridge/qt/qt_instance.cpp:
2096         (JSC::Bindings::QtInstance::getMethod):
2097         * bridge/runtime_method.cpp:
2098         (JSC::RuntimeMethod::RuntimeMethod):
2099         (JSC::RuntimeMethod::lengthGetter):
2100         (JSC::callRuntimeMethod):
2101         * bridge/runtime_method.h:
2102         (JSC::RuntimeMethod::create):
2103         (JSC::RuntimeMethod::method):
2104         (RuntimeMethod):
2105         * bridge/runtime_object.cpp:
2106         (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
2107         (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
2108
2109 2012-09-28  Elliott Sprehn  <esprehn@chromium.org>
2110
2111         Fix compilation of V8DependentRetained and JSDependentRetained.
2112         https://bugs.webkit.org/show_bug.cgi?id=97955
2113
2114         Reviewed by Kentaro Hara.
2115
2116         Fix bad usage of putDirect and removeDirect from JSDependentRetained and fix
2117         incorrect assumptions about how weak handles work in V8. This is refactored
2118         out of the patch on http://wkbug.com/93661
2119
2120         No tests needed, this just fixes the compile and wrong usage of ScopedPersistent.
2121
2122         * bindings/js/JSDependentRetained.h:
2123         (WebCore::JSDependentRetained::JSDependentRetained):
2124         (WebCore::JSDependentRetained::retain):
2125         (WebCore::JSDependentRetained::release):
2126         (JSDependentRetained):
2127         * bindings/v8/V8DependentRetained.h:
2128         (WebCore::V8DependentRetained::V8DependentRetained):
2129         (WebCore::V8DependentRetained::retain):
2130         (WebCore::V8DependentRetained::weakCallback):
2131
2132 2012-09-28  Ojan Vafai  <ojan@chromium.org>
2133
2134         Fix chromium build after http://trac.webkit.org/changeset/129964.
2135         * WebCore.gypi:
2136
2137 2012-09-28  Simon Fraser  <simon.fraser@apple.com>
2138
2139         Crash re-entering Document layout with frame flattening enabled
2140         https://bugs.webkit.org/show_bug.cgi?id=97841
2141
2142         Reviewed by Brady Eidson.
2143
2144         When creating a CachedFrame, clearTimers on the Frame later; it has to
2145         be done after documentWillSuspendForPageCache(), because the style
2146         changes that HTMLPlugInImageElement::documentWillSuspendForPageCache()
2147         do can schedule a layout on the FrameView, and we don't want this layout
2148         timer to fire while the page is in the page cache.
2149
2150         Add an assertion in FrameView::layout() that the document is not in
2151         the page cache. Without the above change, this would assert in
2152         the plugins/frameset-with-plugin-frame.html test.
2153
2154         * history/CachedFrame.cpp:
2155         (WebCore::CachedFrame::CachedFrame):
2156         * page/FrameView.cpp:
2157         (WebCore::FrameView::layout):
2158
2159 2012-09-28  Dan Carney  <dcarney@google.com>
2160
2161         Remove V8DOMWindowShell::getEntered
2162         https://bugs.webkit.org/show_bug.cgi?id=96637
2163
2164         Reviewed by Adam Barth.
2165
2166         V8DOMWindowShell::getEntered was refactored so that the window shell
2167         no longer has to be kept alive by a v8 context but rather a smaller
2168         object.
2169
2170         No new tests. No change in functionality.
2171
2172         * bindings/v8/DOMData.cpp:
2173         (WebCore::DOMData::getCurrentStore):
2174         * bindings/v8/ScopedPersistent.h:
2175         (WebCore::ScopedPersistent::leakHandle):
2176         (ScopedPersistent):
2177         * bindings/v8/ScriptController.cpp:
2178         (WebCore::ScriptController::resetIsolatedWorlds):
2179         (WebCore::ScriptController::evaluateInIsolatedWorld):
2180         (WebCore::ScriptController::currentWorldContext):
2181         * bindings/v8/V8Binding.cpp:
2182         (WebCore::perContextDataForCurrentWorld):
2183         * bindings/v8/V8DOMWindowShell.cpp:
2184         (WebCore::setIsolatedWorldField):
2185         (WebCore::V8DOMWindowShell::toIsolatedContextData):
2186         (WebCore::isolatedContextWeakCallback):
2187         (WebCore::V8DOMWindowShell::disposeContext):
2188         (WebCore::V8DOMWindowShell::clearIsolatedShell):
2189         (WebCore):
2190         (WebCore::V8DOMWindowShell::initializeIfNeeded):
2191         (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
2192         * bindings/v8/V8DOMWindowShell.h:
2193         (V8DOMWindowShell):
2194         (IsolatedContextData):
2195         (WebCore::V8DOMWindowShell::IsolatedContextData::create):
2196         (WebCore::V8DOMWindowShell::IsolatedContextData::world):
2197         (WebCore::V8DOMWindowShell::IsolatedContextData::perContextData):
2198         (WebCore::V8DOMWindowShell::IsolatedContextData::setSecurityOrigin):
2199         (WebCore::V8DOMWindowShell::IsolatedContextData::securityOrigin):
2200         (WebCore::V8DOMWindowShell::IsolatedContextData::IsolatedContextData):
2201         (WebCore::V8DOMWindowShell::enteredIsolatedContext):
2202         (WebCore::V8DOMWindowShell::enteredIsolatedContextData):
2203         * bindings/v8/V8DOMWrapper.h:
2204         (WebCore::V8DOMWrapper::getCachedWrapper):
2205         * bindings/v8/WorldContextHandle.cpp:
2206         (WebCore::WorldContextHandle::WorldContextHandle):
2207         * bindings/v8/custom/V8DocumentCustom.cpp:
2208         (WebCore::toV8):
2209         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2210         (WebCore::toV8):
2211         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
2212         (WebCore::toV8):
2213         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
2214         (WebCore::V8XMLHttpRequest::constructorCallback):
2215
2216 2012-09-28  Anders Carlsson  <andersca@apple.com>
2217
2218         Remove Java bridge
2219         https://bugs.webkit.org/show_bug.cgi?id=97954
2220
2221         Reviewed by Sam Weinig.
2222
2223         The Java bridge is not used by any port; Mac now has a NPAPI Java plug-in.
2224
2225         * WebCore.exp.in:
2226         * WebCore.xcodeproj/project.pbxproj:
2227         * bindings/js/ScriptController.cpp:
2228         (WebCore::ScriptController::ScriptController):
2229         * bindings/js/ScriptController.h:
2230         (ScriptController):
2231         * bindings/js/ScriptControllerMac.mm:
2232         (WebCore::ScriptController::createScriptInstanceForWidget):
2233         * bridge/jni/JNIUtility.cpp: Removed.
2234         * bridge/jni/JNIUtility.h: Removed.
2235         * bridge/jni/JavaType.h: Removed.
2236         * bridge/jni/JobjectWrapper.cpp: Removed.
2237         * bridge/jni/JobjectWrapper.h: Removed.
2238         * bridge/jni/jni_jsobject.h: Removed.
2239         * bridge/jni/jni_jsobject.mm: Removed.
2240         * bridge/jni/jni_objc.mm: Removed.
2241         * bridge/jni/jsc/JNIUtilityPrivate.cpp: Removed.
2242         * bridge/jni/jsc/JNIUtilityPrivate.h: Removed.
2243         * bridge/jni/jsc/JavaArrayJSC.cpp: Removed.
2244         * bridge/jni/jsc/JavaArrayJSC.h: Removed.
2245         * bridge/jni/jsc/JavaClassJSC.cpp: Removed.
2246         * bridge/jni/jsc/JavaClassJSC.h: Removed.
2247         * bridge/jni/jsc/JavaFieldJSC.cpp: Removed.
2248         * bridge/jni/jsc/JavaFieldJSC.h: Removed.
2249         * bridge/jni/jsc/JavaInstanceJSC.cpp: Removed.
2250         * bridge/jni/jsc/JavaInstanceJSC.h: Removed.
2251         * bridge/jni/jsc/JavaMethodJSC.cpp: Removed.
2252         * bridge/jni/jsc/JavaMethodJSC.h: Removed.
2253         * bridge/jni/jsc/JavaRuntimeObject.cpp: Removed.
2254         * bridge/jni/jsc/JavaRuntimeObject.h: Removed.
2255         * bridge/jni/jsc/JavaStringJSC.h: Removed.
2256         * bridge/runtime_root.h:
2257         * loader/FrameLoaderClient.h:
2258         (FrameLoaderClient):
2259
2260 2012-09-28  Dimitri Glazkov  <dglazkov@chromium.org>
2261
2262         Remove unused parameter in SelectorChecker::checkScrollbarPseudoClass.
2263         https://bugs.webkit.org/show_bug.cgi?id=97941
2264
2265         Reviewed by Kentaro Hara.
2266
2267         The last parameter in checkScrollbarPseudoClass was unused, so I removed it. 
2268
2269         No change in behavior, just refactoring.
2270
2271         * css/SelectorChecker.cpp:
2272         (WebCore::SelectorChecker::checkOneSelector): Changed the callsite to accommodate the change.
2273         (WebCore::SelectorChecker::checkScrollbarPseudoClass): Removed last param.
2274         * css/SelectorChecker.h: Ditto.
2275
2276 2012-09-27  Alpha Lam  <hclam@chromium.org>
2277
2278         REGRESSION(r122215) - CachedImage::likelyToBeUsedSoon crashes on accessing a deleted CachedImageClient
2279         https://bugs.webkit.org/show_bug.cgi?id=97749
2280
2281         Reviewed by James Robinson.
2282
2283         All implementations of Clipboard set themselves as clients to CachedImage
2284         through the JS API setDrageImage() but they do not detach during destruction.
2285         This causes memory corruption when CachedImage tries to access a deleted client
2286         when MemoryCache prunes and calls CachedImage::likelyToUsedSoon().
2287
2288         Manual test added: ManualTests/drag-image-no-crash.html
2289
2290         * platform/chromium/ClipboardChromium.cpp:
2291         (WebCore::ClipboardChromium::~ClipboardChromium):
2292         * platform/gtk/ClipboardGtk.cpp:
2293         (WebCore::ClipboardGtk::~ClipboardGtk):
2294         * platform/mac/ClipboardMac.mm:
2295         (WebCore::ClipboardMac::~ClipboardMac):
2296         * platform/win/ClipboardWin.cpp:
2297         (WebCore::ClipboardWin::~ClipboardWin):
2298
2299 2012-09-28  Anders Carlsson  <andersca@apple.com>
2300
2301         Remove Instance::setDidExecuteFunction
2302         https://bugs.webkit.org/show_bug.cgi?id=97952
2303
2304         Reviewed by Alexey Proskuryakov.
2305
2306         Instance::setDidExecuteFunction was added over 8 years ago to fix a bug where Objective-C
2307         DOM calls weren't updating the document correctly. Nowadays we correctly invalidate the DOM tree
2308         when these calls are made so we don't need an extra step to do so.
2309
2310         * bindings/js/ScriptControllerMac.mm:
2311         (WebCore):
2312         (WebCore::ScriptController::initJavaJSBindings):
2313         * bindings/objc/WebScriptObject.mm:
2314         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2315         (-[WebScriptObject evaluateWebScript:]):
2316         (-[WebScriptObject setValue:forKey:]):
2317         (-[WebScriptObject valueForKey:]):
2318         (-[WebScriptObject removeWebScriptKey:]):
2319         (-[WebScriptObject hasWebScriptKey:]):
2320         (-[WebScriptObject stringRepresentation]):
2321         (-[WebScriptObject webScriptValueAtIndex:]):
2322         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
2323         * bridge/jsc/BridgeJSC.cpp:
2324         * bridge/jsc/BridgeJSC.h:
2325         (Instance):
2326
2327 2012-09-28  Emil A Eklund  <eae@chromium.org>
2328
2329         Improve saturation arithmetic support in FractionalLayoutUnit
2330         https://bugs.webkit.org/show_bug.cgi?id=97938
2331
2332         Reviewed by Levi Weintraub.
2333
2334         Fix bug in FractionalLayoutUnit::setValue where greater than or
2335         equals is used instead of greater than to clamp the values. 
2336         Add SATURATED_LAYOUT_ARITHMETIC support to round preventing it
2337         from overflowing when adding the fraction.
2338
2339         Test: fast/sub-pixel/large-sizes.html
2340
2341         * platform/FractionalLayoutUnit.h:
2342         (WebCore::FractionalLayoutUnit::round):
2343         (WebCore::FractionalLayoutUnit::setValue):
2344
2345 2012-09-28  Luiz Agostini  <luiz.agostini@nokia.com>
2346
2347         TextureMapperGL destructor crashes
2348         https://bugs.webkit.org/show_bug.cgi?id=97942
2349
2350         Reviewed by Noam Rosenthal.
2351
2352         BitmapTextureGL destructor uses a TextureMapperGL instance. The problem is that 
2353         BitmapTextureGL objects are destroyed on TextureMapper destructor and at that 
2354         time TextureMapperGL specific methods and data are not available any more.
2355
2356         This patch creates a new protected method TextureMapper::clearTexturePool()
2357         that is called in TextureMapperGL's destructor.
2358
2359         * platform/graphics/texmap/TextureMapper.h:
2360         (WebCore::TextureMapper::clearTexturePool):
2361         * platform/graphics/texmap/TextureMapperGL.cpp:
2362         (WebCore::TextureMapperGL::~TextureMapperGL):
2363
2364 2012-09-28  Julien Chaffraix  <jchaffraix@webkit.org>
2365
2366         REGRESSION(r124168): Null crash in RenderLayer::createScrollbar
2367         https://bugs.webkit.org/show_bug.cgi?id=96863
2368
2369         Reviewed by Abhishek Arya.
2370
2371         After r124168, we synchronously create any overflow:scroll scrollbar on the first style change - we used to wait
2372         until layout was called. The issue is that the logic in RenderLayer assumes that our node is completely attached
2373         when the style change is dispatched. The crash occured because the 'content' image code path in
2374         RenderObject::createObject triggered a style change too early.
2375
2376         Test: scrollbars/scrollbar-content-crash.html
2377
2378         * rendering/RenderObject.cpp:
2379         (WebCore::RenderObject::createObject):
2380         We need a style associated with the new RenderImage to call setImageResource but we don't need to trigger a
2381         style change.
2382
2383 2012-09-28  Ben Wagner  <bungeman@chromium.org>
2384
2385         Chromium should respect 'text-rendering:geometricPrecision' by disabling hinting.
2386         https://bugs.webkit.org/show_bug.cgi?id=97932
2387
2388         Reviewed by Stephen White.
2389
2390         When text-redering:geometricPrecision css property is present, the specification states that hinting should be disabled. This change does so.
2391
2392         This also provides users a more stable and sane means of achieving the result webkit-font-smoothing:antialiased has been providing by accident.
2393         See http://crbug.com/152304 . 
2394
2395         * platform/graphics/skia/FontSkia.cpp:
2396         (WebCore::setupPaint):
2397
2398 2012-09-28  Simon Fraser  <simon.fraser@apple.com>
2399
2400         Crash re-entering Document layout with frame flattening enabled
2401         https://bugs.webkit.org/show_bug.cgi?id=97841
2402
2403         Reviewed by Kenneth Rohde Christiansen.
2404
2405         Walking up to parent FrameViews when doing a frame-flattening
2406         layout should walk via the Frame tree, not the Widget hierarchy.
2407         Walking via the Frame tree ensures that we don't walk up to the
2408         root Frame when laying out a subframe that is in the page cache.
2409         That's bad, because the root Frame is reused for the new
2410         page, and laying it out from a frame in the page cache causes
2411         re-entrant layout.
2412
2413         Test: plugins/frameset-with-plugin-frame.html
2414
2415         * page/FrameView.cpp:
2416         (WebCore::FrameView::parentFrameView):
2417
2418 2012-09-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2419
2420         Unreviewed, rolling out r129911.
2421         http://trac.webkit.org/changeset/129911
2422         https://bugs.webkit.org/show_bug.cgi?id=97933
2423
2424         Inspector test crashes on win debug (Requested by jsbell on
2425         #webkit).
2426
2427         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2428         (WebCore::IDBTransactionBackendImpl::abort):
2429         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
2430
2431 2012-09-28  Yong Li  <yoli@rim.com>
2432
2433         [HarfBuzz] harfbuzz expects log_clusters to have same length as other buffers.
2434         https://bugs.webkit.org/show_bug.cgi?id=97725
2435
2436         Reviewed by Tony Chang.
2437
2438         log_clusters should have same length as other buffers, which is number of glyphs.
2439
2440         Test: fast/text/international/harfbuzz-buffer-overrun.html
2441
2442         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
2443         (WebCore::ComplexTextController::ComplexTextController):
2444         (WebCore::ComplexTextController::~ComplexTextController):
2445         (WebCore::ComplexTextController::deleteGlyphArrays):
2446         (WebCore::ComplexTextController::createGlyphArrays):
2447
2448 2012-09-28  Brian Salomon  <bsalomon@google.com>
2449
2450         Add canvas to set of elements that do not allow style sharing in order to provoke RenderLayer creation
2451         https://bugs.webkit.org/show_bug.cgi?id=97013
2452
2453         Reviewed by James Robinson.
2454
2455         This allows RenderLayers to be created for canvas elements when they are accelerated. Otherwise, we can exit out of RenderObject::setStyle before the layer is created.
2456
2457         Test: fast/canvas/canvas-render-layer.html
2458
2459         * css/StyleResolver.cpp:
2460         (WebCore::StyleResolver::collectMatchingRulesForList):
2461         * rendering/RenderObject.cpp:
2462         (WebCore::RenderObject::adjustStyleDifference):
2463         (WebCore::RenderObject::setStyle):
2464
2465 2012-09-28  Fady Samuel  <fsamuel@chromium.org>
2466
2467         [V8] Make v8NPObjectMap per Context
2468         https://bugs.webkit.org/show_bug.cgi?id=97703
2469
2470         Reviewed by Adam Barth.
2471
2472         V8NPObject is a V8Object wrapper for use by the npruntime.
2473
2474         staticV8NPObjectMap is used for keeping record of V8NPObjects as they are created and destroyed
2475         to ensure that an existing V8NPObject wrapper is returned for a V8Object in npCreateV8ScriptObject.
2476         
2477         Once a context is gone, the NPObjects for the context are no longer valid and that record keeping
2478         no longer makes sense so we clear the map.
2479
2480         However, because the map was static, it existed for all pages across contexts. Clearing the
2481         map if one context is gone should not impact the V8NPObject map of other contexts.
2482
2483         Thus, this patch makes the V8NPObject map per context.
2484
2485         * bindings/v8/NPV8Object.cpp:
2486         (WebCore::freeV8NPObject):
2487         (WebCore::npCreateV8ScriptObject):
2488         * bindings/v8/V8PerContextData.h:
2489         (WebCore):
2490         (WebCore::V8PerContextData::v8NPObjectMap):
2491         (V8PerContextData):
2492
2493 2012-09-28  Alberto Garcia  <agarcia@igalia.com>
2494
2495         TextureMapperGL: fix -Wsign-compare compilation warning.
2496         https://bugs.webkit.org/show_bug.cgi?id=97928
2497
2498         Reviewed by Martin Robinson.
2499
2500         Use size_t rather than int to iterate over FilterOperations.
2501
2502         * platform/graphics/texmap/TextureMapperGL.cpp:
2503         (WebCore::BitmapTextureGL::applyFilters):
2504
2505 2012-09-28  Anders Carlsson  <andersca@apple.com>
2506
2507         Fix build.
2508
2509         * WebCore.xcodeproj/project.pbxproj:
2510
2511 2012-09-28  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2512
2513         Code inside FrameLoaderClient::canShowMIMEType() implementations can be shared among different WK ports
2514         https://bugs.webkit.org/show_bug.cgi?id=97547
2515
2516         Reviewed by Adam Barth.
2517
2518         Added MIMETypeRegistry::canShowMIMEType() function which should to be used
2519         to detect whether a given MIME type can be shown in a page.
2520
2521         No new tests. No new functionality.
2522
2523         * WebCore.exp.in: Added MIMETypeRegistry::canShowMIMEType(). Removed MIMETypeRegistry functions that no longer need to be exported.
2524         * platform/MIMETypeRegistry.cpp:
2525         (WebCore::MIMETypeRegistry::canShowMIMEType):
2526         (WebCore):
2527         * platform/MIMETypeRegistry.h:
2528         (MIMETypeRegistry):
2529
2530 2012-09-27  Tony Chang  <tony@chromium.org>
2531
2532         flexbox assert fails with auto-sized item with padding
2533         https://bugs.webkit.org/show_bug.cgi?id=97606
2534
2535         Reviewed by Ojan Vafai.
2536
2537         Depending on the denominator of FractionalLayoutUnit, we can lose precision when
2538         converting to a float.  This would cause a rounding error in flex-shrink to trigger an ASSERT.
2539         To avoid this problem in the future, switch to using doubles for flex-shrink and flex-grow
2540         at layout time.  The CSS values themselves are still floats.
2541
2542         Test: css3/flexbox/negative-flex-rounding-assert.html
2543
2544         * rendering/RenderFlexibleBox.cpp:
2545         (WebCore::RenderFlexibleBox::layoutFlexItems): Use doubles for local variables.
2546         (WebCore::RenderFlexibleBox::computeNextFlexLine): Pass in doubles.
2547         (WebCore::RenderFlexibleBox::freezeViolations): Pass in doubles.
2548         (WebCore::RenderFlexibleBox::resolveFlexibleLengths): Pass in doubles.
2549         * rendering/RenderFlexibleBox.h:
2550
2551 2012-09-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2552
2553         Unreviewed, rolling out r129751.
2554         http://trac.webkit.org/changeset/129751
2555         https://bugs.webkit.org/show_bug.cgi?id=97921
2556
2557         Causes crashes on mac and win (Requested by vsevik on
2558         #webkit).
2559
2560         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2561         (WebCore::JSHTMLCanvasElement::getContext):
2562         * bindings/js/JSMainThreadExecState.h:
2563         (WebCore::JSMainThreadExecState::instrumentFunctionCall):
2564         * bindings/js/ScheduledAction.cpp:
2565         (WebCore::ScheduledAction::create):
2566         * bindings/js/ScriptCallStackFactory.cpp:
2567         (WebCore::createScriptCallStackForInspector):
2568         * bindings/js/ScriptCallStackFactory.h:
2569         (WebCore):
2570         * bindings/scripts/CodeGeneratorJS.pm:
2571         (GenerateCallWith):
2572         * bindings/scripts/CodeGeneratorV8.pm:
2573         (GenerateCallWith):
2574         * bindings/scripts/test/JS/JSTestObj.cpp:
2575         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
2576         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
2577         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
2578         * bindings/scripts/test/V8/V8TestObj.cpp:
2579         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter):
2580         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter):
2581         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackCallback):
2582         * bindings/v8/ScriptCallStackFactory.cpp:
2583         (WebCore::createScriptCallStackForInspector):
2584         * bindings/v8/ScriptCallStackFactory.h:
2585         (WebCore):
2586         * bindings/v8/ScriptController.cpp:
2587         (WebCore::ScriptController::callFunctionWithInstrumentation):
2588         * bindings/v8/V8DOMWindowShell.cpp:
2589         (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
2590         * bindings/v8/V8WorkerContextEventListener.cpp:
2591         (WebCore::V8WorkerContextEventListener::callListenerFunction):
2592         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2593         (WebCore::WindowSetTimeoutImpl):
2594         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2595         (WebCore::V8HTMLCanvasElement::getContextCallback):
2596         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2597         (WebCore::SetTimeoutOrInterval):
2598         * inspector/Inspector.json:
2599         * inspector/InspectorConsoleAgent.cpp:
2600         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
2601         (WebCore::InspectorConsoleAgent::enable):
2602         (WebCore::InspectorConsoleAgent::disable):
2603         (WebCore::InspectorConsoleAgent::clearMessages):
2604         (WebCore::InspectorConsoleAgent::clearFrontend):
2605         (WebCore::InspectorConsoleAgent::addConsoleMessage):
2606         * inspector/InspectorConsoleAgent.h:
2607         (InspectorConsoleAgent):
2608         * inspector/InspectorController.cpp:
2609         (WebCore::InspectorController::connectFrontend):
2610         (WebCore::InspectorController::disconnectFrontend):
2611         * inspector/InspectorInstrumentation.cpp:
2612         (WebCore):
2613         (WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
2614         * inspector/InspectorInstrumentation.h:
2615         (InspectorInstrumentation):
2616         (WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
2617         * inspector/InspectorRuntimeAgent.cpp:
2618         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
2619         * inspector/InspectorRuntimeAgent.h:
2620         (InspectorRuntimeAgent):
2621         * inspector/PageRuntimeAgent.cpp:
2622         (PageRuntimeAgentState):
2623         (WebCore::PageRuntimeAgent::clearFrontend):
2624         (WebCore::PageRuntimeAgent::restore):
2625         (WebCore::PageRuntimeAgent::setReportExecutionContextCreation):
2626         (WebCore::PageRuntimeAgent::didClearWindowObject):
2627         (WebCore::PageRuntimeAgent::didCreateIsolatedContext):
2628         * inspector/PageRuntimeAgent.h:
2629         (PageRuntimeAgent):
2630         * inspector/WorkerRuntimeAgent.cpp:
2631         (WebCore::WorkerRuntimeAgent::setReportExecutionContextCreation):
2632         (WebCore):
2633         * inspector/WorkerRuntimeAgent.h:
2634         (WorkerRuntimeAgent):
2635         * inspector/front-end/RuntimeModel.js:
2636         (WebInspector.RuntimeModel.prototype._didLoadCachedResources):
2637         * page/DOMWindow.cpp:
2638         (WebCore::DOMWindow::postMessage):
2639
2640 2012-09-28  Kent Tamura  <tkent@chromium.org>
2641
2642         Add parseDateTime, formatDateTime, and dateFormatText to Localizer
2643         https://bugs.webkit.org/show_bug.cgi?id=97885
2644
2645         Reviewed by Kentaro Hara.
2646
2647         This is a preparation to remove LocalizedData.h.
2648
2649         Add the following pure virtual member functions to Localizer.
2650           parseDateTime
2651           formatDateTime
2652           dateFormatText.
2653
2654         We rename existing parse/format functions for type=date in Locale*
2655         classes, and extend their functionality so that they support other
2656         date/time types. They override the new functions of Localizer.
2657
2658         No new tests. This should not change any behavior.
2659
2660         * platform/text/Localizer.h:
2661         (Localizer): Add parseDateTime, formatDateTime, and dateFormatText.
2662
2663         * platform/text/LocaleICU.h:
2664         (LocaleICU):
2665         - Rename parseLocalizedDate to parseDateTime
2666         - Add type argument to parseDateTime
2667         - Rename formatLocalizedDate to formatDateTime
2668         - Rename localizedDateFormatText to dateFormatText
2669         - Make parseDateTime/formatDateTime/dateFormatText virtual.
2670         * platform/text/LocaleICU.cpp:
2671         (WebCore::LocaleICU::parseDateTime):
2672         Renamed. Reject non-date types.
2673         (WebCore::LocaleICU::formatDateTime): ditto.
2674         (WebCore::LocaleICU::dateFormatText): Renamed.
2675         * platform/text/LocalizedDateICU.cpp: Moved some code to LocaleICU.cpp.
2676         (WebCore::parseLocalizedDate):
2677         (WebCore::formatLocalizedDate):
2678
2679         * platform/text/LocaleNone.cpp:
2680         Add empty implementations of parseDateTime, formatDateTime, and
2681         dateFormatText.
2682         (LocaleNone):
2683         (WebCore::LocaleNone::parseDateTime):
2684         (WebCore::LocaleNone::formatDateTime):
2685         (WebCore::LocaleNone::dateFormatText):
2686
2687         * platform/text/LocaleWin.h:
2688         (LocaleWin):
2689         - Rename parseDate to parseDateTime
2690         - Add type argument to parseDateTime
2691         - Rename formatDate to formatDateTime
2692         - Make parseDateTime/formatDateTime/dateFormatText virtual.
2693         * platform/text/LocaleWin.cpp:
2694         (WebCore::LocaleWin::parseDateTime):
2695         Renamed. Reject non-date types.
2696         (WebCore::LocaleWin::formatDateTime): ditto.
2697         * platform/text/LocalizedDateWin.cpp: Moved some code to LocaleWin.cpp.
2698         (WebCore::parseLocalizedDate):
2699         (WebCore::formatLocalizedDate):
2700
2701         * platform/text/mac/LocaleMac.h:
2702         (LocaleMac):
2703         - Rename parseDate to parseDateTime
2704         - Add type argument to parseDateTime
2705         - Rename formatDate to formatDateTime
2706         - Make parseDateTime/formatDateTime/dateFormatText virtual.
2707         * platform/text/mac/LocaleMac.mm:
2708         (WebCore::LocaleMac::parseDateTime):
2709         Renamed. Reject non-date types.
2710         (WebCore::LocaleMac::formatDateTime): ditto.
2711         * platform/text/mac/LocalizedDateMac.cpp: Moved some code to LocaleMac.mm.
2712         (WebCore::parseLocalizedDate):
2713         (WebCore::formatLocalizedDate):
2714
2715 2012-09-28  Joshua Bell  <jsbell@chromium.org>
2716
2717         IndexedDB: Run multiple tasks per transaction tick
2718         https://bugs.webkit.org/show_bug.cgi?id=97738
2719
2720         Reviewed by Tony Chang.
2721
2722         Process multiple tasks from the pending queue(s) when the timer fires. The
2723         task may initiate new tasks that change which queue is active (e.g. indexing
2724         operations) so the loop must re-check each tick which queue to use.
2725
2726         In DumpRenderTree, time to make 20k puts/20k gets dropped from 3.2s to 2.0s (-37%);
2727         in Chromium's content_shell, the time dropped from 8.1s to 4.6s (-42%).
2728
2729         No new tests - just perf improvements, covered by (nearly) all existing IDB tests.
2730
2731         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2732         (WebCore::IDBTransactionBackendImpl::abort): Use takeFirst() to clean up code.
2733         (WebCore::IDBTransactionBackendImpl::taskTimerFired): Process as many tasks as are available.
2734
2735 2012-09-28  Harald Tveit Alvestrand  <harald@alvestrand.no>
2736         
2737         Implement the GetStats interface on PeerConnection
2738         https://bugs.webkit.org/show_bug.cgi?id=95193
2739
2740         Specification:
2741         http://dev.w3.org/2011/webrtc/editor/webrtc-20120920.html
2742
2743         Reviewed by Adam Barth.
2744
2745         The implementation consists of a pure virtual platform object
2746         (RTCStatsRequest) that is implemented in WebCore, and stores
2747         its information in a straightforward data hierarchy.
2748         This patch adds the call path and the storage structures.
2749         It does not add filling in data.
2750
2751         Test: fast/mediastream/RTCPeerConnection-stats.html
2752
2753         * CMakeLists.txt:
2754         * Modules/mediastream/RTCPeerConnection.cpp:
2755         (WebCore::RTCPeerConnection::getStats):
2756         (WebCore):
2757         * Modules/mediastream/RTCPeerConnection.h:
2758         (WebCore):
2759         (RTCPeerConnection):
2760         * Modules/mediastream/RTCPeerConnection.idl:
2761         * Modules/mediastream/RTCStatsCallback.h: Added.
2762         (WebCore):
2763         (RTCStatsCallback):
2764         (WebCore::RTCStatsCallback::~RTCStatsCallback):
2765         * Modules/mediastream/RTCStatsCallback.idl: Added.
2766         * Modules/mediastream/RTCStatsElement.cpp: Added.
2767         (WebCore):
2768         (WebCore::RTCStatsElement::create):
2769         (WebCore::RTCStatsElement::RTCStatsElement):
2770         (WebCore::RTCStatsElement::stat):
2771         * Modules/mediastream/RTCStatsElement.h: Added.
2772         (WebCore):
2773         (RTCStatsElement):
2774         * Modules/mediastream/RTCStatsElement.idl: Added.
2775         * Modules/mediastream/RTCStatsReport.cpp: Added.
2776         (WebCore):
2777         (WebCore::RTCStatsReport::create):
2778         (WebCore::RTCStatsReport::RTCStatsReport):
2779         * Modules/mediastream/RTCStatsReport.h: Added.
2780         (WebCore):
2781         (RTCStatsReport):
2782         (WebCore::RTCStatsReport::local):
2783         (WebCore::RTCStatsReport::remote):
2784         * Modules/mediastream/RTCStatsReport.idl: Added.
2785         * Modules/mediastream/RTCStatsRequestImpl.cpp: Added.
2786         (WebCore):
2787         (WebCore::RTCStatsRequestImpl::create):
2788         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
2789         (WebCore::RTCStatsRequestImpl::~RTCStatsRequestImpl):
2790         (WebCore::RTCStatsRequestImpl::requestSucceeded):
2791         (WebCore::RTCStatsRequestImpl::stop):
2792         (WebCore::RTCStatsRequestImpl::clear):
2793         * Modules/mediastream/RTCStatsRequestImpl.h: Added.
2794         (WebCore):
2795         (RTCStatsRequestImpl):
2796         * Modules/mediastream/RTCStatsResponse.cpp: Added.
2797         (WebCore):
2798         (WebCore::RTCStatsResponse::create):
2799         (WebCore::RTCStatsResponse::RTCStatsResponse):
2800         * Modules/mediastream/RTCStatsResponse.h: Added.
2801         (WebCore):
2802         (RTCStatsResponse):
2803         (WebCore::RTCStatsResponse::result):
2804         * Modules/mediastream/RTCStatsResponse.idl: Added.
2805         * WebCore.gypi:
2806         * platform/chromium/support/WebRTCStatsRequest.cpp: Copied from Source/Platform/chromium/public/WebRTCPeerConnectionHandler.h.
2807         (WebKit):
2808         (WebKit::WebRTCStatsRequest::WebRTCStatsRequest):
2809         (WebKit::WebRTCStatsRequest::assign):
2810         (WebKit::WebRTCStatsRequest::reset):
2811         (WebKit::WebRTCStatsRequest::requestSucceeded):
2812         * platform/mediastream/RTCPeerConnectionHandler.h:
2813         (WebCore):
2814         (RTCPeerConnectionHandler):
2815         * platform/mediastream/RTCStatsRequest.h: Copied from Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h.
2816         (WebCore):
2817         (RTCStatsRequest):
2818         (WebCore::RTCStatsRequest::~RTCStatsRequest):
2819         (WebCore::RTCStatsRequest::RTCStatsRequest):
2820         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
2821         (WebCore::RTCPeerConnectionHandlerChromium::getStats):
2822         (WebCore):
2823         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
2824         (RTCPeerConnectionHandlerChromium):
2825
2826 2012-09-28  Andreas Kling  <kling@webkit.org>
2827
2828         471kB below StyleSheetContents::parserAppendRule() on Membuster3.
2829         <http://webkit.org/b/97916>
2830
2831         Reviewed by Anders Carlsson.
2832
2833         Shrink-to-fit the StyleSheetContents rule vectors at the end of CSSParser::parseSheet().
2834         ~100kB progression on Membuster3.
2835
2836         * css/StyleSheetContents.h:
2837         * css/StyleSheetContents.cpp:
2838         (WebCore::StyleSheetContents::shrinkToFit):
2839         * css/CSSParser.cpp:
2840         (WebCore::CSSParser::parseSheet):
2841
2842 2012-09-28  Kent Tamura  <tkent@chromium.org>
2843
2844         Clean up Localizer-related functions
2845         https://bugs.webkit.org/show_bug.cgi?id=97899
2846
2847         Reviewed by Kentaro Hara.
2848
2849         - Rename Document::getLocalizer to getCachedLocalizer
2850         - Add default argument to getCachedLocalizer
2851         - Add Element::localizer to reduce code size
2852         - Rename DateTimeNumericFieldElement::localizer to localizerForOwner to
2853           avoid conflict with Element::localizer
2854         - Add Localizer::createDefault to improve code readability
2855
2856         No new tests. This shouldn't make any behavior change.
2857
2858         * dom/Document.h:
2859         (Document): Rename getLocalizer to getCachedLocalizer, and add default
2860         argument.
2861         * dom/Document.cpp:
2862         (WebCore::Document::getCachedLocalizer): ditto.
2863
2864         * dom/Element.h:
2865         (Element): Add localizer function.
2866         * dom/Element.cpp:
2867         (WebCore::Element::localizer): Added
2868
2869         * html/shadow/DateTimeNumericFieldElement.h:
2870         (DateTimeNumericFieldElement): Rename localizer to localizerForOwner.
2871         * html/shadow/DateTimeNumericFieldElement.cpp: ditto.
2872         (WebCore::DateTimeNumericFieldElement::handleKeyboardEvent):
2873         (WebCore::DateTimeNumericFieldElement::localizerForOwner):
2874         (WebCore::DateTimeNumericFieldElement::value):
2875
2876         * platform/text/Localizer.h:
2877         (Localizer): Add createDefault
2878         (WebCore::Localizer::createDefault): Implemented.
2879
2880         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2881         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue):
2882         Use Element::localizer.
2883         * html/NumberInputType.cpp:
2884         (WebCore::NumberInputType::localizeValue): ditto.
2885         (WebCore::NumberInputType::convertFromVisibleValue): ditto.
2886
2887 2012-09-28  Pavel Feldman  <pfeldman@chromium.org>
2888
2889         Web Inspector: define ChunkedReader interface for compilation
2890         https://bugs.webkit.org/show_bug.cgi?id=97904
2891
2892         Reviewed by Alexander Pavlov.
2893
2894         Otherwise, it is unclear what "source" is in the OutputStreamDelegate.
2895
2896         * inspector/front-end/FileUtils.js:
2897         (WebInspector.OutputStreamDelegate.prototype.onTransferStarted):
2898         (WebInspector.OutputStreamDelegate.prototype.onTransferFinished):
2899         (WebInspector.OutputStreamDelegate.prototype.onChunkTransferred):
2900         (WebInspector.OutputStreamDelegate.prototype.onError):
2901         (WebInspector.ChunkedReader):
2902         (WebInspector.ChunkedReader.prototype.fileSize):
2903         (WebInspector.ChunkedReader.prototype.loadedSize):
2904         (WebInspector.ChunkedReader.prototype.fileName):
2905         (WebInspector.ChunkedReader.prototype.cancel):
2906         (WebInspector.ChunkedFileReader.prototype.start):
2907         (WebInspector.ChunkedFileReader.prototype._onChunkLoaded):
2908         (WebInspector.ChunkedXHRReader.prototype.start):
2909         (WebInspector.ChunkedXHRReader.prototype._onLoad):
2910         * inspector/front-end/HeapSnapshotView.js:
2911         (WebInspector.HeapSnapshotLoadFromFileDelegate.prototype.onTransferStarted):
2912         (WebInspector.HeapSnapshotLoadFromFileDelegate.prototype.onChunkTransferred):
2913         (WebInspector.HeapSnapshotLoadFromFileDelegate.prototype.onTransferFinished):
2914         (WebInspector.HeapSnapshotLoadFromFileDelegate.prototype.onError):
2915         * inspector/front-end/TimelineModel.js:
2916         (WebInspector.TimelineModelLoadFromFileDelegate.prototype.onTransferStarted):
2917
2918 2012-09-28  Florin Malita  <fmalita@chromium.org>
2919
2920         [Chromium] Incorrect resampling of clipped/masked images.
2921         https://bugs.webkit.org/show_bug.cgi?id=97409
2922
2923         Reviewed by Stephen White.
2924
2925         Currently, high-quality resampling is used for translate/scale-only transforms, but when
2926         the scale is negative the resampling subset ends up positioned incorrectly.
2927         ImageSkia.cpp:drawResampledBitmap needs to account for negative scaling factors, and apply
2928         only absolute values when calculating the resampling subregion in bitmap coordinates.
2929
2930         Thanks pdr@google.com for isolating the regression.
2931
2932         Test: svg/custom/clip-mask-negative-scale.svg
2933
2934         * platform/graphics/skia/ImageSkia.cpp:
2935         (WebCore::drawResampledBitmap):
2936
2937 2012-09-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2938
2939         Unreviewed, rolling out r129882.
2940         http://trac.webkit.org/changeset/129882
2941         https://bugs.webkit.org/show_bug.cgi?id=97913
2942
2943         Repaint is incorrect on many tests (Requested by schenney on
2944         #webkit).
2945
2946         * inspector/InspectorController.cpp:
2947         * inspector/InspectorController.h:
2948         (WebCore):
2949         (InspectorController):
2950         * inspector/InspectorOverlay.cpp:
2951         (WebCore::InspectorOverlay::paint):
2952         (WebCore::InspectorOverlay::update):
2953         (WebCore::buildObjectForPoint):
2954         (WebCore::buildArrayForQuad):
2955         (WebCore::buildObjectForHighlight):
2956         (WebCore::InspectorOverlay::reset):
2957         * inspector/InspectorOverlay.h:
2958         (InspectorOverlay):
2959         * inspector/InspectorOverlayPage.html:
2960
2961 2012-09-28  Kentaro Hara  <haraken@chromium.org>
2962
2963         Unreviewed, rolling out r129825.
2964         http://trac.webkit.org/changeset/129825
2965         https://bugs.webkit.org/show_bug.cgi?id=97474
2966
2967         DOMWindow.resizeTo() is broken. Asked by Mark Pilgrim.
2968
2969         * WebCore.gypi:
2970         * platform/Widget.h:
2971         * platform/chromium/PageClientChromium.h: Removed.
2972         * platform/chromium/PlatformScreenChromium.cpp:
2973         (WebCore::screenHorizontalDPI):
2974         (WebCore::screenVerticalDPI):
2975         (WebCore::screenDepth):
2976         (WebCore::screenDepthPerComponent):
2977         (WebCore::screenIsMonochrome):
2978         (WebCore::screenRect):
2979         (WebCore::screenAvailableRect):
2980         * platform/chromium/PlatformSupport.h:
2981         (PlatformSupport):
2982
2983 2012-09-28  Christophe Dumez  <christophe.dumez@intel.com>
2984
2985         [WebDatabase] Error code should be CONSTRAINT_ERR if a statement fails due to a constraint failure
2986         https://bugs.webkit.org/show_bug.cgi?id=97897
2987
2988         Reviewed by Kenneth Rohde Christiansen.
2989
2990         Use CONSTRAINT_ERR error code instead of the generic DATABASE_ERR
2991         when a statement fails due to a constraint failure. This is documented
2992         in the W3C specification:
2993         http://dev.w3.org/html5/webdatabase/#dom-sqlexception-code-constraint
2994
2995         Tests: storage/websql/sql-error-codes.html
2996
2997         * Modules/webdatabase/SQLStatement.cpp:
2998         (WebCore::SQLStatement::execute):
2999         * Modules/webdatabase/SQLStatementSync.cpp:
3000         (WebCore::SQLStatementSync::execute):
3001         * platform/sql/SQLiteDatabase.cpp:
3002         (WebCore):
3003         * platform/sql/SQLiteDatabase.h:
3004         (WebCore):
3005
3006 2012-09-28  Pavel Feldman  <pfeldman@chromium.org>
3007
3008         Web Inspector: split ProgressBar.js into Progress.js and ProgressIndicator.js
3009         https://bugs.webkit.org/show_bug.cgi?id=97902
3010
3011         Reviewed by Alexander Pavlov.
3012
3013         One is model, the other is UI component.
3014
3015         * WebCore.gypi:
3016         * WebCore.vcproj/WebCore.vcproj:
3017         * inspector/compile-front-end.py:
3018         * inspector/front-end/Progress.js: Copied from Source/WebCore/inspector/front-end/ProgressBar.js.
3019         * inspector/front-end/ProgressIndicator.js: Renamed from Source/WebCore/inspector/front-end/ProgressBar.js.
3020         * inspector/front-end/UserAgentSupport.js:
3021         * inspector/front-end/WebKit.qrc:
3022         * inspector/front-end/externs.js:
3023         * inspector/front-end/inspector.html:
3024
3025 2012-09-27  Alexander Pavlov  <apavlov@chromium.org>
3026
3027         Web Inspector: [Device Metrics] Remove the gutter overlay moving its functionality into the InspectorOverlay
3028         https://bugs.webkit.org/show_bug.cgi?id=97799
3029
3030         Reviewed by Pavel Feldman.
3031
3032         In order to reduce the amount of port-specific code, the gutter overlay painted in the device metrics emulation mode
3033         has been replaced by the respective functionality in the HTML-based InspectorOverlay in WebCore. The InspectorOverlay
3034         now covers the entire WebView rather than the FrameView only.
3035
3036         * inspector/InspectorController.cpp:
3037         (WebCore::InspectorController::webViewResized):
3038         (WebCore):
3039         * inspector/InspectorController.h:
3040         (WebCore):
3041         (InspectorController):
3042         * inspector/InspectorOverlay.cpp:
3043         (WebCore::InspectorOverlay::InspectorOverlay):
3044         (WebCore::InspectorOverlay::paint):
3045         (WebCore::InspectorOverlay::resize):
3046         (WebCore):
3047         (WebCore::InspectorOverlay::update):
3048         (WebCore::InspectorOverlay::drawGutter):
3049         (WebCore::InspectorOverlay::reset):
3050         * inspector/InspectorOverlay.h:
3051         (InspectorOverlay):
3052         * inspector/InspectorOverlayPage.html: Introduce the gutter painting functionality previously found in the Chromium's
3053         DeviceMetricsSupport class, which used to implement WebPageOverlay.
3054
3055 2012-09-28  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
3056
3057         editing/pasteboard/paste-removing-iframe.html crashes on EFL bots
3058         https://bugs.webkit.org/show_bug.cgi?id=97892
3059
3060         Reviewed by Kenneth Rohde Christiansen.
3061
3062         Added missing null check to avoid a crash if the document inside
3063         iframe is removed during the editing operation.
3064
3065         Test: editing/pasteboard/paste-removing-iframe.html
3066
3067         * editing/Editor.cpp:
3068         (WebCore::Editor::changeSelectionAfterCommand):
3069
3070 2012-09-28  Arvid Nilsson  <anilsson@rim.com>
3071
3072         [BlackBerry] Destroy thread-specific data for Platform::Graphics::Buffer on the right thread
3073         https://bugs.webkit.org/show_bug.cgi?id=97674
3074
3075         Reviewed by Rob Buis.
3076
3077         A new API was added to BlackBerry::Platform::Graphics for destroying
3078         thread-specific data generated on the compositing thread when we blit
3079         buffers. The buffers are otherwise created and destroyed on the WebKit
3080         thread, which doesn't give platform any opportunity to destroy the
3081         thread-specific data.
3082
3083         This patch adds calls to the new API to avoid leaking resources.
3084
3085         Reviewed internally by Jakob Petsovits and Filip Spacek.
3086
3087         PR 214644
3088
3089         Verified using manual testing.
3090
3091         * plugins/blackberry/PluginViewPrivateBlackBerry.cpp:
3092         (WebCore::PluginViewPrivate::createBuffers):
3093         (WebCore::PluginViewPrivate::destroyBuffers):
3094
3095 2012-09-28  Andrey Adaikin  <aandrey@chromium.org>
3096
3097         Web Inspector: [Canvas] log property setters too along with function calls
3098         https://bugs.webkit.org/show_bug.cgi?id=97776
3099
3100         Reviewed by Pavel Feldman.
3101
3102         Trace logs should also contain property setter calls.
3103
3104         * inspector/InjectedScriptCanvasModuleSource.js:
3105         (.):
3106         * inspector/Inspector.json:
3107         * inspector/front-end/CanvasProfileView.js:
3108         (WebInspector.CanvasProfileView.prototype._showTraceLog):
3109
3110 2012-09-28  Kent Tamura  <tkent@chromium.org>
3111
3112         Remove LocalizedNumber*.*
3113         https://bugs.webkit.org/show_bug.cgi?id=97876
3114
3115         Reviewed by Yuta Kitamura.
3116
3117         LocalizedNumber.h functions are replaced with Localizer class.
3118
3119         * CMakeLists.txt: Remove LocalizedNumberNone.*.
3120         * GNUmakefile.list.am: ditto.
3121         * Target.pri: ditto.
3122         * WebCore.vcpproj/WebCore.vcproj: ditto.
3123         * WebCore.gyp/WebCore.gyp: Remove LocalizedNumber*.*.
3124         * WebCore.gypi: ditto.
3125         * WebCore.xcodeproj/project.pbxproj: ditto.
3126
3127         * html/NumberInputType.cpp: Use Localizer for the element locale.
3128         (WebCore::NumberInputType::localizeValue):
3129         (WebCore::NumberInputType::convertFromVisibleValue):
3130
3131         * platform/text/Localizer.h: Move some comments from LocalizedNumber.h
3132
3133         * platform/text/LocalizedNumber.h: Removed.
3134         * platform/text/LocalizedNumberICU.cpp: Removed.
3135         * platform/text/LocalizedNumberNone.cpp: Removed.
3136         * platform/text/mac/LocalizedNumberMac.mm: Removed.
3137         * platform/text/win/LocalizedNumberWin.cpp: Removed.
3138
3139 2012-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3140
3141         Unreviewed, rolling out r129863.
3142         http://trac.webkit.org/changeset/129863
3143         https://bugs.webkit.org/show_bug.cgi?id=97173
3144
3145         WK2 layout test on debug is broken by this patch.
3146
3147         * platform/efl/RunLoopEfl.cpp:
3148         (WebCore::RunLoop::RunLoop):
3149         (WebCore::RunLoop::~RunLoop):
3150
3151 2012-09-28  Vsevolod Vlasov  <vsevik@chromium.org>
3152
3153         Web Inspector: Formatting on load is broken
3154         https://bugs.webkit.org/show_bug.cgi?id=97880
3155
3156         Reviewed by Alexander Pavlov.
3157
3158         Bound formatted callback on UISourceCode and fixed callback call.
3159
3160         * inspector/front-end/UISourceCode.js:
3161         (WebInspector.UISourceCode.prototype._fireContentAvailable.formattedCallback):
3162         (WebInspector.UISourceCode.prototype._fireContentAvailable):
3163
3164 2012-09-28  Yoshifumi Inoue  <yosin@chromium.org>
3165
3166         [Forms] Multiple fields month input UI
3167         https://bugs.webkit.org/show_bug.cgi?id=97299
3168
3169         Reviewed by Kent Tamura.
3170
3171         This patch introduces multiple fields "month" input UI in DRT. We'll
3172         enable this feature once we add tests.
3173
3174         Note: This patch affects ports which enable both ENABLE_INPUT_TYPE_MONTH
3175         and ENABLE_INPUT_MULTIPLE_FIELDS_UI.
3176
3177         No new tests. To reduce size of this patch, other patches add tests
3178         for multiple fields month input UI.
3179
3180         Note: Actual outputs of two tests
3181             - fast/forms/month/month-input-visible-string.html
3182             - fast/forms/month/month-stepup-stepdown-from-renderer.html
3183         are different.
3184
3185         * css/html.css:
3186         (input::-webkit-datetime-edit-month-field): Added for field appearance.
3187         (input::-webkit-datetime-edit-year-field): ditto.
3188         (input::-webkit-datetime-edit-month-field:focus): Added to remove focus ring.
3189         (input::-webkit-datetime-edit-year-field:focus): ditto.
3190         * html/MonthInputType.cpp:
3191         (WebCore::MonthInputType::formatDateTimeFieldsState): Added to format numeric value to string value as specified in HTML5 specification.
3192         (WebCore::MonthInputType::setupLayoutParameters): Added to set layout of multiple fields.
3193         * html/MonthInputType.h: Changed to include BaseMultipleFieldsDateAndTimeInputType.h and introduce BaseMonthInputType typedef.
3194         (WebCore::MonthInputType::MonthInputType): Changed base class name to BaseMonthInputType.
3195         (MonthInputType): Changed to add declarations for formatDateTimeFieldsState() and setupLayoutParameters().
3196         * html/shadow/DateTimeEditElement.cpp:
3197         (DateTimeEditBuilder): Changed to have copy of object in m_stepRange and m_dateValue member variables for being robust.
3198         (WebCore::DateTimeEditBuilder::DateTimeEditBuilder): Changed to add initialize m_placeholderForMonth and m_placeholderForYear.
3199         (WebCore::DateTimeEditBuilder::visitField): Changed to support month field and year field.
3200         * html/shadow/DateTimeEditElement.h:
3201         (LayoutParameters): Changed to add member variables, placeholderForMonth and placeholderForYear. Changed to have copy of object in stepRange member variable for being robust.
3202
3203 2012-09-28  Eunmi Lee  <eunmi15.lee@samsung.com>
3204
3205         [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
3206         https://bugs.webkit.org/show_bug.cgi?id=97173
3207
3208         Reviewed by Gyuyoung Kim.
3209
3210         Remove codes to initialize and shutdown the EFL libraries from
3211         RunLoopEfl.cpp. Initialization and shutdown will be done in the
3212         ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web
3213         process.
3214
3215         No new tests. This patch doesn't change behavior.
3216
3217         * platform/efl/RunLoopEfl.cpp:
3218         (WebCore::RunLoop::RunLoop):
3219         (WebCore::RunLoop::~RunLoop):
3220
3221 2012-09-19  Vsevolod Vlasov  <vsevik@chromium.org>
3222
3223         Web Inspector: Prepare UISourceCode to transformation into File.
3224         https://bugs.webkit.org/show_bug.cgi?id=97113
3225
3226         Reviewed by Pavel Feldman.
3227
3228         This patch moves methods and fields from UISourceCode descendants except for the modification bindings.
3229
3230         * inspector/front-end/BreakpointManager.js:
3231         (WebInspector.BreakpointManager.breakpointStorageId):
3232         (WebInspector.BreakpointManager.isDivergedFromVM):
3233         (WebInspector.BreakpointManager.prototype.restoreBreakpoints):
3234         (WebInspector.BreakpointManager.Breakpoint):
3235         (WebInspector.BreakpointManager.Breakpoint.prototype._updateBreakpoint):
3236         (WebInspector.BreakpointManager.Breakpoint.prototype._breakpointStorageId):
3237         (WebInspector.BreakpointManager.Storage.prototype._restoreBreakpoints):
3238         (set WebInspector.BreakpointManager.Storage.Item):
3239         * inspector/front-end/JavaScriptSource.js:
3240         (WebInspector.JavaScriptSource):
3241         (WebInspector.JavaScriptSource.prototype.workingCopyCommitted):
3242         * inspector/front-end/JavaScriptSourceFrame.js:
3243         (WebInspector.JavaScriptSourceFrame.prototype.canEditSource):
3244         (WebInspector.JavaScriptSourceFrame.prototype._supportsEnabledBreakpointsWhileEditing):
3245         (WebInspector.JavaScriptSourceFrame.prototype._didEditContent):
3246         (WebInspector.JavaScriptSourceFrame.prototype._removeBreakpointsBeforeEditing):
3247         (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
3248         (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
3249         (WebInspector.JavaScriptSourceFrame.prototype._handleGutterClick):
3250         * inspector/front-end/SASSSourceMapping.js:
3251         * inspector/front-end/ScriptSnippetModel.js:
3252         (WebInspector.ScriptSnippetModel):
3253         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
3254         (WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet.get var):
3255         (WebInspector.ScriptSnippetModel.prototype._projectWillReset):
3256         (WebInspector.SnippetJavaScriptSource):
3257         (WebInspector.SnippetJavaScriptSource.prototype.workingCopyChanged):
3258         * inspector/front-end/ScriptsNavigator.js:
3259         (WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet):
3260         * inspector/front-end/ScriptsPanel.js:
3261         (WebInspector.ScriptsPanel.prototype._addUISourceCode):
3262         (WebInspector.ScriptsPanel.prototype._uiSourceCodeFormatted):
3263         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
3264         * inspector/front-end/SnippetJavaScriptSourceFrame.js:
3265         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
3266         * inspector/front-end/StyleSource.js:
3267         * inspector/front-end/UISourceCode.js:
3268         (WebInspector.UISourceCode.prototype.searchInContent):
3269         (WebInspector.UISourceCode.prototype._fireContentAvailable.formattedCallback):
3270         (WebInspector.UISourceCode.prototype._fireContentAvailable):
3271         (WebInspector.UISourceCode.prototype.setFormatted.if):
3272         (WebInspector.UISourceCode.prototype.setFormatted.didGetContent.formattedChanged):
3273         (WebInspector.UISourceCode.prototype.setFormatted.didGetContent):
3274         (WebInspector.UISourceCode.prototype.setFormatted):
3275         (WebInspector.UISourceCode.prototype.setSourceMapping):
3276
3277 2012-09-28  MORITA Hajime  <morrita@google.com>
3278
3279         Move Shadow DOM inspection feature out from experiments
3280         https://bugs.webkit.org/show_bug.cgi?id=94274
3281
3282         Reviewed by Pavel Feldman.
3283
3284         This chagne turns the showShadowDOM experiments into a settings,
3285         adding aSettingsScreen entry for that.
3286
3287         * English.lproj/localizedStrings.js:
3288         * inspector/front-end/DOMAgent.js:
3289         * inspector/front-end/Settings.js:
3290         (WebInspector.ExperimentsSettings):
3291         * inspector/front-end/SettingsScreen.js:
3292         (WebInspector.GenericSettingsTab):
3293
3294 2012-09-27  Kent Tamura  <tkent@chromium.org>
3295
3296         Use Localizer in PagePopupController
3297         https://bugs.webkit.org/show_bug.cgi?id=97862
3298
3299         Reviewed by Hajime Morita.
3300
3301         No new tests. This doesn't change any behavior.
3302
3303         * page/PagePopupClient.h:
3304         (WebCore):
3305         (PagePopupClient): Add "localizer" member function.
3306         * page/PagePopupController.cpp:
3307         (WebCore::PagePopupController::localizeNumberString):
3308         Use a Localizer object provided by PagePopupClient.
3309
3310 2012-09-28  Kent Tamura  <tkent@chromium.org>
3311
3312         Switch monthLabels, weekDayShortLabels, and firstDayOfWeek to Localizer
3313         https://bugs.webkit.org/show_bug.cgi?id=97874
3314
3315         Reviewed by Kentaro Hara.
3316
3317         No new tests. This change shouldn't change any behavior.
3318
3319         * platform/text/Localizer.h:
3320         (Localizer): Add monthLabels, weekDayShortLabels, and firstDayOfWeek.
3321         * platform/text/LocalizedDate.h:
3322         (WebCore): Remove them.
3323         * platform/text/LocalizedDateICU.cpp:
3324         (WebCore::localizedDateFormatText): ditto.
3325         * platform/text/LocalizedDateWin.cpp:
3326         (WebCore::localizedDateFormatText): ditto.
3327         * platform/text/mac/LocalizedDateMac.cpp:
3328         (WebCore::localizedDateFormatText): ditto.
3329
3330         * platform/text/LocaleICU.h:
3331         (LocaleICU): Add virtual and OVERRIDE.
3332         * platform/text/LocaleWin.h:
3333         (LocaleWin):
3334         - Add virtual and OVERRIDE.
3335         - Move the content of firstDayOfWeek to LocaleWin.cpp because inline
3336         definition of a virtual function is not efficient.
3337         * platform/text/LocaleWin.cpp:
3338         (WebCore::LocaleWin::firstDayOfWeek): See above.
3339         * platform/text/mac/LocaleMac.h:
3340         (LocaleMac): Add virtual and OVERRIDE.
3341
3342 2012-09-28  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3343
3344         Web Inspector: Elements: Show entities in edit as HTML.
3345         https://bugs.webkit.org/show_bug.cgi?id=97798
3346
3347         Reviewed by Alexander Pavlov.
3348
3349         In elements tree entities like "&emsp;", "&ensp;" are shown.
3350         But in "Edit as HTML" mode they are replaced by Unicode chars.
3351
3352         For better consistency, these chars should be rendered the same
3353         way both in tree and edit field.
3354
3355         * inspector/front-end/ElementsTreeOutline.js:
3356         Replaced invisible chars with entities.
3357
3358 2012-09-28  Yoshifumi Inoue  <yosin@chromium.org>
3359
3360         [Forms] Adding DateTimeMonthFieldElement and DateTimeYearFieldElement
3361         https://bugs.webkit.org/show_bug.cgi?id=97864
3362
3363         Reviewed by Kent Tamura.
3364
3365         This patch is a part of preparation of implementing multiple fields
3366         date/time input UI.
3367
3368         This patch introduces DateTimeMonthFieldElement and DateTimeYearFieldElement
3369         classes for implementing multiple fields "month" input type.
3370
3371         Multiple fields "month" input type uses two fields for month and year
3372         in locale dependent order. Month field display month as two digit.
3373         Year field display year as four digits in usual case and can display
3374         up to 6 digits to support maximum year 275760, defined in HTML5
3375         specification.
3376
3377         This patch also changes default value for step down and up on empty
3378         field to better UI in year field. Year field displays current year
3379         when step down and up on empty field rather than minimum year 1, or
3380         maximum year 275760.
3381
3382         Note: This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME
3383         and ENABLE_INPUT_MULTIPLE_FIELDS_UI.
3384
3385         No new tests. This patch doesn't change behavior.
3386
3387         * html/shadow/DateTimeFieldElements.cpp:
3388         (WebCore::DateTimeMonthFieldElement::DateTimeMonthFieldElement): Added.
3389         (WebCore::DateTimeMonthFieldElement::create): Added.
3390         (WebCore::DateTimeMonthFieldElement::populateDateTimeFieldsState): Added.
3391         (WebCore::DateTimeMonthFieldElement::setValueAsDate): Added.
3392         (WebCore::DateTimeMonthFieldElement::setValueAsDateTimeFieldsState): Added.
3393         (WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement): Added.
3394         (WebCore::DateTimeYearFieldElement::create): Added.
3395         (WebCore::DateTimeYearFieldElement::defaultValueForStepDown): Added.
3396         (WebCore::DateTimeYearFieldElement::defaultValueForStepUp): Added.
3397         (WebCore::DateTimeYearFieldElement::populateDateTimeFieldsState): Added.
3398         (WebCore::DateTimeYearFieldElement::setValueAsDate): Added.
3399         (WebCore::DateTimeYearFieldElement::setValueAsDateTimeFieldsState): Added.
3400         * html/shadow/DateTimeFieldElements.h:
3401         (DateTimeMonthFieldElement): Added.
3402         (DateTimeYearFieldElement): Added.
3403         * html/shadow/DateTimeNumericFieldElement.cpp:
3404         (WebCore::DateTimeNumericFieldElement::Range::isInRange): Added for ease of checking value is in range.
3405         (WebCore::DateTimeNumericFieldElement::defaultValueForStepDown): Added for default behavior.
3406         (WebCore::DateTimeNumericFieldElement::defaultValueForStepUp): ditto.
3407         (WebCore::DateTimeNumericFieldElement::stepDown): Changed to use defaultValueForStepDown instead of maximum field value.
3408         (WebCore::DateTimeNumericFieldElement::stepUp):  Changed to use defaultValueForStepUp minium field value.
3409         (WebCore::DateTimeNumericFieldElement::value): Changed to use "%04d" when maximum field value is greater than 999 for year field.
3410         * html/shadow/DateTimeNumericFieldElement.h:
3411         (DateTimeNumericFieldElement): Changed to add declarations of defaultValueForStepDown() and defaultValueForStepUp().
3412
3413 2012-09-27  Yoshifumi Inoue  <yosin@chromium.org>
3414
3415         [Forms] Adding placeholder feature to DateTimeNumericElement, and update its existing subclasses.
3416         https://bugs.webkit.org/show_bug.cgi?id=97863
3417
3418         Reviewed by Kent Tamura.
3419
3420         This patch is a part of preparation of implementing multiple fields
3421         date/time input UI.
3422
3423         This patch introduces placeholder feature to DateTimeNumericElement
3424         to display date format guide in field, e.g. displaying "dd/mm/yyyy".
3425
3426         Note: This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
3427         ENABLE_INPUT_MULTIPLE_FIELDS_UI.
3428
3429         No new tests. This patch doesn't change behavior.
3430
3431         * html/shadow/DateTimeFieldElements.cpp:
3432         (WebCore::DateTimeHourFieldElement::DateTimeHourFieldElement): Changed to pass placeholder class to base class.
3433         (WebCore::DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement): ditto
3434         (WebCore::DateTimeMinuteFieldElement::DateTimeMinuteFieldElement): ditto
3435         (WebCore::DateTimeSecondFieldElement::DateTimeSecondFieldElement): ditto
3436         * html/shadow/DateTimeNumericFieldElement.cpp: Removed no more needed static function displaySizeOfNumbre().
3437         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement): Changed to add new parameter to take placeholder.
3438         (WebCore::DateTimeNumericFieldElement::visibleValue): Changed to use m_placholder.
3439         * html/shadow/DateTimeNumericFieldElement.h:
3440         (DateTimeNumericFieldElement): Changed to add a member variable m_placholder to hold placholder to DateTimeNumbericElement class.
3441
3442 2012-09-27  Kent Tamura  <tkent@chromium.org>
3443
3444         Make sure Localizer class is not copyable
3445         https://bugs.webkit.org/show_bug.cgi?id=97857
3446
3447         Reviewed by Kentaro Hara.
3448
3449         We don't intent Localizer obejcts are copyable.
3450
3451         * platform/text/Localizer.h:
3452         (Localizer): Add WTF_MAKE_NONCOPYABLE.
3453
3454 2012-09-27  Nico Weber  <thakis@chromium.org>
3455
3456         Delete some unused code. Found by -Wunused-function.
3457         https://bugs.webkit.org/show_bug.cgi?id=97858
3458
3459         Reviewed by Anders Carlsson.
3460
3461         No intended behavior change.
3462
3463         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
3464         (WebCore):