[chromium] Make all compositor screen space transforms operate on content rects
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-19  Adrienne Walker  <enne@google.com>
2
3         [chromium] Make all compositor screen space transforms operate on content rects
4         https://bugs.webkit.org/show_bug.cgi?id=91807
5
6         Reviewed by Kenneth Russell.
7
8         Previously, surface screen space transforms operated on surface
9         content space but layer screen space transforms operated on layer
10         space. For the purpose of consistency, unify these two so that they
11         both operate on content space.
12
13         No tests, because no change in behavior expected. Just a refactoring.
14
15         * platform/graphics/chromium/LayerChromium.h:
16         (LayerChromium):
17         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
18         (WebCore::CCDebugRectHistory::savePaintRects):
19         (WebCore::CCDebugRectHistory::savePropertyChangedRects):
20         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
21         (WebCore::calculateDrawTransformsInternal):
22         (WebCore::CCLayerTreeHostCommon::findLayerThatIsHitByPoint):
23         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
24         (WebCore::::markOccludedBehindLayer):
25         (WebCore::::occluded):
26         (WebCore::::unoccludedContentRect):
27
28 2012-07-25  Dan Bernstein  <mitz@apple.com>
29
30         Hit testing in one column or in the gap between cloumns along the block axis can return a result from the wrong column
31         https://bugs.webkit.org/show_bug.cgi?id=92311
32
33         Reviewed by Anders Carlsson.
34
35         Tests: fast/multicol/hit-test-end-of-column.html
36                fast/multicol/hit-test-gap-block-axis.html
37
38         * rendering/RenderBlock.cpp:
39         (WebCore::RenderBlock::positionForPointWithInlineChildren): To prevent hits after the last
40         line on a given column from returning the next line in the next column, added a check if
41         the hit occurred within the pagination strut of a line. Covered by the first test.
42         (WebCore::RenderBlock::adjustPointToColumnContents): Added clamp-to-column logic for the
43         block-axis case. This prevents hits near the bottom of the top half of the gap from bleeding
44         into the top of the next column. Covered by the second test.
45
46 2012-07-25  David Grogan  <dgrogan@chromium.org>
47
48         IndexedDB: Make db.version return an integer if appropriate
49         https://bugs.webkit.org/show_bug.cgi?id=92195
50
51         Reviewed by Tony Chang.
52
53         Make use of the existing IDBAny mechanism to return an integer if
54         integer versions have been used.
55
56         No new tests - no change in behavior expected.
57
58         * Modules/indexeddb/IDBDatabase.cpp:
59         (WebCore::IDBDatabase::version):
60         (WebCore):
61         * Modules/indexeddb/IDBDatabase.h:
62         (IDBDatabase):
63         * Modules/indexeddb/IDBDatabase.idl:
64
65 2012-07-25  Michael Saboff  <msaboff@apple.com>
66
67         Convert HTML parser to handle 8-bit resources without converting to UChar*
68         https://bugs.webkit.org/show_bug.cgi?id=90321
69
70         Reviewed by Geoffrey Garen.
71
72         No new tests, no new functionality therefore covered by existing tests.
73
74         Changed the parsing of HTML to handle 8-bit strings without converting the 
75         whole string to 16-bits.  Primary change was to use the appropriate 
76         character pointer type (LChar* or UChar*) depending on the source string.
77         This access is abstracted in SegmentedSubstring by getCurrentChar{8,16} and
78         incrementAndGetCurrentChar{8,16} methods.  In SegmentedString, the advance()
79         and advanceAndUpdateLineNumber() methods have been refactored into a
80         state machine managed pair of function pointers.  The possible functions
81         have not only the 8 and 16 bitness factored out, they also have the 
82         "exclude line numbers" logic factored out for advanceAndUpdateLineNumber().
83         This provides a net speed-up even with the 8/16 bit testing.
84         Other changes involve using String methods to access and compare with the
85         source data.
86
87         * html/FTPDirectoryDocument.cpp:
88         (WebCore::FTPDirectoryDocumentParser::append): Changed to use currentChar()
89         instead of SegmentedString '*' operator.
90         * html/parser/HTMLEntityParser.cpp: Changed to use currentChar() instead of
91         SegmentedString '*' operator.
92         * html/parser/HTMLParserIdioms.cpp:
93         (WebCore::stripLeadingAndTrailingHTMLSpaces): Added 8-bit fast path.
94         * html/parser/HTMLSourceTracker.cpp:
95         (WebCore::HTMLSourceTracker::sourceForToken): Changed to use currentChar() instead of
96         SegmentedString '*' operator.
97         * loader/cache/CachedScript.cpp:
98         (WebCore::CachedScript::script): Updated to use new String::dataSize() method.
99         * platform/text/SegmentedString.cpp:
100         (WebCore::SegmentedString::SegmentedString):
101         (WebCore::SegmentedString::operator=):
102         (WebCore::SegmentedString::clear):
103         (WebCore::SegmentedString::append):
104         (WebCore::SegmentedString::prepend):
105         (WebCore::SegmentedString::advanceSubstring):
106         (WebCore::SegmentedString::advance): Changed to be a wrapper that invokes current 
107         advance function.
108         (WebCore::SegmentedString::advance8): Fast path advance function for 8 bit data.
109         (WebCore::SegmentedString::advance16): Fast path advance function for 16 bit data.
110         (WebCore::SegmentedString::advanceAndUpdateLineNumber8IncludeLineNumbers): Fast
111         path advanceAndUpdateLineNumber for 8 bit data when we need to update the line number.
112         (WebCore::SegmentedString::advanceAndUpdateLineNumber16IncludeLineNumbers): Fast
113         path advanceAndUpdateLineNumber for 16 bit data when we need to update the line number.
114         (WebCore::SegmentedString::advanceSlowCase): Slow case advance function for both
115         8 and 16 bit advance.
116         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): Slow case
117         advanceAndUpdateLineNumber function for both 8 and 16 bit data.
118         (WebCore::SegmentedString::advanceEmpty): Advance function when input has been exhausted.
119         * platform/text/SegmentedString.h:
120         (WebCore::SegmentedSubstring::SegmentedSubstring):
121         (WebCore::SegmentedSubstring::clear):
122         (SegmentedSubstring):
123         (WebCore::SegmentedSubstring::is8Bit): New getter.
124         (WebCore::SegmentedSubstring::appendTo):
125         (WebCore::SegmentedSubstring::getCurrentChar8): New getter for the 8 bit case.
126         (WebCore::SegmentedSubstring::getCurrentChar16): New getter for the 16 bit case.
127         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar8): New wrapper functions
128         that pre-increments the 8 bit pointer and returns the next character.
129         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar16): New wrapper functions
130         that pre-increments the 16 bit pointer and returns the next character.
131         (WebCore::SegmentedSubstring::currentSubString):
132         (WebCore::SegmentedSubstring::getCurrentChar):
133         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar):
134         (WebCore::SegmentedString::SegmentedString):
135         (WebCore::SegmentedString::push):
136         (WebCore::SegmentedString::isEmpty):
137         (WebCore::SegmentedString::lookAhead):
138         (WebCore::SegmentedString::lookAheadIgnoringCase):
139         (WebCore::SegmentedString::advance):
140         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
141         (WebCore::SegmentedString::advanceAndASSERT):
142         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
143         (WebCore::SegmentedString::advancePastNonNewline):
144         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
145         (WebCore::SegmentedString::currentChar):
146         (WebCore::SegmentedString::setSlowCase): Set advance function pointers to slow case
147         functions.
148         (WebCore::SegmentedString::decrementAndCheckLength): Decrement substring length and
149         change to slow case functions when only one character left.
150         (WebCore::SegmentedString::setAdvanceFunctionPointers): Select appropriate advance
151         functions based on current substring.
152         (WebCore::SegmentedString::lookAheadInline): Changed to use String::startsWith().
153         (WebCore::SegmentedString::lookAheadSlowCase):
154         * xml/parser/CharacterReferenceParserInlineMethods.h:
155         (WebCore::consumeCharacterReference): Changed to use currentChar() instead of
156         SegmentedString '*' operator.
157         * xml/parser/MarkupTokenizerBase.h:
158         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
159         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): Changed to use
160         currentChar() instead of SegmentedString '*' operator.
161         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
162
163 2012-07-25  Sheriff Bot  <webkit.review.bot@gmail.com>
164
165         Unreviewed, rolling out r123625 and r123672.
166         http://trac.webkit.org/changeset/123625
167         http://trac.webkit.org/changeset/123672
168         https://bugs.webkit.org/show_bug.cgi?id=92315
169
170         Broke Windows and gcc builds (Requested by rniwa on #webkit).
171
172         * platform/AutodrainedPool.h:
173         (AutodrainedPool):
174         * platform/ContentType.h:
175         (ContentType):
176         * platform/ContextMenu.h:
177         (ContextMenu):
178         * platform/ContextMenuItem.h:
179         (ContextMenuItem):
180         * platform/Cursor.h:
181         (WebCore::SharedCursor::SharedCursor):
182         (Cursor):
183         * platform/KURL.h:
184         (WebCore::KURL::KURL):
185         (KURL):
186         * platform/KURLGooglePrivate.h:
187         (KURLGooglePrivate):
188         * platform/PODRedBlackTree.h:
189         (WebCore::PODRedBlackTree::PODRedBlackTree):
190         * platform/Pasteboard.h:
191         (Pasteboard):
192         * platform/PlatformEvent.h:
193         (WebCore::PlatformEvent::PlatformEvent):
194         * platform/PlatformKeyboardEvent.h:
195         (PlatformKeyboardEvent):
196         * platform/PlatformMouseEvent.h:
197         (PlatformMouseEvent):
198         * platform/PlatformPasteboard.h:
199         (PlatformPasteboard):
200         * platform/PlatformTouchEvent.h:
201         (PlatformTouchEvent):
202         * platform/PlatformWheelEvent.h:
203         (PlatformWheelEvent):
204         * platform/RunLoop.h:
205         (TimerBase):
206         * platform/ScrollAnimator.h:
207         (ScrollAnimator):
208         * platform/ScrollAnimatorNone.h:
209         (ScrollAnimatorNone):
210         * platform/SharedBuffer.h:
211         (SharedBuffer):
212         * platform/WheelFlingPlatformGestureCurve.h:
213         (WheelFlingPlatformGestureCurve):
214         * platform/Widget.h:
215         (Widget):
216         * platform/network/cf/ResourceRequestCFNet.cpp:
217         (WebCore::ResourceRequest::doUpdateResourceRequest):
218
219 2012-07-25  Ryosuke Niwa  <rniwa@webkit.org>
220
221         Windows build fix attempt after r123625.
222
223         * platform/network/cf/ResourceRequestCFNet.cpp:
224         (WebCore::ResourceRequest::doUpdateResourceRequest):
225
226 2012-07-25  Kwang Yul Seo  <skyul@company100.net>
227
228         Read tag names and attributes from the saved tokens in HTMLTreeBuilder::resetInsertionModeAppropriately.
229         https://bugs.webkit.org/show_bug.cgi?id=92240
230
231         Reviewed by Adam Barth.
232
233         This is a follow-up patch for r123577. Added ItemType enum to HTMLStackItem to handle
234         the context element case.
235
236         No new tests, covered by existing tests.
237
238         * html/parser/HTMLStackItem.h:
239         (WebCore::HTMLStackItem::create):
240         (WebCore::HTMLStackItem::HTMLStackItem):
241         * html/parser/HTMLTreeBuilder.cpp:
242         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
243         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
244
245 2012-07-25  Nico Weber  <thakis@chromium.org>
246
247         [chromium/mac] Remove mac_bundle_resources section from WebCore.gyp
248         https://bugs.webkit.org/show_bug.cgi?id=92207
249
250         Reviewed by Tony Chang.
251
252         It's no longer needed after http://crrev.com/148290 and
253         http://crrev.com/148187.
254
255         * WebCore.gyp/WebCore.gyp:
256
257 2012-07-25  Dana Jansens  <danakj@chromium.org>
258
259         [chromium] Move WebFilterOperations from RenderPassDrawQuad to RenderPass
260         https://bugs.webkit.org/show_bug.cgi?id=91885
261
262         Reviewed by Adrienne Walker.
263
264         We move the filter operations to CCRenderPass to avoid having
265         variable-length data in a WebCompositorQuad in order to serialize,
266         and also to avoid requiring a virtual destructor for the quad
267         classes.
268
269         The drawFrame method now takes a CCRenderPassIdHashMap in order
270         to connect RenderPass quads to their source RenderPass.
271
272         Covered by existing tests.
273
274         * platform/graphics/chromium/LayerRendererChromium.cpp:
275         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
276         (WebCore::LayerRendererChromium::drawFrame):
277         (WebCore::LayerRendererChromium::beginDrawingFrame):
278         (WebCore::LayerRendererChromium::drawBackgroundFilters):
279         (WebCore::LayerRendererChromium::drawRenderPassQuad):
280         * platform/graphics/chromium/LayerRendererChromium.h:
281         (LayerRendererChromium):
282         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
283         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
284         (WebCore::CCLayerTreeHostImpl::drawLayers):
285         * platform/graphics/chromium/cc/CCRenderPass.h:
286         (WebCore::CCRenderPass::filters):
287         (WebCore::CCRenderPass::setFilters):
288         (CCRenderPass):
289         (WebCore::CCRenderPass::backgroundFilters):
290         (WebCore::CCRenderPass::setBackgroundFilters):
291         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
292         (WebCore::CCRenderPassDrawQuad::create):
293         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
294         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
295         (CCRenderPassDrawQuad):
296         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
297         (WebCore::CCRenderSurface::appendQuads):
298         * platform/graphics/chromium/cc/CCRenderer.h:
299         (CCRenderer):
300
301 2012-07-25  Mike Reed  <reed@google.com>
302
303         fix test in beginLayerClippedToImage to check for immutability if we're going to do a shallow-copy
304         https://bugs.webkit.org/show_bug.cgi?id=92276
305
306         Reviewed by Stephen White.
307
308         PlatformContextSkia::beginLayerClippedToImage
309
310         This function wants to apply the provided ImageBuffer as a clip. Skia does not support this natively yet,
311         so the code makes a "copy" of that imageBuffer, to be applied later. The old code, wanting to avoid a
312         deep copy if possible, checked for the presence of a SkPixelRef. If it found one, it made a shallow copy.
313         This is flawed, since the contents of a pixelref are not guaranteed to be immutable. The new code checks
314         against this attribute: if the bitmap is "immutable" then we can make a shallow-copy, else we make a
315         deep copy.
316
317         No new tests. Existing svg layouttests work w/ or w/out this change, but at the next Skia deps roll, we see
318         failures w/o this change. The change is more "correct", though the problem case does not exhibit itself until
319         Skia rev. 4722 or later lands.
320
321         * platform/graphics/skia/PlatformContextSkia.cpp:
322         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
323
324 2012-07-25  Li Yin  <li.yin@intel.com>
325
326         It is invalid when both numberOfInputChannels and numberOfOutputChannels to be zero in JavaScriptAudioNode.
327         https://bugs.webkit.org/show_bug.cgi?id=91364
328
329         Reviewed by Kenneth Russell.
330
331         Spec: http://www.w3.org/TR/webaudio/#JavaScriptAudioNode-section
332         It is invalid for both numberOfInputChannels and numberOfOutputChannels to be zero.
333
334         Test: webaudio/javascriptaudionode.html
335
336         * Modules/webaudio/JavaScriptAudioNode.cpp:
337         (WebCore::JavaScriptAudioNode::create):
338
339 2012-07-24  Shawn Singh  <shawnsingh@chromium.org>
340
341         [chromium] Refactor CCLayerTreeHostCommon: move root layer special case initialization into internal code.
342         https://bugs.webkit.org/show_bug.cgi?id=88953
343
344         Reviewed by Adrienne Walker.
345
346         This is part 1 of trying to reduce the root layer special
347         case. This tries to reduce the special-ness of the root layer from
348         the perspective of outside code.
349
350         After this patch, code that uses calcDrawTransforms() no longer
351         needs to initialize the root layer's surface, and no longer needs
352         to manually append the root layer to the renderSurfaceLayerList.
353
354         Unit tests were also updated (much cleaner!) to account for this change.
355
356         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
357         (WebCore::CCLayerTreeHost::updateLayers):
358         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
359         (WebCore):
360         (WebCore::setupRootLayerAndSurfaceForRecursion):
361         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
362         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
363         (CCLayerTreeHostCommon):
364         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
365         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
366
367 2012-07-25  Taiju Tsuiki  <tzik@chromium.org>
368
369         FileSystem should provide a way to delete filesystem.
370         https://bugs.webkit.org/show_bug.cgi?id=91861
371
372         Reviewed by Adam Barth.
373
374         We will add a test when we wire-up the feature to Inspector.
375
376         * Modules/filesystem/LocalFileSystem.cpp: Add deleteFileSystem
377         (WebCore::deleteFileSystem):
378         (WebCore):
379         (WebCore::LocalFileSystem::deleteFileSystem):
380         * Modules/filesystem/LocalFileSystem.h:
381         (LocalFileSystem):
382         * platform/AsyncFileSystem.cpp: Add deleteFileSystem
383         (WebCore):
384         (WebCore::AsyncFileSystem::deleteFileSystem):
385         * platform/AsyncFileSystem.h:
386         (AsyncFileSystem):
387         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Add deleteFileSystem
388         (WebCore::AsyncFileSystem::deleteFileSystem):
389         (WebCore):
390         * platform/gtk/AsyncFileSystemGtk.cpp: Add deleteFileSystem
391         (WebCore::AsyncFileSystem::deleteFileSystem):
392         (WebCore):
393
394 2012-07-25  Andrey Adaikin  <aandrey@chromium.org>
395
396         Web Inspector: Add more jsdocs to InjectedScriptSource.js
397         https://bugs.webkit.org/show_bug.cgi?id=92255
398
399         Reviewed by Pavel Feldman.
400
401         * inspector/InjectedScriptSource.js:
402
403 2012-07-24  Dana Jansens  <danakj@chromium.org>
404
405         [chromium] Turn the debug HUD into a layer so that it can be drawn as a WebCompositorQuad
406         https://bugs.webkit.org/show_bug.cgi?id=92182
407
408         Reviewed by Adrienne Walker.
409
410         By changing the HUD into a quad, we are able to create a HUD and pass
411         it to the host compositor, allowing the HUD to be used for renderers
412         under Ubercompositor.
413
414         This also removes the special drawing code for the HUD from
415         LayerRendererChromium, allowing us to move finishDrawingFrame
416         into LayerRendererChromium as a private method and remove it
417         from the CCRenderer interface.
418
419         Finally, we can remove the CCFontAtlas transport code from CCProxy
420         and its implementations as the atlas can be synced to impl thread
421         through the usual layer commit mechanism.
422
423         The debug HUD is not covered by tests.
424
425         * WebCore.gypi:
426         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp: Added.
427         (WebCore):
428         (WebCore::HeadsUpDisplayLayerChromium::create):
429         (WebCore::HeadsUpDisplayLayerChromium::HeadsUpDisplayLayerChromium):
430         (WebCore::HeadsUpDisplayLayerChromium::~HeadsUpDisplayLayerChromium):
431         (WebCore::HeadsUpDisplayLayerChromium::createCCLayerImpl):
432         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.h: Added.
433         (WebCore):
434         (HeadsUpDisplayLayerChromium):
435         * platform/graphics/chromium/LayerRendererChromium.cpp:
436         (WebCore::LayerRendererChromium::drawFrame):
437         (WebCore::LayerRendererChromium::cleanupSharedObjects):
438         * platform/graphics/chromium/LayerRendererChromium.h:
439         (LayerRendererChromium):
440         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
441         (WebCore::CCDebugRectHistory::savePropertyChangedRects):
442         * platform/graphics/chromium/cc/CCDebugRectHistory.h:
443         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp.
444         (WebCore):
445         (WebCore::CCHeadsUpDisplayLayerImpl::CCHeadsUpDisplayLayerImpl):
446         (WebCore::CCHeadsUpDisplayLayerImpl::~CCHeadsUpDisplayLayerImpl):
447         (WebCore::CCHeadsUpDisplayLayerImpl::willDraw):
448         (WebCore::CCHeadsUpDisplayLayerImpl::appendQuads):
449         (WebCore::CCHeadsUpDisplayLayerImpl::didDraw):
450         (WebCore::CCHeadsUpDisplayLayerImpl::didLoseContext):
451         (WebCore::CCHeadsUpDisplayLayerImpl::drawHudContents):
452         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounter):
453         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounterText):
454         (WebCore::CCHeadsUpDisplayLayerImpl::drawDebugRects):
455         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h.
456         (WebCore):
457         (CCHeadsUpDisplayLayerImpl):
458         (WebCore::CCHeadsUpDisplayLayerImpl::create):
459         * platform/graphics/chromium/cc/CCLayerImpl.h:
460         (WebCore::CCLayerImpl::layerIsAlwaysDamaged):
461         This flag is used to mark the HUD as always damaged, so that it is
462         continually drawn on the impl thread. It is also used as a hint by
463         the CCDebugRectHistory class to not include the layer in the display
464         of damage, since always damaged is not interesting damage.
465         (CCLayerImpl):
466         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
467         (WebCore::CCLayerTreeHost::create):
468         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
469         (WebCore::CCLayerTreeHost::initialize):
470         (WebCore::CCLayerTreeHost::willCommit):
471         (WebCore::CCLayerTreeHost::didCommit):
472         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
473         (CCLayerTreeSettings):
474         (WebCore::CCLayerTreeSettings::showDebugInfo):
475         (WebCore::CCLayerTreeSettings::showDebugRects):
476         (CCLayerTreeHost):
477         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
478         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
479         (WebCore::CCLayerTreeHostImpl::drawLayers):
480         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
481         (WebCore):
482         (CCLayerTreeHostImpl):
483         * platform/graphics/chromium/cc/CCProxy.h:
484         (CCProxy):
485         * platform/graphics/chromium/cc/CCRenderer.h:
486         (CCRenderer):
487         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
488         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
489         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
490         * platform/graphics/chromium/cc/CCThreadProxy.h:
491         (CCThreadProxy):
492
493 2012-07-25  'Pavel Feldman'  <pfeldman@chromium.org>
494
495         Web Inspector: follow up to r123612, fixing CSS value suggest.
496
497         Not reviewed, minor JS fix.
498
499         * inspector/front-end/CSSCompletions.js:
500         (WebInspector.CSSCompletions):
501         * inspector/front-end/StylesSidebarPane.js:
502         (WebInspector.StylePropertyTreeElement.prototype):
503
504 2012-07-25  Michael Saboff  <msaboff@apple.com>
505
506         Unreviewed build fix after r123624.
507
508         * inspector/InspectorPageAgent.cpp:
509         (WebCore::InspectorPageAgent::clearGeolocationOverride):
510         Changed ASSERT_UNUSED() to UNUSED_PARAM().
511
512 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
513
514         Web inspector auto-completes "optimizequality" but then complains
515         https://bugs.webkit.org/show_bug.cgi?id=92262
516
517         Reviewed by Timothy Hatcher.
518
519         Fixed optimizeSpeed, optimizeLegibility, geometricPrecision.
520
521         * inspector/front-end/CSSKeywordCompletions.js:
522
523 2012-07-25  Beth Dakin  <bdakin@apple.com>
524
525         https://bugs.webkit.org/show_bug.cgi?id=89114
526         REGRESSION (r112919): Setting scrollTop after setting display from none to block 
527         fails
528         -and corresponding-
529         <rdar://problem/11656050>
530
531         Reviewed by Simon Fraser.
532
533         ScrollAnimatorMac::immediateScrollTo() and ScrollAnimatorMac::immediateScrollBy() 
534         both have an optimization in place so that they do not call 
535         notifyPositionChanged() if the new scroll offset matches the ScrollAnimator's 
536         cached m_currentPosX and m_currentPosY. So revision 112919 caused troubled with 
537         this optimization because it allowed RenderLayers to restore a scrollOffset from 
538         the Element if there is one cached there. This caused the RenderLayer to have a 
539         scrollOffset that is improperly out-of-synch with the ScrollAnimator's 
540         currentPosition (which will just be 0,0 since it is being re-created like the 
541         RenderLayer). This fix makes sure they are in synch by calling 
542         setCurrentPosition() on the ScrollAnimator when the cached position is non-zero.
543         * rendering/RenderLayer.cpp:
544         (WebCore::RenderLayer::RenderLayer):
545
546 2012-07-25  Andreas Kling  <kling@webkit.org>
547
548         Make ElementAttributeData a variable-sized object to reduce memory use.
549         <http://webkit.org/b/88240>
550
551         Reviewed by Ryosuke Niwa.
552
553         Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
554         it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
555         For elements that never have their attribute list mutated (the vast majority), this saves a lot of
556         memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
557
558         Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
559         that nothing tries to mutate an element with a raw attribute array.
560
561         When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
562         a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
563
564         This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
565         That is a ~35% reduction in DOM attribute memory use.
566
567         Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
568         adding of "class" attributes. For more static pages, savings are even greater.
569
570         Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where
571         needed. Not a big deal but avoids double lookup of attributes when removing them.
572
573         * dom/Element.cpp:
574         (WebCore::Element::detachAttribute):
575         (WebCore::Element::removeAttribute):
576         (WebCore::Element::attributes):
577         (WebCore::Element::setAttributeInternal):
578         (WebCore::Element::parserSetAttributes):
579         (WebCore::Element::hasEquivalentAttributes):
580         (WebCore::Element::setAttributeNode):
581         (WebCore::Element::removeAttributeNode):
582         (WebCore::Element::getAttributeNode):
583         (WebCore::Element::getAttributeNodeNS):
584         (WebCore::Element::hasAttribute):
585         (WebCore::Element::hasAttributeNS):
586         (WebCore::Element::cloneAttributesFromElement):
587
588             Sprinkle const on ElementAttributeData* pointers.
589             Switch to using mutableAttributeData() in code paths that modify attributes.
590
591         (WebCore::Element::normalizeAttributes):
592
593             Cleaner iteration over attributes, I removed ElementAttributeData::attributeVector() since that
594             was just incurring a bunch of extra Vector copying. Since ElementAttributeData already exposes
595             length() and attributeItem(index), use those to iterate directly over the attributes.
596
597         (WebCore::Element::createMutableAttributeData):
598
599             Added, converts existing ElementAttributeData to a mutable object. Otherwise creates a new
600             ElementAttributeData (mutable and empty.)
601
602         * dom/Element.h:
603         (WebCore::Element::attributeData):
604         (WebCore::Element::updatedAttributeData):
605         (WebCore::Element::ensureAttributeData):
606         (WebCore::Element::ensureUpdatedAttributeData):
607
608             Made all of these return "const ElementAttributeData*" to ensure at compile-time that nothing
609             attempts to modify an ElementAttributeData that may be immutable.
610
611             ensureUpdatedAttributeData() is still const, despite possibly calling mutableAttributeData().
612             The goal of having methods be const is to prevent conversion from one ElementAttributeData
613             object to another, so that pointers remain intact and no unnecessary work gets done.
614
615         (WebCore::Element::mutableAttributeData):
616
617             Added, returns a guaranteed mutable ElementAttributeData* pointer.
618
619         * dom/ElementAttributeData.cpp:
620         (WebCore::ElementAttributeData::createImmutable):
621
622             Creates a new ElementAttributeData tailored to fit the provided Vector<Attribute>.
623
624         (WebCore::ElementAttributeData::ElementAttributeData):
625
626             Moved constructors out-of-line, getting too complex for header files.
627
628             ElementAttributeData(const Vector<Attribute>&) creates an immutable ElementAttributeData
629             containing the provided attributes in an array tacked onto the end of the object.
630
631         (WebCore::ElementAttributeData::~ElementAttributeData):
632
633             Free the attribute vector if mutable.
634             For immutable objects, manually invoke destructor on each Attribute object,
635             since these won't be destroyed automatically by ~ElementAttributeData.
636
637         (WebCore::ElementAttributeData::attrIfExists):
638
639         (WebCore::ElementAttributeData::ensureAttr):
640         (WebCore::ElementAttributeData::setAttr):
641         (WebCore::ElementAttributeData::removeAttr):
642
643             Make these const, as they should always have been- they don't affect the ElementAttributeData,
644             only the global DOM Attr <-> ElementAttributeData mappings.
645
646         (WebCore::ElementAttributeData::ensureInlineStyle):
647         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
648
649             Sprinkle ASSERT(isMutable()). This doesn't mean that all Elements with inline styles automatically
650             have mutable attribute data. There's still inlineStyle() for that, which may return null.
651             These are only for use where you need a valid StylePropertySet*, even if there is no inline style
652             attribute, e.g in editing code that wants to add style.
653
654         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
655         (WebCore::ElementAttributeData::destroyInlineStyle):
656
657             Make these const. While destroyInlineStyle() doesn't sound very const-y, immutable objects that
658             contain a style attribute will have a valid inlineStyle() with that style data. This is just
659             an interface for ~StyledElement to destroy the style object.
660             It'd be nice to do that in ~ElementAttributeData(), but we need a StyledElement* pointer to
661             clean up properly and we don't store one in this class.
662
663         (WebCore::ElementAttributeData::addAttribute):
664         (WebCore::ElementAttributeData::removeAttribute):
665         (WebCore::ElementAttributeData::clearAttributes):
666         (WebCore::ElementAttributeData::replaceAttribute):
667
668             Sprinkle ASSERT(isMutable()).
669             Always go straight for m_mutableAttributeVector since we know that's the storage being used.
670
671         (WebCore::ElementAttributeData::isEquivalent):
672         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
673         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
674         (WebCore::ElementAttributeData::removeAttribute):
675         (WebCore::ElementAttributeData::getAttributeItem):
676         (WebCore::ElementAttributeData::getAttributeItemIndex):
677
678             Use length() and attributeItem(index) to iterate over the attributes.
679
680         (WebCore::ElementAttributeData::cloneDataFrom):
681
682             Sprinkle ASSERT(isMutable()). Added a FIXME that cloning elements could create immutable
683             attribute data. I'm not sure this optimization is worthwhile, as cloning elements is already
684             a semi-rare occurrence.
685
686             Updated code to handle both immutable and mutable source objects. This could 
687
688         (WebCore::ElementAttributeData::getAttributeNode):
689
690             Const correctness.
691
692         * dom/ElementAttributeData.h:
693         (ElementAttributeData):
694
695             Turn attribute storage into what's effectively union { OwnPtr<Vector<Attribute>>; Attribute[]; }
696             The new m_isMutable bit determines which union member should be used for access.
697
698         (WebCore::ElementAttributeData::create):
699         (WebCore::ElementAttributeData::createImmutable):
700
701             Added createImmutable(const Vector<Attribute>&) as a complement to create().
702
703         (WebCore::ElementAttributeData::setClass):
704         (WebCore::ElementAttributeData::setIdForStyleResolution):
705         (WebCore::ElementAttributeData::inlineStyle):
706         (WebCore::ElementAttributeData::setAttributeStyle):
707
708             Make these const, and their data member counterparts 'mutable'.
709             An immutable ElementAttributeData object still has m_classNames, m_idForStyleResolution,
710             m_inlineStyleDecl and m_attributeStyle.
711
712         (WebCore::ElementAttributeData::reportMemoryUsage):
713
714             Updated for isMutable().
715
716         (WebCore::ElementAttributeData::makeMutable):
717
718             Returns a mutable clone of itself.
719
720         (WebCore::ElementAttributeData::isEmpty):
721         (WebCore::ElementAttributeData::length):
722         (WebCore::ElementAttributeData::attributeItem):
723
724             Check isMutable() to know how to access attribute storage.
725
726         * dom/StyledElement.cpp:
727         (WebCore::StyledElement::style):
728         (WebCore::StyledElement::setInlineStyleProperty):
729
730             Simplify by using StyledElement::ensureInlineStyle().
731
732         (WebCore::StyledElement::classAttributeChanged):
733
734             Use mutableAttributeData() if the attribute is being removed completely.
735             In other cases, tiptoe around without causing the attribute data to go mutable.
736
737         (WebCore::StyledElement::removeInlineStyleProperty):
738
739             Use mutableAttributeData() if/when actually removing something.
740
741         (WebCore::StyledElement::addSubresourceAttributeURLs):
742
743             Const correctness.
744
745         * dom/StyledElement.h:
746         (WebCore::StyledElement::ensureInlineStyle):
747
748             This now implies conversion to mutable attribute data. Used by codepaths that add/remove
749             properties, so conversion is inevitable.
750
751         * html/parser/HTMLConstructionSite.cpp:
752         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
753         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
754         * svg/properties/SVGAnimatedPropertyMacros.h:
755         (WebCore::SVGSynchronizableAnimatedProperty::synchronize):
756
757             Use mutableAttributeData() as appropriate.
758
759         * xml/parser/XMLDocumentParserQt.cpp:
760         (WebCore::XMLDocumentParser::XMLDocumentParser):
761
762             Const correctness.
763
764 2012-07-25  Andrew Wilson  <atwilson@chromium.org>
765
766         Unreviewed, rolling out r123560.
767         http://trac.webkit.org/changeset/123560
768         https://bugs.webkit.org/show_bug.cgi?id=90321
769
770         Breaks chromium valgrind tests.
771
772         * html/FTPDirectoryDocument.cpp:
773         (WebCore::FTPDirectoryDocumentParser::append):
774         * html/parser/HTMLEntityParser.cpp:
775         (WebCore::HTMLEntityParser::consumeNamedEntity):
776         * html/parser/HTMLParserIdioms.cpp:
777         (WebCore::stripLeadingAndTrailingHTMLSpaces):
778         * html/parser/HTMLSourceTracker.cpp:
779         (WebCore::HTMLSourceTracker::sourceForToken):
780         * loader/cache/CachedScript.cpp:
781         (WebCore::CachedScript::script):
782         * platform/text/SegmentedString.cpp:
783         (WebCore::SegmentedString::SegmentedString):
784         (WebCore::SegmentedString::operator=):
785         (WebCore::SegmentedString::clear):
786         (WebCore::SegmentedString::append):
787         (WebCore::SegmentedString::prepend):
788         (WebCore::SegmentedString::advanceSubstring):
789         (WebCore::SegmentedString::advance):
790         (WebCore::SegmentedString::advanceSlowCase):
791         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase):
792         * platform/text/SegmentedString.h:
793         (WebCore::SegmentedSubstring::SegmentedSubstring):
794         (WebCore::SegmentedSubstring::clear):
795         (WebCore::SegmentedSubstring::appendTo):
796         (SegmentedSubstring):
797         (WebCore::SegmentedString::SegmentedString):
798         (WebCore::SegmentedString::push):
799         (WebCore::SegmentedString::isEmpty):
800         (WebCore::SegmentedString::lookAhead):
801         (WebCore::SegmentedString::lookAheadIgnoringCase):
802         (WebCore::SegmentedString::advance):
803         (WebCore::SegmentedString::advanceAndASSERT):
804         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
805         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
806         (SegmentedString):
807         (WebCore::SegmentedString::advancePastNonNewline):
808         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
809         (WebCore::SegmentedString::operator*):
810         (WebCore::SegmentedString::operator->):
811         (WebCore::SegmentedString::current):
812         (WebCore::SegmentedString::equalsLiterally):
813         (WebCore::SegmentedString::equalsIgnoringCase):
814         (WebCore::SegmentedString::lookAheadInline):
815         (WebCore::SegmentedString::lookAheadSlowCase):
816         * xml/parser/CharacterReferenceParserInlineMethods.h:
817         (WebCore::consumeCharacterReference):
818         * xml/parser/MarkupTokenizerBase.h:
819         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
820         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek):
821         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
822
823 2012-07-25  Konrad Piascik  <kpiascik@rim.com>
824
825         Web Inspector: Geolocation override
826         https://bugs.webkit.org/show_bug.cgi?id=89365
827
828         Reviewed by Pavel Feldman.
829
830         Re-added the m_page member variable for GeolocationController since
831         it's now being used by InspectorInstrumentaiton.
832
833         Added a way to override the GeolocationPosition and GeolocationError
834         using Web Inspector. Curretnly only PositionError can be set.
835
836         This will be hidden behind the experiments flag for now.
837
838         Tests: inspector/geolocation-error.html
839                inspector/geolocation-success.html
840                inspector/geolocation-watchPosition.html
841
842         * English.lproj/localizedStrings.js:
843         * Modules/geolocation/GeolocationController.cpp:
844         (WebCore::GeolocationController::GeolocationController):
845         (WebCore::GeolocationController::positionChanged):
846         * Modules/geolocation/GeolocationController.h:
847         (GeolocationController):
848         * inspector/Inspector.json:
849         * inspector/InspectorInstrumentation.cpp:
850         (WebCore):
851         (WebCore::InspectorInstrumentation::overrideGeolocationPositionImpl):
852         * inspector/InspectorInstrumentation.h:
853         (WebCore):
854         (InspectorInstrumentation):
855         (WebCore::InspectorInstrumentation::overrideGeolocationPosition):
856         * inspector/InspectorPageAgent.cpp:
857         (WebCore::InspectorPageAgent::InspectorPageAgent):
858         (WebCore::InspectorPageAgent::setGeolocationOverride):
859         (WebCore):
860         (WebCore::InspectorPageAgent::clearGeolocationOverride):
861         (WebCore::InspectorPageAgent::canOverrideGeolocation):
862         (WebCore::InspectorPageAgent::overrideGeolocationPosition):
863         * inspector/InspectorPageAgent.h:
864         * inspector/front-end/Settings.js:
865         * inspector/front-end/SettingsScreen.js:
866         (WebInspector.UserAgentSettingsTab):
867         (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
868         (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked):
869         (WebInspector.UserAgentSettingsTab.prototype._applyGeolocationUserInput):
870         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition.set if):
871         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition):
872         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement.createInput):
873         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement):
874         * inspector/front-end/UserAgentSupport.js:
875         (WebInspector.UserAgentSupport.GeolocationPosition):
876         (WebInspector.UserAgentSupport.GeolocationPosition.prototype.toSetting):
877         (WebInspector.UserAgentSupport.GeolocationPosition.parseSetting):
878         (WebInspector.UserAgentSupport.GeolocationPosition.parseUserInput):
879         (WebInspector.UserAgentSupport.GeolocationPosition.clearGeolocationOverride):
880         * inspector/front-end/inspector.js:
881         (WebInspector.doLoadedDone):
882
883 2012-07-25  Shawn Singh  <shawnsingh@chromium.org>
884
885         [chromium] Build fix for clang builds after r123628
886         https://bugs.webkit.org/show_bug.cgi?id=92266
887
888         Reviewed by Adrienne Walker.
889
890         An un-used variable was causing build failures for clang builds
891         after the refactoring in r123628.  It is correct to simply remove
892         this value.
893
894         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
895         (WebCore::calculateDrawTransformsInternal):
896
897 2012-07-25  Hans Wennborg  <hans@chromium.org>
898
899         Speech JavaScript API: extract function from SpeechRecognitionResult::emma()
900         https://bugs.webkit.org/show_bug.cgi?id=92232
901
902         Reviewed by Adam Barth.
903
904         Extract code for creating emma-qualified names to a helper function.
905
906         Just a refactoring; covered by the existing test.
907
908         * Modules/speech/SpeechRecognitionResult.cpp:
909         (WebCore::emmaQualifiedName):
910         (WebCore):
911         (WebCore::SpeechRecognitionResult::emma):
912
913 2012-07-25  Adrienne Walker  <enne@google.com>
914
915         [chromium] Unify compositor quadTransform/drawTransform/originTransform
916         https://bugs.webkit.org/show_bug.cgi?id=91417
917
918         Reviewed by Kenneth Russell.
919
920         drawTransform used to operate on centered layer rects. To unify quad
921         transforms, draw transforms, and origin transforms, make draw
922         transforms operate on content rects with the origin in the top left.
923
924         This essentially eliminates the need for surface origin transforms,
925         which will be eliminated in a future patch.
926
927         Also, remove the unused CCLayerImpl::getDrawRect function.
928
929         No-op refactoring. Tested by existing tests.
930
931         * platform/graphics/chromium/LayerRendererChromium.cpp:
932         (WebCore::LayerRendererChromium::drawRenderPassQuad):
933         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
934         (WebCore::RenderSurfaceChromium::drawableContentRect):
935         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
936         (WebCore::CCDamageTracker::extendDamageForLayer):
937         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
938         (WebCore::CCLayerImpl::createSharedQuadState):
939         * platform/graphics/chromium/cc/CCLayerImpl.h:
940         (CCLayerImpl):
941         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
942         (WebCore::CCLayerSorter::LayerShape::LayerShape):
943         (WebCore::CCLayerSorter::createGraphNodes):
944         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
945         (WebCore::calculateVisibleContentRect):
946         (WebCore::calculateDrawTransformsInternal):
947         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
948         (WebCore::::markOccludedBehindLayer):
949         (WebCore::::occluded):
950         (WebCore::::unoccludedContentRect):
951         * platform/graphics/chromium/cc/CCRenderPass.cpp:
952         (WebCore::CCRenderPass::appendQuadsToFillScreen):
953         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
954         (WebCore::CCRenderSurface::drawableContentRect):
955
956 2012-07-25  Tommy Widenflycht  <tommyw@google.com>
957
958         MediaStream API: Update MediaStreamTrack to match the specification
959         https://bugs.webkit.org/show_bug.cgi?id=90180
960
961         Reviewed by Adam Barth.
962
963         MediaStreamTracks are now required to show the status of the underlying source,
964         and trigger events when that status changes.
965
966         Test: fast/mediastream/MediaStreamTrack.html
967
968         * GNUmakefile.list.am:
969         * Modules/mediastream/MediaStream.cpp:
970         (WebCore::MediaStream::MediaStream):
971         (WebCore::MediaStream::addTrack):
972         * Modules/mediastream/MediaStreamTrack.cpp:
973         (WebCore::MediaStreamTrack::create):
974         (WebCore::MediaStreamTrack::MediaStreamTrack):
975         (WebCore::MediaStreamTrack::~MediaStreamTrack):
976         (WebCore::MediaStreamTrack::setEnabled):
977         (WebCore::MediaStreamTrack::readyState):
978         (WebCore):
979         (WebCore::MediaStreamTrack::sourceChangedState):
980         (WebCore::MediaStreamTrack::stop):
981         (WebCore::MediaStreamTrack::interfaceName):
982         (WebCore::MediaStreamTrack::scriptExecutionContext):
983         (WebCore::MediaStreamTrack::eventTargetData):
984         (WebCore::MediaStreamTrack::ensureEventTargetData):
985         * Modules/mediastream/MediaStreamTrack.h:
986         * Modules/mediastream/MediaStreamTrack.idl:
987         * WebCore.gypi:
988         * dom/EventNames.h:
989         (WebCore):
990         * dom/EventTargetFactory.in:
991         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
992         * platform/chromium/support/WebMediaStreamSource.cpp:
993         (WebKit::WebMediaStreamSource::setReadyState):
994         (WebKit):
995         (WebKit::WebMediaStreamSource::readyState):
996         * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
997         (WebCore):
998         (WebCore::MediaStreamSource::create):
999         (WebCore::MediaStreamSource::MediaStreamSource):
1000         (WebCore::MediaStreamSource::setReadyState):
1001         (WebCore::MediaStreamSource::addObserver):
1002         (WebCore::MediaStreamSource::removeObserver):
1003         * platform/mediastream/MediaStreamSource.h:
1004         (Observer):
1005         (WebCore::MediaStreamSource::Observer::~Observer):
1006         (MediaStreamSource):
1007         (WebCore::MediaStreamSource::readyState):
1008         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
1009         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
1010         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
1011
1012 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1013
1014         Incorrect rounding in ceiledLayoutUnit and roundedLayoutUnit.
1015         https://bugs.webkit.org/show_bug.cgi?id=91061
1016
1017         Reviewed by Adam Barth.
1018
1019         The two functions are currently both returning the flooredLayoutUnit when subpixel
1020         layout is enabled. This patch changes them to return the correct fractional rounded
1021         value.
1022
1023         * platform/FractionalLayoutUnit.h:
1024         (WebCore::FractionalLayoutUnit::fromFloatCeil):
1025         (FractionalLayoutUnit):
1026         (WebCore::FractionalLayoutUnit::fromFloatRound):
1027         * rendering/LayoutTypes.h:
1028         (WebCore::roundedLayoutUnit):
1029         (WebCore::ceiledLayoutUnit):
1030         * rendering/RenderBlock.cpp:
1031         (WebCore::updatePreferredWidth):
1032
1033 2012-07-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1034
1035         Add *explicit* keyword to constructors in WebCore/platform
1036         https://bugs.webkit.org/show_bug.cgi?id=92238
1037
1038         Reviewed by Kentaro Hara.
1039
1040         As a step to let *explicit* keyword add to constructors which have a parameter,
1041         *explicit* keyword is added to Source/WebCore/platform in order to avoid implicit
1042         type conversion.
1043
1044         Some files in platform directory can't use explicit keyword because of build breaks.
1045
1046         No new tests. Covered by existing tests.
1047
1048         * platform/AutodrainedPool.h:
1049         (AutodrainedPool):
1050         * platform/ContentType.h:
1051         (ContentType):
1052         * platform/ContextMenu.h:
1053         (ContextMenu):
1054         * platform/ContextMenuItem.h:
1055         (ContextMenuItem):
1056         * platform/Cursor.h:
1057         (WebCore::SharedCursor::SharedCursor):
1058         (Cursor):
1059         * platform/KURL.h:
1060         (WebCore::KURL::KURL):
1061         (KURL):
1062         * platform/KURLGooglePrivate.h:
1063         (KURLGooglePrivate):
1064         * platform/PODRedBlackTree.h:
1065         (WebCore::PODRedBlackTree::PODRedBlackTree):
1066         * platform/Pasteboard.h:
1067         (Pasteboard):
1068         * platform/PlatformEvent.h:
1069         (WebCore::PlatformEvent::PlatformEvent):
1070         * platform/PlatformKeyboardEvent.h:
1071         (PlatformKeyboardEvent):
1072         * platform/PlatformMouseEvent.h:
1073         (PlatformMouseEvent):
1074         * platform/PlatformPasteboard.h:
1075         (PlatformPasteboard):
1076         * platform/PlatformTouchEvent.h:
1077         (PlatformTouchEvent):
1078         * platform/PlatformWheelEvent.h:
1079         (PlatformWheelEvent):
1080         * platform/RunLoop.h:
1081         (TimerBase):
1082         * platform/ScrollAnimator.h:
1083         (ScrollAnimator):
1084         * platform/ScrollAnimatorNone.h:
1085         (ScrollAnimatorNone):
1086         * platform/SharedBuffer.h:
1087         (SharedBuffer):
1088         * platform/WheelFlingPlatformGestureCurve.h:
1089         (WheelFlingPlatformGestureCurve):
1090         * platform/Widget.h:
1091         (Widget):
1092
1093 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1094
1095         NodesFromRect and area-based hit-testing can not handle CSS transforms.
1096         https://bugs.webkit.org/show_bug.cgi?id=85792
1097
1098         Reviewed by Eric Seidel.
1099
1100         To support the combination of CSS transforms and rect based hit testing,
1101         we need to test against the transformed rect, instead of the original rect.
1102
1103         This patch makes HitTestPoint store the exact transformed FloatPoint and 
1104         FloatQuad, and modifies the intersection methods so that they will use a 
1105         new FloatQuad based intersection when transforms requires it.
1106
1107         Tests: fast/dom/nodesFromRect/nodesFromRect-rotate.html
1108                fast/dom/nodesFromRect/nodesFromRect-scale.html
1109
1110         * platform/graphics/FloatQuad.cpp:
1111         (WebCore::determinant):
1112         (WebCore::rightMostCornerToVector):
1113         (WebCore::FloatQuad::intersectsRect):
1114         (WebCore::FloatQuad::isCounterclockwise):
1115         * platform/graphics/FloatQuad.h:
1116         (FloatQuad):
1117         * rendering/HitTestResult.cpp:
1118         (WebCore::HitTestPoint::HitTestPoint):
1119         (WebCore::HitTestPoint::operator=):
1120         (WebCore::HitTestPoint::move):
1121         (WebCore::HitTestPoint::intersectsRect):
1122         (WebCore::HitTestPoint::intersects):
1123         * rendering/HitTestResult.h:
1124         (HitTestPoint):
1125         (WebCore::HitTestPoint::isRectilinear):
1126         (WebCore::HitTestPoint::transformedPoint):
1127         (WebCore::HitTestPoint::transformedRect):
1128         * rendering/HitTestingTransformState.cpp:
1129         (WebCore::HitTestingTransformState::flattenWithTransform):
1130         (WebCore::HitTestingTransformState::mappedArea):
1131         (WebCore::HitTestingTransformState::boundsOfMappedArea):
1132         * rendering/HitTestingTransformState.h:
1133         (WebCore::HitTestingTransformState::create):
1134         (WebCore::HitTestingTransformState::HitTestingTransformState):
1135         * rendering/RenderFlowThread.cpp:
1136         (WebCore::RenderFlowThread::hitTestRegion):
1137         * rendering/RenderLayer.cpp:
1138         (WebCore::RenderLayer::hitTest):
1139         (WebCore::RenderLayer::createLocalTransformState):
1140         (WebCore::RenderLayer::hitTestLayer):
1141         (WebCore::RenderLayer::hitTestChildLayerColumns):
1142         * rendering/RenderLayer.h:
1143         * rendering/svg/RenderSVGText.cpp:
1144         (WebCore::RenderSVGText::nodeAtFloatPoint):
1145
1146 2012-07-25  Kwang Yul Seo  <skyul@company100.net>
1147
1148         Add HTMLStackItem.h to project files
1149         https://bugs.webkit.org/show_bug.cgi?id=92221
1150
1151         Reviewed by Adam Barth.
1152
1153         Added HTMLStackItem.h introduced in r123399 to project files.
1154
1155         Project file changes only, no change in behavior thus no new tests.
1156
1157         * GNUmakefile.list.am:
1158         * WebCore.gypi:
1159         * WebCore.vcproj/WebCore.vcproj:
1160         * WebCore.xcodeproj/project.pbxproj:
1161
1162 2012-07-25  Sheriff Bot  <webkit.review.bot@gmail.com>
1163
1164         Unreviewed, rolling out r123606.
1165         http://trac.webkit.org/changeset/123606
1166         https://bugs.webkit.org/show_bug.cgi?id=92247
1167
1168         broke Windows build of Chromium (Requested by tomhudson on
1169         #webkit).
1170
1171         * Resources/colorSuggestionPicker.css: Removed.
1172         * Resources/colorSuggestionPicker.js: Removed.
1173         * WebCore.gyp/WebCore.gyp:
1174
1175 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
1176
1177         Web Inspector: disabling property should remove "overriden" decoration from overriden UA shorthand.
1178         https://bugs.webkit.org/show_bug.cgi?id=92253
1179
1180         Reviewed by Vsevolod Vlasov.
1181
1182         Bug fix with a test and more compilation markup.
1183
1184         Test: inspector/styles/styles-disable-then-enable-overriden-ua.html
1185
1186         * inspector/front-end/StylesSidebarPane.js:
1187         (WebInspector.StylePropertiesSection.prototype.update):
1188         (WebInspector.StylePropertyTreeElement):
1189         (WebInspector.StylePropertyTreeElement.prototype):
1190
1191 2012-07-25  Vsevolod Vlasov  <vsevik@chromium.org>
1192
1193         Web Inspector: Improve ObjectPropertiesSection UI by adding a tooltip for the value.
1194         https://bugs.webkit.org/show_bug.cgi?id=92225
1195
1196         Reviewed by Pavel Feldman.
1197
1198         Added tooltip with property value description on the property's valueElement.
1199
1200         * inspector/front-end/ObjectPropertiesSection.js:
1201         (WebInspector.ObjectPropertyTreeElement.prototype.update):
1202
1203 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
1204
1205         https://bugs.webkit.org/show_bug.cgi?id=91931
1206
1207         Reviewed by Vsevolod Vlasov.
1208
1209         - Synthetic shorthand values are now only returned for source-less styles
1210         - CSSAgents reports longhands along with the property names in getSupportedCSSProperties
1211         - StylesSidebarPane now has two paths: for source-enabled styles and for CSSOM-based ones (UA styles)
1212         - CSSStyleModel uses style metainfo as a source of shorthand / longhand relationship now
1213
1214         Test: inspector/styles/styles-overriden-properties.html
1215
1216         * inspector/Inspector.json:
1217         * inspector/InspectorCSSAgent.cpp:
1218         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
1219         * inspector/InspectorCSSAgent.h:
1220         (InspectorCSSAgent):
1221         * inspector/InspectorStyleSheet.cpp:
1222         (WebCore::InspectorStyle::styleWithProperties):
1223         * inspector/front-end/CSSCompletions.js:
1224         (WebInspector.CSSCompletions):
1225         (WebInspector.CSSCompletions.requestCSSNameCompletions):
1226         (WebInspector.CSSCompletions.prototype._closest):
1227         (WebInspector.CSSCompletions.prototype.longhands):
1228         (WebInspector.CSSCompletions.prototype.shorthands):
1229         * inspector/front-end/CSSStyleModel.js:
1230         (WebInspector.CSSStyleDeclaration):
1231         (WebInspector.CSSStyleDeclaration.prototype.longhandProperties):
1232         (WebInspector.CSSStyleDeclaration.prototype.shorthandValue):
1233         (WebInspector.CSSStyleDeclaration.prototype.newBlankProperty):
1234         (WebInspector.CSSProperty):
1235         (WebInspector.CSSProperty.parsePayload):
1236         * inspector/front-end/SourceCSSTokenizer.js:
1237         (WebInspector.SourceCSSTokenizer):
1238         * inspector/front-end/SourceCSSTokenizer.re2js:
1239         * inspector/front-end/StylesSidebarPane.js:
1240         (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded):
1241         (WebInspector.StylePropertiesSection.prototype.update):
1242         (WebInspector.StylePropertiesSection.prototype.onpopulate):
1243         (WebInspector.StylePropertyTreeElement.prototype):
1244
1245 2012-07-25  Keishi Hattori  <keishi@webkit.org>
1246
1247         Implement ColorSuggestionPicker page popup
1248         https://bugs.webkit.org/show_bug.cgi?id=92109
1249
1250         Reviewed by Kent Tamura.
1251
1252         Implements ColorSuggestionPicker page popup. This will be used in
1253         certain ports as the datalist UI for <input type=color>.
1254
1255         No new tests because there is no way to open the popup yet.
1256
1257         * Resources/colorSuggestionPicker.css: Added.
1258         (body):
1259         (#main):
1260         (.color-swatch):
1261         (.color-swatch:hover):
1262         (.color-swatch-container):
1263         (.other-color):
1264         * Resources/colorSuggestionPicker.js: Added.
1265         (getScrollbarWidth):When there are more than 20 colors we need to
1266         increase the window width to accommodate the scroll bar.
1267         (createElement):
1268         (handleMessage):
1269         (initialize):
1270         (handleArgumentsTimeout):
1271         (validateArguments):
1272         (submitValue): Calls setValueAndClosePopup with a numValue of 0.
1273         (handleCancel): Calls setValueAndClosePopup with a numValue of -1.
1274         (chooseOtherColor): Calls setValueAndClosePopup with a numValue of -2.
1275         (ColorPicker):
1276         (ColorPicker.prototype._layout): Lays out the color swatches in a 5x4
1277         grid.
1278         (ColorPicker.prototype._handleSwatchClick):
1279         * WebCore.gyp/WebCore.gyp:
1280
1281 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1282
1283         Fix arithmetic composite filter for auto-vectorization
1284         https://bugs.webkit.org/show_bug.cgi?id=92123
1285
1286         Reviewed by Nikolas Zimmermann.
1287
1288         Since only clamping of the result prevents GCC from auto-vectorizing the inner loop, this patch 
1289         adds a faster version of the inner loop to handle cases where clamping is unnecessary, 
1290
1291         * platform/graphics/filters/FEComposite.cpp:
1292         (WebCore::computeArithmeticPixelsUnclamped):
1293         (WebCore::arithmeticSoftware):
1294
1295 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1296
1297         Fix blend filter for autovectorizing
1298         https://bugs.webkit.org/show_bug.cgi?id=91398
1299
1300         Reviewed by Nikolas Zimmermann.
1301
1302         Get rid of wrapper classes, and use functions directly as template argument.
1303
1304         * platform/graphics/filters/FEBlend.cpp:
1305         (WebCore::feBlendNormal):
1306         (WebCore::feBlendMultiply):
1307         (WebCore::feBlendScreen):
1308         (WebCore::feBlendDarken):
1309         (WebCore::feBlendLighten):
1310         (WebCore::feBlendUnknown):
1311         (WebCore::platformApply):
1312         (WebCore::FEBlend::platformApplyGeneric):
1313
1314 2012-07-25  Keishi Hattori  <keishi@webkit.org>
1315
1316         Add methods to ColorChooserClient so the color chooser can show suggestions
1317         https://bugs.webkit.org/show_bug.cgi?id=92114
1318
1319         Reviewed by Kent Tamura.
1320
1321         Added methods to ColorChooserClient so the color chooser can ask the
1322         client for suggestions and current color.
1323
1324         No new tests. The methods are not used yet.
1325
1326         * html/ColorInputType.cpp:
1327         (WebCore::ColorInputType::currentColor): Returns what color the color
1328         chooser should display.
1329         (WebCore):
1330         (WebCore::ColorInputType::shouldShowSuggestions): Returns if the UI for
1331         suggestions should be shown.
1332         (WebCore::ColorInputType::suggestions): Returns a list of colors to be
1333         suggested to the user.
1334         * html/ColorInputType.h:
1335         (ColorInputType):
1336         * html/HTMLInputElement.h:
1337         (HTMLInputElement): Made dataList() public.
1338         * platform/ColorChooserClient.h:
1339         (ColorChooserClient):
1340
1341 2012-07-25  Kentaro Hara  <haraken@chromium.org>
1342
1343         Replace int with long in test IDL files
1344         https://bugs.webkit.org/show_bug.cgi?id=92181
1345
1346         Reviewed by Adam Barth.
1347
1348         int is not a valid type in WebIDL. It should be long.
1349         We should replace int with long in bindings/scripts/test/*.idl.
1350         This is a follow-up patch for r123550.
1351
1352         Test: bindings/scripts/test/TestObj.idl
1353
1354         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1355         (WebDOMTestObj::readOnlyLongAttr):
1356         (WebDOMTestObj::Attr):
1357         (WebDOMTestObj::setAttr):
1358         (WebDOMTestObj::voidMethodWithArgs):
1359         (WebDOMTestObj::Method):
1360         (WebDOMTestObj::MethodWithArgs):
1361         (WebDOMTestObj::objMethodWithArgs):
1362         * bindings/scripts/test/CPP/WebDOMTestObj.h:
1363         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1364         (webkit_dom_test_obj_set_property):
1365         (webkit_dom_test_obj_get_property):
1366         (webkit_dom_test_obj_class_init):
1367         (webkit_dom_test_obj_void_method_with_args):
1368         (webkit_dom_test_obj_method):
1369         (webkit_dom_test_obj_method_with_args):
1370         (webkit_dom_test_obj_obj_method_with_args):
1371         (webkit_dom_test_obj_get_read_only_long_attr):
1372         (webkit_dom_test_obj_get_attr):
1373         (webkit_dom_test_obj_set_attr):
1374         (webkit_dom_test_obj_get_strawberry):
1375         (webkit_dom_test_obj_set_strawberry):
1376         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1377         * bindings/scripts/test/JS/JSTestObj.cpp:
1378         (WebCore):
1379         (WebCore::jsTestObjReadOnlyLongAttr):
1380         (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
1381         (WebCore::jsTestObjAttr):
1382         (WebCore::setJSTestObjAttr):
1383         (WebCore::setJSTestObjStrawberry):
1384         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1385         (WebCore::jsTestObjPrototypeFunctionMethod):
1386         (WebCore::jsTestObjPrototypeFunctionMethodWithArgs):
1387         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1388         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
1389         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1390         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1391         * bindings/scripts/test/JS/JSTestObj.h:
1392         (WebCore):
1393         * bindings/scripts/test/ObjC/DOMTestObj.h:
1394         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1395         (-[DOMTestObj readOnlyLongAttr]):
1396         (-[DOMTestObj Attr]):
1397         (-[DOMTestObj setAttr:]):
1398         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
1399         (-[DOMTestObj Method]):
1400         (-[DOMTestObj MethodWithArgs:strArg:objArg:]):
1401         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
1402         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
1403         * bindings/scripts/test/TestObj.idl:
1404         * bindings/scripts/test/V8/V8TestObj.cpp:
1405         (WebCore::TestObjV8Internal::readOnlyLongAttrAttrGetter):
1406         (WebCore::TestObjV8Internal::staticReadOnlyLongAttrAttrGetter):
1407         (WebCore::TestObjV8Internal::AttrAttrGetter):
1408         (WebCore::TestObjV8Internal::AttrAttrSetter):
1409         (WebCore::TestObjV8Internal::strawberryAttrSetter):
1410         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
1411         (WebCore::TestObjV8Internal::MethodCallback):
1412         (WebCore::TestObjV8Internal::MethodWithArgsCallback):
1413         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
1414         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
1415         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
1416         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
1417         (WebCore):
1418         (WebCore::ConfigureV8TestObjTemplate):
1419
1420 2012-07-25  Shinya Kawanaka  <shinyak@chromium.org>
1421
1422         A validation bubble should not be modifiable.
1423         https://bugs.webkit.org/show_bug.cgi?id=92217
1424
1425         Reviewed by Kent Tamura.
1426
1427         A user can set -webkit-user-modify: read-write to validation message elements.
1428         This might cause a undesired crash like Bug 65738. They should be unmodifiable.
1429
1430         Test: fast/forms/validation-user-modify.html
1431
1432         * css/html.css:
1433         Added -webkit-user-modify: read-only !important; for these elements so that they won't be
1434         changed by a user.
1435         (::-webkit-validation-bubble):
1436         (::-webkit-validation-bubble-message):
1437         (::-webkit-validation-bubble-text-block):
1438         (::-webkit-validation-bubble-heading):
1439         (::-webkit-validation-bubble-arrow):
1440         (::-webkit-validation-bubble-arrow-clipper):
1441
1442 2012-07-25  Zeno Albisser  <zeno@webkit.org>
1443
1444         [Qt][WK2] Disable CopyToTexture for GraphicsSurfaceMac.
1445         https://bugs.webkit.org/show_bug.cgi?id=92159
1446
1447         Disable CopyToTexture feature for GraphicsSurface on Mac.
1448         While this is actually working, it is currently used for Tiles
1449         that are single buffered, and therefore requires a call to glFlush.
1450         This call blocks the GPU for about 40ms which would make smooth animations impossible.
1451
1452         Reviewed by Noam Rosenthal.
1453
1454         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1455         (WebCore::GraphicsSurface::platformCreate):
1456         (WebCore::GraphicsSurface::platformImport):
1457
1458 2012-07-25  Kenichi Ishibashi  <bashi@chromium.org>
1459
1460         [Chromium] Fix up includes in HarfBuzzNGFace.h
1461         https://bugs.webkit.org/show_bug.cgi?id=92127
1462
1463         Reviewed by Hajime Morita.
1464
1465         Move constructors of FontPlatformData from headers to corresponding cpp files
1466         so that we can use forward declaration for HarfBuzzNGFace instead of including HarfBuzzNGFace.h.
1467         This way we can include hb.h in HarfBuzzNGFace.h.
1468
1469         No new tests. No changes in behavior.
1470
1471         * platform/graphics/FontPlatformData.cpp:
1472         (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
1473         (WebCore):
1474         * platform/graphics/FontPlatformData.h:
1475         (WebCore):
1476         (FontPlatformData): Moved to cpp file.
1477         * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Include HarfBuzzNGFace.h
1478         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
1479         (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
1480         (WebCore):
1481         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
1482         (WebCore):
1483         (FontPlatformData): Moved to cpp file.
1484         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: Include hb.h.
1485
1486 2012-07-24  Benjamin Poulain  <bpoulain@apple.com> && Joseph Pecoraro  <pecoraro@apple.com>
1487
1488         QualifiedName's HashSet should be big enough to hold at least all the static names
1489         https://bugs.webkit.org/show_bug.cgi?id=91891
1490
1491         Reviewed by Darin Adler.
1492
1493         QualifiedName's table has a standard size of 64 buckets. When initializing WebKit,
1494         we create 850 static QualifiedName for the standard names (HTMLNames, SVGNames etc).
1495
1496         The small base size forces us to grow and rehash the table several time on startup.
1497
1498         This patch solves the issue by defining the initial table size to the minimum size that
1499         can hold all the static QualifiedName.
1500
1501         * dom/QualifiedName.cpp:
1502         (QualifiedNameHashTraits):
1503         * dom/make_names.pl:
1504         (printNamesHeaderFile):
1505
1506 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
1507
1508         Remove anonymous namespace and make functions static.
1509         https://bugs.webkit.org/show_bug.cgi?id=92214
1510
1511         Reviewed by Adam Barth.
1512
1513         Mark functions as static instead of enclosing them in anonymous namespaces.
1514         One exception to this rule is when a function is passed as a template argument.
1515         In this case, the function must have an external linkage.
1516
1517         No functional change. Covered by existing tests.
1518
1519         * html/parser/HTMLConstructionSite.cpp:
1520         (WebCore::hasImpliedEndTag):
1521         (WebCore::causesFosterParenting):
1522         (WebCore::isAllWhitespace):
1523         * html/parser/HTMLDocumentParser.cpp:
1524         (WebCore):
1525         (WebCore::tokenizerStateForContextElement):
1526         * html/parser/HTMLElementStack.cpp:
1527         (WebCore::isNumberedHeaderElement):
1528         (WebCore::isRootNode):
1529         (WebCore):
1530         * html/parser/HTMLEntityParser.cpp:
1531         (WebCore::isAlphaNumeric):
1532         * html/parser/HTMLEntitySearch.cpp:
1533         (WebCore::halfway):
1534         * html/parser/HTMLPreloadScanner.cpp:
1535         (WebCore):
1536         * html/parser/HTMLTokenizer.cpp:
1537         (WebCore::toLowerCase):
1538         (WebCore::vectorEqualsString):
1539         (WebCore::isEndTagBufferingState):
1540         * html/parser/HTMLTreeBuilder.cpp:
1541         (WebCore):
1542         (WebCore::uninitializedPositionValue1):
1543         (WebCore::isAllWhitespace):
1544         (WebCore::isAllWhitespaceOrReplacementCharacters):
1545         (WebCore::isNumberedHeaderTag):
1546         (WebCore::isCaptionColOrColgroupTag):
1547         (WebCore::isTableCellContextTag):
1548         (WebCore::isTableBodyContextTag):
1549         (WebCore::isSpecialNode):
1550         (WebCore::isNonAnchorNonNobrFormattingTag):
1551         (WebCore::isNonAnchorFormattingTag):
1552         (WebCore::isFormattingTag):
1553         (WebCore::closestFormAncestor):
1554         (WebCore::mapLoweredLocalNameToName):
1555         (WebCore::adjustSVGTagNameCase):
1556         (WebCore::adjustAttributes):
1557         (WebCore::adjustSVGAttributes):
1558         (WebCore::adjustMathMLAttributes):
1559         (WebCore::addNamesWithPrefix):
1560         (WebCore::adjustForeignAttributes):
1561
1562 2012-07-24  Vsevolod Vlasov  <vsevik@chromium.org>
1563
1564         Unreviewed r123494 follow-up: fixed inspector undock icon.
1565
1566         * inspector/front-end/Images/statusbarButtonGlyphs.png:
1567
1568 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
1569
1570         Read tag names and attributes from the saved tokens where possible.
1571         https://bugs.webkit.org/show_bug.cgi?id=92079
1572
1573         Reviewed by Adam Barth.
1574
1575         Read tag names and attributes from the saved tokens, not from the DOM.
1576         Also added convenient methods such as hasLocalName, hasTagName, localName,
1577         isElementNode and isDocumentFragmentNode to HTMLStackItem class.
1578
1579         No new tests, covered by existing tests.
1580
1581         * html/parser/HTMLConstructionSite.cpp:
1582         (WebCore::HTMLNames::hasImpliedEndTag):
1583         (WebCore::HTMLNames::causesFosterParenting):
1584         (WebCore::HTMLConstructionSite::generateImpliedEndTagsWithExclusion):
1585         (WebCore::HTMLConstructionSite::generateImpliedEndTags):
1586         (WebCore::HTMLConstructionSite::shouldFosterParent):
1587         * html/parser/HTMLConstructionSite.h:
1588         (WebCore::HTMLConstructionSite::currentStackItem):
1589         * html/parser/HTMLElementStack.cpp:
1590         (WebCore::HTMLNames::isNumberedHeaderElement):
1591         (WebCore::HTMLNames::isRootNode):
1592         (WebCore::HTMLNames::isScopeMarker):
1593         (WebCore::HTMLNames::isListItemScopeMarker):
1594         (WebCore::HTMLNames::isTableScopeMarker):
1595         (WebCore::HTMLNames::isTableBodyScopeMarker):
1596         (WebCore::HTMLNames::isTableRowScopeMarker):
1597         (WebCore::HTMLNames::isForeignContentScopeMarker):
1598         (WebCore::HTMLNames::isButtonScopeMarker):
1599         (WebCore::HTMLNames::isSelectScopeMarker):
1600         (WebCore::HTMLElementStack::ElementRecord::replaceElement):
1601         (WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped):
1602         (WebCore::HTMLElementStack::popUntilTableScopeMarker):
1603         (WebCore::HTMLElementStack::popUntilTableBodyScopeMarker):
1604         (WebCore::HTMLElementStack::popUntilTableRowScopeMarker):
1605         (WebCore::HTMLElementStack::isMathMLTextIntegrationPoint):
1606         (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
1607         (WebCore::HTMLElementStack::popUntilForeignContentScopeMarker):
1608         (WebCore::HTMLElementStack::pushRootNode):
1609         (WebCore::HTMLElementStack::oneBelowTop):
1610         (WebCore::HTMLElementStack::topmost):
1611         (WebCore):
1612         (WebCore::inScopeCommon):
1613         (WebCore::HTMLElementStack::hasNumberedHeaderElementInScope):
1614         (WebCore::HTMLElementStack::inScope):
1615         * html/parser/HTMLElementStack.h:
1616         (WebCore::HTMLElementStack::topStackItem):
1617         (HTMLElementStack):
1618         (WebCore::isInHTMLNamespace):
1619         * html/parser/HTMLStackItem.h:
1620         (WebCore::HTMLStackItem::isDocumentFragmentNode):
1621         (WebCore::HTMLStackItem::isElementNode):
1622         (HTMLStackItem):
1623         (WebCore::HTMLStackItem::hasLocalName):
1624         (WebCore::HTMLStackItem::hasTagName):
1625         (WebCore::HTMLStackItem::HTMLStackItem):
1626         * html/parser/HTMLTreeBuilder.cpp:
1627         (WebCore):
1628         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
1629         (WebCore::HTMLTreeBuilder::processFakeEndTag):
1630         (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
1631         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1632         (WebCore::HTMLTreeBuilder::processStartTag):
1633         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
1634         (WebCore::HTMLTreeBuilder::furthestBlockForFormattingElement):
1635         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1636         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
1637         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
1638         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
1639         (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
1640         (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
1641         (WebCore::HTMLTreeBuilder::processEndTag):
1642         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
1643         (WebCore::HTMLTreeBuilder::processEndOfFile):
1644         (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
1645         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
1646         * html/parser/HTMLTreeBuilder.h:
1647
1648 2012-07-24  Hironori Bono  <hbono@chromium.org>
1649
1650         Avoid moving child objects multiple times when vertical scrollbar are shown at the left side.
1651         https://bugs.webkit.org/show_bug.cgi?id=91756
1652
1653         Reviewed by Tony Chang.
1654
1655         My r123067 moves the top-left origin of an RTL element right when its vertical
1656         scrollbar is shown at its left side. (That is, r123067 moves all child objects
1657         in the RTL element right.) This change also increases RenderBox::clientLeft()
1658         at the same time, i.e. it also moves child objects right. Furthermore, my r109512
1659         moves positioned objects in an RTL element right at the same time. This makes
1660         WebKit move objects in an RTL element up to three times by the scrollbar width.
1661         (Moving an absolute object right increases the scrollWidth value and it causes
1662         this bug.) This change removes unnecessary code that moves objects right in my
1663         r109512 and RenderBox::clientLeft().
1664
1665         Test: scrollbars/rtl/div-absolute.html
1666               fast/block/float/026.html
1667               fast/block/float/028.html
1668               fast/overflow/unreachable-overflow-rtl-bug.html
1669
1670         * dom/Element.cpp:
1671         (WebCore::Element::clientLeft): Increase clientLeft value by the width of a vertical scrollbar as written in the CSSOM specification.
1672         * rendering/RenderBlock.cpp:
1673         (WebCore::RenderBlock::addOverflowFromPositionedObjects): Removed unnecessary code.
1674         (WebCore::RenderBlock::determineLogicalLeftPositionForChild): Removed unnecessary code.
1675         * rendering/RenderBox.h:
1676         (WebCore::RenderBox::clientLeft): Removed unnecessary code.
1677
1678 2012-07-24  Dan Bernstein  <mitz@apple.com>
1679
1680         RenderBlock::positionForPoint can fail when the block or its children have a vertical writing mode
1681         https://bugs.webkit.org/show_bug.cgi?id=92202
1682
1683         Reviewed by Beth Dakin.
1684
1685         Test: fast/writing-mode/positionForPoint.html
1686
1687         * rendering/RenderBlock.cpp:
1688         (WebCore::RenderBlock::positionForPoint): Fixed two issues, each of which are covered by
1689         one of the sub-tests in the new regression test: (1) changed to compare children’s logical
1690         bounds against pointInLogicalContents, i.e. compare childern’s horizontal bounds to the
1691         point’s horizontal component; and (2) changed to use logicalTopForChild and
1692         logicalHeightForChild, which account for this block’s writing mode, instead of logicalTop
1693         and logicalBottom, which are based on the child’s writing mode.
1694
1695 2012-07-24  MORITA Hajime  <morrita@google.com>
1696
1697         https://bugs.webkit.org/show_bug.cgi?id=89179
1698         Rendering LI having Shadow DOM seems weird
1699
1700         Reviewed by Dimitri Glazkov.
1701
1702         This incorrect rendering happend because HTMLLIElement::attach()
1703         wasn't aware of composed shadow subtree. This change makes it
1704         aware of that using ComposedShadowTreeParentWalker.
1705
1706         Test: fast/dom/shadow/shadow-and-list-elements.html
1707
1708         * html/HTMLLIElement.cpp:
1709         (WebCore::HTMLLIElement::attach):
1710
1711 2012-07-24  Alec Flett  <alecflett@chromium.org>
1712
1713         IndexedDB: fix #include dependencies so IDBRequest isn't an include root
1714         https://bugs.webkit.org/show_bug.cgi?id=92167
1715
1716         Reviewed by Tony Chang.
1717
1718         Remove implicit dependencies due to using IDBRequest.h, and fix all
1719         places that break as a result.
1720
1721         * Modules/indexeddb/IDBCallbacks.h:
1722         (WebCore):
1723         * Modules/indexeddb/IDBObjectStore.cpp:
1724         * Modules/indexeddb/IDBRequest.h:
1725         * inspector/InspectorIndexedDBAgent.cpp:
1726
1727 2012-07-24  Keishi Hattori  <keishi@webkit.org>
1728
1729         Move PagePopupClient helper functions so they can be shared
1730         https://bugs.webkit.org/show_bug.cgi?id=92096
1731
1732         Reviewed by Kent Tamura.
1733
1734         Move PagePopupClient helper functions to a separate file,
1735         so they can be shared with new PagePopupClients.
1736
1737         No new tests. Covered by fast/forms/date/calendar-picker-appearance.html
1738
1739         * WebCore.gypi: Added PagePopupClient.cpp
1740         * html/shadow/CalendarPickerElement.cpp:
1741         (WebCore::CalendarPickerElement::writeDocument): Modified to use PagePopupClient.
1742         * page/PagePopupClient.cpp: Added.
1743         (WebCore):
1744         (WebCore::PagePopupClient::addJavaScriptString):
1745         (WebCore::PagePopupClient::addProperty):
1746         * page/PagePopupClient.h:
1747         (WebCore::PagePopupClient::addString):
1748
1749 2012-07-24  Jer Noble  <jer.noble@apple.com>
1750
1751         setting playbackRate on a MediaController doesn't change the playbackRate for slaved media
1752         https://bugs.webkit.org/show_bug.cgi?id=92035
1753
1754         Reviewed by Darin Adler.
1755
1756         Allow updatePlaybackRate() to change the MediaPlayer rate when the media element has a 
1757         current media controller.
1758
1759         Test: media/media-controller-playbackrate.html
1760
1761         * html/HTMLMediaElement.cpp:
1762         (WebCore::HTMLMediaElement::updatePlaybackRate):
1763
1764 2012-07-24  Hayato Ito  <hayato@chromium.org>
1765
1766         Rename FocusScope to FocusNavigationScope.
1767         https://bugs.webkit.org/show_bug.cgi?id=92062
1768
1769         Reviewed by Dimitri Glazkov.
1770
1771         FocusNavagationScope is better name than FocusScope since the
1772         class is only used for controlling focus navigation.
1773
1774         No new tests - no functional changes.
1775
1776         * page/FocusController.cpp:
1777         (WebCore::FocusNavigationScope::FocusNavigationScope):
1778         (WebCore::FocusNavigationScope::rootNode):
1779         (WebCore::FocusNavigationScope::owner):
1780         (WebCore::FocusNavigationScope::focusNavigationScopeOf):
1781         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
1782         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByIFrame):
1783         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocument):
1784         (WebCore::FocusController::advanceFocusInDocumentOrder):
1785         (WebCore::FocusController::findFocusableNodeAcrossFocusScope):
1786         (WebCore::FocusController::findFocusableNodeRecursively):
1787         (WebCore::FocusController::findFocusableNode):
1788         (WebCore::FocusController::nextFocusableNode):
1789         (WebCore::FocusController::previousFocusableNode):
1790         * page/FocusController.h:
1791         (FocusNavigationScope):
1792         (FocusController):
1793
1794 2012-07-24  Michael Saboff  <msaboff@apple.com>
1795
1796         Convert HTML parser to handle 8-bit resources without converting to UChar*
1797         https://bugs.webkit.org/show_bug.cgi?id=90321
1798
1799         Reviewed by Geoffrey Garen.
1800
1801         No new tests, no new functionality therefore covered by existing tests.
1802
1803         Changed the parsing of HTML to handle 8-bit strings without converting the 
1804         whole string to 16-bits.  Primary change was to use the appropriate 
1805         character pointer type (LChar* or UChar*) depending on the source string.
1806         This access is abstracted in SegmentedSubstring by getCurrentChar{8,16} and
1807         incrementAndGetCurrentChar{8,16} methods.  In SegmentedString, the advance()
1808         and advanceAndUpdateLineNumber() methods have been refactored into a
1809         state machine managed pair of function pointers.  The possible functions
1810         have not only the 8 and 16 bitness factored out, they also have the 
1811         "exclude line numbers" logic factored out for advanceAndUpdateLineNumber().
1812         This provides a net speed-up even with the 8/16 bit testing.
1813         Other changes involve using String methods to access and compare with the
1814         source data.
1815
1816         * html/FTPDirectoryDocument.cpp:
1817         (WebCore::FTPDirectoryDocumentParser::append): Changed to use currentChar()
1818         instead of SegmentedString '*' operator.
1819         * html/parser/HTMLEntityParser.cpp: Changed to use currentChar() instead of
1820         SegmentedString '*' operator.
1821         * html/parser/HTMLParserIdioms.cpp:
1822         (WebCore::stripLeadingAndTrailingHTMLSpaces): Added 8-bit fast path.
1823         * html/parser/HTMLSourceTracker.cpp:
1824         (WebCore::HTMLSourceTracker::sourceForToken): Changed to use currentChar() instead of
1825         SegmentedString '*' operator.
1826         * loader/cache/CachedScript.cpp:
1827         (WebCore::CachedScript::script): Updated to use new String::dataSize() method.
1828         * platform/text/SegmentedString.cpp:
1829         (WebCore::SegmentedString::SegmentedString):
1830         (WebCore::SegmentedString::operator=):
1831         (WebCore::SegmentedString::clear):
1832         (WebCore::SegmentedString::append):
1833         (WebCore::SegmentedString::prepend):
1834         (WebCore::SegmentedString::advanceSubstring):
1835         (WebCore::SegmentedString::advance): Changed to be a wrapper that invokes current 
1836         advance function.
1837         (WebCore::SegmentedString::advance8): Fast path advance function for 8 bit data.
1838         (WebCore::SegmentedString::advance16): Fast path advance function for 16 bit data.
1839         (WebCore::SegmentedString::advanceAndUpdateLineNumber8IncludeLineNumbers): Fast
1840         path advanceAndUpdateLineNumber for 8 bit data when we need to update the line number.
1841         (WebCore::SegmentedString::advanceAndUpdateLineNumber16IncludeLineNumbers): Fast
1842         path advanceAndUpdateLineNumber for 16 bit data when we need to update the line number.
1843         (WebCore::SegmentedString::advanceSlowCase): Slow case advance function for both
1844         8 and 16 bit advance.
1845         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): Slow case
1846         advanceAndUpdateLineNumber function for both 8 and 16 bit data.
1847         (WebCore::SegmentedString::advanceEmpty): Advance function when input has been exhausted.
1848         * platform/text/SegmentedString.h:
1849         (WebCore::SegmentedSubstring::SegmentedSubstring):
1850         (WebCore::SegmentedSubstring::clear):
1851         (SegmentedSubstring):
1852         (WebCore::SegmentedSubstring::is8Bit): New getter.
1853         (WebCore::SegmentedSubstring::appendTo):
1854         (WebCore::SegmentedSubstring::getCurrentChar8): New getter for the 8 bit case.
1855         (WebCore::SegmentedSubstring::getCurrentChar16): New getter for the 16 bit case.
1856         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar8): New wrapper functions
1857         that pre-increments the 8 bit pointer and returns the next character.
1858         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar16): New wrapper functions
1859         that pre-increments the 16 bit pointer and returns the next character.
1860         (WebCore::SegmentedSubstring::currentSubString):
1861         (WebCore::SegmentedSubstring::getCurrentChar):
1862         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar):
1863         (WebCore::SegmentedString::SegmentedString):
1864         (WebCore::SegmentedString::push):
1865         (WebCore::SegmentedString::isEmpty):
1866         (WebCore::SegmentedString::lookAhead):
1867         (WebCore::SegmentedString::lookAheadIgnoringCase):
1868         (WebCore::SegmentedString::advance):
1869         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
1870         (WebCore::SegmentedString::advanceAndASSERT):
1871         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
1872         (WebCore::SegmentedString::advancePastNonNewline):
1873         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
1874         (WebCore::SegmentedString::currentChar):
1875         (WebCore::SegmentedString::setSlowCase): Set advance function pointers to slow case
1876         functions.
1877         (WebCore::SegmentedString::decrementAndCheckLength): Decrement substring length and
1878         change to slow case functions when only one character left.
1879         (WebCore::SegmentedString::setAdvanceFunctionPointers): Select appropriate advance
1880         functions based on current substring.
1881         (WebCore::SegmentedString::lookAheadInline): Changed to use String::startsWith().
1882         (WebCore::SegmentedString::lookAheadSlowCase):
1883         * xml/parser/CharacterReferenceParserInlineMethods.h:
1884         (WebCore::consumeCharacterReference): Changed to use currentChar() instead of
1885         SegmentedString '*' operator.
1886         * xml/parser/MarkupTokenizerBase.h:
1887         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
1888         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): Changed to use
1889         currentChar() instead of SegmentedString '*' operator.
1890         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
1891
1892 2012-07-24  Kenneth Russell  <kbr@google.com>
1893
1894         [chromium] Hint garbage collector to run if page uses Canvas contexts
1895         https://bugs.webkit.org/show_bug.cgi?id=76225
1896
1897         Reviewed by Kentaro Hara.
1898
1899         Upon creating a canvas context, set a hint in the current isolate
1900         indicating that a full GC should be done upon the next page
1901         navigation.
1902
1903         This improves Chrome's robustness on some WebGL stress tests which
1904         simulate real-world behavior by repeatedly navigating among
1905         several samples. More general measures are being investigated, but
1906         this change makes V8 behave the same as JSC on these stress tests.
1907         JSC doesn't currently use generational garbage collection, so it
1908         has more opportunities to discover unreferenced canvas contexts.
1909
1910         Test: fast/canvas/webgl/context-creation-and-destruction.html
1911
1912         * bindings/v8/V8Binding.cpp:
1913         (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
1914             Initialize per-isolate low memory hint.
1915         * bindings/v8/V8Binding.h:
1916         (V8BindingPerIsolateData):
1917         (WebCore::V8BindingPerIsolateData::setLowMemoryNotificationHint):
1918             Set a per-isolate hint to signal a low memory condition upon the next page navigation.
1919         (WebCore::V8BindingPerIsolateData::clearLowMemoryNotificationHint):
1920             Clear the previously set hint.
1921         (WebCore::V8BindingPerIsolateData::isLowMemoryNotificationHint):
1922             Get the previously set hint.
1923         * bindings/v8/V8Proxy.cpp:
1924         (WebCore::V8Proxy::hintForGCIfNecessary):
1925             If necessary, send V8 a hint that it should GC.
1926         (WebCore):
1927         (WebCore::V8Proxy::clearForClose):
1928         (WebCore::V8Proxy::clearForNavigation):
1929             Call hintForGCIfNecessary.
1930         * bindings/v8/V8Proxy.h:
1931         (V8Proxy):
1932         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1933         (WebCore::V8HTMLCanvasElement::getContextCallback):
1934             Set a hint that we should GC upon the next page navigation.
1935
1936 2012-07-24  Dave Tu  <dtu@chromium.org>
1937
1938         [chromium] Add time spent painting to GPU benchmarking renderingStats() API.
1939         https://bugs.webkit.org/show_bug.cgi?id=90019
1940
1941         Reviewed by Adrienne Walker.
1942
1943         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
1944         (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
1945         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
1946         (BitmapCanvasLayerTextureUpdater):
1947         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
1948         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect):
1949         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
1950         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect):
1951         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
1952         (Texture):
1953         (BitmapSkPictureCanvasLayerTextureUpdater):
1954         * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
1955         (WebCore::CanvasLayerTextureUpdater::paintContents):
1956         * platform/graphics/chromium/CanvasLayerTextureUpdater.h:
1957         (CanvasLayerTextureUpdater):
1958         * platform/graphics/chromium/ContentLayerChromium.cpp:
1959         (WebCore::ContentLayerChromium::update):
1960         * platform/graphics/chromium/ContentLayerChromium.h:
1961         (ContentLayerChromium):
1962         * platform/graphics/chromium/ImageLayerChromium.cpp:
1963         (WebCore::ImageLayerChromium::update):
1964         * platform/graphics/chromium/ImageLayerChromium.h:
1965         (ImageLayerChromium):
1966         * platform/graphics/chromium/LayerChromium.h:
1967         (WebCore):
1968         (WebCore::LayerChromium::update):
1969         * platform/graphics/chromium/LayerTextureUpdater.h:
1970         (WebCore):
1971         (WebCore::LayerTextureUpdater::Texture::prepareRect):
1972         (WebCore::LayerTextureUpdater::prepareToUpdate):
1973         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
1974         (WebCore::ScrollbarLayerChromium::updatePart):
1975         (WebCore::ScrollbarLayerChromium::update):
1976         * platform/graphics/chromium/ScrollbarLayerChromium.h:
1977         (ScrollbarLayerChromium):
1978         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
1979         (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
1980         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
1981         (SkPictureCanvasLayerTextureUpdater):
1982         * platform/graphics/chromium/TiledLayerChromium.cpp:
1983         (WebCore::TiledLayerChromium::updateTiles):
1984         (WebCore::TiledLayerChromium::updateContentRect):
1985         * platform/graphics/chromium/TiledLayerChromium.h:
1986         (TiledLayerChromium):
1987         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1988         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1989         (WebCore::CCLayerTreeHost::updateAnimations):
1990         (WebCore::CCLayerTreeHost::renderingStats):
1991         (WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
1992         (WebCore::CCLayerTreeHost::paintLayerContents):
1993         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1994         (WebCore):
1995         (CCLayerTreeHost):
1996         * platform/graphics/chromium/cc/CCRenderingStats.h:
1997         (CCRenderingStats):
1998         (WebCore::CCRenderingStats::CCRenderingStats):
1999
2000 2012-07-24  Jian Li  <jianli@chromium.org>
2001
2002         [V8] Correct WebIDL type should be used in the testing IDL file 
2003         https://bugs.webkit.org/show_bug.cgi?id=92168
2004
2005         Reviewed by Kentaro Hara.
2006
2007         Updated bindings test.
2008
2009         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2010         (webkit_dom_test_obj_strict_function):
2011         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2012         * bindings/scripts/test/JS/JSTestObj.cpp:
2013         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
2014         * bindings/scripts/test/TestObj.idl:
2015         * bindings/scripts/test/V8/V8TestObj.cpp:
2016         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
2017         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
2018         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
2019         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
2020         (WebCore::TestObjV8Internal::strictFunctionCallback):
2021
2022 2012-07-24  Kent Tamura  <tkent@chromium.org>
2023
2024         Unreviewed, rolling out r123191.
2025         http://trac.webkit.org/changeset/123191
2026         https://bugs.webkit.org/show_bug.cgi?id=91804
2027
2028         It might cause another performance regression.
2029         http://code.google.com/p/chromium/issues/detail?id=138410
2030
2031         * html/FormController.cpp:
2032         (FormKeyGenerator):
2033         (WebCore::createKey):
2034         (WebCore::FormKeyGenerator::formKey):
2035         (WebCore::FormKeyGenerator::willDeleteForm):
2036
2037 2012-07-24  Vineet Chaudhary  <rgf748@motorola.com>
2038
2039         [JSBinding] Merging jsUnsignedLongArrayToVector() to toNativeArray() using traits.
2040         https://bugs.webkit.org/show_bug.cgi?id=90381
2041
2042         Reviewed by Kentaro Hara.
2043
2044         We can remove jsUnsignedLongArrayToVector() implementaion
2045         merging it to current and toNativeArray() traits.
2046
2047         Tests: TestObj.idl
2048         There should be no behavoiral changes as just refactoring.
2049
2050         * Modules/vibration/NavigatorVibration.idl: Use sequence<T> as method param than T[]
2051         * bindings/js/JSDOMBinding.cpp: Moved toJSSequence() to header file.
2052         * bindings/js/JSDOMBinding.h:
2053         (WebCore::toJSSequence): Moved toJSSequence() to header file.
2054         (WebCore::jsArray): Renamed Traits to JSValueTraits
2055         (WebCore::toNativeArray): Using traits.
2056         * bindings/js/JSDictionary.cpp:
2057         (WebCore::JSDictionary::convertValue):
2058         * bindings/js/JSMessagePortCustom.cpp:
2059         (WebCore::fillMessagePortArray):
2060         * bindings/scripts/CodeGeneratorJS.pm: Removed unsigned long[] specific binding code.
2061         (AddIncludesForType):
2062         (GenerateParametersCheckExpression):
2063         (JSValueToNative):
2064         (NativeToJSValue):
2065         * bindings/scripts/CodeGeneratorV8.pm:
2066         (GenerateParametersCheckExpression): Added check sequence<T> check for overloaded methods.
2067         * bindings/scripts/test/JS/JSTestObj.cpp: Rebased binding test.
2068         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
2069         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2070         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
2071         * bindings/scripts/test/JS/JSTestObj.h: Rebased binding test.
2072         * bindings/scripts/test/TestObj.idl: Added test for sequence<T> as method parameter.
2073         * bindings/scripts/test/V8/V8TestObj.cpp: Rebased binding test.
2074         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
2075         (TestObjV8Internal):
2076         (WebCore::TestObjV8Internal::overloadedMethodCallback):
2077
2078 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
2079
2080         Remove an invalid assertion introduced in r123536. Unreviewed.
2081
2082         * xml/parser/MarkupTokenBase.h:
2083         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
2084
2085 2012-07-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2086
2087         Unreviewed, rolling out r123504.
2088         http://trac.webkit.org/changeset/123504
2089         https://bugs.webkit.org/show_bug.cgi?id=92169
2090
2091         broke a bunch of text-related tests in chromium mac debug
2092         (Requested by zhenyao on #webkit).
2093
2094         * platform/text/cf/StringCF.cpp:
2095         (WTF::String::createCFString):
2096         * platform/text/cf/StringImplCF.cpp:
2097         (WTF::StringImpl::createCFString):
2098
2099 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
2100
2101         Ensure Noah's ark without reading the DOM tree.
2102         https://bugs.webkit.org/show_bug.cgi?id=92065
2103
2104         Reviewed by Adam Barth.
2105
2106         Technically we shouldn't read attributes back from the DOM. If JavaScript changes
2107         the attributes values, we could get a slightly wrong output here.
2108
2109         Read attributes from tokens saved in the active formatting element list.
2110
2111         No new tests, covered by existing tests.
2112
2113         * html/parser/HTMLFormattingElementList.cpp:
2114         (WebCore::attributeCount):
2115         (WebCore::HTMLFormattingElementList::append):
2116         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
2117         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
2118         * html/parser/HTMLFormattingElementList.h:
2119         (HTMLFormattingElementList):
2120         * html/parser/HTMLStackItem.h:
2121         (WebCore::HTMLStackItem::localName):
2122         (HTMLStackItem):
2123
2124 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
2125
2126         Clear the external characters pointer of an AtomicHTMLToken before the raw token is cleared.
2127         https://bugs.webkit.org/show_bug.cgi?id=92056
2128
2129         Reviewed by Adam Barth.
2130
2131         AtomicHTMLToken keeps a pointer to the HTMLToken's buffer instead of copying the
2132         characters for performance. Clear the external characters pointer before the raw token
2133         is cleared to make sure that we won't have a dangling pointer.
2134
2135         No new tests - no functional changes.
2136
2137         * html/parser/HTMLTreeBuilder.cpp:
2138         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
2139         * xml/parser/MarkupTokenBase.h:
2140         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
2141         (AtomicMarkupTokenBase):
2142
2143 2012-07-24  Jian Li  <jianli@chromium.org>
2144
2145         Add per-context setting for html notifications
2146         https://bugs.webkit.org/show_bug.cgi?id=91295
2147
2148         Reviewed by Adam Barth.
2149
2150         Added a new per-context setting to control the enabling of html notifications.
2151         For chromium port, we're going to disable html notifications for web
2152         pages, but still keep it enabled for extensions.
2153
2154         Also enhance V8 code generator to support V8EnabledPerContext attribute
2155         for methods.
2156
2157         Updated the binding tests.
2158
2159         * Modules/notifications/NotificationCenter.cpp:
2160         (WebCore::NotificationCenter::document): Expose document for being used by installPerContextProperties.
2161         (WebCore):
2162         * Modules/notifications/NotificationCenter.h:
2163         (NotificationCenter):
2164         * Modules/notifications/NotificationCenter.idl: Add V8EnabledPerContext attribute.
2165         * bindings/scripts/CodeGeneratorV8.pm: V8EnabledPerContext now supports methods.
2166         (GenerateHeader):
2167         (IsStandardFunction):
2168         (GenerateNonStandardFunction):
2169         (GenerateImplementation):
2170         (GenerateToV8Converters):
2171         (GetContextEnableFunction):
2172         * bindings/scripts/test/TestObj.idl: Add test case for V8EnabledPerContext methods.
2173         * bindings/scripts/test/V8/V8TestObj.cpp: Update test result.
2174         (WebCore::TestObjV8Internal::enabledAtContextMethod1Callback):
2175         (TestObjV8Internal):
2176         (WebCore::TestObjV8Internal::enabledAtContextMethod2Callback):
2177         (WebCore::V8TestObj::installPerContextProperties):
2178         (WebCore::V8TestObj::wrapSlow):
2179         * dom/ContextFeatures.cpp: Add a new per-context feature.
2180         (WebCore::ContextFeatures::htmlNotificationsEnabled):
2181         (WebCore):
2182         * dom/ContextFeatures.h: Add a new per-context feature.
2183
2184 2012-07-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2185
2186         Unreviewed, rolling out r123499.
2187         http://trac.webkit.org/changeset/123499
2188         https://bugs.webkit.org/show_bug.cgi?id=92161
2189
2190         Android fails to compile (Requested by zhenyao on #webkit).
2191
2192         * GNUmakefile.list.am:
2193         * Modules/mediastream/MediaStream.cpp:
2194         (WebCore::MediaStream::MediaStream):
2195         (WebCore::MediaStream::addTrack):
2196         * Modules/mediastream/MediaStreamTrack.cpp:
2197         (WebCore::MediaStreamTrack::create):
2198         (WebCore::MediaStreamTrack::MediaStreamTrack):
2199         (WebCore::MediaStreamTrack::~MediaStreamTrack):
2200         (WebCore::MediaStreamTrack::setEnabled):
2201         * Modules/mediastream/MediaStreamTrack.h:
2202         (MediaStreamTrack):
2203         * Modules/mediastream/MediaStreamTrack.idl:
2204         * WebCore.gypi:
2205         * dom/EventNames.h:
2206         (WebCore):
2207         * dom/EventTargetFactory.in:
2208         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2209         (WebKit):
2210         (WebKit::WebMediaStreamDescriptor::sources):
2211         * platform/chromium/support/WebMediaStreamSource.cpp:
2212         * platform/mediastream/MediaStreamSource.cpp: Removed.
2213         * platform/mediastream/MediaStreamSource.h:
2214         (WebCore::MediaStreamSource::create):
2215         (WebCore::MediaStreamSource::muted):
2216         (WebCore::MediaStreamSource::setMuted):
2217         (WebCore::MediaStreamSource::MediaStreamSource):
2218         (MediaStreamSource):
2219         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
2220         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
2221         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
2222
2223 2012-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
2224
2225         Crash in RenderTableSection::layoutRows
2226         https://bugs.webkit.org/show_bug.cgi?id=92145
2227
2228         Reviewed by Abhishek Arya.
2229
2230         The crash came from the insertChildNode logic being confused and choosing the wrong
2231         renderer for insertion. This is because after r123159, table anonymous wrappers can
2232         be created as 'inline-table' and wouldn't pass the isAnonymousBlock() check.
2233
2234         This change also aligns the ancestor iteration with RenderBlock::addChildToAnonymousColumnBlocks.
2235
2236         Test: fast/table/crash-table-section-layoutRows.html
2237
2238         * rendering/RenderObjectChildList.cpp:
2239         (WebCore::RenderObjectChildList::insertChildNode):
2240         Changed the code to always get the right child. There is no justification to not
2241         walking up to the |owner|'s direct child in all cases.
2242
2243 2012-07-24  Tony Chang  <tony@chromium.org>
2244
2245         Make RenderBlock::paintChildren virtual so sub classes can change the paint order
2246         https://bugs.webkit.org/show_bug.cgi?id=92042
2247
2248         Reviewed by Ojan Vafai.
2249
2250         The flexbox spec says that the order property should change the paint order of flex children.
2251         To make that possible, make paintChildren virtual so RenderFlexibleBox can override it.
2252
2253         No new tests, this is just a refactoring.
2254
2255         * rendering/RenderBlock.cpp:
2256         (WebCore::RenderBlock::paintContents): Move some code out of paintChildren into paintContents.
2257         (WebCore::RenderBlock::paintChildren): Make virtual and just have it be a simple for loop.
2258         (WebCore::RenderBlock::paintChild): Move code out of paintChildren so subclasses can reuse.
2259         * rendering/RenderBlock.h:
2260         (RenderBlock): Make paintChildren virtual and protected so sub classes can call paintChild.
2261
2262 2012-07-24  Anna Cavender  <annacc@chromium.org>
2263
2264         Create SourceBuffer and SourceBufferList objects
2265         https://bugs.webkit.org/show_bug.cgi?id=91771
2266
2267         Reviewed by Eric Carlson.
2268
2269         SourceBuffer and SourceBufferList objects are needed in order to
2270         implement the new object-oriented MediaSource API:
2271         http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
2272
2273         No new tests - will be able to test after landing BUGWK91775
2274
2275         Adding new files to build files:
2276         * CMakeLists.txt:
2277         * DerivedSources.cpp:
2278         * DerivedSources.make:
2279         * DerivedSources.pri:
2280         * GNUmakefile.am:
2281         * GNUmakefile.list.am:
2282         * Target.pri:
2283         * WebCore.gyp/WebCore.gyp:
2284         * WebCore.gypi:
2285         * WebCore.vcproj/WebCore.vcproj:
2286         * WebCore.vcproj/WebCoreCommon.vsprops:
2287         * WebCore.vcproj/copyForwardingHeaders.cmd:
2288         * WebCore.xcodeproj/project.pbxproj:
2289
2290         New objects:
2291         * Modules/mediasource/SourceBuffer.cpp: Added.
2292         * Modules/mediasource/SourceBuffer.h: Added.
2293         * Modules/mediasource/SourceBuffer.idl: Added.
2294         * Modules/mediasource/SourceBufferList.cpp: Added.
2295         * Modules/mediasource/SourceBufferList.h: Added.
2296         * Modules/mediasource/SourceBufferList.idl: Added.
2297
2298         New events:
2299         * dom/EventNames.h:
2300         (WebCore):
2301         * dom/EventTarget.h:
2302         (WebCore):
2303         * dom/EventTargetFactory.in:
2304
2305         Object constructors:
2306         * page/DOMWindow.idl:
2307
2308 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
2309
2310         Store the full year in GregorianDateTime
2311         https://bugs.webkit.org/show_bug.cgi?id=92067
2312
2313         Reviewed by Geoffrey Garen.
2314
2315         Use the full year instead of the offset from year 1900 
2316         for the year member variable of GregorianDateTime.
2317
2318         * bridge/qt/qt_runtime.cpp:
2319         (JSC::Bindings::convertValueToQVariant):
2320         (JSC::Bindings::convertQVariantToValue):
2321         * bridge/qt/qt_runtime_qt4.cpp:
2322         (JSC::Bindings::convertValueToQVariant):
2323         (JSC::Bindings::convertQVariantToValue):
2324
2325 2012-07-24  Benjamin Poulain  <bpoulain@apple.com>
2326
2327         Do not perform 8 to 16bits characters conversion when converting a WTFString to NSString/CFString
2328         https://bugs.webkit.org/show_bug.cgi?id=90720
2329
2330         Reviewed by Geoffrey Garen.
2331
2332         In most String to CFString conversion, we should be able to use the "NoCopy" constructor and have
2333         a relatively cheap conversion from WTF::String to CFString.
2334
2335         When the String is 8 bits, it was converted to 16 bits by getData16SlowCase() because of the call
2336         to String::characters().
2337
2338         This patch adds a path for creating a CFString from a 8bits string using CFStringCreateWithBytes.
2339
2340         This is covered by existing tests.
2341
2342         * platform/text/cf/StringCF.cpp:
2343         (WTF::String::createCFString): CFSTR() create static CFString, it is unecessary to retain it.
2344         * platform/text/cf/StringImplCF.cpp:
2345         (WTF::StringImpl::createCFString): The logic to avoid the StringWrapperCFAllocator has also been simplified.
2346         The allocator creation is now closer to where it is useful.
2347
2348 2012-07-24  Kentaro Hara  <haraken@chromium.org>
2349
2350         [V8] String wrappers should be marked Independent
2351         https://bugs.webkit.org/show_bug.cgi?id=91251
2352
2353         Reviewed by Adam Barth.
2354
2355         Currently V8 String wrappers are not marked Independent.
2356         By marking them Independent, they can be reclaimed by the scavenger GC.
2357         Although I couldn't find a case where this change reduces memory usage,
2358         this change would be important for upcoming changes in string conversion
2359         between V8 and WebKit (https://bugs.webkit.org/show_bug.cgi?id=91850).
2360
2361         'm_lastStringImpl = 0' in StringCache::remove() is important.
2362         Look at the following code:
2363
2364             static void cachedStringCallback(v8::Persistent<v8::Value> wrapper, void* parameter)
2365             {
2366                 ...;
2367                 stringCache()->remove(stringImpl);
2368                 wrapper.Dispose();
2369             }
2370
2371             void StringCache::remove(StringImpl* stringImpl)
2372             {
2373                 ...
2374                 if (m_lastStringImpl.get() == stringImpl)
2375                     m_lastStringImpl = 0;
2376             }
2377
2378             v8::Local<v8::String> v8ExternalString(StringImpl* stringImpl, v8::Isolate* isolate)
2379             {
2380                 if (m_lastStringImpl.get() == stringImpl) {
2381                     return v8::Local<v8::String>::New(m_lastV8String); // m_lastV8String points to a wrapper object that was accessed most recently.
2382                 }
2383                 return v8ExternalStringSlow(stringImpl, isolate);
2384             }
2385
2386         Without 'm_lastStringImpl = 0', already disposed m_lastV8String can be used
2387         in v8ExternalString(). This was a cause of the crashes of r122614.
2388
2389         Tests: At the initial commit of this patch (r122614),
2390                the following tests had been broken due to missing 'm_lastStringImpl = 0'.
2391                fast/workers/worker-location.html
2392                Dromaeo/cssquery-jquery.html
2393                Dromaeo/jslib-event-jquery.html
2394                Dromaeo/jslib-style-jquery.html
2395                Dromaeo/jslib-style-prototype.html
2396
2397         * bindings/v8/V8Binding.cpp:
2398         (WebCore::StringCache::remove):
2399         (WebCore::StringCache::v8ExternalStringSlow):
2400
2401 2012-07-24  Tommy Widenflycht  <tommyw@google.com>
2402
2403         MediaStream API: Update MediaStreamTrack to match the specification
2404         https://bugs.webkit.org/show_bug.cgi?id=90180
2405
2406         Reviewed by Adam Barth.
2407
2408         MediaStreamTracks are now required to show the status of the underlying source,
2409         and trigger events when that status changes.
2410
2411         Test: fast/mediastream/MediaStreamTrack.html
2412
2413         * GNUmakefile.list.am:
2414         * Modules/mediastream/MediaStream.cpp:
2415         (WebCore::MediaStream::MediaStream):
2416         (WebCore::MediaStream::addTrack):
2417         * Modules/mediastream/MediaStreamTrack.cpp:
2418         (WebCore::MediaStreamTrack::create):
2419         (WebCore::MediaStreamTrack::MediaStreamTrack):
2420         (WebCore::MediaStreamTrack::~MediaStreamTrack):
2421         (WebCore::MediaStreamTrack::setEnabled):
2422         (WebCore::MediaStreamTrack::readyState):
2423         (WebCore):
2424         (WebCore::MediaStreamTrack::sourceChangedState):
2425         (WebCore::MediaStreamTrack::stop):
2426         (WebCore::MediaStreamTrack::interfaceName):
2427         (WebCore::MediaStreamTrack::scriptExecutionContext):
2428         (WebCore::MediaStreamTrack::eventTargetData):
2429         (WebCore::MediaStreamTrack::ensureEventTargetData):
2430         * Modules/mediastream/MediaStreamTrack.h:
2431         * Modules/mediastream/MediaStreamTrack.idl:
2432         * WebCore.gypi:
2433         * dom/EventNames.h:
2434         (WebCore):
2435         * dom/EventTargetFactory.in:
2436         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2437         * platform/chromium/support/WebMediaStreamSource.cpp:
2438         (WebKit::WebMediaStreamSource::setReadyState):
2439         (WebKit):
2440         (WebKit::WebMediaStreamSource::readyState):
2441         * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
2442         (WebCore):
2443         (WebCore::MediaStreamSource::create):
2444         (WebCore::MediaStreamSource::MediaStreamSource):
2445         (WebCore::MediaStreamSource::setReadyState):
2446         (WebCore::MediaStreamSource::addObserver):
2447         (WebCore::MediaStreamSource::removeObserver):
2448         * platform/mediastream/MediaStreamSource.h:
2449         (Observer):
2450         (WebCore::MediaStreamSource::Observer::~Observer):
2451         (MediaStreamSource):
2452         (WebCore::MediaStreamSource::readyState):
2453         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
2454         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
2455         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
2456
2457 2012-07-24  Scott Graham  <scottmg@chromium.org>
2458
2459         Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
2460         https://bugs.webkit.org/show_bug.cgi?id=91667
2461
2462         Reviewed by Tony Chang.
2463
2464         Using native tools instead of cygwin version improves build time
2465         performance by roughly 50% (on top of previous cl-instead-of-gcc
2466         change).
2467
2468         Also, use - instead of / for cl flags, otherwise preprocessing fails
2469         very slowly (due to retry loop). And, replace \ with / in gperf
2470         command line. Without this, gperf emits the filename literally in
2471         #line directives which causes VS to error with "unescaped \ in
2472         string". Bizarrely, building ColorData.cpp with those \ in place
2473         causes the IDE to exit with no error message, which was the cause of
2474         the previous canary failures.
2475
2476         No new tests.
2477
2478         * WebCore.gyp/WebCore.gyp:
2479         * WebCore.gyp/scripts/rule_bison.py:
2480         * bindings/scripts/preprocessor.pm:
2481         (applyPreprocessor):
2482         * make-hash-tools.pl:
2483
2484 2012-07-24  Daniel Cheng  <dcheng@chromium.org>
2485
2486         Files from drag and file <input> should use getMIMETypeForExtension to determine content type.
2487         https://bugs.webkit.org/show_bug.cgi?id=91702
2488
2489         Reviewed by Jian Li.
2490
2491         Awhile back, we changed File to only use getWellKnownMIMETypeForExtension to prevent web
2492         pages from being able to detect what applications a user has installed indirectly through
2493         the MIME types. However, some sites like YouTube's drag and drop uploader use MIME types
2494         that aren't in WebKit's internal list, so we relax the restriction for Files that originate
2495         from an user action.
2496
2497         * fileapi/File.cpp:
2498         (WebCore::getContentTypeFromFileName):
2499         (WebCore::createBlobDataForFile):
2500         (WebCore::createBlobDataForFileWithName):
2501         (WebCore::createBlobDataForFileWithMetadata):
2502         (WebCore::File::createWithRelativePath):
2503         (WebCore::File::File):
2504         * fileapi/File.h:
2505         (File):
2506         (WebCore::File::create):
2507         (WebCore::File::createWithName):
2508         * html/FileInputType.cpp:
2509         (WebCore::FileInputType::createFileList):
2510         * platform/chromium/ChromiumDataObject.cpp:
2511         (WebCore::ChromiumDataObject::addFilename):
2512         * platform/gtk/ClipboardGtk.cpp:
2513         (WebCore::ClipboardGtk::files):
2514         * platform/mac/ClipboardMac.mm:
2515         (WebCore::ClipboardMac::files):
2516         * platform/qt/ClipboardQt.cpp:
2517         (WebCore::ClipboardQt::files):
2518         * platform/win/ClipboardWin.cpp:
2519         (WebCore::ClipboardWin::files):
2520
2521 2012-07-24  Vsevolod Vlasov  <vsevik@chromium.org>
2522
2523         Web Inspector: Snippets UI polish
2524         https://bugs.webkit.org/show_bug.cgi?id=92142
2525
2526         Reviewed by Pavel Feldman.
2527
2528         Changed snippets context menu items.
2529         Added run snippet status bar button.
2530         Removed unused edit source button.
2531
2532         * English.lproj/localizedStrings.js:
2533         * inspector/front-end/Images/statusbarButtonGlyphs.png:
2534         * inspector/front-end/ScriptSnippetModel.js:
2535         (WebInspector.SnippetJavaScriptSourceFrame):
2536         (WebInspector.SnippetJavaScriptSourceFrame.prototype.statusBarItems):
2537         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
2538         * inspector/front-end/ScriptsNavigator.js:
2539         (WebInspector.SnippetsNavigatorView.prototype.getOrCreateFolderTreeElement):
2540         (WebInspector.SnippetsNavigatorView.prototype.handleContextMenu):
2541         * inspector/front-end/ScriptsPanel.js:
2542         (WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems):
2543         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2544         * inspector/front-end/SourceFrame.js:
2545         (WebInspector.SourceFrame.prototype.statusBarItems):
2546         * inspector/front-end/inspector.css:
2547         * inspector/front-end/scriptsPanel.css:
2548         (.evaluate-snippet-status-bar-item .glyph):
2549         (.evaluate-snippet-status-bar-item.toggled .glyph):
2550
2551 2012-07-24  Nico Weber  <thakis@chromium.org>
2552
2553         [chromium/mac] Remove webcore_resource_files from WebCore.gypi
2554         https://bugs.webkit.org/show_bug.cgi?id=92129
2555
2556         Reviewed by Adam Barth.
2557
2558         It was added in http://trac.webkit.org/changeset/81706/trunk/Source/WebCore/WebCore.gypi .
2559         The changes in that revision were mostly reverted in http://trac.webkit.org/changeset/119921 ,
2560         but this block was forgotten. Since it just confused me for a bit, remove it.
2561
2562         * WebCore.gyp/WebCore.gyp:
2563
2564 2012-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
2565
2566         inline-table wrapper should be generated for display: inline element only
2567         https://bugs.webkit.org/show_bug.cgi?id=92054
2568
2569         Reviewed by Abhishek Arya.
2570
2571         CSS 2.1 only takes into account the display when determining if we should generate
2572         an inline-table. My misreading of the spec would make us generate an inline-table
2573         wrapper for any inline formatting context.
2574
2575         Test: fast/table/inline-block-generates-table-wrapper.html
2576
2577         * rendering/RenderTable.cpp:
2578         (WebCore::RenderTable::createAnonymousWithParentRenderer):
2579         Changed to use display instead of isInline to properly match the spec.
2580
2581 2012-07-24  Alec Flett  <alecflett@chromium.org>
2582
2583         IndexedDB: Temporarily continue generating backend keys for empty key lists
2584         https://bugs.webkit.org/show_bug.cgi?id=92012
2585
2586         Reviewed by Tony Chang.
2587
2588         Temporarily change key behavior to allow chromium in_process_webkit
2589         to call putWithIndexKeys without inadvertently preventing index
2590         key generation. Note this is temporary until frontend key generation
2591         patch lands.
2592
2593         No new tests, this is part of a refactor that doesn't change behavior.
2594
2595         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2596         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2597
2598 2012-07-24  Pavel Feldman  <pfeldman@chromium.org>
2599
2600         Web Inspector: introduce UISourceCodeFrame.
2601         https://bugs.webkit.org/show_bug.cgi?id=92124
2602
2603         Reviewed by Vsevolod Vlasov.
2604
2605         Generic implementation of SourceFrame over UISourceCode added.
2606
2607         * WebCore.gypi:
2608         * WebCore.vcproj/WebCore.vcproj:
2609         * inspector/compile-front-end.py:
2610         * inspector/front-end/ScriptsPanel.js:
2611         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2612         * inspector/front-end/StylesPanel.js:
2613         * inspector/front-end/UISourceCodeFrame.js: Added.
2614         (WebInspector.UISourceCodeFrame):
2615         (WebInspector.UISourceCodeFrame.prototype.canEditSource):
2616         (WebInspector.UISourceCodeFrame.prototype.commitEditing):
2617         (WebInspector.UISourceCodeFrame.prototype.afterTextChanged):
2618         (WebInspector.UISourceCodeFrame.prototype._didEditContent):
2619         (WebInspector.UISourceCodeFrame.prototype._onContentChanged):
2620         (WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu):
2621         * inspector/front-end/WebKit.qrc:
2622         * inspector/front-end/inspector.html:
2623
2624 2012-07-24  Dan Bernstein  <mitz@apple.com>
2625
2626         <rdar://problem/11945102> REGRESSION (r109451): Overlay scrollbars always use the default style, regardless of background color
2627         https://bugs.webkit.org/show_bug.cgi?id=92115
2628
2629         Reviewed by Mark Rowe.
2630
2631         * platform/Scrollbar.cpp:
2632         (WebCore::Scrollbar::scrollbarOverlayStyle): Reversed an incorrect null check.
2633
2634 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
2635
2636         Another prospective build fix for Chromium. Unreviewed.
2637
2638         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2639
2640 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
2641
2642         Unreviewed prospective build fix for Chromium. Changed include of hb.h in HarfBuzzNGFace.h
2643
2644         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2645
2646 2012-07-24  Dominik Röttsches  <dominik.rottsches@intel.com>
2647
2648         HarfBuzzFaceNG.h forward declarations conflict with newer versions of Harfbuzz
2649         https://bugs.webkit.org/show_bug.cgi?id=92103
2650
2651         Reviewed by Philippe Normand.
2652
2653         As preparation for enabling harfbuzz-ng for EFL, I would like to include the header
2654         here since the forward declarations are conflicting with the harfbuzz version
2655         we will use for EFL.
2656
2657         No new tests, no change in behavior.
2658
2659         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2660
2661 2012-07-24  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2662
2663         Fix blend filter for autovectorizing
2664         https://bugs.webkit.org/show_bug.cgi?id=91398
2665
2666         Reviewed by Nikolas Zimmermann.
2667
2668         To support auto-vectorizing, the loop had to be unswitched, and regular arrays used that 
2669         did not do boundary-checks in the inner loop. Finally the integer division by 255
2670         was optimized not use integer division intrinsics.
2671
2672         On a X86-64 architechture using GCC -O3 on the file, this gives a speed-up of 2.9x.
2673
2674         * platform/graphics/filters/FEBlend.cpp:
2675         (WebCore::fastDivideBy255):
2676         (BlendNormal):
2677         (WebCore::BlendNormal::apply):
2678         (BlendMultiply):
2679         (WebCore::BlendMultiply::apply):
2680         (BlendScreen):
2681         (WebCore::BlendScreen::apply):
2682         (BlendDarken):
2683         (WebCore::BlendDarken::apply):
2684         (BlendLighten):
2685         (WebCore::BlendLighten::apply):
2686         (BlendUnknown):
2687         (WebCore::BlendUnknown::apply):
2688         (WebCore::platformApply):
2689         (WebCore::FEBlend::platformApplyGeneric):
2690         (WebCore::FEBlend::platformApplySoftware):
2691         * platform/graphics/filters/FEBlend.h:
2692         (FEBlend):
2693
2694 2012-07-23  Hans Wennborg  <hans@chromium.org>
2695
2696         Speech JavaScript API: Add the SpeechRecognitionResult.emma attribute
2697         https://bugs.webkit.org/show_bug.cgi?id=91743
2698
2699         Reviewed by Adam Barth.
2700
2701         Implement the 'emma' attribute as described in the spec draft at
2702         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
2703
2704         Test: fast/speech/scripted/emma.html
2705
2706         * Modules/speech/SpeechRecognitionResult.cpp:
2707         (WebCore::SpeechRecognitionResult::~SpeechRecognitionResult):
2708         (WebCore):
2709         (WebCore::SpeechRecognitionResult::emma):
2710         * Modules/speech/SpeechRecognitionResult.h:
2711         (WebCore):
2712         (SpeechRecognitionResult):
2713         * Modules/speech/SpeechRecognitionResult.idl:
2714         * WebCore.gypi:
2715         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp:
2716         (WebCore):
2717         (WebCore::V8SpeechRecognitionResult::visitDOMWrapper):
2718           We need to add an implicit reference from the result object to the
2719           emma object to keep the latters DOM tree alive across
2720           garbage-collection.
2721
2722 2012-07-24  Andrei Poenaru  <poenaru@adobe.com>
2723
2724         Web Inspector: Protocol Extension: add getFlowByName command
2725         https://bugs.webkit.org/show_bug.cgi?id=91855
2726
2727         Reviewed by Pavel Feldman.
2728
2729         The "getFlowByName" command should return a NamedFlow for a given document and name.
2730
2731         Test: inspector/styles/protocol-css-regions-commands.html
2732
2733         * inspector/Inspector.json:
2734         * inspector/InspectorCSSAgent.cpp:
2735         (WebCore::InspectorCSSAgent::getFlowByName):
2736         (WebCore):
2737         * inspector/InspectorCSSAgent.h:
2738         (InspectorCSSAgent):
2739         * inspector/front-end/CSSStyleModel.js:
2740         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
2741         (WebInspector.CSSStyleModel.prototype.getFlowByNameAsync):
2742         (WebInspector.NamedFlow):
2743         (WebInspector.NamedFlow.parsePayload):
2744
2745 2012-07-23  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
2746
2747         [Qt] Fix compilation against namespaced Qt
2748
2749         Reviewed by Simon Hausmann.
2750
2751         * platform/graphics/Font.h:
2752         * platform/network/ResourceHandleInternal.h:
2753         * platform/qt/ThirdPartyCookiesQt.h:
2754
2755 2012-07-24  Anthony Scian  <ascian@rim.com>
2756
2757         Web Inspector [JSC]: Enable initiator column in network panel.
2758         https://bugs.webkit.org/show_bug.cgi?id=65533
2759
2760         Reviewed by Vsevolod Vlasov.
2761
2762         With 40118 fixed for webkit, Preferences.displayInitiator should be set to true.
2763         Removed references to it since the optionality is no longer required.
2764
2765         Test: http/tests/inspector/network/network-initiator.html
2766
2767         * inspector/front-end/NetworkPanel.js:
2768         (WebInspector.NetworkLogView.prototype._createTable):
2769         (WebInspector.NetworkLogView.prototype.switchToDetailedView):
2770         (WebInspector.NetworkLogView.prototype.switchToBriefView):
2771         (WebInspector.NetworkDataGridNode.prototype.createCells):
2772         (WebInspector.NetworkDataGridNode.prototype.refreshRequest):
2773         * inspector/front-end/Settings.js:
2774
2775 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2776
2777         Missing *explicit* keyword in dom and page.
2778         https://bugs.webkit.org/show_bug.cgi?id=92074
2779
2780         Reviewed by Kentaro Hara.
2781
2782         Some constructors missed to use *explicit* keyword. They need to be added
2783         *explicit* keyword to contructor which has a parameter in order to avoid
2784         implicit type conversion.
2785
2786         Some files in dom directory can't use explicit keyword because of build breaks.
2787
2788         No new tests. Covered by existing tests.
2789
2790         * dom/BeforeLoadEvent.h:
2791         (WebCore::BeforeLoadEvent::BeforeLoadEvent):
2792         * dom/BeforeTextInsertedEvent.h:
2793         (BeforeTextInsertedEvent):
2794         * dom/ChildListMutationScope.h:
2795         (WebCore::ChildListMutationScope::ChildListMutationScope):
2796         * dom/ChildNodeList.h:
2797         (ChildNodeList):
2798         * dom/ClientRect.h:
2799         (ClientRect):
2800         * dom/ClientRectList.h:
2801         (ClientRectList):
2802         * dom/ComposedShadowTreeWalker.h:
2803         (ComposedShadowTreeParentWalker):
2804         * dom/DOMCoreException.h:
2805         (WebCore::DOMCoreException::DOMCoreException):
2806         * dom/DOMImplementation.h:
2807         (DOMImplementation):
2808         * dom/DatasetDOMStringMap.h:
2809         (WebCore::DatasetDOMStringMap::DatasetDOMStringMap):
2810         * dom/DeviceMotionController.h:
2811         (DeviceMotionController):
2812         * dom/DeviceOrientationController.h:
2813         (DeviceOrientationController):
2814         * dom/DocumentParser.h:
2815         (DocumentParser):
2816         * dom/EventException.h:
2817         (WebCore::EventException::EventException):
2818         * dom/EventListener.h:
2819         (WebCore::EventListener::EventListener):
2820         * dom/ExceptionBase.h:
2821         (ExceptionBase):
2822         * dom/GenericEventQueue.h:
2823         (GenericEventQueue):
2824         * dom/KeyboardEvent.h:
2825         (WebCore::KeypressCommand::KeypressCommand):
2826         * dom/MemoryInstrumentation.h:
2827         (WebCore::MemoryObjectInfo::MemoryObjectInfo):
2828         * dom/MessageChannel.h:
2829         (MessageChannel):
2830         * dom/MessagePort.h:
2831         (MessagePort):
2832         * dom/MessagePortChannel.h:
2833         (MessagePortChannel):
2834         * dom/MutationObserver.h:
2835         * dom/NamedNodeMap.h:
2836         (WebCore::NamedNodeMap::NamedNodeMap):
2837         * dom/NodeFilter.h:
2838         (WebCore::NodeFilter::NodeFilter):
2839         * dom/NodeWithIndex.h:
2840         (WebCore::NodeWithIndex::NodeWithIndex):
2841         * dom/Range.h:
2842         * dom/RangeException.h:
2843         (WebCore::RangeException::RangeException):
2844         * dom/RawDataDocumentParser.h:
2845         (WebCore::RawDataDocumentParser::RawDataDocumentParser):
2846         * dom/ScriptRunner.h:
2847         (ScriptRunner):
2848         * dom/SelectorQuery.h:
2849         (SelectorQuery):
2850         * dom/ShadowRoot.h:
2851         (ShadowRoot):
2852         * dom/SpaceSplitString.h:
2853         (SpaceSplitStringData):
2854         * dom/StaticHashSetNodeList.h:
2855         (StaticHashSetNodeList):
2856         * dom/StaticNodeList.h:
2857         (WebCore::StaticNodeList::StaticNodeList):
2858         * dom/TransformSource.h:
2859         (TransformSource):
2860         * dom/TreeScope.h:
2861         (TreeScope):
2862         * dom/WebKitNamedFlowCollection.h:
2863         (WebKitNamedFlowCollection):
2864         * page/EventHandler.h:
2865         (EventHandler):
2866         * page/FocusController.h:
2867         (FocusController):
2868         * page/FrameView.h:
2869         (FrameView):
2870         * page/MemoryInfo.h:
2871         (MemoryInfo):
2872         * page/Page.h:
2873         (Page):
2874         * page/PageGroup.h:
2875         (PageGroup):
2876         * page/PrintContext.h:
2877         (PrintContext):
2878         * page/Settings.h:
2879         (Settings):
2880         * page/SpeechInput.h:
2881         (SpeechInput):
2882         * page/SpeechInputResultList.h:
2883         (SpeechInputResultList):
2884         * page/WebKitAnimation.h:
2885         * page/WindowFeatures.h:
2886         (WindowFeatures):
2887         * page/WorkerNavigator.h:
2888         (WorkerNavigator):
2889
2890 2012-07-24  Kent Tamura  <tkent@chromium.org>
2891
2892         Replace some callsites of shadowAncestorNode() with shadowHost()
2893         https://bugs.webkit.org/show_bug.cgi?id=92060
2894
2895         Reviewed by Hajime Morita.
2896
2897         shadowAncestorNode() is deprecated.
2898
2899         No new tests. This shouldn't change behaviors.
2900
2901         * html/shadow/MediaControlElements.cpp:
2902         (WebCore::toParentMediaElement):
2903         * html/shadow/TextControlInnerElements.h:
2904         (WebCore::SpinButtonElement::isEnabledFormControl):
2905         (WebCore::SpinButtonElement::isReadOnlyFormControl):
2906         * platform/efl/RenderThemeEfl.cpp:
2907         (WebCore::RenderThemeEfl::paintMediaFullscreenButton):
2908         (WebCore::RenderThemeEfl::paintMediaMuteButton):
2909         * platform/gtk/RenderThemeGtk.cpp:
2910         (WebCore::getMediaElementFromRenderObject):
2911         (WebCore::centerRectVerticallyInParentInputElement):
2912         * platform/qt/RenderThemeQt.cpp:
2913         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
2914         (WebCore::RenderThemeQt::paintMediaSliderThumb):
2915         Removed an ASSERT() because nullness of o->node() is already asserted.
2916         * rendering/RenderInputSpeech.cpp:
2917         (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
2918         * rendering/RenderMediaControlsChromium.cpp:
2919         (WebCore::paintMediaSliderThumb):
2920         Passing shadowHost() to toParentMediaElement(), which accepts 0 and will return 0.
2921         (WebCore::paintMediaVolumeSliderThumb): ditto.
2922         * rendering/RenderThemeChromiumSkia.cpp:
2923         (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
2924         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
2925         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
2926         * rendering/RenderThemeMac.mm:
2927         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2928         Remove an ASSERT(input) because input never be null unless o->node() is
2929         null. If o->node() is null, this function crashes.
2930         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
2931         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
2932         (WebCore::RenderThemeMac::paintMediaMuteButton):
2933         It's ok to ignore "node is a media element" case because this function
2934         works only if node->isMediaControlElement().
2935         (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
2936         (WebCore::RenderThemeMac::paintMediaSliderTrack): ditto.
2937         * rendering/RenderThemeSafari.cpp:
2938         (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
2939         Remove an ASSERT(input) because input never be null unless o->node() is
2940         null. If o->node() is null, this function crashes.
2941         (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): ditto.
2942         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): ditto.
2943         * rendering/RenderThemeWinCE.cpp:
2944         (WebCore::mediaElementParent):
2945
2946 2012-07-24  Peter Beverloo  <peter@chromium.org>
2947
2948         [Chromium] Build fix for Android after r123424
2949         https://bugs.webkit.org/show_bug.cgi?id=92082
2950
2951         Unreviewed build fix.
2952
2953         Mark removed the PlatformSupport.h header from ScrollbarThemeChromiumAndroid.cpp
2954         in r123424, while there still are two references left to another method and a
2955         constant. Re-add the include directive.
2956
2957         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
2958
2959 2012-07-24  Kentaro Hara  <haraken@chromium.org>
2960
2961         [JSC] REGRESSION(r122912): CodeGeneratorJS.pm generates wrong code
2962         for static attributes in supplemental IDL files
2963         https://bugs.webkit.org/show_bug.cgi?id=91925
2964
2965         Reviewed by Adam Barth.
2966
2967         r122912 implemented static attributes in CodeGeneratorJS.pm.
2968         However, it generates wrong code for static attributes in supplemental
2969         IDL files. This patch fixes it as shown in JSTestInterface.cpp.
2970         This fix aligns with the fix in CodeGeneratorV8.pm (r123308).
2971
2972         Test: bindings/scripts/test/TestSupplemental.idl
2973
2974         * bindings/scripts/CodeGeneratorJS.pm:
2975         (GenerateImplementation):
2976         * bindings/scripts/test/JS/JSTestInterface.cpp:
2977         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
2978         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
2979         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
2980
2981 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2982
2983         Add *explicit* keyword to constructor which has a parameter in bridge, history, loader and plugins.
2984         https://bugs.webkit.org/show_bug.cgi?id=92064
2985
2986         Reviewed by Kentaro Hara.
2987
2988         Some constructors missed to use *explicit* keyword. They need to be added
2989         *explicit* keyword to contructor which has a parameter in order to avoid
2990         implicit type conversion.
2991
2992         No new tests. Covered by existing tests.
2993
2994         * bridge/IdentifierRep.h:
2995         (WebCore::IdentifierRep::IdentifierRep):
2996         * history/BackForwardListImpl.h:
2997         (BackForwardListImpl):
2998         * history/CachedFrame.h:
2999         (CachedFrame):
3000         * history/HistoryItem.h:
3001         (HistoryItem):
3002         * loader/DocumentWriter.h:
3003         (DocumentWriter):
3004         * loader/FrameNetworkingContext.h:
3005         (WebCore::FrameNetworkingContext::FrameNetworkingContext):
3006         * loader/HistoryController.h:
3007         * loader/ImageLoader.h:
3008         (ImageLoader):
3009         * loader/LinkLoader.h:
3010         (LinkLoader):
3011         * loader/MainResourceLoader.h:
3012         (MainResourceLoader):
3013         * loader/NavigationAction.h:
3014         (NavigationAction):
3015         * loader/NavigationScheduler.h:
3016         (NavigationScheduler):
3017         * loader/PolicyChecker.h:
3018         (PolicyChecker):
3019         * loader/SubframeLoader.h:
3020         (SubframeLoader):
3021         * loader/ThreadableLoaderClientWrapper.h:
3022         (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
3023         * plugins/PluginData.h:
3024         (PluginData):
3025         * plugins/PluginViewBase.h:
3026         (WebCore::PluginViewBase::PluginViewBase):
3027
3028 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
3029
3030         [Qt] Fix conversion from GregorianDateTime to QTime
3031         https://bugs.webkit.org/show_bug.cgi?id=92068
3032
3033         Reviewed by Simon Hausmann.
3034
3035         * bridge/qt/qt_runtime.cpp:
3036         (JSC::Bindings::convertValueToQVariant):
3037         * bridge/qt/qt_runtime_qt4.cpp:
3038         (JSC::Bindings::convertValueToQVariant):
3039
3040 2012-07-24  Arko Saha  <arko@motorola.com>
3041
3042         Microdata: Implement PropertyNodeList interface.
3043         https://bugs.webkit.org/show_bug.cgi?id=80269
3044
3045         Reviewed by Ryosuke Niwa.
3046
3047         Added support for PropertyNodeList interface. Currently HTMLPropertiesCollection.namedItem(name)
3048         returns NodeList object. Made changes so that it will return PropertyNodeList object.
3049
3050         Implemented propertyNodeList.getValues() method. It returns an array of various values. Its
3051         values are obtained from the "itemValue" DOM property of each of the elements represented by
3052         the object, in tree order.
3053
3054         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#propertynodelist
3055
3056         Tests: fast/dom/MicroData/nameditem-returns-propertynodelist.html
3057                fast/dom/MicroData/propertynodelist-getvalues-array-values-obtained-from-itemvalue-of-each-element.html
3058                fast/dom/MicroData/propertynodelist-getvalues-test.html
3059                fast/dom/MicroData/propertynodelist-test-add-remove-element.html
3060
3061         * CMakeLists.txt:
3062         * DerivedSources.cpp:
3063         * DerivedSources.make:
3064         * DerivedSources.pri:
3065         * GNUmakefile.list.am:
3066         * Target.pri:
3067         * UseJSC.cmake:
3068         * UseV8.cmake:
3069         * WebCore.gypi:
3070         * WebCore.vcproj/WebCore.vcproj:
3071         * WebCore.xcodeproj/project.pbxproj:
3072         * bindings/gobject/GNUmakefile.am:
3073         * bindings/js/JSBindingsAllInOne.cpp:
3074         * bindings/js/JSMicroDataItemValueCustom.cpp: Added.
3075         (WebCore):
3076         (WebCore::toJS): Added toJS() custom method. Returns Node if itemValue is node else returns String.
3077         * bindings/v8/custom/V8MicroDataItemValueCustom.cpp: Added.
3078         (WebCore):
3079         (WebCore::toV8): Added toV8 custom code.
3080         * dom/DynamicNodeList.cpp:
3081         (WebCore::DynamicNodeListCacheBase::rootNode): Return document if owner node has itemref attribute specified.
3082         (WebCore):
3083         (WebCore::DynamicNodeListCacheBase::ownerNodeHasItemRefAttribute): Returns true if owner node has itemref attribute
3084         specified with root type NodeListRootedAtDocumentIfOwnerHasItemrefAttr.
3085         (WebCore::DynamicNodeListCacheBase::invalidateCache):
3086         (WebCore::DynamicNodeList::itemWithName): Update itemrefElements cache if root type is
3087         NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
3088         * dom/DynamicNodeList.h: Added m_hasItemRefElements in DynamicNodeListCacheBase to check if itemRefElmenets cache
3089         is valid.
3090         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
3091         (WebCore::DynamicNodeListCacheBase::isRootedAtDocument):
3092         (DynamicNodeListCacheBase):
3093         (WebCore::DynamicNodeListCacheBase::isItemRefElementsCacheValid):
3094         (WebCore::DynamicNodeListCacheBase::setItemRefElementsCacheValid):
3095         (WebCore::DynamicNodeListCacheBase::rootType): Returns cached root type.
3096         (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Invalidate NodeListCache on itemref
3097         attribute change.
3098         * dom/Node.cpp:
3099         (WebCore::Node::propertyNodeList):
3100         * dom/Node.h:
3101         (WebCore):
3102         (Node):
3103         * dom/PropertyNodeList.cpp: Added.
3104         (WebCore):
3105         (WebCore::PropertyNodeList::PropertyNodeList):
3106         (WebCore::PropertyNodeList::~PropertyNodeList):
3107         (WebCore::PropertyNodeList::elementIsPropertyOfRefElement): Checks if the testElement is a property of Microdata
3108         item.
3109         (WebCore::PropertyNodeList::updateRefElements):
3110         (WebCore::PropertyNodeList::nodeMatches):
3111         (WebCore::PropertyNodeList::getValues): Returns PropertyValueArray whose values are obtained from the
3112         itemValue DOM property of each of the elements represented by the object, in tree order.
3113         * dom/PropertyNodeList.h: Added.
3114         (WebCore):
3115         (PropertyNodeList):
3116         (WebCore::PropertyNodeList::create):
3117         * dom/PropertyNodeList.idl: Added.
3118         * html/HTMLCollection.cpp:
3119         (WebCore::DynamicNodeListCacheBase::itemCommon): Update itemrefElements cache if its a NodeListCollectionType with
3120         root type NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
3121         * html/HTMLElement.cpp:
3122         (WebCore::HTMLElement::properties):
3123         (WebCore):
3124         (WebCore::HTMLElement::getItemRefElements): Returns the ItemRefElements list of given element. Added this
3125         method to share the code between HTMLPropertiesCollection and PropertyNodeList to update itemRefElements.
3126         * html/HTMLElement.h:
3127         (HTMLElement):
3128         * html/HTMLPropertiesCollection.cpp:
3129         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
3130         (WebCore::HTMLPropertiesCollection::updateRefElements):
3131         (WebCore::HTMLPropertiesCollection::updateNameCache):
3132         (WebCore::HTMLPropertiesCollection::namedItem): Return PropertyNodeList object instead of NodeList.
3133         (WebCore::HTMLPropertiesCollection::hasNamedItem): Return true if it finds an item with given
3134         name in the properties collection.
3135         * html/HTMLPropertiesCollection.h: Removed m_hasItemRefElements member variable, now DynamicNodeListCacheBase
3136         has isItemRefElementsCacheValid. Also removed m_hasPropertyNameCache, as DynamicNodeListCacheBase already has
3137         hasNameCache() and setHasNameCache().
3138         (WebCore):
3139         (HTMLPropertiesCollection):
3140         (WebCore::HTMLPropertiesCollection::invalidateCache):
3141         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
3142         * html/HTMLPropertiesCollection.idl:
3143         * html/MicroDataItemValue.idl: Added.
3144         * page/DOMWindow.idl:
3145
3146 2012-07-24  Kentaro Hara  <haraken@chromium.org>
3147
3148         [JSC] REGRESSION(r122912): CodeGeneratorJS.pm should not
3149         implicitly assume ScriptExecutionContext for static attributes
3150         https://bugs.webkit.org/show_bug.cgi?id=91924
3151
3152         Reviewed by Adam Barth.
3153
3154         r122912 implemented static attributes in CodeGeneratorJS.pm.
3155         However, the generated code assumes that static attributes
3156         always require ScriptExecutionContext, which is wrong.
3157         If we need a ScriptExecutionContext, we should specify
3158         [CallWith=ScriptExecutionContext].
3159
3160         This patch fixes CodeGeneratorJS.pm so that static attributes
3161         do not assume ScriptExecutionContext. This fix aligns with
3162         the fix in CodeGeneratorV8.pm in r123308.
3163
3164         Test: bindings/scripts/test/TestObj.idl
3165
3166         * bindings/scripts/CodeGeneratorJS.pm:
3167         (GenerateImplementation):
3168         * bindings/scripts/test/JS/JSTestInterface.cpp:
3169         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
3170         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
3171         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
3172         * bindings/scripts/test/JS/JSTestObj.cpp:
3173         (WebCore::jsTestObjConstructorStaticReadOnlyIntAttr):
3174         (WebCore::jsTestObjConstructorStaticStringAttr):
3175         (WebCore::setJSTestObjConstructorStaticStringAttr):
3176
3177 2012-07-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3178
3179         Missing *explicit* keyword in editing.
3180         https://bugs.webkit.org/show_bug.cgi?id=92055
3181
3182         Reviewed by Ryosuke Niwa.
3183
3184         Some constructors missed to use *explicit* keyword. They need to be added
3185         *explicit* keyword to contructor which has a parameter in order to avoid
3186         implicit type conversion.
3187
3188         No new tests. Covered by existing tests.
3189
3190         * editing/AlternativeTextController.h:
3191         (WebCore::AlternativeTextController::UNLESS_ENABLED):
3192         * editing/BreakBlockquoteCommand.h:
3193         (BreakBlockquoteCommand):
3194         * editing/DeleteButton.h:
3195         (DeleteButton):
3196         * editing/DeleteButtonController.h:
3197         (DeleteButtonController):
3198         * editing/EditCommand.h:
3199         (EditCommand):
3200         (WebCore::SimpleEditCommand::SimpleEditCommand):
3201         * editing/EditingBehavior.h:
3202         (WebCore::EditingBehavior::EditingBehavior):
3203         * editing/EditingStyle.h:
3204         (EditingStyle):
3205         * editing/Editor.h:
3206         (Editor):
3207         * editing/FrameSelection.h:
3208         (FrameSelection):
3209         * editing/InsertLineBreakCommand.h:
3210         (InsertLineBreakCommand):
3211         * editing/ModifySelectionListLevel.h:
3212         (ModifySelectionListLevelCommand):
3213         (DecreaseSelectionListLevelCommand):
3214         * editing/RemoveFormatCommand.h:
3215         (RemoveFormatCommand):
3216         * editing/RemoveNodeCommand.h:
3217         (RemoveNodeCommand):
3218         * editing/RemoveNodePreservingChildrenCommand.h:
3219         (RemoveNodePreservingChildrenCommand):
3220         * editing/ReplaceNodeWithSpanCommand.h:
3221         (ReplaceNodeWithSpanCommand):
3222         * editing/TextInsertionBaseCommand.h:
3223         (TextInsertionBaseCommand):
3224         * editing/UndoManager.h:
3225         (UndoManager):
3226         * editing/UnlinkCommand.h:
3227         (UnlinkCommand):
3228         * editing/WrapContentsInDummySpanCommand.h:
3229         (WrapContentsInDummySpanCommand):
3230
3231 2012-07-23  Dominic Mazzoni  <dmazzoni@google.com>
3232
3233         AX: Need AccessibilityObjects for nodes without renderers in canvas subtree
3234         https://bugs.webkit.org/show_bug.cgi?id=87899
3235
3236         Reviewed by Chris Fleizach.
3237
3238         Refactors AccessibilityRenderObject so that it inherits from a new class,
3239         AccessibilityNodeObject, that can be constructed from a Node without a
3240         renderer. Modifies AXObjectCache so that it automatically creates an
3241         AccessibilityNodeObject for elements in a canvas subtree but not otherwise.
3242         A new layout test verifies that this correctly exposes an accessibility
3243         tree with appropriate roles for elements in a canvas subtree.
3244
3245         This patch does not try to complete the implementation of
3246         AccessibilityNodeObject. Most AX methods are still unimplemented and need
3247         to be migrated from AccessibilityRenderObject to AccessibilityNodeObject
3248         in a future patch.
3249         
3250         This patch also doesn't change anything outside of WebCore/accessibility, so
3251         the rest of WebCore only calls AXObjectCache when there are changes to a
3252         RenderObject, not to a Node. Accessible notifications on nodes without
3253         renderers need to be implemented in a future patch.
3254
3255         Test: accessibility/canvas-accessibilitynodeobject.html
3256
3257         * CMakeLists.txt:
3258         * GNUmakefile.list.am:
3259         * Target.pri:
3260         * WebCore.gypi:
3261         * accessibility/AXObjectCache.cpp:
3262         (WebCore::AXObjectCache::get):
3263         (WebCore):
3264         (WebCore::createFromNode):
3265         (WebCore::AXObjectCache::getOrCreate):
3266         (WebCore::AXObjectCache::remove):
3267         * accessibility/AXObjectCache.h:
3268         (AXObjectCache):
3269         (WebCore::AXObjectCache::get):
3270         (WebCore::AXObjectCache::getOrCreate):
3271         (WebCore::AXObjectCache::remove):
3272         * accessibility/AccessibilityARIAGrid.cpp:
3273         (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid):
3274         (WebCore):
3275         (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid):
3276         (WebCore::AccessibilityARIAGrid::init):
3277         (WebCore::AccessibilityARIAGrid::create):
3278         * accessibility/AccessibilityARIAGrid.h:
3279         (AccessibilityARIAGrid):
3280         * accessibility/AccessibilityARIAGridCell.cpp:
3281         (WebCore::AccessibilityARIAGridCell::create):
3282         * accessibility/AccessibilityARIAGridRow.cpp:
3283         (WebCore::AccessibilityARIAGridRow::create):
3284         * accessibility/AccessibilityAllInOne.cpp:
3285         * accessibility/AccessibilityList.cpp:
3286         (WebCore::AccessibilityList::create):
3287         * accessibility/AccessibilityListBox.cpp:
3288         (WebCore::AccessibilityListBox::create):
3289         * accessibility/AccessibilityMediaControls.cpp:
3290         (WebCore::AccessibilityMediaControl::create):
3291         (WebCore::AccessibilityMediaControlsContainer::create):
3292         (WebCore::AccessibilityMediaTimeline::create):
3293         (WebCore::AccessibilityMediaTimeDisplay::create):
3294         * accessibility/AccessibilityMenuList.cpp:
3295         (WebCore::AccessibilityMenuList::create):
3296         (WebCore):
3297         * accessibility/AccessibilityMenuList.h:
3298         (AccessibilityMenuList):
3299         * accessibility/AccessibilityNodeObject.cpp: Added.
3300         (WebCore):
3301         (WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
3302         (WebCore::AccessibilityNodeObject::~AccessibilityNodeObject):
3303         (WebCore::AccessibilityNodeObject::init):
3304         (WebCore::AccessibilityNodeObject::create):
3305         (WebCore::AccessibilityNodeObject::detach):
3306         (WebCore::AccessibilityNodeObject::childrenChanged):
3307         (WebCore::AccessibilityNodeObject::updateAccessibilityRole):
3308         (WebCore::AccessibilityNodeObject::firstChild):
3309         (WebCore::AccessibilityNodeObject::lastChild):
3310         (WebCore::AccessibilityNodeObject::previousSibling):
3311         (WebCore::AccessibilityNodeObject::nextSibling):
3312         (WebCore::AccessibilityNodeObject::parentObjectIfExists):
3313         (WebCore::AccessibilityNodeObject::parentObject):
3314         (WebCore::AccessibilityNodeObject::elementRect):
3315         (WebCore::AccessibilityNodeObject::setNode):
3316         (WebCore::AccessibilityNodeObject::document):
3317         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
3318         (WebCore::AccessibilityNodeObject::addChildren):
3319         (WebCore::AccessibilityNodeObject::accessibilityIsIgnored):
3320         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
3321         (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute):
3322         (WebCore::AccessibilityNodeObject::ariaRoleAttribute):
3323         (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent):
3324         * accessibility/AccessibilityNodeObject.h: Added.
3325         (WebCore):
3326         (AccessibilityNodeObject):
3327         (WebCore::AccessibilityNodeObject::isAccessibilityNodeObject):
3328         (WebCore::AccessibilityNodeObject::node):
3329         (WebCore::AccessibilityNodeObject::isDetached):
3330         (WebCore::toAccessibilityNodeObject):
3331         * accessibility/AccessibilityObject.h:
3332         (WebCore::AccessibilityObject::isAccessibilityNodeObject):
3333         * accessibility/AccessibilityProgressIndicator.cpp:
3334         (WebCore::AccessibilityProgressIndicator::create):
3335         * accessibility/AccessibilityRenderObject.cpp:
3336         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
3337         (WebCore::AccessibilityRenderObject::init):
3338         (WebCore):
3339         (WebCore::AccessibilityRenderObject::create):
3340         (WebCore::AccessibilityRenderObject::detach):
3341         (WebCore::AccessibilityRenderObject::setRenderer):
3342         (WebCore::AccessibilityRenderObject::canHaveChildren):
3343         (WebCore::AccessibilityRenderObject::addCanvasChildren):
3344         (WebCore::AccessibilityRenderObject::addChildren):
3345         * accessibility/AccessibilityRenderObject.h:
3346         (AccessibilityRenderObject):
3347         * accessibility/AccessibilitySlider.cpp:
3348         (WebCore::AccessibilitySlider::create):
3349         * accessibility/AccessibilityTable.cpp:
3350         (WebCore::AccessibilityTable::AccessibilityTable):
3351         (WebCore):
3352         (WebCore::AccessibilityTable::~AccessibilityTable):
3353         (WebCore::AccessibilityTable::init):
3354         (WebCore::AccessibilityTable::create):
3355         * accessibility/AccessibilityTable.h:
3356         (AccessibilityTable):
3357         * accessibility/AccessibilityTableCell.cpp:
3358         (WebCore::AccessibilityTableCell::create):
3359         * accessibility/AccessibilityTableRow.cpp:
3360         (WebCore::AccessibilityTableRow::create):
3361
3362 2012-07-23  David Barr  <davidbarr@chromium.org>
3363
3364         Fix ENABLE_CSS_IMAGE_ORIENTATION compile flag
3365         https://bugs.webkit.org/show_bug.cgi?id=91961
3366
3367         Reviewed by Tony Chang.
3368
3369         https://bugs.webkit.org/show_bug.cgi?id=89055
3370         A rule was missed implementing the ENABLE_CSS_IMAGE_ORIENTATION compile flag.
3371
3372         https://bugs.webkit.org/show_bug.cgi?id=90046
3373         Half of the missing rule was inadvertently added together with ENABLE_CSS_STICKY_POSITION.
3374
3375         No new tests; build configuration fix.
3376
3377         * Configurations/FeatureDefines.xcconfig:
3378
3379 2012-07-23  Douglas Stockwell  <dstockwell@chromium.org>
3380
3381         Null-pointer crash when a derived color like -webkit-activelink is set in a gradient stop
3382         https://bugs.webkit.org/show_bug.cgi?id=89148
3383
3384         Reviewed by Simon Fraser.
3385
3386         CSSGradientValue attempted to resolve colors during paint, this crashed
3387         when a derived color like -webkit-activelink was encountered because the
3388         corresponding element was no longer available in the StyleResolver.
3389         Instead, by adding a field to CSSGradientColorStop we can resolve and
3390         then cache the resolved colors at the correct time. To avoid sharing
3391         cached derived colors between elements we clone the gradient values when
3392         needed.
3393
3394         Test: fast/css/crash-on-gradient-with-derived-color.html
3395
3396         * css/CSSGradientValue.cpp:
3397         (WebCore::CSSGradientValue::gradientWithStylesResolved): Added. Resolve and cache
3398         resolved colors, clone if colors are derived from the element.
3399         (WebCore):
3400         (WebCore::CSSGradientValue::addStops):
3401         (WebCore::CSSGradientValue::isCacheable): Defer to new logic in
3402         StyleResolver.
3403         * css/CSSGradientValue.h:
3404         (CSSGradientColorStop): Added cache of resolved color.
3405         (CSSGradientValue):
3406         (CSSLinearGradientValue):
3407         (CSSRadialGradientValue):
3408         * css/CSSImageGeneratorValue.h:
3409         (WebCore):
3410         * css/CSSValue.h:
3411         (WebCore::CSSValue::isGradientValue):
3412         * css/StyleResolver.cpp:
3413         (WebCore::StyleResolver::collectMatchingRulesForList):
3414         * css/StyleResolver.h:
3415         (StyleResolver):
3416         * rendering/style/StyleGeneratedImage.cpp:
3417         (WebCore::StyleGeneratedImage::image): Revert change from r96449. This
3418         is no longer necessary as the gradient colors are now resolved at a
3419         time when the style is set on StyleResolver.
3420
3421 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
3422
3423         Move GregorianDateTime from JSC to WTF namespace
3424         https://bugs.webkit.org/show_bug.cgi?id=91948
3425
3426         Reviewed by Geoffrey Garen.
3427
3428         Moving GregorianDateTime into the WTF namespace allows us to us to
3429         use it in WebCore too. The new class has the same behaviour as the
3430         old struct. Only the unused timeZone member has been removed.
3431
3432         * bridge/qt/qt_runtime.cpp:
3433         (JSC::Bindings::convertValueToQVariant):
3434         (JSC::Bindings::convertQVariantToValue):
3435         * bridge/qt/qt_runtime_qt4.cpp:
3436         (JSC::Bindings::convertValueToQVariant):
3437         (JSC::Bindings::convertQVariantToValue):
3438
3439 2012-07-23  Mark Pilgrim  <pilgrim@chromium.org>
3440
3441         [Chromium] Move layoutTestMode to WebCore
3442         https://bugs.webkit.org/show_bug.cgi?id=92010
3443
3444         Reviewed by Adam Barth.
3445
3446         Part of a refactoring series. See tracking bug 82948.
3447
3448         * CMakeLists.txt:
3449         * GNUmakefile.list.am:
3450         * Target.pri:
3451         * WebCore.gypi:
3452         * WebCore.vcproj/WebCore.vcproj:
3453         * WebCore.xcodeproj/project.pbxproj:
3454         * bindings/generic/RuntimeEnabledFeatures.h:
3455         (RuntimeEnabledFeatures):
3456         * platform/LayoutTestSupport.cpp: Added.
3457         (WebCore):
3458         (WebCore::isRunningLayoutTest):
3459         (WebCore::setIsRunningLayoutTest):
3460         * platform/LayoutTestSupport.h: Added.
3461         (WebCore):
3462         * platform/chromium/PlatformSupport.h:
3463         (PlatformSupport):
3464         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3465         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
3466         (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
3467         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
3468         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
3469         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
3470         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
3471         (WebCore):
3472         (WebCore::LookupAltName):
3473         (WebCore::fontContainsCharacter):
3474         (WebCore::FillLogFont):
3475         (WebCore::FontCache::getFontDataForCharacters):
3476         (WebCore::FontCache::createFontPlatformData):
3477         * platform/graphics/skia/FontCustomPlatformData.cpp:
3478         (WebCore::FontCustomPlatformData::fontPlatformData):
3479         * platform/graphics/skia/FontSkia.cpp:
3480         (WebCore::Font::drawGlyphs):
3481         * rendering/RenderThemeChromiumAndroid.cpp:
3482         (WebCore::RenderThemeChromiumAndroid::systemColor):
3483         (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle):
3484         * rendering/RenderThemeChromiumMac.mm:
3485         (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
3486         * rendering/RenderThemeChromiumSkia.cpp:
3487         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
3488         * rendering/RenderThemeChromiumWin.cpp:
3489         (WebCore):
3490         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
3491         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
3492         (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
3493         (WebCore::RenderThemeChromiumWin::systemColor):
3494         (WebCore::menuListButtonWidth):
3495         (WebCore::RenderThemeChromiumWin::determineClassicState):
3496
3497 2012-07-23  Dave Tu  <dtu@chromium.org>
3498
3499         [chromium] Add droppedFrameCount to renderingStats.
3500         https://bugs.webkit.org/show_bug.cgi?id=91694
3501
3502         Reviewed by Adrienne Walker.
3503
3504         * platform/graphics/chromium/cc/CCFrameRateCounter.cpp:
3505         (WebCore):
3506         (WebCore::CCFrameRateCounter::frameInterval):
3507         (WebCore::CCFrameRateCounter::frameIndex):
3508         (WebCore::CCFrameRateCounter::CCFrameRateCounter):
3509         (WebCore::CCFrameRateCounter::markBeginningOfFrame):
3510         (WebCore::CCFrameRateCounter::isBadFrame):
3511         * platform/graphics/chromium/cc/CCFrameRateCounter.h:
3512         (WebCore::CCFrameRateCounter::droppedFrameCount):
3513         (CCFrameRateCounter):
3514         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3515         (WebCore::CCLayerTreeHost::renderingStats):
3516         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3517         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3518         (WebCore::CCLayerTreeHostImpl::drawLayers):
3519         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3520         (CCLayerTreeHostImpl):
3521         * platform/graphics/chromium/cc/CCRenderingStats.h:
3522         (CCRenderingStats):
3523         (WebCore::CCRenderingStats::CCRenderingStats):
3524         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3525         (WebCore::CCSingleThreadProxy::implSideRenderingStats):
3526         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3527         (WebCore::CCThreadProxy::implSideRenderingStatsOnImplThread):
3528
3529 2012-07-23  Dan Bernstein  <mitz@apple.com>
3530
3531         Fixed the build after r123418.
3532
3533         * WebCore.exp.in: Added DocumentMarkerController::addTextMatchMarker.
3534
3535 2012-07-23  Mike Lawther  <mikelawther@chromium.org>
3536
3537         CSS3 calc: optimise blending expression
3538         https://bugs.webkit.org/show_bug.cgi?id=90037
3539
3540         Reviewed by Tony Chang.
3541
3542         Introduce a new calc expression node - a BlendLength node. Given two Lengths and a progress
3543         this blends them together when evaluated.
3544
3545         An alternative and more general approach of being able to blend two CalcExpressionNodes was
3546         tested, but involves more memory allocations, was measurably slower, and nothing currently
3547         would make use of the generality. 
3548
3549         No functional change. Covered by existing tests.
3550
3551         * platform/CalculationValue.h:
3552         (CalcExpressionBlendLength):
3553         (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
3554         (WebCore::CalcExpressionBlendLength::operator==):
3555         (WebCore::CalcExpressionBlendLength::evaluate):
3556         (WebCore):
3557         * platform/Length.cpp:
3558         (WebCore::Length::blendCalculation):
3559
3560 2012-07-23  Nico Weber  <thakis@chromium.org>
3561
3562         [chromium] Show search tickmarks on css-styled scrollbars
3563         https://bugs.webkit.org/show_bug.cgi?id=91949
3564
3565         Reviewed by Adrienne Walker.
3566
3567         This is done by letting RenderScrollbarTheme::paintTickmarks()
3568         delegate to the native ScrollbarTheme. To make this possible,
3569         move paintTickmarks() from ScrollbarThemeComposite to the
3570         superclass ScrollbarTheme.
3571
3572         For testing, add internals.addTextMatchMarker() and add a pixel test.
3573
3574         * platform/ScrollbarTheme.h:
3575         (WebCore::ScrollbarTheme::paintTickmarks):
3576         Moved paintTickmarks() from ScrollbarThemeComposite to here.
3577         * platform/ScrollbarThemeComposite.h:
3578         Remove paintTickmarks().
3579         * platform/chromium/ScrollbarThemeChromium.cpp:
3580         (WebCore::ScrollbarThemeChromium::paintTickmarks):
3581         Switch to drawing tickmarks as vectors, so they can be arbitrarily wide.
3582         * platform/chromium/ScrollbarThemeChromiumMac.h:
3583         (ScrollbarThemeChromiumMac):
3584         Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
3585         * platform/chromium/ScrollbarThemeChromiumMac.mm:
3586         (WebCore::ScrollbarThemeChromiumMac::paint):
3587         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
3588         Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
3589         * rendering/RenderScrollbarTheme.cpp:
3590         (WebCore::RenderScrollbarTheme::paintTickmarks):
3591         Delegate to the native ScrollbarTheme for tickmark drawing.
3592         (WebCore):
3593         * rendering/RenderScrollbarTheme.h:
3594         (RenderScrollbarTheme):
3595         Override paintTickmarks().
3596
3597 2012-07-23  Brian Anderson  <brianderson@chromium.org>
3598
3599         [chromium] Use shallow flushes that don't glFlush
3600         https://bugs.webkit.org/show_bug.cgi?id=90325
3601
3602         Reviewed by Kenneth Russell.
3603
3604         Adds plumbing for the shallowFlushCHROMIUM extension and uses
3605         shallow flushes instead of normal flushes when uploading textures.
3606         Shallow flushes allow us to initiate command buffer flushes to
3607         the GPU thread/process without the overhead of a true glFlush.
3608
3609         CCTextureUpdaterTest updated to recognize shallow flushes.
3610
3611         * platform/chromium/support/Extensions3DChromium.cpp:
3612         (WebCore::Extensions3DChromium::shallowFlushCHROMIUM):
3613         (WebCore):
3614         * platform/graphics/chromium/Extensions3DChromium.h:
3615         (Extensions3DChromium):
3616         * platform/graphics/chromium/cc/CCGraphicsContext.h:
3617         * platform/graphics/chromium/cc/CCResourceProvider.cpp:
3618         (WebCore::CCResourceProvider::shallowFlushIfSupported):
3619         (WebCore):
3620         (WebCore::CCResourceProvider::CCResourceProvider):
3621         (WebCore::CCResourceProvider::initialize):
3622         * platform/graphics/chromium/cc/CCResourceProvider.h:
3623         (CCResourceProvider):
3624         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
3625         (WebCore::CCTextureUpdater::update):
3626
3627 2012-07-23  Hanyee Kim  <choco@company100.net>
3628
3629         When using TextureMapper, WebKit does not retain final value of opacity in animations, unless it is specified on the last key frame.
3630         https://bugs.webkit.org/show_bug.cgi?id=91322
3631
3632         Reviewed by Noam Rosenthal.
3633
3634         When -webkit-fill-mode is forwards, GraphicsLayerAnimation::apply does not apply
3635         the property values defined in the last executing keyframe after the final iteration of animation.
3636
3637         This patch does not return right after the end of animation, but it keeps applying
3638         the property values defined in the last executing keyframe.
3639         Add normalizedAnimationValueForFillsForwards function that returns a normalized value of the
3640         last executing keyframe.
3641
3642         Link to CSS Animations spec: http://www.w3.org/TR/css3-animations/#animation-fill-mode-property
3643
3644         Test: animations/fill-mode-forwards2.html
3645
3646         * platform/graphics/GraphicsLayerAnimation.cpp:
3647         (WebCore::normalizedAnimationValueForFillsForwards):
3648         (WebCore):
3649         (WebCore::GraphicsLayerAnimation::apply):
3650
3651 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3652
3653         Unreviewed, rolling out r123184, r123195, and r123197.
3654         http://trac.webkit.org/changeset/123184
3655         http://trac.webkit.org/changeset/123195
3656         http://trac.webkit.org/changeset/123197
3657         https://bugs.webkit.org/show_bug.cgi?id=92049
3658
3659         pagecycler regression (Requested by morrita on #webkit).
3660
3661         * WebCore.exp.in:
3662         * dom/Document.cpp:
3663         (WebCore::Document::Document):
3664         (WebCore::Document::~Document):
3665         (WebCore::Document::suggestedMIMEType):
3666         * dom/Document.h:
3667         (WebCore):
3668         (WebCore::Node::isDocumentNode):
3669         (WebCore::Node::Node):
3670         * dom/Node.cpp:
3671         (WebCore::Node::~Node):
3672         (WebCore::Node::setDocument):
3673         (WebCore):
3674         (WebCore::Node::setTreeScope):
3675         (WebCore::Node::treeScope):
3676         (WebCore::Node::isInShadowTree):
3677         (WebCore::Node::reportMemoryUsage):
3678         * dom/Node.h:
3679         (Node):
3680         (WebCore::Node::document):
3681         (WebCore::Node::inDocument):
3682         * dom/NodeRareData.h:
3683         (WebCore::NodeRareData::NodeRareData):
3684         (WebCore::NodeRareData::treeScope):
3685         (WebCore::NodeRareData::setTreeScope):
3686         (NodeRareData):
3687         * dom/ShadowRoot.cpp:
3688         (WebCore::ShadowRoot::ShadowRoot):
3689         * dom/TreeScope.cpp:
3690         (WebCore::TreeScope::TreeScope):
3691         (WebCore::TreeScope::setParentTreeScope):
3692         * dom/TreeScope.h:
3693         (WebCore):
3694         (WebCore::TreeScope::idTargetObserverRegistry):
3695         (TreeScope):
3696         * dom/TreeScopeAdopter.cpp:
3697         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
3698         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
3699         * editing/MoveSelectionCommand.cpp:
3700         * editing/RemoveNodeCommand.cpp:
3701         * editing/RemoveNodePreservingChildrenCommand.cpp:
3702         * inspector/PageConsoleAgent.cpp:
3703
3704 2012-07-23  Roger Fong  <roger_fong@apple.com>
3705
3706         On Windows, if select element is off screen horizontally, 
3707         menu is either inappropriately resized or positioned offscreen.
3708         https://bugs.webkit.org/show_bug.cgi?id=91913
3709         <rdar://problem/7611229>
3710
3711         Reviewed by Tim Horton.
3712
3713         If the select element is positioned off the edge of the screen to the left, 
3714         the menu is resized. It should not be resized, just shifted to remain on the screen.
3715         If the select element is positioned off the edge of the screen to the right, 
3716         the menu goes off screen instead of being shifted over to appear on screen.
3717         This problem only occurs on Windows.
3718         
3719         Test: ManualTests/win/select-menu-off-screen.html
3720
3721         * platform/win/PopupMenuWin.cpp:
3722         (WebCore::PopupMenuWin::calculatePositionAndSize):
3723         Modified final horizontal position calculation code to position
3724         popup menu on screen if it would otherwise go off.
3725         
3726 2012-07-23  David Dorwin  <ddorwin@chromium.org>
3727
3728         Fixed crash in webkitAddKey() when key parameter is null.
3729         https://bugs.webkit.org/show_bug.cgi?id=85444
3730
3731         Reviewed by Kentaro Hara.
3732
3733         Reference: Step 1 of http://dvcs.w3.org/hg/html-media/raw-file/5f76a0b43836/encrypted-media/encrypted-media.html#dom-addkey
3734
3735         Tests: media/encrypted-media/encrypted-media-syntax.html 
3736
3737         * html/HTMLMediaElement.cpp:
3738         (WebCore::HTMLMediaElement::webkitAddKey):
3739
3740 2012-07-23  Hayato Ito  <hayato@chromium.org>
3741
3742         A FocusScope for a distributed node should not be its TreeScope.
3743         https://bugs.webkit.org/show_bug.cgi?id=91829
3744
3745         Reviewed by Dimitri Glazkov.
3746
3747         Current implementation of FocusScope::focusScopeOf(Node*) returns
3748         the given node's treeScope().  That does not apply if the node is
3749         a distributed node.  We should calculate a FocusScope for a
3750         distributed node by traversing ancestor nodes in Composed Shadow
3751         Tree.
3752
3753         Test: fast/dom/shadow/focus-navigation-with-distributed-nodes.html
3754
3755         * page/FocusController.cpp:
3756         (WebCore::FocusScope::focusScopeOf):
3757
3758 2012-07-23  Douglas Stockwell  <dstockwell@google.com>
3759
3760         Null-pointer crash when parsing border-image
3761         https://bugs.webkit.org/show_bug.cgi?id=91963
3762
3763         Reviewed by Darin Adler.
3764
3765         Test: fast/css/border-image-fill-crash.html
3766
3767         * css/CSSParser.cpp:
3768         (WebCore::CSSParser::parseBorderImageRepeat): Handle the case where
3769         parseBorderImageRepeat is called when the value list is empty.
3770
3771 2012-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
3772
3773         [CSS Exclusions] SVG shape errors should invalidate exclusion shapes
3774         https://bugs.webkit.org/show_bug.cgi?id=91761
3775
3776         Reviewed by Andreas Kling.
3777
3778         CSS exclusion shapes that are specified with negative radiuses or
3779         height/width are now considered invalid and ignored.
3780
3781         Tests added to
3782         LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html
3783
3784         * css/CSSParser.cpp:
3785         (WebCore::CSSParser::parseExclusionShapeRectangle):
3786         (WebCore::CSSParser::parseExclusionShapeCircle):
3787         (WebCore::CSSParser::parseExclusionShapeEllipse):
3788
3789 2012-07-23  Tien-Ren Chen  <trchen@chromium.org>
3790
3791         [chromium] Implement scrollbar theme for Android
3792         https://bugs.webkit.org/show_bug.cgi?id=91674
3793
3794         Reviewed by Adam Barth.
3795
3796         Previously the scrollbar for Android was implemented as an extra
3797         drawing pass in the compositor. Now we switch to use the standard
3798         ScrollbarTheme mechanism.
3799
3800         No new tests. We use mock scrollbars during layout test to share
3801         pixel results with Linux.
3802
3803         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3804         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
3805         (WebCore::ScrollbarThemeChromiumAndroid::thumbPosition):
3806         (WebCore::ScrollbarThemeChromiumAndroid::thumbLength):
3807         (WebCore::ScrollbarThemeChromiumAndroid::backButtonRect):
3808         (WebCore::ScrollbarThemeChromiumAndroid::forwardButtonRect):
3809         (WebCore::ScrollbarThemeChromiumAndroid::trackRect):
3810         (WebCore):
3811         (WebCore::ScrollbarThemeChromiumAndroid::paintThumb):
3812         (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
3813         * platform/chromium/ScrollbarThemeChromiumAndroid.h:
3814         (WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars):
3815         (ScrollbarThemeChromiumAndroid):
3816         (WebCore::ScrollbarThemeChromiumAndroid::hasButtons):
3817         (WebCore::ScrollbarThemeChromiumAndroid::hasThumb):
3818
3819 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
3820
3821         Use the original token to create an element in "reconstruct the active formatting elements" and "call the adoption agency"
3822         https://bugs.webkit.org/show_bug.cgi?id=91703
3823
3824         Reviewed by Adam Barth.
3825
3826         The current WebKit HTML5 parser implementation does not hold the original token
3827         in the stack of open elements and the active formatting elements. This is
3828         problematic because the original token is used to create an element in
3829         "reconstruct the active formatting elements" and "call the adoption agency".
3830
3831         As a workaround, WebKit uses the saved element instead of the original token
3832         to create an element. But this causes us to fail examples like this:
3833         <b id="1"><p><script>document.getElementById("1").id = "2"</script></p>TEXT</b>
3834         reconstructTheActiveFormattingElements calls this method to open a second <b>
3835         tag to wrap TEXT, it will have id "2", even though the HTML5 spec implies it
3836         should be "1".
3837
3838         Created a ref-counted container class, HTMLStackItem to hold the original token
3839         and the namespace URI as well as the element. Changed HTMLElementStack and
3840         HTMLFormattingElementList to use HTMLStackItem.
3841         Changed HTMLConstructionSite::reconstructTheActiveFormattingElements and
3842         HTMLTreeBuilder::callTheAdoptionAgency to create an element from the saved token
3843         instead of the saved element.
3844
3845         Updated test expectation for html5lib/runner-expected.txt
3846         because now resources/scripted/adoption01.dat passes.
3847
3848         * html/parser/HTMLConstructionSite.cpp:
3849         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
3850         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
3851         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
3852         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
3853         (WebCore::HTMLConstructionSite::insertHTMLElement):
3854         (WebCore::HTMLConstructionSite::insertFormattingElement):
3855         (WebCore::HTMLConstructionSite::insertScriptElement):
3856         (WebCore::HTMLConstructionSite::insertForeignElement):
3857         (WebCore::HTMLConstructionSite::createElementFromSavedToken):
3858         (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
3859         * html/parser/HTMLConstructionSite.h:
3860         (HTMLConstructionSite):
3861         (WebCore::HTMLConstructionSite::currentElementRecord):
3862         * html/parser/HTMLElementStack.cpp:
3863         (WebCore::HTMLElementStack::ElementRecord::ElementRecord):
3864         (WebCore::HTMLElementStack::ElementRecord::replaceElement):
3865         (WebCore::HTMLElementStack::pushRootNode):
3866         (WebCore::HTMLElementStack::pushHTMLHtmlElement):
3867         (WebCore::HTMLElementStack::pushRootNodeCommon):
3868         (WebCore::HTMLElementStack::pushHTMLHeadElement):
3869         (WebCore::HTMLElementStack::pushHTMLBodyElement):
3870         (WebCore::HTMLElementStack::push):
3871         (WebCore::HTMLElementStack::insertAbove):
3872         (WebCore::HTMLElementStack::pushCommon):
3873         * html/parser/HTMLElementStack.h:
3874         (WebCore::HTMLElementStack::ElementRecord::element):
3875         (WebCore::HTMLElementStack::ElementRecord::node):
3876         (WebCore::HTMLElementStack::ElementRecord::stackItem):
3877         (ElementRecord):
3878         (HTMLElementStack):
3879         * html/parser/HTMLFormattingElementList.cpp:
3880         (WebCore::HTMLFormattingElementList::swapTo):
3881         (WebCore::HTMLFormattingElementList::append):
3882         * html/parser/HTMLFormattingElementList.h:
3883         (WebCore::HTMLFormattingElementList::Entry::Entry):
3884         (WebCore::HTMLFormattingElementList::Entry::isMarker):
3885         (WebCore::HTMLFormattingElementList::Entry::stackItem):
3886         (WebCore::HTMLFormattingElementList::Entry::element):
3887         (WebCore::HTMLFormattingElementList::Entry::replaceElement):
3888         (WebCore::HTMLFormattingElementList::Entry::operator==):
3889         (WebCore::HTMLFormattingElementList::Entry::operator!=):
3890         (Entry):
3891         (HTMLFormattingElementList):
3892         * html/parser/HTMLStackItem.h: Added.
3893         (WebCore):
3894         (HTMLStackItem):
3895         (WebCore::HTMLStackItem::create):
3896         (WebCore::HTMLStackItem::element):
3897         (WebCore::HTMLStackItem::node):
3898         (WebCore::HTMLStackItem::token):
3899         (WebCore::HTMLStackItem::namespaceURI):
3900         (WebCore::HTMLStackItem::HTMLStackItem):
3901         * html/parser/HTMLTreeBuilder.cpp:
3902         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
3903         (WebCore::HTMLTreeBuilder::processStartTag):
3904         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3905
3906 2012-07-23  Andreas Kling  <kling@webkit.org>
3907
3908         Report the extra memory used by immutable StylePropertySet objects.
3909         <http://webkit.org/b/92032>
3910
3911         Reviewed by Anders Carlsson.
3912
3913         Add an optional parameter to the MemoryClassInfo constructor for passing in additional base object
3914         size on top of sizeof(T).
3915
3916         Use this in StylePropertySet::reportMemoryUsage() to properly account for the CSSProperty array
3917         tacked onto the end of the object when m_isMutable == false.
3918
3919         * css/StylePropertySet.h:
3920         (WebCore::StylePropertySet::reportMemoryUsage):
3921         * dom/MemoryInstrumentation.h:
3922         (WebCore::MemoryObjectInfo::reportObjectInfo):
3923         (WebCore::MemoryClassInfo::MemoryClassInfo):
3924
3925 2012-07-23  Gregg Tavares  <gman@google.com>
3926
3927         Fix WebGL texSubImage2D for cube maps
3928         https://bugs.webkit.org/show_bug.cgi?id=91927
3929
3930         Reviewed by Kenneth Russell.
3931
3932         Fixes texSubImage2D so any size rectangle can be passed in
3933         for cube maps.
3934
3935         Test: fast/canvas/webgl/tex-sub-image-cube-maps.html
3936
3937         * html/canvas/WebGLRenderingContext.cpp:
3938         (WebCore):
3939         (WebCore::WebGLRenderingContext::copyTexImage2D):
3940         (WebCore::WebGLRenderingContext::texImage2DBase):
3941         (WebCore::WebGLRenderingContext::texSubImage2DBase):
3942         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
3943         * html/canvas/WebGLRenderingContext.h:
3944         (WebGLRenderingContext):
3945
3946 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3947
3948         Unreviewed, rolling out r123387.
3949         http://trac.webkit.org/changeset/123387
3950         https://bugs.webkit.org/show_bug.cgi?id=92036
3951
3952         Broke chromium win build (Requested by tony^work on #webkit).
3953
3954         * WebCore.gyp/WebCore.gyp:
3955         * WebCore.gyp/scripts/rule_bison.py:
3956         * bindings/scripts/preprocessor.pm:
3957         (applyPreprocessor):
3958         * make-hash-tools.pl:
3959
3960 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
3961
3962         Ref-count AtomicHTMLToken
3963         https://bugs.webkit.org/show_bug.cgi?id=91981
3964
3965         Reviewed by Adam Barth.
3966
3967         Ref-count AtomicHTMLToken to avoid copying AtomicHTMLToken in Bug 91703.
3968
3969         No new tests - no functional changes.
3970
3971         * html/parser/HTMLConstructionSite.cpp:
3972         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
3973         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
3974         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
3975         (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody):
3976         (WebCore::HTMLConstructionSite::insertDoctype):
3977         (WebCore::HTMLConstructionSite::insertComment):
3978         (WebCore::HTMLConstructionSite::insertCommentOnDocument):
3979         (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
3980         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
3981         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
3982         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
3983         (WebCore::HTMLConstructionSite::insertHTMLElement):
3984         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
3985         (WebCore::HTMLConstructionSite::insertFormattingElement):
3986         (WebCore::HTMLConstructionSite::insertScriptElement):
3987         (WebCore::HTMLConstructionSite::insertForeignElement):
3988         (WebCore::HTMLConstructionSite::createElement):
3989         (WebCore::HTMLConstructionSite::createHTMLElement):
3990         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
3991         * html/parser/HTMLConstructionSite.h:
3992         (HTMLConstructionSite):
3993         * html/parser/HTMLToken.h:
3994         (WebCore::AtomicHTMLToken::create):
3995         (AtomicHTMLToken):
3996         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
3997         * html/parser/HTMLTreeBuilder.cpp:
3998         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
3999         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
4000         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
4001         (WebCore::HTMLTreeBuilder::processToken):
4002         (WebCore::HTMLTreeBuilder::processDoctypeToken):
4003         (WebCore::HTMLTreeBuilder::processFakeStartTag):
4004         (WebCore::HTMLTreeBuilder::processFakeEndTag):
4005         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
4006         (WebCore::HTMLTreeBuilder::attributesForIsindexInput):
4007         (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
4008         (WebCore):
4009         (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
4010         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
4011         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
4012         (WebCore::HTMLTreeBuilder::processStartTag):
4013         (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
4014         (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
4015         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
4016         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
4017         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
4018         (WebCore::HTMLTreeBuilder::processEndTagForInRow):
4019         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
4020         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
4021         (WebCore::HTMLTreeBuilder::processEndTagForInTable):
4022         (WebCore::HTMLTreeBuilder::processEndTag):
4023         (WebCore::HTMLTreeBuilder::processComment):
4024         (WebCore::HTMLTreeBuilder::processCharacter):
4025         (WebCore::HTMLTreeBuilder::processEndOfFile):
4026         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):